@zeniai/web-app-ui 5.2.16-dev → 5.2.17-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/assets/AddressRoutes-B2KIG7En.js +1 -0
  2. package/dist/assets/AddressScreen-BRHUGjlq.js +9 -0
  3. package/dist/assets/{AiCfoScreen-CjlYW9BA.js → AiCfoScreen-HMy5Y7Mq.js} +4 -4
  4. package/dist/assets/{BillPayApprovalRoutes-D6R35wEu.js → BillPayApprovalRoutes-ClKax7IT.js} +1 -1
  5. package/dist/assets/BillPayRoutes-BChpGQL2.js +119 -0
  6. package/dist/assets/BusinessVerificationPageScreen-BwMN9nGs.js +9 -0
  7. package/dist/assets/{CardsAiCfoScreen-BqGSzxio.js → CardsAiCfoScreen-DO_y52lp.js} +3 -3
  8. package/dist/assets/{ChargeCardRoutes-DwSiYhNV.js → ChargeCardRoutes-Dv5pDzqZ.js} +8 -8
  9. package/dist/assets/CompanyPassportScreen-DpirfeBa.js +1 -0
  10. package/dist/assets/ConnectionAuthScreen-rOB6ynUK.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-C98l4ZVS.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-D9rEFGOH.js → CustomerOnboardingRoutes-D_6fNZiA.js} +6 -6
  13. package/dist/assets/{DashboardRoutes-uvzfWzIm.js → DashboardRoutes-Cp_J4k4_.js} +1 -1
  14. package/dist/assets/DefaultTenantHome-D0bfOiik.js +1 -0
  15. package/dist/assets/DomesticWireDetailScreen-CEzBRH9X.js +18 -0
  16. package/dist/assets/DrawerScreen-CTCbWuBb.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-8jxY5Riu.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-CjC0R383.js → ExpenseAutomationRoutes-BLGJhe2d.js} +3 -3
  19. package/dist/assets/{FeaturePreviewScreen-DAIgYjjb.js → FeaturePreviewScreen-BYw0siNX.js} +1 -1
  20. package/dist/assets/HubSpotOAuthCallbackScreen-D5JpfjXx.js +1 -0
  21. package/dist/assets/MagicLinkRoutes-DJ8XQppN.js +72 -0
  22. package/dist/assets/MagicLinkSignInScreen-Pc9aSzuu.js +12 -0
  23. package/dist/assets/MobileAppDrawer-C850zeFL.js +1 -0
  24. package/dist/assets/NotFoundScreen-D8y3QSjF.js +1 -0
  25. package/dist/assets/NotificationRoutes-CgDlCmJS.js +1 -0
  26. package/dist/assets/OAuthConsentScreen-BHm1bSWe.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-CxkAljmn.js +1 -0
  28. package/dist/assets/PeopleRoutes-Cwuko2wK.js +22 -0
  29. package/dist/assets/PerformanceRoutes-Cpl-d1r4.js +1 -0
  30. package/dist/assets/{Preview-CcprGnkI.js → Preview-BD6Y1F_q.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-CBR0AZz1.js → QBOConnectionScreen-BlMcHgbG.js} +1 -1
  32. package/dist/assets/ReimbursementApprovalRoutes-nJxxaKUX.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-m4OK96Pp.js → ReimbursementApprovalRuleDetailScreen-DXovejDg.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-CC1LJLL_.js → ReimbursementRoutes-41mQ1voL.js} +10 -10
  35. package/dist/assets/{ReportsRoutes-BSnn6sLO.js → ReportsRoutes-CPxhUqlo.js} +1 -1
  36. package/dist/assets/RewardsRoutes-BXExREiG.js +1 -0
  37. package/dist/assets/ScreenRoutes-DBgtMxcS.js +2 -0
  38. package/dist/assets/{SettingsRoutes-BW92o1e1.js → SettingsRoutes-C3VXjgEl.js} +8 -8
  39. package/dist/assets/{SetupPagesScreen-CmqcI8Pt.js → SetupPagesScreen-BX3zI3tV.js} +5 -5
  40. package/dist/assets/SignInScreen-DYVSrH1Q.js +1 -0
  41. package/dist/assets/SignOutScreen-D8IS2BPQ.js +9 -0
  42. package/dist/assets/TaskListScreen-DbBL-EqC.js +9 -0
  43. package/dist/assets/TaskRoutes-CP206xuh.js +9 -0
  44. package/dist/assets/{TransactionDetailRoutes-BiZAv8du.js → TransactionDetailRoutes-8oHAjr2u.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-DrsbGFZL.js → TransactionDetailScreen-Bfy3N_JT.js} +2 -2
  46. package/dist/assets/{TransactionListRoutes-CWvS2zXP.js → TransactionListRoutes-C46bH8Mo.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-BWDCDIwg.js → TreasuryRoutes-CzmHsChK.js} +5 -5
  48. package/dist/assets/{VendorsRoutes-D5S2XjMm.js → VendorsRoutes-CUyxWOUM.js} +14 -14
  49. package/dist/assets/WiseConfirmationScreen-lyjRGpZ9.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-D0ZCvv0b.js → ZeniAccountRoutes-8seJMANR.js} +11 -11
  51. package/dist/assets/ZeniAccountStatementScreen-D_5y24R6.js +9 -0
  52. package/dist/assets/{accountMappingHelper-DvHt_faU.js → accountMappingHelper-Cg1rcuy8.js} +1 -1
  53. package/dist/assets/{analytics-fzE8ssbj.js → analytics-CP-wGaZJ.js} +1 -1
  54. package/dist/assets/analyticsHelper-BZTNTJma.js +1 -0
  55. package/dist/assets/{core-Bnb5S7eF.js → core-4nWRIid2.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-IB5WoVjO.js → decodeURIComponentSafe-B-9vw5Be.js} +1 -1
  57. package/dist/assets/{dnd-BclBZkmc.js → dnd-DPx0nGIt.js} +1 -1
  58. package/dist/assets/{empty-CGGO74v5.js → empty-BWSUSl2t.js} +1 -1
  59. package/dist/assets/{empty-BXrJtoVu.js → empty-dwCpPdyI.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-DBjMlLZt.js → emptyVideoElement-Cgz9sC1U.js} +1 -1
  61. package/dist/assets/epic-BIxKmwU7.js +2 -0
  62. package/dist/assets/getLocaleForTenant-Bpp7IHaZ.js +1 -0
  63. package/dist/assets/{index-D7gFR706.js → index-B89XzExo.js} +1 -1
  64. package/dist/assets/{index-BfeFOTnu.js → index-BEdY_Av6.js} +1 -1
  65. package/dist/assets/{index-BSl9hMca.js → index-C53rjstg.js} +2 -2
  66. package/dist/assets/{index-BzrRJ8WV.js → index-CbGX11uA.js} +33478 -32829
  67. package/dist/assets/index-Cx4f0JbF.css +1 -0
  68. package/dist/assets/{index-oAxAWZsp.js → index-D7c6Pfp9.js} +1 -1
  69. package/dist/assets/{index-B9FzYJpE.js → index-DmHtkhiK.js} +1 -1
  70. package/dist/assets/{index-DRI9BXaF.js → index-P8XH9v_Z.js} +1 -1
  71. package/dist/assets/{index-gZ-YqOdE.js → index-ot86Rern.js} +1 -1
  72. package/dist/assets/{lexical-DbVLnI8g.js → lexical-Dce73siJ.js} +1 -1
  73. package/dist/assets/liveblocks-BqtYq8PY.js +54 -0
  74. package/dist/assets/{lottie-CosVBOrn.js → lottie-C6mBeCcV.js} +1 -1
  75. package/dist/assets/{mui-BAFflVdx.js → mui-ChRNPf14.js} +1 -1
  76. package/dist/assets/{pathToGoBack-BX0vhbVE.js → pathToGoBack-DjzKcd4A.js} +1 -1
  77. package/dist/assets/{pdf-Ba7sOjY6.js → pdf-CHegScPw.js} +3 -3
  78. package/dist/assets/{pdf-lib-Sz3Y8uGi.js → pdf-lib-xuF5byC3.js} +1 -1
  79. package/dist/assets/{plaid-Il6Pn-tK.js → plaid-j-SLH4pe.js} +1 -1
  80. package/dist/assets/{pusher-DSTN6BAp.js → pusher-BK7gFb-W.js} +1 -1
  81. package/dist/assets/{react-DjsKx-MP.js → react-Bo9yX59J.js} +1 -1
  82. package/dist/assets/{react-DF-XRbvU.js → react-CWkBMv_4.js} +1 -1
  83. package/dist/assets/{react-Ahj_9ocn.js → react-D_MXXpOM.js} +1 -1
  84. package/dist/assets/{react-BQr1_2Lm.js → react-Dy3J-4XE.js} +1 -1
  85. package/dist/assets/{react-DV1w5wyt.js → react-YqzjdluA.js} +1 -1
  86. package/dist/assets/{react-wreqxVEC.js → react-wzy7xDal.js} +1 -1
  87. package/dist/assets/{recharts-B3FaT6ex.js → recharts-UIIeT-6j.js} +1 -1
  88. package/dist/assets/routePaths-BYuMJjxP.js +1 -0
  89. package/dist/assets/{sentry-Bj_fC7Ll.js → sentry-BtWdTNDK.js} +1 -1
  90. package/dist/assets/{url-CRSVA0N_.js → url-CUWwwyN4.js} +1 -1
  91. package/dist/assets/{url-Cv9qurGb.js → url-CkFCyaeM.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BjjheFLZ.js → useAiCfoDashboardSuggestedQuestionsChips-7YoEarS7.js} +1 -1
  93. package/dist/assets/useAskAiCfoHostNavButtonProps-DuEP5Klm.js +1 -0
  94. package/dist/assets/useCashManagementBanner-_9igQwqA.js +1 -0
  95. package/dist/assets/{useChargeCardPusherEvents-Dl4aF9Gu.js → useChargeCardPusherEvents-DCjAMeeL.js} +1 -1
  96. package/dist/assets/{useDeviceId-CnUmsNEA.js → useDeviceId-BVGc_c85.js} +1 -1
  97. package/dist/assets/useEmailConnectResultRefresh-BTnBt-Sy.js +1 -0
  98. package/dist/assets/{useInitialThreadRequest-BaClMW9n.js → useInitialThreadRequest-BMuxer3t.js} +1 -1
  99. package/dist/assets/{utils-BKBg63lI.js → utils-BGj88Dzy.js} +1 -1
  100. package/dist/assets/{withTransactionSidePanel-Dkd_LZWk.js → withTransactionSidePanel-MO-qZsKE.js} +2 -2
  101. package/dist/assets/{zeni-epic-state-GXytJkko.js → zeni-epic-state-Brhydpej.js} +6 -6
  102. package/dist/index.html +1 -1
  103. package/package.json +8 -5
  104. package/dist/assets/AddressRoutes-f609Ttdc.js +0 -1
  105. package/dist/assets/AddressScreen-DnnIRcHN.js +0 -9
  106. package/dist/assets/BillPayRoutes-CAVdOoQ5.js +0 -119
  107. package/dist/assets/BusinessVerificationPageScreen-2yzgn_dq.js +0 -9
  108. package/dist/assets/CompanyPassportScreen-6gSkpDjZ.js +0 -1
  109. package/dist/assets/ConnectionAuthScreen-Ck4Gxy8V.js +0 -11
  110. package/dist/assets/CustomerOnboardingAuthScreen-IhYlyAOK.js +0 -1
  111. package/dist/assets/DefaultTenantHome-BeV69g9G.js +0 -1
  112. package/dist/assets/DomesticWireDetailScreen-C-5bE-Xl.js +0 -18
  113. package/dist/assets/DrawerScreen-BL40QyXA.js +0 -1
  114. package/dist/assets/EntityDetailRoutes-CnjAhdib.js +0 -1
  115. package/dist/assets/HubSpotOAuthCallbackScreen-Bwh56-e_.js +0 -1
  116. package/dist/assets/MagicLinkRoutes-wKih3lqk.js +0 -72
  117. package/dist/assets/MagicLinkSignInScreen-7uBJWOza.js +0 -12
  118. package/dist/assets/MobileAppDrawer-QMY9Y_6M.js +0 -1
  119. package/dist/assets/NotFoundScreen-Bjgm3Cgg.js +0 -1
  120. package/dist/assets/NotificationRoutes-DQXiQJ75.js +0 -1
  121. package/dist/assets/OAuthConsentScreen-BgywNNMG.js +0 -1
  122. package/dist/assets/PandLWithForecastRoutes-CRmbuHlA.js +0 -1
  123. package/dist/assets/PeopleRoutes-Br3c54zD.js +0 -22
  124. package/dist/assets/PerformanceRoutes-D8GxMw7x.js +0 -1
  125. package/dist/assets/ReimbursementApprovalRoutes-COdNraf8.js +0 -1
  126. package/dist/assets/RewardsRoutes-CzaqvCYC.js +0 -1
  127. package/dist/assets/ScreenRoutes-BT39k7R-.js +0 -2
  128. package/dist/assets/SignInScreen-Db_yZc64.js +0 -1
  129. package/dist/assets/SignOutScreen-CNV5EZSB.js +0 -9
  130. package/dist/assets/TaskListScreen-YoPRLTQT.js +0 -9
  131. package/dist/assets/TaskRoutes-Dl6VRn1s.js +0 -9
  132. package/dist/assets/WiseConfirmationScreen-Q0J40ioP.js +0 -12
  133. package/dist/assets/ZeniAccountStatementScreen-BQINO3hW.js +0 -9
  134. package/dist/assets/analyticsHelper-DjBKxGVt.js +0 -1
  135. package/dist/assets/epic-Bq9rvz3h.js +0 -2
  136. package/dist/assets/getLocaleForTenant-DBW7UyHp.js +0 -1
  137. package/dist/assets/index-Czu7h9lW.css +0 -1
  138. package/dist/assets/liveblocks-bqFl_SVp.js +0 -54
  139. package/dist/assets/routePaths-iBgwsr_r.js +0 -1
  140. package/dist/assets/useAskAiCfoHostNavButtonProps-DGvHpWY7.js +0 -1
  141. package/dist/assets/useCashManagementBanner-DUUI_7bK.js +0 -1
  142. package/dist/assets/useEmailConnectResultRefresh-C_fGcTHu.js +0 -1
