@zeniai/web-app-ui 5.3.61-dev → 5.3.62-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 (139) hide show
  1. package/dist/assets/{AccountMappingScreen-Dt4x9DJz.js → AccountMappingScreen-DwM3_WTC.js} +2 -2
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-BfyrJWDJ.js → ActualMatchingMatchDetailScreen---3NQIlW.js} +1 -1
  3. package/dist/assets/AddressRoutes-CRWje5aU.js +1 -0
  4. package/dist/assets/AddressScreen-DwDn6adU.js +9 -0
  5. package/dist/assets/{AiCfoScreen-SBmgGufP.js → AiCfoScreen-CmI1WP3p.js} +1 -1
  6. package/dist/assets/{AppDrawer-D7FI4GcX.js → AppDrawer-CqAnDatC.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-BxCZdf21.js → BillPayApprovalRoutes-uF3lLPXa.js} +1 -1
  8. package/dist/assets/BillPayRoutes-CxGXv0Eb.js +119 -0
  9. package/dist/assets/{BusinessVerificationPageScreen-B20TVwus.js → BusinessVerificationPageScreen-CWJBny4J.js} +2 -2
  10. package/dist/assets/{CardsAiCfoScreen-DkokQGnk.js → CardsAiCfoScreen-DTmIk225.js} +1 -1
  11. package/dist/assets/ChargeCardRoutes-CBA-C6S5.js +71 -0
  12. package/dist/assets/{CompanyPassportScreen-BEG9__1k.js → CompanyPassportScreen-C0r5_u0C.js} +1 -1
  13. package/dist/assets/ConnectionAuthScreen-D97ZGKWy.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-DREpIR3e.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-BFFEQyjG.js → CustomerOnboardingRoutes-BFK8USjA.js} +3 -3
  16. package/dist/assets/DashboardRoutes-CIiFmVuR.js +20 -0
  17. package/dist/assets/{DefaultTenantHome-CMvE7WXj.js → DefaultTenantHome-BWhhfpNZ.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-B2YgkOu5.js → DomesticWireDetailScreen-C8g5HYbF.js} +4 -4
  19. package/dist/assets/{DrawerScreen-I5-Ak-b_.js → DrawerScreen-jGeXohet.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-BPqa4e5a.js → EntityDetailRoutes-DDbPZyaE.js} +1 -1
  21. package/dist/assets/ExpenseAutomationRoutes-BhSlFN1-.js +38 -0
  22. package/dist/assets/{FeaturePreviewScreen-v5dVXn4p.js → FeaturePreviewScreen-t-KcIePh.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-CsqGaYGM.js → HubSpotOAuthCallbackScreen-B9Xsd5UE.js} +1 -1
  24. package/dist/assets/{InboxNotificationsProvider-B4UF_uUg.js → InboxNotificationsProvider-DcarX1j5.js} +1 -1
  25. package/dist/assets/InvoicingRoutes-BQHOoyRc.js +2 -0
  26. package/dist/assets/{MagicLinkRoutes-DDza_62u.js → MagicLinkRoutes-CfUJpVA_.js} +4 -4
  27. package/dist/assets/{MagicLinkSignInScreen-DGzxNaiE.js → MagicLinkSignInScreen-BR70G8WN.js} +1 -1
  28. package/dist/assets/MobileAppDrawer-DqgtjBKX.js +1 -0
  29. package/dist/assets/NotFoundScreen-C2GrPpNy.js +1 -0
  30. package/dist/assets/{NotificationRoutes-i3qnEWcR.js → NotificationRoutes-C1V1-m3K.js} +1 -1
  31. package/dist/assets/{OAuthConsentScreen-CRExXXMv.js → OAuthConsentScreen-UVKKdhYW.js} +1 -1
  32. package/dist/assets/PandLWithForecastRoutes-x9MBz-SJ.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-D0Hr5oRB.js → PaymentLinkScreen-BtszXnNs.js} +9 -9
  34. package/dist/assets/{PeopleRoutes-CypmG1ct.js → PeopleRoutes-By-929Rc.js} +3 -3
  35. package/dist/assets/PerformanceRoutes-DwUVercL.js +1 -0
  36. package/dist/assets/{Preview-Co3i0Xrb.js → Preview-Dxr01VGI.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-BiN0lu_W.js → QBOConnectionScreen-Chdjbcg8.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRoutes-ryr0mHPH.js → ReimbursementApprovalRoutes-DVM8rE5F.js} +1 -1
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CRU8C8RZ.js → ReimbursementApprovalRuleDetailScreen-Bf1LI70e.js} +1 -1
  40. package/dist/assets/ReimbursementRoutes-ByU4nWbt.js +68 -0
  41. package/dist/assets/ReportsRoutes-Be1H67SI.js +1 -0
  42. package/dist/assets/RewardsRoutes-iweGs61q.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-UKD1lb2-.js → ScheduleDetailsPrepaidExpensesScreen-HIrqgD7A.js} +4 -4
  44. package/dist/assets/{ScreenRoutes-6zCS0eXm.js → ScreenRoutes-CFuAOQvL.js} +2 -2
  45. package/dist/assets/{SettingsRoutes-Bh4g9wCj.js → SettingsRoutes-CYdVWZYv.js} +5 -5
  46. package/dist/assets/{SetupPagesScreen-CdpIgBzw.js → SetupPagesScreen-BccJSzRN.js} +5 -5
  47. package/dist/assets/SignInScreen-DM0sUU51.js +1 -0
  48. package/dist/assets/SignOutScreen-Bs1NyDBL.js +9 -0
  49. package/dist/assets/{TaskListScreen-h6ryhshy.js → TaskListScreen-DQj6h_q_.js} +2 -2
  50. package/dist/assets/{TaskRoutes-BiQOVouS.js → TaskRoutes-DY92MrHK.js} +1 -1
  51. package/dist/assets/TransactionDetailRoutes-BFj2-oES.js +1 -0
  52. package/dist/assets/TransactionDetailScreen-fc6wRDCa.js +5 -0
  53. package/dist/assets/TransactionListRoutes-DoEWtZb8.js +1 -0
  54. package/dist/assets/TreasuryRoutes-BwZlVh2U.js +37 -0
  55. package/dist/assets/{VendorsRoutes-C9tsCt7G.js → VendorsRoutes-rWAhbgUX.js} +1 -1
  56. package/dist/assets/{WiseConfirmationScreen-XbaBW0oW.js → WiseConfirmationScreen-twAmgAST.js} +1 -1
  57. package/dist/assets/ZeniAccountRoutes-BqSVR2HC.js +57 -0
  58. package/dist/assets/{ZeniAccountStatementScreen-L3XK5pKW.js → ZeniAccountStatementScreen-xKZWX655.js} +1 -1
  59. package/dist/assets/{accountMappingHelper-Ci74NLEW.js → accountMappingHelper-DpfYWNe6.js} +1 -1
  60. package/dist/assets/{analytics-8lQ_GaR7.js → analytics-CiEh1qKr.js} +1 -1
  61. package/dist/assets/{analyticsHelper-C6SU-53H.js → analyticsHelper-DHPcRAai.js} +1 -1
  62. package/dist/assets/{core-B-8b0iz9.js → core-Caq7Zbsp.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-hAviH84T.js → decodeURIComponentSafe-DmjyT4t5.js} +1 -1
  64. package/dist/assets/{dnd-CtOxA7uX.js → dnd-DwckO6rX.js} +1 -1
  65. package/dist/assets/{empty-CyiOIGJw.js → empty-CviwvzhB.js} +1 -1
  66. package/dist/assets/{empty-ZUR8mjP1.js → empty-Dl3LsHNf.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-Dch9mr3K.js → emptyVideoElement-0ADxBh21.js} +1 -1
  68. package/dist/assets/{epic-C_YIXfJm.js → epic-DqqOk9a9.js} +1 -1
  69. package/dist/assets/{expenseAutomationHelper-BzOPc0En.js → expenseAutomationHelper-B83Qa5Jl.js} +1 -1
  70. package/dist/assets/{getLocaleForTenant-D57C4sYC.js → getLocaleForTenant-YgJPw-1W.js} +1 -1
  71. package/dist/assets/{index-BUsi93tT.js → index-B3LhL1WI.js} +2 -2
  72. package/dist/assets/{index-DeS-5gfC.js → index-BLBexBOn.js} +1 -1
  73. package/dist/assets/{index-CzpjeHcU.js → index-BggnOuo1.js} +1 -1
  74. package/dist/assets/{index-CgYr_9vs.js → index-Bi5Vnzzf.js} +1 -1
  75. package/dist/assets/{index-Ce-G0Vp2.js → index-BsIiLcaT.js} +1 -1
  76. package/dist/assets/{index-DuxR1XDX.js → index-DOXJLxdR.js} +23226 -23221
  77. package/dist/assets/{index-haVo7C6B.js → index-DZj1fENq.js} +1 -1
  78. package/dist/assets/{index-b65XjN06.js → index-De1Gw5gW.js} +1 -1
  79. package/dist/assets/{lexical-BVt4M34U.js → lexical-mmp2B1vq.js} +1 -1
  80. package/dist/assets/{liveblocks-BjcYyeQ6.js → liveblocks-CIxx6Ub6.js} +1 -1
  81. package/dist/assets/{lottie-BdAYiWcR.js → lottie-CrKh4Q_r.js} +1 -1
  82. package/dist/assets/{mui-C33Oegsm.js → mui-DI0hUuFr.js} +1 -1
  83. package/dist/assets/{pathToGoBack-Bgu6njoM.js → pathToGoBack-Ch5lrOj1.js} +1 -1
  84. package/dist/assets/{pdf-BkfulyEw.js → pdf-BlhN83fm.js} +3 -3
  85. package/dist/assets/{pdf-lib-D8o-uP9K.js → pdf-lib-WBpN-CHj.js} +1 -1
  86. package/dist/assets/{plaid-Bt28AVCt.js → plaid-CXvI7t9H.js} +1 -1
  87. package/dist/assets/{pusher-BWEmmbE9.js → pusher-BZAjVztW.js} +1 -1
  88. package/dist/assets/{react-BAH__mX9.js → react-BHfk4QRe.js} +1 -1
  89. package/dist/assets/{react-CIEK2Ei-.js → react-BqA23JAy.js} +1 -1
  90. package/dist/assets/{react-Dqb011PB.js → react-BsygV86H.js} +1 -1
  91. package/dist/assets/{react-B7GqIpoL.js → react-XoZ7aD8C.js} +1 -1
  92. package/dist/assets/{react-DT9gMpbF.js → react-rmAoHvXj.js} +1 -1
  93. package/dist/assets/{react-Ls8UDl46.js → react-tooGqts4.js} +1 -1
  94. package/dist/assets/{recharts-DkYxIsLi.js → recharts-DKmpCGIA.js} +1 -1
  95. package/dist/assets/{routePaths-B1syYHWh.js → routePaths-C1OqXYGB.js} +1 -1
  96. package/dist/assets/{sentry-DZ9rNYfw.js → sentry-BCPOyc0G.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-Te2Zqy4u.js → stripSplatSuffix-Dmnnw5Oe.js} +1 -1
  98. package/dist/assets/{url-BjdrSaU1.js → url-CdxI2rEH.js} +1 -1
  99. package/dist/assets/{url-DY2r7CPa.js → url-JduagIhH.js} +1 -1
  100. package/dist/assets/{useActualMatchingMatchDetail-DZnxtuQj.js → useActualMatchingMatchDetail-6t8vcRTI.js} +1 -1
  101. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-SBKf0Pu3.js → useAiCfoDashboardSuggestedQuestionsChips-BO7_rPaJ.js} +1 -1
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-BvhP40c_.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-DmcXit2D.js → useChargeCardPusherEvents-2nVivR1x.js} +1 -1
  104. package/dist/assets/{useDeviceId-gFU5q5zf.js → useDeviceId-2NJBbYPM.js} +1 -1
  105. package/dist/assets/{useEmailConnectResultRefresh-BwFVhfcX.js → useEmailConnectResultRefresh-QqukN5jp.js} +1 -1
  106. package/dist/assets/{useInitialThreadRequest-Chu-ipGI.js → useInitialThreadRequest-uu8NipM7.js} +1 -1
  107. package/dist/assets/useTaskManagerAccess-DxrmaJfc.js +1 -0
  108. package/dist/assets/{useTaskManagerPusherEvents-BnGLCsCG.js → useTaskManagerPusherEvents-D5Hm7um3.js} +1 -1
  109. package/dist/assets/{utils-D3rZq_G4.js → utils-rX2IEvjD.js} +1 -1
  110. package/dist/assets/withTransactionSidePanel-C1wVwRW0.js +25 -0
  111. package/dist/assets/{zeni-epic-state-95zxmizy.js → zeni-epic-state-DROyxOLw.js} +3 -3
  112. package/dist/index.html +1 -1
  113. package/package.json +3 -3
  114. package/dist/assets/AddressRoutes-DfkTMfYF.js +0 -1
  115. package/dist/assets/AddressScreen-DvJ6yyMx.js +0 -9
  116. package/dist/assets/BillPayRoutes-07S7DRSx.js +0 -119
  117. package/dist/assets/ChargeCardRoutes-BO6dVldC.js +0 -71
  118. package/dist/assets/ConnectionAuthScreen-C_s5VCbI.js +0 -11
  119. package/dist/assets/CustomerOnboardingAuthScreen-DFMNQmWy.js +0 -1
  120. package/dist/assets/DashboardRoutes-B4NxbMLL.js +0 -20
  121. package/dist/assets/ExpenseAutomationRoutes-BW9gVxz9.js +0 -38
  122. package/dist/assets/InvoicingRoutes-CxKyyTQc.js +0 -2
  123. package/dist/assets/MobileAppDrawer-0TaE2Qid.js +0 -1
  124. package/dist/assets/NotFoundScreen-BatgS8le.js +0 -1
  125. package/dist/assets/PandLWithForecastRoutes-DiipWbFp.js +0 -1
  126. package/dist/assets/PerformanceRoutes-eA0QwQYt.js +0 -1
  127. package/dist/assets/ReimbursementRoutes-B8NK1spY.js +0 -68
  128. package/dist/assets/ReportsRoutes-DRBiAxJk.js +0 -1
  129. package/dist/assets/RewardsRoutes-DqoIHOPS.js +0 -1
  130. package/dist/assets/SignInScreen-C5RNgyDG.js +0 -1
  131. package/dist/assets/SignOutScreen-BZdppeCA.js +0 -9
  132. package/dist/assets/TransactionDetailRoutes-L8u6TmTF.js +0 -1
  133. package/dist/assets/TransactionDetailScreen-KBMzz0Xq.js +0 -5
  134. package/dist/assets/TransactionListRoutes-CKeYxgtl.js +0 -1
  135. package/dist/assets/TreasuryRoutes-DsNk_W1Q.js +0 -37
  136. package/dist/assets/ZeniAccountRoutes-Bgi1019U.js +0 -57
  137. package/dist/assets/useAskAiCfoHostNavButtonProps-CvEN7QS-.js +0 -1
  138. package/dist/assets/useTaskManagerAccess-ECD0Ec-b.js +0 -1
  139. package/dist/assets/withTransactionSidePanel-qep2Sc8k.js +0 -25
