@zeniai/web-app-ui 5.0.88-dev → 5.0.88-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-Idr8o5Q_.js → AddressRoutes-Djzm4hjd.js} +1 -1
  2. package/dist/assets/{AddressScreen-BgaNg0Qn.js → AddressScreen-h6F8nVYN.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-BY8n3owP.js → AiCfoScreen-OLwbmiYD.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-CG8clEYB.js → BillPayApprovalRoutes-DsjRockq.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CrklWR3z.js → BillPayRoutes-YTAReJ2c.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-C-td2Gz2.js → BusinessVerificationPageScreen-Cjm5MRXi.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-BIImgtAf.js → ChargeCardRoutes-DBNrni6V.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-DLguBt5O.js → CompanyPassportScreen-Wc9Neaz1.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-C5CI5_R0.js → ConnectionAuthScreen-gAh9UaQG.js} +1 -1
  10. package/dist/assets/{CustomerOnboardingAuthScreen-D5J-D_gR.js → CustomerOnboardingAuthScreen-Btu05i4h.js} +1 -1
  11. package/dist/assets/{CustomerOnboardingRoutes-ChK-o54A.js → CustomerOnboardingRoutes-CbCcHxCy.js} +1 -1
  12. package/dist/assets/{DashboardRoutes-Dk9jZRz5.js → DashboardRoutes-DFf2imko.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-EQCVNZvu.js → DefaultTenantHome-Bx6WQ-Mz.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-CNcs_kp-.js → DomesticWireDetailScreen-w4AIyMqf.js} +1 -1
  15. package/dist/assets/{DrawerScreen-4A-8jdZK.js → DrawerScreen-CtmWzT0D.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-FAkHCqKz.js → EntityDetailRoutes-BQF2uQ7X.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-Bf4kvKbd.js → ExpenseAutomationRoutes-D3kquSUU.js} +1 -1
  18. package/dist/assets/{FeaturePreviewScreen-CPoYCyoW.js → FeaturePreviewScreen-dlYgctun.js} +1 -1
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-_NVW7LI5.js → HubSpotOAuthCallbackScreen-O6i8xkbo.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-BS3qbL4y.js → MagicLinkRoutes-CS6bQmQL.js} +1 -1
  21. package/dist/assets/{MagicLinkSignInScreen-8i0SXp70.js → MagicLinkSignInScreen-aL0UHXqm.js} +1 -1
  22. package/dist/assets/{MobileAppDrawer-BhM60dvk.js → MobileAppDrawer-CXLCRreY.js} +1 -1
  23. package/dist/assets/{NotFoundScreen-DB_m9Zh0.js → NotFoundScreen-D1-E1kBF.js} +1 -1
  24. package/dist/assets/{NotificationRoutes-Yi8XGMv3.js → NotificationRoutes-DvQQ7oaR.js} +1 -1
  25. package/dist/assets/{OAuthConsentScreen-CKM2d6ge.js → OAuthConsentScreen-BX4BwxWb.js} +1 -1
  26. package/dist/assets/{PandLWithForecastRoutes-vYtv-oJN.js → PandLWithForecastRoutes-BO50q4p1.js} +1 -1
  27. package/dist/assets/{PeopleRoutes-Cx1WB4UN.js → PeopleRoutes-CAjCGUS6.js} +1 -1
  28. package/dist/assets/{PerformanceRoutes-CWOgGPU1.js → PerformanceRoutes-DuMTUSdQ.js} +1 -1
  29. package/dist/assets/{QBOConnectionScreen-geVwV75e.js → QBOConnectionScreen-CvW4YyLY.js} +1 -1
  30. package/dist/assets/{ReferralListScreen-ChBc672l.js → ReferralListScreen-B6ywI0R7.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRoutes-BDyufiCG.js → ReimbursementApprovalRoutes-BJfS22O6.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DJv_b_Bz.js → ReimbursementApprovalRuleDetailScreen-BRDzYwiP.js} +1 -1
  33. package/dist/assets/{ReimbursementRoutes-nqPDWuH1.js → ReimbursementRoutes-DprHryRK.js} +1 -1
  34. package/dist/assets/{ReportsRoutes-C2J6zIA5.js → ReportsRoutes-DtUGaRZb.js} +1 -1
  35. package/dist/assets/{RewardsRoutes-BMmhN6i_.js → RewardsRoutes-Du6Z6CYq.js} +1 -1
  36. package/dist/assets/{ScreenRoutes-BTS40_ia.js → ScreenRoutes-Bm0blHDU.js} +2 -2
  37. package/dist/assets/{SettingsRoutes-B9C3tvaJ.js → SettingsRoutes-BPx3mV39.js} +1 -1
  38. package/dist/assets/{SetupPagesScreen-XYLqa_k3.js → SetupPagesScreen-DAXpkujH.js} +1 -1
  39. package/dist/assets/{SignInScreen-DMbX8HuT.js → SignInScreen-D_ZIzo4l.js} +1 -1
  40. package/dist/assets/{SignOutScreen-DicPj8v2.js → SignOutScreen-CyHjoyPO.js} +1 -1
  41. package/dist/assets/{TaskListScreen-B6Exeljf.js → TaskListScreen-CD0yo2G_.js} +1 -1
  42. package/dist/assets/{TaskRoutes-1TlP3n5Y.js → TaskRoutes-Eq8lUPTt.js} +1 -1
  43. package/dist/assets/{TransactionDetailRoutes-DGZsOIBF.js → TransactionDetailRoutes-B0zPxUO6.js} +1 -1
  44. package/dist/assets/{TransactionDetailScreen-C9lFmDnj.js → TransactionDetailScreen-Cffx3kdg.js} +1 -1
  45. package/dist/assets/{TransactionListRoutes-CZ04gxln.js → TransactionListRoutes-Dhb4M-FX.js} +1 -1
  46. package/dist/assets/{TreasuryRoutes-dKXycm8O.js → TreasuryRoutes-DzA3TiDm.js} +1 -1
  47. package/dist/assets/{VendorsRoutes-C9c1xhtj.js → VendorsRoutes-B3NL3qG7.js} +1 -1
  48. package/dist/assets/{WiseConfirmationScreen-DgM02BC4.js → WiseConfirmationScreen-CcQUprGd.js} +1 -1
  49. package/dist/assets/{ZeniAccountRoutes-CGg7ZoIY.js → ZeniAccountRoutes-CaEKevKl.js} +1 -1
  50. package/dist/assets/{ZeniAccountStatementScreen-C1jeHlhb.js → ZeniAccountStatementScreen-CsjbaEOP.js} +1 -1
  51. package/dist/assets/{analyticsHelper-sB0sZFDB.js → analyticsHelper-DjIWqwJH.js} +1 -1
  52. package/dist/assets/{getLocaleForTenant-3FpSnKiE.js → getLocaleForTenant-lJA2tHmd.js} +1 -1
  53. package/dist/assets/{index-Cm44je86.js → index-BIwQAhFv.js} +5 -5
  54. package/dist/assets/{routePaths-Dh2GrAVT.js → routePaths-BjY4Hbs8.js} +1 -1
  55. package/dist/assets/{useAskAiCfoHostNavButtonProps-CFYiOVm6.js → useAskAiCfoHostNavButtonProps-DHofygYw.js} +1 -1
  56. package/dist/assets/{useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js → useFetchSuggestedQuestionsWhenReady-BWzQNqoL.js} +1 -1
  57. package/dist/assets/{useInitialThreadRequest-Dc9OG28t.js → useInitialThreadRequest-D1wLkM4c.js} +1 -1
  58. package/dist/assets/{withTransactionSidePanel-YgRxp760.js → withTransactionSidePanel-NOFN_NLa.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-Dk9jZRz5.js","assets/sentry-Wnm-N8eT.js","assets/core-Bv8kdUko.js","assets/zeni-epic-state-CIBk9-EN.js","assets/index-Cm44je86.js","assets/mui-DtV_yZlj.js","assets/analytics-B6udoEJT.js","assets/utils-CRtSAyQU.js","assets/withTransactionSidePanel-YgRxp760.js","assets/useAskAiCfoHostNavButtonProps-CFYiOVm6.js","assets/useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js","assets/TransactionDetailScreen-C9lFmDnj.js","assets/decodeURIComponentSafe-DeA-_wid.js","assets/routePaths-Dh2GrAVT.js","assets/NotFoundScreen-DB_m9Zh0.js","assets/useInitialThreadRequest-Dc9OG28t.js","assets/analyticsHelper-sB0sZFDB.js","assets/CompanyPassportScreen-DLguBt5O.js","assets/MobileAppDrawer-BhM60dvk.js","assets/FeaturePreviewScreen-CPoYCyoW.js","assets/ReferralListScreen-ChBc672l.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-CrklWR3z.js","assets/AddressScreen-BgaNg0Qn.js","assets/DomesticWireDetailScreen-CNcs_kp-.js","assets/DrawerScreen-4A-8jdZK.js","assets/SetupPagesScreen-XYLqa_k3.js","assets/BusinessVerificationPageScreen-C-td2Gz2.js","assets/BillPayApprovalRoutes-CG8clEYB.js","assets/ReimbursementApprovalRuleDetailScreen-DJv_b_Bz.js","assets/getLocaleForTenant-3FpSnKiE.js","assets/ReimbursementRoutes-nqPDWuH1.js","assets/ReimbursementApprovalRoutes-BDyufiCG.js","assets/TransactionListRoutes-CZ04gxln.js","assets/ZeniAccountStatementScreen-C1jeHlhb.js","assets/SettingsRoutes-B9C3tvaJ.js","assets/accountMappingHelper-9C6A5WnC.js","assets/QBOConnectionScreen-geVwV75e.js","assets/empty-B0o7u5U9.js","assets/index-DdfWbiyW.js","assets/url-BmD3S9u5.js","assets/index-D40kV0u0.js","assets/ReportsRoutes-C2J6zIA5.js","assets/ChargeCardRoutes-BIImgtAf.js","assets/PeopleRoutes-Cx1WB4UN.js","assets/ExpenseAutomationRoutes-Bf4kvKbd.js","assets/TreasuryRoutes-dKXycm8O.js","assets/VendorsRoutes-C9c1xhtj.js","assets/pathToGoBack-CiuHSsDX.js","assets/ZeniAccountRoutes-CGg7ZoIY.js","assets/AddressRoutes-Idr8o5Q_.js","assets/PandLWithForecastRoutes-vYtv-oJN.js","assets/CustomerOnboardingRoutes-ChK-o54A.js","assets/TransactionDetailRoutes-DGZsOIBF.js","assets/EntityDetailRoutes-FAkHCqKz.js","assets/NotificationRoutes-Yi8XGMv3.js","assets/PerformanceRoutes-CWOgGPU1.js","assets/RewardsRoutes-BMmhN6i_.js","assets/TaskRoutes-1TlP3n5Y.js","assets/TaskListScreen-B6Exeljf.js","assets/AiCfoScreen-BY8n3owP.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 Ts,fh as gs,v as Is,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 Te,fO as ge,fm as ks}from"./zeni-epic-state-CIBk9-EN.js";import{j as e}from"./liveblocks-CCyJOwfy.js";import{a as v}from"./sentry-Wnm-N8eT.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as G,i as Ie,N as c,n as Zs,o as t}from"./core-Bv8kdUko.js";import{m as ws,u as Gs,z as H,C as zs,a as $s,q as qs,A as L,T as Js,L as B,D as he,t as _,P as Ws,c as K,l}from"./index-Cm44je86.js";import"./mui-DtV_yZlj.js";import{f as je}from"./analyticsHelper-sB0sZFDB.js";import{t as Ys}from"./getLocaleForTenant-3FpSnKiE.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="cb9ca7a8-3530-4b1e-9e40-ffa188d21278",i._sentryDebugIdIdentifier="sentry-dbid-cb9ca7a8-3530-4b1e-9e40-ffa188d21278")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-Dk9jZRz5.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-CrklWR3z.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-nqPDWuH1.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-CZ04gxln.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21])),settings:()=>n(()=>import("./SettingsRoutes-B9C3tvaJ.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-C2J6zIA5.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-BIImgtAf.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-Cx1WB4UN.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-Bf4kvKbd.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-dKXycm8O.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-C9c1xhtj.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-CGg7ZoIY.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-C2J6zIA5.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21]))),en=l(()=>n(()=>import("./AddressRoutes-Idr8o5Q_.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,14,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-Cx1WB4UN.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-vYtv-oJN.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,19,9,10,15,13,18,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-ChK-o54A.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-C9c1xhtj.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-DGZsOIBF.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-FAkHCqKz.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,21]))),on=l(()=>n(()=>import("./DashboardRoutes-Dk9jZRz5.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-CrklWR3z.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-B9C3tvaJ.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-nqPDWuH1.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-CGg7ZoIY.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-dKXycm8O.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-CZ04gxln.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-BIImgtAf.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-Yi8XGMv3.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,21]))),An=l(()=>n(()=>import("./PerformanceRoutes-CWOgGPU1.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,18,21]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-Bf4kvKbd.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-BMmhN6i_.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,20,9,10,18,21]))),xn=l(()=>n(()=>import("./TaskRoutes-1TlP3n5Y.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,15,18,59,9,10,21]))),Tn=l(()=>n(()=>import("./AiCfoScreen-BY8n3owP.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-DB_m9Zh0.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,21]))),gn=l(()=>n(()=>import("./TaskListScreen-B6Exeljf.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(),Y=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),Q=$s(),ye=qs(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&Y,{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),q=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=Js(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Ie("/:tenantEmailDomain/onboarding/*")!==null,X=Ie("/: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=Ts();m.isAfter(M,"month")===!1?U(gs(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:!Is(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(Ys(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 J=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(J&&ts){k(xe(s));const W=H.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)))}else J&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),J&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)));if(J){K.identify(m.userId,{tenant_id:s});const W=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))),W&&(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"&&q.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(q.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,q.tenantsBaseInOrder))},[q,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,qe=r.company!=null&&Hs(r.company),Je=Pe&&qe===!0&&!C,We=re&&Rs(A?.loggedInUserRoleMap),Ye=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),T=Ps(A?.loggedInUserRoleMap),g=Fs(A?.loggedInUserRoleMap),I=Ls(A?.loggedInUserRoleMap),ue=re&&g,_e=ce&&I,es=me&&p,ss=Je&&x,ns=oe&&T,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||Y&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||Y?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(In,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Ks,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,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:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,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:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,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:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(gn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xn,{})}),e.jsx(t,{path:"address/*",element:We||de||Qe||Ye?e.jsx(en,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,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:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,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(Tn,{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 In=({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-DFf2imko.js","assets/sentry-Wnm-N8eT.js","assets/core-Bv8kdUko.js","assets/zeni-epic-state-CIBk9-EN.js","assets/index-BIwQAhFv.js","assets/mui-DtV_yZlj.js","assets/analytics-B6udoEJT.js","assets/utils-CRtSAyQU.js","assets/withTransactionSidePanel-NOFN_NLa.js","assets/useAskAiCfoHostNavButtonProps-DHofygYw.js","assets/useFetchSuggestedQuestionsWhenReady-BWzQNqoL.js","assets/TransactionDetailScreen-Cffx3kdg.js","assets/decodeURIComponentSafe-DeA-_wid.js","assets/routePaths-BjY4Hbs8.js","assets/NotFoundScreen-D1-E1kBF.js","assets/useInitialThreadRequest-D1wLkM4c.js","assets/analyticsHelper-DjIWqwJH.js","assets/CompanyPassportScreen-Wc9Neaz1.js","assets/MobileAppDrawer-CXLCRreY.js","assets/FeaturePreviewScreen-dlYgctun.js","assets/ReferralListScreen-B6ywI0R7.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-YTAReJ2c.js","assets/AddressScreen-h6F8nVYN.js","assets/DomesticWireDetailScreen-w4AIyMqf.js","assets/DrawerScreen-CtmWzT0D.js","assets/SetupPagesScreen-DAXpkujH.js","assets/BusinessVerificationPageScreen-Cjm5MRXi.js","assets/BillPayApprovalRoutes-DsjRockq.js","assets/ReimbursementApprovalRuleDetailScreen-BRDzYwiP.js","assets/getLocaleForTenant-lJA2tHmd.js","assets/ReimbursementRoutes-DprHryRK.js","assets/ReimbursementApprovalRoutes-BJfS22O6.js","assets/TransactionListRoutes-Dhb4M-FX.js","assets/ZeniAccountStatementScreen-CsjbaEOP.js","assets/SettingsRoutes-BPx3mV39.js","assets/accountMappingHelper-9C6A5WnC.js","assets/QBOConnectionScreen-CvW4YyLY.js","assets/empty-B0o7u5U9.js","assets/index-DdfWbiyW.js","assets/url-BmD3S9u5.js","assets/index-D40kV0u0.js","assets/ReportsRoutes-DtUGaRZb.js","assets/ChargeCardRoutes-DBNrni6V.js","assets/PeopleRoutes-CAjCGUS6.js","assets/ExpenseAutomationRoutes-D3kquSUU.js","assets/TreasuryRoutes-DzA3TiDm.js","assets/VendorsRoutes-B3NL3qG7.js","assets/pathToGoBack-CiuHSsDX.js","assets/ZeniAccountRoutes-CaEKevKl.js","assets/AddressRoutes-Djzm4hjd.js","assets/PandLWithForecastRoutes-BO50q4p1.js","assets/CustomerOnboardingRoutes-CbCcHxCy.js","assets/TransactionDetailRoutes-B0zPxUO6.js","assets/EntityDetailRoutes-BQF2uQ7X.js","assets/NotificationRoutes-DvQQ7oaR.js","assets/PerformanceRoutes-DuMTUSdQ.js","assets/RewardsRoutes-Du6Z6CYq.js","assets/TaskRoutes-Eq8lUPTt.js","assets/TaskListScreen-CD0yo2G_.js","assets/AiCfoScreen-OLwbmiYD.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 Ts,fh as gs,v as Is,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 Te,fO as ge,fm as ks}from"./zeni-epic-state-CIBk9-EN.js";import{j as e}from"./liveblocks-CCyJOwfy.js";import{a as v}from"./sentry-Wnm-N8eT.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as G,i as Ie,N as c,n as Zs,o as t}from"./core-Bv8kdUko.js";import{m as ws,u as Gs,z as H,C as zs,a as $s,q as qs,A as L,T as Js,L as B,D as he,t as _,P as Ws,c as K,l}from"./index-BIwQAhFv.js";import"./mui-DtV_yZlj.js";import{f as je}from"./analyticsHelper-DjIWqwJH.js";import{t as Ys}from"./getLocaleForTenant-lJA2tHmd.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="cb9ca7a8-3530-4b1e-9e40-ffa188d21278",i._sentryDebugIdIdentifier="sentry-dbid-cb9ca7a8-3530-4b1e-9e40-ffa188d21278")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-DFf2imko.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-YTAReJ2c.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-DprHryRK.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-Dhb4M-FX.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21])),settings:()=>n(()=>import("./SettingsRoutes-BPx3mV39.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-DtUGaRZb.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-DBNrni6V.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-CAjCGUS6.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-D3kquSUU.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-DzA3TiDm.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-B3NL3qG7.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-CaEKevKl.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-DtUGaRZb.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,19,10,15,13,18,21]))),en=l(()=>n(()=>import("./AddressRoutes-Djzm4hjd.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,14,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-CAjCGUS6.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,18,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-BO50q4p1.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,19,9,10,15,13,18,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-CbCcHxCy.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-B3NL3qG7.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-B0zPxUO6.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-BQF2uQ7X.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,21]))),on=l(()=>n(()=>import("./DashboardRoutes-DFf2imko.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-YTAReJ2c.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-BPx3mV39.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-DprHryRK.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-CaEKevKl.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-DzA3TiDm.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-Dhb4M-FX.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-DBNrni6V.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-DvQQ7oaR.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,21]))),An=l(()=>n(()=>import("./PerformanceRoutes-DuMTUSdQ.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,18,21]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-D3kquSUU.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-Du6Z6CYq.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,20,9,10,18,21]))),xn=l(()=>n(()=>import("./TaskRoutes-Eq8lUPTt.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,15,18,59,9,10,21]))),Tn=l(()=>n(()=>import("./AiCfoScreen-OLwbmiYD.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-D1-E1kBF.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,21]))),gn=l(()=>n(()=>import("./TaskListScreen-CD0yo2G_.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(),Y=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),Q=$s(),ye=qs(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&Y,{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),q=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=Js(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Ie("/:tenantEmailDomain/onboarding/*")!==null,X=Ie("/: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=Ts();m.isAfter(M,"month")===!1?U(gs(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:!Is(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(Ys(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 J=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(J&&ts){k(xe(s));const W=H.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)))}else J&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(Te(m.userId,s))),J&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(ge(m.userId,s)));if(J){K.identify(m.userId,{tenant_id:s});const W=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))),W&&(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"&&q.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(q.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,q.tenantsBaseInOrder))},[q,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,qe=r.company!=null&&Hs(r.company),Je=Pe&&qe===!0&&!C,We=re&&Rs(A?.loggedInUserRoleMap),Ye=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),T=Ps(A?.loggedInUserRoleMap),g=Fs(A?.loggedInUserRoleMap),I=Ls(A?.loggedInUserRoleMap),ue=re&&g,_e=ce&&I,es=me&&p,ss=Je&&x,ns=oe&&T,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||Y&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||Y?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(In,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Ks,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,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:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,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:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,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:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(gn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xn,{})}),e.jsx(t,{path:"address/*",element:We||de||Qe||Ye?e.jsx(en,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,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:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(be,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(R,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:T,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:I,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(Tn,{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 In=({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-CCyJOwfy.js";import{a as p}from"./sentry-Wnm-N8eT.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-Bv8kdUko.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-CIBk9-EN.js";import{C as te,A as U,z as x,ac as ye,bB as Tn,c as K,e as Rn,T as V,B as ae,bC as Bn,bD as Fn,an as Vn,h as Ce,bE as On,bF as Ln,bG as Nn,a6 as $n,W as Kn,bH as zn,v as Jn,bI as Gn}from"./index-Cm44je86.js";import{n as M}from"./mui-DtV_yZlj.js";import{M as v}from"./MobileAppDrawer-BhM60dvk.js";import{a as N,g as $,m as Hn}from"./accountMappingHelper-9C6A5WnC.js";import{t as Zn,A as Wn}from"./AddressScreen-BgaNg0Qn.js";import T from"./NotFoundScreen-DB_m9Zh0.js";import{g as Qn}from"./analyticsHelper-sB0sZFDB.js";import{B as Xn}from"./BusinessVerificationPageScreen-C-td2Gz2.js";import{C as qn}from"./CompanyPassportScreen-DLguBt5O.js";import{q as re}from"./QBOConnectionScreen-geVwV75e.js";import{B as Yn}from"./BillPayApprovalRoutes-CG8clEYB.js";import{R as et}from"./ReimbursementApprovalRoutes-BDyufiCG.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./routePaths-Dh2GrAVT.js";import"./empty-B0o7u5U9.js";import"./pdf-lib-BnpCaznF.js";import"./index-DdfWbiyW.js";import"./url-BmD3S9u5.js";import"./index-D40kV0u0.js";import"./decodeURIComponentSafe-DeA-_wid.js";import"./ReimbursementApprovalRuleDetailScreen-DJv_b_Bz.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]="8b7ce439-36c0-4ed9-8a6f-31df75e78040",e._sentryDebugIdIdentifier="sentry-dbid-8b7ce439-36c0-4ed9-8a6f-31df75e78040")}catch{}})();const nt=M.div`
1
+ import{j as a}from"./liveblocks-CCyJOwfy.js";import{a as p}from"./sentry-Wnm-N8eT.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-Bv8kdUko.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-CIBk9-EN.js";import{C as te,A as U,z as x,ac as ye,bB as Tn,c as K,e as Rn,T as V,B as ae,bC as Bn,bD as Fn,an as Vn,h as Ce,bE as On,bF as Ln,bG as Nn,a6 as $n,W as Kn,bH as zn,v as Jn,bI as Gn}from"./index-BIwQAhFv.js";import{n as M}from"./mui-DtV_yZlj.js";import{M as v}from"./MobileAppDrawer-CXLCRreY.js";import{a as N,g as $,m as Hn}from"./accountMappingHelper-9C6A5WnC.js";import{t as Zn,A as Wn}from"./AddressScreen-h6F8nVYN.js";import T from"./NotFoundScreen-D1-E1kBF.js";import{g as Qn}from"./analyticsHelper-DjIWqwJH.js";import{B as Xn}from"./BusinessVerificationPageScreen-Cjm5MRXi.js";import{C as qn}from"./CompanyPassportScreen-Wc9Neaz1.js";import{q as re}from"./QBOConnectionScreen-CvW4YyLY.js";import{B as Yn}from"./BillPayApprovalRoutes-DsjRockq.js";import{R as et}from"./ReimbursementApprovalRoutes-BJfS22O6.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./routePaths-BjY4Hbs8.js";import"./empty-B0o7u5U9.js";import"./pdf-lib-BnpCaznF.js";import"./index-DdfWbiyW.js";import"./url-BmD3S9u5.js";import"./index-D40kV0u0.js";import"./decodeURIComponentSafe-DeA-_wid.js";import"./ReimbursementApprovalRuleDetailScreen-BRDzYwiP.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]="8b7ce439-36c0-4ed9-8a6f-31df75e78040",e._sentryDebugIdIdentifier="sentry-dbid-8b7ce439-36c0-4ed9-8a6f-31df75e78040")}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-CCyJOwfy.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-Bv8kdUko.js";import{bF as Ye,cl as Ie,Nf as ye,eR as x,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 Fe,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 Fn,Dx as xn,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-CIBk9-EN.js";import{T as ae,C as ie,A as de,m as Te,aK as J,z as D,S as se,c as w,B as Ue,e as $,bq as Gn,aq as oe,br as V,bs as Kn,bt as qn,ac as Ve,bu as Jn,v as ze,ar as Le,K as Qn,F as Xn,bv as Yn,bw as et,bx as nt,a3 as tt}from"./index-Cm44je86.js";import{a as C}from"./sentry-Wnm-N8eT.js";import{n as xe,D as at,S as it}from"./mui-DtV_yZlj.js";import{M as fe}from"./MobileAppDrawer-BhM60dvk.js";import R from"./NotFoundScreen-DB_m9Zh0.js";import{a as Me}from"./analyticsHelper-sB0sZFDB.js";import{d as Ze}from"./routePaths-Dh2GrAVT.js";import{B as Be}from"./BusinessVerificationPageScreen-C-td2Gz2.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]="ef843d6a-f2ef-464b-ad70-a93c0a906d41",e._sentryDebugIdIdentifier="sentry-dbid-ef843d6a-f2ef-464b-ad70-a93c0a906d41")}catch{}})();const st=xe.div`
1
+ import{j as u}from"./liveblocks-CCyJOwfy.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-Bv8kdUko.js";import{bF as Ye,cl as Ie,Nf as ye,eR as x,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 Fe,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 Fn,Dx as xn,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-CIBk9-EN.js";import{T as ae,C as ie,A as de,m as Te,aK as J,z as D,S as se,c as w,B as Ue,e as $,bq as Gn,aq as oe,br as V,bs as Kn,bt as qn,ac as Ve,bu as Jn,v as ze,ar as Le,K as Qn,F as Xn,bv as Yn,bw as et,bx as nt,a3 as tt}from"./index-BIwQAhFv.js";import{a as C}from"./sentry-Wnm-N8eT.js";import{n as xe,D as at,S as it}from"./mui-DtV_yZlj.js";import{M as fe}from"./MobileAppDrawer-CXLCRreY.js";import R from"./NotFoundScreen-D1-E1kBF.js";import{a as Me}from"./analyticsHelper-DjIWqwJH.js";import{d as Ze}from"./routePaths-BjY4Hbs8.js";import{B as Be}from"./BusinessVerificationPageScreen-Cjm5MRXi.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]="ef843d6a-f2ef-464b-ad70-a93c0a906d41",e._sentryDebugIdIdentifier="sentry-dbid-ef843d6a-f2ef-464b-ad70-a93c0a906d41")}catch{}})();const st=xe.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-CCyJOwfy.js";import{a as u,b as T,q as A}from"./sentry-Wnm-N8eT.js";import{h as D,j as z,g as c,u as J,N as M,k as P}from"./core-Bv8kdUko.js";import{u as j,z as s,m as F,c as E,D as O,d as _,e as B,f as N,g as V,G as $,h as v}from"./index-Cm44je86.js";import{eR as q,Jl as G,Jm as K,eS as R,fl as W,Jr as H,fK as Q,cU as X,Js as y,Jt as Y,Ju as Z,bT as b}from"./zeni-epic-state-CIBk9-EN.js";import"./mui-DtV_yZlj.js";import{u as ee}from"./useDeviceId-Bi73VT1N.js";import{f as te}from"./analyticsHelper-sB0sZFDB.js";import{t as ne}from"./getLocaleForTenant-3FpSnKiE.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="3bcaf90d-6e62-471c-9bf3-b94ddc50a548",t._sentryDebugIdIdentifier="sentry-dbid-3bcaf90d-6e62-471c-9bf3-b94ddc50a548")}catch{}})();const ie=P(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},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 l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:b(l),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}=j(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),S=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>q(e)),I=c(e=>G(e)),m=J(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(K(I.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),i(W(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("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(M,{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-CCyJOwfy.js";import{a as u,b as T,q as A}from"./sentry-Wnm-N8eT.js";import{h as D,j as z,g as c,u as J,N as M,k as P}from"./core-Bv8kdUko.js";import{u as j,z as s,m as F,c as E,D as O,d as _,e as B,f as N,g as V,G as $,h as v}from"./index-BIwQAhFv.js";import{eR as q,Jl as G,Jm as K,eS as R,fl as W,Jr as H,fK as Q,cU as X,Js as y,Jt as Y,Ju as Z,bT as b}from"./zeni-epic-state-CIBk9-EN.js";import"./mui-DtV_yZlj.js";import{u as ee}from"./useDeviceId-Bi73VT1N.js";import{f as te}from"./analyticsHelper-DjIWqwJH.js";import{t as ne}from"./getLocaleForTenant-lJA2tHmd.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="3bcaf90d-6e62-471c-9bf3-b94ddc50a548",t._sentryDebugIdIdentifier="sentry-dbid-3bcaf90d-6e62-471c-9bf3-b94ddc50a548")}catch{}})();const ie=P(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},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 l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:b(l),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}=j(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),S=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>q(e)),I=c(e=>G(e)),m=J(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(K(I.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),i(W(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("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(M,{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-CCyJOwfy.js";import{a as n}from"./sentry-Wnm-N8eT.js";import{h as u,u as m,j as p,N as g}from"./core-Bv8kdUko.js";import{z as f,B as y,t as h,c,e as b}from"./index-Cm44je86.js";import{fP as x,fQ as I,JJ as j}from"./zeni-epic-state-CIBk9-EN.js";import{n as w}from"./mui-DtV_yZlj.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="6b50a2f5-3367-4cdd-8a36-66c5ef349579",e._sentryDebugIdIdentifier="sentry-dbid-6b50a2f5-3367-4cdd-8a36-66c5ef349579")}catch{}})();function U(){const e=u(),t=m(),i=p(),a=n.useRef(!1),d=f.isSignedIn(),r=t.state?.message==="logout",o=r||d;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),j(),h.reset(),c.trackLogout(b.Event.logoutSuccess),c.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
1
+ import{j as s}from"./liveblocks-CCyJOwfy.js";import{a as n}from"./sentry-Wnm-N8eT.js";import{h as u,u as m,j as p,N as g}from"./core-Bv8kdUko.js";import{z as f,B as y,t as h,c,e as b}from"./index-BIwQAhFv.js";import{fP as x,fQ as I,JJ as j}from"./zeni-epic-state-CIBk9-EN.js";import{n as w}from"./mui-DtV_yZlj.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="6b50a2f5-3367-4cdd-8a36-66c5ef349579",e._sentryDebugIdIdentifier="sentry-dbid-6b50a2f5-3367-4cdd-8a36-66c5ef349579")}catch{}})();function U(){const e=u(),t=m(),i=p(),a=n.useRef(!1),d=f.isSignedIn(),r=t.state?.message==="logout",o=r||d;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),j(),h.reset(),c.trackLogout(b.Event.logoutSuccess),c.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-CCyJOwfy.js";import{a as g}from"./sentry-Wnm-N8eT.js";import{j as v,h as _,u as z,g as b,l as Z,k as M}from"./core-Bv8kdUko.js";import{z as R,C as O,A as p,S as V,c as W,e as q,cI as H,v as f,p as J}from"./index-Cm44je86.js";import{eR as X,QA as A,Ge as E,QB as Q,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 da,QI as m,ec as ua,QJ as pa,QK as ma}from"./zeni-epic-state-CIBk9-EN.js";import{n as Ta}from"./mui-DtV_yZlj.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import{M as Ga}from"./MobileAppDrawer-BhM60dvk.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="3d6d4f16-dca2-4ba2-8595-1f9a0e6aa9ba",e._sentryDebugIdIdentifier="sentry-dbid-3d6d4f16-dca2-4ba2-8595-1f9a0e6aa9ba")}catch{}})();const ha=Ta.div`
1
+ import{j as u}from"./liveblocks-CCyJOwfy.js";import{a as g}from"./sentry-Wnm-N8eT.js";import{j as v,h as _,u as z,g as b,l as Z,k as M}from"./core-Bv8kdUko.js";import{z as R,C as O,A as p,S as V,c as W,e as q,cI as H,v as f,p as J}from"./index-BIwQAhFv.js";import{eR as X,QA as A,Ge as E,QB as Q,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 da,QI as m,ec as ua,QJ as pa,QK as ma}from"./zeni-epic-state-CIBk9-EN.js";import{n as Ta}from"./mui-DtV_yZlj.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-DHofygYw.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-BWzQNqoL.js";import{M as Ga}from"./MobileAppDrawer-CXLCRreY.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="3d6d4f16-dca2-4ba2-8595-1f9a0e6aa9ba",e._sentryDebugIdIdentifier="sentry-dbid-3d6d4f16-dca2-4ba2-8595-1f9a0e6aa9ba")}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-CCyJOwfy.js";import se from"./NotFoundScreen-DB_m9Zh0.js";import{a as c}from"./sentry-Wnm-N8eT.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-Bv8kdUko.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 N,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 De}from"./zeni-epic-state-CIBk9-EN.js";import{z as E,cG as Fe,w as xe,C as ye,A as b,p as W,v as j,S as we,c as q,e as je,cH as ve,h as A,aq as Re}from"./index-Cm44je86.js";import{n as Be}from"./mui-DtV_yZlj.js";import{u as Pe}from"./useInitialThreadRequest-Dc9OG28t.js";import{M as Ue}from"./MobileAppDrawer-BhM60dvk.js";import Le from"./TaskListScreen-B6Exeljf.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.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]="1576dad2-c1fb-4141-acf6-a58204f659d2",e._sentryDebugIdIdentifier="sentry-dbid-1576dad2-c1fb-4141-acf6-a58204f659d2")}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(Fe,{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 ze=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?N(e.taskGroupState,l):void 0,a=E.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=M(e),{tenantEmailDomain:D}=d,G=r.recurringSourceTaskId,F=G!=null?`${A.appUrl}/${D}/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:F,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(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=j(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 w(){const e=O(),t=Q(),s=ne(),u=xe(),{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:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[F,I]=c.useState(!1),[p,X]=c.useState(!1),[R,Y]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=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})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(C!=="In-Progress"){if(T.current){if(C==="Error")return x(!1),void(T.current=!1);if(C==="Completed"){x(!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:j(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,C,l,s,e]);const $=g(i=>K(i,r)),y=$.fetchState,z=E.getSignedInUser();if(z==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=j(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(we,{analytics:q,onLoad:i=>(m=>m.trackPageLoaded(je.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:F,handleDrawerToggle:i=>{I(i)}}),n.jsx(ze,{analytics:q,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:z,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:G})]})]})}const Ne=Be.div`
1
+ import{j as n}from"./liveblocks-CCyJOwfy.js";import se from"./NotFoundScreen-D1-E1kBF.js";import{a as c}from"./sentry-Wnm-N8eT.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-Bv8kdUko.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 N,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 De}from"./zeni-epic-state-CIBk9-EN.js";import{z as E,cG as Fe,w as xe,C as ye,A as b,p as W,v as j,S as we,c as q,e as je,cH as ve,h as A,aq as Re}from"./index-BIwQAhFv.js";import{n as Be}from"./mui-DtV_yZlj.js";import{u as Pe}from"./useInitialThreadRequest-D1wLkM4c.js";import{M as Ue}from"./MobileAppDrawer-CXLCRreY.js";import Le from"./TaskListScreen-CD0yo2G_.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./useAskAiCfoHostNavButtonProps-DHofygYw.js";import"./useFetchSuggestedQuestionsWhenReady-BWzQNqoL.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]="1576dad2-c1fb-4141-acf6-a58204f659d2",e._sentryDebugIdIdentifier="sentry-dbid-1576dad2-c1fb-4141-acf6-a58204f659d2")}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(Fe,{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 ze=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?N(e.taskGroupState,l):void 0,a=E.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=M(e),{tenantEmailDomain:D}=d,G=r.recurringSourceTaskId,F=G!=null?`${A.appUrl}/${D}/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:F,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(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=j(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 w(){const e=O(),t=Q(),s=ne(),u=xe(),{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:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[F,I]=c.useState(!1),[p,X]=c.useState(!1),[R,Y]=c.useState(!1),[B,ee]=c.useState(!1),[P,x]=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})),x(!0))},[t,r]);c.useEffect(()=>{if(P)if(C!=="In-Progress"){if(T.current){if(C==="Error")return x(!1),void(T.current=!1);if(C==="Completed"){x(!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:j(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,C,l,s,e]);const $=g(i=>K(i,r)),y=$.fetchState,z=E.getSignedInUser();if(z==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=j(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(we,{analytics:q,onLoad:i=>(m=>m.trackPageLoaded(je.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:F,handleDrawerToggle:i=>{I(i)}}),n.jsx(ze,{analytics:q,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:z,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:G})]})]})}const Ne=Be.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-CCyJOwfy.js";import i from"./NotFoundScreen-DB_m9Zh0.js";import{T as r}from"./TransactionDetailScreen-C9lFmDnj.js";import"./sentry-Wnm-N8eT.js";import{n as a,o}from"./core-Bv8kdUko.js";import"./zeni-epic-state-CIBk9-EN.js";import"./recharts-DdIjbBfI.js";import"./index-Cm44je86.js";import"./mui-DtV_yZlj.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import"./decodeURIComponentSafe-DeA-_wid.js";import"./routePaths-Dh2GrAVT.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-CCyJOwfy.js";import i from"./NotFoundScreen-D1-E1kBF.js";import{T as r}from"./TransactionDetailScreen-Cffx3kdg.js";import"./sentry-Wnm-N8eT.js";import{n as a,o}from"./core-Bv8kdUko.js";import"./zeni-epic-state-CIBk9-EN.js";import"./recharts-DdIjbBfI.js";import"./index-BIwQAhFv.js";import"./mui-DtV_yZlj.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./useAskAiCfoHostNavButtonProps-DHofygYw.js";import"./useFetchSuggestedQuestionsWhenReady-BWzQNqoL.js";import"./decodeURIComponentSafe-DeA-_wid.js";import"./routePaths-BjY4Hbs8.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-CCyJOwfy.js";import{a as d}from"./sentry-Wnm-N8eT.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-Bv8kdUko.js";import{bn as $e,eR as q,cQ as ue,bv as me,pR as Y,Kz as F,LA as pe,LB as Q,KZ as he,jO as fe,LC as ge,L2 as Z,L3 as J,kD as Se,Hz as X,Kt as x,jI as Te,jG as ve,jS as Me,LD as He,LE as Ke,tR as N,jN as ye,GR as Ee,cV as We,cW as qe,LF as Ye,Ks as Qe,LG as Ze,tV as Je,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-CIBk9-EN.js";import{z as be,C as ee,A as L,aK as De,m as ga,K as Sa,aL as Ta,F as va,p as K,T as ya,aM as Ea,v as W,c as Ce,aN as ba,aq as Da,Z as H}from"./index-Cm44je86.js";import{n as Ca,S as Ia,D as ka}from"./mui-DtV_yZlj.js";import{u as La}from"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import{c as Aa}from"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import{d as Ie}from"./decodeURIComponentSafe-DeA-_wid.js";import{h as ke,g as Ua,e as xa,c as _a}from"./routePaths-Dh2GrAVT.js";import{t as Va}from"./utils-CRtSAyQU.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]="df54bc2a-308d-487b-bbcc-6596152bed2e",a._sentryDebugIdIdentifier="sentry-dbid-df54bc2a-308d-487b-bbcc-6596152bed2e")}catch{}})();const ae=()=>{const a=be.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 Za(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>q(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:C}=t(L.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,A=ae(),v=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>F(u,v)),D=S(u=>{const z=F(u,v)?.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]),y=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")),[w,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)},[]),[b,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)&&(w?R||y==null||(P(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:B??y}))):(s(Z()),s(J()),V(!0),s(Se(p))))},[s,E,m?.fetchState,m?.transaction,p,i,l,g,w,R,y,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:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:A,selectedTransaction:v,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:y,vendorViewDetails:U,uiState:_,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:M,isCreateVendorDrawerOpen:b,setIsCreateVendorDrawerOpen:I}}const Pa={overlayWidth:new va(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()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(ve()),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(Fa,{onClick:h=>h.stopPropagation(),children:k.jsx(Ta,{...C})})})},Fa=Ca(Ia)`
1
+ import{j as k}from"./liveblocks-CCyJOwfy.js";import{a as d}from"./sentry-Wnm-N8eT.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-Bv8kdUko.js";import{bn as $e,eR as q,cQ as ue,bv as me,pR as Y,Kz as F,LA as pe,LB as Q,KZ as he,jO as fe,LC as ge,L2 as Z,L3 as J,kD as Se,Hz as X,Kt as x,jI as Te,jG as ve,jS as Me,LD as He,LE as Ke,tR as N,jN as ye,GR as Ee,cV as We,cW as qe,LF as Ye,Ks as Qe,LG as Ze,tV as Je,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-CIBk9-EN.js";import{z as be,C as ee,A as L,aK as De,m as ga,K as Sa,aL as Ta,F as va,p as K,T as ya,aM as Ea,v as W,c as Ce,aN as ba,aq as Da,Z as H}from"./index-BIwQAhFv.js";import{n as Ca,S as Ia,D as ka}from"./mui-DtV_yZlj.js";import{u as La}from"./useAskAiCfoHostNavButtonProps-DHofygYw.js";import{c as Aa}from"./useFetchSuggestedQuestionsWhenReady-BWzQNqoL.js";import{d as Ie}from"./decodeURIComponentSafe-DeA-_wid.js";import{h as ke,g as Ua,e as xa,c as _a}from"./routePaths-BjY4Hbs8.js";import{t as Va}from"./utils-CRtSAyQU.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]="df54bc2a-308d-487b-bbcc-6596152bed2e",a._sentryDebugIdIdentifier="sentry-dbid-df54bc2a-308d-487b-bbcc-6596152bed2e")}catch{}})();const ae=()=>{const a=be.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 Za(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>q(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:C}=t(L.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,A=ae(),v=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>F(u,v)),D=S(u=>{const z=F(u,v)?.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]),y=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")),[w,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)},[]),[b,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)&&(w?R||y==null||(P(!0),s(X(p,"TransactionDetail",{timeframe:"month",timePeriod:B??y}))):(s(Z()),s(J()),V(!0),s(Se(p))))},[s,E,m?.fetchState,m?.transaction,p,i,l,g,w,R,y,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:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:A,selectedTransaction:v,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:y,vendorViewDetails:U,uiState:_,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:M,isCreateVendorDrawerOpen:b,setIsCreateVendorDrawerOpen:I}}const Pa={overlayWidth:new va(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()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(ve()),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(Fa,{onClick:h=>h.stopPropagation(),children:k.jsx(Ta,{...C})})})},Fa=Ca(Ia)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-CCyJOwfy.js";import{j as q,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-Bv8kdUko.js";import{eR as N,j0 as D,OY as Z,Hq as me,bq as se,OZ as ke,jD as K,K$ as W,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-CIBk9-EN.js";import{D as ce,c as L,c6 as Q,v as w,p as X,C as Te,A as ne,W as Le,z as Oe}from"./index-Cm44je86.js";import"./mui-DtV_yZlj.js";import{a as I}from"./sentry-Wnm-N8eT.js";import{w as ee}from"./withTransactionSidePanel-YgRxp760.js";import{p as te,c as ae}from"./routePaths-Dh2GrAVT.js";import{u as Be}from"./utils-CRtSAyQU.js";import{d as P}from"./decodeURIComponentSafe-DeA-_wid.js";import{Z as ze}from"./ZeniAccountStatementScreen-C1jeHlhb.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import"./TransactionDetailScreen-C9lFmDnj.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]="52f196a1-ca68-4141-9897-b4e71336903c",a._sentryDebugIdIdentifier="sentry-dbid-52f196a1-ca68-4141-9897-b4e71336903c")}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:W(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)}))}}})(Q),$=ee(function({...a}){const e=q(),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=>N(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:W(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}}))}}})(Q),Ve=ee(function({referrerType:a,...e}){const t=q(),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=>N(r)),G=m.company?.companyInfo.firstMonthOfFY??1;let i;const p=Ne(T,y,k,A,g,S,b);if(p){const r={startDate:Y(g,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},R=qe(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},Ne=(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,qe=(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:W(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}}))}}})(Q),He=ee(function({referrerType:a,...e}){const t=q(),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=>N(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:W(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}})}}})(Q),ue=ee(function({referrerType:a,...e}){const t=q(),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=>N(M)),G=m.company?.featuresActivationInfo.connectedAccountProvider==="unit",i=m.company?.companyInfo.firstMonthOfFY??1;let p;const E=We(T,y,f,A,g,k);if(E){const M={startDate:Y(A,"YYYY-MM-DD"),endDate:Y(g,"YYYY-MM-DD")},Ie=Qe(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},We=(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,Qe=(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=>N(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-CCyJOwfy.js";import{j as q,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-Bv8kdUko.js";import{eR as N,j0 as D,OY as Z,Hq as me,bq as se,OZ as ke,jD as K,K$ as W,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-CIBk9-EN.js";import{D as ce,c as L,c6 as Q,v as w,p as X,C as Te,A as ne,W as Le,z as Oe}from"./index-BIwQAhFv.js";import"./mui-DtV_yZlj.js";import{a as I}from"./sentry-Wnm-N8eT.js";import{w as ee}from"./withTransactionSidePanel-NOFN_NLa.js";import{p as te,c as ae}from"./routePaths-BjY4Hbs8.js";import{u as Be}from"./utils-CRtSAyQU.js";import{d as P}from"./decodeURIComponentSafe-DeA-_wid.js";import{Z as ze}from"./ZeniAccountStatementScreen-CsjbaEOP.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./useAskAiCfoHostNavButtonProps-DHofygYw.js";import"./useFetchSuggestedQuestionsWhenReady-BWzQNqoL.js";import"./TransactionDetailScreen-Cffx3kdg.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]="52f196a1-ca68-4141-9897-b4e71336903c",a._sentryDebugIdIdentifier="sentry-dbid-52f196a1-ca68-4141-9897-b4e71336903c")}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:W(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)}))}}})(Q),$=ee(function({...a}){const e=q(),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=>N(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:W(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}}))}}})(Q),Ve=ee(function({referrerType:a,...e}){const t=q(),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=>N(r)),G=m.company?.companyInfo.firstMonthOfFY??1;let i;const p=Ne(T,y,k,A,g,S,b);if(p){const r={startDate:Y(g,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},R=qe(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},Ne=(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,qe=(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:W(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}}))}}})(Q),He=ee(function({referrerType:a,...e}){const t=q(),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=>N(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:W(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}})}}})(Q),ue=ee(function({referrerType:a,...e}){const t=q(),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=>N(M)),G=m.company?.featuresActivationInfo.connectedAccountProvider==="unit",i=m.company?.companyInfo.firstMonthOfFY??1;let p;const E=We(T,y,f,A,g,k);if(E){const M={startDate:Y(A,"YYYY-MM-DD"),endDate:Y(g,"YYYY-MM-DD")},Ie=Qe(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},We=(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,Qe=(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=>N(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-CCyJOwfy.js";import{j as U,u as B,h as P,l as O,g as f,N as L,k as V,n as Te,o as k}from"./core-Bv8kdUko.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 q,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 Ne,bF as Oe,cx as Ve,bG as Me,cl as _e,fe as ze,bs as $e,Jn as Ge,ck as We}from"./zeni-epic-state-CIBk9-EN.js";import{T as _,an as He,z as A,S as z,c as j,b$ as qe,c0 as Ke,c1 as W,K,m as Ze,W as Je,C as ie,A as v,F as Xe,B as Qe,c2 as Ye,aq as Z,v as et,c3 as tt,p as J,c4 as at,j as Q,c5 as nt,a6 as st}from"./index-Cm44je86.js";import{D as rt,n as N,S as ot}from"./mui-DtV_yZlj.js";import it from"./NotFoundScreen-DB_m9Zh0.js";import{S as Y}from"./SetupPagesScreen-XYLqa_k3.js";import{a as d}from"./sentry-Wnm-N8eT.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import{c as lt}from"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import{u as ut}from"./useInitialThreadRequest-Dc9OG28t.js";import{M as ce}from"./MobileAppDrawer-BhM60dvk.js";import{F as dt}from"./FeaturePreviewScreen-CPoYCyoW.js";import{a as ee}from"./analyticsHelper-sB0sZFDB.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./routePaths-Dh2GrAVT.js";import"./BusinessVerificationPageScreen-C-td2Gz2.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]="adc54dd5-42f8-4ce4-8545-9e7b10ff0828",t._sentryDebugIdIdentifier="sentry-dbid-adc54dd5-42f8-4ce4-8545-9e7b10ff0828")}catch{}})();const pt=V(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))}}})(qe);function mt(){const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=O(),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=V(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:()=>{W(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{W(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"))}}})(Ke),yt=({isFirstTransfer:t})=>{const a=U(),{tenantEmailDomain:n}=O(),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:()=>{W(j,"review",S.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=N.div`
1
+ import{j as e}from"./liveblocks-CCyJOwfy.js";import{j as U,u as B,h as P,l as O,g as f,N as L,k as V,n as Te,o as k}from"./core-Bv8kdUko.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 q,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 Ne,bF as Oe,cx as Ve,bG as Me,cl as _e,fe as ze,bs as $e,Jn as Ge,ck as We}from"./zeni-epic-state-CIBk9-EN.js";import{T as _,an as He,z as A,S as z,c as j,b$ as qe,c0 as Ke,c1 as W,K,m as Ze,W as Je,C as ie,A as v,F as Xe,B as Qe,c2 as Ye,aq as Z,v as et,c3 as tt,p as J,c4 as at,j as Q,c5 as nt,a6 as st}from"./index-BIwQAhFv.js";import{D as rt,n as N,S as ot}from"./mui-DtV_yZlj.js";import it from"./NotFoundScreen-D1-E1kBF.js";import{S as Y}from"./SetupPagesScreen-DAXpkujH.js";import{a as d}from"./sentry-Wnm-N8eT.js";import{u as ct}from"./useAskAiCfoHostNavButtonProps-DHofygYw.js";import{c as lt}from"./useFetchSuggestedQuestionsWhenReady-BWzQNqoL.js";import{u as ut}from"./useInitialThreadRequest-D1wLkM4c.js";import{M as ce}from"./MobileAppDrawer-CXLCRreY.js";import{F as dt}from"./FeaturePreviewScreen-dlYgctun.js";import{a as ee}from"./analyticsHelper-DjIWqwJH.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./routePaths-BjY4Hbs8.js";import"./BusinessVerificationPageScreen-Cjm5MRXi.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]="adc54dd5-42f8-4ce4-8545-9e7b10ff0828",t._sentryDebugIdIdentifier="sentry-dbid-adc54dd5-42f8-4ce4-8545-9e7b10ff0828")}catch{}})();const pt=V(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))}}})(qe);function mt(){const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=O(),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=V(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:()=>{W(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{W(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"))}}})(Ke),yt=({isFirstTransfer:t})=>{const a=U(),{tenantEmailDomain:n}=O(),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:()=>{W(j,"review",S.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=N.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-CCyJOwfy.js";import{a as g}from"./sentry-Wnm-N8eT.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-Bv8kdUko.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-CIBk9-EN.js";import{z as U,an as Be,B as Ut,S as Q,c as j,Z,at as vn,v as M,D as Ce,w as ce,au as We,av as xn,aw as Tn,p as Qe,ax as yn,m as Dn,K as de,F as Ze,C as ae,A as $,ay as Cn,h as Xe,az as En,aA as Nt,W as In,aB as bn,T as kn,aC as wn,aq as Mt,aD as An,o as W,y as jn,J as Jt,M as Fn,aE as Ln,aF as Pn,e as et,aG as _n,aH as Vn,n as Bn,aI as On,aJ as Rn}from"./index-Cm44je86.js";import{n as N,D as Un,S as Gt}from"./mui-DtV_yZlj.js";import{t as Nn,A as Mn}from"./AddressScreen-BgaNg0Qn.js";import le from"./NotFoundScreen-DB_m9Zh0.js";import{F as Jn}from"./FeaturePreviewScreen-CPoYCyoW.js";import{c as q,v as tt,d as Gn}from"./routePaths-Dh2GrAVT.js";import{p as Kt}from"./pathToGoBack-CiuHSsDX.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import{M as ge}from"./MobileAppDrawer-BhM60dvk.js";import{D as Kn}from"./DrawerScreen-4A-8jdZK.js";import{g as $n,m as zn}from"./accountMappingHelper-9C6A5WnC.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="a8492782-c04a-42a1-a786-f4b5c4158ba1",e._sentryDebugIdIdentifier="sentry-dbid-a8492782-c04a-42a1-a786-f4b5c4158ba1")}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-CCyJOwfy.js";import{a as g}from"./sentry-Wnm-N8eT.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-Bv8kdUko.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-CIBk9-EN.js";import{z as U,an as Be,B as Ut,S as Q,c as j,Z,at as vn,v as M,D as Ce,w as ce,au as We,av as xn,aw as Tn,p as Qe,ax as yn,m as Dn,K as de,F as Ze,C as ae,A as $,ay as Cn,h as Xe,az as En,aA as Nt,W as In,aB as bn,T as kn,aC as wn,aq as Mt,aD as An,o as W,y as jn,J as Jt,M as Fn,aE as Ln,aF as Pn,e as et,aG as _n,aH as Vn,n as Bn,aI as On,aJ as Rn}from"./index-BIwQAhFv.js";import{n as N,D as Un,S as Gt}from"./mui-DtV_yZlj.js";import{t as Nn,A as Mn}from"./AddressScreen-h6F8nVYN.js";import le from"./NotFoundScreen-D1-E1kBF.js";import{F as Jn}from"./FeaturePreviewScreen-dlYgctun.js";import{c as q,v as tt,d as Gn}from"./routePaths-BjY4Hbs8.js";import{p as Kt}from"./pathToGoBack-CiuHSsDX.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DHofygYw.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-BWzQNqoL.js";import{M as ge}from"./MobileAppDrawer-CXLCRreY.js";import{D as Kn}from"./DrawerScreen-CtmWzT0D.js";import{g as $n,m as zn}from"./accountMappingHelper-9C6A5WnC.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="a8492782-c04a-42a1-a786-f4b5c4158ba1",e._sentryDebugIdIdentifier="sentry-dbid-a8492782-c04a-42a1-a786-f4b5c4158ba1")}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-CCyJOwfy.js";import{a as f}from"./sentry-Wnm-N8eT.js";import{q as u,h,g as b,N as y}from"./core-Bv8kdUko.js";import{JG as I,eS as w,zF as x}from"./zeni-epic-state-CIBk9-EN.js";import{z as l,B as S,J as j,M as D}from"./index-Cm44je86.js";import{n as g}from"./mui-DtV_yZlj.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="569ba152-56ed-425d-abbc-0a00e764afea",e._sentryDebugIdIdentifier="sentry-dbid-569ba152-56ed-425d-abbc-0a00e764afea")}catch{}})();const P=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[a,c]=f.useState(!1),n=h(),i=b(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{a||(c(!0),n(x(t,p,s)))},[a,n]),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=g.div`
1
+ import{j as o}from"./liveblocks-CCyJOwfy.js";import{a as f}from"./sentry-Wnm-N8eT.js";import{q as u,h,g as b,N as y}from"./core-Bv8kdUko.js";import{JG as I,eS as w,zF as x}from"./zeni-epic-state-CIBk9-EN.js";import{z as l,B as S,J as j,M as D}from"./index-BIwQAhFv.js";import{n as g}from"./mui-DtV_yZlj.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.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]="569ba152-56ed-425d-abbc-0a00e764afea",e._sentryDebugIdIdentifier="sentry-dbid-569ba152-56ed-425d-abbc-0a00e764afea")}catch{}})();const P=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[a,c]=f.useState(!1),n=h(),i=b(m=>I(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{a||(c(!0),n(x(t,p,s)))},[a,n]),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=g.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-CCyJOwfy.js";import{j as K,u as Y,h as z,l as Z,g as w,k as J,N as ne,n as Ve,o as k}from"./core-Bv8kdUko.js";import{eR as _,OA as Ce,OB as $e,cl as te,cm as Ne,fe as Ze,wS as ke,B3 as Ge,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 _n,Ep as Mn,kk as Oe,OF as Vn,qa as He,p_ as We,kb as Ke,ke as Be,Kt as Fe,Ku as $n,OG as Nn,kd as Zn,kA as Gn,k2 as Hn,iB as Wn,iA as Kn,OH as Yn,OI as ye,E4 as Jn,OJ as qn,OK as Qn,Nf as we,OL as Re,OM as Xn,EA as et,N_ as nt,BZ as Ye,sK as Je,ON as tt,Ex as at,OO as qe,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-CIBk9-EN.js";import{T as ae,C as $,z as D,A as O,m as M,B as de,bP as Ct,Z as Ie,K as V,F as q,p as an,an as kt,ac as Ue,c as R,bQ as wt,aq as Se,bR as At,S as ue,bS as Dt,e as be,aK as W,bT as It,W as St,a9 as bt,bU as ze,bV as Et,v as ee,bW as vt,bX as Pt,bY as jt,bZ as Tt,a6 as Ot,o as Bt}from"./index-Cm44je86.js";import{n as L,D as Q,S as X}from"./mui-DtV_yZlj.js";import ce from"./NotFoundScreen-DB_m9Zh0.js";import{S as _e}from"./SetupPagesScreen-XYLqa_k3.js";import{F as on}from"./FeaturePreviewScreen-CPoYCyoW.js";import{a as u}from"./sentry-Wnm-N8eT.js";import{M as pe}from"./MobileAppDrawer-BhM60dvk.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-CNcs_kp-.js";import{A as Ut}from"./AddressScreen-BgaNg0Qn.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-CFYiOVm6.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-B9n4CrDa.js";import{Z as zt}from"./ZeniAccountStatementScreen-C1jeHlhb.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./analyticsHelper-sB0sZFDB.js";import"./routePaths-Dh2GrAVT.js";import"./BusinessVerificationPageScreen-C-td2Gz2.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]="9d50b05a-abb4-44fe-936e-7c1637fdc059",e._sentryDebugIdIdentifier="sentry-dbid-9d50b05a-abb4-44fe-936e-7c1637fdc059")}catch{}})();const _t=L.div`
1
+ import{j as n}from"./liveblocks-CCyJOwfy.js";import{j as K,u as Y,h as z,l as Z,g as w,k as J,N as ne,n as Ve,o as k}from"./core-Bv8kdUko.js";import{eR as _,OA as Ce,OB as $e,cl as te,cm as Ne,fe as Ze,wS as ke,B3 as Ge,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 _n,Ep as Mn,kk as Oe,OF as Vn,qa as He,p_ as We,kb as Ke,ke as Be,Kt as Fe,Ku as $n,OG as Nn,kd as Zn,kA as Gn,k2 as Hn,iB as Wn,iA as Kn,OH as Yn,OI as ye,E4 as Jn,OJ as qn,OK as Qn,Nf as we,OL as Re,OM as Xn,EA as et,N_ as nt,BZ as Ye,sK as Je,ON as tt,Ex as at,OO as qe,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-CIBk9-EN.js";import{T as ae,C as $,z as D,A as O,m as M,B as de,bP as Ct,Z as Ie,K as V,F as q,p as an,an as kt,ac as Ue,c as R,bQ as wt,aq as Se,bR as At,S as ue,bS as Dt,e as be,aK as W,bT as It,W as St,a9 as bt,bU as ze,bV as Et,v as ee,bW as vt,bX as Pt,bY as jt,bZ as Tt,a6 as Ot,o as Bt}from"./index-BIwQAhFv.js";import{n as L,D as Q,S as X}from"./mui-DtV_yZlj.js";import ce from"./NotFoundScreen-D1-E1kBF.js";import{S as _e}from"./SetupPagesScreen-DAXpkujH.js";import{F as on}from"./FeaturePreviewScreen-dlYgctun.js";import{a as u}from"./sentry-Wnm-N8eT.js";import{M as pe}from"./MobileAppDrawer-CXLCRreY.js";import{A as Ft,D as Rt,V as Lt}from"./DomesticWireDetailScreen-w4AIyMqf.js";import{A as Ut}from"./AddressScreen-h6F8nVYN.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-DHofygYw.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-BWzQNqoL.js";import{Z as zt}from"./ZeniAccountStatementScreen-CsjbaEOP.js";import"./recharts-DdIjbBfI.js";import"./analytics-B6udoEJT.js";import"./plaid--kCGp3zU.js";import"./dnd-BIjMGuxw.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL8N42Il.js";import"./lexical-DOh49tNP.js";import"./pdf-BcmiSEKK.js";import"./utils-CRtSAyQU.js";import"./analyticsHelper-DjIWqwJH.js";import"./routePaths-BjY4Hbs8.js";import"./BusinessVerificationPageScreen-Cjm5MRXi.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]="9d50b05a-abb4-44fe-936e-7c1637fdc059",e._sentryDebugIdIdentifier="sentry-dbid-9d50b05a-abb4-44fe-936e-7c1637fdc059")}catch{}})();const _t=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-CCyJOwfy.js";import{a as f}from"./sentry-Wnm-N8eT.js";import{j as x,h as j,u as B,l as C,g as p}from"./core-Bv8kdUko.js";import{ID as s,IC as T,OT as $,eR as v,OU as D}from"./zeni-epic-state-CIBk9-EN.js";import{K as z,aq as g,m as E,z as L,B as P,b_ as U,p as _}from"./index-Cm44je86.js";import{n as N}from"./mui-DtV_yZlj.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]="e9062b11-d10b-430a-b933-6fc207e5909e",e._sentryDebugIdIdentifier="sentry-dbid-e9062b11-d10b-430a-b933-6fc207e5909e")}catch{}})();const G=N.div`
1
+ import{j as i}from"./liveblocks-CCyJOwfy.js";import{a as f}from"./sentry-Wnm-N8eT.js";import{j as x,h as j,u as B,l as C,g as p}from"./core-Bv8kdUko.js";import{ID as s,IC as T,OT as $,eR as v,OU as D}from"./zeni-epic-state-CIBk9-EN.js";import{K as z,aq as g,m as E,z as L,B as P,b_ as U,p as _}from"./index-BIwQAhFv.js";import{n as N}from"./mui-DtV_yZlj.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]="e9062b11-d10b-430a-b933-6fc207e5909e",e._sentryDebugIdIdentifier="sentry-dbid-e9062b11-d10b-430a-b933-6fc207e5909e")}catch{}})();const G=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-CIBk9-EN.js";import{c as u}from"./index-Cm44je86.js";import"./sentry-Wnm-N8eT.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]="183aece1-8207-474e-8806-0b7eed37ab92",e._sentryDebugIdIdentifier="sentry-dbid-183aece1-8207-474e-8806-0b7eed37ab92")}catch{}})();const b=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},h=(e,a,o,i,s)=>{const r=[],c=[];let t=[];s?.forEach(n=>{r.push(n.companyId),c.push(n.companyName),t=t.concat(n.userRole)}),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?c:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",I=e=>Object.values(e.allocation).map(String).join("-");export{I as a,h as f,g,b as t};
1
+ import{cH as m,cI as l,Jy as _,Jz as d}from"./zeni-epic-state-CIBk9-EN.js";import{c as u}from"./index-BIwQAhFv.js";import"./sentry-Wnm-N8eT.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]="183aece1-8207-474e-8806-0b7eed37ab92",e._sentryDebugIdIdentifier="sentry-dbid-183aece1-8207-474e-8806-0b7eed37ab92")}catch{}})();const b=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},h=(e,a,o,i,s)=>{const r=[],c=[];let t=[];s?.forEach(n=>{r.push(n.companyId),c.push(n.companyName),t=t.concat(n.userRole)}),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?c:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",I=e=>Object.values(e.allocation).map(String).join("-");export{I as a,h as f,g,b as t};
@@ -1 +1 @@
1
- import{r as n}from"./index-Cm44je86.js";import"./mui-DtV_yZlj.js";import"./sentry-Wnm-N8eT.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]="1fa951f6-f96f-4189-ad96-ae963fd8cf64",e._sentryDebugIdIdentifier="sentry-dbid-1fa951f6-f96f-4189-ad96-ae963fd8cf64")}catch{}})();function d(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{d as t};
1
+ import{r as n}from"./index-BIwQAhFv.js";import"./mui-DtV_yZlj.js";import"./sentry-Wnm-N8eT.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]="1fa951f6-f96f-4189-ad96-ae963fd8cf64",e._sentryDebugIdIdentifier="sentry-dbid-1fa951f6-f96f-4189-ad96-ae963fd8cf64")}catch{}})();function d(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{d as t};