@@ -1,12 +0,0 @@
1
- import{j as u}from"./liveblocks-bqFl_SVp.js";import{a as g}from"./sentry-Bj_fC7Ll.js";import{u as F,g as O,h as _,t as w,j as l,N as C}from"./core-Bnb5S7eF.js";import{z as r,E as V,O as P,h as A,g as N,j as Z,C as R,V as W,m as $}from"./index-BzrRJ8WV.js";import{eZ as q,Mh as B,Mr as G,Mi as H,fC as J,g2 as K,Mn as Q,gs as X,cZ as Y,Ms as ee,Mt as te}from"./zeni-epic-state-GXytJkko.js";import{n as ne}from"./mui-BAFflVdx.js";import{u as se}from"./useDeviceId-CnUmsNEA.js";import{f as ie}from"./analyticsHelper-DjBKxGVt.js";import{t as ae}from"./getLocaleForTenant-DBW7UyHp.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="45fdd94b-f7ea-4386-803d-553bcb052699",t._sentryDebugIdIdentifier="sentry-dbid-45fdd94b-f7ea-4386-803d-553bcb052699")}catch{}})();const T=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function Te(){const t=F(),i=O(),m=_(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:D}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),y=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>q(e))),b=l((e=>B(e))),E=r.getSignedInUser(),v=V().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&a!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(G(n,a,f)))}),[n,p,t,a,f,s?.zeniSessionId]),g.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(b.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),P.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,b.tenantsInOrder),X().then((()=>{const e=$();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(Z.Event.loginSuccess,"email",Y(o.productSettings))}),2e3))}),[h,S,y,s,o,b,v,i.state,t]);const M=g.useCallback((()=>{m("/signin/auth")}),[m]),j=g.useCallback((()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))}),[a,d,t,c]),U=g.useCallback((e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))}),[a,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:U,onCancelVerifyDevice:M});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=i.state?.origin??"/";return u.jsx(C,{to:e,state:{...i.state,origin:""}})}if(!T(n,p)||f==null||I==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(C,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- z-index: 9999;
11
- background-color: ${t=>t.theme.colors.background};
12
- `;export{Te as default};
@@ -1 +0,0 @@
1
- import{j as V}from"./liveblocks-bqFl_SVp.js";import{a as c}from"./sentry-Bj_fC7Ll.js";import{u as fe,j as n,i as He,g as We,h as Je,l as G}from"./core-Bnb5S7eF.js";import{eZ as me,fH as Ke,fI as be,ft as Qe,bn as Xe,eY as qe,fJ as ea,fK as aa,fM as ta,fP as na,fQ as g,fS as sa,fT as de,fW as oa,fU as ia,fV as ra,fX as da,cP as la,fZ as ca,cV as ua,fs as fa,g2 as ma,g3 as ba,g1 as pa}from"./zeni-epic-state-GXytJkko.js";import{a9 as ha,aa as Sa,x as ga,y as Ea,z as k,A as ka,u as Ca,d as r,i as ya,c as Ia,ab as Ta,f as wa,a as Aa,ac as _a,a5 as Da,ad as Fa,ae as va,af as le,ag as ce,L as $a,ah as Pa,ai as ue,g as x,a1 as Ma,w,aj as R,ak as Ga}from"./index-BzrRJ8WV.js";import{D as xa}from"./mui-BAFflVdx.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="3b3267bd-53a3-4dc6-bedf-b450704b410e",f._sentryDebugIdIdentifier="sentry-dbid-3b3267bd-53a3-4dc6-bedf-b450704b410e")}catch{}})();const Ra=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=He(),a=We(),C=ga(),o=Je(),B=Qe(),m=fe(),{useFeatureGate:i}=Ea(),N=k.getSignedInUser(),U=Xe(N),s=n((e=>me(e))),pe=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n((e=>qe(e))),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[A,L]=c.useState(void 0),_=G("/:tenantEmailDomain/dashboard")!==null,Z=G("/:tenantEmailDomain/reports")!==null,I=G("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),Y=n((e=>ea(e))),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n((e=>aa(e)));c.useEffect((()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(ta(!0))}),[y,T,D.fetchState,I]);const h=k.getSignedInUser(),F=n((e=>e.tenantState)),Ce=n((e=>F.fetchState==="Completed"?na(e):[])),E=n((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),H=Ia(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=U||!U&&ve,Pe=n((e=>g(e).totalUnreadCount)),Me=n((e=>g(e).reducedFetchCountState)),W=n((e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount)),J=n((e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount)),Ge=n((e=>g(e).notificationDetailsByTab.tasks.fetchCountState)),$=n((e=>g(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:K,isLoading:Q,isFetchingMore:X,hasFetchedAll:q,fetchMore:xe}=Ta();c.useEffect((()=>{const e=setTimeout((()=>xe?.()),0);return()=>clearTimeout(e)})),c.useEffect((()=>{if(Q===!1&&X===!1&&q===!0)if(s?.companyId!=null&&K!=null){const e=`dashboard_${s.companyId}`;L(K.filter((u=>u.roomId===e&&u.readAt==null)).length)}else L(0)}),[Q,X,q]),c.useEffect((()=>{y&&!I&&Ge.fetchState==="Not-Started"&&B.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,B.tenantId]),c.useEffect((()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),c.useEffect((()=>{A!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:A},"comments")))}),[A,$.fetchState]);const Re={fetchStatus:Me,count:Pe},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n((e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0)),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),H===!1&&S.push("expense_automation_card");const Ve=wa(),te=n((e=>ia(e,S,h,we,Te).fetchState)),ne=n((e=>ra(e).fetchState)),Be=_&&(te==="Completed"||te==="Error")||Z&&(ne==="Completed"||ne==="Error")||!_&&!Z?void 0:"disabled",Ne=c.useMemo((()=>da(s.userRole)),[s.userRole]),Ue=la(Ne),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&Y.fetchState==="Completed"&&ca(Y.notificationSettings,h.userEmail,z,s),se=Aa(),Le=se&&_a(a),oe=ua(Ve?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,P=c.useCallback((()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Da(a.pathname)!=="treasury"),[v,oe,ie,a.pathname,t]),[Ze,re]=c.useState(P);c.useEffect((()=>{re(P())}),[P]);const ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,Ye=Fa(ze);return V.jsx(xa,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:V.jsx(va,{signedInUser:N,currentTenantId:F.currentTenantId??"",tenants:F.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Be,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:Ye,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:je,notificationCountDetails:Re,isExpenseAutomationEnabledForUser:H,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=W===0&&J>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=W===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const u=w(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(x.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!pe)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=w(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=w(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&x.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Ga(e.type);ue(e.type)?(j!=null&&m(pa()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let b=`/${encodeURIComponent(u)}/`;const M=R(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Pa(l)?b+="settings/my_profile":ue(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(ba(h.userId,e.tenantId,h.zeniSessionId)));const p=e;x.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:_,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:De,newYearAnimationEnabled:Fe})})})),La=f=>{const d=fe(),t=n((C=>me(C))),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Ke(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ra,{...f,...a})};export{La as M};
@@ -1 +0,0 @@
1
- import{j as r}from"./liveblocks-bqFl_SVp.js";import{h as n,n as e}from"./core-Bnb5S7eF.js";import{U as i}from"./index-BzrRJ8WV.js";import"./mui-BAFflVdx.js";import"./sentry-Bj_fC7Ll.js";import"./zeni-epic-state-GXytJkko.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="8f21ada1-163d-445e-848f-3449dc675a20",o._sentryDebugIdIdentifier="sentry-dbid-8f21ada1-163d-445e-848f-3449dc675a20")}catch{}})();const a=e(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-bqFl_SVp.js";import lt from"./NotFoundScreen-Bjgm3Cgg.js";import{a as k}from"./sentry-Bj_fC7Ll.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as K}from"./core-Bnb5S7eF.js";import{cw as St,fJ as q,eZ as H,fX as bt,fQ as b,Ti as Q,fT as d,fI as y,sK as M,yg as It,Tj as Tt,fH as Ct,fZ as yt,sP as _t,Tk as $,bo as F,fB as x,sT as X,Tl as Et,cI as At,cB as Bt}from"./zeni-epic-state-GXytJkko.js";import{_ as Nt,z as wt,y as xt,d as Rt,a0 as vt,cW as Dt,w as B,a9 as Pt,cX as Ut,aa as Gt,v as $t}from"./index-BzrRJ8WV.js";import"./mui-BAFflVdx.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-DGvHpWY7.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="3fe790a8-5f3b-4c71-b88d-7383590e1fbd",t._sentryDebugIdIdentifier="sentry-dbid-3fe790a8-5f3b-4c71-b88d-7383590e1fbd")}catch{}})();const Mt=(t,l)=>new Promise(((n,u)=>{const g=t.map((i=>new Promise((s=>{l(i),s()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((i=>{u(i)}))})),jt=kt((function(t,l){const n=q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:N,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=B(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=B(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(X("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(N(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=B(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(g)&&(r="not-found"),c[1].startsWith("bill")&&!Bt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=B(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Et(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(X("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{m==="read"&&(N(r),t($([r],F())))}))).then((()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,N).then((()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Pt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Nt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[N,R]=k.useState(!1),a=S((e=>q(e))),o=S((e=>H(e))),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});vt({isDataReady:!0});const O=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),V=S((e=>b(e).currentTab)),v=S((e=>b(e).currentSubTab)),Y=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),D=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),tt=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),et=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),at=Dt().allUsers,{inboxNotifications:w,isLoading:_,hasFetchedAll:T,isFetchingMore:P,fetchMore:ot}=ct(),{threads:W,isLoading:L,fetchMore:Z,isFetchingMore:z,hasFetchedAll:J}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect((()=>{if(V!==i&&i!=null&&s(Q(i)),i==null){const e=`../${V}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[i]),k.useEffect((()=>{Y.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(_===!1&&T===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter((C=>C.roomId===e&&C.readAt==null)).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}}),[_,T]),k.useEffect((()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=_||P===!0||T!==!0||_||P===!0||T!==!0;k.useEffect((()=>{U&&D!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||D!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))}),[U,D]),k.useEffect((()=>{s(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&N===!1&&(R(!0),s(It()))}),[a.fetchState]),k.useEffect((()=>{if(_===!1&&L===!1&&w!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=w.filter((f=>f.roomId===e)).filter((f=>f.kind==="thread")),C=p.filter((f=>f.readAt==null)),E=p.map((f=>f.id)),it=p.map((f=>{const G=W.find((rt=>rt.id===f.threadId));return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(z||J===!0||Z==null||Z(),null)})).filter((f=>f!=null));s(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:C.length},"comments")),s(Tt(it))}}),[_,P,z,T,J,L,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const C=Ct(p.mode);if(C==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];v==="all"?E.push("read","unread"):v!=="mentions"&&E.push(v),s(M("task_manager",C,E,!0))}}}},nt=dt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:O,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return A.jsxs(gt,{children:[A.jsx(K,{path:"/:selectedTab",element:A.jsx(Vt,{})}),A.jsx(K,{path:"*",element:A.jsx(lt,{})})]})}export{ne as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-bqFl_SVp.js";import{a as r}from"./sentry-Bj_fC7Ll.js";import{u as T,g as A,j as o,N as P}from"./core-Bnb5S7eF.js";import{MG as j,eZ as C,fP as D,MH as R,MI as x,MJ as z,MK as L,oi as k,LD as N}from"./zeni-epic-state-GXytJkko.js";import{z as h,R as I}from"./index-BzrRJ8WV.js";import"./mui-BAFflVdx.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="93af4a2f-5c59-4e36-9e91-e0fee9ad7270",n._sentryDebugIdIdentifier="sentry-dbid-93af4a2f-5c59-4e36-9e91-e0fee9ad7270")}catch{}})();function ee(){const n=T(),a=A(),{params:t,error:i}=r.useMemo((()=>j(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o((e=>C(e))),l=o((e=>D(e))),d=o((e=>e.tenantState.fetchState)),y=o(R),v=o(x),u=o(z),[S,E]=r.useState(null),[b,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{f&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[f,s,d,n]),r.useEffect((()=>{u!=null&&u!==""&&(window.location.href=u)}),[u]);const M=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),c=S??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:E,approveError:b??v,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(N(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(P,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as n}from"./liveblocks-bqFl_SVp.js";import{h as V,u as z,g as H,i as J,j as d,n as K,o as Q,p as I}from"./core-Bnb5S7eF.js";import{eZ as U,sy as R,s6 as X,Nb as v,s1 as y,bs as ee,bn as ae,bZ as te,s2 as se,Nc as oe,M_ as C,dI as re,wd as ne,Nd as ce,wA as ie,fG as le,fE as de}from"./zeni-epic-state-GXytJkko.js";import{z as me,_ as fe,a0 as pe,f as ue,y as w,d as M,D as he,g as N,ap as ge,w as Fe}from"./index-BzrRJ8WV.js";import"./mui-BAFflVdx.js";import be from"./NotFoundScreen-Bjgm3Cgg.js";import{F as Ie}from"./FeaturePreviewScreen-DAIgYjjb.js";import{a as g}from"./sentry-Bj_fC7Ll.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DGvHpWY7.js";import{u as ye}from"./useInitialThreadRequest-BaClMW9n.js";import{t as Se}from"./routePaths-iBgwsr_r.js";import{M as Te}from"./MobileAppDrawer-QMY9Y_6M.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="7c15481a-9098-44b6-90e9-c1695e236748",s._sentryDebugIdIdentifier="sentry-dbid-7c15481a-9098-44b6-90e9-c1695e236748")}catch{}})();const S=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=K((function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:N}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(y(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ge);function O(){const s=V(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),T=d((t=>U(t))),$=T.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),A=d((t=>t.profitAndLossState)),k=d((t=>t.reportUIOptionsState.selectedForecast)),D=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:q}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex((b=>b.id===L)):P!=null?f.forecasts.findIndex((b=>b.id===P)):f.forecasts.length>0?0:-1)(i,o,k?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(e(v(i.forecasts[t].id,t)),S(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!D(i.forecasts[t].id)&&F&&e(y(i.forecasts[t].id))}}),[c,p,e,l,i,m,u,R,y,F]);const x=ue(),B=x?.loggedInUserRole!=null&&ee(x.loggedInUserRole),{useFeatureGate:G}=w(),{isFeatureEnabled:E}=G(M.isReportsCommentingEnabled),W=ye(E?T?.companyId:void 0,{clearParams:l&&m}),[Y,Z]=g.useState(!1),j=t=>{Z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:N,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Te,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(Ae,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:D,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:_,onAskAiCfoClick:q,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ze(){const s=d((c=>U(c))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
@@ -1,22 +0,0 @@
1
- import{j as a}from"./liveblocks-bqFl_SVp.js";import{N7 as oe,eZ as Q,kG as H,fG as X,fE as ie,KB as ee,MN as re,va as ke,N8 as Y,u$ as Ee,vk as ve,ve as le,v3 as ce,vi as Pe,vf as je,N9 as de,w$ as Le,fq as Te,gi as Ae,Na as G,v7 as pe,v6 as ue,vn as Oe,c7 as Re}from"./zeni-epic-state-GXytJkko.js";import{p as me,y as ae,d as _,z as K,i as ge,e as fe,K as he,al as Ce,am as Fe,G as be,o as F,M as ye,O as M,an as Ve,_ as Ze,a0 as Be,D as Ue,g as Se,j as $e,w as ze,ao as Ge,f as _e}from"./index-BzrRJ8WV.js";import{D as we,n as N,S as xe}from"./mui-BAFflVdx.js";import te from"./NotFoundScreen-Bjgm3Cgg.js";import{a as c}from"./sentry-Bj_fC7Ll.js";import{u as se,i as He,j as g,h as Ke,g as Me,n as Ne,o as ne,p as z}from"./core-Bnb5S7eF.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-DGvHpWY7.js";import{M as qe}from"./MobileAppDrawer-QMY9Y_6M.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="f45a0dcf-e94b-4c97-90a3-bec38fc4b975",e._sentryDebugIdIdentifier="sentry-dbid-f45a0dcf-e94b-4c97-90a3-bec38fc4b975")}catch{}})();const Je={overlayWidth:new be(100,100,48)},W=M.getLocalizedStrings().peoplePage.invitePage,Ye=M.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),m=se(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=He(),r=g((l=>oe(l))),p=g((l=>Q(l))),E=g((l=>H(l))),{useFeatureGate:D}=ae(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),v=X(I,p),L=ie(p),T=ee(p),B=re(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!v&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Y()),y()},A=()=>{V===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(_.isChargeCardFeatureEnabled),j=ge(p,P,I),{isCardsHidden:O}=fe(p?.tenantId),b=!j||O,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:R===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:v,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(ce(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(le({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?Ee(e):ve(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{x===!1&&w!=null&&m(ke(w))}),[x,w]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Xe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:W.discardTitle}),descriptionComponent:a.jsx(Ie,{children:W.discardDescription}),primaryButtonText:W.discard,secondaryButtonText:Ye.no,action:o,isEditPopup:!0}):null,a.jsx(Fe,{...s})]})})},Xe=N(xe)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,De=N(ye.H6Regular)`
6
- margin-top: ${F.sp7};
7
- padding-left: ${F.sp8};
8
- padding-right: ${F.sp8};
9
- color: ${e=>e.theme.colors.primary};
10
- word-break: break-word;
11
- `,Ie=N(ye.LargeRegularSp)`
12
- color: ${e=>e.theme.colors.hero};
13
- padding-left: ${F.sp8};
14
- padding-right: ${F.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${F.sp4};
17
- white-space: pre-line;
18
- `,ea={overlayWidth:new be(100,100,48)},q=M.getLocalizedStrings().peoplePage.invitePage,aa=M.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),m=se(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),w=g((o=>oe(o))),r=g((o=>Q(o))),p=g((o=>H(o))),{useFeatureGate:E}=ae(),{isFeatureEnabled:D}=E(_.isDebitCardFeatureEnabled),I=X(D,r),v=ie(r),L=ee(r),T=re(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),m(Y())},C=()=>{V===!0?S(!0):x()},A={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=E(_.isChargeCardFeatureEnabled),j=ge(r,P,D),{isCardsHidden:O}=fe(r?.tenantId),b=!j||O,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:o=>{m(le({peopleLocalData:o})),Z(!0)},onResetClick:x,onSaveClick:()=>{m(f==="zeni_only"?Pe(e):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:b,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:v,isLoading:U};return c.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(y(),m(Y()))}),[w.invitePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:q.discardTitle}),descriptionComponent:a.jsx(Ie,{children:q.discardDescription}),primaryButtonText:q.discard,secondaryButtonText:aa.no,action:A}):null,a.jsx(Ve,{...s})]})})},ta=N(xe)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,na=Ne((function(e,t){const d=de(e),n=K.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(e),analytics:Se}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,y)=>{e(ce(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(G({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(G({searchText:i}))}}}}))(Ge);function J({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Ke(),n=se(),f=Me(),{areTenantIdsInSync:i}=Ze(),y=K.getSignedInUser(),h=g((s=>Q(s))),{useFeatureGate:m}=ae(),{isFeatureEnabled:V}=m(_.isDebitCardFeatureEnabled),Z=g((s=>H(s))),k=!X(V,h)&&Z,S=ee(h),w=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=c.useState(!1),[D,I]=c.useState(!1),[v,L]=c.useState(!1),[T,B]=c.useState("off"),[U,x]=c.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=We({mobileExploreReferrer:"People"}),u=g((s=>de(s)));Be({isDataReady:u.fetchState==="Completed"});const P=g((s=>Le(s.classState,s.classListState))),j=g((s=>Te(s.userState,s.userRoleState,s.userListViewState,"manager"))),O=g((s=>Ae(s))),b=h?.companyId;c.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(G({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),E(!0),n(pe()))}),[p,y,w,n,u.uiState.mode,i]),c.useEffect((()=>{b!=null&&i&&n(ue(b,k))}),[b,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),L(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(G({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const R=()=>{I(!1),L(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(Ue,{analytics:Se,onLoad:s=>s.trackPageLoaded($e.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:D,managersListView:j,companyPassportView:O,classListView:P,companyId:b,mode:u.uiState.mode}):null,v===!0?a.jsx(Qe,{closeDrawerHandler:R,isEditPeopleDrawerOpen:v,managersListView:j,companyPassportView:O,classListView:P,companyId:b,mode:u.uiState.mode}):null,a.jsx(qe,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:d,signedInUser:y,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:b,shouldFetchClasses:k,classList:P,managersView:j,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(G({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=ze(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function Da(){const e=_e();return Re(e?.loggedInUserRole??[])?a.jsxs(ne,{children:[a.jsx(z,{path:"/",element:a.jsx(J,{})}),a.jsx(z,{path:"new",element:a.jsx(J,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(J,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(te,{})})]}):a.jsx(ne,{children:a.jsx(z,{path:"*",element:a.jsx(te,{})})})}export{Da as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-bqFl_SVp.js";import E from"./NotFoundScreen-Bjgm3Cgg.js";import{a as r}from"./sentry-Bj_fC7Ll.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as B,p as h}from"./core-Bnb5S7eF.js";import{eZ as O,Tm as b,bq as F,bn as N,ij as V,fB as q}from"./zeni-epic-state-GXytJkko.js";import{x as Y,z as I,a0 as Z,cY as $}from"./index-BzrRJ8WV.js";import"./mui-BAFflVdx.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-DGvHpWY7.js";import{M as H}from"./MobileAppDrawer-QMY9Y_6M.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="c0335fcd-deb3-4ce0-9be1-75a517b26323",e._sentryDebugIdIdentifier="sentry-dbid-c0335fcd-deb3-4ce0-9be1-75a517b26323")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),K=()=>{const e=_(),t=v(),c=Y(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),x=o?.userRole?.includes("bookkeeping_admin")??!1,k=N(l),j=C||x||k,d=r.useCallback(((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const y=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),D=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=G({mobileExploreReferrer:"Performance"});return Z({isDataReady:n?.fetchState==="Completed"}),j?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:y,onTimeRangeSelect:D,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(B,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1 +0,0 @@
1
- import{j as r}from"./liveblocks-bqFl_SVp.js";import F from"./NotFoundScreen-Bjgm3Cgg.js";import{a as p}from"./sentry-Bj_fC7Ll.js";import{h as E,g as x,u as C,j as u,N as D,n as k,o as O,p as b}from"./core-Bnb5S7eF.js";import{eZ as I,QE as g,QU as S,F_ as V,F7 as U,FZ as d,FQ as B,R5 as L,G0 as W}from"./zeni-epic-state-GXytJkko.js";import{z as N,a9 as T,bZ as Q,ag as _,bC as Z,b_ as z}from"./index-BzrRJ8WV.js";import"./mui-BAFflVdx.js";import{u as G,R as A}from"./ReimbursementApprovalRuleDetailScreen-m4OK96Pp.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]="e82c7b15-9d62-454f-8e52-736eb8f73244",e._sentryDebugIdIdentifier="sentry-dbid-e82c7b15-9d62-454f-8e52-736eb8f73244")}catch{}})();const y="reimbursement-approval-rule-update",K=k((function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}}),(function(e,o){const{navigate:s,location:a}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(L(!1))},onBackClick:()=>{_(a)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}}))(T(Q)),q=({isLoading:e})=>{const o=E(),s=x(),a=C(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((n=>n.remiSetupApproverViewState.fetchState)),l=u((n=>I(n))),c=u((n=>g(n))),v=u((n=>S(n).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&a(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),a(U(!0,!1,!1,!1)))}),[t,f,e,a]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),a(d())),o("./new"))}),[m,c,a]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(n,$,h)=>{n.endsWith(y)&&h.onApprovalRulesEventReceived(n)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(K,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",H=k((function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,a={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(a[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:a,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:a}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(L(!1))},onBackClick:()=>{_(a)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}}))(T(z)),J=()=>{const e=u((a=>I(a))),{isApprovalRulesV3Enabled:o,isLoading:s}=Z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(q,{isLoading:s})},M=({isLoading:e})=>{const o=E(),s=x(),a=C(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((n=>n.remiSetupApproverViewState.fetchState)),l=u((n=>I(n))),c=u((n=>g(n)));G();const v=u((n=>S(n).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&a(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),a(U(!0,!1,!1,!0)))}),[t,f,e,a]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),a(d())),o("./new"))}),[m,c,a]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(n,$,h)=>{n.endsWith(j)&&h.onApprovalRulesEventReceived(n)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(H,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(O,{children:[r.jsx(b,{path:"/",element:r.jsx(J,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(F,{})})]})}export{oe as R};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-bqFl_SVp.js";import{z as w,D as S,g as f,j as E,da as k,y as D,d as I}from"./index-BzrRJ8WV.js";import"./mui-BAFflVdx.js";import g from"./NotFoundScreen-Bjgm3Cgg.js";import{a as l}from"./sentry-Bj_fC7Ll.js";import{u as C,j as y,h as F,g as U,n as L,o as T,p as d,N as h}from"./core-Bnb5S7eF.js";import{eZ as _,U4 as b,U5 as p,w3 as P,fM as V,U6 as z,w1 as G}from"./zeni-epic-state-GXytJkko.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="338a8b8e-c103-40eb-80d6-dace087c4ea8",e._sentryDebugIdIdentifier="sentry-dbid-338a8b8e-c103-40eb-80d6-dace087c4ea8")}catch{}})();const M=L((function(e,t){const n=b(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(G())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(k),R=()=>{const e=C(),[t,n]=l.useState(!1),[i,s]=l.useState(!1),r=y((o=>_(o))),c=F(),j=U(),u=w.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=y((o=>b(o))),x=u?.firstName!=null?u.firstName:"User";l.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),l.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(S,{analytics:f,onLoad:o=>(N=>N.trackPageLoaded(E.Event.inviteEmailViewed))(o)}):null,a.jsx(M,{navigate:c,location:j,currentTenant:r,companyName:v,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=D(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(d,{path:"/",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(h,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(R,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-uvzfWzIm.js","assets/sentry-Bj_fC7Ll.js","assets/core-Bnb5S7eF.js","assets/zeni-epic-state-GXytJkko.js","assets/index-BzrRJ8WV.js","assets/mui-BAFflVdx.js","assets/analytics-fzE8ssbj.js","assets/utils-BKBg63lI.js","assets/withTransactionSidePanel-Dkd_LZWk.js","assets/useAskAiCfoHostNavButtonProps-DGvHpWY7.js","assets/TransactionDetailScreen-DrsbGFZL.js","assets/decodeURIComponentSafe-IB5WoVjO.js","assets/routePaths-iBgwsr_r.js","assets/NotFoundScreen-Bjgm3Cgg.js","assets/useInitialThreadRequest-BaClMW9n.js","assets/analyticsHelper-DjBKxGVt.js","assets/CompanyPassportScreen-6gSkpDjZ.js","assets/MobileAppDrawer-QMY9Y_6M.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BjjheFLZ.js","assets/FeaturePreviewScreen-DAIgYjjb.js","assets/index-Czu7h9lW.css","assets/BillPayRoutes-CAVdOoQ5.js","assets/AddressScreen-DnnIRcHN.js","assets/DomesticWireDetailScreen-C-5bE-Xl.js","assets/DrawerScreen-BL40QyXA.js","assets/SetupPagesScreen-CmqcI8Pt.js","assets/BusinessVerificationPageScreen-2yzgn_dq.js","assets/BillPayApprovalRoutes-D6R35wEu.js","assets/ReimbursementApprovalRuleDetailScreen-m4OK96Pp.js","assets/getLocaleForTenant-DBW7UyHp.js","assets/ReimbursementRoutes-CC1LJLL_.js","assets/ReimbursementApprovalRoutes-COdNraf8.js","assets/TransactionListRoutes-CWvS2zXP.js","assets/ZeniAccountStatementScreen-BQINO3hW.js","assets/SettingsRoutes-BW92o1e1.js","assets/accountMappingHelper-DvHt_faU.js","assets/useEmailConnectResultRefresh-C_fGcTHu.js","assets/QBOConnectionScreen-CBR0AZz1.js","assets/empty-BXrJtoVu.js","assets/index-B9FzYJpE.js","assets/url-CRSVA0N_.js","assets/index-gZ-YqOdE.js","assets/ReportsRoutes-BSnn6sLO.js","assets/ChargeCardRoutes-DwSiYhNV.js","assets/useChargeCardPusherEvents-Dl4aF9Gu.js","assets/PeopleRoutes-Br3c54zD.js","assets/ExpenseAutomationRoutes-CjC0R383.js","assets/TreasuryRoutes-BWDCDIwg.js","assets/useCashManagementBanner-DUUI_7bK.js","assets/VendorsRoutes-D5S2XjMm.js","assets/pathToGoBack-BX0vhbVE.js","assets/ZeniAccountRoutes-D0ZCvv0b.js","assets/AddressRoutes-f609Ttdc.js","assets/PandLWithForecastRoutes-CRmbuHlA.js","assets/CustomerOnboardingRoutes-D9rEFGOH.js","assets/TransactionDetailRoutes-BiZAv8du.js","assets/EntityDetailRoutes-CnjAhdib.js","assets/NotificationRoutes-DQXiQJ75.js","assets/PerformanceRoutes-D8GxMw7x.js","assets/RewardsRoutes-CzaqvCYC.js","assets/TaskRoutes-Dl6VRn1s.js","assets/TaskListScreen-YoPRLTQT.js","assets/AiCfoScreen-CjlYW9BA.js","assets/CardsAiCfoScreen-BqGSzxio.js"])))=>i.map(i=>d[i]);
2
- import{_ as t,bn as ls,eZ as us,fG as ds,fE as cs,go as ms,ft as _s,cW as Ee,cC as hs,fW as Es,cu as ps,bE as xs,bo as Rs,f_ as gs,v as Is,Mi as js,bs as Ts,Mj as As,bK as fs,bJ as ys,bt as Ds,cq as bs,Mk as Cs,Ml as vs,cS as Us,cV as ws,cU as Os,cB as Ps,cI as Fs,oi as pe,fC as xe,gy as Ls,g2 as Re,gv as ge,gw as Ie,g3 as ks}from"./zeni-epic-state-GXytJkko.js";import{j as e}from"./liveblocks-bqFl_SVp.js";import{a as O}from"./sentry-Bj_fC7Ll.js";import{u as Bs,h as Hs,i as Vs,g as Ss,j as G,l as je,N as u,o as Ns,p as a}from"./core-Bnb5S7eF.js";import{E as Ms,u as Zs,z as D,y as Gs,a as zs,c as $s,d as z,i as Ws,e as Ys,f as qs,L as F,O as Te,t as _,P as Js,g as X,l}from"./index-BzrRJ8WV.js";import"./mui-BAFflVdx.js";import{f as Ae}from"./analyticsHelper-DjBKxGVt.js";import{t as Ks}from"./getLocaleForTenant-DBW7UyHp.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},T=new o.Error().stack;T&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[T]="0211c531-4d6f-403c-a884-3cc48089dd52",o._sentryDebugIdIdentifier="sentry-dbid-0211c531-4d6f-403c-a884-3cc48089dd52")}catch{}})();const Qs={dashboard:()=>t((()=>import("./DashboardRoutes-uvzfWzIm.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>t((()=>import("./BillPayRoutes-CAVdOoQ5.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-CC1LJLL_.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t((()=>import("./TransactionListRoutes-CWvS2zXP.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-BW92o1e1.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t((()=>import("./ReportsRoutes-BSnn6sLO.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-DwSiYhNV.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t((()=>import("./PeopleRoutes-Br3c54zD.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-CjC0R383.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-BWDCDIwg.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t((()=>import("./VendorsRoutes-D5S2XjMm.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-D0ZCvv0b.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l((()=>t((()=>import("./ReportsRoutes-BSnn6sLO.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),st=l((()=>t((()=>import("./AddressRoutes-f609Ttdc.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),tt=l((()=>t((()=>import("./PeopleRoutes-Br3c54zD.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),nt=l((()=>t((()=>import("./PandLWithForecastRoutes-CRmbuHlA.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),at=l((()=>t((()=>import("./CustomerOnboardingRoutes-D9rEFGOH.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),ot=l((()=>t((()=>import("./VendorsRoutes-D5S2XjMm.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),rt=l((()=>t((()=>import("./TransactionDetailRoutes-BiZAv8du.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),fe=l((()=>t((()=>import("./EntityDetailRoutes-CnjAhdib.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),it=l((()=>t((()=>import("./DashboardRoutes-uvzfWzIm.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))),ye=l((()=>t((()=>import("./BillPayRoutes-CAVdOoQ5.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),lt=l((()=>t((()=>import("./SettingsRoutes-BW92o1e1.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),De=l((()=>t((()=>import("./ReimbursementRoutes-CC1LJLL_.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),ut=l((()=>t((()=>import("./ZeniAccountRoutes-D0ZCvv0b.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),dt=l((()=>t((()=>import("./TreasuryRoutes-BWDCDIwg.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),ct=l((()=>t((()=>import("./TransactionListRoutes-CWvS2zXP.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),mt=l((()=>t((()=>import("./ChargeCardRoutes-DwSiYhNV.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),_t=l((()=>t((()=>import("./NotificationRoutes-DQXiQJ75.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),ht=l((()=>t((()=>import("./PerformanceRoutes-D8GxMw7x.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),Et=l((()=>t((()=>import("./ExpenseAutomationRoutes-CjC0R383.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),pt=l((()=>t((()=>import("./RewardsRoutes-CzaqvCYC.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),xt=l((()=>t((()=>import("./TaskRoutes-Dl6VRn1s.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),Rt=l((()=>t((()=>import("./AiCfoScreen-CjlYW9BA.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),be=l((()=>t((()=>import("./CardsAiCfoScreen-BqGSzxio.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),C=l((()=>t((()=>import("./NotFoundScreen-Bjgm3Cgg.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),gt=l((()=>t((()=>import("./TaskListScreen-YoPRLTQT.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function St({setTenantEmailDomain:o}){const T=Bs(),V=Hs(),{tenantEmailDomain:i}=Vs(),L=Ms().mode,{setLoading:U,clearAllLoading:v,clearLoading:k}=Zs(),A=D.getSignedInUserTenant(i)?.tenantId,I=D.getSignedInUser(),se=ls(I),$=Ss(),[B,Oe]=O.useState(!1),r=G((n=>us(n))),{useFeatureGate:N}=Gs(),M=zs(),te=$s(),Pe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Fe=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Le}=N(z.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(z.isDebitCardFeatureEnabled),f=G((n=>n.tenantState.fetchState)),j=G((n=>n.tenantState.activeTenantFetchState.fetchState)),h=j==="Completed"||f==="Completed"?ds(ne,r):void 0,J=j==="Completed"||f==="Completed"?cs(r):void 0,ke=Ws(r,Le,ne),{isCardsHidden:Be}=Ys(r?.tenantId),He=!ke||!!Be,{isFeatureEnabled:Ve}=N(z.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(z.isAiCfoFileUploadEnabled),W=G((n=>ms(n)));if(i!=null){const n=D.getSignedInUserTenant(i);I!=null&&n!=null&&Ae(I,r,L)}const Z={tenantId:A,userId:I?.userId,sessionId:I?.zeniSessionId},ae=_s(),E=qs(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=hs(E?.loggedInUserRoleMap),oe=je("/:tenantEmailDomain/onboarding/*")!==null,Q=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G((n=>Z.tenantId!=null?Es(n,Z.tenantId):void 0));O.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),O.useEffect((()=>{if(Q!=null&&A!=null){const n=Q.params.selectedPeriod;if(n!=null){const y=n.split("-");if(y.length===2){const d=ps(Number(y[0])),s=Number(y[1]),c=xs(`01-${d<10?`0${d}`:d}-${s}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=Rs();c.isAfter(S,"month")===!1?T(gs(A,{month:d,year:s})):V("./month_end_close_checks/review")}}}}),[Q,A]),O.useEffect((()=>{B||(Oe(!0),U(F.TENANT_FETCHING))}),[B,Z,ae,I,T,D]),O.useLayoutEffect((()=>{!Is(ae,Z)&&D.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,y,d,s){if(xe(y?.userId,y?.zeniSessionId,n.tenantId),d(Ls(!0)),d(Re(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=D.getSignedInUserTenantWithId(n.tenantId);s&&Te.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()})(Z,I,T,Me))}),[A]),O.useEffect((()=>{D.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,y,d,s,c,S,H){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(Y&&os){H(Re(s));const q=D.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(ge(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Ie(c.userId,s)))}else Y&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(ge(c.userId,s))),Y&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Ie(c.userId,s)));if(Y){X.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(y==="Completed"||y==="Error");n==="Completed"||y!=="Not-Started"&&y!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),H(ks(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(pe(c.userId,c.zeniSessionId)))}})(f,j,r,A,I,U,T))}),[A,j]),O.useEffect((()=>{D.isSignedIn()&&f==="Completed"&&W.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),D.saveSignedInUserTenants(js(W.tenantsBaseInOrder)),I!=null&&Ae(I,r,L,void 0,W.tenantsBaseInOrder))}),[W,f,r,I]),O.useEffect((()=>{j==="In-Progress"&&U(F.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&A!=null?(v(),_.markActiveTenantFetchCompleted(A)):j==="Error"&&A!=null&&(_.markActiveTenantFetchFailed(A),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),f!=="Completed"&&f!=="Error"||(f==="Completed"?_.markAllTenantsFetchCompleted():f==="Error"&&_.markAllTenantsFetchFailed())}),[j,f,A,B]);const re=O.useRef(!1);O.useEffect((()=>{!re.current&&j==="Completed"&&B&&(re.current=!0,(function(n=Xs,y=3e3){setTimeout((()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Qs[c];S!=null?S().then((()=>ee((()=>d(s+1))))).catch((()=>ee((()=>d(s+1))))):d(s+1)};ee((()=>d(0)))}),y)})())}),[j,B]);const w=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Ze}=N(z.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&Ee(r.userRole),ie=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,le=!He&&!w,$e=As(E?.loggedInUserRoleMap),We=r.externalConnections?.accounting[0]?.isValid,Ye=r.externalConnections?.fetchState==="Completed",ue=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,ce=de&&fs(E?.loggedInUserRoleMap),me=Pe&&!w,qe=Fe&&!w,Je=ie&&ys(E?.loggedInUserRoleMap),Ke=le&&Ds(E?.loggedInUserRoleMap),Qe=me&&bs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=Us(E?.loggedInUserRoleMap),ts=ws(E?.loggedInUserRoleMap),ns=Os(E?.loggedInUserRoleMap),p=Ps(E?.loggedInUserRoleMap),x=Fs(E?.loggedInUserRoleMap),_e=ie&&p,he=de&&x,R=me&&ss,g=qe&&ts,m=le&&ns,as=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Ne===!0||$e===!0||Xe===!0||es===!0;return D.isSignedIn()?A==null?f==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&f!=="In-Progress"&&T(pe(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||f==="Completed"?(ue===!0||se&&!oe)&&Ye&&We!==!0&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!B||ue!==!1||oe||se?B&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(It,{isDashboardAccess:P,showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||Ge||ze?e.jsx(rt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(ct,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(fe,{entityType:"customer"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(fe,{entityType:"vendor"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(gt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(xt,{})}),e.jsx(a,{path:"address/*",element:Je||ce||Qe||Ke?e.jsx(st,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:R?e.jsx(ut,{}):e.jsx(C,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(C,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(Et,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Se?e.jsx(ot,{}):e.jsx(C,{})}),e.jsx(a,{path:"bill/*",element:_e?e.jsx(ye,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:_e?e.jsx(ye,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:he?e.jsx(De,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:he?e.jsx(De,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Ve?e.jsx(lt,{hasAdminLevelAccess:ce}):e.jsx(C,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(be,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(be,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(C,{})}),e.jsx(a,{path:"rewards/*",element:Ze?e.jsx(pt,{}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(Rt,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"*",element:e.jsx(C,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const It=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(U===!0){if(T)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):V?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},b=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:V,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:v})=>{if(L===!0){if(o)return e.jsx(ve,{tenantEmailDomain:v});if(i)return e.jsx(Ce,{tenantEmailDomain:v});if(U)return e.jsx(Ue,{tenantEmailDomain:v})}return o?e.jsx(ve,{tenantEmailDomain:v}):i?e.jsx(Ce,{tenantEmailDomain:v}):U?e.jsx(Ue,{tenantEmailDomain:v}):T?e.jsx(Tt,{tenantEmailDomain:v}):V?e.jsx(jt,{tenantEmailDomain:v}):e.jsx(C,{})},jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),Ce=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{b as FallBackRoute,St as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-bqFl_SVp.js";import{a as u,b as M,q as T}from"./sentry-Bj_fC7Ll.js";import{u as A,h as z,j as l,g as D,N as O,n as j}from"./core-Bnb5S7eF.js";import{u as P,z as s,E as F,g as w,O as _,h as B,j as N,k as Z,m as q,J,n as v}from"./index-BzrRJ8WV.js";import{eZ as V,Mh as $,Mi as W,fC as G,g2 as H,Mn as K,gs as Q,cZ as R,Mo as b,Mp as X,Mq as Y,bZ as y}from"./zeni-epic-state-GXytJkko.js";import"./mui-BAFflVdx.js";import{u as ee}from"./useDeviceId-CnUmsNEA.js";import{f as te}from"./analyticsHelper-DjBKxGVt.js";import{t as ne}from"./getLocaleForTenant-DBW7UyHp.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="4e43b909-474d-495e-992f-3f8510e3af9e",t._sentryDebugIdIdentifier="sentry-dbid-4e43b909-474d-495e-992f-3f8510e3af9e")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{T({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Y({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(X(n,a)))},clearSignInError:()=>{t(b())}}}))(J),ae=M.memo(ie);function ve({setTenantEmailDomain:t}){const i=A(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>V(e))),I=l((e=>$(e))),m=D(),E=F().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(W(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,E,void 0,I.tenantsInOrder),Q().then((()=>{const e=q();e!=null&&B(e)})),setTimeout((()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))}),2e3))}),[S,p,L,o,r,I,E,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(Z,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-bqFl_SVp.js";import{a as i}from"./sentry-Bj_fC7Ll.js";import{u as c,g as d,N as u}from"./core-Bnb5S7eF.js";import{z as a,g as n,j as m,B as g}from"./index-BzrRJ8WV.js";import{gx as p,MF as y}from"./zeni-epic-state-GXytJkko.js";import{n as b}from"./mui-BAFflVdx.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="a2a07e3a-3ae0-4946-998a-e3249401b332",e._sentryDebugIdIdentifier="sentry-dbid-a2a07e3a-3ae0-4946-998a-e3249401b332")}catch{}})();function L(){const e=c(),t=d(),r=i.useRef(!1),l=a.isSignedIn(),o=t.state?.message==="logout"||l;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(p()),y(),n.trackLogout(m.Event.logoutSuccess),n.resetUserIdentity(),a.clearAll()}catch(f){console.error("Error during sign out:",f)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(g,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;export{L as default};
@@ -1,9 +0,0 @@
1
- import{j as u}from"./liveblocks-bqFl_SVp.js";import{a as b}from"./sentry-Bj_fC7Ll.js";import{h as N,u as v,g as K,j as G,i as _,n as z}from"./core-Bnb5S7eF.js";import{z as U,y as O,d as p,a0 as W,D as Z,g as q,j as M,dd as V,w as g,v as Q}from"./index-BzrRJ8WV.js";import{eZ as H,Ub as F,Jq as y,Uc as R,U7 as X,IO as E,Ud as Y,IW as I,Ig as aa,Jr as S,Ue as B,fB as ea,Jh as ta,Jm as sa,J9 as oa,J7 as w,Jn as na,J4 as ia,Uf as la,Ug as ra,Uh as ca,Ui as ka,Uj as m,ek as da,Uk as ua,Ul as pa}from"./zeni-epic-state-GXytJkko.js";import{n as ma}from"./mui-BAFflVdx.js";import{u as Ta}from"./useAskAiCfoHostNavButtonProps-DGvHpWY7.js";import{M as ga}from"./MobileAppDrawer-QMY9Y_6M.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="53cc8eba-9b3c-40ec-a5ac-39d618e34e8e",e._sentryDebugIdIdentifier="sentry-dbid-53cc8eba-9b3c-40ec-a5ac-39d618e34e8e")}catch{}})();const fa=ma.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,ha=z((function(e,t){const o=F(e,t.isTaskTemplatesEnabled),{taskGroupId:c}=t,n=c!=null&&c!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map((l=>({...l,tasks:l.tasks.filter((a=>a.taskGroupIds.includes(c)))}))).filter((l=>l.tasks.length>0))}:o,d=X(e),i=U.isZeniUser();return{taskListView:n,tagListView:d,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}}),(function(e,t){const{navigate:o,currentTenant:c,location:n,isTaskTemplatesEnabled:d}=t,{tenantEmailDomain:i}=c,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=L(i,a),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k}})},onReloadTasks:()=>{e(y(!0,d))},onTabChange:a=>{e(ka(a))},onParentTaskClick:a=>{const s=L(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(w(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(i,t.localData.defaultTaskGroupId),s=g(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ca({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(y(!0,d))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=Q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(R({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(w(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=Da(l,a);e(E({taskDetailLocalData:s}));const k=C(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),f=g(n.state?.pathnameStackToGoBack,n.pathname);o(k,{state:{pathnameStackToGoBack:f,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(sa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(ta(a,s))},onTimeSpentUpdate:(a,s)=>{e(S({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(S({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(E({taskDetailLocalData:{...Y,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(i,t.localData.defaultTaskGroupId),k=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:k,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}}))(V);function Ja(){const e=N(),t=v(),o=K(),c=U.getSignedInUser(),n=G((r=>H(r))),{taskGroupId:d}=_(),{useFeatureGate:i}=O(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:k}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:f}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:x}=i(p.isTaskRecurringParentEnabled),[A,j]=b.useState(!1),h=G((r=>F(r,l))),D=G((r=>r.taskGroupState)),T=h.fetchState,{isAiCfoAccessEnabled:P,onAskAiCfoClick:J}=Ta({mobileExploreReferrer:"Task Checklist"});if(W({isDataReady:T==="Completed"}),b.useEffect((()=>{t(y(!1,l))}),[n?.tenantId,t,l]),b.useEffect((()=>{T==="Completed"&&t(R({taskGroupById:D.taskGroupById}))}),[T,D.taskGroupById]),c==null)throw Error("Can't access task list page without signing in...");return u.jsxs(u.Fragment,{children:[T==="Completed"?u.jsx(Z,{analytics:q,onLoad:r=>($=>$.trackPageLoaded(M.Event.taskListPage))(r)}):null,u.jsxs(fa,{children:[u.jsx(ga,{isAppContentDrawerOpen:A,handleDrawerToggle:r=>{j(r)}}),u.jsx(ha,{location:o,navigate:e,currentTenant:n,taskGroupId:d,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:k,isTaskGroupAssigneesEnabled:f,isTaskRecurringParentEnabled:x,isAiCfoAccessEnabled:P,onAskAiCfoClick:J})]})]})}const L=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,Da=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=da(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=ua(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=pa(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{Ja as default};
@@ -1,9 +0,0 @@
1
- import{j as n}from"./liveblocks-bqFl_SVp.js";import se from"./NotFoundScreen-Bjgm3Cgg.js";import{a as c}from"./sentry-Bj_fC7Ll.js";import{h as _,u as M,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-Bnb5S7eF.js";import{It as O,Iw as le,Iq as de,eZ as J,U7 as K,IK as H,In as pe,Je as ue,J7 as ke,U8 as W,U9 as N,Ij as me,Ig as fe,rY as ge,rM as he,le as Ie,IE as Se,Ua as Te,IV as be,IS as Ee,Iz as Ce,IP as Ge,IO as De}from"./zeni-epic-state-GXytJkko.js";import{z as G,db as xe,x as je,y as ye,d as b,v as X,w as v,D as we,g as V,j as ve,dc as Re,n as q,au as Ue}from"./index-BzrRJ8WV.js";import{n as Fe}from"./mui-BAFflVdx.js";import{u as Be}from"./useInitialThreadRequest-BaClMW9n.js";import{M as Pe}from"./MobileAppDrawer-QMY9Y_6M.js";import Le from"./TaskListScreen-YoPRLTQT.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.js";import"./useAskAiCfoHostNavButtonProps-DGvHpWY7.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]="8372fd9f-a7de-41d4-a2ff-f0194cc417e4",e._sentryDebugIdIdentifier="sentry-dbid-8372fd9f-a7de-41d4-a2ff-f0194cc417e4")}catch{}})();function $e(){const e=_(),t=M(),s=G.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g((o=>o.cannedResponsesState)),l=c.useCallback((()=>{t(O())}),[t]),k=c.useCallback(((o,h,I)=>{t(le({name:o,content:h,cannedResponseId:I}))}),[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(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,Z=[];const ze=re((function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=J(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=G.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=K(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${q.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:G.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=S,Z=Object.values(S)),Z),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Ue.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${q.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,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(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=X(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(H(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(O())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}}))(Re);function w(){const e=_(),t=M(),s=ne(),u=je(),{taskId:r,taskGroupId:d}=oe(),l=g((i=>J(i))),k=Be(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,S]=c.useState(!1),[p,Y]=c.useState(!1),[U,Q]=c.useState(!1),[F,ee]=c.useState(!1),[B,j]=c.useState(!1),T=c.useRef(!1),C=g((i=>i.taskListState.updateTasksFetchState.fetchState)),P=g((i=>K(i))),L=g((i=>i.taskGroupViewState.fetchState));c.useEffect((()=>{p||(Y(!0),t(H(!1,r)))}),[p,t]),c.useEffect((()=>{U||P.fetchState==="Completed"||(Q(!0),t(pe()))}),[U,t,P.fetchState]),c.useEffect((()=>{F||L==="Completed"||(ee(!0),t(ue()))}),[F,t,L]);const ae=c.useCallback((()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),j(!0))}),[t,r]);c.useEffect((()=>{if(B)if(C!=="In-Progress"){if(T.current){if(C==="Error")return j(!1),void(T.current=!1);if(C==="Completed"){j(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0}),[B,C,l,s,e]);const $=g((i=>W(i,r))),y=$.fetchState,z=G.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=R(i),te=v(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:V,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Pe,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(ze,{analytics:V,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:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ne=Fe.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,R=e=>`/${e}/tasks`;function ia(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(w,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(w,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(w,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-bqFl_SVp.js";import{a as f}from"./sentry-Bj_fC7Ll.js";import{t as u,u as b,j as h,N as y}from"./core-Bnb5S7eF.js";import{MC as I,fC as w,BF as j}from"./zeni-epic-state-GXytJkko.js";import{z as l,B as x,K as S,M as C}from"./index-BzrRJ8WV.js";import{n as p}from"./mui-BAFflVdx.js";import"./recharts-B3FaT6ex.js";import"./analytics-fzE8ssbj.js";import"./plaid-Il6Pn-tK.js";import"./dnd-BclBZkmc.js";import"./stripe-cKAAJElX.js";import"./lottie-CosVBOrn.js";import"./lexical-DbVLnI8g.js";import"./pdf-Ba7sOjY6.js";import"./utils-BKBg63lI.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]="48749bb4-f3ca-4da9-bb80-9be8d5b5b22d",e._sentryDebugIdIdentifier="sentry-dbid-48749bb4-f3ca-4da9-bb80-9be8d5b5b22d")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",c=e.get("profileId")??"",[n,g]=f.useState(!1),a=b(),i=h((m=>I(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(g(!0),a(j(t,c,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(E,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},D=p.div`
2
- display: flex;
3
- width: 100%;
4
- height: 100vh;
5
- flex-direction: row;
6
- justify-content: center;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey5};
9
- `,E=p(C.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{W as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-bqFl_SVp.js";import{a as m}from"./sentry-Bj_fC7Ll.js";import{h as x,u as v,g as B,i as L,j as p}from"./core-Bnb5S7eF.js";import{LA as s,Lz as $,RY as j,eZ as z,RZ as C}from"./zeni-epic-state-GXytJkko.js";import{p as E,au as g,E as T,z as D,B as P,cg as N,v as U}from"./index-BzrRJ8WV.js";import{n as _}from"./mui-BAFflVdx.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]="14cd96fa-36bf-4863-a8e4-bcf04173faec",e._sentryDebugIdIdentifier="sentry-dbid-14cd96fa-36bf-4863-a8e4-bcf04173faec")}catch{}})();const Z=_.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;function q(){const e=x(),n=v(),d=E(),f=B();let{accountId:a}=L(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,h]=m.useState(!1),y=T();m.useEffect((()=>{u||(h(!0),n($(a??"",!1)))}),[u,n]);const o=p((t=>j(t,a??""))),b=()=>{const t=U(f.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=D.getSignedInUser(),r=p((t=>z(t))),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=C(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}}):i.jsx(Z,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:b,authParams:I,downloadEndPoint:l})})}export{q as Z};
@@ -1 +0,0 @@
1
- import{cN as d,cO as m,Mu as l,Mv as _}from"./zeni-epic-state-GXytJkko.js";import{g as u}from"./index-BzrRJ8WV.js";import"./sentry-Bj_fC7Ll.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]="3200428d-49ad-44f2-8161-a4e46a862d0d",e._sentryDebugIdIdentifier="sentry-dbid-3200428d-49ad-44f2-8161-a4e46a862d0d")}catch{}})();const h=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},b=(e,a,o,c,s)=>{const r=[],i=[];let t=[];s?.forEach((n=>{r.push(n.companyId),i.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:c,$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?i:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>d(e,a)?"bill_pay":m(e,a)?"reimbursement":l(e,a)?"zeni_accounts":_(e,a)?"charge_cards":"bill_pay",w=e=>Object.values(e.allocation).map(String).join("-");export{w as a,b as f,g,h as t};