@@ -1,4 +1,4 @@
1
- import{j as y}from"./liveblocks-BjcYyeQ6.js";import{a as A}from"./sentry-DZ9rNYfw.js";import{i as G,u as H,h as Q,g as ee,j as h,l as te}from"./core-B-8b0iz9.js";import{WO as Fe,WP as Ve,l$ as ae,su as Me,sG as Ge,sW as $e,sU as Re,sX as Ke,sZ as Ue,WQ as We,fF as K,VN as pe,WR as Se,g_ as ne,cB as se,cC as le,Fg as ve,WS as Ce,Fk as Ye,gO as ce,sx as ze,t6 as qe,dD as Ze,dC as Xe,T9 as fe,Fe as He,F8 as Qe,WT as De,F0 as et,E$ as tt,EW as at,F5 as nt,Fl as st,WU as W,WV as ge,F1 as lt,VO as oe,FB as Ae,Fu as Ie,WW as xe,sA as Te,Fo as Be,Fm as Le,WX as we,FI as be,FF as Je,Fp as je,FH as _e}from"./zeni-epic-state-95zxmizy.js";import{a5 as de,aZ as ie,a_ as ct,z as ot,j as dt,a8 as it,a9 as ue,k as N,aw as ut,a$ as rt,p as V,G as ke,O as ye,b0 as ht,b1 as mt,b2 as pt}from"./index-DuxR1XDX.js";import{n as re}from"./mui-C33Oegsm.js";import{p as St}from"./pathToGoBack-Bgu6njoM.js";import X from"./NotFoundScreen-BatgS8le.js";import{c as M}from"./routePaths-B1syYHWh.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]="2090468f-9f86-4a6a-90df-3d7d6c9cb9b0",e._sentryDebugIdIdentifier="sentry-dbid-2090468f-9f86-4a6a-90df-3d7d6c9cb9b0")}catch{}})();function Rt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=G(),l=t??s,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,l??""))),p=h((u=>Ve(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Me(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Ge({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?y.jsx(X,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?y.jsx(ie,{}):y.jsx(X,{}):y.jsx(ft,{children:y.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(We({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Re(l,u,r))},onSkip:(u,r)=>{n($e(l,u,r))}})})}const ft=re.div`
1
+ import{j as y}from"./liveblocks-CIxx6Ub6.js";import{a as A}from"./sentry-BCPOyc0G.js";import{i as G,u as H,h as Q,g as ee,j as h,l as te}from"./core-Caq7Zbsp.js";import{WO as Fe,WP as Ve,l$ as ae,su as Me,sG as Ge,sW as $e,sU as Re,sX as Ke,sZ as Ue,WQ as We,fF as K,VN as pe,WR as Se,g_ as ne,cB as se,cC as le,Fg as ve,WS as Ce,Fk as Ye,gO as ce,sx as ze,t6 as qe,dD as Ze,dC as Xe,T9 as fe,Fe as He,F8 as Qe,WT as De,F0 as et,E$ as tt,EW as at,F5 as nt,Fl as st,WU as W,WV as ge,F1 as lt,VO as oe,FB as Ae,Fu as Ie,WW as xe,sA as Te,Fo as Be,Fm as Le,WX as we,FI as Je,FF as be,Fp as je,FH as _e}from"./zeni-epic-state-DROyxOLw.js";import{a5 as de,aZ as ie,a_ as ct,z as ot,l as dt,a8 as it,a9 as ue,k as N,aw as ut,a$ as rt,p as V,G as ke,F as ye,b0 as ht,b1 as mt,b2 as pt}from"./index-DOXJLxdR.js";import{n as re}from"./mui-DI0hUuFr.js";import{p as St}from"./pathToGoBack-Ch5lrOj1.js";import X from"./NotFoundScreen-C2GrPpNy.js";import{c as M}from"./routePaths-C1OqXYGB.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]="e99e984d-4440-4056-b91e-8fdaca330e16",e._sentryDebugIdIdentifier="sentry-dbid-e99e984d-4440-4056-b91e-8fdaca330e16")}catch{}})();function Rt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:s}=G(),l=t??s,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:m,localData:I}=h((u=>Fe(u,l??""))),p=h((u=>Ve(u))),C=h((u=>ae(u))),g=A.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),f=A.useRef(!1);return A.useEffect((()=>{o.fetchState!=="In-Progress"&&f.current&&o.fetchState==="Completed"&&(f.current=!1,g())}),[o.fetchState,g]),A.useEffect((()=>{l!=null&&d==null&&m.fetchState==="Not-Started"&&n(Me(l))}),[l,d,m.fetchState]),A.useEffect((()=>{n(Ge({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),l==null?y.jsx(X,{}):d==null?m.fetchState==="Not-Started"||m.fetchState==="In-Progress"?y.jsx(ie,{}):y.jsx(X,{}):y.jsx(ft,{children:y.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:I,newAccrualAccountsView:p,onAccrualFormChange:(u,r)=>{n(We({accrualId:u,localData:r}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(l,u))},onNavigateBack:c??g,onRevert:(u,r)=>{f.current=!0,n(Re(l,u,r))},onSkip:(u,r)=>{n($e(l,u,r))}})})}const ft=re.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -14,7 +14,7 @@ import{j as y}from"./liveblocks-BjcYyeQ6.js";import{a as A}from"./sentry-DZ9rNYf
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${e=>e.theme.colors.grey4};
17
- `,Et=te((function(e){const t=K(e),c=e.entityAutoCompleteState.autoCompleteText.common,s=De(e,"common");return{tenantName:t.companyName,vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:s}}}),(function(e,t){const{navigate:c,location:s}=t,l="accrued_expenses";return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const n=de(s.state?.pathnameStackToGoBack);n.poppedPathname==null?c("../schedules/accrued_expenses"):c(n.poppedPathname,{state:{pathnameStackToGoBack:n.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:n=>{t.setShouldNavigateBack(!0),e(ve(l,n))},onDelete:n=>{e(lt(l,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(n,i)=>{n.trim().length>=2?e(ge({searchString:n,entityType:i,searchOrigin:"common"})):n.trim().length===0&&e(W("common"))},onCancelAutoComplete:()=>{e(W("common"))}},onEditAmount:(n,i)=>{e(st(l,n,i))},onJELinkClick:n=>{e(nt({selectedJELinkRowIndex:n})),c("./edit_link")},onCancelAccrual:(n,i,a)=>{e(at(n,i,a))},onTransactionClick:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewPostedJE:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewRecordedJE:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewBillExpense:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onDetailPageChange:(n,i,a)=>{const{scheduleDetailsAccruedExpensesSection:d}=n,{amount:o,memo:m,months:I,scheduleAccruedExpenseCategory:p,scheduleClass:C,scheduleExpenseCategory:g,startDate:f,vendor:u}=d,r=C.selectedOption!=null?t.classList.find((B=>B.classId===C.selectedOption)):void 0,v=g.selectedOption!=null?t.accountList.find((B=>B.qboId===g.selectedOption)):void 0,D=p.selectedOption!=null?t.accruedAccountList.find((B=>B.qboId===p.selectedOption)):void 0,w=I?.selectedOption;e(et({scheduleType:l,localData:i,selectedJeScheduleDetailId:t.scheduleDetailId})),a!==!1||t.scheduleDetailId!=null||v?.accountId==null||t.isAccountingClassesEnabled!==!1&&r?.classId==null||D==null||u.selectedOption==null||m==null||o==null&&o==0||f==null||w==null||e(tt({scheduleType:l}))}}}))(ht),Ut=({shouldNavigateBack:e,setShouldNavigateBack:t,isRenderedInPanel:c=!1,scheduleDetailIdOverride:s,onPanelCloseAfterDecision:l,onPanelNavigateBack:n}={})=>{const[i,a]=A.useState(!1),d=e??i,o=t??a,m=Q(),I=ee(),p=H(),C=ye(),{tenantEmailDomain:g}=G(),[f,u]=A.useState(!1);if(g==null)throw new Error("Can't access this page without a tenantEmailDomain");const{scheduleDetailId:r}=G(),v=s??r;let D;v!=="new"&&(D=v);const w=Ct(v),B=h((L=>L.scheduleAccruedDetailState.selectedJEAccruedScheduleKey)),b="accrued_expenses",E=h((L=>Se(L,"accrued_expenses"))),J=h((L=>fe(L))),j=h((L=>L.classListState.fetchState)),x=h((L=>ae(L))),_=J!=="Completed"||j!=="Completed";A.useEffect((()=>{f===!1&&_?(p(He(b,D)),u(!0)):_===!1&&f===!1&&v!=="new"&&(p(Qe(b,v)),u(!0))}),[f]);const P=h((L=>K(L))),T=h((L=>ne(L,P.companyId))),O=I.state?.message==="expenseAutomation",Y=h((L=>ce(L).selectedPeriod)),U=c||O,{onScheduleDecision:z,scheduleDecisionStatus:q}=Ee({jeScheduleId:E.selectedJEAccruedSchedule?.jeScheduleId,scheduleKey:E.selectedJEAccruedSchedule?.jeAccruedScheduleKey,scheduleType:b,onDecided:()=>{if(l==null)if(O!==!0)m("../schedules/accrued_expenses");else{const{month:L,year:Pe}=Y;m(`../../month_end_close_checks/review/je_schedules/${L}-${Pe}`)}else l()}}),F=E.fetchState,$=E.allAccountList,Z=E.allClassList,k=E.allAccruedAccountList,S=E.scheduleAccruedDetailsLocalData;if(w!==!0||E.fetchState==="Error")return y.jsx(X,{});const R=F==="Completed"&&f===!0,Oe=E.selectedJEAccruedSchedule!=null;return F==="Completed"||F==="Not-Started"||c===!0&&Oe?y.jsxs(yt,{children:[R===!0?y.jsx(ue,{analytics:N,onLoad:()=>{vt(E,b,T)}}):null,y.jsx(Et,{onScheduleDecision:U?z:void 0,scheduleDecisionStatus:q,isRenderedInPanel:c,onPanelNavigateBack:n,setShouldNavigateBack:o,scheduleAccruedDetailsView:E,location:I,navigate:m,classList:Z,accountList:$,shouldNavigateBack:d,accruedAccountList:k,scheduleLocalData:S,selectedJEScheduleKey:B,scheduleDetailId:D,selectedScheduledJournalEntries:E.selectedJEAccruedSchedule?.scheduledJournalEntry??[],themeState:C,tenantEmailDomain:g,analytics:N,controllerUserDetails:T,isAccountingClassesEnabled:x,status:E.selectedJEAccruedSchedule?.status.code})]}):y.jsx(ie,{})},Ct=e=>e!=null,vt=(e,t,c)=>{const s=e.selectedJEAccruedSchedule,l=se(c.controllers),n=le(c.controllerUserIds);s!=null&&N.trackScheduleAccruedDetailsLoaded({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},schedule:{...Ne(s)},vendorName:s.vendor.name??null,controllerEmails:l,controllerUserIds:n})},At=re.div`
17
+ `,Et=te((function(e){const t=K(e),c=e.entityAutoCompleteState.autoCompleteText.common,s=De(e,"common");return{tenantName:t.companyName,vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:s}}}),(function(e,t){const{navigate:c,location:s}=t,l="accrued_expenses";return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const n=de(s.state?.pathnameStackToGoBack);n.poppedPathname==null?c("../schedules/accrued_expenses"):c(n.poppedPathname,{state:{pathnameStackToGoBack:n.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:n=>{t.setShouldNavigateBack(!0),e(ve(l,n))},onDelete:n=>{e(lt(l,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(n,i)=>{n.trim().length>=2?e(ge({searchString:n,entityType:i,searchOrigin:"common"})):n.trim().length===0&&e(W("common"))},onCancelAutoComplete:()=>{e(W("common"))}},onEditAmount:(n,i)=>{e(st(l,n,i))},onJELinkClick:n=>{e(nt({selectedJELinkRowIndex:n})),c("./edit_link")},onCancelAccrual:(n,i,a)=>{e(at(n,i,a))},onTransactionClick:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewPostedJE:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewRecordedJE:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onViewBillExpense:n=>{const i=`${M(n,t.tenantEmailDomain)}`,a=V(s.state?.pathnameStackToGoBack,s.pathname);c(i,{state:{pathnameStackToGoBack:a}})},onDetailPageChange:(n,i,a)=>{const{scheduleDetailsAccruedExpensesSection:d}=n,{amount:o,memo:m,months:I,scheduleAccruedExpenseCategory:p,scheduleClass:C,scheduleExpenseCategory:g,startDate:f,vendor:u}=d,r=C.selectedOption!=null?t.classList.find((B=>B.classId===C.selectedOption)):void 0,v=g.selectedOption!=null?t.accountList.find((B=>B.qboId===g.selectedOption)):void 0,D=p.selectedOption!=null?t.accruedAccountList.find((B=>B.qboId===p.selectedOption)):void 0,w=I?.selectedOption;e(et({scheduleType:l,localData:i,selectedJeScheduleDetailId:t.scheduleDetailId})),a!==!1||t.scheduleDetailId!=null||v?.accountId==null||t.isAccountingClassesEnabled!==!1&&r?.classId==null||D==null||u.selectedOption==null||m==null||o==null&&o==0||f==null||w==null||e(tt({scheduleType:l}))}}}))(ht),Ut=({shouldNavigateBack:e,setShouldNavigateBack:t,isRenderedInPanel:c=!1,scheduleDetailIdOverride:s,onPanelCloseAfterDecision:l,onPanelNavigateBack:n}={})=>{const[i,a]=A.useState(!1),d=e??i,o=t??a,m=Q(),I=ee(),p=H(),C=ye(),{tenantEmailDomain:g}=G(),[f,u]=A.useState(!1);if(g==null)throw new Error("Can't access this page without a tenantEmailDomain");const{scheduleDetailId:r}=G(),v=s??r;let D;v!=="new"&&(D=v);const w=Ct(v),B=h((L=>L.scheduleAccruedDetailState.selectedJEAccruedScheduleKey)),J="accrued_expenses",E=h((L=>Se(L,"accrued_expenses"))),b=h((L=>fe(L))),j=h((L=>L.classListState.fetchState)),x=h((L=>ae(L))),_=b!=="Completed"||j!=="Completed";A.useEffect((()=>{f===!1&&_?(p(He(J,D)),u(!0)):_===!1&&f===!1&&v!=="new"&&(p(Qe(J,v)),u(!0))}),[f]);const P=h((L=>K(L))),T=h((L=>ne(L,P.companyId))),O=I.state?.message==="expenseAutomation",Y=h((L=>ce(L).selectedPeriod)),U=c||O,{onScheduleDecision:z,scheduleDecisionStatus:q}=Ee({jeScheduleId:E.selectedJEAccruedSchedule?.jeScheduleId,scheduleKey:E.selectedJEAccruedSchedule?.jeAccruedScheduleKey,scheduleType:J,onDecided:()=>{if(l==null)if(O!==!0)m("../schedules/accrued_expenses");else{const{month:L,year:Pe}=Y;m(`../../month_end_close_checks/review/je_schedules/${L}-${Pe}`)}else l()}}),F=E.fetchState,$=E.allAccountList,Z=E.allClassList,k=E.allAccruedAccountList,S=E.scheduleAccruedDetailsLocalData;if(w!==!0||E.fetchState==="Error")return y.jsx(X,{});const R=F==="Completed"&&f===!0,Oe=E.selectedJEAccruedSchedule!=null;return F==="Completed"||F==="Not-Started"||c===!0&&Oe?y.jsxs(yt,{children:[R===!0?y.jsx(ue,{analytics:N,onLoad:()=>{vt(E,J,T)}}):null,y.jsx(Et,{onScheduleDecision:U?z:void 0,scheduleDecisionStatus:q,isRenderedInPanel:c,onPanelNavigateBack:n,setShouldNavigateBack:o,scheduleAccruedDetailsView:E,location:I,navigate:m,classList:Z,accountList:$,shouldNavigateBack:d,accruedAccountList:k,scheduleLocalData:S,selectedJEScheduleKey:B,scheduleDetailId:D,selectedScheduledJournalEntries:E.selectedJEAccruedSchedule?.scheduledJournalEntry??[],themeState:C,tenantEmailDomain:g,analytics:N,controllerUserDetails:T,isAccountingClassesEnabled:x,status:E.selectedJEAccruedSchedule?.status.code})]}):y.jsx(ie,{})},Ct=e=>e!=null,vt=(e,t,c)=>{const s=e.selectedJEAccruedSchedule,l=se(c.controllers),n=le(c.controllerUserIds);s!=null&&N.trackScheduleAccruedDetailsLoaded({scheduleType:t,scheduleExpenseCategoryAndClass:{expenseCategory:s.jeDebit.account?.accountName??null,expenseClass:s.jeDebit.accountingClass?.className??null},schedule:{...Ne(s)},vendorName:s.vendor.name??null,controllerEmails:l,controllerUserIds:n})},At=re.div`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  width: 100%;
@@ -22,7 +22,7 @@ import{j as y}from"./liveblocks-BjcYyeQ6.js";import{a as A}from"./sentry-DZ9rNYf
22
22
  flex-direction: column;
23
23
  align-items: center;
24
24
  background-color: ${e=>e.theme.colors.grey4};
