@zeniai/web-app-ui 5.0.89-dev → 5.0.89-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-SY-dhjP_.js → AddressRoutes-BPwWkfcj.js} +1 -1
  2. package/dist/assets/{AddressScreen-Ctnukryb.js → AddressScreen-BvwS_9z2.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-Dwnx3Zrg.js → AiCfoScreen-DnKoE3IJ.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-DWpeCKQ1.js → BillPayApprovalRoutes-ceqgfgGo.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CEWNKd4a.js → BillPayRoutes-Co_gm91f.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-BFP865c-.js → BusinessVerificationPageScreen-BtdKr5lT.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-DmmGBEVb.js → ChargeCardRoutes-Dyf-JF83.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-CUrTGAPx.js → CompanyPassportScreen-CA0HpKiQ.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-BAkm3SD5.js → ConnectionAuthScreen-ByYbkNFh.js} +1 -1
  10. package/dist/assets/{CustomerOnboardingAuthScreen-BmBMaCZh.js → CustomerOnboardingAuthScreen-Bf-cizdJ.js} +1 -1
  11. package/dist/assets/{CustomerOnboardingRoutes-DQC5OT_-.js → CustomerOnboardingRoutes-DAjpcWcH.js} +1 -1
  12. package/dist/assets/{DashboardRoutes-DjR4FttM.js → DashboardRoutes-CeraNzvN.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-BXapS7K_.js → DefaultTenantHome-C1ToVywH.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-CluJV1hP.js → DomesticWireDetailScreen-CakALOxw.js} +1 -1
  15. package/dist/assets/{DrawerScreen-DTfCd2en.js → DrawerScreen-CG4hw7_P.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-CjmHAAQ4.js → EntityDetailRoutes-Uemw1snV.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-CNlHRTO1.js → ExpenseAutomationRoutes-Dq-ZbuPh.js} +1 -1
  18. package/dist/assets/{FeaturePreviewScreen-BWUt3LEA.js → FeaturePreviewScreen-IR7Qxf41.js} +1 -1
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-CgvAaP1t.js → HubSpotOAuthCallbackScreen-D9OkD_cX.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-DTgPyHRi.js → MagicLinkRoutes-DnFJJ-m-.js} +1 -1
  21. package/dist/assets/{MagicLinkSignInScreen-BxKlzsH1.js → MagicLinkSignInScreen-BJyrnEpT.js} +1 -1
  22. package/dist/assets/{MobileAppDrawer-BLGo796K.js → MobileAppDrawer-Bai_Lh0v.js} +1 -1
  23. package/dist/assets/{NotFoundScreen-B1k_jOem.js → NotFoundScreen-DVTblDpS.js} +1 -1
  24. package/dist/assets/{NotificationRoutes-yUtgb6NE.js → NotificationRoutes-BtvHwIHt.js} +1 -1
  25. package/dist/assets/{OAuthConsentScreen-DSPFHGna.js → OAuthConsentScreen-_NASGa8c.js} +1 -1
  26. package/dist/assets/{PandLWithForecastRoutes-C5G3jn5O.js → PandLWithForecastRoutes-DdCvCtlN.js} +1 -1
  27. package/dist/assets/{PeopleRoutes-DG9PRPQo.js → PeopleRoutes-rmnyceoy.js} +1 -1
  28. package/dist/assets/{PerformanceRoutes-CdqCJZzN.js → PerformanceRoutes-86j9LdIB.js} +1 -1
  29. package/dist/assets/{QBOConnectionScreen-jmt8kh8_.js → QBOConnectionScreen-CKCjqZzP.js} +1 -1
  30. package/dist/assets/{ReferralListScreen-BKwWhmDP.js → ReferralListScreen-QLxqWfUk.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRoutes-DXxXV9_W.js → ReimbursementApprovalRoutes-BNwcJK7H.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DtFME-kz.js → ReimbursementApprovalRuleDetailScreen-a-JX63nK.js} +1 -1
  33. package/dist/assets/{ReimbursementRoutes-q-LM-3Mz.js → ReimbursementRoutes-C_KcRhnd.js} +1 -1
  34. package/dist/assets/{ReportsRoutes-DZjJw2so.js → ReportsRoutes-D9HvTPuu.js} +1 -1
  35. package/dist/assets/{RewardsRoutes-D41cXIrP.js → RewardsRoutes-CSFB8rt7.js} +1 -1
  36. package/dist/assets/{ScreenRoutes-DrDg9CqO.js → ScreenRoutes-DUF7lq8S.js} +2 -2
  37. package/dist/assets/{SettingsRoutes-D7DVrB_r.js → SettingsRoutes-FuwQspoI.js} +1 -1
  38. package/dist/assets/{SetupPagesScreen-1j44PFay.js → SetupPagesScreen-D2dbZmg_.js} +1 -1
  39. package/dist/assets/{SignInScreen-CNbjT65A.js → SignInScreen-DRX2XZAN.js} +1 -1
  40. package/dist/assets/{SignOutScreen-CkVX4P52.js → SignOutScreen-DkeFUQXA.js} +1 -1
  41. package/dist/assets/{TaskListScreen-BMzXb3Gv.js → TaskListScreen-Cln-3rWs.js} +1 -1
  42. package/dist/assets/{TaskRoutes-D5ysh0Fw.js → TaskRoutes-C4E8P_q-.js} +1 -1
  43. package/dist/assets/{TransactionDetailRoutes-BLkvSFsR.js → TransactionDetailRoutes-C4YdYvtN.js} +1 -1
  44. package/dist/assets/{TransactionDetailScreen-AbBGaDF8.js → TransactionDetailScreen-DMDwXid_.js} +1 -1
  45. package/dist/assets/{TransactionListRoutes-CWiHUsRg.js → TransactionListRoutes-qMhxhmtX.js} +1 -1
  46. package/dist/assets/{TreasuryRoutes-CocKL-Oj.js → TreasuryRoutes-DO-yW8sg.js} +1 -1
  47. package/dist/assets/{VendorsRoutes-a2NCvCPG.js → VendorsRoutes-Gx5YESzg.js} +1 -1
  48. package/dist/assets/{WiseConfirmationScreen-DZiJs9hh.js → WiseConfirmationScreen-D_T9Itnb.js} +1 -1
  49. package/dist/assets/{ZeniAccountRoutes-CEygLs18.js → ZeniAccountRoutes-7PRzJ32t.js} +1 -1
  50. package/dist/assets/{ZeniAccountStatementScreen-DLVOSwmC.js → ZeniAccountStatementScreen-DPM5oRGk.js} +1 -1
  51. package/dist/assets/{analyticsHelper-COFNU8CP.js → analyticsHelper-RRbpObXJ.js} +1 -1
  52. package/dist/assets/{getLocaleForTenant-OYWr98Zl.js → getLocaleForTenant-FDoQOl0i.js} +1 -1
  53. package/dist/assets/{index-CPG6ITBm.js → index-C4_7gLFp.js} +5 -5
  54. package/dist/assets/{routePaths-1uJ5ric0.js → routePaths-B7W4yhsS.js} +1 -1
  55. package/dist/assets/{useAskAiCfoHostNavButtonProps-DaoVDdk6.js → useAskAiCfoHostNavButtonProps-c_p-0pW7.js} +1 -1
  56. package/dist/assets/{useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js → useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js} +1 -1
  57. package/dist/assets/{useInitialThreadRequest-C_MqgvcA.js → useInitialThreadRequest-qRRdn_eE.js} +1 -1
  58. package/dist/assets/{withTransactionSidePanel-xau0uwsY.js → withTransactionSidePanel-CH7Cbdk4.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-DjR4FttM.js","assets/sentry-C5UCCkb_.js","assets/core-DSsu1iyO.js","assets/zeni-epic-state-CFQMpWBE.js","assets/index-CPG6ITBm.js","assets/mui-D9TDAUAO.js","assets/analytics-CQQ1PG0J.js","assets/utils-Cd1icpH6.js","assets/withTransactionSidePanel-xau0uwsY.js","assets/useAskAiCfoHostNavButtonProps-DaoVDdk6.js","assets/useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js","assets/TransactionDetailScreen-AbBGaDF8.js","assets/decodeURIComponentSafe-CRFR6Y3w.js","assets/routePaths-1uJ5ric0.js","assets/NotFoundScreen-B1k_jOem.js","assets/useInitialThreadRequest-C_MqgvcA.js","assets/analyticsHelper-COFNU8CP.js","assets/CompanyPassportScreen-CUrTGAPx.js","assets/MobileAppDrawer-BLGo796K.js","assets/FeaturePreviewScreen-BWUt3LEA.js","assets/ReferralListScreen-BKwWhmDP.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-CEWNKd4a.js","assets/AddressScreen-Ctnukryb.js","assets/DomesticWireDetailScreen-CluJV1hP.js","assets/DrawerScreen-DTfCd2en.js","assets/SetupPagesScreen-1j44PFay.js","assets/BusinessVerificationPageScreen-BFP865c-.js","assets/BillPayApprovalRoutes-DWpeCKQ1.js","assets/ReimbursementApprovalRuleDetailScreen-DtFME-kz.js","assets/getLocaleForTenant-OYWr98Zl.js","assets/ReimbursementRoutes-q-LM-3Mz.js","assets/ReimbursementApprovalRoutes-DXxXV9_W.js","assets/TransactionListRoutes-CWiHUsRg.js","assets/ZeniAccountStatementScreen-DLVOSwmC.js","assets/SettingsRoutes-D7DVrB_r.js","assets/accountMappingHelper-BEJScFAE.js","assets/QBOConnectionScreen-jmt8kh8_.js","assets/empty-CXjJmklp.js","assets/index-XYg74ieW.js","assets/url-Bow-X1Kk.js","assets/index-CZgOkU7x.js","assets/ReportsRoutes-DZjJw2so.js","assets/ChargeCardRoutes-DmmGBEVb.js","assets/PeopleRoutes-DG9PRPQo.js","assets/ExpenseAutomationRoutes-CNlHRTO1.js","assets/TreasuryRoutes-CocKL-Oj.js","assets/VendorsRoutes-a2NCvCPG.js","assets/pathToGoBack-Ce7z8Bpw.js","assets/ZeniAccountRoutes-CEygLs18.js","assets/AddressRoutes-SY-dhjP_.js","assets/PandLWithForecastRoutes-C5G3jn5O.js","assets/CustomerOnboardingRoutes-DQC5OT_-.js","assets/TransactionDetailRoutes-BLkvSFsR.js","assets/EntityDetailRoutes-CjmHAAQ4.js","assets/NotificationRoutes-yUtgb6NE.js","assets/PerformanceRoutes-CdqCJZzN.js","assets/RewardsRoutes-D41cXIrP.js","assets/TaskRoutes-D5ysh0Fw.js","assets/TaskListScreen-BMzXb3Gv.js","assets/AiCfoScreen-Dwnx3Zrg.js"])))=>i.map(i=>d[i]);
2
- import{_ as n,bn as os,eR as ls,eX as cs,eV as ds,eW as ms,fG as us,eT as _s,cQ as Ae,cx as As,fc as Es,cp as ps,bE as xs,bq as gs,fh as Is,v as Ts,Jm as hs,bv as js,Jn as Us,bG as bs,fe as Hs,bF as Rs,bs as Ds,cl as ys,Jo as fs,Jp as Cs,cN as vs,cP as Os,cO as Ps,cw as Fs,cC as Ls,mT as Ee,eS as pe,fQ as Bs,fl as xe,fN as ge,fO as Ie,fm as ks}from"./zeni-epic-state-CFQMpWBE.js";import{j as e}from"./liveblocks-D0ylGz77.js";import{a as v}from"./sentry-C5UCCkb_.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-DSsu1iyO.js";import{m as ws,u as Gs,z as H,C as zs,a as $s,i as Js,A as L,c as Ws,L as B,D as he,t as _,P as Ys,d as K,l}from"./index-CPG6ITBm.js";import"./mui-D9TDAUAO.js";import{f as je}from"./analyticsHelper-COFNU8CP.js";import{t as qs}from"./getLocaleForTenant-OYWr98Zl.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="1727f9c6-7be2-4805-94dd-2400fcc1b5a7",i._sentryDebugIdIdentifier="sentry-dbid-1727f9c6-7be2-4805-94dd-2400fcc1b5a7")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-DjR4FttM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-CEWNKd4a.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,14,24,9,10,15,25,18,19,26,16,13,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-q-LM-3Mz.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,18,16,13,27,19,9,10,15,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-CWiHUsRg.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21])),settings:()=>n(()=>import("./SettingsRoutes-D7DVrB_r.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,18,36,23,14,16,27,13,17,37,38,39,40,41,12,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-DZjJw2so.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-DmmGBEVb.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,18,14,16,13,27,9,10,23,21])),people:()=>n(()=>import("./PeopleRoutes-DG9PRPQo.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-CNlHRTO1.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-CocKL-Oj.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,18,16,13,27,9,10,15,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-a2NCvCPG.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,14,19,13,48,9,10,18,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-CEygLs18.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,18,16,13,27,19,24,23,9,10,34,21]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Ks=l(()=>n(()=>import("./ReportsRoutes-DZjJw2so.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21]))),en=l(()=>n(()=>import("./AddressRoutes-SY-dhjP_.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,14,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-DG9PRPQo.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-C5G3jn5O.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,19,9,10,15,13,18,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-DQC5OT_-.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,14,37,38,39,40,41,12,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-a2NCvCPG.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,14,19,13,48,9,10,18,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-BLkvSFsR.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-CjmHAAQ4.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,21]))),on=l(()=>n(()=>import("./DashboardRoutes-DjR4FttM.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),be=l(()=>n(()=>import("./BillPayRoutes-CEWNKd4a.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,14,24,9,10,15,25,18,19,26,16,13,27,28,29,30,21]))),ln=l(()=>n(()=>import("./SettingsRoutes-D7DVrB_r.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,18,36,23,14,16,27,13,17,37,38,39,40,41,12,28,29,32,21]))),He=l(()=>n(()=>import("./ReimbursementRoutes-q-LM-3Mz.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,18,16,13,27,19,9,10,15,25,32,29,30,21]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-CEygLs18.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,18,16,13,27,19,24,23,9,10,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes-CocKL-Oj.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,18,16,13,27,9,10,15,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-CWiHUsRg.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-DmmGBEVb.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,18,14,16,13,27,9,10,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-yUtgb6NE.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,21]))),An=l(()=>n(()=>import("./PerformanceRoutes-CdqCJZzN.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,18,21]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-CNlHRTO1.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-D41cXIrP.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,20,9,10,18,21]))),xn=l(()=>n(()=>import("./TaskRoutes-D5ysh0Fw.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,15,18,59,9,10,21]))),gn=l(()=>n(()=>import("./AiCfoScreen-Dwnx3Zrg.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-B1k_jOem.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,21]))),In=l(()=>n(()=>import("./TaskListScreen-BMzXb3Gv.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,18,21])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),q=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),Q=$s(),ye=Js(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),E=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),J=G(a=>us(a));if(o!=null){const a=H.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),A=Ws(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,X=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?Es(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(X!=null&&D!=null){const a=X.params.selectedPeriod;if(a!=null){const b=a.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=xs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(Is(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[X,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s){if(pe(b?.userId,b?.zeniSessionId,a.tenantId),d(Bs(!0)),d(xe(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=H.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(qs(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?K.identify(a.userId,{tenant_id:a.tenantId}):K.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(xe(s));const Y=H.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(W){K.identify(m.userId,{tenant_id:s});const Y=s==null||s!=null&&(b==="Completed"||b==="Error");a==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,D,h,f,U))},[D,E]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&J.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(J.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,J.tenantsBaseInOrder))},[J,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):E==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(a=Xs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[E,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&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(A?.loggedInUserRoleMap),me=Oe&&!C,Je=r.company!=null&&Hs(r.company),We=Pe&&Je===!0&&!C,Ye=re&&Rs(A?.loggedInUserRoleMap),qe=oe&&Ds(A?.loggedInUserRoleMap),Qe=me&&ys(A?.loggedInUserRoleMap),Xe=fs(A?.loggedInUserRoleMap),Ke=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),x=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),I=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=We&&x,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Xe===!0||Ke===!0;return H.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="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(A.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:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Ks,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:x,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xn,{})}),e.jsx(t,{path:"address/*",element:Ye||de||Qe||qe?e.jsx(en,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,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(An,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(En,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,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(gn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(bn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Hn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),bn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wn as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-CeraNzvN.js","assets/sentry-C5UCCkb_.js","assets/core-DSsu1iyO.js","assets/zeni-epic-state-CFQMpWBE.js","assets/index-C4_7gLFp.js","assets/mui-D9TDAUAO.js","assets/analytics-CQQ1PG0J.js","assets/utils-Cd1icpH6.js","assets/withTransactionSidePanel-CH7Cbdk4.js","assets/useAskAiCfoHostNavButtonProps-c_p-0pW7.js","assets/useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js","assets/TransactionDetailScreen-DMDwXid_.js","assets/decodeURIComponentSafe-CRFR6Y3w.js","assets/routePaths-B7W4yhsS.js","assets/NotFoundScreen-DVTblDpS.js","assets/useInitialThreadRequest-qRRdn_eE.js","assets/analyticsHelper-RRbpObXJ.js","assets/CompanyPassportScreen-CA0HpKiQ.js","assets/MobileAppDrawer-Bai_Lh0v.js","assets/FeaturePreviewScreen-IR7Qxf41.js","assets/ReferralListScreen-QLxqWfUk.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-Co_gm91f.js","assets/AddressScreen-BvwS_9z2.js","assets/DomesticWireDetailScreen-CakALOxw.js","assets/DrawerScreen-CG4hw7_P.js","assets/SetupPagesScreen-D2dbZmg_.js","assets/BusinessVerificationPageScreen-BtdKr5lT.js","assets/BillPayApprovalRoutes-ceqgfgGo.js","assets/ReimbursementApprovalRuleDetailScreen-a-JX63nK.js","assets/getLocaleForTenant-FDoQOl0i.js","assets/ReimbursementRoutes-C_KcRhnd.js","assets/ReimbursementApprovalRoutes-BNwcJK7H.js","assets/TransactionListRoutes-qMhxhmtX.js","assets/ZeniAccountStatementScreen-DPM5oRGk.js","assets/SettingsRoutes-FuwQspoI.js","assets/accountMappingHelper-BEJScFAE.js","assets/QBOConnectionScreen-CKCjqZzP.js","assets/empty-CXjJmklp.js","assets/index-XYg74ieW.js","assets/url-Bow-X1Kk.js","assets/index-CZgOkU7x.js","assets/ReportsRoutes-D9HvTPuu.js","assets/ChargeCardRoutes-Dyf-JF83.js","assets/PeopleRoutes-rmnyceoy.js","assets/ExpenseAutomationRoutes-Dq-ZbuPh.js","assets/TreasuryRoutes-DO-yW8sg.js","assets/VendorsRoutes-Gx5YESzg.js","assets/pathToGoBack-Ce7z8Bpw.js","assets/ZeniAccountRoutes-7PRzJ32t.js","assets/AddressRoutes-BPwWkfcj.js","assets/PandLWithForecastRoutes-DdCvCtlN.js","assets/CustomerOnboardingRoutes-DAjpcWcH.js","assets/TransactionDetailRoutes-C4YdYvtN.js","assets/EntityDetailRoutes-Uemw1snV.js","assets/NotificationRoutes-BtvHwIHt.js","assets/PerformanceRoutes-86j9LdIB.js","assets/RewardsRoutes-CSFB8rt7.js","assets/TaskRoutes-C4E8P_q-.js","assets/TaskListScreen-Cln-3rWs.js","assets/AiCfoScreen-DnKoE3IJ.js"])))=>i.map(i=>d[i]);
2
+ import{_ as n,bn as os,eR as ls,eX as cs,eV as ds,eW as ms,fG as us,eT as _s,cQ as Ae,cx as As,fc as Es,cp as ps,bE as xs,bq as gs,fh as Is,v as Ts,Jm as hs,bv as js,Jn as Us,bG as bs,fe as Hs,bF as Rs,bs as Ds,cl as ys,Jo as fs,Jp as Cs,cN as vs,cP as Os,cO as Ps,cw as Fs,cC as Ls,mT as Ee,eS as pe,fQ as Bs,fl as xe,fN as ge,fO as Ie,fm as ks}from"./zeni-epic-state-CFQMpWBE.js";import{j as e}from"./liveblocks-D0ylGz77.js";import{a as v}from"./sentry-C5UCCkb_.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-DSsu1iyO.js";import{m as ws,u as Gs,z as H,C as zs,a as $s,i as Js,A as L,c as Ws,L as B,D as he,t as _,P as Ys,d as K,l}from"./index-C4_7gLFp.js";import"./mui-D9TDAUAO.js";import{f as je}from"./analyticsHelper-RRbpObXJ.js";import{t as qs}from"./getLocaleForTenant-FDoQOl0i.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="1727f9c6-7be2-4805-94dd-2400fcc1b5a7",i._sentryDebugIdIdentifier="sentry-dbid-1727f9c6-7be2-4805-94dd-2400fcc1b5a7")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-CeraNzvN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-Co_gm91f.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,14,24,9,10,15,25,18,19,26,16,13,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-C_KcRhnd.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,18,16,13,27,19,9,10,15,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-qMhxhmtX.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21])),settings:()=>n(()=>import("./SettingsRoutes-FuwQspoI.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,18,36,23,14,16,27,13,17,37,38,39,40,41,12,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-D9HvTPuu.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-Dyf-JF83.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,18,14,16,13,27,9,10,23,21])),people:()=>n(()=>import("./PeopleRoutes-rmnyceoy.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-Dq-ZbuPh.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-DO-yW8sg.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,18,16,13,27,9,10,15,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-Gx5YESzg.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,14,19,13,48,9,10,18,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-7PRzJ32t.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,18,16,13,27,19,24,23,9,10,34,21]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Ks=l(()=>n(()=>import("./ReportsRoutes-D9HvTPuu.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21]))),en=l(()=>n(()=>import("./AddressRoutes-BPwWkfcj.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,14,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-rmnyceoy.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-DdCvCtlN.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,19,9,10,15,13,18,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-DAjpcWcH.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,14,37,38,39,40,41,12,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-Gx5YESzg.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,14,19,13,48,9,10,18,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-C4YdYvtN.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-Uemw1snV.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,21]))),on=l(()=>n(()=>import("./DashboardRoutes-CeraNzvN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),be=l(()=>n(()=>import("./BillPayRoutes-Co_gm91f.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,14,24,9,10,15,25,18,19,26,16,13,27,28,29,30,21]))),ln=l(()=>n(()=>import("./SettingsRoutes-FuwQspoI.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,18,36,23,14,16,27,13,17,37,38,39,40,41,12,28,29,32,21]))),He=l(()=>n(()=>import("./ReimbursementRoutes-C_KcRhnd.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,18,16,13,27,19,9,10,15,25,32,29,30,21]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-7PRzJ32t.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,18,16,13,27,19,24,23,9,10,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes-DO-yW8sg.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,18,16,13,27,9,10,15,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-qMhxhmtX.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-Dyf-JF83.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,18,14,16,13,27,9,10,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-BtvHwIHt.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,21]))),An=l(()=>n(()=>import("./PerformanceRoutes-86j9LdIB.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,18,21]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-Dq-ZbuPh.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-CSFB8rt7.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,20,9,10,18,21]))),xn=l(()=>n(()=>import("./TaskRoutes-C4E8P_q-.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,15,18,59,9,10,21]))),gn=l(()=>n(()=>import("./AiCfoScreen-DnKoE3IJ.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-DVTblDpS.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,21]))),In=l(()=>n(()=>import("./TaskListScreen-Cln-3rWs.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,18,21])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),q=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),Q=$s(),ye=Js(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),E=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),J=G(a=>us(a));if(o!=null){const a=H.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),A=Ws(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,X=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?Es(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(X!=null&&D!=null){const a=X.params.selectedPeriod;if(a!=null){const b=a.split("-");if(b.length===2){const d=ps(Number(b[0])),s=Number(b[1]),m=xs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(Is(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[X,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s){if(pe(b?.userId,b?.zeniSessionId,a.tenantId),d(Bs(!0)),d(xe(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=H.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(qs(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?K.identify(a.userId,{tenant_id:a.tenantId}):K.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,b,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(W&&ts){k(xe(s));const Y=H.getSignedInUserTenantWithId(s);Y?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else W&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),W&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(W){K.identify(m.userId,{tenant_id:s});const Y=s==null||s!=null&&(b==="Completed"||b==="Error");a==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),Y&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,D,h,f,U))},[D,E]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&J.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(J.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,J.tenantsBaseInOrder))},[J,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&f(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):E==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(a=Xs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},b)}())},[E,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&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&bs(A?.loggedInUserRoleMap),me=Oe&&!C,Je=r.company!=null&&Hs(r.company),We=Pe&&Je===!0&&!C,Ye=re&&Rs(A?.loggedInUserRoleMap),qe=oe&&Ds(A?.loggedInUserRoleMap),Qe=me&&ys(A?.loggedInUserRoleMap),Xe=fs(A?.loggedInUserRoleMap),Ke=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),x=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),I=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=We&&x,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Xe===!0||Ke===!0;return H.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="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(A.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:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Ks,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:x,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xn,{})}),e.jsx(t,{path:"address/*",element:Ye||de||Qe||qe?e.jsx(en,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,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(An,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(En,{}):e.jsx(Re,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,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(gn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(bn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Hn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),bn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),Re=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wn as default};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-D0ylGz77.js";import{a as p}from"./sentry-C5UCCkb_.js";import{j as _,u as R,h as P,g as h,k as B,l as F,n as Q,o as C}from"./core-DSsu1iyO.js";import{bn as xe,eR as j,gJ as de,Lr as Ee,tM as Ae,jD as ue,lW as we,gL as je,Lt as ke,Ls as Pe,NS as ve,xL as De,Ce as Ue,Nr as Me,NA as _e,c2 as Y,cH as Te,cI as Re,Jy as Be,NT as Fe,Jz as Ve,wb as Oe,NU as Le,Eu as Ne,BW as $e,BN as pe,BK as Ke,wf as ge,BQ as me,BT as fe,BZ as ee,sK as ne,we as ze,jf as X,ji as he,NV as Je,kj as Ge,wu as He,Km as Ze,Kn as We,jd as Qe,NW as Xe,jg as qe,r8 as Ye,NX as en,NY as nn,rc as tn,gl as an,JH as se,gs as sn,JI as on,wr as cn,NZ as rn,N_ as ln,Cb as dn,eV as be,eX as Se,N$ as un,fz as pn,JR as gn,wq as oe,fE as ie,fD as mn,wp as fn,fC as hn,fB as bn,O0 as Sn,e_ as Ie,O1 as In,O2 as yn,wx as Cn,wo as ce,O3 as xn,fg as En,wl 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-CFQMpWBE.js";import{C as te,A as U,z as x,ac as ye,bB as Tn,d as K,f as Rn,c as V,B as ae,bC as Bn,bD as Fn,an as Vn,j as Ce,bE as On,bF as Ln,bG as Nn,a6 as $n,V as Kn,bH as zn,s as Jn,bI as Gn}from"./index-CPG6ITBm.js";import{n as M}from"./mui-D9TDAUAO.js";import{M as v}from"./MobileAppDrawer-BLGo796K.js";import{a as N,g as $,m as Hn}from"./accountMappingHelper-BEJScFAE.js";import{t as Zn,A as Wn}from"./AddressScreen-Ctnukryb.js";import T from"./NotFoundScreen-B1k_jOem.js";import{g as Qn}from"./analyticsHelper-COFNU8CP.js";import{B as Xn}from"./BusinessVerificationPageScreen-BFP865c-.js";import{C as qn}from"./CompanyPassportScreen-CUrTGAPx.js";import{q as re}from"./QBOConnectionScreen-jmt8kh8_.js";import{B as Yn}from"./BillPayApprovalRoutes-DWpeCKQ1.js";import{R as et}from"./ReimbursementApprovalRoutes-DXxXV9_W.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./routePaths-1uJ5ric0.js";import"./empty-CXjJmklp.js";import"./pdf-lib-DbsQH8ti.js";import"./index-XYg74ieW.js";import"./url-Bow-X1Kk.js";import"./index-CZgOkU7x.js";import"./decodeURIComponentSafe-CRFR6Y3w.js";import"./ReimbursementApprovalRuleDetailScreen-DtFME-kz.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]="8378091d-fe1e-46e3-a989-949bfcbca433",e._sentryDebugIdIdentifier="sentry-dbid-8378091d-fe1e-46e3-a989-949bfcbca433")}catch{}})();const nt=M.div`
1
+ import{j as a}from"./liveblocks-D0ylGz77.js";import{a as p}from"./sentry-C5UCCkb_.js";import{j as _,u as R,h as P,g as h,k as B,l as F,n as Q,o as C}from"./core-DSsu1iyO.js";import{bn as xe,eR as j,gJ as de,Lr as Ee,tM as Ae,jD as ue,lW as we,gL as je,Lt as ke,Ls as Pe,NS as ve,xL as De,Ce as Ue,Nr as Me,NA as _e,c2 as Y,cH as Te,cI as Re,Jy as Be,NT as Fe,Jz as Ve,wb as Oe,NU as Le,Eu as Ne,BW as $e,BN as pe,BK as Ke,wf as ge,BQ as me,BT as fe,BZ as ee,sK as ne,we as ze,jf as X,ji as he,NV as Je,kj as Ge,wu as He,Km as Ze,Kn as We,jd as Qe,NW as Xe,jg as qe,r8 as Ye,NX as en,NY as nn,rc as tn,gl as an,JH as se,gs as sn,JI as on,wr as cn,NZ as rn,N_ as ln,Cb as dn,eV as be,eX as Se,N$ as un,fz as pn,JR as gn,wq as oe,fE as ie,fD as mn,wp as fn,fC as hn,fB as bn,O0 as Sn,e_ as Ie,O1 as In,O2 as yn,wx as Cn,wo as ce,O3 as xn,fg as En,wl 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-CFQMpWBE.js";import{C as te,A as U,z as x,ac as ye,bB as Tn,d as K,f as Rn,c as V,B as ae,bC as Bn,bD as Fn,an as Vn,j as Ce,bE as On,bF as Ln,bG as Nn,a6 as $n,V as Kn,bH as zn,s as Jn,bI as Gn}from"./index-C4_7gLFp.js";import{n as M}from"./mui-D9TDAUAO.js";import{M as v}from"./MobileAppDrawer-Bai_Lh0v.js";import{a as N,g as $,m as Hn}from"./accountMappingHelper-BEJScFAE.js";import{t as Zn,A as Wn}from"./AddressScreen-BvwS_9z2.js";import T from"./NotFoundScreen-DVTblDpS.js";import{g as Qn}from"./analyticsHelper-RRbpObXJ.js";import{B as Xn}from"./BusinessVerificationPageScreen-BtdKr5lT.js";import{C as qn}from"./CompanyPassportScreen-CA0HpKiQ.js";import{q as re}from"./QBOConnectionScreen-CKCjqZzP.js";import{B as Yn}from"./BillPayApprovalRoutes-ceqgfgGo.js";import{R as et}from"./ReimbursementApprovalRoutes-BNwcJK7H.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./routePaths-B7W4yhsS.js";import"./empty-CXjJmklp.js";import"./pdf-lib-DbsQH8ti.js";import"./index-XYg74ieW.js";import"./url-Bow-X1Kk.js";import"./index-CZgOkU7x.js";import"./decodeURIComponentSafe-CRFR6Y3w.js";import"./ReimbursementApprovalRuleDetailScreen-a-JX63nK.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]="8378091d-fe1e-46e3-a989-949bfcbca433",e._sentryDebugIdIdentifier="sentry-dbid-8378091d-fe1e-46e3-a989-949bfcbca433")}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-D0ylGz77.js";import{j as Q,u as X,h as Y,l as W,g as E,N as j,k as H,q as Xe}from"./core-DSsu1iyO.js";import{bF as Ye,cl as Ie,Nf as ye,eR as F,cx as en,xW as Z,xL as nn,Nr as tn,Nu as an,qa as ee,p_ as ne,kb as te,sg as z,Nw as Ae,fD as $e,fC as We,fB as He,Nx as sn,y3 as on,BW as ke,BN as _e,BK as ve,BB as q,BQ as Pe,BT as Ee,BZ as we,sK as De,fS as cn,cs as rn,eX as un,eV as dn,eW as ln,bs as pn,Ny as mn,AD as le,Bf as yn,Nz as fn,bG as gn,Da as pe,Ce as Sn,NA as bn,NB as hn,De as Cn,Di as In,s9 as An,HH as kn,DP as Ce,EI as me,NC as _n,ND as vn,NE as Pn,NF as Ge,NG as En,K9 as wn,ME as Dn,Kl as Tn,NH as Ke,NI as xe,E1 as qe,kj as Un,q1 as Je,si as On,bE as Ne,su as je,cv as Bn,NJ as Qe,ff as xn,Dx as Fn,DB as Vn,NK as Nn,DS as Re,NL as jn,NM as Rn,NN as zn,NO as Ln,fL as Mn,ze as Zn,NP as $n,zj as Wn,zi as Hn}from"./zeni-epic-state-CFQMpWBE.js";import{c as ae,C as ie,A as de,m as Te,aK as J,z as D,x as se,d as w,B as Ue,f as $,bq as Gn,aq as oe,br as V,bs as Kn,bt as qn,ac as Ve,bu as Jn,s as ze,ar as Le,K as Qn,E as Xn,bv as Yn,bw as et,bx as nt,a3 as tt}from"./index-CPG6ITBm.js";import{a as C}from"./sentry-C5UCCkb_.js";import{n as Fe,D as at,S as it}from"./mui-D9TDAUAO.js";import{M as fe}from"./MobileAppDrawer-BLGo796K.js";import R from"./NotFoundScreen-B1k_jOem.js";import{a as Me}from"./analyticsHelper-COFNU8CP.js";import{d as Ze}from"./routePaths-1uJ5ric0.js";import{B as Be}from"./BusinessVerificationPageScreen-BFP865c-.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]="02e2ee13-34da-43c4-a3ba-5d4f322d4d14",e._sentryDebugIdIdentifier="sentry-dbid-02e2ee13-34da-43c4-a3ba-5d4f322d4d14")}catch{}})();const st=Fe.div`
1
+ import{j as u}from"./liveblocks-D0ylGz77.js";import{j as Q,u as X,h as Y,l as W,g as E,N as j,k as H,q as Xe}from"./core-DSsu1iyO.js";import{bF as Ye,cl as Ie,Nf as ye,eR as F,cx as en,xW as Z,xL as nn,Nr as tn,Nu as an,qa as ee,p_ as ne,kb as te,sg as z,Nw as Ae,fD as $e,fC as We,fB as He,Nx as sn,y3 as on,BW as ke,BN as _e,BK as ve,BB as q,BQ as Pe,BT as Ee,BZ as we,sK as De,fS as cn,cs as rn,eX as un,eV as dn,eW as ln,bs as pn,Ny as mn,AD as le,Bf as yn,Nz as fn,bG as gn,Da as pe,Ce as Sn,NA as bn,NB as hn,De as Cn,Di as In,s9 as An,HH as kn,DP as Ce,EI as me,NC as _n,ND as vn,NE as Pn,NF as Ge,NG as En,K9 as wn,ME as Dn,Kl as Tn,NH as Ke,NI as xe,E1 as qe,kj as Un,q1 as Je,si as On,bE as Ne,su as je,cv as Bn,NJ as Qe,ff as xn,Dx as Fn,DB as Vn,NK as Nn,DS as Re,NL as jn,NM as Rn,NN as zn,NO as Ln,fL as Mn,ze as Zn,NP as $n,zj as Wn,zi as Hn}from"./zeni-epic-state-CFQMpWBE.js";import{c as ae,C as ie,A as de,m as Te,aK as J,z as D,x as se,d as w,B as Ue,f as $,bq as Gn,aq as oe,br as V,bs as Kn,bt as qn,ac as Ve,bu as Jn,s as ze,ar as Le,K as Qn,E as Xn,bv as Yn,bw as et,bx as nt,a3 as tt}from"./index-C4_7gLFp.js";import{a as C}from"./sentry-C5UCCkb_.js";import{n as Fe,D as at,S as it}from"./mui-D9TDAUAO.js";import{M as fe}from"./MobileAppDrawer-Bai_Lh0v.js";import R from"./NotFoundScreen-DVTblDpS.js";import{a as Me}from"./analyticsHelper-RRbpObXJ.js";import{d as Ze}from"./routePaths-B7W4yhsS.js";import{B as Be}from"./BusinessVerificationPageScreen-BtdKr5lT.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]="02e2ee13-34da-43c4-a3ba-5d4f322d4d14",e._sentryDebugIdIdentifier="sentry-dbid-02e2ee13-34da-43c4-a3ba-5d4f322d4d14")}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-D0ylGz77.js";import{a as u,b as T,q as A}from"./sentry-C5UCCkb_.js";import{h as D,j as z,g as l,u as J,N as j,k as M}from"./core-DSsu1iyO.js";import{u as P,z as s,m as F,d as E,D as O,e as _,f as B,g as N,h as V,n as $,j as v}from"./index-CPG6ITBm.js";import{eR as q,Jl as K,Jm as R,eS as W,fl as H,Jr as G,fK as Q,cU as X,Js as y,Jt as Y,Ju as Z,bT as b}from"./zeni-epic-state-CFQMpWBE.js";import"./mui-D9TDAUAO.js";import{u as ee}from"./useDeviceId-CD8u4vjr.js";import{f as te}from"./analyticsHelper-COFNU8CP.js";import{t as ne}from"./getLocaleForTenant-OYWr98Zl.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="0b359ffe-c141-488f-9656-4bb4310c0642",t._sentryDebugIdIdentifier="sentry-dbid-0b359ffe-c141-488f-9656-4bb4310c0642")}catch{}})();const ie=M(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:b(c),sourceUri:b(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(y())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>q(e)),I=l(e=>K(e)),m=J(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(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),Q().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&k!=null?f.jsx(N,{onClose:()=>i(y()),unlockDate:k}):null]})}export{ve as default};
1
+ import{j as f}from"./liveblocks-D0ylGz77.js";import{a as u,b as T,q as A}from"./sentry-C5UCCkb_.js";import{h as D,j as z,g as l,u as J,N as j,k as M}from"./core-DSsu1iyO.js";import{u as P,z as s,m as F,d as E,D as O,e as _,f as B,g as N,h as V,n as $,j as v}from"./index-C4_7gLFp.js";import{eR as q,Jl as K,Jm as R,eS as W,fl as H,Jr as G,fK as Q,cU as X,Js as y,Jt as Y,Ju as Z,bT as b}from"./zeni-epic-state-CFQMpWBE.js";import"./mui-D9TDAUAO.js";import{u as ee}from"./useDeviceId-CD8u4vjr.js";import{f as te}from"./analyticsHelper-RRbpObXJ.js";import{t as ne}from"./getLocaleForTenant-FDoQOl0i.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="0b359ffe-c141-488f-9656-4bb4310c0642",t._sentryDebugIdIdentifier="sentry-dbid-0b359ffe-c141-488f-9656-4bb4310c0642")}catch{}})();const ie=M(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:b(c),sourceUri:b(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(y())}}})($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>q(e)),I=l(e=>K(e)),m=J(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(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),Q().then(()=>{const e=V();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&k!=null?f.jsx(N,{onClose:()=>i(y()),unlockDate:k}):null]})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-D0ylGz77.js";import{a as n}from"./sentry-C5UCCkb_.js";import{h as u,u as m,j as p,N as g}from"./core-DSsu1iyO.js";import{z as f,B as y,t as b,d,f as h}from"./index-CPG6ITBm.js";import{fP as x,fQ as I,JJ as j}from"./zeni-epic-state-CFQMpWBE.js";import{n as w}from"./mui-D9TDAUAO.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="a1d1bf11-ab86-49f3-8712-e8e0dc08e661",e._sentryDebugIdIdentifier="sentry-dbid-a1d1bf11-ab86-49f3-8712-e8e0dc08e661")}catch{}})();function U(){const e=u(),t=m(),i=p(),a=n.useRef(!1),l=f.isSignedIn(),r=t.state?.message==="logout",o=r||l;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),j(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(c){console.error("Error during sign out:",c)}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-D0ylGz77.js";import{a as n}from"./sentry-C5UCCkb_.js";import{h as u,u as m,j as p,N as g}from"./core-DSsu1iyO.js";import{z as f,B as y,t as b,d,f as h}from"./index-C4_7gLFp.js";import{fP as x,fQ as I,JJ as j}from"./zeni-epic-state-CFQMpWBE.js";import{n as w}from"./mui-D9TDAUAO.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="a1d1bf11-ab86-49f3-8712-e8e0dc08e661",e._sentryDebugIdIdentifier="sentry-dbid-a1d1bf11-ab86-49f3-8712-e8e0dc08e661")}catch{}})();function U(){const e=u(),t=m(),i=p(),a=n.useRef(!1),l=f.isSignedIn(),r=t.state?.message==="logout",o=r||l;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),j(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(c){console.error("Error during sign out:",c)}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 d}from"./liveblocks-D0ylGz77.js";import{a as g}from"./sentry-C5UCCkb_.js";import{j as v,h as _,u as z,g as b,l as Z,k as q}from"./core-DSsu1iyO.js";import{z as R,C as M,A as p,x as O,d as V,f as W,cI as H,s as f,q as J}from"./index-CPG6ITBm.js";import{eR as X,QA as A,Ge as E,QB as x,Qw as Y,FG as S,QC as aa,FK as I,Fd as ea,Gf as B,QD as w,gP as ta,G5 as sa,Ga as oa,FZ as na,FX as F,Gb as ia,FU as la,QE as ra,QF as ca,QG as ka,QH as ua,QI as m,ec as da,QJ as pa,QK as ma}from"./zeni-epic-state-CFQMpWBE.js";import{n as Ta}from"./mui-D9TDAUAO.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{M as Ga}from"./MobileAppDrawer-BLGo796K.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="8c660614-b5cd-4892-a9b0-82a80ec4c30d",e._sentryDebugIdIdentifier="sentry-dbid-8c660614-b5cd-4892-a9b0-82a80ec4c30d")}catch{}})();const ha=Ta.div`
1
+ import{j as d}from"./liveblocks-D0ylGz77.js";import{a as g}from"./sentry-C5UCCkb_.js";import{j as v,h as _,u as z,g as b,l as Z,k as q}from"./core-DSsu1iyO.js";import{z as R,C as M,A as p,x as O,d as V,f as W,cI as H,s as f,q as J}from"./index-C4_7gLFp.js";import{eR as X,QA as A,Ge as E,QB as x,Qw as Y,FG as S,QC as aa,FK as I,Fd as ea,Gf as B,QD as w,gP as ta,G5 as sa,Ga as oa,FZ as na,FX as F,Gb as ia,FU as la,QE as ra,QF as ca,QG as ka,QH as ua,QI as m,ec as da,QJ as pa,QK as ma}from"./zeni-epic-state-CFQMpWBE.js";import{n as Ta}from"./mui-D9TDAUAO.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import{M as Ga}from"./MobileAppDrawer-Bai_Lh0v.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="8c660614-b5cd-4892-a9b0-82a80ec4c30d",e._sentryDebugIdIdentifier="sentry-dbid-8c660614-b5cd-4892-a9b0-82a80ec4c30d")}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-D0ylGz77.js";import se from"./NotFoundScreen-B1k_jOem.js";import{a as c}from"./sentry-C5UCCkb_.js";import{j as O,h as Q,g,u as ne,l as oe,N as ie,k as re,n as ce,o as f}from"./core-DSsu1iyO.js";import{Gi as Z,Gl as le,Go as de,eR as H,Qw as M,FC as J,Fk as pe,G2 as ue,FX as ke,Qx as K,Qy as z,Fg as me,Fd as fe,qa as ge,p_ as he,kb as Se,Fs as Ie,Qz as Te,Fx as be,Fu as Ge,Fn as Ce,FH as Ee,FG as xe}from"./zeni-epic-state-CFQMpWBE.js";import{z as E,cG as De,I as Fe,C as ye,A as b,q as W,s as w,x as je,d as N,f as we,cH as ve,j as A,aq as Re}from"./index-CPG6ITBm.js";import{n as Be}from"./mui-D9TDAUAO.js";import{u as Pe}from"./useInitialThreadRequest-C_MqgvcA.js";import{M as Ue}from"./MobileAppDrawer-BLGo796K.js";import Le from"./TaskListScreen-BMzXb3Gv.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.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]="dd4f54f4-91a5-4edc-8aab-05d3fc2d5a96",e._sentryDebugIdIdentifier="sentry-dbid-dd4f54f4-91a5-4edc-8aab-05d3fc2d5a96")}catch{}})();function $e(){const e=O(),t=Q(),s=E.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(Z())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(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,_=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=K(e,t.taskId),d=H(e),l=r.taskGroupId??u,k=l!=null?z(e.taskGroupState,l):void 0,a=E.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=M(e),{tenantEmailDomain:x}=d,G=r.recurringSourceTaskId,D=G!=null?`${A.appUrl}/${x}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:E.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==V&&(V=I,_=Object.values(I)),_),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=>z(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(xe({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ee(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(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(J(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=O(),t=Q(),s=ne(),u=Fe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>H(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:x}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[D,I]=c.useState(!1),[p,X]=c.useState(!1),[R,Y]=c.useState(!1),[B,ee]=c.useState(!1),[P,F]=c.useState(!1),T=c.useRef(!1),C=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>M(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(X(!0),t(J(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Y(!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})),F(!0))},[t,r]);c.useEffect(()=>{if(P)if(C!=="In-Progress"){if(T.current){if(C==="Error")return F(!1),void(T.current=!1);if(C==="Completed"){F(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,C,l,s,e]);const $=g(i=>K(i,r)),y=$.fetchState,q=E.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:N,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(ze,{children:[n.jsx(Ue,{isAppContentDrawerOpen:D,handleDrawerToggle:i=>{I(i)}}),n.jsx(qe,{analytics:N,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:x,isTaskGroupAssigneesEnabled:G})]})]})}const ze=Be.div`
1
+ import{j as n}from"./liveblocks-D0ylGz77.js";import se from"./NotFoundScreen-DVTblDpS.js";import{a as c}from"./sentry-C5UCCkb_.js";import{j as O,h as Q,g,u as ne,l as oe,N as ie,k as re,n as ce,o as f}from"./core-DSsu1iyO.js";import{Gi as Z,Gl as le,Go as de,eR as H,Qw as M,FC as J,Fk as pe,G2 as ue,FX as ke,Qx as K,Qy as z,Fg as me,Fd as fe,qa as ge,p_ as he,kb as Se,Fs as Ie,Qz as Te,Fx as be,Fu as Ge,Fn as Ce,FH as Ee,FG as xe}from"./zeni-epic-state-CFQMpWBE.js";import{z as E,cG as De,I as Fe,C as ye,A as b,q as W,s as w,x as je,d as N,f as we,cH as ve,j as A,aq as Re}from"./index-C4_7gLFp.js";import{n as Be}from"./mui-D9TDAUAO.js";import{u as Pe}from"./useInitialThreadRequest-qRRdn_eE.js";import{M as Ue}from"./MobileAppDrawer-Bai_Lh0v.js";import Le from"./TaskListScreen-Cln-3rWs.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.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]="dd4f54f4-91a5-4edc-8aab-05d3fc2d5a96",e._sentryDebugIdIdentifier="sentry-dbid-dd4f54f4-91a5-4edc-8aab-05d3fc2d5a96")}catch{}})();function $e(){const e=O(),t=Q(),s=E.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(Z())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(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,_=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=K(e,t.taskId),d=H(e),l=r.taskGroupId??u,k=l!=null?z(e.taskGroupState,l):void 0,a=E.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=M(e),{tenantEmailDomain:x}=d,G=r.recurringSourceTaskId,D=G!=null?`${A.appUrl}/${x}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:E.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==V&&(V=I,_=Object.values(I)),_),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=>z(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(xe({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ee(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=v(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(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(J(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function j(){const e=O(),t=Q(),s=ne(),u=Fe(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>H(i)),k=Pe(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:x}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[D,I]=c.useState(!1),[p,X]=c.useState(!1),[R,Y]=c.useState(!1),[B,ee]=c.useState(!1),[P,F]=c.useState(!1),T=c.useRef(!1),C=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>M(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(X(!0),t(J(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Y(!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})),F(!0))},[t,r]);c.useEffect(()=>{if(P)if(C!=="In-Progress"){if(T.current){if(C==="Error")return F(!1),void(T.current=!1);if(C==="Completed"){F(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=v(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,C,l,s,e]);const $=g(i=>K(i,r)),y=$.fetchState,q=E.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:N,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(ze,{children:[n.jsx(Ue,{isAppContentDrawerOpen:D,handleDrawerToggle:i=>{I(i)}}),n.jsx(qe,{analytics:N,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:x,isTaskGroupAssigneesEnabled:G})]})]})}const ze=Be.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-D0ylGz77.js";import i from"./NotFoundScreen-B1k_jOem.js";import{T as r}from"./TransactionDetailScreen-AbBGaDF8.js";import"./sentry-C5UCCkb_.js";import{n as a,o}from"./core-DSsu1iyO.js";import"./zeni-epic-state-CFQMpWBE.js";import"./recharts-C7IODwRw.js";import"./index-CPG6ITBm.js";import"./mui-D9TDAUAO.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import"./decodeURIComponentSafe-CRFR6Y3w.js";import"./routePaths-1uJ5ric0.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-D0ylGz77.js";import i from"./NotFoundScreen-DVTblDpS.js";import{T as r}from"./TransactionDetailScreen-DMDwXid_.js";import"./sentry-C5UCCkb_.js";import{n as a,o}from"./core-DSsu1iyO.js";import"./zeni-epic-state-CFQMpWBE.js";import"./recharts-C7IODwRw.js";import"./index-C4_7gLFp.js";import"./mui-D9TDAUAO.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import"./decodeURIComponentSafe-CRFR6Y3w.js";import"./routePaths-B7W4yhsS.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 k}from"./liveblocks-D0ylGz77.js";import{a as d}from"./sentry-C5UCCkb_.js";import{h as G,g as S,u as re,j as le,l as de,N as Ge,k as je}from"./core-DSsu1iyO.js";import{bn as $e,eR as W,cQ as ue,bv as me,pR as Y,Kz as w,LA as pe,LB as Q,KZ as he,jO as fe,LC as ge,L2 as J,L3 as Z,kD as Se,Hz as X,Kt as x,jI as Te,jG as ye,jS as Me,LD as He,LE as qe,tR as N,jN as ve,GR as Ee,cV as Ke,cW as We,LF as Ye,Ks as Qe,LG as Je,tV as Ze,LH as Xe,LI as ea,LJ as aa,LK as ta,LL as na,jR as oa,LM as sa,LN as ia,Ku as ca,LO as ra,LP as la,LQ as da,GL as ua,Gz as ma,H1 as pa,jT as ha,HA as ie,GI as fa}from"./zeni-epic-state-CFQMpWBE.js";import{z as De,C as ee,A as L,aK as Ce,m as ga,K as Sa,aL as Ta,E as ya,q,c as va,aM as Ea,s as K,d as be,aN as Da,aq as Ca,Y as H}from"./index-CPG6ITBm.js";import{n as ba,S as Ia,D as ka}from"./mui-D9TDAUAO.js";import{u as La}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as Aa}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{d as Ie}from"./decodeURIComponentSafe-CRFR6Y3w.js";import{h as ke,g as Ua,e as xa,c as _a}from"./routePaths-1uJ5ric0.js";import{t as Va}from"./utils-Cd1icpH6.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]="ec882ca2-dc4b-4120-8d0e-9312e6335443",a._sentryDebugIdIdentifier="sentry-dbid-ec882ca2-dc4b-4120-8d0e-9312e6335443")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(L.isChainOfThoughtEnabled);return d.useMemo(()=>$e(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 Ja(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>W(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:T}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(L.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,A=ae(),y=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>w(u,y)),C=S(u=>{const z=w(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return z==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[z]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),v=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),U=S(u=>Q(u)),_=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[F,V]=d.useState(!1),[R,P]=d.useState(!1),[E,c]=d.useState(!1);d.useEffect(()=>{V(!1),P(!1),c(!1)},[a,e]);const M=d.useCallback(()=>{V(!1),P(!1)},[]),[D,I]=d.useState(!1),B=_?.selectedPeriod?.timePeriod;return d.useEffect(()=>{E||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),c(!0)),p!=null&&(!i||l&&g===!1)&&(F?R||v==null||(P(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:B??v}))):(s(J()),s(Z()),V(!0),s(Se(p))))},[s,E,m?.fetchState,m?.transaction,p,i,l,g,F,R,v,B]),d.useEffect(()=>{U.newVendorState?.vendorDetailLocalData?.vendorName!=null?I(!0):I(!1)},[U.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:A,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:v,vendorViewDetails:U,uiState:_,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:M,isCreateVendorDrawerOpen:D,setIsCreateVendorDrawerOpen:I}}const Pa={overlayWidth:new ya(100,100,58)},Ba=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=ga(),i=Sa(),l=G(),g=S(h=>Q(h)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return k.jsx(ka,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:k.jsx(wa,{onClick:h=>h.stopPropagation(),children:k.jsx(Ta,{...b})})})},wa=ba(Ia)`
1
+ import{j as k}from"./liveblocks-D0ylGz77.js";import{a as d}from"./sentry-C5UCCkb_.js";import{h as G,g as S,u as re,j as le,l as de,N as Ge,k as je}from"./core-DSsu1iyO.js";import{bn as $e,eR as W,cQ as ue,bv as me,pR as Y,Kz as w,LA as pe,LB as Q,KZ as he,jO as fe,LC as ge,L2 as J,L3 as Z,kD as Se,Hz as X,Kt as x,jI as Te,jG as ye,jS as Me,LD as He,LE as qe,tR as N,jN as ve,GR as Ee,cV as Ke,cW as We,LF as Ye,Ks as Qe,LG as Je,tV as Ze,LH as Xe,LI as ea,LJ as aa,LK as ta,LL as na,jR as oa,LM as sa,LN as ia,Ku as ca,LO as ra,LP as la,LQ as da,GL as ua,Gz as ma,H1 as pa,jT as ha,HA as ie,GI as fa}from"./zeni-epic-state-CFQMpWBE.js";import{z as De,C as ee,A as L,aK as Ce,m as ga,K as Sa,aL as Ta,E as ya,q,c as va,aM as Ea,s as K,d as be,aN as Da,aq as Ca,Y as H}from"./index-C4_7gLFp.js";import{n as ba,S as Ia,D as ka}from"./mui-D9TDAUAO.js";import{u as La}from"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import{c as Aa}from"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import{d as Ie}from"./decodeURIComponentSafe-CRFR6Y3w.js";import{h as ke,g as Ua,e as xa,c as _a}from"./routePaths-B7W4yhsS.js";import{t as Va}from"./utils-Cd1icpH6.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]="ec882ca2-dc4b-4120-8d0e-9312e6335443",a._sentryDebugIdIdentifier="sentry-dbid-ec882ca2-dc4b-4120-8d0e-9312e6335443")}catch{}})();const ae=()=>{const a=De.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(L.isChainOfThoughtEnabled);return d.useMemo(()=>$e(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 Ja(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>W(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:T}=t(L.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(L.isExpenseAutomationEnabled),{configValue:h}=n(Ce.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,A=ae(),y=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>w(u,y)),C=S(u=>{const z=w(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return z==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[z]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Le(m?.transaction):void 0,[m?.fetchState,m?.transaction]),v=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),U=S(u=>Q(u)),_=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[F,V]=d.useState(!1),[R,P]=d.useState(!1),[E,c]=d.useState(!1);d.useEffect(()=>{V(!1),P(!1),c(!1)},[a,e]);const M=d.useCallback(()=>{V(!1),P(!1)},[]),[D,I]=d.useState(!1),B=_?.selectedPeriod?.timePeriod;return d.useEffect(()=>{E||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),c(!0)),p!=null&&(!i||l&&g===!1)&&(F?R||v==null||(P(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:B??v}))):(s(J()),s(Z()),V(!0),s(Se(p))))},[s,E,m?.fetchState,m?.transaction,p,i,l,g,F,R,v,B]),d.useEffect(()=>{U.newVendorState?.vendorDetailLocalData?.vendorName!=null?I(!0):I(!1)},[U.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(x("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:A,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:C,tranEntity:p,defaultTrendTransactionTimePeriod:v,vendorViewDetails:U,uiState:_,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:M,isCreateVendorDrawerOpen:D,setIsCreateVendorDrawerOpen:I}}const Pa={overlayWidth:new ya(100,100,58)},Ba=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=ga(),i=Sa(),l=G(),g=S(h=>Q(h)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return k.jsx(ka,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:k.jsx(wa,{onClick:h=>h.stopPropagation(),children:k.jsx(Ta,{...b})})})},wa=ba(Ia)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-D0ylGz77.js";import{j as N,u as V,h as J,l as H,g as C,N as F,k as U,n as he,o as x}from"./core-DSsu1iyO.js";import{eR as q,j0 as D,OY as Z,Hq as me,bq as se,OZ as ke,jD as K,K$ as Q,O_ as ie,O$ as Ye,bE as Y,Hm as pe,P0 as ve,P1 as re,P2 as Pe,Hn as fe,P3 as be,P4 as de,P5 as Ee,P6 as De,P7 as xe,P8 as je,P9 as le,ID as Me,bn as Ce}from"./zeni-epic-state-CFQMpWBE.js";import{D as ce,d as L,c6 as W,s as w,q as X,C as Te,A as ne,V as Le,z as Oe}from"./index-CPG6ITBm.js";import"./mui-D9TDAUAO.js";import{a as I}from"./sentry-C5UCCkb_.js";import{w as ee}from"./withTransactionSidePanel-xau0uwsY.js";import{p as te,c as ae}from"./routePaths-1uJ5ric0.js";import{u as Be}from"./utils-Cd1icpH6.js";import{d as P}from"./decodeURIComponentSafe-CRFR6Y3w.js";import{Z as ze}from"./ZeniAccountStatementScreen-DLVOSwmC.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import"./TransactionDetailScreen-AbBGaDF8.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]="73fcc389-3d15-4768-a431-f308468872e4",a._sentryDebugIdIdentifier="sentry-dbid-73fcc389-3d15-4768-a431-f308468872e4")}catch{}})();const Fe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Be(a),Ge=U(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:Q(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=ce.getLocalizedStrings(),d=_(e.selectedAccount.tranListType),l=_e(t,n,c,d,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ie({uiState:{dateRange:l},type:_(e.selectedAccount.tranListType)})),a(me(d,D(l),!1,d==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(D(l))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ie({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(W),$=ee(function({...a}){const e=N(),t=V(),n=J(),c=t.pathname.split("/").find(m=>Fe.includes(m)),o=c??"uncategorized-expense",{tenantEmailDomain:d}=H(),l=ce.getLocalizedStrings(),{accountType:f,title:A,subTitle:g}=Re(o),S="month",h=C(m=>q(m)),T=h.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:k}=$e(o,T,h.bookCloseDate),[b,O]=I.useState(!1),[v,B]=I.useState(void 0),u=I.useMemo(()=>{const m=D(k);return{tranListType:o,accountType:Z(f),title:A,subTitle:g,timeframe:S,period:m}},[o,S,f,y]);I.useEffect(()=>{if(!b&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const m=_(u.tranListType);n(me(m,u.period,!0,m==="missingReceipts"?l.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[b,u,n]);let j=u;return u!=null&&v!=null&&(j={...u,period:v}),c==null||j==null?s.jsx(F,{to:"../"}):s.jsx(Ge,{firstMonthOfFY:T,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:j,referrerType:o,bookCloseDate:h.bookCloseDate,onSelectedTimePeriodChange:m=>B(m),...a})}),Re=a=>{let e="",t="";const n=ce.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=se();let c=se().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:te(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},_e=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},we=U(function(a,e){const t=ve(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:Q(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(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}}))}}})(W),Ve=ee(function({referrerType:a,...e}){const t=N(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,classIdEncoded:f,timeframe:A,startDate:g,endDate:S,titleEncoded:h}=H(),T=P(d??""),y=P(l??""),k=P(f??""),b=P(h??""),O=C(r=>Ye(r.transactionListState,y,T,k)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(r=>q(r)),G=m.company?.companyInfo.firstMonthOfFY??1;let i;const p=qe(T,y,k,A,g,S,b);if(p){const r={startDate:Y(g,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},R=Ne(O?.dateRange,r);i={accountId:y,accountType:Z(T),classId:k,title:b,timeframe:A,period:R}}I.useEffect(()=>{v||i==null||(B(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(pe(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let E=i;i!=null&&u!=null&&(E={...i,period:u});const z=[d,l,f,A,g,S,h].filter(r=>r!=null);return p&&E!=null?s.jsx(we,{firstMonthOfFY:G,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:E,referrerType:a,onSelectedTimePeriodChange:r=>j(r),...e}):s.jsx(F,{to:ye(z.length)})}),ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},qe=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&d!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Je=U(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:Q(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ae();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(fe(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(W),He=ee(function({referrerType:a,...e}){const t=N(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,projectIdEncoded:f,timeframe:A,startDate:g,endDate:S,titleEncoded:h}=H(),T=P(d??""),y=P(l??""),k=P(f??""),b=P(h??""),O=C(r=>Pe(r.transactionListState,y,T,k)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(r=>q(r)),G=m.company?.companyInfo.firstMonthOfFY??1;let i;const p=Ue(T,y,k,A,g,S,b);if(p){const r={startDate:Y(g,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},R=Ze(O?.dateRange,r);i={accountId:y,accountType:Z(T),projectId:k,title:b,timeframe:A,period:R}}I.useEffect(()=>{v||i==null||(B(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(fe(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let E=i;i!=null&&u!=null&&(E={...i,period:u});const z=[d,l,f,A,g,S,h].filter(r=>r!=null);return p&&E!=null?s.jsx(Je,{firstMonthOfFY:G,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:E,referrerType:a,onSelectedTimePeriodChange:r=>j(r),...e}):s.jsx(F,{to:Ae(z.length)})}),Ae=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ue=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&d!=null,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Ke=U(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&je(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:Q(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ge();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(le({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(De(e.selectedAccount.accountId,e.selectedAccount.accountType,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(le({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Xe(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(W),ue=ee(function({referrerType:a,...e}){const t=N(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,timeframe:f,startDate:A,endDate:g,titleEncoded:S,excludeSubAccounts:h}=H(),T=P(d??""),y=P(l??""),k=P(S??""),b=!(h!=null&&h==="exclude_subaccounts"),O=C(M=>Ee(M.transactionListState,y,T)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(M=>q(M)),G=m.company?.featuresActivationInfo.connectedAccountProvider==="unit",i=m.company?.companyInfo.firstMonthOfFY??1;let p;const E=Qe(T,y,f,A,g,k);if(E){const M={startDate:Y(A,"YYYY-MM-DD"),endDate:Y(g,"YYYY-MM-DD")},Ie=We(O?.dateRange,M);p={accountId:y,accountType:Z(T),title:k,timeframe:f,period:Ie}}let z=p;p!=null&&u!=null&&(z={...p,period:u});const{useFeatureGate:r}=Te(),{isFeatureEnabled:R}=r(ne.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Le();I.useEffect(()=>{!v&&p!=null&&oe&&(B(!0),L.trackTransactionList(p.accountId,void 0,a,p.title),c(De(p.accountId,p.accountType,p.period,void 0,!1,b)))},[v,p,c,oe]);const Se=[d,l,f,A,g,S].filter(M=>M!=null);return E&&z!=null?s.jsx(Ke,{firstMonthOfFY:i,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:G,isTransactionCommentingEnabled:R,selectedAccount:z,referrerType:a,onSelectedTimePeriodChange:M=>j(M),...e}):s.jsx(F,{to:ge(Se.length)})}),ge=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Xe=a=>`/${a}/transactions/${Me}/statements`;function ht(){const a=V().state?.referrer,e=Oe.getSignedInUser(),t=Ce(e),{useFeatureGate:n}=Te(),{isFeatureEnabled:c}=n(ne.isExpenseAutomationEnabled),o=C(f=>f.expenseAutomationViewState.selectedPeriodByTenantId)[C(f=>q(f)).tenantId],{isFeatureEnabled:d}=n(ne.isExpenseAutomationEnabledV2),l=d||c&&t;return s.jsxs(he,{children:[s.jsx(x,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ue,{referrerType:a})}),s.jsx(x,{path:"/zeni-clearing-account/statements",element:s.jsx(ze,{})}),s.jsx(x,{path:"/*",element:s.jsx(ue,{referrerType:a})}),s.jsx(x,{path:"/uncategorized-income/*",element:s.jsx($,{})}),s.jsx(x,{path:"/uncategorized-expense/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/miscategorized-income/*",element:s.jsx($,{})}),s.jsx(x,{path:"/miscategorized-expense/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/missing-receipts/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ve,{referrerType:a})}),s.jsx(x,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})})]})}export{ht as default};
1
+ import{j as s}from"./liveblocks-D0ylGz77.js";import{j as N,u as V,h as J,l as H,g as C,N as F,k as U,n as he,o as x}from"./core-DSsu1iyO.js";import{eR as q,j0 as D,OY as Z,Hq as me,bq as se,OZ as ke,jD as K,K$ as Q,O_ as ie,O$ as Ye,bE as Y,Hm as pe,P0 as ve,P1 as re,P2 as Pe,Hn as fe,P3 as be,P4 as de,P5 as Ee,P6 as De,P7 as xe,P8 as je,P9 as le,ID as Me,bn as Ce}from"./zeni-epic-state-CFQMpWBE.js";import{D as ce,d as L,c6 as W,s as w,q as X,C as Te,A as ne,V as Le,z as Oe}from"./index-C4_7gLFp.js";import"./mui-D9TDAUAO.js";import{a as I}from"./sentry-C5UCCkb_.js";import{w as ee}from"./withTransactionSidePanel-CH7Cbdk4.js";import{p as te,c as ae}from"./routePaths-B7W4yhsS.js";import{u as Be}from"./utils-Cd1icpH6.js";import{d as P}from"./decodeURIComponentSafe-CRFR6Y3w.js";import{Z as ze}from"./ZeniAccountStatementScreen-DPM5oRGk.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import"./TransactionDetailScreen-DMDwXid_.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]="73fcc389-3d15-4768-a431-f308468872e4",a._sentryDebugIdIdentifier="sentry-dbid-73fcc389-3d15-4768-a431-f308468872e4")}catch{}})();const Fe=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Be(a),Ge=U(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:Q(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=ce.getLocalizedStrings(),d=_(e.selectedAccount.tranListType),l=_e(t,n,c,d,e.bookCloseDate);L.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ie({uiState:{dateRange:l},type:_(e.selectedAccount.tranListType)})),a(me(d,D(l),!1,d==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(D(l))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ie({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(W),$=ee(function({...a}){const e=N(),t=V(),n=J(),c=t.pathname.split("/").find(m=>Fe.includes(m)),o=c??"uncategorized-expense",{tenantEmailDomain:d}=H(),l=ce.getLocalizedStrings(),{accountType:f,title:A,subTitle:g}=Re(o),S="month",h=C(m=>q(m)),T=h.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:k}=$e(o,T,h.bookCloseDate),[b,O]=I.useState(!1),[v,B]=I.useState(void 0),u=I.useMemo(()=>{const m=D(k);return{tranListType:o,accountType:Z(f),title:A,subTitle:g,timeframe:S,period:m}},[o,S,f,y]);I.useEffect(()=>{if(!b&&u!=null){O(!0),L.trackTransactionList(void 0,void 0,void 0,u.title);const m=_(u.tranListType);n(me(m,u.period,!0,m==="missingReceipts"?l.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[b,u,n]);let j=u;return u!=null&&v!=null&&(j={...u,period:v}),c==null||j==null?s.jsx(F,{to:"../"}):s.jsx(Ge,{firstMonthOfFY:T,tenantEmailDomain:d,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:j,referrerType:o,bookCloseDate:h.bookCloseDate,onSelectedTimePeriodChange:m=>B(m),...a})}),Re=a=>{let e="",t="";const n=ce.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=se();let c=se().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:te(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},_e=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},we=U(function(a,e){const t=ve(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:Q(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ye();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(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}}))}}})(W),Ve=ee(function({referrerType:a,...e}){const t=N(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,classIdEncoded:f,timeframe:A,startDate:g,endDate:S,titleEncoded:h}=H(),T=P(d??""),y=P(l??""),k=P(f??""),b=P(h??""),O=C(r=>Ye(r.transactionListState,y,T,k)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(r=>q(r)),G=m.company?.companyInfo.firstMonthOfFY??1;let i;const p=qe(T,y,k,A,g,S,b);if(p){const r={startDate:Y(g,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},R=Ne(O?.dateRange,r);i={accountId:y,accountType:Z(T),classId:k,title:b,timeframe:A,period:R}}I.useEffect(()=>{v||i==null||(B(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(pe(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let E=i;i!=null&&u!=null&&(E={...i,period:u});const z=[d,l,f,A,g,S,h].filter(r=>r!=null);return p&&E!=null?s.jsx(we,{firstMonthOfFY:G,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:E,referrerType:a,onSelectedTimePeriodChange:r=>j(r),...e}):s.jsx(F,{to:ye(z.length)})}),ye=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},qe=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&d!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Je=U(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:Q(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ae();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(fe(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(W),He=ee(function({referrerType:a,...e}){const t=N(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,projectIdEncoded:f,timeframe:A,startDate:g,endDate:S,titleEncoded:h}=H(),T=P(d??""),y=P(l??""),k=P(f??""),b=P(h??""),O=C(r=>Pe(r.transactionListState,y,T,k)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(r=>q(r)),G=m.company?.companyInfo.firstMonthOfFY??1;let i;const p=Ue(T,y,k,A,g,S,b);if(p){const r={startDate:Y(g,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},R=Ze(O?.dateRange,r);i={accountId:y,accountType:Z(T),projectId:k,title:b,timeframe:A,period:R}}I.useEffect(()=>{v||i==null||(B(!0),L.trackTransactionList(i.accountId,void 0,a,i.title),c(fe(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let E=i;i!=null&&u!=null&&(E={...i,period:u});const z=[d,l,f,A,g,S,h].filter(r=>r!=null);return p&&E!=null?s.jsx(Je,{firstMonthOfFY:G,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:E,referrerType:a,onSelectedTimePeriodChange:r=>j(r),...e}):s.jsx(F,{to:Ae(z.length)})}),Ae=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ue=(a,e,t,n,c,o,d)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&d!=null,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Ke=U(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&je(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:Q(e.selectedAccount.period),dataAvailableForPeriod:te(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=X(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??ge();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),L.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(le({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(De(e.selectedAccount.accountId,e.selectedAccount.accountType,D(o))),e.onSelectedTimePeriodChange(D(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ae(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(le({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Xe(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(W),ue=ee(function({referrerType:a,...e}){const t=N(),n=V(),c=J(),{tenantEmailDomain:o,accountTypeEncoded:d,accountIdEncoded:l,timeframe:f,startDate:A,endDate:g,titleEncoded:S,excludeSubAccounts:h}=H(),T=P(d??""),y=P(l??""),k=P(S??""),b=!(h!=null&&h==="exclude_subaccounts"),O=C(M=>Ee(M.transactionListState,y,T)),[v,B]=I.useState(!1),[u,j]=I.useState(void 0),m=C(M=>q(M)),G=m.company?.featuresActivationInfo.connectedAccountProvider==="unit",i=m.company?.companyInfo.firstMonthOfFY??1;let p;const E=Qe(T,y,f,A,g,k);if(E){const M={startDate:Y(A,"YYYY-MM-DD"),endDate:Y(g,"YYYY-MM-DD")},Ie=We(O?.dateRange,M);p={accountId:y,accountType:Z(T),title:k,timeframe:f,period:Ie}}let z=p;p!=null&&u!=null&&(z={...p,period:u});const{useFeatureGate:r}=Te(),{isFeatureEnabled:R}=r(ne.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Le();I.useEffect(()=>{!v&&p!=null&&oe&&(B(!0),L.trackTransactionList(p.accountId,void 0,a,p.title),c(De(p.accountId,p.accountType,p.period,void 0,!1,b)))},[v,p,c,oe]);const Se=[d,l,f,A,g,S].filter(M=>M!=null);return E&&z!=null?s.jsx(Ke,{firstMonthOfFY:i,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:G,isTransactionCommentingEnabled:R,selectedAccount:z,referrerType:a,onSelectedTimePeriodChange:M=>j(M),...e}):s.jsx(F,{to:ge(Se.length)})}),ge=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?D(a):D(e),Xe=a=>`/${a}/transactions/${Me}/statements`;function ht(){const a=V().state?.referrer,e=Oe.getSignedInUser(),t=Ce(e),{useFeatureGate:n}=Te(),{isFeatureEnabled:c}=n(ne.isExpenseAutomationEnabled),o=C(f=>f.expenseAutomationViewState.selectedPeriodByTenantId)[C(f=>q(f)).tenantId],{isFeatureEnabled:d}=n(ne.isExpenseAutomationEnabledV2),l=d||c&&t;return s.jsxs(he,{children:[s.jsx(x,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(ue,{referrerType:a})}),s.jsx(x,{path:"/zeni-clearing-account/statements",element:s.jsx(ze,{})}),s.jsx(x,{path:"/*",element:s.jsx(ue,{referrerType:a})}),s.jsx(x,{path:"/uncategorized-income/*",element:s.jsx($,{})}),s.jsx(x,{path:"/uncategorized-expense/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/miscategorized-income/*",element:s.jsx($,{})}),s.jsx(x,{path:"/miscategorized-expense/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/missing-receipts/*",element:l?s.jsx(F,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx($,{})}),s.jsx(x,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ve,{referrerType:a})}),s.jsx(x,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(He,{referrerType:a})})]})}export{ht as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-D0ylGz77.js";import{j as U,u as B,h as P,l as N,g as f,N as L,k as O,n as Te,o as k}from"./core-DSsu1iyO.js";import{cm as M,eR as D,NJ as R,DP as ae,ff as H,Dx as ne,NL as Ie,DS as we,NH as Ce,NI as se,N_ as ke,BZ as je,sK as be,NN as Ae,E1 as Ee,NK as re,cP as K,wU as oe,eV as ve,eX as De,OV as Fe,OW as Le,Dy as Ue,OX as Be,Dz as Pe,DI as Re,bv as Ve,bF as Ne,cx as Oe,bG as Me,cl as _e,fe as ze,bs as $e,Jn as Ge,ck as qe}from"./zeni-epic-state-CFQMpWBE.js";import{c as _,an as He,z as A,x as z,d as j,b$ as Ke,c0 as We,c1 as q,K as W,m as Ze,V as Je,C as ie,A as v,E as Xe,B as Qe,c2 as Ye,aq as Z,s as et,c3 as tt,q as J,c4 as at,T as Q,c5 as nt,a6 as st}from"./index-CPG6ITBm.js";import{D as rt,n as V,S as ot}from"./mui-D9TDAUAO.js";import it from"./NotFoundScreen-B1k_jOem.js";import{S as Y}from"./SetupPagesScreen-1j44PFay.js";import{a as d}from"./sentry-C5UCCkb_.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as lt}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{u as ut}from"./useInitialThreadRequest-C_MqgvcA.js";import{M as ce}from"./MobileAppDrawer-BLGo796K.js";import{F as dt}from"./FeaturePreviewScreen-BWUt3LEA.js";import{a as ee}from"./analyticsHelper-COFNU8CP.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./routePaths-1uJ5ric0.js";import"./BusinessVerificationPageScreen-BFP865c-.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]="1233d453-bbdf-48ae-83d0-7e656f858893",t._sentryDebugIdIdentifier="sentry-dbid-1233d453-bbdf-48ae-83d0-7e656f858893")}catch{}})();const pt=O(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(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}})(Ke);function mt(){const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=N(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=M(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,w]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(C=>R(C,y)),I=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||I!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,I,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(w(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||I!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=O(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(We),yt=({isFirstTransfer:t})=>{const a=U(),{tenantEmailDomain:n}=N(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,w]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),I=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(w(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:I,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=V.div`
1
+ import{j as e}from"./liveblocks-D0ylGz77.js";import{j as U,u as B,h as P,l as N,g as f,N as L,k as O,n as Te,o as k}from"./core-DSsu1iyO.js";import{cm as M,eR as D,NJ as R,DP as ae,ff as H,Dx as ne,NL as Ie,DS as we,NH as Ce,NI as se,N_ as ke,BZ as je,sK as be,NN as Ae,E1 as Ee,NK as re,cP as K,wU as oe,eV as ve,eX as De,OV as Fe,OW as Le,Dy as Ue,OX as Be,Dz as Pe,DI as Re,bv as Ve,bF as Ne,cx as Oe,bG as Me,cl as _e,fe as ze,bs as $e,Jn as Ge,ck as qe}from"./zeni-epic-state-CFQMpWBE.js";import{c as _,an as He,z as A,x as z,d as j,b$ as Ke,c0 as We,c1 as q,K as W,m as Ze,V as Je,C as ie,A as v,E as Xe,B as Qe,c2 as Ye,aq as Z,s as et,c3 as tt,q as J,c4 as at,T as Q,c5 as nt,a6 as st}from"./index-C4_7gLFp.js";import{D as rt,n as V,S as ot}from"./mui-D9TDAUAO.js";import it from"./NotFoundScreen-DVTblDpS.js";import{S as Y}from"./SetupPagesScreen-D2dbZmg_.js";import{a as d}from"./sentry-C5UCCkb_.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import{c as lt}from"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import{u as ut}from"./useInitialThreadRequest-qRRdn_eE.js";import{M as ce}from"./MobileAppDrawer-Bai_Lh0v.js";import{F as dt}from"./FeaturePreviewScreen-IR7Qxf41.js";import{a as ee}from"./analyticsHelper-RRbpObXJ.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./routePaths-B7W4yhsS.js";import"./BusinessVerificationPageScreen-BtdKr5lT.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]="1233d453-bbdf-48ae-83d0-7e656f858893",t._sentryDebugIdIdentifier="sentry-dbid-1233d453-bbdf-48ae-83d0-7e656f858893")}catch{}})();const pt=O(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(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}})(Ke);function mt(){const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=N(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=M(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,w]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(C=>R(C,y)),I=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||I!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,I,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(w(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||I!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=O(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(We),yt=({isFirstTransfer:t})=>{const a=U(),{tenantEmailDomain:n}=N(),o=P(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,w]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),I=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(w(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:I,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=V.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-D0ylGz77.js";import{a as g}from"./sentry-C5UCCkb_.js";import{j as J,u as Y,l as R,g as S,k as G,h as z,n as at,o as B,N as K}from"./core-DSsu1iyO.js";import{eR as V,Kp as Ee,Kq as Ue,fS as X,cs as Ie,ct as be,vt as St,Kr as nt,vx as zt,Iu as ee,jD as te,vr as Yt,vl as qt,Ks as Ne,vd as Ht,vc as Wt,v6 as Qt,vi as Zt,vy as Xt,Kt as he,Ku as Me,ve as ea,Kv as pe,f0 as ft,vN as gt,vG as vt,Kw as xt,op as Tt,vB as yt,vz as Dt,Kx as Ct,vU as Et,vR as It,vC as bt,vT as Je,GR as kt,Ky as ta,Kz as aa,cv as na,KA as sa,KB as oa,KC as me,KD as ie,KE as ke,Iv as Ge,w7 as ye,It as De,vW as wt,vu as Ke,KF as la,Iw as H,KG as $e,vo as ia,KH as ca,KI as da,KJ as ze,KK as Ye,KL as qe,KM as He,w1 as we,KN as At,vK as jt,KO as ra,KP as ua,KQ as ha,KR as pa,KS as ma,KT as Sa,KU as fa,KV as ga,sW as va,sX as xa,HA as je,KW as Ta,KX as ya,j0 as Fe,bq as Da,KY as Ca,KZ as Ea,kB as Ia,kK as ba,Hz as Le,bE as st,K_ as Ft,He as Lt,K$ as ka,L0 as wa,L1 as Aa,kM as ja,L2 as ot,L3 as lt,L4 as it,L5 as ct,L6 as Fa,kI as La,L7 as Pa,kL as _a,L8 as Va,L9 as Pt,HW as _t,j$ as Ba,La as Oa,Lb as Pe,Lc as Vt,HU as Bt,yk as Ra,Ld as Ua,Le as Na,kj as Ot,Lf as Ma,Lg as Ja,I6 as Ga,qv as Ka,Lh as Rt,Li as dt,I3 as _e,Lj as rt,Lk as $a,I8 as za,Ll as Ya,Lm as qa,Ln as Ha,Lo as Wa,Lp as Qa,qy as Za,Lq as Xa,Ix as en,Lr as tn,HN as Ve,gL as an,Ls as nn,Lt as sn,gJ as on,Lu as ln,Lv as cn,yo as dn,Lw as rn,Lx as un,Ly as hn,Lz as pn,k3 as mn,bn as Sn,eX as fn,eV as gn}from"./zeni-epic-state-CFQMpWBE.js";import{z as U,an as Be,B as Ut,x as Q,d as j,Y as Z,at as vn,s as M,D as Ce,I as ce,au as We,av as xn,aw as Tn,q as Qe,ax as yn,m as Dn,K as de,E as Ze,C as ae,A as $,ay as Cn,j as Xe,az as En,aA as Nt,V as In,aB as bn,c as kn,aC as wn,aq as Mt,aD as An,o as W,S as jn,G as Jt,H as Fn,aE as Ln,aF as Pn,f as et,aG as _n,aH as Vn,p as Bn,aI as On,aJ as Rn}from"./index-CPG6ITBm.js";import{n as N,D as Un,S as Gt}from"./mui-D9TDAUAO.js";import{t as Nn,A as Mn}from"./AddressScreen-Ctnukryb.js";import le from"./NotFoundScreen-B1k_jOem.js";import{F as Jn}from"./FeaturePreviewScreen-BWUt3LEA.js";import{c as q,v as tt,d as Gn}from"./routePaths-1uJ5ric0.js";import{p as Kt}from"./pathToGoBack-Ce7z8Bpw.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{M as ge}from"./MobileAppDrawer-BLGo796K.js";import{D as Kn}from"./DrawerScreen-DTfCd2en.js";import{g as $n,m as zn}from"./accountMappingHelper-BEJScFAE.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="fddde742-60d2-4dfa-9d39-7333664fb925",e._sentryDebugIdIdentifier="sentry-dbid-fddde742-60d2-4dfa-9d39-7333664fb925")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=R(),{scheduleType:o}=R();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=U.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=N.div`
1
+ import{j as l}from"./liveblocks-D0ylGz77.js";import{a as g}from"./sentry-C5UCCkb_.js";import{j as J,u as Y,l as R,g as S,k as G,h as z,n as at,o as B,N as K}from"./core-DSsu1iyO.js";import{eR as V,Kp as Ee,Kq as Ue,fS as X,cs as Ie,ct as be,vt as St,Kr as nt,vx as zt,Iu as ee,jD as te,vr as Yt,vl as qt,Ks as Ne,vd as Ht,vc as Wt,v6 as Qt,vi as Zt,vy as Xt,Kt as he,Ku as Me,ve as ea,Kv as pe,f0 as ft,vN as gt,vG as vt,Kw as xt,op as Tt,vB as yt,vz as Dt,Kx as Ct,vU as Et,vR as It,vC as bt,vT as Je,GR as kt,Ky as ta,Kz as aa,cv as na,KA as sa,KB as oa,KC as me,KD as ie,KE as ke,Iv as Ge,w7 as ye,It as De,vW as wt,vu as Ke,KF as la,Iw as H,KG as $e,vo as ia,KH as ca,KI as da,KJ as ze,KK as Ye,KL as qe,KM as He,w1 as we,KN as At,vK as jt,KO as ra,KP as ua,KQ as ha,KR as pa,KS as ma,KT as Sa,KU as fa,KV as ga,sW as va,sX as xa,HA as je,KW as Ta,KX as ya,j0 as Fe,bq as Da,KY as Ca,KZ as Ea,kB as Ia,kK as ba,Hz as Le,bE as st,K_ as Ft,He as Lt,K$ as ka,L0 as wa,L1 as Aa,kM as ja,L2 as ot,L3 as lt,L4 as it,L5 as ct,L6 as Fa,kI as La,L7 as Pa,kL as _a,L8 as Va,L9 as Pt,HW as _t,j$ as Ba,La as Oa,Lb as Pe,Lc as Vt,HU as Bt,yk as Ra,Ld as Ua,Le as Na,kj as Ot,Lf as Ma,Lg as Ja,I6 as Ga,qv as Ka,Lh as Rt,Li as dt,I3 as _e,Lj as rt,Lk as $a,I8 as za,Ll as Ya,Lm as qa,Ln as Ha,Lo as Wa,Lp as Qa,qy as Za,Lq as Xa,Ix as en,Lr as tn,HN as Ve,gL as an,Ls as nn,Lt as sn,gJ as on,Lu as ln,Lv as cn,yo as dn,Lw as rn,Lx as un,Ly as hn,Lz as pn,k3 as mn,bn as Sn,eX as fn,eV as gn}from"./zeni-epic-state-CFQMpWBE.js";import{z as U,an as Be,B as Ut,x as Q,d as j,Y as Z,at as vn,s as M,D as Ce,I as ce,au as We,av as xn,aw as Tn,q as Qe,ax as yn,m as Dn,K as de,E as Ze,C as ae,A as $,ay as Cn,j as Xe,az as En,aA as Nt,V as In,aB as bn,c as kn,aC as wn,aq as Mt,aD as An,o as W,S as jn,G as Jt,H as Fn,aE as Ln,aF as Pn,f as et,aG as _n,aH as Vn,p as Bn,aI as On,aJ as Rn}from"./index-C4_7gLFp.js";import{n as N,D as Un,S as Gt}from"./mui-D9TDAUAO.js";import{t as Nn,A as Mn}from"./AddressScreen-BvwS_9z2.js";import le from"./NotFoundScreen-DVTblDpS.js";import{F as Jn}from"./FeaturePreviewScreen-IR7Qxf41.js";import{c as q,v as tt,d as Gn}from"./routePaths-B7W4yhsS.js";import{p as Kt}from"./pathToGoBack-Ce7z8Bpw.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import{M as ge}from"./MobileAppDrawer-Bai_Lh0v.js";import{D as Kn}from"./DrawerScreen-CG4hw7_P.js";import{g as $n,m as zn}from"./accountMappingHelper-BEJScFAE.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="fddde742-60d2-4dfa-9d39-7333664fb925",e._sentryDebugIdIdentifier="sentry-dbid-fddde742-60d2-4dfa-9d39-7333664fb925")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=R(),{scheduleType:o}=R();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>V(f)),r=Ee(o)??"accrued_expenses",h=U.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=Ie(s.controllers),i=be(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=N.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-D0ylGz77.js";import{a as f}from"./sentry-C5UCCkb_.js";import{q as u,h,g as y,N as I}from"./core-DSsu1iyO.js";import{JG as w,eS as b,zF as x}from"./zeni-epic-state-CFQMpWBE.js";import{z as l,B as S,G as j,H as D}from"./index-CPG6ITBm.js";import{n as c}from"./mui-D9TDAUAO.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="389798c6-1282-4414-a212-3e1317fdc495",e._sentryDebugIdIdentifier="sentry-dbid-389798c6-1282-4414-a212-3e1317fdc495")}catch{}})();const P=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y(m=>w(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return b(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(p(!0),a(x(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(S,{fetchState:"In-Progress"}))},E=c.div`
1
+ import{j as o}from"./liveblocks-D0ylGz77.js";import{a as f}from"./sentry-C5UCCkb_.js";import{q as u,h,g as y,N as I}from"./core-DSsu1iyO.js";import{JG as w,eS as b,zF as x}from"./zeni-epic-state-CFQMpWBE.js";import{z as l,B as S,G as j,H as D}from"./index-C4_7gLFp.js";import{n as c}from"./mui-D9TDAUAO.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.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]="389798c6-1282-4414-a212-3e1317fdc495",e._sentryDebugIdIdentifier="sentry-dbid-389798c6-1282-4414-a212-3e1317fdc495")}catch{}})();const P=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y(m=>w(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return b(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(p(!0),a(x(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(S,{fetchState:"In-Progress"}))},E=c.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-D0ylGz77.js";import{j as K,u as Y,h as z,l as G,g as w,k as q,N as ne,n as Me,o as k}from"./core-DSsu1iyO.js";import{eR as V,OA as Ce,OB as $e,cl as te,cm as Ne,fe as Ge,wS as ke,B3 as Ze,wM as Tn,OC as On,OD as Bn,wP as Fn,wW as fe,wJ as Rn,wG as Ln,Nm as le,OE as Un,En as zn,Ks as Vn,Ep as _n,kk as Oe,OF as Mn,qa as He,p_ as We,kb as Ke,ke as Be,Kt as Fe,Ku as $n,OG as Nn,kd as Gn,kA as Zn,k2 as Hn,iB as Wn,iA as Kn,OH as Yn,OI as ye,E4 as qn,OJ as Jn,OK as Qn,Nf as we,OL as Re,OM as Xn,EA as et,N_ as nt,BZ as Ye,sK as qe,ON as tt,Ex as at,OO as Je,cN as Ae,EE as Qe,ff as ot,eV as Xe,eX as De,EC as st,BT as rt,Eu as it,OP as en,OQ as nn,E6 as tn,Eg as Le,OR as ct,Ea as lt,OS as dt,NO as ut,EF as pt,bv as mt,bF as ht,cx as gt,bG as ft,bs as yt,Jn as xt}from"./zeni-epic-state-CFQMpWBE.js";import{c as ae,C as $,z as D,A as O,m as _,B as de,bP as Ct,Y as Ie,K as M,E as J,q as an,an as kt,ac as Ue,d as R,bQ as wt,aq as Se,bR as At,x as ue,bS as Dt,f as be,aK as W,bT as It,V as St,a9 as bt,bU as ze,bV as Et,s as ee,bW as vt,bX as Pt,bY as jt,bZ as Tt,a6 as Ot,o as Bt}from"./index-CPG6ITBm.js";import{n as L,D as Q,S as X}from"./mui-D9TDAUAO.js";import ce from"./NotFoundScreen-B1k_jOem.js";import{S as Ve}from"./SetupPagesScreen-1j44PFay.js";import{F as on}from"./FeaturePreviewScreen-BWUt3LEA.js";import{a as u}from"./sentry-C5UCCkb_.js";import{M as pe}from"./MobileAppDrawer-BLGo796K.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-CluJV1hP.js";import{A as Ut}from"./AddressScreen-Ctnukryb.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-DaoVDdk6.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-IH_yzaTd.js";import{Z as zt}from"./ZeniAccountStatementScreen-DLVOSwmC.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./analyticsHelper-COFNU8CP.js";import"./routePaths-1uJ5ric0.js";import"./BusinessVerificationPageScreen-BFP865c-.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]="55d888a4-4dcb-41ee-a7f0-a684ca129959",e._sentryDebugIdIdentifier="sentry-dbid-55d888a4-4dcb-41ee-a7f0-a684ca129959")}catch{}})();const Vt=L.div`
1
+ import{j as n}from"./liveblocks-D0ylGz77.js";import{j as K,u as Y,h as z,l as G,g as w,k as q,N as ne,n as Me,o as k}from"./core-DSsu1iyO.js";import{eR as V,OA as Ce,OB as $e,cl as te,cm as Ne,fe as Ge,wS as ke,B3 as Ze,wM as Tn,OC as On,OD as Bn,wP as Fn,wW as fe,wJ as Rn,wG as Ln,Nm as le,OE as Un,En as zn,Ks as Vn,Ep as _n,kk as Oe,OF as Mn,qa as He,p_ as We,kb as Ke,ke as Be,Kt as Fe,Ku as $n,OG as Nn,kd as Gn,kA as Zn,k2 as Hn,iB as Wn,iA as Kn,OH as Yn,OI as ye,E4 as qn,OJ as Jn,OK as Qn,Nf as we,OL as Re,OM as Xn,EA as et,N_ as nt,BZ as Ye,sK as qe,ON as tt,Ex as at,OO as Je,cN as Ae,EE as Qe,ff as ot,eV as Xe,eX as De,EC as st,BT as rt,Eu as it,OP as en,OQ as nn,E6 as tn,Eg as Le,OR as ct,Ea as lt,OS as dt,NO as ut,EF as pt,bv as mt,bF as ht,cx as gt,bG as ft,bs as yt,Jn as xt}from"./zeni-epic-state-CFQMpWBE.js";import{c as ae,C as $,z as D,A as O,m as _,B as de,bP as Ct,Y as Ie,K as M,E as J,q as an,an as kt,ac as Ue,d as R,bQ as wt,aq as Se,bR as At,x as ue,bS as Dt,f as be,aK as W,bT as It,V as St,a9 as bt,bU as ze,bV as Et,s as ee,bW as vt,bX as Pt,bY as jt,bZ as Tt,a6 as Ot,o as Bt}from"./index-C4_7gLFp.js";import{n as L,D as Q,S as X}from"./mui-D9TDAUAO.js";import ce from"./NotFoundScreen-DVTblDpS.js";import{S as Ve}from"./SetupPagesScreen-D2dbZmg_.js";import{F as on}from"./FeaturePreviewScreen-IR7Qxf41.js";import{a as u}from"./sentry-C5UCCkb_.js";import{M as pe}from"./MobileAppDrawer-Bai_Lh0v.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-CakALOxw.js";import{A as Ut}from"./AddressScreen-BvwS_9z2.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-c_p-0pW7.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-nzUYYA5P.js";import{Z as zt}from"./ZeniAccountStatementScreen-DPM5oRGk.js";import"./recharts-C7IODwRw.js";import"./analytics-CQQ1PG0J.js";import"./plaid-mYHRXlz3.js";import"./dnd-Dok8dils.js";import"./stripe-DMRn4zHo.js";import"./lottie-Cu765PFn.js";import"./lexical-DO7p5ZXM.js";import"./pdf-BzjCkfw3.js";import"./utils-Cd1icpH6.js";import"./analyticsHelper-RRbpObXJ.js";import"./routePaths-B7W4yhsS.js";import"./BusinessVerificationPageScreen-BtdKr5lT.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]="55d888a4-4dcb-41ee-a7f0-a684ca129959",e._sentryDebugIdIdentifier="sentry-dbid-55d888a4-4dcb-41ee-a7f0-a684ca129959")}catch{}})();const Vt=L.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-D0ylGz77.js";import{a as u}from"./sentry-C5UCCkb_.js";import{j as x,h as j,u as B,l as C,g as p}from"./core-DSsu1iyO.js";import{ID as s,IC as T,OT as $,eR as v,OU as D}from"./zeni-epic-state-CFQMpWBE.js";import{K as z,aq as g,m as E,z as L,B as P,b_ as U,q as _}from"./index-CPG6ITBm.js";import{n as N}from"./mui-D9TDAUAO.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]="41a58343-c2aa-4077-95ff-0e1a089d6f7f",e._sentryDebugIdIdentifier="sentry-dbid-41a58343-c2aa-4077-95ff-0e1a089d6f7f")}catch{}})();const q=N.div`
1
+ import{j as i}from"./liveblocks-D0ylGz77.js";import{a as u}from"./sentry-C5UCCkb_.js";import{j as x,h as j,u as B,l as C,g as p}from"./core-DSsu1iyO.js";import{ID as s,IC as T,OT as $,eR as v,OU as D}from"./zeni-epic-state-CFQMpWBE.js";import{K as z,aq as g,m as E,z as L,B as P,b_ as U,q as _}from"./index-C4_7gLFp.js";import{n as N}from"./mui-D9TDAUAO.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]="41a58343-c2aa-4077-95ff-0e1a089d6f7f",e._sentryDebugIdIdentifier="sentry-dbid-41a58343-c2aa-4077-95ff-0e1a089d6f7f")}catch{}})();const q=N.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{cH as m,cI as l,Jy as _,Jz as d}from"./zeni-epic-state-CFQMpWBE.js";import{d as u}from"./index-CPG6ITBm.js";import"./sentry-C5UCCkb_.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]="8df67cad-cc49-40ab-8c78-c43fe97a8f70",e._sentryDebugIdIdentifier="sentry-dbid-8df67cad-cc49-40ab-8c78-c43fe97a8f70")}catch{}})();const h=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"}},b=(e,a,o,i,s)=>{const c=[],r=[];let t=[];s?.forEach(n=>{c.push(n.companyId),r.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?c:void 0,company_names:s!=null?r: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,b as f,g,h as t};
1
+ import{cH as m,cI as l,Jy as _,Jz as d}from"./zeni-epic-state-CFQMpWBE.js";import{d as u}from"./index-C4_7gLFp.js";import"./sentry-C5UCCkb_.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]="8df67cad-cc49-40ab-8c78-c43fe97a8f70",e._sentryDebugIdIdentifier="sentry-dbid-8df67cad-cc49-40ab-8c78-c43fe97a8f70")}catch{}})();const h=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"}},b=(e,a,o,i,s)=>{const c=[],r=[];let t=[];s?.forEach(n=>{c.push(n.companyId),r.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?c:void 0,company_names:s!=null?r: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,b as f,g,h as t};
@@ -1 +1 @@
1
- import{k as n}from"./index-CPG6ITBm.js";import"./mui-D9TDAUAO.js";import"./sentry-C5UCCkb_.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]="f17be0a9-8452-4732-8143-c042676b47a8",e._sentryDebugIdIdentifier="sentry-dbid-f17be0a9-8452-4732-8143-c042676b47a8")}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{k as n}from"./index-C4_7gLFp.js";import"./mui-D9TDAUAO.js";import"./sentry-C5UCCkb_.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]="f17be0a9-8452-4732-8143-c042676b47a8",e._sentryDebugIdIdentifier="sentry-dbid-f17be0a9-8452-4732-8143-c042676b47a8")}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};