25
- `,he=ke.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,It=te((function(e){const t=K(e),c=oe(e,"fixed_assets");return{tenantName:t.companyName,scheduleDetailsView:c}}),(function(e,t){const{navigate:c,location:s,vendorSearchAutoCompleteData:l,selectedScheduledJournalEntries:n}=t,i="fixed_assets",a=n.flatMap((d=>d.error)).filter((d=>!!d))??[];return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const d=de(t.location.state?.pathnameStackToGoBack);d.poppedPathname==null?c("../schedules/fixed_assets"):t.navigate(d.poppedPathname,{state:{pathnameStackToGoBack:d.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:d=>{e(_e(i,d,a.length>0))},onDelete:d=>{e(je(i,d))},onMarkAsComplete:()=>{t.selectedJEScheduleKey!=null&&e(Je(i,t.selectedJEScheduleKey))},onEditAmount:(d,o)=>{e(be(i,d,o))},onJELinkClick:d=>{e(we({selectedJELinkRowIndex:d})),c("./edit_link")},onTransactionClick:d=>{const o=`${M(d,t.tenantEmailDomain)}`,m=V(s.state?.pathnameStackToGoBack,s.pathname);c(o,{state:{pathnameStackToGoBack:m,message:"comingFromScheduleDetailsFixedAssets"}})},onViewLinkedJE:d=>{const o=`${M(d,t.tenantEmailDomain)}`,m=V(s.state?.pathnameStackToGoBack,s.pathname);c(o,{state:{pathnameStackToGoBack:m}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(d,o)=>{d.trim().length>=2?e(ge({searchString:d,entityType:o,searchOrigin:"common"})):d.trim().length===0&&e(W("common"))},onCancelAutoComplete:()=>{e(W("common"))}},onDetailPageChange:(d,o)=>{const{scheduleDetailsFixedAssetsSection:m,scheduleDetailsListSection:I}=d,{scheduleClass:p,scheduleExpenseCategory:C,accumulatedDepreciationCategory:g,assetId:f,months:u,startDate:r,postingDate:v,vendor:D}=m,w=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((T=>T.id===D?.selectedOption)):void 0,B={id:w?.zeniId??D?.selectedOption??"",name:w?.name??D?.defaultOptions.find((T=>T.value===D?.selectedOption))?.label??"",logo:w?.logo},b=p.selectedOption!=null?t.classList.find((T=>T.classId===p.selectedOption)):void 0,E=C.selectedOption!=null?t.accountList.find((T=>T.qboId===C.selectedOption)):void 0,J=g.selectedOption!=null?t.depAccountList.find((T=>T.qboId===g.selectedOption)):void 0,j=u?.selectedOption,x=I.map(((T,O)=>({...t.scheduleLocalData.jeScheduleDetails[O],amount:{...t.scheduleLocalData.jeScheduleDetails[O].amount,amount:T.amount}}))),_=v.type==="day"?v.dayOfMonth?v.dayOfMonth:1:void 0,P=v.type==="lastDayOfMonth"||void 0;e(Be({scheduleType:i,localData:{selectedAccount:E?.accountId,selectedClass:b?.classId,selectedAccumulatedDepreciationCategory:J?.accountId,selectedDate:r,selectedMonths:j,assetId:f,jeScheduleDetails:x,lastDayOfMonth:P,selectedDayOfMonth:_,selectedVendor:B},selectedJeScheduleDetailId:t.scheduleDetailId})),o!==!1||J?.accountId==null||t.scheduleDetailId!=null&&t.status!=="draft"&&t.status!=="marked_as_completed"||E?.accountId==null||t.isAccountingClassesEnabled!==!1&&b?.classId==null||r==null||j==null||P!==!0&&_==null||e(Le({scheduleType:i}))}}}))(mt),Wt=({isRenderedInPanel:e=!1,scheduleDetailIdOverride:t,onPanelCloseAfterDecision:c,onPanelNavigateBack:s}={})=>{const l=Q(),n=ee(),i=H(),a=ye(),{tenantEmailDomain:d}=G(),[o,m]=A.useState(!1),{scheduleDetailId:I}=G(),p=t??I,C=n.state?.message==="expenseAutomation",g=xt(p),f=h((k=>k.scheduleDetailState.selectedJEScheduleKey));A.useEffect((()=>{f!=null&&f.length!==0||p!=="new"||l("../schedules/fixed_assets")}),[f,p]);const u="fixed_assets",r=h((k=>oe(k,u))),v=h((k=>k.entityAutoCompleteState.autoCompleteText.common)),D=h((k=>De(k,"common"))),w=h((k=>fe(k))),B=h((k=>k.classListState.fetchState)),b=h((k=>ae(k))),E=h((k=>ce(k).selectedPeriod)),J=w!=="Completed"||B!=="Completed";A.useEffect((()=>{o===!1&&J?(i(Ae(u,F,!0)),m(!0)):J===!1&&o===!1&&(i(Ie(u,p==="new"?void 0:p,!0)),m(!0))}),[o]),A.useEffect((()=>{if(r.markAsCompleteStatus.fetchState==="Completed")if(i(xe()),C===!0){const{month:k,year:S}=E;l(`../../month_end_close_checks/review/je_schedules/${k}-${S}`)}else l("../schedules/fixed_assets")}),[r.markAsCompleteStatus.fetchState]);const j=h((k=>K(k))),x=h((k=>ne(k,j.companyId))),_=e||C,{onScheduleDecision:P,scheduleDecisionStatus:T}=Ee({jeScheduleId:r.selectedJEScheduleTransaction?.jeScheduleId,scheduleKey:r.selectedJEScheduleTransaction?.jeScheduleTransactionKey,scheduleType:u,onDecided:()=>{if(c==null)if(C!==!0)l("../schedules/fixed_assets");else{const{month:k,year:S}=E;l(`../../month_end_close_checks/review/je_schedules/${k}-${S}`)}else c()}}),O=r.fetchState,Y=r.allAccountList,U=r.allClassList,z=r.allDepreciationAccountList,q=r.scheduleDetailsLocalData.fixed_assets;let F;if(p!=="new"&&(F=p),g!==!0||r.fetchState==="Error")return y.jsx(X,{});const $=O==="Completed"&&o===!0,Z=r.selectedJEScheduleTransaction!=null;return O==="Completed"||e===!0&&Z?y.jsxs(At,{children:[$===!0?y.jsx(ue,{analytics:N,onLoad:()=>{Bt(r,u,x)}}):null,y.jsx(It,{onScheduleDecision:_?P:void 0,scheduleDecisionStatus:T,isRenderedInPanel:e,onPanelNavigateBack:s,location:n,navigate:l,classList:U,vendorSearchEntityAutoCompleteView:D,vendorSearchAutoCompleteData:{autoCompleteText:v,entityAutoCompleteView:D},expenseAutomationSelectedPeriod:E,usedInExpenseAutomation:C,removeJeScheduleTransactionKey:(k,S)=>{i(Te(k,S))},accountList:Y,depAccountList:z,scheduleLocalData:q,selectedJEScheduleKey:f,scheduleDetailId:F,selectedScheduledJournalEntries:r.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:a,tenantEmailDomain:d,analytics:N,controllerUserDetails:x,isAccountingClassesEnabled:b,status:r.selectedJEScheduleTransaction?.status.code})]}):y.jsx(ie,{})},xt=e=>e!=null,Tt=e=>({transactionDate:e.date.format(he),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),Bt=(e,t,c)=>{const s=e.selectedJEScheduleTransaction?.baseTransaction,l=e.selectedJEScheduleTransaction,n=se(c.controllers),i=le(c.controllerUserIds);var a;s!=null&&l!=null&&N.trackScheduleDetailsLoaded({scheduleType:t,transaction:{...Tt(s)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(a=l,{currentBalance:a.balanceAsOfToday??null,currentStatus:a.status.label,period:a.period??null,startMonth:a.startDate?.format(he)??null,endMonth:a.endDate?.format(he)??null})},vendorName:l.vendor.name??null,fixedAssetsDetails:{accumulatedDepreciationCategory:l.jeCredit.account?.accountName??null,assetId:l.otherAttributes.assetId??null},controllerEmails:n,controllerUserIds:i})},Lt=re.div`
25
+ `,he=ke.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,It=te((function(e){const t=K(e),c=oe(e,"fixed_assets");return{tenantName:t.companyName,scheduleDetailsView:c}}),(function(e,t){const{navigate:c,location:s,vendorSearchAutoCompleteData:l,selectedScheduledJournalEntries:n}=t,i="fixed_assets",a=n.flatMap((d=>d.error)).filter((d=>!!d))??[];return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const d=de(t.location.state?.pathnameStackToGoBack);d.poppedPathname==null?c("../schedules/fixed_assets"):t.navigate(d.poppedPathname,{state:{pathnameStackToGoBack:d.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:d=>{e(_e(i,d,a.length>0))},onDelete:d=>{e(je(i,d))},onMarkAsComplete:()=>{t.selectedJEScheduleKey!=null&&e(be(i,t.selectedJEScheduleKey))},onEditAmount:(d,o)=>{e(Je(i,d,o))},onJELinkClick:d=>{e(we({selectedJELinkRowIndex:d})),c("./edit_link")},onTransactionClick:d=>{const o=`${M(d,t.tenantEmailDomain)}`,m=V(s.state?.pathnameStackToGoBack,s.pathname);c(o,{state:{pathnameStackToGoBack:m,message:"comingFromScheduleDetailsFixedAssets"}})},onViewLinkedJE:d=>{const o=`${M(d,t.tenantEmailDomain)}`,m=V(s.state?.pathnameStackToGoBack,s.pathname);c(o,{state:{pathnameStackToGoBack:m}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(d,o)=>{d.trim().length>=2?e(ge({searchString:d,entityType:o,searchOrigin:"common"})):d.trim().length===0&&e(W("common"))},onCancelAutoComplete:()=>{e(W("common"))}},onDetailPageChange:(d,o)=>{const{scheduleDetailsFixedAssetsSection:m,scheduleDetailsListSection:I}=d,{scheduleClass:p,scheduleExpenseCategory:C,accumulatedDepreciationCategory:g,assetId:f,months:u,startDate:r,postingDate:v,vendor:D}=m,w=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((T=>T.id===D?.selectedOption)):void 0,B={id:w?.zeniId??D?.selectedOption??"",name:w?.name??D?.defaultOptions.find((T=>T.value===D?.selectedOption))?.label??"",logo:w?.logo},J=p.selectedOption!=null?t.classList.find((T=>T.classId===p.selectedOption)):void 0,E=C.selectedOption!=null?t.accountList.find((T=>T.qboId===C.selectedOption)):void 0,b=g.selectedOption!=null?t.depAccountList.find((T=>T.qboId===g.selectedOption)):void 0,j=u?.selectedOption,x=I.map(((T,O)=>({...t.scheduleLocalData.jeScheduleDetails[O],amount:{...t.scheduleLocalData.jeScheduleDetails[O].amount,amount:T.amount}}))),_=v.type==="day"?v.dayOfMonth?v.dayOfMonth:1:void 0,P=v.type==="lastDayOfMonth"||void 0;e(Be({scheduleType:i,localData:{selectedAccount:E?.accountId,selectedClass:J?.classId,selectedAccumulatedDepreciationCategory:b?.accountId,selectedDate:r,selectedMonths:j,assetId:f,jeScheduleDetails:x,lastDayOfMonth:P,selectedDayOfMonth:_,selectedVendor:B},selectedJeScheduleDetailId:t.scheduleDetailId})),o!==!1||b?.accountId==null||t.scheduleDetailId!=null&&t.status!=="draft"&&t.status!=="marked_as_completed"||E?.accountId==null||t.isAccountingClassesEnabled!==!1&&J?.classId==null||r==null||j==null||P!==!0&&_==null||e(Le({scheduleType:i}))}}}))(mt),Wt=({isRenderedInPanel:e=!1,scheduleDetailIdOverride:t,onPanelCloseAfterDecision:c,onPanelNavigateBack:s}={})=>{const l=Q(),n=ee(),i=H(),a=ye(),{tenantEmailDomain:d}=G(),[o,m]=A.useState(!1),{scheduleDetailId:I}=G(),p=t??I,C=n.state?.message==="expenseAutomation",g=xt(p),f=h((k=>k.scheduleDetailState.selectedJEScheduleKey));A.useEffect((()=>{f!=null&&f.length!==0||p!=="new"||l("../schedules/fixed_assets")}),[f,p]);const u="fixed_assets",r=h((k=>oe(k,u))),v=h((k=>k.entityAutoCompleteState.autoCompleteText.common)),D=h((k=>De(k,"common"))),w=h((k=>fe(k))),B=h((k=>k.classListState.fetchState)),J=h((k=>ae(k))),E=h((k=>ce(k).selectedPeriod)),b=w!=="Completed"||B!=="Completed";A.useEffect((()=>{o===!1&&b?(i(Ae(u,F,!0)),m(!0)):b===!1&&o===!1&&(i(Ie(u,p==="new"?void 0:p,!0)),m(!0))}),[o]),A.useEffect((()=>{if(r.markAsCompleteStatus.fetchState==="Completed")if(i(xe()),C===!0){const{month:k,year:S}=E;l(`../../month_end_close_checks/review/je_schedules/${k}-${S}`)}else l("../schedules/fixed_assets")}),[r.markAsCompleteStatus.fetchState]);const j=h((k=>K(k))),x=h((k=>ne(k,j.companyId))),_=e||C,{onScheduleDecision:P,scheduleDecisionStatus:T}=Ee({jeScheduleId:r.selectedJEScheduleTransaction?.jeScheduleId,scheduleKey:r.selectedJEScheduleTransaction?.jeScheduleTransactionKey,scheduleType:u,onDecided:()=>{if(c==null)if(C!==!0)l("../schedules/fixed_assets");else{const{month:k,year:S}=E;l(`../../month_end_close_checks/review/je_schedules/${k}-${S}`)}else c()}}),O=r.fetchState,Y=r.allAccountList,U=r.allClassList,z=r.allDepreciationAccountList,q=r.scheduleDetailsLocalData.fixed_assets;let F;if(p!=="new"&&(F=p),g!==!0||r.fetchState==="Error")return y.jsx(X,{});const $=O==="Completed"&&o===!0,Z=r.selectedJEScheduleTransaction!=null;return O==="Completed"||e===!0&&Z?y.jsxs(At,{children:[$===!0?y.jsx(ue,{analytics:N,onLoad:()=>{Bt(r,u,x)}}):null,y.jsx(It,{onScheduleDecision:_?P:void 0,scheduleDecisionStatus:T,isRenderedInPanel:e,onPanelNavigateBack:s,location:n,navigate:l,classList:U,vendorSearchEntityAutoCompleteView:D,vendorSearchAutoCompleteData:{autoCompleteText:v,entityAutoCompleteView:D},expenseAutomationSelectedPeriod:E,usedInExpenseAutomation:C,removeJeScheduleTransactionKey:(k,S)=>{i(Te(k,S))},accountList:Y,depAccountList:z,scheduleLocalData:q,selectedJEScheduleKey:f,scheduleDetailId:F,selectedScheduledJournalEntries:r.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:a,tenantEmailDomain:d,analytics:N,controllerUserDetails:x,isAccountingClassesEnabled:J,status:r.selectedJEScheduleTransaction?.status.code})]}):y.jsx(ie,{})},xt=e=>e!=null,Tt=e=>({transactionDate:e.date.format(he),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),Bt=(e,t,c)=>{const s=e.selectedJEScheduleTransaction?.baseTransaction,l=e.selectedJEScheduleTransaction,n=se(c.controllers),i=le(c.controllerUserIds);var a;s!=null&&l!=null&&N.trackScheduleDetailsLoaded({scheduleType:t,transaction:{...Tt(s)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(a=l,{currentBalance:a.balanceAsOfToday??null,currentStatus:a.status.label,period:a.period??null,startMonth:a.startDate?.format(he)??null,endMonth:a.endDate?.format(he)??null})},vendorName:l.vendor.name??null,fixedAssetsDetails:{accumulatedDepreciationCategory:l.jeCredit.account?.accountName??null,assetId:l.otherAttributes.assetId??null},controllerEmails:n,controllerUserIds:i})},Lt=re.div`
26
26
  display: flex;
27
27
  min-height: 100%;
28
28
  width: 100%;
@@ -30,4 +30,4 @@ import{j as y}from"./liveblocks-BjcYyeQ6.js";import{a as A}from"./sentry-DZ9rNYf
30
30
  flex-direction: column;
31
31
  align-items: center;
32
32
  background-color: ${e=>e.theme.colors.grey4};
33
- `,me=ke.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,wt=te((function(e,t){const c=K(e),s=oe(e,t.scheduleTab);return{tenantName:c.companyName,scheduleDetailsView:s}}),(function(e,t){const{navigate:c,location:s,vendorSearchAutoCompleteData:l,selectedScheduledJournalEntries:n}=t,i=n.flatMap((a=>a.error)).filter((a=>!!a))??[];return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const a=de(t.location.state?.pathnameStackToGoBack);a.poppedPathname==null?c("../schedules/prepaid_expenses"):t.navigate(a.poppedPathname,{state:{pathnameStackToGoBack:a.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:a=>{e(_e(t.scheduleTab,a,i.length>0))},onDelete:a=>{e(je(t.scheduleTab,a))},onMarkAsComplete:()=>{t.selectedJEScheduleKey!=null&&e(Je(t.scheduleTab,t.selectedJEScheduleKey))},onEditAmount:(a,d)=>{e(be(t.scheduleTab,a,d))},onJELinkClick:a=>{e(we({selectedJELinkRowIndex:a})),c("./edit_link")},onTransactionClick:a=>{const d=`${M(a,t.tenantEmailDomain)}`,o=V(s.state?.pathnameStackToGoBack,s.pathname);c(d,{state:{pathnameStackToGoBack:o,message:"comingFromScheduleDetails"}})},onViewLinkedJE:a=>{const d=`${M(a,t.tenantEmailDomain)}`,o=V(s.state?.pathnameStackToGoBack,s.pathname);c(d,{state:{pathnameStackToGoBack:o}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(a,d)=>{a.trim().length>=2?e(ge({searchString:a,entityType:d,searchOrigin:"common"})):a.trim().length===0&&e(W("common"))},onCancelAutoComplete:()=>{e(W("common"))}},onDetailPageChange:(a,d)=>{const{scheduleDetailsSection:o,scheduleDetailsListSection:m}=a,{scheduleClass:I,scheduleExpenseCategory:p,months:C,startDate:g,postingDate:f,vendor:u}=o,r=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((x=>x.id===u?.selectedOption)):void 0,v={id:r?.zeniId??u?.selectedOption??"",name:r?.name??u?.defaultOptions.find((x=>x.value===u?.selectedOption))?.label??"",logo:r?.logo},D=I.selectedOption!=null?t.classList.find((x=>x.classId===I.selectedOption)):void 0,w=p.selectedOption!=null?t.accountList.find((x=>x.qboId===p.selectedOption)):void 0,B=C?.selectedOption,b=m.map(((x,_)=>({...t.scheduleLocalData.jeScheduleDetails[_],amount:{...t.scheduleLocalData.jeScheduleDetails[_].amount,amount:x.amount}}))),E=f.type==="day"?f.dayOfMonth?f.dayOfMonth:1:void 0,J=f.type==="lastDayOfMonth"||void 0,j={selectedAccount:w?.accountId,selectedClass:D?.classId,selectedDate:g,selectedMonths:B,jeScheduleDetails:b,lastDayOfMonth:J,selectedVendor:v,selectedDayOfMonth:E};e(Be({scheduleType:t.scheduleTab,localData:j,selectedJeScheduleDetailId:t.scheduleDetailId})),d!==!1||t.scheduleDetailId!=null&&t.status!=="draft"&&t.status!=="marked_as_completed"||w?.accountId==null||t.isAccountingClassesEnabled!==!1&&D?.classId==null||g==null||B==null||J!==!0&&E==null||e(Le({scheduleType:t.scheduleTab}))}}}))(pt),Yt=({isRenderedInPanel:e=!1,scheduleDetailIdOverride:t,scheduleTypeOverride:c,onPanelCloseAfterDecision:s,onPanelNavigateBack:l}={})=>{const n=Q(),i=ee(),a=H(),d=ye(),{tenantEmailDomain:o}=G(),[m,I]=A.useState(!1),p=i.state?.message==="expenseAutomation",{scheduleType:C,scheduleDetailId:g}=G(),f=t??g,u=bt(c??C,f),r=h((S=>S.scheduleDetailState.selectedJEScheduleKey));A.useEffect((()=>{r!=null&&r.length!==0||f!=="new"||n("../schedules/prepaid_expenses")}),[r,f]);const v=c??pe(C)??"prepaid_expenses",D=h((S=>oe(S,v))),w=h((S=>S.entityAutoCompleteState.autoCompleteText.common)),B=h((S=>De(S,"common"))),b=h((S=>fe(S))),E=h((S=>S.classListState.fetchState)),J=h((S=>ae(S))),j=h((S=>ce(S).selectedPeriod)),x=b!=="Completed"||E!=="Completed";A.useEffect((()=>{m===!1&&x?(a(Ae(v,$,!0)),I(!0)):x===!1&&m===!1&&(a(Ie(v,f==="new"?void 0:f,!0)),I(!0))}),[m]),A.useEffect((()=>{if(D.markAsCompleteStatus.fetchState==="Completed")if(a(xe()),p===!0){const{month:S,year:R}=j;n(`../../month_end_close_checks/review/je_schedules/${S}-${R}`)}else n("../schedules/prepaid_expenses")}),[D.markAsCompleteStatus.fetchState]);const _=h((S=>K(S))),P=h((S=>ne(S,_.companyId))),T=e||p,{onScheduleDecision:O,scheduleDecisionStatus:Y}=Ee({jeScheduleId:D.selectedJEScheduleTransaction?.jeScheduleId,scheduleKey:D.selectedJEScheduleTransaction?.jeScheduleTransactionKey,scheduleType:v,onDecided:()=>{if(s==null)if(p!==!0)n("../schedules/prepaid_expenses");else{const{month:S,year:R}=j;n(`../../month_end_close_checks/review/je_schedules/${S}-${R}`)}else s()}}),U=D.fetchState,z=D.allAccountList,q=D.allClassList,F=D.scheduleDetailsLocalData;let $;if(f!=="new"&&($=f),u!==!0||D.fetchState==="Error")return y.jsx(X,{});const Z=U==="Completed"&&m===!0,k=D.selectedJEScheduleTransaction!=null;return U==="Completed"||e===!0&&k?y.jsxs(Lt,{children:[Z===!0?y.jsx(ue,{analytics:N,onLoad:()=>{jt(D,v,P)}}):null,y.jsx(wt,{onScheduleDecision:T?O:void 0,scheduleDecisionStatus:Y,isRenderedInPanel:e,onPanelNavigateBack:l,location:i,vendorSearchEntityAutoCompleteView:B,vendorSearchAutoCompleteData:{autoCompleteText:w,entityAutoCompleteView:B},usedInExpenseAutomation:p,removeJeScheduleTransactionKey:(S,R)=>{a(Te(S,R))},expenseAutomationSelectedPeriod:j,navigate:n,classList:q,accountList:z,scheduleLocalData:F[v],selectedJEScheduleKey:r,scheduleDetailId:$,selectedScheduledJournalEntries:D.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:d,tenantEmailDomain:o,scheduleTab:v,analytics:N,controllerUserDetails:P,isAccountingClassesEnabled:J,status:D.selectedJEScheduleTransaction?.status.code})]}):y.jsx(ie,{})},bt=(e,t)=>pe(e)!=null&&t!=null,Jt=e=>({transactionDate:e.date.format(me),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),jt=(e,t,c)=>{const s=e.selectedJEScheduleTransaction?.baseTransaction,l=e.selectedJEScheduleTransaction,n=se(c.controllers),i=le(c.controllerUserIds);var a;s!=null&&l!=null&&N.trackScheduleDetailsLoaded({scheduleType:t,transaction:{...Jt(s)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(a=l,{currentBalance:a.balanceAsOfToday??null,currentStatus:a.status.label,period:a.period??null,startMonth:a.startDate?.format(me)??null,endMonth:a.endDate?.format(me)??null})},vendorName:l.vendor.name??null,controllerEmails:n,controllerUserIds:i})};export{Rt as J,Wt as S,Ut as a,Yt as b,Kt as c};
33
+ `,me=ke.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,wt=te((function(e,t){const c=K(e),s=oe(e,t.scheduleTab);return{tenantName:c.companyName,scheduleDetailsView:s}}),(function(e,t){const{navigate:c,location:s,vendorSearchAutoCompleteData:l,selectedScheduledJournalEntries:n}=t,i=n.flatMap((a=>a.error)).filter((a=>!!a))??[];return{onNavigateBack:()=>{if(t.onPanelNavigateBack!=null)return void t.onPanelNavigateBack();const a=de(t.location.state?.pathnameStackToGoBack);a.poppedPathname==null?c("../schedules/prepaid_expenses"):t.navigate(a.poppedPathname,{state:{pathnameStackToGoBack:a.newStack}})},onZeniLogoClick:()=>{t.themeState.toggle()},onSave:a=>{e(_e(t.scheduleTab,a,i.length>0))},onDelete:a=>{e(je(t.scheduleTab,a))},onMarkAsComplete:()=>{t.selectedJEScheduleKey!=null&&e(be(t.scheduleTab,t.selectedJEScheduleKey))},onEditAmount:(a,d)=>{e(Je(t.scheduleTab,a,d))},onJELinkClick:a=>{e(we({selectedJELinkRowIndex:a})),c("./edit_link")},onTransactionClick:a=>{const d=`${M(a,t.tenantEmailDomain)}`,o=V(s.state?.pathnameStackToGoBack,s.pathname);c(d,{state:{pathnameStackToGoBack:o,message:"comingFromScheduleDetails"}})},onViewLinkedJE:a=>{const d=`${M(a,t.tenantEmailDomain)}`,o=V(s.state?.pathnameStackToGoBack,s.pathname);c(d,{state:{pathnameStackToGoBack:o}})},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(a,d)=>{a.trim().length>=2?e(ge({searchString:a,entityType:d,searchOrigin:"common"})):a.trim().length===0&&e(W("common"))},onCancelAutoComplete:()=>{e(W("common"))}},onDetailPageChange:(a,d)=>{const{scheduleDetailsSection:o,scheduleDetailsListSection:m}=a,{scheduleClass:I,scheduleExpenseCategory:p,months:C,startDate:g,postingDate:f,vendor:u}=o,r=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((x=>x.id===u?.selectedOption)):void 0,v={id:r?.zeniId??u?.selectedOption??"",name:r?.name??u?.defaultOptions.find((x=>x.value===u?.selectedOption))?.label??"",logo:r?.logo},D=I.selectedOption!=null?t.classList.find((x=>x.classId===I.selectedOption)):void 0,w=p.selectedOption!=null?t.accountList.find((x=>x.qboId===p.selectedOption)):void 0,B=C?.selectedOption,J=m.map(((x,_)=>({...t.scheduleLocalData.jeScheduleDetails[_],amount:{...t.scheduleLocalData.jeScheduleDetails[_].amount,amount:x.amount}}))),E=f.type==="day"?f.dayOfMonth?f.dayOfMonth:1:void 0,b=f.type==="lastDayOfMonth"||void 0,j={selectedAccount:w?.accountId,selectedClass:D?.classId,selectedDate:g,selectedMonths:B,jeScheduleDetails:J,lastDayOfMonth:b,selectedVendor:v,selectedDayOfMonth:E};e(Be({scheduleType:t.scheduleTab,localData:j,selectedJeScheduleDetailId:t.scheduleDetailId})),d!==!1||t.scheduleDetailId!=null&&t.status!=="draft"&&t.status!=="marked_as_completed"||w?.accountId==null||t.isAccountingClassesEnabled!==!1&&D?.classId==null||g==null||B==null||b!==!0&&E==null||e(Le({scheduleType:t.scheduleTab}))}}}))(pt),Yt=({isRenderedInPanel:e=!1,scheduleDetailIdOverride:t,scheduleTypeOverride:c,onPanelCloseAfterDecision:s,onPanelNavigateBack:l}={})=>{const n=Q(),i=ee(),a=H(),d=ye(),{tenantEmailDomain:o}=G(),[m,I]=A.useState(!1),p=i.state?.message==="expenseAutomation",{scheduleType:C,scheduleDetailId:g}=G(),f=t??g,u=Jt(c??C,f),r=h((S=>S.scheduleDetailState.selectedJEScheduleKey));A.useEffect((()=>{r!=null&&r.length!==0||f!=="new"||n("../schedules/prepaid_expenses")}),[r,f]);const v=c??pe(C)??"prepaid_expenses",D=h((S=>oe(S,v))),w=h((S=>S.entityAutoCompleteState.autoCompleteText.common)),B=h((S=>De(S,"common"))),J=h((S=>fe(S))),E=h((S=>S.classListState.fetchState)),b=h((S=>ae(S))),j=h((S=>ce(S).selectedPeriod)),x=J!=="Completed"||E!=="Completed";A.useEffect((()=>{m===!1&&x?(a(Ae(v,$,!0)),I(!0)):x===!1&&m===!1&&(a(Ie(v,f==="new"?void 0:f,!0)),I(!0))}),[m]),A.useEffect((()=>{if(D.markAsCompleteStatus.fetchState==="Completed")if(a(xe()),p===!0){const{month:S,year:R}=j;n(`../../month_end_close_checks/review/je_schedules/${S}-${R}`)}else n("../schedules/prepaid_expenses")}),[D.markAsCompleteStatus.fetchState]);const _=h((S=>K(S))),P=h((S=>ne(S,_.companyId))),T=e||p,{onScheduleDecision:O,scheduleDecisionStatus:Y}=Ee({jeScheduleId:D.selectedJEScheduleTransaction?.jeScheduleId,scheduleKey:D.selectedJEScheduleTransaction?.jeScheduleTransactionKey,scheduleType:v,onDecided:()=>{if(s==null)if(p!==!0)n("../schedules/prepaid_expenses");else{const{month:S,year:R}=j;n(`../../month_end_close_checks/review/je_schedules/${S}-${R}`)}else s()}}),U=D.fetchState,z=D.allAccountList,q=D.allClassList,F=D.scheduleDetailsLocalData;let $;if(f!=="new"&&($=f),u!==!0||D.fetchState==="Error")return y.jsx(X,{});const Z=U==="Completed"&&m===!0,k=D.selectedJEScheduleTransaction!=null;return U==="Completed"||e===!0&&k?y.jsxs(Lt,{children:[Z===!0?y.jsx(ue,{analytics:N,onLoad:()=>{jt(D,v,P)}}):null,y.jsx(wt,{onScheduleDecision:T?O:void 0,scheduleDecisionStatus:Y,isRenderedInPanel:e,onPanelNavigateBack:l,location:i,vendorSearchEntityAutoCompleteView:B,vendorSearchAutoCompleteData:{autoCompleteText:w,entityAutoCompleteView:B},usedInExpenseAutomation:p,removeJeScheduleTransactionKey:(S,R)=>{a(Te(S,R))},expenseAutomationSelectedPeriod:j,navigate:n,classList:q,accountList:z,scheduleLocalData:F[v],selectedJEScheduleKey:r,scheduleDetailId:$,selectedScheduledJournalEntries:D.selectedJEScheduleTransaction?.scheduledJournalEntry??[],themeState:d,tenantEmailDomain:o,scheduleTab:v,analytics:N,controllerUserDetails:P,isAccountingClassesEnabled:b,status:D.selectedJEScheduleTransaction?.status.code})]}):y.jsx(ie,{})},Jt=(e,t)=>pe(e)!=null&&t!=null,bt=e=>({transactionDate:e.date.format(me),transactionAmount:e.amount,scheduleCategory:e.account.accountName,scheduleClass:e.classBase?.className??null,description:e.memo}),jt=(e,t,c)=>{const s=e.selectedJEScheduleTransaction?.baseTransaction,l=e.selectedJEScheduleTransaction,n=se(c.controllers),i=le(c.controllerUserIds);var a;s!=null&&l!=null&&N.trackScheduleDetailsLoaded({scheduleType:t,transaction:{...bt(s)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},scheduledTransaction:{...(a=l,{currentBalance:a.balanceAsOfToday??null,currentStatus:a.status.label,period:a.period??null,startMonth:a.startDate?.format(me)??null,endMonth:a.endDate?.format(me)??null})},vendorName:l.vendor.name??null,controllerEmails:n,controllerUserIds:i})};export{Rt as J,Wt as S,Ut as a,Yt as b,Kt as c};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-BatgS8le.js","assets/sentry-DZ9rNYfw.js","assets/core-B-8b0iz9.js","assets/zeni-epic-state-95zxmizy.js","assets/index-DuxR1XDX.js","assets/mui-C33Oegsm.js","assets/analytics-8lQ_GaR7.js","assets/utils-D3rZq_G4.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-B4NxbMLL.js","assets/withTransactionSidePanel-qep2Sc8k.js","assets/useAskAiCfoHostNavButtonProps-CvEN7QS-.js","assets/TransactionDetailScreen-KBMzz0Xq.js","assets/decodeURIComponentSafe-hAviH84T.js","assets/useInitialThreadRequest-Chu-ipGI.js","assets/routePaths-B1syYHWh.js","assets/expenseAutomationHelper-BzOPc0En.js","assets/stripSplatSuffix-Te2Zqy4u.js","assets/analyticsHelper-C6SU-53H.js","assets/CompanyPassportScreen-BEG9__1k.js","assets/MobileAppDrawer-0TaE2Qid.js","assets/InboxNotificationsProvider-B4UF_uUg.js","assets/useTaskManagerAccess-ECD0Ec-b.js","assets/useAiCfoDashboardSuggestedQuestionsChips-SBKf0Pu3.js","assets/FeaturePreviewScreen-v5dVXn4p.js","assets/BillPayRoutes-07S7DRSx.js","assets/AddressScreen-DvJ6yyMx.js","assets/DomesticWireDetailScreen-B2YgkOu5.js","assets/BusinessVerificationPageScreen-B20TVwus.js","assets/DrawerScreen-I5-Ak-b_.js","assets/SetupPagesScreen-CdpIgBzw.js","assets/BillPayApprovalRoutes-BxCZdf21.js","assets/ReimbursementApprovalRuleDetailScreen-CRU8C8RZ.js","assets/getLocaleForTenant-D57C4sYC.js","assets/ReimbursementRoutes-B8NK1spY.js","assets/ReimbursementApprovalRoutes-ryr0mHPH.js","assets/TransactionListRoutes-CKeYxgtl.js","assets/ZeniAccountStatementScreen-L3XK5pKW.js","assets/SettingsRoutes-Bh4g9wCj.js","assets/AccountMappingScreen-Dt4x9DJz.js","assets/QBOConnectionScreen-BiN0lu_W.js","assets/empty-CyiOIGJw.js","assets/index-CgYr_9vs.js","assets/url-BjdrSaU1.js","assets/index-CzpjeHcU.js","assets/accountMappingHelper-Ci74NLEW.js","assets/useEmailConnectResultRefresh-BwFVhfcX.js","assets/ReportsRoutes-DRBiAxJk.js","assets/ChargeCardRoutes-BO6dVldC.js","assets/useChargeCardPusherEvents-DmcXit2D.js","assets/PeopleRoutes-CypmG1ct.js","assets/ExpenseAutomationRoutes-BW9gVxz9.js","assets/useActualMatchingMatchDetail-DZnxtuQj.js","assets/ScheduleDetailsPrepaidExpensesScreen-UKD1lb2-.js","assets/pathToGoBack-Bgu6njoM.js","assets/TreasuryRoutes-DsNk_W1Q.js","assets/VendorsRoutes-C9tsCt7G.js","assets/ZeniAccountRoutes-Bgi1019U.js","assets/AddressRoutes-DfkTMfYF.js","assets/PandLWithForecastRoutes-DiipWbFp.js","assets/CustomerOnboardingRoutes-BFFEQyjG.js","assets/TransactionDetailRoutes-L8u6TmTF.js","assets/EntityDetailRoutes-BPqa4e5a.js","assets/InvoicingRoutes-CxKyyTQc.js","assets/NotificationRoutes-i3qnEWcR.js","assets/PerformanceRoutes-eA0QwQYt.js","assets/ActualMatchingMatchDetailScreen-BfyrJWDJ.js","assets/RewardsRoutes-DqoIHOPS.js","assets/TaskRoutes-BiQOVouS.js","assets/TaskListScreen-h6ryhshy.js","assets/useTaskManagerPusherEvents-BnGLCsCG.js","assets/AiCfoScreen-SBmgGufP.js","assets/CardsAiCfoScreen-DkokQGnk.js"])))=>i.map(i=>d[i]);
2
- import{_ as s,bn as hs,fF as ps,d_ as xs,dZ as gs,B1 as Rs,di as js,c8 as Is,gJ as Ts,g9 as As,df as pe,cG as bs,gn as Ds,cy as fs,bE as ys,br as Cs,Ue as vs,v as Us,Uh as Os,bq as Ps,Ui as ws,bK as Fs,bJ as Ls,bt as ks,cu as Vs,Uj as Hs,Uk as Ss,da as Bs,dd as Ns,dc as Ms,cF as Zs,cM as Gs,pS as xe,gi as ge,gY as $s,gk as Re,gL as je,gM as Ie,gl as zs}from"./zeni-epic-state-95zxmizy.js";import{j as e}from"./liveblocks-BjcYyeQ6.js";import{a as P}from"./sentry-DZ9rNYfw.js";import{N as u,u as Ys,h as qs,i as Js,g as Ws,j as G,q as Te,n as Ks,o as n}from"./core-B-8b0iz9.js";import{J as l,E as Qs,u as Xs,z as y,o as et,d as st,Q as tt,S as B,f as nt,X as at,K as ot,L as F,G as Ae,t as _,M as it,P as rt,T as lt,k as ne}from"./index-DuxR1XDX.js";import"./mui-C33Oegsm.js";import{f as be}from"./analyticsHelper-C6SU-53H.js";import{t as ut}from"./getLocaleForTenant-D57C4sYC.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="10c000b7-1505-4c3b-88c0-8c2c23f1a1ed",o._sentryDebugIdIdentifier="sentry-dbid-10c000b7-1505-4c3b-88c0-8c2c23f1a1ed")}catch{}})();const dt=l((()=>s((()=>import("./NotFoundScreen-BatgS8le.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ct=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),mt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:r,isTenantBankingOnly:k,showChargeCardRoute:U,tenantEmailDomain:v})=>{if(k===!0){if(o)return e.jsx(fe,{tenantEmailDomain:v});if(r)return e.jsx(De,{tenantEmailDomain:v});if(U)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(fe,{tenantEmailDomain:v}):r?e.jsx(De,{tenantEmailDomain:v}):U?e.jsx(ye,{tenantEmailDomain:v}):D?e.jsx(mt,{tenantEmailDomain:v}):N?e.jsx(ct,{tenantEmailDomain:v}):e.jsx(dt,{})},_t={dashboard:()=>s((()=>import("./DashboardRoutes-B4NxbMLL.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-07S7DRSx.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-B8NK1spY.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-CKeYxgtl.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-Bh4g9wCj.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-DRBiAxJk.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-BO6dVldC.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-CypmG1ct.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-BW9gVxz9.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-DsNk_W1Q.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-C9tsCt7G.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-Bgi1019U.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},Et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},ht=l((()=>s((()=>import("./ReportsRoutes-DRBiAxJk.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),pt=l((()=>s((()=>import("./AddressRoutes-DfkTMfYF.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),xt=l((()=>s((()=>import("./PeopleRoutes-CypmG1ct.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),gt=l((()=>s((()=>import("./PandLWithForecastRoutes-DiipWbFp.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),Rt=l((()=>s((()=>import("./CustomerOnboardingRoutes-BFFEQyjG.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),jt=l((()=>s((()=>import("./VendorsRoutes-C9tsCt7G.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),It=l((()=>s((()=>import("./TransactionDetailRoutes-L8u6TmTF.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-BPqa4e5a.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),Tt=l((()=>s((()=>import("./DashboardRoutes-B4NxbMLL.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-07S7DRSx.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),At=l((()=>s((()=>import("./SettingsRoutes-Bh4g9wCj.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),bt=l((()=>s((()=>import("./InvoicingRoutes-CxKyyTQc.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Ue=l((()=>s((()=>import("./ReimbursementRoutes-B8NK1spY.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),Dt=l((()=>s((()=>import("./ZeniAccountRoutes-Bgi1019U.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),ft=l((()=>s((()=>import("./TreasuryRoutes-DsNk_W1Q.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),yt=l((()=>s((()=>import("./TransactionListRoutes-CKeYxgtl.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),Ct=l((()=>s((()=>import("./ChargeCardRoutes-BO6dVldC.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),vt=l((()=>s((()=>import("./NotificationRoutes-i3qnEWcR.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ut=l((()=>s((()=>import("./PerformanceRoutes-eA0QwQYt.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ot=l((()=>s((()=>import("./ExpenseAutomationRoutes-BW9gVxz9.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Pt=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-BfyrJWDJ.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),wt=l((()=>s((()=>import("./RewardsRoutes-DqoIHOPS.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Ft=l((()=>s((()=>import("./TaskRoutes-BiQOVouS.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),Lt=l((()=>s((()=>import("./AiCfoScreen-SBmgGufP.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Oe=l((()=>s((()=>import("./CardsAiCfoScreen-DkokQGnk.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-BatgS8le.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),kt=l((()=>s((()=>import("./TaskListScreen-h6ryhshy.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Vt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:r,showTreasuryRoute:k,isTenantBankingOnly:U,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(U===!0){if(D)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):r?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),zt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Ys(),N=qs(),{tenantEmailDomain:r}=Js(),k=Qs().mode,{setLoading:U,clearAllLoading:v,clearLoading:V}=Xs(),f=y.getSignedInUserTenant(r)?.tenantId,I=y.getSignedInUser(),W=hs(I),$=Ws(),[L,we]=P.useState(!1),i=G((a=>ps(a))),{useFeatureGate:H}=et(),M=st(),K=tt(),Fe=!!i.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=i.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=H(B.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(B.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?xs(oe,i):void 0,Q=p==="Completed"||T==="Completed"?gs(i):void 0,ie=p==="Completed"||T==="Completed"?Rs(i)&&!js(i):void 0,Ve=nt(i,ke,oe),{isCardsHidden:He}=at(i?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:X}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||lt==="DEV",Ze=i?.userRole!=null&&Is(i.userRole),z=G((a=>Ts(a)));if(r!=null){const a=y.getSignedInUserTenant(r);I!=null&&a!=null&&be(I,i,k)}const Z={tenantId:f,userId:I?.userId,sessionId:I?.zeniSessionId},re=As(),h=ot(),Ge=i.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=bs(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,Ye=G((a=>Z.tenantId!=null?Ds(a,Z.tenantId):void 0));P.useEffect((()=>{U(F.TENANT_FETCHING),o(r)}),[r]),P.useEffect((()=>{if(se!=null&&f!=null){const a=se.split("-");if(a.length===2){const A=fs(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=Cs();t.isAfter(d,"month")===!1?D(vs(f,{month:A,year:c})):N(`/${r}/month_end_close_checks/review`)}}}),[se,r,f]),P.useEffect((()=>{L||(we(!0),U(F.TENANT_FETCHING))}),[L,Z,re,I,D,y]),P.useLayoutEffect((()=>{!Us(re,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(ut(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,D,Ye))}),[f]),P.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(a,A,c,t,d,Y,S){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const q=t!=null&&d?.zeniSessionId!=null,ms=c==null||c.tenantId!==t,_s=c!=null&&c.excludedResources==null,Es=c!=null&&c.externalConnections==null;if(q&&ms){S(Re(t));const J=y.getSignedInUserTenantWithId(t);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)))}else q&&_s&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&Es&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(q){ne.identify(d.userId,{tenant_id:t});const J=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),Y(F.TENANT_FETCHING),S(zs(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,i,f,I,U,D))}),[f,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Os(z.tenantsBaseInOrder)),I!=null&&be(I,i,k,void 0,z.tenantsBaseInOrder))}),[z,T,i,I]),P.useEffect((()=>{p==="In-Progress"&&U(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(v(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=Et,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=_t[d];Y!=null?Y().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const O=i?.userRole!=null&&Ps(i?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:Je}=H(B.isAccrualEnabled),We=it(),Ke=i?.userRole!=null&&i.userRole.includes("charge_card_user"),Qe=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),w=i?.userRole!=null&&pe(i.userRole),ue=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!O,de=!Se&&!O,Xe=ws(h?.loggedInUserRoleMap),es=i.externalConnections?.accounting[0]?.isValid,ss=i.externalConnections?.fetchState==="Completed",te=i.company?.companyOnboardingInfo.isOnboardingCompleted,ce=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!O,me=ce&&Fs(h?.loggedInUserRoleMap),_e=Fe&&!O,ts=Le&&!O,ns=ue&&Ls(h?.loggedInUserRoleMap),as=de&&ks(h?.loggedInUserRoleMap),os=_e&&Vs(h?.loggedInUserRoleMap),is=Hs(h?.loggedInUserRoleMap),rs=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),ds=Ms(h?.loggedInUserRoleMap),x=Zs(h?.loggedInUserRoleMap),g=Gs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&ls,j=ts&&us,m=de&&ds,cs=i.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Xe===!0||is===!0||rs===!0;return y.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&D(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||W&&!ee)&&ss&&es!==!0&&E===!1&&Q===!1&&ie===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||ie!==!0||te!==!0||ee||W?!L||te!==!1||ee||W?L&&i?.userRole&&E!=null&&Q!=null&&r!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(rt,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Vt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(Tt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"people/*",element:cs||w?e.jsx(xt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(gt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(Rt,{})}),e.jsx(n,{path:"transaction/*",element:w&&O===!1||Ke||Qe?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"transactions/*",element:w&&O===!1?e.jsx(yt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"customer/*",element:w&&O===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"vendor/*",element:w&&O===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"tasks",element:e.jsx(kt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ft,{})}),e.jsx(n,{path:"address/*",element:ns||me||os||as?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Dt,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(ft,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Ut,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&O===!1?e.jsx(Ot,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&O===!1&&Je===!0&&We===!0?e.jsx(Pt,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(vt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(jt,{}):e.jsx(b,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Ue,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(At,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Oe,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Ct,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(wt,{}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(Lt,{isFileUploadEnabled:X}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${r}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${r}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,zt as S};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-C2GrPpNy.js","assets/sentry-BCPOyc0G.js","assets/core-Caq7Zbsp.js","assets/zeni-epic-state-DROyxOLw.js","assets/index-DOXJLxdR.js","assets/mui-DI0hUuFr.js","assets/analytics-CiEh1qKr.js","assets/utils-rX2IEvjD.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-CIiFmVuR.js","assets/withTransactionSidePanel-C1wVwRW0.js","assets/useAskAiCfoHostNavButtonProps-BvhP40c_.js","assets/TransactionDetailScreen-fc6wRDCa.js","assets/decodeURIComponentSafe-DmjyT4t5.js","assets/useInitialThreadRequest-uu8NipM7.js","assets/routePaths-C1OqXYGB.js","assets/expenseAutomationHelper-B83Qa5Jl.js","assets/stripSplatSuffix-Dmnnw5Oe.js","assets/analyticsHelper-DHPcRAai.js","assets/CompanyPassportScreen-C0r5_u0C.js","assets/MobileAppDrawer-DqgtjBKX.js","assets/InboxNotificationsProvider-DcarX1j5.js","assets/useTaskManagerAccess-DxrmaJfc.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BO7_rPaJ.js","assets/FeaturePreviewScreen-t-KcIePh.js","assets/BillPayRoutes-CxGXv0Eb.js","assets/AddressScreen-DwDn6adU.js","assets/DomesticWireDetailScreen-C8g5HYbF.js","assets/BusinessVerificationPageScreen-CWJBny4J.js","assets/DrawerScreen-jGeXohet.js","assets/SetupPagesScreen-BccJSzRN.js","assets/BillPayApprovalRoutes-uF3lLPXa.js","assets/ReimbursementApprovalRuleDetailScreen-Bf1LI70e.js","assets/getLocaleForTenant-YgJPw-1W.js","assets/ReimbursementRoutes-ByU4nWbt.js","assets/ReimbursementApprovalRoutes-DVM8rE5F.js","assets/TransactionListRoutes-DoEWtZb8.js","assets/ZeniAccountStatementScreen-xKZWX655.js","assets/SettingsRoutes-CYdVWZYv.js","assets/AccountMappingScreen-DwM3_WTC.js","assets/QBOConnectionScreen-Chdjbcg8.js","assets/empty-CviwvzhB.js","assets/index-Bi5Vnzzf.js","assets/url-CdxI2rEH.js","assets/index-BggnOuo1.js","assets/accountMappingHelper-DpfYWNe6.js","assets/useEmailConnectResultRefresh-QqukN5jp.js","assets/ReportsRoutes-Be1H67SI.js","assets/ChargeCardRoutes-CBA-C6S5.js","assets/useChargeCardPusherEvents-2nVivR1x.js","assets/PeopleRoutes-By-929Rc.js","assets/ExpenseAutomationRoutes-BhSlFN1-.js","assets/useActualMatchingMatchDetail-6t8vcRTI.js","assets/ScheduleDetailsPrepaidExpensesScreen-HIrqgD7A.js","assets/pathToGoBack-Ch5lrOj1.js","assets/TreasuryRoutes-BwZlVh2U.js","assets/VendorsRoutes-rWAhbgUX.js","assets/ZeniAccountRoutes-BqSVR2HC.js","assets/AddressRoutes-CRWje5aU.js","assets/PandLWithForecastRoutes-x9MBz-SJ.js","assets/CustomerOnboardingRoutes-BFK8USjA.js","assets/TransactionDetailRoutes-BFj2-oES.js","assets/EntityDetailRoutes-DDbPZyaE.js","assets/InvoicingRoutes-BQHOoyRc.js","assets/NotificationRoutes-C1V1-m3K.js","assets/PerformanceRoutes-DwUVercL.js","assets/ActualMatchingMatchDetailScreen---3NQIlW.js","assets/RewardsRoutes-iweGs61q.js","assets/TaskRoutes-DY92MrHK.js","assets/TaskListScreen-DQj6h_q_.js","assets/useTaskManagerPusherEvents-D5Hm7um3.js","assets/AiCfoScreen-CmI1WP3p.js","assets/CardsAiCfoScreen-DTmIk225.js"])))=>i.map(i=>d[i]);
2
+ import{_ as s,bn as hs,fF as ps,d_ as xs,dZ as gs,B1 as Rs,di as js,c8 as Is,gJ as Ts,g9 as As,df as pe,cG as bs,gn as Ds,cy as fs,bE as ys,br as Cs,Ue as vs,v as Os,Uh as Us,bq as Ps,Ui as ws,bK as Fs,bJ as Ls,bt as ks,cu as Vs,Uj as Hs,Uk as Ss,da as Bs,dd as Ns,dc as Ms,cF as Zs,cM as Gs,pS as xe,gi as ge,gY as $s,gk as Re,gL as je,gM as Ie,gl as zs}from"./zeni-epic-state-DROyxOLw.js";import{j as e}from"./liveblocks-CIxx6Ub6.js";import{a as P}from"./sentry-BCPOyc0G.js";import{N as u,u as Ys,h as qs,i as Ws,g as Js,j as G,q as Te,n as Xs,o as n}from"./core-Caq7Zbsp.js";import{M as l,E as Ks,u as Qs,z as y,N as et,d as st,Q as tt,f as B,g as nt,X as at,W as ot,L as F,G as Ae,t as _,O as it,P as rt,S as lt,k as ne}from"./index-DOXJLxdR.js";import"./mui-DI0hUuFr.js";import{f as be}from"./analyticsHelper-DHPcRAai.js";import{t as ut}from"./getLocaleForTenant-YgJPw-1W.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},D=new o.Error().stack;D&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[D]="8024086d-24f5-45c6-9b98-c1db8338a382",o._sentryDebugIdIdentifier="sentry-dbid-8024086d-24f5-45c6-9b98-c1db8338a382")}catch{}})();const dt=l((()=>s((()=>import("./NotFoundScreen-C2GrPpNy.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ct=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),mt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),C=({showZeniAccountRoute:o,isUserHasBillPayAccess:D,isUserHasReimbursementAccess:N,showTreasuryRoute:r,isTenantBankingOnly:k,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(k===!0){if(o)return e.jsx(fe,{tenantEmailDomain:v});if(r)return e.jsx(De,{tenantEmailDomain:v});if(O)return e.jsx(ye,{tenantEmailDomain:v})}return o?e.jsx(fe,{tenantEmailDomain:v}):r?e.jsx(De,{tenantEmailDomain:v}):O?e.jsx(ye,{tenantEmailDomain:v}):D?e.jsx(mt,{tenantEmailDomain:v}):N?e.jsx(ct,{tenantEmailDomain:v}):e.jsx(dt,{})},_t={dashboard:()=>s((()=>import("./DashboardRoutes-CIiFmVuR.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])),bills:()=>s((()=>import("./BillPayRoutes-CxGXv0Eb.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-ByU4nWbt.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])),transactions:()=>s((()=>import("./TransactionListRoutes-DoEWtZb8.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])),settings:()=>s((()=>import("./SettingsRoutes-CYdVWZYv.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])),reports:()=>s((()=>import("./ReportsRoutes-Be1H67SI.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CBA-C6S5.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])),people:()=>s((()=>import("./PeopleRoutes-By-929Rc.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-BhSlFN1-.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])),treasury:()=>s((()=>import("./TreasuryRoutes-BwZlVh2U.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])),vendors:()=>s((()=>import("./VendorsRoutes-rWAhbgUX.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BqSVR2HC.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8]))},Et=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},ht=l((()=>s((()=>import("./ReportsRoutes-Be1H67SI.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,0,24,14,15,20,21,22,8])))),pt=l((()=>s((()=>import("./AddressRoutes-CRWje5aU.js")),__vite__mapDeps([58,1,2,3,26,4,5,6,7,0,8])))),xt=l((()=>s((()=>import("./PeopleRoutes-By-929Rc.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,11,20,21,22,8])))),gt=l((()=>s((()=>import("./PandLWithForecastRoutes-x9MBz-SJ.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,0,24,11,14,15,20,21,22,8])))),Rt=l((()=>s((()=>import("./CustomerOnboardingRoutes-BFK8USjA.js")),__vite__mapDeps([60,1,2,3,26,4,5,6,7,0,40,41,42,43,44,13,46,49,8])))),jt=l((()=>s((()=>import("./VendorsRoutes-rWAhbgUX.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,26,0,24,53,54,15,11,20,21,22,29,45,8])))),It=l((()=>s((()=>import("./TransactionDetailRoutes-BFj2-oES.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-DDbPZyaE.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,8])))),Tt=l((()=>s((()=>import("./DashboardRoutes-CIiFmVuR.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,0,18,19,20,21,22,23,24,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-CxGXv0Eb.js")),__vite__mapDeps([25,1,2,3,4,5,6,7,26,0,27,11,14,28,15,20,21,22,29,24,30,18,31,32,33,8])))),At=l((()=>s((()=>import("./SettingsRoutes-CYdVWZYv.js")),__vite__mapDeps([38,1,2,3,4,5,6,7,22,39,20,21,40,41,42,43,44,13,45,26,0,18,28,15,19,46,31,32,35,8])))),bt=l((()=>s((()=>import("./InvoicingRoutes-BQHOoyRc.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,26,0,20,21,22,40,41,42,43,44,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-ByU4nWbt.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,11,14,29,35,32,33,8])))),Dt=l((()=>s((()=>import("./ZeniAccountRoutes-BqSVR2HC.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,24,27,26,11,37,8])))),ft=l((()=>s((()=>import("./TreasuryRoutes-BwZlVh2U.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,30,28,15,20,21,22,18,11,14,24,8])))),yt=l((()=>s((()=>import("./TransactionListRoutes-DoEWtZb8.js")),__vite__mapDeps([36,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,37,8])))),Ct=l((()=>s((()=>import("./ChargeCardRoutes-CBA-C6S5.js")),__vite__mapDeps([48,1,2,3,4,5,6,7,11,20,21,22,30,28,15,0,18,14,49,26,8])))),vt=l((()=>s((()=>import("./NotificationRoutes-C1V1-m3K.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,11,22,8])))),Ot=l((()=>s((()=>import("./PerformanceRoutes-DwUVercL.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,11,20,21,22,8])))),Ut=l((()=>s((()=>import("./ExpenseAutomationRoutes-BhSlFN1-.js")),__vite__mapDeps([51,1,2,3,0,4,5,6,7,11,12,13,14,15,16,52,17,10,53,54,45,29,8])))),Pt=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen---3NQIlW.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,52,17,13,15,0,8])))),wt=l((()=>s((()=>import("./RewardsRoutes-iweGs61q.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,0,8])))),Ft=l((()=>s((()=>import("./TaskRoutes-DY92MrHK.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,14,20,21,22,69,11,70,8])))),Lt=l((()=>s((()=>import("./AiCfoScreen-CmI1WP3p.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,23,54,15,70,8])))),Ue=l((()=>s((()=>import("./CardsAiCfoScreen-DTmIk225.js")),__vite__mapDeps([72,1,2,3,4,5,6,7,8])))),b=l((()=>s((()=>import("./NotFoundScreen-C2GrPpNy.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),kt=l((()=>s((()=>import("./TaskListScreen-DQj6h_q_.js").then((o=>o.f))),__vite__mapDeps([69,1,2,3,4,5,6,7,11,20,21,22,70,8])))),Vt=({isDashboardAccess:o,showZeniAccountRoute:D,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:r,showTreasuryRoute:k,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(O===!0){if(D)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):D?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):r?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Pe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),zt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const D=Ys(),N=qs(),{tenantEmailDomain:r}=Ws(),k=Ks().mode,{setLoading:O,clearAllLoading:v,clearLoading:V}=Qs(),f=y.getSignedInUserTenant(r)?.tenantId,I=y.getSignedInUser(),J=hs(I),$=Js(),[L,we]=P.useState(!1),i=G((a=>ps(a))),{useFeatureGate:H}=et(),M=st(),X=tt(),Fe=!!i.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=i.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=H(B.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=H(B.isDebitCardFeatureEnabled),T=G((a=>a.tenantState.fetchState)),p=G((a=>a.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?xs(oe,i):void 0,K=p==="Completed"||T==="Completed"?gs(i):void 0,ie=p==="Completed"||T==="Completed"?Rs(i)&&!js(i):void 0,Ve=nt(i,ke,oe),{isCardsHidden:He}=at(i?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=H(B.isSettingsFeatureEnabled),{isFeatureEnabled:Q}=H(B.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=H(B.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||lt==="DEV",Ze=i?.userRole!=null&&Is(i.userRole),z=G((a=>Ts(a)));if(r!=null){const a=y.getSignedInUserTenant(r);I!=null&&a!=null&&be(I,i,k)}const Z={tenantId:f,userId:I?.userId,sessionId:I?.zeniSessionId},re=As(),h=ot(),Ge=i.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),$e=bs(h?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,ze=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=ze?.params.selectedPeriod,Ye=G((a=>Z.tenantId!=null?Ds(a,Z.tenantId):void 0));P.useEffect((()=>{O(F.TENANT_FETCHING),o(r)}),[r]),P.useEffect((()=>{if(se!=null&&f!=null){const a=se.split("-");if(a.length===2){const A=fs(Number(a[0])),c=Number(a[1]),t=ys(`01-${A<10?`0${A}`:A}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=Cs();t.isAfter(d,"month")===!1?D(vs(f,{month:A,year:c})):N(`/${r}/month_end_close_checks/review`)}}}),[se,r,f]),P.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,Z,re,I,D,y]),P.useLayoutEffect((()=>{!Os(re,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t){if(ge(A?.userId,A?.zeniSessionId,a.tenantId),c($s(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(ut(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,I,D,Ye))}),[f]),P.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,A,c,t,d,Y,S){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const q=t!=null&&d?.zeniSessionId!=null,ms=c==null||c.tenantId!==t,_s=c!=null&&c.excludedResources==null,Es=c!=null&&c.externalConnections==null;if(q&&ms){S(Re(t));const W=y.getSignedInUserTenantWithId(t);W?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(W?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)))}else q&&_s&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),S(je(d.userId,t))),q&&Es&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),S(Ie(d.userId,t)));if(q){ne.identify(d.userId,{tenant_id:t});const W=t==null||t!=null&&(A==="Completed"||A==="Error");a==="Completed"||A!=="Not-Started"&&A!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),Y(F.TENANT_FETCHING),S(zs(d.userId,t,d.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),S(xe(d.userId,d.zeniSessionId)))}})(T,p,i,f,I,O,D))}),[f,p]),P.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&z.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),y.saveSignedInUserTenants(Us(z.tenantsBaseInOrder)),I!=null&&be(I,i,k,void 0,z.tenantsBaseInOrder))}),[z,T,i,I]),P.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&f!=null?(v(),_.markActiveTenantFetchCompleted(f)):p==="Error"&&f!=null&&(_.markActiveTenantFetchFailed(f),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,f,L]);const le=P.useRef(!1);P.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(a=Et,A=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],Y=_t[d];Y!=null?Y().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),A)})())}),[p,L]);const U=i?.userRole!=null&&Ps(i?.userRole),{isFeatureEnabled:qe}=H(B.isReferralFeatureEnabled),{isFeatureEnabled:We}=H(B.isAccrualEnabled),Je=it(),Xe=i?.userRole!=null&&i.userRole.includes("charge_card_user"),Ke=i?.userRole!=null&&i.userRole.includes("charge_card_admin"),w=i?.userRole!=null&&pe(i.userRole),ue=i?.company==null||i.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,de=!Se&&!U,Qe=ws(h?.loggedInUserRoleMap),es=i.externalConnections?.accounting[0]?.isValid,ss=i.externalConnections?.fetchState==="Completed",te=i.company?.companyOnboardingInfo.isOnboardingCompleted,ce=i?.company==null||i.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,me=ce&&Fs(h?.loggedInUserRoleMap),_e=Fe&&!U,ts=Le&&!U,ns=ue&&Ls(h?.loggedInUserRoleMap),as=de&&ks(h?.loggedInUserRoleMap),os=_e&&Vs(h?.loggedInUserRoleMap),is=Hs(h?.loggedInUserRoleMap),rs=Ss(h?.loggedInUserRoleMap),ls=Bs(h?.loggedInUserRoleMap),us=Ns(h?.loggedInUserRoleMap),ds=Ms(h?.loggedInUserRoleMap),x=Zs(h?.loggedInUserRoleMap),g=Gs(h?.loggedInUserRoleMap),Ee=ue&&x,he=ce&&g,R=_e&&ls,j=ts&&us,m=de&&ds,cs=i.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||$e===!0||Qe===!0||is===!0||rs===!0;return y.isSignedIn()?f==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&T!=="In-Progress"&&D(xe(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(te===!0||J&&!ee)&&ss&&es!==!0&&E===!1&&K===!1&&ie===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||ie!==!0||te!==!0||ee||J?!L||te!==!1||ee||J?L&&i?.userRole&&E!=null&&K!=null&&r!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(Xs,{children:e.jsxs(n,{element:e.jsx(rt,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Vt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(Tt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ht,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"people/*",element:cs||w?e.jsx(xt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(gt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(Rt,{})}),e.jsx(n,{path:"transaction/*",element:w&&U===!1||Xe||Ke?e.jsx(It,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"transactions/*",element:w&&U===!1?e.jsx(yt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"customer/*",element:w&&U===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"vendor/*",element:w&&U===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"tasks",element:e.jsx(kt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Ft,{})}),e.jsx(n,{path:"address/*",element:ns||me||os||as?e.jsx(pt,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Dt,{}):e.jsx(b,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(ft,{}):e.jsx(b,{})}),e.jsx(n,{path:"performance",element:X===!0?e.jsx(Ot,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:X===!0&&U===!1?e.jsx(Ut,{}):e.jsx(Pe,{tenantEmailDomain:r})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:X===!0&&U===!1&&We===!0&&Je===!0?e.jsx(Pt,{}):e.jsx(b,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(vt,{})}),e.jsx(n,{path:"vendors/*",element:Ge?e.jsx(jt,{}):e.jsx(b,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(C,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:r})}),e.jsx(n,{path:"settings/*",element:Be?e.jsx(At,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(bt,{}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ue,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Ct,{}):e.jsx(b,{})}),e.jsx(n,{path:"rewards/*",element:qe?e.jsx(wt,{}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(Lt,{isFileUploadEnabled:Q}):e.jsx(b,{})}),e.jsx(n,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${r}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${r}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{C as F,zt as S};
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-BjcYyeQ6.js";import{a as d}from"./sentry-DZ9rNYfw.js";import{h as N,g as H,u as _,i as O,j as C,l as K,n as Q,o as k}from"./core-B-8b0iz9.js";import{fF as w,Zs as Pe,NG as ve,Z0 as we,Z9 as Ae,c8 as W,cT as De,cU as Ue,bq as _e,de as Me,F$ as Re,Zt as Te,P7 as Be,Mx as Ze,Mo as de,Ml as Fe,G3 as ue,Mr as pe,Mu as ge,MA as Y,Cd as ee,G2 as Ve,lu as $,lx as me,Zu as Ne,mH as Oe,Gk as Le,VH as Ge,VI as $e,ls as He,Zv as Ke,lv as qe,uE as ze,VC as Je,VD as Qe,uI as Xe,hV as We,UB as J,hN as ae,hK as Ye,hS as en,UC as nn,Gh as tn,Zw as an,Zx as on,MO as sn,l$ as rn,dZ as fe,d_ as he,Zy as ln,gC as cn,UR as dn,Gg as oe,gH as se,gG as un,Gf as pn,gF as gn,gE as mn,Zz as fn,U1 as Ce,ZA as hn,ZB as Cn,ZC as yn,ZD as Sn,ZE as bn,ZF as In,Gn as xn,ZG as En,Ge as ie,G8 as G,ZH as kn,ZI as jn,ZJ as re,ZK as Pn,dS as vn,ZL as wn,ZM as An,ZN as Dn,Ud as Un,c0 as _n,c7 as Mn,c6 as Rn,c1 as Tn,ZO as Bn,c4 as Zn,c3 as Fn,c5 as Vn,c2 as Nn}from"./zeni-epic-state-95zxmizy.js";import{bU as On,z as v,K as L,a8 as ne,c4 as Ln,k as q,o as te,S as F,f as ye,X as Se,c5 as Gn,j as $n,_ as be,c6 as Hn,aj as Kn,c7 as qn,c8 as zn,ar as Jn,c9 as Qn,p as Xn,c as Ie,ca as Wn}from"./index-DuxR1XDX.js";import{n as B}from"./mui-C33Oegsm.js";import{u as xe}from"./useTaskManagerAccess-ECD0Ec-b.js";import{U as Yn}from"./AccountMappingScreen-Dt4x9DJz.js";import{t as et,A as nt}from"./AddressScreen-DvJ6yyMx.js";import V from"./NotFoundScreen-BatgS8le.js";import{g as tt}from"./analyticsHelper-C6SU-53H.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-B20TVwus.js";import{C as st}from"./CompanyPassportScreen-BEG9__1k.js";import{M as R}from"./MobileAppDrawer-0TaE2Qid.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-BwFVhfcX.js";import{q as le}from"./QBOConnectionScreen-BiN0lu_W.js";import{B as lt}from"./BillPayApprovalRoutes-BxCZdf21.js";import{R as ct}from"./ReimbursementApprovalRoutes-ryr0mHPH.js";import"./recharts-DkYxIsLi.js";import"./analytics-8lQ_GaR7.js";import"./plaid-Bt28AVCt.js";import"./dnd-CtOxA7uX.js";import"./stripe-cKAAJElX.js";import"./lottie-BdAYiWcR.js";import"./lexical-BVt4M34U.js";import"./pdf-BkfulyEw.js";import"./utils-D3rZq_G4.js";import"./accountMappingHelper-Ci74NLEW.js";import"./routePaths-B1syYHWh.js";import"./InboxNotificationsProvider-B4UF_uUg.js";import"./empty-CyiOIGJw.js";import"./pdf-lib-D8o-uP9K.js";import"./index-CgYr_9vs.js";import"./url-BjdrSaU1.js";import"./index-CzpjeHcU.js";import"./decodeURIComponentSafe-hAviH84T.js";import"./ReimbursementApprovalRuleDetailScreen-CRU8C8RZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="22657330-33ae-4c6f-8a85-73cd0ad6283d",e._sentryDebugIdIdentifier="sentry-dbid-22657330-33ae-4c6f-8a85-73cd0ad6283d")}catch{}})();const dt=B.div`
1
+ import{j as a}from"./liveblocks-CIxx6Ub6.js";import{a as d}from"./sentry-BCPOyc0G.js";import{h as V,g as H,u as _,i as O,j as C,l as K,n as Q,o as k}from"./core-Caq7Zbsp.js";import{fF as w,Zs as Pe,NG as ve,Z0 as we,Z9 as Ae,c8 as X,cT as De,cU as Ue,bq as _e,de as Me,F$ as Re,Zt as Te,P7 as Be,Mx as Ze,Mo as de,Ml as Fe,G3 as ue,Mr as pe,Mu as ge,MA as Y,Cd as ee,G2 as Ne,lu as $,lx as me,Zu as Ve,mH as Oe,Gk as Le,VH as Ge,VI as $e,ls as He,Zv as Ke,lv as qe,uE as ze,VC as Je,VD as Qe,uI as We,hV as Xe,UB as J,hN as ae,hK as Ye,hS as en,UC as nn,Gh as tn,Zw as an,Zx as on,MO as sn,l$ as rn,dZ as fe,d_ as he,Zy as ln,gC as cn,UR as dn,Gg as oe,gH as se,gG as un,Gf as pn,gF as gn,gE as mn,Zz as fn,U1 as Ce,ZA as hn,ZB as Cn,ZC as yn,ZD as Sn,ZE as bn,ZF as In,Gn as xn,ZG as En,Ge as ie,G8 as G,ZH as kn,ZI as jn,ZJ as re,ZK as Pn,dS as vn,ZL as wn,ZM as An,ZN as Dn,Ud as Un,c0 as _n,c7 as Mn,c6 as Rn,c1 as Tn,ZO as Bn,c4 as Zn,c3 as Fn,c5 as Nn,c2 as Vn}from"./zeni-epic-state-DROyxOLw.js";import{bU as On,z as v,W as L,a8 as ne,c4 as Ln,k as q,N as te,f as F,g as ye,X as Se,c5 as Gn,l as $n,_ as be,c6 as Hn,aj as Kn,c7 as qn,c8 as zn,ar as Jn,c9 as Qn,p as Wn,c as Ie,ca as Xn}from"./index-DOXJLxdR.js";import{n as B}from"./mui-DI0hUuFr.js";import{u as xe}from"./useTaskManagerAccess-DxrmaJfc.js";import{U as Yn}from"./AccountMappingScreen-DwM3_WTC.js";import{t as et,A as nt}from"./AddressScreen-DwDn6adU.js";import N from"./NotFoundScreen-C2GrPpNy.js";import{g as tt}from"./analyticsHelper-DHPcRAai.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-CWJBny4J.js";import{C as st}from"./CompanyPassportScreen-C0r5_u0C.js";import{M as R}from"./MobileAppDrawer-DqgtjBKX.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-QqukN5jp.js";import{q as le}from"./QBOConnectionScreen-Chdjbcg8.js";import{B as lt}from"./BillPayApprovalRoutes-uF3lLPXa.js";import{R as ct}from"./ReimbursementApprovalRoutes-DVM8rE5F.js";import"./recharts-DKmpCGIA.js";import"./analytics-CiEh1qKr.js";import"./plaid-CXvI7t9H.js";import"./dnd-DwckO6rX.js";import"./stripe-cKAAJElX.js";import"./lottie-CrKh4Q_r.js";import"./lexical-mmp2B1vq.js";import"./pdf-BlhN83fm.js";import"./utils-rX2IEvjD.js";import"./accountMappingHelper-DpfYWNe6.js";import"./routePaths-C1OqXYGB.js";import"./InboxNotificationsProvider-DcarX1j5.js";import"./empty-CviwvzhB.js";import"./pdf-lib-WBpN-CHj.js";import"./index-Bi5Vnzzf.js";import"./url-CdxI2rEH.js";import"./index-BggnOuo1.js";import"./decodeURIComponentSafe-DmjyT4t5.js";import"./ReimbursementApprovalRuleDetailScreen-Bf1LI70e.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="86c676ce-b581-439d-9b4d-a76c2fa68690",e._sentryDebugIdIdentifier="sentry-dbid-86c676ce-b581-439d-9b4d-a76c2fa68690")}catch{}})();const dt=B.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as a}from"./liveblocks-BjcYyeQ6.js";import{a as d}from"./sentry-DZ9rNYf
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,ut=K((function(e,l){const o=w(e),i=we(e),r=Ae(e),n=l.roleMap.bill_pay_admin;return{isDisabled:(W(o?.userRole??[])||n)&&"readonly",billpayApprovalView:i,remiApproverView:r,analytics:q}}),(function(e,l){const{navigate:o,currentTenant:i}=l;return{onSetupApprovalRulesBillPaySectionClick:()=>{o("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{o("reimbursements/approval-rules")},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))(Ln),pt=()=>{const e=N(),l=H(),o=_(),{tenantEmailDomain:i}=O(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),c=C((g=>w(g)));at();const u=C((g=>g.remiSetupApproverViewState.fetchState)),h=C((g=>Pe(g))),{isApprovalRulesV3Enabled:S,isLoading:m}=On(c?.tenantId),p=c.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const b=L();d.useEffect((()=>{t||u!=="Not-Started"||m||c?.tenantId==null||(s(!0),o(ve(!0,!1,!1,S)))}),[t,u,m,S,c?.tenantId,o]);const E=g=>{n(g)};return b?.loggedInUserRoleMap!=null?a.jsxs(dt,{children:[a.jsx(R,{isAppContentDrawerOpen:r,handleDrawerToggle:E}),a.jsx(ut,{navigate:e,location:l,companyId:p,currentTenant:c,roleMap:b.loggedInUserRoleMap,onClickMenuIcon:()=>{E(!0)}})]}):a.jsx(ne,{fetchState:h.fetchState})},gt=B.div`
9
+ `,ut=K((function(e,l){const o=w(e),i=we(e),r=Ae(e),n=l.roleMap.bill_pay_admin;return{isDisabled:(X(o?.userRole??[])||n)&&"readonly",billpayApprovalView:i,remiApproverView:r,analytics:q}}),(function(e,l){const{navigate:o,currentTenant:i}=l;return{onSetupApprovalRulesBillPaySectionClick:()=>{o("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{o("reimbursements/approval-rules")},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))(Ln),pt=()=>{const e=V(),l=H(),o=_(),{tenantEmailDomain:i}=O(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),c=C((g=>w(g)));at();const u=C((g=>g.remiSetupApproverViewState.fetchState)),h=C((g=>Pe(g))),{isApprovalRulesV3Enabled:S,isLoading:m}=On(c?.tenantId),p=c.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const b=L();d.useEffect((()=>{t||u!=="Not-Started"||m||c?.tenantId==null||(s(!0),o(ve(!0,!1,!1,S)))}),[t,u,m,S,c?.tenantId,o]);const E=g=>{n(g)};return b?.loggedInUserRoleMap!=null?a.jsxs(dt,{children:[a.jsx(R,{isAppContentDrawerOpen:r,handleDrawerToggle:E}),a.jsx(ut,{navigate:e,location:l,companyId:p,currentTenant:c,roleMap:b.loggedInUserRoleMap,onClickMenuIcon:()=>{E(!0)}})]}):a.jsx(ne,{fetchState:h.fetchState})},gt=B.div`
10
10
  display: flex;
11
11
  height: 100%;
12
12
  width: 100%;
@@ -14,7 +14,7 @@ import{j as a}from"./liveblocks-BjcYyeQ6.js";import{a as d}from"./sentry-DZ9rNYf
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${e=>e.theme.colors.grey4};
17
- `,mt=K((function(e,l){const{companyId:o,isZeniAccountEnabled:i,isChargeCardEnabled:r,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:s}=l,c=w(e);return{bankSetupView:Te(e,o,n,t,i,r,s),connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:q}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t,s)=>{e(ee(t,n,s))},onEstablishConnectionClick:(n,t,s)=>{e(Y(n,r,t,s))},onUpdatePaymentAccountStatus:(n,t,s,c,u)=>{e(ge(n,t,u,c,s))},onUpdatePaymentAccountLoginStatus:(n,t,s,c)=>{e(pe(!1,n,c,s,t))},onEstablishConnectionSuccess:(n,t)=>{e(ue(t,n))},onUpdateAccountClick:(n,t,s,c,u)=>{e(u==="paymentAccount"?de(n,t,s,c):Fe(c,n,t))},onUpdatePrimaryFundingAccount:(n,t,s)=>{e(Ze(r,t,n,s))},onRemoveConnection:n=>{e(Be(n))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))(Gn),ft=()=>{const e=N(),l=H(),o=_(),{tenantEmailDomain:i}=O(),r=L(),{useFeatureGate:n}=te(),{isFeatureEnabled:t}=n(F.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=n(F.isDebitCardFeatureEnabled),[c,u]=d.useState(!1),[h,S]=d.useState(!1),m=C((A=>w(A))),p=C((A=>A.settingsViewState.bankConnection.fetchState)),b=De(m,r?.loggedInUserRoleMap),E=Ue(m,r?.loggedInUserRoleMap),g=m?.userRole!=null&&_e(m.userRole),P=!!m.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!g,j=m.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!g,M=ye(m,t,s),D=Me(m,r?.loggedInUserRoleMap)&&M,{isCardsHidden:I}=Se(m?.tenantId),x=m.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");d.useEffect((()=>{h||p==="Completed"||(S(!0),o(Re(!1)))}),[h,o,p]);const T=A=>{u(A)};return b||P||E||D?a.jsxs(gt,{children:[a.jsx(R,{isAppContentDrawerOpen:c,handleDrawerToggle:T}),a.jsx(mt,{navigate:e,location:l,companyId:x,currentTenant:m,roleMap:r.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:E,isZeniAccountEnabled:P,isChargeCardEnabled:D,isChargeCardsHidden:I,isTreasuryEnabled:j,onClickMenuIcon:()=>{T(!0)}})]}):a.jsx(V,{})},ht=B.div`
17
+ `,mt=K((function(e,l){const{companyId:o,isZeniAccountEnabled:i,isChargeCardEnabled:r,isBillPayEnabled:n,isRemiEnabled:t,isTreasuryEnabled:s}=l,c=w(e);return{bankSetupView:Te(e,o,n,t,i,r,s),connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:q}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t,s)=>{e(ee(t,n,s))},onEstablishConnectionClick:(n,t,s)=>{e(Y(n,r,t,s))},onUpdatePaymentAccountStatus:(n,t,s,c,u)=>{e(ge(n,t,u,c,s))},onUpdatePaymentAccountLoginStatus:(n,t,s,c)=>{e(pe(!1,n,c,s,t))},onEstablishConnectionSuccess:(n,t)=>{e(ue(t,n))},onUpdateAccountClick:(n,t,s,c,u)=>{e(u==="paymentAccount"?de(n,t,s,c):Fe(c,n,t))},onUpdatePrimaryFundingAccount:(n,t,s)=>{e(Ze(r,t,n,s))},onRemoveConnection:n=>{e(Be(n))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")}}}))(Gn),ft=()=>{const e=V(),l=H(),o=_(),{tenantEmailDomain:i}=O(),r=L(),{useFeatureGate:n}=te(),{isFeatureEnabled:t}=n(F.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=n(F.isDebitCardFeatureEnabled),[c,u]=d.useState(!1),[h,S]=d.useState(!1),m=C((A=>w(A))),p=C((A=>A.settingsViewState.bankConnection.fetchState)),b=De(m,r?.loggedInUserRoleMap),E=Ue(m,r?.loggedInUserRoleMap),g=m?.userRole!=null&&_e(m.userRole),P=!!m.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!g,j=m.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified"&&!g,M=ye(m,t,s),D=Me(m,r?.loggedInUserRoleMap)&&M,{isCardsHidden:I}=Se(m?.tenantId),x=m.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");d.useEffect((()=>{h||p==="Completed"||(S(!0),o(Re(!1)))}),[h,o,p]);const T=A=>{u(A)};return b||P||E||D?a.jsxs(gt,{children:[a.jsx(R,{isAppContentDrawerOpen:c,handleDrawerToggle:T}),a.jsx(mt,{navigate:e,location:l,companyId:x,currentTenant:m,roleMap:r.loggedInUserRoleMap,isBillPayEnabled:b,isRemiEnabled:E,isZeniAccountEnabled:P,isChargeCardEnabled:D,isChargeCardsHidden:I,isTreasuryEnabled:j,onClickMenuIcon:()=>{T(!0)}})]}):a.jsx(N,{})},ht=B.div`
18
18
  display: flex;
19
19
  height: 100%;
20
20
  width: 100%;
@@ -22,7 +22,7 @@ import{j as a}from"./liveblocks-BjcYyeQ6.js";import{a as d}from"./sentry-DZ9rNYf
22
22
  flex-direction: column;
23
23
  align-items: center;
24
24
  background-color: ${e=>e.theme.colors.grey4};
25
- `,Ct=K((function(e,l){const{companyId:o}=l,i=w(e),r=l.roleMap.bill_pay_admin,n=Ne(e,o),{uiState:t}=n,s=(W(i?.userRole??[])||r)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:be.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:s,analytics:q}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t)=>{e(ee("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(Y(n,r,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,s)=>{e(ge(n,t,"billing","billing_setup",s))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(pe(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(de(n,t,"billing","billing_setup"))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(qe(n))},updateCardPaymentModalState:n=>{e(Ke({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,s)=>{e(He(n,t,s))},handleFetchPaymentSources:()=>{e($())},resetCardPaymentViewState:()=>{e($e())},handleResetCardPaymentErrorStatuses:()=>{e(Ge())},onBillingAddressSave:n=>{e(Le(n))},onAddressEditHandler:n=>{if(n!=null){const t=et(n);e(Oe({addressType:"subscription_billing_address",addressToCreate:t}))}}}}))(Hn),yt=()=>{const e=N(),l=H(),o=_(),{tenantEmailDomain:i}=O(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),[c,u]=d.useState(!1),h=C((j=>w(j))),S=C((j=>j.cardPaymentViewState)),m=C((j=>j.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState)),p=$n(S.addCardPaymentSourceStatus.fetchState),b=S.addCardPaymentSourceStatus.fetchState,E=h.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const g=L();d.useEffect((()=>{E!=null&&o(Ve(E,!1))}),[E,o]),d.useEffect((()=>{t||(s(!0),o($()))}),[t,o]),d.useEffect((()=>{c||(me(["card"]),u(!0))}),[c]),d.useEffect((()=>{p==="In-Progress"&&b==="Completed"&&o($())}),[p,b]);const P=j=>{n(j)};return g?.loggedInUserRoleMap!=null?a.jsxs(ht,{children:[a.jsx(R,{isAppContentDrawerOpen:r,handleDrawerToggle:P}),a.jsx(Ct,{navigate:e,location:l,companyId:E,currentTenant:h,roleMap:g.loggedInUserRoleMap,onClickMenuIcon:()=>{P(!0)},googleAPIKey:be.googleMapsAPIKey})]}):a.jsx(ne,{fetchState:m})},X="external_integrations",St=K((function(e){const l=Qe(e,X);return{notifyMeRegisteredSlugs:new Set(l.map((o=>o.additionalInfo)).filter((o=>o!=null)))}}),(function(e,l){const{navigate:o,integrationsView:i,signedInUserEmail:r,tenantEmailDomain:n,tenantId:t}=l;return{onBackClick:()=>{o("../")},onNavigateToDashboard:()=>{o("../dashboard")},onReconnectQBO:()=>{le.init("/connection/auth",n),le.handleClick()},onRefreshClick:()=>{i.integrations.refreshQBO.fetchState!=="In-Progress"&&e(tn())},onSaveChargeBeeCredentials:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="chargebee"))?.connectionId;u!=null&&e(en(t,u,J("revenue"),nn("chargebee"),{api_key:s,site:c}))},onConnectHubSpot:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="hubspot"))?.connectionId;if(u!=null){const h=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:s,client_secret:c,connection_id:u,redirect_uri:h,tenant_id:t}));const S="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(s)}&scope=${encodeURIComponent(S)}&redirect_uri=${encodeURIComponent(h)}`}},onDisconnect:(s,c)=>{e(Ye(t,s,J(c)))},onConnectGmail:()=>{e(ae(t,"gmail",window.location.href))},onConnectOutlook:()=>{e(ae(t,"outlook",window.location.href))},onSaveConnectorCredentials:s=>{e(We(t,J("payments"),s))},onNotifyMe:s=>{q.trackIntegrationsNotifyMeClicked("Settings",s),e(Xe(X,s,r))}}}))(qn),bt=()=>{const e=Kn(),l=N(),o=_(),{tenantEmailDomain:i}=O(),{pendingAutoFocusTabId:r}=it(),[n,t]=d.useState(!1),s=C((I=>I.tenantState.fetchState)),c=C((I=>w(I))),u=c.companyId??v.getSignedInUserTenant(i)?.companyId,h=v.getSignedInUser(),S=L(),m=W(c.userRole??[]);if(h==null)throw Error("Can't access Integrations page without signing in...");d.useEffect((()=>{o(ze(X))}),[o]);const[p,b]=d.useState(!1);d.useEffect((()=>{p||(b(!0),o($()))}),[p,o]);const E=I=>{t(I)},g=C((I=>Je(I,u))),P=C((I=>I.plaidAccountViewState.external_account.plaidConnectionDetails)),{plaidAccounts:j,onAddPlaidAccount:M,onReLoginPlaidAccount:D}=rt({companyId:u??c.companyId});return S?.loggedInUserRoleMap!=null?a.jsxs(It,{children:[a.jsx(R,{isAppContentDrawerOpen:n,handleDrawerToggle:E}),a.jsx(St,{navigate:l,meetingUrl:e("settings_integrations"),onClickMenuIcon:()=>{E(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:h.userEmail??"",tenantEmailDomain:c.tenantEmailDomain??i??"",tenantId:c.tenantId,saveChargeBeeState:g.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:g.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:g.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:g.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:g.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(g.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([I,x])=>[I,x?.message]))),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:s==="In-Progress",autoFocusTabId:r??void 0,plaidAccounts:j,onAddPlaidAccount:M,onReLoginPlaidAccount:D,plaidConnectionDetails:P})]}):a.jsx(ne,{fetchState:s})},It=B.div`
25
+ `,Ct=K((function(e,l){const{companyId:o}=l,i=w(e),r=l.roleMap.bill_pay_admin,n=Ve(e,o),{uiState:t}=n,s=(X(i?.userRole??[])||r)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:t,stripeKey:be.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:s,analytics:q}}),(function(e,l){const{navigate:o,currentTenant:i,companyId:r}=l;return{onFetchLinkTokenClick:(n,t)=>{e(ee("billing_setup",n,t))},onEstablishConnectionClick:n=>{e(Y(n,r,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(ue("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,t,s)=>{e(ge(n,t,"billing","billing_setup",s))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(pe(!1,n,"billing","billing_setup",t))},onUpdateAccountClick:(n,t)=>{e(de(n,t,"billing","billing_setup"))},onBackClick:()=>{i?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&i.companyBillPayInfo.info.isBillPayEnabled===!1?o("../.."):o("../")},onNavigateToDashboard:()=>{o("../dashboard")},handleCreateCardSetupIntent:n=>{e(me(n))},handleConfirmCardSetupIntent:n=>{e(qe(n))},updateCardPaymentModalState:n=>{e(Ke({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,s)=>{e(He(n,t,s))},handleFetchPaymentSources:()=>{e($())},resetCardPaymentViewState:()=>{e($e())},handleResetCardPaymentErrorStatuses:()=>{e(Ge())},onBillingAddressSave:n=>{e(Le(n))},onAddressEditHandler:n=>{if(n!=null){const t=et(n);e(Oe({addressType:"subscription_billing_address",addressToCreate:t}))}}}}))(Hn),yt=()=>{const e=V(),l=H(),o=_(),{tenantEmailDomain:i}=O(),[r,n]=d.useState(!1),[t,s]=d.useState(!1),[c,u]=d.useState(!1),h=C((j=>w(j))),S=C((j=>j.cardPaymentViewState)),m=C((j=>j.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState)),p=$n(S.addCardPaymentSourceStatus.fetchState),b=S.addCardPaymentSourceStatus.fetchState,E=h.companyId??v.getSignedInUserTenant(i)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const g=L();d.useEffect((()=>{E!=null&&o(Ne(E,!1))}),[E,o]),d.useEffect((()=>{t||(s(!0),o($()))}),[t,o]),d.useEffect((()=>{c||(me(["card"]),u(!0))}),[c]),d.useEffect((()=>{p==="In-Progress"&&b==="Completed"&&o($())}),[p,b]);const P=j=>{n(j)};return g?.loggedInUserRoleMap!=null?a.jsxs(ht,{children:[a.jsx(R,{isAppContentDrawerOpen:r,handleDrawerToggle:P}),a.jsx(Ct,{navigate:e,location:l,companyId:E,currentTenant:h,roleMap:g.loggedInUserRoleMap,onClickMenuIcon:()=>{P(!0)},googleAPIKey:be.googleMapsAPIKey})]}):a.jsx(ne,{fetchState:m})},W="external_integrations",St=K((function(e){const l=Qe(e,W);return{notifyMeRegisteredSlugs:new Set(l.map((o=>o.additionalInfo)).filter((o=>o!=null)))}}),(function(e,l){const{navigate:o,integrationsView:i,signedInUserEmail:r,tenantEmailDomain:n,tenantId:t}=l;return{onBackClick:()=>{o("../")},onNavigateToDashboard:()=>{o("../dashboard")},onReconnectQBO:()=>{le.init("/connection/auth",n),le.handleClick()},onRefreshClick:()=>{i.integrations.refreshQBO.fetchState!=="In-Progress"&&e(tn())},onSaveChargeBeeCredentials:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="chargebee"))?.connectionId;u!=null&&e(en(t,u,J("revenue"),nn("chargebee"),{api_key:s,site:c}))},onConnectHubSpot:(s,c)=>{const u=i.externalConnections?.revenue?.find((h=>h.connectionName==="hubspot"))?.connectionId;if(u!=null){const h=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:s,client_secret:c,connection_id:u,redirect_uri:h,tenant_id:t}));const S="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(s)}&scope=${encodeURIComponent(S)}&redirect_uri=${encodeURIComponent(h)}`}},onDisconnect:(s,c)=>{e(Ye(t,s,J(c)))},onConnectGmail:()=>{e(ae(t,"gmail",window.location.href))},onConnectOutlook:()=>{e(ae(t,"outlook",window.location.href))},onSaveConnectorCredentials:s=>{e(Xe(t,J("payments"),s))},onNotifyMe:s=>{q.trackIntegrationsNotifyMeClicked("Settings",s),e(We(W,s,r))}}}))(qn),bt=()=>{const e=Kn(),l=V(),o=_(),{tenantEmailDomain:i}=O(),{pendingAutoFocusTabId:r}=it(),[n,t]=d.useState(!1),s=C((I=>I.tenantState.fetchState)),c=C((I=>w(I))),u=c.companyId??v.getSignedInUserTenant(i)?.companyId,h=v.getSignedInUser(),S=L(),m=X(c.userRole??[]);if(h==null)throw Error("Can't access Integrations page without signing in...");d.useEffect((()=>{o(ze(W))}),[o]);const[p,b]=d.useState(!1);d.useEffect((()=>{p||(b(!0),o($()))}),[p,o]);const E=I=>{t(I)},g=C((I=>Je(I,u))),P=C((I=>I.plaidAccountViewState.external_account.plaidConnectionDetails)),{plaidAccounts:j,onAddPlaidAccount:M,onReLoginPlaidAccount:D}=rt({companyId:u??c.companyId});return S?.loggedInUserRoleMap!=null?a.jsxs(It,{children:[a.jsx(R,{isAppContentDrawerOpen:n,handleDrawerToggle:E}),a.jsx(St,{navigate:l,meetingUrl:e("settings_integrations"),onClickMenuIcon:()=>{E(!0)},isAdmin:m,integrationsView:g,signedInUserEmail:h.userEmail??"",tenantEmailDomain:c.tenantEmailDomain??i??"",tenantId:c.tenantId,saveChargeBeeState:g.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:g.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:g.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:g.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:g.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(g.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([I,x])=>[I,x?.message]))),deleteConnectionState:g.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:g.externalConnections?.deleteConnectionError?.message,isLoading:s==="In-Progress",autoFocusTabId:r??void 0,plaidAccounts:j,onAddPlaidAccount:M,onReLoginPlaidAccount:D,plaidConnectionDetails:P})]}):a.jsx(ne,{fetchState:s})},It=B.div`
26
26
  display: flex;
27
27
  height: 100%;
28
28
  width: 100%;
@@ -46,4 +46,4 @@ import{j as a}from"./liveblocks-BjcYyeQ6.js";import{a as d}from"./sentry-DZ9rNYf
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${e=>e.theme.colors.grey4};
49
- `,ce=({appContent:e})=>{const l=_(),o=N(),i=H(),[r,n]=d.useState(!1),t=C((y=>w(y))),{tenantEmailDomain:s}=t,c=t.companyId??v.getSignedInUserTenant(s)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:u}=te(),h=!!t.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:S}=u(F.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=u(F.isDebitCardFeatureEnabled),p=t.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",b=C((y=>rn(y))),E=fe(t),g=he(m,t),P=!g&&b,j=ye(t,S,m),{isCardsHidden:M}=Se(t?.tenantId),D=!j||M,{areTenantIdsInSync:I}=Jn();d.useEffect((()=>{I&&l(ln(c,P))}),[c,l,P,I]);const x=C((y=>cn(y,P))),T=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||c==null,A=dn(t),f=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=y=>{n(y)};return a.jsxs(kt,{children:[a.jsx(R,{isAppContentDrawerOpen:r,handleDrawerToggle:U}),e!=null?a.jsx(a.Fragment,{children:e}):a.jsx(Qn,{myProfileView:x,isAccountingClassesEnabled:b,isReimbursementDisabled:f===!1,isZeniAccountsDisabled:h===!1,isChargeCardDisabled:D,isTreasuryDisabled:p===!1,isLiteRoleDisabled:A===!1,onClickMenuIcon:()=>{U(!0)},isLoading:T,isBankingOnlyTenant:g,isCardsOnlyTenant:E,onAddressClick:y=>{const Z=(function(ke,je){let z=`/${ke}/settings/my_profile`;return z=z.concat(`/new/${je}`),z})(s,y),Ee=Xn(i.state?.pathnameStackToGoBack,i.pathname);o(Z,{state:{pathnameStackToGoBack:Ee}})},onGetOtp:y=>{const Z={...x.myProfileLocalData,phone:y};l(oe({localData:Z})),l(mn(y,"MyProfile"))},onResendOtp:y=>{l(gn(y,"MyProfile"))},onCancelClick:()=>{l(pn())},onSaveClick:()=>{l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(y,Z)=>{l(un(y,Z,"MyProfile"))},onVerifyOtpSuccess:y=>{y!=null&&v.saveZeniOtpToken(y),l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:y=>{l(oe({localData:y}))}})]})};function jt(){const e=_(),l=C((f=>w(f))),o=l.companyId,i=l.tenantId,r=C((f=>fn(f))),n=C((f=>Ce(f))),t=C((f=>hn(f.notificationRegistryState))),s=C((f=>Cn(f))),c=C((f=>yn(f))),u=Ie(),{isZeniUser:h,isNotificationControlsEnabled:S}=xe(u),[m,p]=d.useState(!1),b=d.useCallback((f=>{p(f)}),[]),E=d.useCallback((f=>{e(Sn(f))}),[]),g=d.useCallback((()=>{u?.userEmail!=null&&e(bn({loggedInUserEmail:u.userEmail})),e(In())}),[u?.userEmail]),P=d.useCallback((()=>{e(xn()),c&&e(En())}),[c]);if(u==null)throw Error("Can't access Notification Settings page without signing in...");const j=d.useCallback((()=>{const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o)),e(G())}),[o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled]),M=d.useCallback((()=>{e(kn())}),[]),D=d.useCallback(((f,U,y)=>{e(jn({eventId:f,channel:re(U),enabled:y}))}),[e]),I=d.useCallback(((f,U)=>{e(Pn({groupId:f,frequency:vn(U)}))}),[e]),x=d.useCallback(((f,U,y)=>{e(wn({groupId:f,channel:re(U),enabled:y}))}),[e]),T=d.useMemo((()=>{if(S&&t!=null)return{isZeniUser:h,registry:t,preferences:s,onToggleEventChannel:D,onSetGroupFrequency:I,onSetGroupChannelMaster:x}}),[S,h,t,s,D,I,x]);d.useEffect((()=>{i!=null&&n.fetchState==="Not-Started"&&e(G())}),[e,i,n.fetchState]);const A=d.useRef(i);return d.useEffect((()=>{A.current!==i&&(e(An()),e(Dn()),e(G()),A.current=i)}),[e,i]),d.useEffect((()=>{if(n.fetchState==="Completed"&&r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"){const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o))}}),[r.fetchState,o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled,n.fetchState]),a.jsxs(a.Fragment,{children:[a.jsx(R,{isAppContentDrawerOpen:m,handleDrawerToggle:b}),a.jsx(Wn,{notificationSettingsView:r,onFormDataChange:E,onCancel:g,onSave:P,onClickMenuIcon:()=>{b(!0)},signedInUser:u,onRefresh:j,resetUpdateStatus:M,taskNotifications:T,isTaskNotificationsDirty:c})]})}function da(e){const[l,o]=d.useState(!1),i=C((b=>Ce(b))),r=C((b=>w(b))),n=L(),t=Ie(),s=_(),{useFeatureGate:c}=te(),{isFeatureEnabled:u}=c(F.isDebitCardFeatureEnabled),{isTaskManagerAccessEnabled:h}=xe(t),S=t?.userEmail==null||i.fetchState!=="Completed"||Un(i.notificationSettings,t.userEmail,u,r,h);d.useEffect((()=>{i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"&&l===!1&&(o(!0),s(G()))}),[i.fetchState,l]);const m=he(u,r),p=fe(r);return i.fetchState!=="In-Progress"&&i.fetchState!=="Not-Started"||S!==!0?_n(r)?a.jsxs(Q,{children:[Mn(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"accounting/*",element:a.jsx(Yn,{})}),Rn(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"approval_rules/*",element:a.jsx(Pt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Tn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"my_bank_connections",element:a.jsx(Et,{})}),Bn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"bank_connections",element:a.jsx(ft,{})}),Zn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"business_verification",element:a.jsx(ot,{productType:m?"zeni_accounts":p?"charge_cards":tt(r,n?.loggedInUserRoleMap)})}),Fn(n?.loggedInUserRole??[],r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"company_details",element:a.jsx(st,{})}),Vn(n?.loggedInUserRole??[],r)&&a.jsx(k,{path:"billing",element:a.jsx(yt,{})}),Nn(n?.loggedInUserRole??[],u,r)&&a.jsx(k,{path:"integrations",element:a.jsx(bt,{})}),a.jsx(k,{path:"my_profile/new/:addressType",element:a.jsx(ce,{appContent:a.jsx(nt,{isSubPage:!1})})}),a.jsx(k,{path:"my_profile",element:a.jsx(ce,{})}),S&&a.jsx(k,{path:"notifications",element:a.jsx(jt,{})}),a.jsx(k,{path:"*",element:a.jsx(V,{})})]}):a.jsx(Q,{children:a.jsx(k,{path:"*",element:a.jsx(V,{})})}):null}function Pt(e){return a.jsxs(Q,{children:[a.jsx(k,{path:"/",element:a.jsx(pt,{})}),a.jsx(k,{path:"bills/approval-rules/*",element:a.jsx(lt,{})}),a.jsx(k,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?a.jsx(ct,{}):a.jsx(V,{})}),a.jsx(k,{path:"*",element:a.jsx(V,{})})]})}export{da as default};
49
+ `,ce=({appContent:e})=>{const l=_(),o=V(),i=H(),[r,n]=d.useState(!1),t=C((y=>w(y))),{tenantEmailDomain:s}=t,c=t.companyId??v.getSignedInUserTenant(s)?.companyId;if(v.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:u}=te(),h=!!t.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:S}=u(F.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=u(F.isDebitCardFeatureEnabled),p=t.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",b=C((y=>rn(y))),E=fe(t),g=he(m,t),P=!g&&b,j=ye(t,S,m),{isCardsHidden:M}=Se(t?.tenantId),D=!j||M,{areTenantIdsInSync:I}=Jn();d.useEffect((()=>{I&&l(ln(c,P))}),[c,l,P,I]);const x=C((y=>cn(y,P))),T=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||c==null,A=dn(t),f=!!t.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=y=>{n(y)};return a.jsxs(kt,{children:[a.jsx(R,{isAppContentDrawerOpen:r,handleDrawerToggle:U}),e!=null?a.jsx(a.Fragment,{children:e}):a.jsx(Qn,{myProfileView:x,isAccountingClassesEnabled:b,isReimbursementDisabled:f===!1,isZeniAccountsDisabled:h===!1,isChargeCardDisabled:D,isTreasuryDisabled:p===!1,isLiteRoleDisabled:A===!1,onClickMenuIcon:()=>{U(!0)},isLoading:T,isBankingOnlyTenant:g,isCardsOnlyTenant:E,onAddressClick:y=>{const Z=(function(ke,je){let z=`/${ke}/settings/my_profile`;return z=z.concat(`/new/${je}`),z})(s,y),Ee=Wn(i.state?.pathnameStackToGoBack,i.pathname);o(Z,{state:{pathnameStackToGoBack:Ee}})},onGetOtp:y=>{const Z={...x.myProfileLocalData,phone:y};l(oe({localData:Z})),l(mn(y,"MyProfile"))},onResendOtp:y=>{l(gn(y,"MyProfile"))},onCancelClick:()=>{l(pn())},onSaveClick:()=>{l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(y,Z)=>{l(un(y,Z,"MyProfile"))},onVerifyOtpSuccess:y=>{y!=null&&v.saveZeniOtpToken(y),l(se("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:y=>{l(oe({localData:y}))}})]})};function jt(){const e=_(),l=C((f=>w(f))),o=l.companyId,i=l.tenantId,r=C((f=>fn(f))),n=C((f=>Ce(f))),t=C((f=>hn(f.notificationRegistryState))),s=C((f=>Cn(f))),c=C((f=>yn(f))),u=Ie(),{isZeniUser:h,isNotificationControlsEnabled:S}=xe(u),[m,p]=d.useState(!1),b=d.useCallback((f=>{p(f)}),[]),E=d.useCallback((f=>{e(Sn(f))}),[]),g=d.useCallback((()=>{u?.userEmail!=null&&e(bn({loggedInUserEmail:u.userEmail})),e(In())}),[u?.userEmail]),P=d.useCallback((()=>{e(xn()),c&&e(En())}),[c]);if(u==null)throw Error("Can't access Notification Settings page without signing in...");const j=d.useCallback((()=>{const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o)),e(G())}),[o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled]),M=d.useCallback((()=>{e(kn())}),[]),D=d.useCallback(((f,U,y)=>{e(jn({eventId:f,channel:re(U),enabled:y}))}),[e]),I=d.useCallback(((f,U)=>{e(Pn({groupId:f,frequency:vn(U)}))}),[e]),x=d.useCallback(((f,U,y)=>{e(wn({groupId:f,channel:re(U),enabled:y}))}),[e]),T=d.useMemo((()=>{if(S&&t!=null)return{isZeniUser:h,registry:t,preferences:s,onToggleEventChannel:D,onSetGroupFrequency:I,onSetGroupChannelMaster:x}}),[S,h,t,s,D,I,x]);d.useEffect((()=>{i!=null&&n.fetchState==="Not-Started"&&e(G())}),[e,i,n.fetchState]);const A=d.useRef(i);return d.useEffect((()=>{A.current!==i&&(e(An()),e(Dn()),e(G()),A.current=i)}),[e,i]),d.useEffect((()=>{if(n.fetchState==="Completed"&&r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"){const f=n.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(ie(f,o))}}),[r.fetchState,o,n.notificationSettings.monthEndInsightsNotificationSettings.enabled,n.fetchState]),a.jsxs(a.Fragment,{children:[a.jsx(R,{isAppContentDrawerOpen:m,handleDrawerToggle:b}),a.jsx(Xn,{notificationSettingsView:r,onFormDataChange:E,onCancel:g,onSave:P,onClickMenuIcon:()=>{b(!0)},signedInUser:u,onRefresh:j,resetUpdateStatus:M,taskNotifications:T,isTaskNotificationsDirty:c})]})}function da(e){const[l,o]=d.useState(!1),i=C((b=>Ce(b))),r=C((b=>w(b))),n=L(),t=Ie(),s=_(),{useFeatureGate:c}=te(),{isFeatureEnabled:u}=c(F.isDebitCardFeatureEnabled),{isTaskManagerAccessEnabled:h}=xe(t),S=t?.userEmail==null||i.fetchState!=="Completed"||Un(i.notificationSettings,t.userEmail,u,r,h);d.useEffect((()=>{i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"&&l===!1&&(o(!0),s(G()))}),[i.fetchState,l]);const m=he(u,r),p=fe(r);return i.fetchState!=="In-Progress"&&i.fetchState!=="Not-Started"||S!==!0?_n(r)?a.jsxs(Q,{children:[Mn(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"accounting/*",element:a.jsx(Yn,{})}),Rn(n?.loggedInUserRole??[],u,r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"approval_rules/*",element:a.jsx(Pt,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Tn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"my_bank_connections",element:a.jsx(Et,{})}),Bn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"bank_connections",element:a.jsx(ft,{})}),Zn(r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"business_verification",element:a.jsx(ot,{productType:m?"zeni_accounts":p?"charge_cards":tt(r,n?.loggedInUserRoleMap)})}),Fn(n?.loggedInUserRole??[],r,n?.loggedInUserRoleMap)&&a.jsx(k,{path:"company_details",element:a.jsx(st,{})}),Nn(n?.loggedInUserRole??[],r)&&a.jsx(k,{path:"billing",element:a.jsx(yt,{})}),Vn(n?.loggedInUserRole??[],u,r)&&a.jsx(k,{path:"integrations",element:a.jsx(bt,{})}),a.jsx(k,{path:"my_profile/new/:addressType",element:a.jsx(ce,{appContent:a.jsx(nt,{isSubPage:!1})})}),a.jsx(k,{path:"my_profile",element:a.jsx(ce,{})}),S&&a.jsx(k,{path:"notifications",element:a.jsx(jt,{})}),a.jsx(k,{path:"*",element:a.jsx(N,{})})]}):a.jsx(Q,{children:a.jsx(k,{path:"*",element:a.jsx(N,{})})}):null}function Pt(e){return a.jsxs(Q,{children:[a.jsx(k,{path:"/",element:a.jsx(pt,{})}),a.jsx(k,{path:"bills/approval-rules/*",element:a.jsx(lt,{})}),a.jsx(k,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?a.jsx(ct,{}):a.jsx(N,{})}),a.jsx(k,{path:"*",element:a.jsx(N,{})})]})}export{da as default};