@zeniai/web-app-ui 5.1.76-qa → 5.1.77-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/assets/AddressRoutes-DVAWy_gb.js +1 -0
  2. package/dist/assets/AddressScreen-DjHFWXZd.js +9 -0
  3. package/dist/assets/AiCfoScreen-Coov-9Lq.js +22 -0
  4. package/dist/assets/BillPayApprovalRoutes-5yoLyMdf.js +1 -0
  5. package/dist/assets/BillPayRoutes-BJdksoIS.js +119 -0
  6. package/dist/assets/BusinessVerificationPageScreen-CxMuID_0.js +9 -0
  7. package/dist/assets/CardsAiCfoScreen-7MbovH-h.js +14 -0
  8. package/dist/assets/ChargeCardRoutes-ZORkbkMi.js +71 -0
  9. package/dist/assets/{CompanyPassportScreen-D3FPR-Qo.js → CompanyPassportScreen-3LH__AFc.js} +1 -1
  10. package/dist/assets/ConnectionAuthScreen-E5uYsUYy.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-Bkbz75T7.js +1 -0
  12. package/dist/assets/CustomerOnboardingRoutes-CGaSQM6e.js +30 -0
  13. package/dist/assets/{DashboardRoutes-IvQbF0p5.js → DashboardRoutes-Ckr_4PFZ.js} +4 -4
  14. package/dist/assets/DefaultTenantHome-D9TcJdht.js +1 -0
  15. package/dist/assets/DomesticWireDetailScreen-DZ8naknM.js +18 -0
  16. package/dist/assets/DrawerScreen-enq1kex3.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-1jh84Y19.js +1 -0
  18. package/dist/assets/ExpenseAutomationRoutes-CCWIfo0Y.js +25 -0
  19. package/dist/assets/FeaturePreviewScreen-9qGkTofX.js +1 -0
  20. package/dist/assets/HubSpotOAuthCallbackScreen-DV60QBAP.js +1 -0
  21. package/dist/assets/{MagicLinkRoutes-GeMpatbi.js → MagicLinkRoutes-ZrciaOYE.js} +20 -20
  22. package/dist/assets/MagicLinkSignInScreen-Bx2G9lAV.js +12 -0
  23. package/dist/assets/MobileAppDrawer-CmiSBVZw.js +1 -0
  24. package/dist/assets/NotFoundScreen-BTmOJXuO.js +1 -0
  25. package/dist/assets/{NotificationRoutes-DAaLYP16.js → NotificationRoutes-DMjWy9uH.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-g04Ja_FY.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-CQW3cuEJ.js +1 -0
  28. package/dist/assets/PeopleRoutes-C4dcMrZ_.js +22 -0
  29. package/dist/assets/PerformanceRoutes-C70AcB2c.js +1 -0
  30. package/dist/assets/{Preview-C1-82nYG.js → Preview-C-vmj6G_.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-CbpqcU_N.js → QBOConnectionScreen-CXuCwnVv.js} +1 -1
  32. package/dist/assets/ReferralListScreen-CAuT5MkH.js +5 -0
  33. package/dist/assets/ReimbursementApprovalRoutes-D7K2CtZa.js +1 -0
  34. package/dist/assets/ReimbursementApprovalRuleDetailScreen-Co6mqX7V.js +1 -0
  35. package/dist/assets/ReimbursementRoutes-Dc6yhpRS.js +68 -0
  36. package/dist/assets/ReportsRoutes-0B9PMrKM.js +1 -0
  37. package/dist/assets/RewardsRoutes-BIy5lqI9.js +1 -0
  38. package/dist/assets/ScreenRoutes-S4iuOC-S.js +2 -0
  39. package/dist/assets/SettingsRoutes-Bo4skXXS.js +57 -0
  40. package/dist/assets/SetupPagesScreen-C5uQEz7K.js +29 -0
  41. package/dist/assets/SignInScreen-DNgt_9L_.js +1 -0
  42. package/dist/assets/SignOutScreen-CnFKE_oa.js +9 -0
  43. package/dist/assets/TaskListScreen-DF5lH-3k.js +9 -0
  44. package/dist/assets/TaskRoutes-8GtswDRs.js +9 -0
  45. package/dist/assets/TransactionDetailRoutes-BaHmdvMt.js +1 -0
  46. package/dist/assets/{TransactionDetailScreen-Cqi8jdTb.js → TransactionDetailScreen-D6QDGxGu.js} +2 -2
  47. package/dist/assets/TransactionListRoutes-Bhdw74c5.js +1 -0
  48. package/dist/assets/TreasuryRoutes-Tn0wVhtU.js +37 -0
  49. package/dist/assets/{VendorsRoutes-bYzT2YYR.js → VendorsRoutes-COmvFuAL.js} +19 -19
  50. package/dist/assets/WiseConfirmationScreen-BSHHYeUX.js +12 -0
  51. package/dist/assets/ZeniAccountRoutes-CteciRDO.js +73 -0
  52. package/dist/assets/ZeniAccountStatementScreen-WWIAEGl-.js +9 -0
  53. package/dist/assets/{accountMappingHelper-DB6fTWzq.js → accountMappingHelper-talErUKy.js} +1 -1
  54. package/dist/assets/{analytics-CGnNJ1B3.js → analytics-ChMmdjNV.js} +1 -1
  55. package/dist/assets/{analyticsHelper-CSJ-Oqa_.js → analyticsHelper-Bq2cX6hw.js} +1 -1
  56. package/dist/assets/{core-BQch-SEa.js → core-BoNEfvLs.js} +5 -5
  57. package/dist/assets/{decodeURIComponentSafe-BlZKyc9K.js → decodeURIComponentSafe-v7XwPgPo.js} +1 -1
  58. package/dist/assets/dnd-DvJtEb2B.js +6 -0
  59. package/dist/assets/{empty-CnUVdn1j.js → empty-b5TFvQkm.js} +1 -1
  60. package/dist/assets/{index-CjwtZFvv.js → empty-dNqnyFZ3.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-CMOPMd9b.js → emptyVideoElement-CHUUTLZE.js} +1 -1
  62. package/dist/assets/epic-DBs37iOr.js +2 -0
  63. package/dist/assets/{getLocaleForTenant-DDy24EaJ.js → getLocaleForTenant-B4Of7eQD.js} +1 -1
  64. package/dist/assets/{index-R6GjjTB3.css → index-BUmr5maU.css} +1 -1
  65. package/dist/assets/{index-B7xMX0uC.js → index-BkGSE7D5.js} +34161 -28660
  66. package/dist/assets/index-BvFLIInY.js +1 -0
  67. package/dist/assets/{index-BKzmRWFJ.js → index-CJO1bhSt.js} +2 -2
  68. package/dist/assets/index-DM4yT559.js +1 -0
  69. package/dist/assets/{index-CdbMVgUL.js → index-DcWwIWd7.js} +1 -1
  70. package/dist/assets/{index-BJcfizgW.js → index-HOeFcz85.js} +1 -1
  71. package/dist/assets/{index-BDydFdLA.js → index-VwB1TFIZ.js} +1 -1
  72. package/dist/assets/{index-C75IsDSW.js → index-drCPF-LE.js} +1 -1
  73. package/dist/assets/{lexical-BBRytn_R.js → lexical-D_KbwLmW.js} +1 -1
  74. package/dist/assets/{liveblocks-Bi6jUyhM.js → liveblocks-CsaY8yYO.js} +1 -1
  75. package/dist/assets/{lottie-CB8QpQmy.js → lottie-DbDVmnvZ.js} +1 -1
  76. package/dist/assets/{mui-D4v6d6vq.js → mui-CblpH0Ha.js} +1 -1
  77. package/dist/assets/{pathToGoBack-iBZHU0oy.js → pathToGoBack-j1V7r3Mn.js} +1 -1
  78. package/dist/assets/{pdf-BNQvW5mJ.js → pdf-D2egRSjc.js} +3 -3
  79. package/dist/assets/{pdf-lib-BkMwujYN.js → pdf-lib-DMbxzmyG.js} +1 -1
  80. package/dist/assets/{plaid-DWupRB-M.js → plaid-74upgTWR.js} +1 -1
  81. package/dist/assets/{pusher-Dkp2Jrxx.js → pusher-CjiDlk8e.js} +1 -1
  82. package/dist/assets/{react-CZ9x9aZs.js → react-B9xrzEYj.js} +1 -1
  83. package/dist/assets/{react-4loJCMRC.js → react-Bdgrv6d7.js} +1 -1
  84. package/dist/assets/{react-DZeesIBx.js → react-Dvg14ilb.js} +1 -1
  85. package/dist/assets/{react-BnoWjI1_.js → react-lDmXKsDH.js} +1 -1
  86. package/dist/assets/{react-CtfVTLhb.js → react-otWFcO3Y.js} +1 -1
  87. package/dist/assets/{react-D6_PfBEK.js → react-sFkWW8vV.js} +1 -1
  88. package/dist/assets/{recharts-6oV2OwTy.js → recharts-NoTYHO1X.js} +3 -3
  89. package/dist/assets/{routePaths-Db_F8Q8U.js → routePaths-DlT4djwo.js} +1 -1
  90. package/dist/assets/{sentry-DwScFzsh.js → sentry-BUYxAJ0R.js} +1 -1
  91. package/dist/assets/{url-uJs8N0Ig.js → url-5YtRx5NC.js} +1 -1
  92. package/dist/assets/{url-CA34r-nZ.js → url-SyvMap6d.js} +1 -1
  93. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BOfvB1qP.js +1 -0
  94. package/dist/assets/useAskAiCfoHostNavButtonProps-BNRHSSlT.js +1 -0
  95. package/dist/assets/useCashManagementBanner-BqwuaRBx.js +1 -0
  96. package/dist/assets/useChargeCardPusherEvents-ek7O5vue.js +1 -0
  97. package/dist/assets/{useDeviceId-B2Yksaa2.js → useDeviceId-LzGT5z98.js} +1 -1
  98. package/dist/assets/useEmailConnectResultRefresh-C_KtOMfR.js +1 -0
  99. package/dist/assets/useInitialThreadRequest-tlPkIpCr.js +1 -0
  100. package/dist/assets/{utils-Dwr2wQrV.js → utils-D-CJm-xs.js} +2 -2
  101. package/dist/assets/{withTransactionSidePanel-NhbBttSf.js → withTransactionSidePanel-D-rC67hx.js} +4 -4
  102. package/dist/assets/zeni-epic-state-DcOrwCh7.js +13 -0
  103. package/dist/index.html +1 -1
  104. package/package.json +6 -6
  105. package/dist/assets/AddressRoutes-ZS1rVxYe.js +0 -1
  106. package/dist/assets/AddressScreen-BUTfoqVU.js +0 -9
  107. package/dist/assets/AiCfoScreen-BzpHh1NI.js +0 -22
  108. package/dist/assets/BillPayApprovalRoutes-BlBr-Pa_.js +0 -1
  109. package/dist/assets/BillPayRoutes-ClbMaK26.js +0 -119
  110. package/dist/assets/BusinessVerificationPageScreen-Cl8oXTwg.js +0 -9
  111. package/dist/assets/ChargeCardRoutes-Dty7fFkf.js +0 -71
  112. package/dist/assets/ConnectionAuthScreen-BgM-EvOD.js +0 -11
  113. package/dist/assets/CustomerOnboardingAuthScreen-D1nj-yCN.js +0 -1
  114. package/dist/assets/CustomerOnboardingRoutes-CvSaPcYJ.js +0 -23
  115. package/dist/assets/DefaultTenantHome-BDYLNaqp.js +0 -1
  116. package/dist/assets/DomesticWireDetailScreen-2D8uEzGS.js +0 -18
  117. package/dist/assets/DrawerScreen-BJ9U_AyW.js +0 -1
  118. package/dist/assets/EntityDetailRoutes-CqcMNyXA.js +0 -1
  119. package/dist/assets/ExpenseAutomationRoutes-d-FhPPBr.js +0 -25
  120. package/dist/assets/FeaturePreviewScreen-BRif0RC-.js +0 -1
  121. package/dist/assets/HubSpotOAuthCallbackScreen-NVwKuO2U.js +0 -1
  122. package/dist/assets/MagicLinkSignInScreen-BXPx6ksg.js +0 -12
  123. package/dist/assets/MobileAppDrawer-BpqQJOt0.js +0 -1
  124. package/dist/assets/NotFoundScreen-D6Lk-Xx8.js +0 -1
  125. package/dist/assets/OAuthConsentScreen-BAYK5t47.js +0 -1
  126. package/dist/assets/PandLWithForecastRoutes-m34ge8VY.js +0 -1
  127. package/dist/assets/PeopleRoutes-CKpCGN6J.js +0 -22
  128. package/dist/assets/PerformanceRoutes-Bg1k1jyB.js +0 -1
  129. package/dist/assets/ReferralListScreen-BEpm9VKl.js +0 -5
  130. package/dist/assets/ReimbursementApprovalRoutes-B3F2FHuK.js +0 -1
  131. package/dist/assets/ReimbursementApprovalRuleDetailScreen-BDsrYfnH.js +0 -1
  132. package/dist/assets/ReimbursementRoutes-ChEJPAQh.js +0 -68
  133. package/dist/assets/ReportsRoutes-BF-qA0qu.js +0 -1
  134. package/dist/assets/RewardsRoutes-C5Chcvbk.js +0 -1
  135. package/dist/assets/ScreenRoutes-DjL85WV2.js +0 -2
  136. package/dist/assets/SettingsRoutes-nye6Prnj.js +0 -57
  137. package/dist/assets/SetupPagesScreen-3PXMmMdF.js +0 -29
  138. package/dist/assets/SignInScreen-BL4rDn0j.js +0 -1
  139. package/dist/assets/SignOutScreen-BsM-tb4L.js +0 -9
  140. package/dist/assets/TaskListScreen-DWO4uefn.js +0 -9
  141. package/dist/assets/TaskRoutes-Dn9l47zA.js +0 -9
  142. package/dist/assets/TransactionDetailRoutes-D3TX9qDh.js +0 -1
  143. package/dist/assets/TransactionListRoutes-BHAgKBjq.js +0 -1
  144. package/dist/assets/TreasuryRoutes-CnwThTn3.js +0 -37
  145. package/dist/assets/WiseConfirmationScreen-Bg3y3bh-.js +0 -12
  146. package/dist/assets/ZeniAccountRoutes-BAi7pBEZ.js +0 -57
  147. package/dist/assets/ZeniAccountStatementScreen-Cb60FSVQ.js +0 -9
  148. package/dist/assets/dnd-DtFKtvlf.js +0 -6
  149. package/dist/assets/empty-DBOryUxv.js +0 -1
  150. package/dist/assets/epic-Cn810zkq.js +0 -2
  151. package/dist/assets/index-DZkdTIsz.js +0 -1
  152. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-BVDwvQd1.js +0 -1
  153. package/dist/assets/useAskAiCfoHostNavButtonProps-CqmbctLX.js +0 -1
  154. package/dist/assets/useInitialThreadRequest-BDy3pY5w.js +0 -1
  155. package/dist/assets/zeni-epic-state-DxVQhBoO.js +0 -13
@@ -1,4 +1,4 @@
1
- import{j as t}from"./liveblocks-Bi6jUyhM.js";import{i as S,n as g,h as C,g as y,u as ee,s as te,j as E,N as ae,o as ne,p}from"./core-BQch-SEa.js";import{Kd as k,Ke as v,Kf as K,Aa as A,zY as T,Kg as B,Kh as oe,Ki as se,A0 as ie,eZ as $,A7 as le,A4 as de}from"./zeni-epic-state-DxVQhBoO.js";import{X as x,o as d,H as re,d as j,j as G,O as ce,p as me,W as pe,q as M,a as ue,G as he,V as ge,K as xe,m as fe,r as we,B as be,s as Se,R as ye,S as ke,v as ve,w as je,Q as $e}from"./index-B7xMX0uC.js";import{n as m}from"./mui-D4v6d6vq.js";import f from"./NotFoundScreen-D6Lk-Xx8.js";import{a as I}from"./sentry-DwScFzsh.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="413bf6d9-d7d9-4541-8909-c573d06f8616",e._sentryDebugIdIdentifier="sentry-dbid-413bf6d9-d7d9-4541-8909-c573d06f8616")}catch{}})();const Ie=m.div`
1
+ import{j as t}from"./liveblocks-CsaY8yYO.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-BoNEfvLs.js";import{M9 as k,Ma as v,Mb as M,Bd as B,A$ as T,Mc as A,Md as oe,Me as se,B3 as ie,fA as $,Ba as le,B7 as re}from"./zeni-epic-state-DcOrwCh7.js";import{Z as g,o as r,B as de,f as j,n as G,r as ce,s as me,E as pe,v as V,Q as ue,e as he,w as xe,A as ge,m as fe,x as we,y as be,J as Se,F as ye,S as ke,C as ve,D as je,R as $e}from"./index-BkGSE7D5.js";import{n as m}from"./mui-CblpH0Ha.js";import f from"./NotFoundScreen-BTmOJXuO.js";import{a as I}from"./sentry-BUYxAJ0R.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="13bc7c4d-c33c-4b99-9988-82a028dc1664",e._sentryDebugIdIdentifier="sentry-dbid-13bc7c4d-c33c-4b99-9988-82a028dc1664")}catch{}})();const Ie=m.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -6,8 +6,8 @@ import{j as t}from"./liveblocks-Bi6jUyhM.js";import{i as S,n as g,h as C,g as y,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=g(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(A(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(K({data:l}))}}})(re);function F(){const e=x(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Ae=m.div`
9
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
+ `,Ce=x(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(M({data:l}))}}})(de);function F(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Be=m.div`
11
11
  display: flex;
12
12
  height: 100vh;
13
13
  width: 100%;
@@ -15,8 +15,8 @@ import{j as t}from"./liveblocks-Bi6jUyhM.js";import{i as S,n as g,h as C,g as y,
15
15
  flex-direction: column;
16
16
  align-items: center;
17
17
  background-color: ${e=>e.theme.colors.grey4};
18
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,Be=g(function(e,a){const{isSubPage:n}=a;return{addressToEdit:B(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const a=C(),n=y(),o=x();return t.jsx(t.Fragment,{children:t.jsx(Ae,{windowSize:o,children:t.jsx(Be,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
18
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
+ `,Ae=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:A(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(Be,{windowSize:o,children:t.jsx(Ae,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
20
20
  display: flex;
21
21
  height: 100%;
22
22
  width: 100%;
@@ -24,8 +24,8 @@ import{j as t}from"./liveblocks-Bi6jUyhM.js";import{i as S,n as g,h as C,g as y,
24
24
  flex-direction: column;
25
25
  align-items: center;
26
26
  background-color: ${e=>e.theme.colors.grey4};
27
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Ne=g(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:r}=i;e(K({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),r=M(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(pe);function Ee(){const e=C(),a=y(),n=x(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
27
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
+ `,Ne=x(function(e){const a=k(e),n=v(e),o=A(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(M({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=V(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
29
  display: flex;
30
30
  height: 100%;
31
31
  width: 100%;
@@ -33,17 +33,17 @@ import{j as t}from"./liveblocks-Bi6jUyhM.js";import{i as S,n as g,h as C,g as y,
33
33
  flex-direction: column;
34
34
  align-items: center;
35
35
  background-color: ${e=>e.theme.colors.grey4};
36
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Ke=g(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(A(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:r}=i;e(se({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),r=M(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(ge);function Te(){const e=C(),a=y(),n=x(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Ke,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},Me=m(ke)`
38
- width: ${d.sp4};
39
- height: ${d.sp4};
40
- margin-bottom: ${d.sp3};
41
- margin-top: ${d.sp3};
42
- margin-left: ${d.sp8};
36
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
+ `,Me=x(function(e){const a=k(e),n=v(e),o=A(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=V(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(xe);function Te(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Me,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},Ve=m(ke)`
38
+ width: ${r.sp4};
39
+ height: ${r.sp4};
40
+ margin-bottom: ${r.sp3};
41
+ margin-top: ${r.sp3};
42
+ margin-left: ${r.sp8};
43
43
  cursor: pointer;
44
44
  position: absolute;
45
45
  color: ${e=>e.theme.colors.brandColorJade};
46
- `,Ve=m.div`
46
+ `,_e=m.div`
47
47
  display: flex;
48
48
  height: 100vh;
49
49
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
@@ -56,17 +56,17 @@ import{j as t}from"./liveblocks-Bi6jUyhM.js";import{i as S,n as g,h as C,g as y,
56
56
  flex-direction: column;
57
57
  width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
58
58
  ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
61
- `,We=m.div`
59
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
+ padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
+ `,Ke=m.div`
62
62
  display: flex;
63
63
  flex-direction: column;
64
64
  align-items: center;
65
65
  justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.sp8}`};
66
+ padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
67
67
  height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
68
  overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
69
  width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
70
  background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
71
  margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,_e=g(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),r=i.get("token"),V=n.pathname.includes("address"),w=x(),H=xe(),D=fe(),b=we(),W=()=>{H.toggle()},_=E(u=>k(u)),U=E(u=>v(u)),{authParams:O,fetchState:c,billAttachment:Q,billFetchState:P,companyName:R,currencySymbol:Y,amount:q}=_,{tenantId:z,userId:L,sessionId:N}=O,{fetchState:J,internationalBankAccountCreateStatus:X}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&r!=null&&a(le(s,o,r))},[b,c,s,o,r,a]),I.useEffect(()=>{b&&c==="Completed"&&($(L,N,z),l!=null&&a(de(l)))},[c,b,L,N,z,l,a]),c==="Error"?t.jsx(f,{}):J==="Completed"||X.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&P==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",R,l??"",Ue(n.pathname),Y,q))(u)}),t.jsxs(Ve,{windowSize:w,children:[w!=="small"?t.jsx(Me,{onClick:W}):null,t.jsx(We,{windowSize:w,isAddressPage:V,children:P==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(_e,{file:Q,type:"bill"})}),t.jsx(He,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Oe(){return t.jsx($e,{})}function rt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Oe,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(De,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Te,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{rt as default};
72
+ `,We=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),d=i.get("token"),_=n.pathname.includes("address"),w=g(),H=ge(),D=fe(),b=we(),K=()=>{H.toggle()},W=E(u=>k(u)),U=E(u=>v(u)),{authParams:J,fetchState:c,billAttachment:R,billFetchState:P,companyName:q,currencySymbol:O,amount:Q}=W,{tenantId:z,userId:L,sessionId:N}=J,{fetchState:Z,internationalBankAccountCreateStatus:X}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[b,c,s,o,d,a]),I.useEffect(()=>{b&&c==="Completed"&&($(L,N,z),l!=null&&a(re(l)))},[c,b,L,N,z,l,a]),c==="Error"?t.jsx(f,{}):Z==="Completed"||X.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&P==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",s??"",q,l??"",Ue(n.pathname),O,Q))(u)}),t.jsxs(_e,{windowSize:w,children:[w!=="small"?t.jsx(Ve,{onClick:K}):null,t.jsx(Ke,{windowSize:w,isAddressPage:_,children:P==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(We,{file:R,type:"bill"})}),t.jsx(He,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Je(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Je,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(De,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Te,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
@@ -0,0 +1,12 @@
1
+ import{j as u}from"./liveblocks-CsaY8yYO.js";import{a as g}from"./sentry-BUYxAJ0R.js";import{u as j,g as O,h as _,t as w,j as l,N as T}from"./core-BoNEfvLs.js";import{z as r,m as A,a as P,g as V,f as N,h as W,p as X,F as R,k as Y}from"./index-BkGSE7D5.js";import{eX as $,LW as q,M4 as B,LX as G,fA as H,g1 as J,M0 as K,gp as Q,cY as Z,M5 as ee,M6 as te}from"./zeni-epic-state-DcOrwCh7.js";import{n as ne}from"./mui-CblpH0Ha.js";import{u as se}from"./useDeviceId-LzGT5z98.js";import{f as ae}from"./analyticsHelper-Bq2cX6hw.js";import{t as ie}from"./getLocaleForTenant-B4Of7eQD.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="3e856db9-d227-4187-9e19-4b186a8ab325",t._sentryDebugIdIdentifier="sentry-dbid-3e856db9-d227-4187-9e19-4b186a8ab325")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=j(),a=O(),f=_(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),m=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),b=l(e=>q(e)),E=r.getSignedInUser(),v=A().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&m!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,m)))},[n,p,t,i,m,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(b.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Q().then(()=>{const e=Y();e!=null&&V(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,y,s,o,b,v,a.state,t]);const F=g.useCallback(()=>{f("/signin/auth")},[f]),M=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),U=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(X,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:M,onVerifyOtp:U,onCancelVerifyDevice:F});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||m==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ z-index: 9999;
11
+ background-color: ${t=>t.theme.colors.background};
12
+ `;export{xe as default};
@@ -0,0 +1 @@
1
+ import{j as N}from"./liveblocks-CsaY8yYO.js";import{a as c}from"./sentry-BUYxAJ0R.js";import{u as me,j as n,i as Ze,g as qe,h as Ke,l as M}from"./core-BoNEfvLs.js";import{eX as be,fF as Xe,fG as pe,fr as Je,bn as ea,eW as aa,fH as ta,fI as na,fK as sa,fN as oa,fW as ia,fO as g,fQ as ra,fR as le,fU as da,fS as la,fT as ca,fV as ua,cN as fa,fY as ma,cT as ba,fq as pa,g1 as ha,g2 as Sa,g0 as ga}from"./zeni-epic-state-DcOrwCh7.js";import{a8 as Ea,a9 as ka,A as Ca,Q as ya,z as k,x as Ia,u as Ta,e as r,i as wa,d as Aa,aa as Fa,I as _a,c as Da,ab as va,a4 as $a,ac as Ba,ad as Ga,ae as ce,af as ue,L as Ma,ag as Pa,ah as fe,f as P,a0 as Ra,v as A,ai as R,aj as Na}from"./index-BkGSE7D5.js";import{D as Ua}from"./mui-CblpH0Ha.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="f8ce44ae-3ba4-492d-bdbb-7f38daff3224",f._sentryDebugIdIdentifier="sentry-dbid-f8ce44ae-3ba4-492d-bdbb-7f38daff3224")}catch{}})();const Va=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ze(),a=qe(),C=Ca(),o=Ke(),U=Je(),m=me(),{useFeatureGate:i}=ya(),V=k.getSignedInUser(),x=ea(V),s=n(e=>be(e)),he=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>aa(e)),j=O.uiState.currentChatSessionId,y=Ia(),{setLoading:Se}=Ta(),[F,L]=c.useState(void 0),_=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),Ee=wa(s,ge,H),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),W=n(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n(e=>na(e));c.useEffect(()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(sa(!0))},[y,T,D.fetchState,I]);const h=k.getSignedInUser(),v=n(e=>e.tenantState),Ce=n(e=>v.fetchState==="Completed"?oa(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),Q=Aa(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=x||!x&&$e,Ge=s.company!=null&&ia(s.company),w=ve&&Ge,Me=n(e=>g(e).totalUnreadCount),Pe=n(e=>g(e).reducedFetchCountState),Z=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),q=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:K,isLoading:X,isFetchingMore:J,hasFetchedAll:ee,fetchMore:Ne}=Fa();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(X===!1&&J===!1&&ee===!0)if(s?.companyId!=null&&K!=null){const e=`dashboard_${s.companyId}`;L(K.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[X,J,ee]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&U.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(le({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&$.fetchState==="In-Progress"&&(m(le({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:F},"comments")))},[F,$.fetchState]);const Ue={fetchStatus:Pe,count:Me},ae=t!=null?k.getSignedInUserTenant(t):null,te=n(e=>ae?.tenantId!=null?da(e,ae.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),Q===!1&&S.push("expense_automation_card");const Ve=_a(),ne=n(e=>la(e,S,h,we,Te,w).fetchState),se=n(e=>ca(e).fetchState),xe=_&&(ne==="Completed"||ne==="Error")||z&&(se==="Completed"||se==="Error")||!_&&!z?void 0:"disabled",Oe=c.useMemo(()=>ua(s.userRole),[s.userRole]),je=fa(Oe),Le=s?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&W.fetchState==="Completed"&&ma(W.notificationSettings,h.userEmail,H,s),oe=Da(),Ye=oe&&va(a),ie=ba(Ve?.loggedInUserRoleMap),re=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,B=c.useCallback(()=>w&&ie&&!k.getTreasuryPopupSeen(t??"")&&re===!1&&$a(a.pathname)!=="treasury",[w,ie,re,a.pathname,t]),[He,de]=c.useState(B);c.useEffect(()=>{de(B())},[B]);const We=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Qe=Ba(We);return N.jsx(Ua,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:N.jsx(Ga,{signedInUser:V,currentTenantId:v.currentTenantId??"",tenants:v.fetchState==="Completed"?Ce:te!=null?[te]:[],currentTenant:s,isTenantDropdownDisabled:xe,isSettings:ue(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:je,isZeniAccountEnabled:Y,isChargeCardEnabled:Ee,isTreasuryEnabled:w,treasuryYieldPercentage:Qe,isTreasuryPopupVisible:He,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:Q,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:oe,onNotificationIconClick:()=>{d(!1);let e=Z===0&&q>0?"notifications/comments":"notifications/tasks";ue(a)&&(e=Z===0&&q>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(P.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!he)return void Ra({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=R(l)&&l!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&P.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const G=Na(e.type);fe(e.type)?(j!=null&&m(ga()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${G}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{Se(Ma.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=ce(a);let b=`/${encodeURIComponent(u)}/`;const G=R(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Pa(l)?b+="settings/my_profile":fe(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":G?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;P.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),de(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:O,isOnDashboard:_,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:Fe,christmasAnimationEnabled:_e,newYearAnimationEnabled:De})})}),Ha=f=>{const d=me(),t=n(C=>be(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Xe(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return N.jsx(Va,{...f,...a})};export{Ha as M};
@@ -0,0 +1 @@
1
+ import{j as r}from"./liveblocks-CsaY8yYO.js";import{h as n,n as i}from"./core-BoNEfvLs.js";import{O as e}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import"./sentry-BUYxAJ0R.js";import"./zeni-epic-state-DcOrwCh7.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="d7666c0b-2a75-4baf-97d7-b828025403bf",o._sentryDebugIdIdentifier="sentry-dbid-d7666c0b-2a75-4baf-97d7-b828025403bf")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +1 @@
1
- import{l as ct,a as mt,m as dt,j as A}from"./liveblocks-Bi6jUyhM.js";import lt from"./NotFoundScreen-D6Lk-Xx8.js";import{a as k}from"./sentry-DwScFzsh.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as Y}from"./core-BQch-SEa.js";import{cq as St,f4 as J,eS as X,fi as bt,fb as b,QC as K,fe as d,f3 as y,ry as M,wX as It,QD as Ct,f2 as Tt,fl as yt,rD as Et,QE as F,bo as $,gW as x,rH as H,QF as _t,cB as At,cv as Nt}from"./zeni-epic-state-DxVQhBoO.js";import{Y as Bt,z as wt,a as xt,G as Dt,$ as Rt,cD as vt,q as N,a8 as Gt,cE as Ut,a9 as Pt,p as Ft}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CqmbctLX.js";import"./recharts-6oV2OwTy.js";import"./analytics-CGnNJ1B3.js";import"./plaid-DWupRB-M.js";import"./dnd-DtFKtvlf.js";import"./stripe-DMRn4zHo.js";import"./lottie-CB8QpQmy.js";import"./lexical-BBRytn_R.js";import"./pdf-BNQvW5mJ.js";import"./utils-Dwr2wQrV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="ce87d1de-d184-49ab-a06b-a6b4a21b1898",t._sentryDebugIdIdentifier="sentry-dbid-ce87d1de-d184-49ab-a06b-a6b4a21b1898")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=J(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=X(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:D}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(H("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(K(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(_t(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else D?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(H("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(Et("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,B).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Gt(Ut)),Qt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,D]=k.useState(!1),a=S(e=>J(e)),o=S(e=>X(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const O=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),Q=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),v=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=vt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=ct(),{threads:V,isLoading:q,fetchMore:L,isFetchingMore:W,hasFetchedAll:z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(Q!==i&&i!=null&&s(K(i)),i==null){const e=`../${Q}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(E===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[E,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const U=E||G===!0||C!==!0||E||G===!0||C!==!0;k.useEffect(()=>{U&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,v]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(D(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(E===!1&&q===!1&&w!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),_=p.map(f=>f.id),it=p.map(f=>{const P=V.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(W||z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:_},"comments")),s(y({totalCount:_.length,unreadCount:T.length},"comments")),s(Ct(it))}},[E,G,W,C,z,q,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const _=[];R==="all"?_.push("read","unread"):R!=="mentions"&&_.push(R),s(M("task_manager",T,_,!0))}}}},nt=dt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:O,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return A.jsxs(gt,{children:[A.jsx(Y,{path:"/:selectedTab",element:A.jsx(Qt,{})}),A.jsx(Y,{path:"*",element:A.jsx(lt,{})})]})}export{ne as default};
1
+ import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-CsaY8yYO.js";import lt from"./NotFoundScreen-BTmOJXuO.js";import{a as k}from"./sentry-BUYxAJ0R.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as O}from"./core-BoNEfvLs.js";import{cu as St,fH as q,eX as H,fV as bt,fO as b,SX as Z,fR as d,fG as y,sp as M,xV as It,SY as Ct,fF as Tt,fY as yt,su as _t,SZ as F,bo as $,fz as w,sy as Q,S_ as At,cG as Et,cz as Nt}from"./zeni-epic-state-DcOrwCh7.js";import{Y as xt,z as Bt,Q as wt,e as Rt,$ as Gt,cW as vt,v as N,a8 as Dt,cX as Ut,a9 as Pt,s as Ft}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="3b632b7c-d6e5-493a-935c-42db67a0b7e8",t._sentryDebugIdIdentifier="sentry-dbid-3b632b7c-d6e5-493a-935c-42db67a0b7e8")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(Q("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Z(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(Q("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>q(e)),o=S(e=>H(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const J=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),G=S(e=>b(e).currentSubTab),K=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),v=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=vt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:z,isLoading:W,fetchMore:Y,isFetchingMore:L,hasFetchedAll:X}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Z(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const U=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{U&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[U,v]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&W===!1&&B!=null&&z!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=z.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||X===!0||Y==null||Y(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,L,C,X,W,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];G==="all"?A.push("read","unread"):G!=="mentions"&&A.push(G),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:J,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(O,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(O,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
@@ -0,0 +1 @@
1
+ import{j as m}from"./liveblocks-CsaY8yYO.js";import{a as r}from"./sentry-BUYxAJ0R.js";import{u as T,g as j,j as o,N as A}from"./core-BoNEfvLs.js";import{Mj as C,eX as P,fN as x,Mk as z,Ml as D,Mm as L,Mn as N,oa as R,Lg as k}from"./zeni-epic-state-DcOrwCh7.js";import{z as h,T as I}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="fd08d74e-16a6-466d-b944-1bdccbf9d28b",n._sentryDebugIdIdentifier="sentry-dbid-fd08d74e-16a6-466d-b944-1bdccbf9d28b")}catch{}})();function ee(){const n=T(),s=j(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),w=o(z),y=o(D),c=o(L),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(N())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const M=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(U=>U.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=v??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(k(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(A,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -0,0 +1 @@
1
+ import{j as n}from"./liveblocks-CsaY8yYO.js";import{h as z,u as J,g as Q,i as K,j as d,n as X,o as Z,p as I}from"./core-BoNEfvLs.js";import{eX as v,sd as M,rN as H,MQ as O,rI as S,bs as ee,bn as ae,bY as te,rJ as se,MR as oe,MD as C,dK as re,vS as ne,MS as ie,wd as ce,fE as le,fC as de}from"./zeni-epic-state-DcOrwCh7.js";import{z as me,Y as fe,$ as pe,I as ue,Q as U,e as $,J as he,f as w,ao as ge,v as Fe}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import be from"./NotFoundScreen-BTmOJXuO.js";import{F as Ie}from"./FeaturePreviewScreen-9qGkTofX.js";import{a as g}from"./sentry-BUYxAJ0R.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import{u as Se}from"./useInitialThreadRequest-tlPkIpCr.js";import{t as Te}from"./routePaths-DlT4djwo.js";import{M as ye}from"./MobileAppDrawer-CmiSBVZw.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="dfccd7e7-e424-480e-8283-dba52162da64",s._sentryDebugIdIdentifier="sentry-dbid-dfccd7e7-e424-480e-8283-dba52162da64")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=X(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function P(){const s=z(),e=J(),a=Q(),{forecastId:o,tenantEmailDomain:r}=K(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),N=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>M(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),D=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:W}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(H());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!D(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,M,S,F]);const x=ue(),Y=x?.loggedInUserRole!=null&&ee(x.loggedInUserRole),{useFeatureGate:_}=U(),{isFeatureEnabled:E}=_($.isReportsCommentingEnabled),q=Se(E?y?.companyId:void 0,{clearParams:l&&m}),[G,V]=g.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:N,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:D,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:Y,isAiCfoAccessEnabled:B,onAskAiCfoClick:W,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:q,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(i=>v(i)),{useFeatureGate:e}=U(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Z,{children:[n.jsx(I,{path:"/",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
@@ -0,0 +1,22 @@
1
+ import{j as s}from"./liveblocks-CsaY8yYO.js";import{MM as te,eX as Q,ky as z,fE as q,fC as ne,Ke as J,Mq as oe,uP as Ee,MN as N,uE as ke,uZ as Ie,uT as ie,uI as re,uX as Pe,uU as je,MO as le,wE as Le,fo as Te,gf as ve,MP as M,uM as de,uL as ce,v0 as Fe,c6 as Ae}from"./zeni-epic-state-DcOrwCh7.js";import{Z as pe,Q as Y,e as E,z as G,i as ue,H as me,ak as ge,al as Oe,D as he,o as O,K as fe,a as Ce,am as Re,Y as Ve,$ as Ue,J as Ze,f as be,h as Be,v as $e,an as Me,I as Ke}from"./index-BkGSE7D5.js";import{D as ye,n as H,S as we}from"./mui-CblpH0Ha.js";import ae from"./NotFoundScreen-BTmOJXuO.js";import{a as r}from"./sentry-BUYxAJ0R.js";import{u as ee,i as _e,j as m,h as ze,g as Ge,n as He,o as se,p as $}from"./core-BoNEfvLs.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import{M as Xe}from"./MobileAppDrawer-CmiSBVZw.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="4e435f71-b062-4c35-8ca9-cf1258edea6d",a._sentryDebugIdIdentifier="sentry-dbid-4e435f71-b062-4c35-8ca9-cf1258edea6d")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},K=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=_e(),d=m(e=>te(e)),u=m(e=>Q(e)),D=m(e=>z(e)),{useFeatureGate:f}=Y(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),T=ne(u),v=J(u),U=oe(u),Z=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{R===!0?w(!0):C()},B=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),L=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:K.discardTitle}),descriptionComponent:s.jsx(De,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:i,isEditPopup:!0}):null,s.jsx(Oe,{...b})]})})},qe=H(we)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,Se=H(fe.H6Regular)`
6
+ margin-top: ${O.sp7};
7
+ padding-left: ${O.sp8};
8
+ padding-right: ${O.sp8};
9
+ color: ${a=>a.theme.colors.primary};
10
+ word-break: break-word;
11
+ `,De=H(fe.LargeRegularSp)`
12
+ color: ${a=>a.theme.colors.hero};
13
+ padding-left: ${O.sp8};
14
+ padding-right: ${O.sp8};
15
+ margin-bottom: 30px;
16
+ margin-top: ${O.sp4};
17
+ white-space: pre-line;
18
+ `,Je={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[R,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>Q(i)),u=m(i=>z(i)),{useFeatureGate:D}=Y(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=q(f,d),P=ne(d),T=J(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{R===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},B=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),L=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:T,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:L===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:Z};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:F}):null,s.jsx(Re,{...b})]})})},ea=H(we)`
19
+ display: flex;
20
+ min-height: 100%;
21
+ flex-direction: column;
22
+ `,aa=He(function(a,t){const l=le(a),n=G.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(M({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(M({searchText:o}))}}}})(Me);function X({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=ze(),n=ee(),g=Ge(),{areTenantIdsInSync:o}=Ve(),y=G.getSignedInUser(),h=m(e=>Q(e)),{useFeatureGate:p}=Y(),{isFeatureEnabled:R}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),I=!q(R,h)&&V,w=J(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,T]=r.useState(!1),[v,U]=r.useState("off"),[Z,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:B}=We({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Le(e.classState,e.classListState)),L=m(e=>Te(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(M({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),T(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(M({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),T(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Ze,{analytics:be,onLoad:e=>e.trackPageLoaded(Be.Event.members)}):null,f===!0?s.jsx(Ye,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Xe,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:L,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n(M({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:B})]})}function wa(){const a=Ke();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(X,{})}),s.jsx($,{path:"new",element:s.jsx(X,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(X,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-CsaY8yYO.js";import E from"./NotFoundScreen-BTmOJXuO.js";import{a as r}from"./sentry-BUYxAJ0R.js";import{h as _,g as v,j as p,i as M,u as U,N as z,n as P,o as $,p as h}from"./core-BoNEfvLs.js";import{eX as B,S$ as b,bq as F,bn as N,ig as O,fz as V}from"./zeni-epic-state-DcOrwCh7.js";import{A as q,z as I,$ as X,cY as Y}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import{M as H}from"./MobileAppDrawer-CmiSBVZw.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.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]="698021ed-0a81-405d-b273-c392548dad7d",e._sentryDebugIdIdentifier="sentry-dbid-698021ed-0a81-405d-b273-c392548dad7d")}catch{}})();const J=P(function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(Y),K=()=>{const e=_(),t=v(),d=q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),g=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,c=r.useCallback((a,i,T)=>{g(O({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(g(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0},[n?.fetchState,c]),j=r.useCallback((a,i)=>{c(a,i,!1)},[c]),f=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return X({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:S,handleDrawerToggle:f}),s.jsx(J,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:f,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(z,{to:`/${u}/dashboard`,replace:!0})};function fe(){return s.jsxs($,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{fe as default};
@@ -1 +1 @@
1
- import{a as h,b as t}from"./sentry-DwScFzsh.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
1
+ import{a as h,b as t}from"./sentry-BUYxAJ0R.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
@@ -1,4 +1,4 @@
1
- import{j as Ol}from"./liveblocks-Bi6jUyhM.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DwScFzsh.js";import{L as dt,bT as Tc,eS as Ac,J_ as Rc,Ks as kl,c1 as Tl,fq as Al,fr as Rl}from"./zeni-epic-state-DxVQhBoO.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,n as Yt,o as ue,p as Dl}from"./utils-Dwr2wQrV.js";import{r as un}from"./empty-CnUVdn1j.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-BkMwujYN.js";import{r as Gl}from"./index-BJcfizgW.js";import{r as zl}from"./index-DZkdTIsz.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BQch-SEa.js";import{u as Kl,z as Pc,L as Wl,_ as Jl,E as Xl,j as Ql,d as tf}from"./index-B7xMX0uC.js";import"./mui-D4v6d6vq.js";import{d as Pe}from"./decodeURIComponentSafe-BlZKyc9K.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="2330c33d-6af3-44c3-bb50-78fffb1b0dc4",t._sentryDebugIdIdentifier="sentry-dbid-2330c33d-6af3-44c3-bb50-78fffb1b0dc4")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
1
+ import{j as Ol}from"./liveblocks-CsaY8yYO.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-BUYxAJ0R.js";import{L as dt,bY as Tc,eX as Ac,LW as Rc,Mo as kl,c6 as Tl,g1 as Al,g2 as Rl}from"./zeni-epic-state-DcOrwCh7.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-D-CJm-xs.js";import{r as un}from"./empty-b5TFvQkm.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DMbxzmyG.js";import{r as Gl}from"./index-HOeFcz85.js";import{r as zl}from"./index-DM4yT559.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BoNEfvLs.js";import{u as Kl,z as Pc,L as Wl,M as Jl,N as Xl,n as Ql,f as tf}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import{d as Pe}from"./decodeURIComponentSafe-v7XwPgPo.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="f68ed07f-fb50-43a1-bda6-575803ec12f2",t._sentryDebugIdIdentifier="sentry-dbid-f68ed07f-fb50-43a1-bda6-575803ec12f2")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
2
2
  `),I=_(E).split(`
3
3
  `),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
4
4
 
@@ -0,0 +1,5 @@
1
+ import{j as s}from"./liveblocks-CsaY8yYO.js";import{a as o}from"./sentry-BUYxAJ0R.js";import{j as f,h as V,u as H,g as F,n as N}from"./core-BoNEfvLs.js";import{m as W,Z as _,z as P,bf as $,D as M,Y as U,$ as z,J,f as l,h as K,a8 as X,bg as Y}from"./index-BkGSE7D5.js";import{fI as Z,eX as q,Pm as R,Pn as G,vI as Q,vy as g,fK as ee,bS as ae,vD as re,Po as ne}from"./zeni-epic-state-DcOrwCh7.js";import{D as te,e as se,n as oe,S as ie}from"./mui-CblpH0Ha.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import{M as de}from"./MobileAppDrawer-CmiSBVZw.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="71dde029-2a00-4ea5-88ed-1894f7a168ec",e._sentryDebugIdIdentifier="sentry-dbid-71dde029-2a00-4ea5-88ed-1894f7a168ec")}catch{}})();const ce={overlayWidth:new M(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=W(),n=_();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>Z(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx($,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,I="refer-and-earn-status-update",we=N(function(e){const a=R(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(X(Y));function Se({isReferralDrawerOpen:e}){const a=V(),r=H(),n=F(),[i,u]=o.useState(!1),[d,D]=o.useState(!1),[x,E]=o.useState(!1),[k,h]=o.useState(!1),w=P.getSignedInUser(),C=f(t=>q(t)),m=f(t=>R(t)),v=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=G([m,p]),{areTenantIdsInSync:c}=U();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&x===!1&&(r(Q()),E(!0))},[]),o.useEffect(()=>{!i&&v==="Not-Started"&&c&&(u(!0),r(g(!0)))},[v,r,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(D(!0),r(ee(!0)))},[p,r,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),S=t=>{A(t)},{isAiCfoAccessEnabled:B,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,b,L)=>{L.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(J,{analytics:l,onLoad:t=>(b=>{w!=null&&b.trackPageLoaded(K.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:S}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{S(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:O,...T})]})}export{Se as R};
@@ -0,0 +1 @@
1
+ import{j as r}from"./liveblocks-CsaY8yYO.js";import _ from"./NotFoundScreen-BTmOJXuO.js";import{a as p}from"./sentry-BUYxAJ0R.js";import{h as E,g as x,u as C,j as u,N as D,n as k,o as O,p as b}from"./core-BoNEfvLs.js";import{eX as I,Qg as g,Qw as S,FD as V,EM as U,FC as d,Ft as $,QK as B,FF as W}from"./zeni-epic-state-DcOrwCh7.js";import{z as N,a8 as L,b_ as Q,af as T,bD as K,b$ as z}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";import{u as M,R as A}from"./ReimbursementApprovalRuleDetailScreen-Co6mqX7V.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="f2e90a39-cb30-4858-8382-0bbe66f676d6",e._sentryDebugIdIdentifier="sentry-dbid-f2e90a39-cb30-4858-8382-0bbe66f676d6")}catch{}})();const y="reimbursement-approval-rule-update",X=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})(L(Q)),q=({isLoading:e})=>{const o=E(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a)),v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,F,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(X,{currentTenant:l,location:s,navigate:o,...R})},j="reimbursement-approval-rule-update",G=k(function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}})(L(z)),H=()=>{const e=u(n=>I(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=K(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(q,{isLoading:s})},J=({isLoading:e})=>{const o=E(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a));M();const v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,F,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(G,{currentTenant:l,location:s,navigate:o,isLoading:e,...R})};function oe(){return r.jsxs(O,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(_,{})})]})}export{oe as R};
@@ -0,0 +1 @@
1
+ import{j as b}from"./liveblocks-CsaY8yYO.js";import{a as f}from"./sentry-BUYxAJ0R.js";import{u as T,j as g,h as _,g as O,i as k,n as F}from"./core-BoNEfvLs.js";import{k_ as L,Qw as E,Qg as x,Fw as V,FI as B,FD as A,FE as w,Qx as j,eX as z,FC as K}from"./zeni-epic-state-DcOrwCh7.js";import{z as N,m as P,y as Q,bQ as W,af as $,bD as X,bR as G}from"./index-BkGSE7D5.js";import"./mui-CblpH0Ha.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="f7ce4f81-f9fb-4847-ba89-0f70d768fb65",e._sentryDebugIdIdentifier="sentry-dbid-f7ce4f81-f9fb-4847-ba89-0f70d768fb65")}catch{}})();function H(){const e=T(),s=f.useRef(!1),t=g(o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started"),p=g(o=>o.vendorListState.allVendorIdsBillsTab.length>0);f.useEffect(()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))},[p,t,e])}const J=F(function(e,s){const t=E(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===s.approvalRuleId)===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach(u=>{const I=u.actors.selectedUsers.map(m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1})),R=u.actors.selectedNonUsers.map(m=>{const y=(S=m.value,j(S)==null);var S;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}}),c=I.concat(R);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),h},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}})(W);function M(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=g(n=>E(n)),i=g(n=>x(n)),[a,d]=f.useState(!1);if(f.useEffect(()=>{a||(d(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=F(function(e,s){const t=E(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach(y=>{const S=y.actorKind?.selectedOption,C=y.selectedRole?.selectedOption;let D=[];S==="role"&&C!=null?D=[{type:"attribute",subType:C,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map(q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1})));const U=y.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})}),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=h?.selection.selectedOptions??[];if(R.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(K(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}})(G);function ne(){const e=g(t=>z(t)),{isApprovalRulesV3Enabled:s}=X(e?.tenantId);return s?b.jsx(Z,{}):b.jsx(M,{})}function Z(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=g(n=>E(n)),i=g(n=>x(n)),[a,d]=f.useState(!1);if(H(),f.useEffect(()=>{a||(d(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,H as u};
@@ -0,0 +1,68 @@
1
+ import{j as s}from"./liveblocks-CsaY8yYO.js";import{h as W,u as me,g as H,i as Y,j as w,N as _,n as K,l as mt,o as ct,p as E}from"./core-BoNEfvLs.js";import{eX as V,QL as ce,c6 as de,EH as je,kJ as dt,EU as se,ET as ie,QM as ut,bn as ue,gq as Fe,QN as pt,N8 as bt,ky as De,N9 as Re,Na as gt,jt as ht,Q2 as ft,jI as St,Ev as It,uc as Rt,jA as yt,Ff as Ue,QO as Le,QP as At,QQ as vt,QR as kt,QS as Ct,QT as Et,E$ as ye,jO as wt,Qb as xt,EV as Bt,EF as Tt,QU as jt,EE as Ft,QV as Dt,EN as Ae,F3 as Ut,F2 as Lt,E_ as Pt,QW as Pe,Ke as $t,bq as Mt,EQ as _t,Fx as Nt,QX as Ot,QY as Qt,Fb as zt,F8 as ve,Px as Gt,EC as Zt,QZ as $e,FZ as ke,G5 as Ht,Q_ as Vt,Q$ as G,R0 as Wt,R1 as Me,R2 as Kt,R3 as _e,R4 as Ne,Fn as oe,bu as qt,bK as pe,cG as be,fE as Oe,fC as Qe,R5 as Jt,fz as Yt,PK as Xt,R6 as en,R7 as ze,PO as tn,Qw as nn,R8 as an,QK as sn,G2 as Ce,G1 as on,R9 as rn,Ra as ln,Rb as mn,Rc as cn,Rd as dn,Qh as un,FU as pn,FY as bn,bs as gn,bJ as hn,cA as fn,co as Sn,bt as In,LY as Rn,cQ as yn,cT as An,cS as vn,cz as kn}from"./zeni-epic-state-DcOrwCh7.js";import{A as Ge,Z as Ze,Q as X,e as v,z as M,c0 as He,J as ee,f as k,aL as Ee,o as F,at as J,H as Cn,a as Ve,c1 as En,v as Z,$ as We,c2 as wn,I as te,c3 as xn,Y as Bn,D as Tn,y as ge,h as Ke,a8 as jn,bo as Fn,a3 as Dn,m as qe,c4 as Un,i as Ln}from"./index-BkGSE7D5.js";import{n as N,S as Pn}from"./mui-CblpH0Ha.js";import re from"./NotFoundScreen-BTmOJXuO.js";import{S as we}from"./SetupPagesScreen-C5uQEz7K.js";import{F as Je}from"./FeaturePreviewScreen-9qGkTofX.js";import{a as f}from"./sentry-BUYxAJ0R.js";import{u as he}from"./useAskAiCfoHostNavButtonProps-BNRHSSlT.js";import{u as Ye}from"./useInitialThreadRequest-tlPkIpCr.js";import{D as $n}from"./DrawerScreen-enq1kex3.js";import{M as Xe}from"./MobileAppDrawer-CmiSBVZw.js";import{R as Mn}from"./ReimbursementApprovalRoutes-D7K2CtZa.js";import{FallBackRoute as _n}from"./ScreenRoutes-S4iuOC-S.js";import"./recharts-NoTYHO1X.js";import"./analytics-ChMmdjNV.js";import"./plaid-74upgTWR.js";import"./dnd-DvJtEb2B.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbDVmnvZ.js";import"./lexical-D_KbwLmW.js";import"./pdf-D2egRSjc.js";import"./utils-D-CJm-xs.js";import"./analyticsHelper-Bq2cX6hw.js";import"./routePaths-DlT4djwo.js";import"./BusinessVerificationPageScreen-CxMuID_0.js";import"./ReimbursementApprovalRuleDetailScreen-Co6mqX7V.js";import"./getLocaleForTenant-B4Of7eQD.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]="e7d8beff-8eda-4333-a3e1-d50cd7e6fae3",e._sentryDebugIdIdentifier="sentry-dbid-e7d8beff-8eda-4333-a3e1-d50cd7e6fae3")}catch{}})();const et=e=>`/${e}/reimbursements`,Nn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:U}}}=Ve.getLocalizedStrings(),On=K(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=M.getSignedInUser(),c=ue(d),m=r.plaidConnectionDetails,o=Fe(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ce(e,t.reimbursementId),b=pt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:de(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:k,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=M.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ie(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(Ae(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Pt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(Ae(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Dt({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Ft(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(ye(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(ye("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(se({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(kt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(vt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Le()),e(At());const i=et(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(k.trackReimbursementDeleteReimbursement(n),e(Ue(n)))},onSaveBankAccount:()=>{a?.userId&&e(yt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(Rt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Re("common"))},onCancelAutoComplete:()=>{e(Re("common"))}}}})(En);function xe(){const e=W(),t=me(),n=H(),{reimbursementId:r}=Y(),d=Ge(),c=Ze(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(v.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(v.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=he({mobileExploreReferrer:"Reimbursement Details"}),x=H().pathname,j=x.includes("edit"),A=x.includes("reimbursement/new"),[D,B]=f.useState(!1),C=M.getSignedInUser(),I=w(p=>V(p)),g=w(p=>ce(p,r)),L=Ye(I?.companyId,{clearParams:g.fetchState==="Completed"}),P=de(I?.userRole??[]);f.useEffect(()=>{(A&&!D||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(je(!1,b,y,r)))});const $=w(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(C==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||P&&g.billStatus==="rejected"||P===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(Qn,{windowSize:c,children:[s.jsx(ee,{analytics:k,onLoad:p=>(z=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&z.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(zn,{}):null,m&&c!=="small"?s.jsx(Gn,{children:s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Hn,{onClick:()=>o(!1),children:s.jsx(Nn,{})}),s.jsx(Ee,{showAutofill:m,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ie(p,a,!0,r,C?.userId))},updateInvoiceUploadFetchState:p=>{t(se({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:U.dropReceipt.upload,single:U.dropReceipt.single,or:U.dropReceipt.or,multiple:U.dropReceipt.multiple,receipts:U.dropReceipt.receipts}})]}):null,s.jsx(Vn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Qn=N.div`
2
+ display: flex;
3
+ position: relative;
4
+ height: 100vh;
5
+ flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
6
+ background-color: ${e=>e.theme.colors.grey4};
7
+ `,zn=N.div`
8
+ position: fixed;
9
+ top: 0;
10
+ left: 0;
11
+ right: 0;
12
+ bottom: 0;
13
+ background-color: ${Cn.overlayBackgroundBlack};
14
+ z-index: 5;
15
+ `,Gn=N.div`
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ width: 42%;
20
+ height: 100%;
21
+ z-index: 6;
22
+ display: flex;
23
+ background-color: transparent;
24
+ overflow: hidden;
25
+ `,Zn=N.div`
26
+ position: fixed;
27
+ top: 0;
28
+ left: 0;
29
+ right: 0;
30
+ bottom: 0;
31
+ z-index: 11;
32
+ display: flex;
33
+ flex-direction: column;
34
+ overflow-y: auto;
35
+ background-color: ${e=>e.theme.colors.grey4};
36
+ `,Hn=N.button`
37
+ align-self: flex-end;
38
+ background: none;
39
+ border: none;
40
+ cursor: pointer;
41
+ padding: ${F.sp2} ${F.sp3};
42
+ line-height: 1;
43
+ color: ${e=>e.theme.colors.hero};
44
+ &:hover {
45
+ color: ${e=>e.theme.colors.primary};
46
+ }
47
+ svg {
48
+ width: ${F.sp4};
49
+ height: ${F.sp4};
50
+ }
51
+ `,Vn=N.div`
52
+ display: flex;
53
+ flex-direction: column;
54
+ width: 100%;
55
+ ${e=>e.windowSize!=="small"?"overflow: auto;":""}
56
+ `,Wn=K(function(e,t){const n=Pe(e,t.reimbursementId),r=M.getSignedInUser(),d=ue(r),c=e.tenantState.currentTenantId,m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c??""},o=`${n.createdBy?.firstName??"Zeni"} ${n.createdBy?.lastName??""}`;let a=!1;n?.remiActivities.length>0&&(a=Ot(n.remiActivities,Qt(t.currentTenant),r));const i=de(t.currentTenant?.userRole??[]),l=r?.userId===n.createdBy?.userId;return{remiDetails:n,uploadInvoiceEndPoint:`${J.communicationAgentMicroServiceBaseUrl}`,authParams:m,signedInUser:r,createdBy:o,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,isAdmin:i,showApproveRejectBtns:a,isZeniUser:d,isSignedInUserReimbursementCreator:l,isAccountingClassesEnabled:De(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r;return{onDuplicateLineClick:(a,i)=>window.open(`/${o}/reimbursement/${a}#L${i}`),redirectToReimbursementListScreen:()=>{e(Le());const a=et(o),i=Z(d.state?.pathnameStackToGoBack,d.pathname);c(a,{state:{pathnameStackToGoBack:i}})},onSaveRealTimeApprovals:a=>{e(Zt(n,"reimbursement",a))},updateEditRealTimeApproverClicked:a=>{e(Gt({isEdit:a,entityId:n,entityType:"reimbursement"}))},approveOrRejectRemi:a=>{a.type==="approved"?e(ve(n,a.type,"")):e(ve(n,a.type,a.description??""))},redirectToEditableReimbursementScreen:()=>{const a=Z(d.state?.pathnameStackToGoBack,d.pathname);c("./edit",{state:{pathnameStackToGoBack:a}})},deleteReimbursement:()=>{k.trackReimbursementDeleteReimbursement(n),e(Ue(n))},cancelAndDeleteReport:a=>{a===!0?k.trackReimbursementCancelAndDeleteReimbursement(n):k.trackReimbursementCancelReimbursement(n),e(zt(n,a))},handleZeniLogoClick:()=>{m.toggle()}}})(wn);function Kn(){const e=W(),t=me(),n=H(),r=n.hash.substring(1),d=Ge(),{reimbursementId:c}=Y(),m=M.getSignedInUser(),o=w(R=>V(R)),a=w(R=>Pe(R,c??"")),i=a.remiDetails?.reimbursementInfo.stage.code==="draft",l=Ye(o?.companyId,{clearParams:a.fetchState==="Completed"&&!i}),{isAiCfoAccessEnabled:b,onAskAiCfoClick:y}=he({mobileExploreReferrer:"Reimbursement Details"});We({isDataReady:a.fetchState==="Completed"});const{useFeatureGate:h}=X(),{isFeatureEnabled:T}=h(v.isLimitedCategoryForReimbursement),[u,x]=f.useState(!1),[j,A]=f.useState(!1),[D,B]=f.useState(!1),{isFeatureEnabled:C}=h(v.isReimbursementCommentingEnabled),{isFeatureEnabled:I}=h(v.isShowDeletedReimbursementsFeatureEnabled),g=w(R=>ce(R,c??"")),L=$t(o),P=Mt(o.userRole),$=a.fetchState;if(f.useEffect(()=>{u||c==null?u==1&&$==="Error"&&e("page-not-found",{replace:!0}):(x(!0),t(_t(c,!1,I)))},[u,c,t,$]),f.useEffect(()=>{I&&a.remiDetails?.isDeleted===!0||o.isZeni===!0&&m?.userEmailDomain==="zeni.ai"&&L===!1?B(!1):B(a.remiActivities[0]?.isRealTimeApprovalEnabled&&(P||a.allApprovers.find(R=>R.user.userId===m?.userId)!=null||a.remiDetails?.lastUpdatedBy===m?.userId))},[a.remiActivities[0]?.isRealTimeApprovalEnabled,a.allApprovers,a.remiDetails?.lastUpdatedBy,P,o.isZeni,L,m]),f.useEffect(()=>{j||a.fetchState!="Completed"||a.remiDetails?.reimbursementInfo.stage.code=="paid"||a.remiDetails?.reimbursementInfo.stage.code=="scheduled"||g.fetchState=="Completed"||g.fetchState=="In-Progress"||(A(!0),t(je(!1,T,I,c)),a.remiActivities[0]?.isRealTimeApprovalEnabled===!0&&t(Nt(!1,!0,!0,a.lastUpdatedByUserId)))},[j,a,c,t]),m==null)throw Error("Can't access address page without signing in...");return a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState=="Completed"&&a.remiDetails.isDeleted===!1?s.jsx(_,{to:`./edit${n.search}`}):a.deleteStatus.fetchState==="In-Progress"||a.cancelAndDeleteStatus.fetchState==="In-Progress"||a.remiDetails?.reimbursementInfo.stage.code=="draft"&&g.fetchState!="Completed"||a.fetchState!="Completed"?s.jsx(He,{}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:k,onLoad:R=>(p=>{c!=null&&p.trackReimbursementReimbursementDetails(c)})(R)}),s.jsx(Wn,{initialOpenThreadRequest:l??void 0,scrollId:r,isReimbursementCommentingEnabled:C,isShowDeletedReimbursementEnabled:I,location:n,navigate:e,isRealTimeApprovalEnabled:D,currentTenant:o,reimbursementId:c??"",themeState:d,isAiCfoAccessEnabled:b,onAskAiCfoClick:y})]})}const qn=K(function(e,t){return{remisReviewView:$e(e),analytics:t.analytics}},function(e,t){return{onCloseOverlay:()=>{t.navigate("./"),e(G())},onCloseReviewItem:n=>{e(Vt(n))},onProceedForBulkActionClick:(n,r)=>{switch(n){case"send_for_approval":e(Ht());break;case"approve":e(ke("approved",r??""));break;case"reject":e(ke("rejected",r??""))}}}})(xn);function Jn(){const e=W(),t=w(c=>c.remisBulkActionViewState.bulkSubmissionFetchState.fetchState),{remisForReview:n}=w(c=>$e(c)),r=te(),d=r?.loggedInUserRole?.includes("admin")===!0;return f.useEffect(()=>{t!=="Completed"&&n.length!==0||e("./")},[t,n.length]),s.jsx(qn,{navigate:e,analytics:k,isAdmin:d})}const Q=tn(),tt="bulk-operation-update",le="reimbursement-approval-rule-update",{spendManagement:Yn,common:Be}=Ve.getLocalizedStrings(),Te=Yn.reimbursement.bulkActions,Xn=N.div`
57
+ display: flex;
58
+ min-height: 100%;
59
+ width: 100%;
60
+ flex: 1 1 auto;
61
+ flex-direction: column;
62
+ align-items: center;
63
+ background-color: ${e=>e.theme.colors.grey4};
64
+ `,ea=K(function(e,t){const n=Ne(e,Q,t.isBulkActionEnabled);let r=n.allSubTabs;const d=M.getSignedInUser(),c=ue(d),m=e.tenantState.currentTenantId,o=V(e),a=o?.companyName??"",i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:m??""},l=e.remiListState.downloadUIState.downloadState;t.isShowDeletedReimbursementEnabled===!1&&(r=r.filter(h=>h!=="deleted"));const b=n.fetchState,y=nn(e);return{transactionList:t.isShowDeletedReimbursementEnabled?n.reimbursements:n.reimbursements.filter(h=>h.isDeleted===!1),isAdmin:t.isAdmin,isZeniUser:c,isBillPayCommentingEnabled:t.isBillPayCommentingEnabled,isReimbursementCommentingEnabled:t.isReimbursementCommentingEnabled,allSubTabs:r,isEmployee:t.isEmployee,currentTab:n.currentTab,currentSubTab:n.currentSubTab,approvalCount:n.approvalCount,fetchState:b,botEmail:n.reimbursementBotEmail,analytics:k,uiState:n.uiState,searchText:n.searchText,filters:n.filters,downloadParams:{authParams:i,companyName:a,timePeriod:Q,spendManagementEndPoint:`${Dn}/spendManagement`,isShowDeletedBillsEnabled:t.isShowDeletedBillsEnabled,isShowDeletedReimbursementEnabled:t.isShowDeletedReimbursementEnabled},downloadState:l,isBulkActionAllowed:n.remiListBulkActionInfo?.isBulkActionAllowed,transactionsSelectedForBulkAction:n.remiListBulkActionInfo?.remisSelectedForBulkAction,allowedBulkActions:n.remiListBulkActionInfo?.allowedBulkActions,remiApprovalRulesAffectedEntityIds:y.affectedEntityIds}},function(e,t){const{navigate:n,currentTenant:r,location:d,period:c}=t,{tenantEmailDomain:m}=r;return{updateTabToState:o=>{e(G()),e(Me(o))},onSubtabChange:o=>{e(G()),e(_e(o))},onTransactionClick:(o,a)=>{const i=aa(m,o,a),l=Z(d.state?.pathnameStackToGoBack,d.pathname);n(i,{state:{pathnameStackToGoBack:l}})},onClickSetupIcon:()=>{const o=na(m),a=Z(d.state?.pathnameStackToGoBack,d.pathname);n(o,{state:{pathnameStackToGoBack:a}})},onAddTransactionClick:()=>{const{tenantEmailDomain:o}=t.currentTenant;k?.trackReimbursementNewReimbursement();const a=`/${o}/reimbursement/new`,i=Z(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(a,{state:{pathnameStackToGoBack:i}})},onColumnSortConfigChanged:(o,a)=>{e(dn({uiState:{sortKey:o,sortOrder:a},period:t.period}))},onSearchTextChanged:o=>{e(cn(o))},onFiltersChange:o=>{e(mn({filters:o})),o.categories.every(a=>a.field!=null&&a.values?.length!==0)&&k.trackSpendManagmentFilterChange("reimbursement",o.categories.map(a=>`${a.field}-${JSON.stringify(a.values)}`))},updateDownloadStateHandler:o=>{o==="In-Progress"&&k.trackSpendManagementDownloadClick("reimbursement"),e(ln({uiState:{downloadState:o}}))},onReloadTransactions:()=>{e(oe(c,!0,t.isShowDeletedReimbursementEnabled,!1,!0))},onBackClick:()=>{n("../",{relative:"path"})},onNavigateToSettings:()=>{n("../reimbursements/setup")},updateBulkActionList:o=>{e(rn(o))},removeAllTransactionsFromBulkActionList:()=>{e(G())},onProceedForBulkActionClick:(o,a)=>{switch(o){case"delete":case"cancel":e(on(o,a??""));break;case"send_for_approval":e(Ce("send_for_approval")),t.navigate("./bulk-review");break;case"review":e(Ce("approve")),t.navigate("./bulk-review")}},onReimbursementApprovalRulesEventReceived:o=>{o.endsWith(le)&&e(sn(!1))},onEventReceived:o=>{o===tt&&e(an())}}})(jn(Fn));function ta(){const e=W(),t=me(),n=H(),r=n.state,d=Ze(),[c,m]=f.useState(null),o=mt("/:tenantEmailDomain/reimbursements/bulk-review")!=null;f.useEffect(()=>{if(r?.tab!=null&&r?.subTab!=null){const S=Wt(r.tab.toString());S!=null?t(Me(S)):console.log("Warning:Not a valid remiListTab");const O=Kt(r.subTab.toString());O!=null?t(_e(O)):console.log("Warning:Not a valid remiListSubTab")}return()=>{t(G())}},[]);const{useFeatureGate:a}=X(),{isFeatureEnabled:i}=a(v.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:l}=a(v.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:b}=a(v.isBillPayCommentingEnabled),{isFeatureEnabled:y}=a(v.isReimbursementCommentingEnabled),{isFeatureEnabled:h}=a(v.isReimbursementBulkActionEnabled),T=M.getSignedInUser(),u=w(S=>V(S)),[x,j]=f.useState(!1),[A,D]=f.useState(!1),B=te(),C=B?.loggedInUserRole?.includes("admin")===!0,I=w(S=>Ne(S,Q,h)),{areTenantIdsInSync:g}=Bn(),L=I.fetchState,{isAiCfoAccessEnabled:P,onAskAiCfoClick:$}=he({mobileExploreReferrer:"Reimbursement List"});if(We({isDataReady:L==="Completed"}),f.useEffect(()=>{!A&&g&&(D(!0),t(oe(Q,!0,l,!1,!0)))},[A,Q,t,g]),T==null)throw Error("Can't access address page without signing in...");const R=!!u?.userRole&&qt(u),p=pe(B?.loggedInUserRoleMap),z=be(B?.loggedInUserRoleMap),ne=!!u.userReimbursementInfo?.isReimbursementTOSAccepted,ae=!!u.companyReimbursementInfo?.info?.isReimbursementEnabled,nt=!!u.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,at=w(S=>Fe(S.companyState,u.companyId)),st=at?.company.featuresActivationInfo.connectedAccountProvider,fe=S=>{j(S)},{isFeatureEnabled:it}=a(v.isDebitCardFeatureEnabled),ot=Oe(it,u),rt=Qe(u),{remisProcessed:q,remisProcessing:Se}=w(S=>Jt(S));f.useEffect(()=>{q===Se&&c!=null&&(t(Yt({messageSection:"reimbursement_bulk_processed",messageText:"success",type:"success",showStatusIcon:!0,variables:[{variableName:"_report_",variableValue:q>1?Te.reports:Te.report},{variableName:"_has_",variableValue:q>1?Be.texts.have:Be.texts.has},{variableName:"_action_",variableValue:Xt(c)}]})),t(en()),setTimeout(()=>{t(oe(Q,!0,l,!1,!0,!0))},3e3),m(null))},[q,Se]);const lt={events:u.companyId!=null?[`private-encrypted-${u.companyId}.${tt}`,`private-encrypted-${u.companyId}.${le}`]:[],eventCallback:(S,O,Ie)=>{S.endsWith(le)?Ie.onReimbursementApprovalRulesEventReceived?.(S):O.entity_type==="reimbursement"&&(m(O.operation_type),Ie.onEventReceived(S))}};return n.pathname.endsWith("/reimbursements/")||n.pathname.endsWith("/reimbursements")||n.pathname.endsWith("/reimbursements/bulk-review")?ot===!0||rt===!0?s.jsx(Je,{}):ae&&(!R||p)||z&&ne?s.jsxs(s.Fragment,{children:[L==="Completed"?s.jsx(ee,{analytics:k,onLoad:S=>(O=>O.trackPageLoaded(Ke.Event.reimbursementHome))(S)}):null,s.jsx(Xe,{isAppContentDrawerOpen:x,handleDrawerToggle:fe}),s.jsxs(Xn,{windowSize:d,children:[s.jsx($n,{isOpen:o,drawerLeftMargin:new Tn(0,0,300,600),onClose:()=>{e("./"),t(G())},children:s.jsx(sa,{onClick:S=>S.stopPropagation(),children:s.jsx(Jn,{})})}),s.jsx(ea,{isShowDeletedBillsEnabled:i,isShowDeletedReimbursementEnabled:l,isBillPayCommentingEnabled:b,isReimbursementCommentingEnabled:y,location:n,navigate:e,currentTenant:u,period:Q,isAdmin:C,isEmployee:R,entity:"reimbursement",onClickMenuIcon:()=>{fe(!0)},createdByUserList:I.createdByUserList,createdByUserListFetchState:I.createdByUserListFetchState,isDownloadEnabled:I.isDownloadEnabled,connectedAccountProvider:st,isBulkActionEnabled:h,bulkSubmissionLimit:I.remiBulkSubmissionLimit,bulkSubmissionFetchState:I.remiListBulkActionInfo.bulkSubmissionFetchState,isAiCfoAccessEnabled:P,onAskAiCfoClick:$,...lt})]})]}):nt&&p?s.jsx(_,{to:"../setup"}):B!=null&&ze(u,B.loggedInUserRoleMap)?s.jsx(_,{to:"../promo"}):s.jsx(ge,{fetchState:"In-Progress"}):s.jsx(re,{})}const na=e=>`/${e}/reimbursements/setup`,aa=(e,t,n)=>{let r=`/${e}/reimbursement/${encodeURIComponent(t)}`;return n=="draft"&&(r+="/edit"),r},sa=N(Pn)`
65
+ display: flex;
66
+ min-height: 100%;
67
+ flex-direction: column;
68
+ `,ia=K(function(e,t){const{companyId:n}=t;return{reimbursementSetupView:un(e,n),analytics:k,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",videoUrl:"https://player.vimeo.com/video/814821498?h=e7fd11e13e&badge=0&autopause=0&player_id=0&app_id=122963"}},function(e,t){const{companyId:n,navigate:r}=t;return{onSetupButtonClick:()=>{e(bn(n))},onCreateNewRemiButtonClick:()=>{e(pn(t.userRoleId))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupReimbursementSuccess:()=>{t.isEmployee?r("../../reimbursement/new",{relative:"path"}):r("../reimbursements/setup",{relative:"path"})}}})(Un),oa=()=>{const e=W(),t=H(),{tenantEmailDomain:n}=Y(),r=qe(),[d,c]=f.useState(!1),m=w(A=>V(A)),o=M.getSignedInUserTenant(n)?.companyId??m.companyId,a=M.getSignedInUser(),i=m.userRoleId,l=!!m.userRole?.includes("reimbursements_user"),b=te(),y=pe(b?.loggedInUserRoleMap),h=be(b?.loggedInUserRoleMap),T=!!m.userReimbursementInfo?.isReimbursementTOSAccepted,u=!!m.companyReimbursementInfo?.info?.isReimbursementEnabled,x=!!m.companyReimbursementInfo?.info?.isReimbursementTOSAccepted,j=A=>{c(A)};if(a==null)throw Error("Can't access reimbursement promo page without signing in...");return u&&h&&T?s.jsx(_,{to:"../../../reimbursements"}):x&&y?s.jsx(_,{to:"../../reimbursements/setup"}):m.companyReimbursementInfo&&!x||m.userReimbursementInfo&&h&&T===!1?s.jsxs(s.Fragment,{children:[s.jsx(ee,{analytics:k,onLoad:A=>(D=>D.trackPageLoaded(Ke.Event.reimbursementPromoPage))(A)}),s.jsx(Xe,{isAppContentDrawerOpen:d,handleDrawerToggle:j}),s.jsx(ia,{companyId:o,navigate:e,location:t,userReimbursementInfo:m.userReimbursementInfo,userRoleId:i,isEmployee:l,onClickMenuIcon:()=>{j(!0)}})]}):s.jsx(ge,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5}})};function Pa(){const e=w(ae=>V(ae)),t=te(),n=!!e.company?.companyReimbursementInfo.isReimbursementEnabled,r=qe(),d=!!e.company?.companyReimbursementInfo.isReimbursementTOSAccepted,c=!!e.userReimbursementInfo?.isReimbursementTOSAccepted,{useFeatureGate:m}=X(),{isFeatureEnabled:o}=m(v.isChargeCardFeatureEnabled),{isFeatureEnabled:a}=m(v.isDebitCardFeatureEnabled),i=Oe(a,e),l=Qe(e),b=e?.userRole!=null&&gn(e?.userRole),y=(e?.company==null||e.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b)&&hn(t?.loggedInUserRoleMap),h=fn(t?.loggedInUserRoleMap),T=e?.company==null||e.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!b,u=pe(t?.loggedInUserRoleMap),x=T&&u,{isFeatureEnabled:j}=m(v.isDepositAccountsFeatureEnabled),A=j&&!b&&Sn(t?.loggedInUserRoleMap),D=Ln(e,o,a)&&!b,B=D&&In(t?.loggedInUserRoleMap),C=Rn(t?.loggedInUserRoleMap),I=yn(t?.loggedInUserRoleMap),g=An(t?.loggedInUserRoleMap),L=vn(t?.loggedInUserRoleMap),P=kn(t?.loggedInUserRoleMap),$=be(t?.loggedInUserRoleMap),R=D&&L,{tenantEmailDomain:p}=Y(),z=H(),ne=n===!0&&(u||$&&c);return s.jsxs(ct,{children:[z.pathname.includes("/reimbursements")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"verification",element:s.jsx(we,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:x,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:C,productType:"reimbursement",type:"verification"})}),s.jsx(E,{path:"setup",element:s.jsx(we,{isBillPayAdminLevelAccess:y,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:x,isZeniAccountAdminLevelAccess:A,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:C,productType:"reimbursement",type:"setup"})}),s.jsx(E,{path:"promo",element:s.jsx(oa,{})}),s.jsx(E,{path:"approval-rules/*",element:x?s.jsx(Mn,{}):s.jsx(_n,{isUserHasZeniAccountsAccess:I,isUserHasBillPayAccess:P,isUserHasReimbursementAccess:$,isUserHasTreasuryAccess:g,isTenantBankingOnly:i,showChargeCardRoute:R,tenantEmailDomain:p??""})}),ne&&s.jsx(E,{path:"*",element:s.jsx(ta,{})}),(i===!0||l===!0)&&s.jsx(E,{path:"/*",element:s.jsx(Je,{})}),t!=null&&ze(e,t?.loggedInUserRoleMap)&&s.jsx(E,{path:"*",element:s.jsx(_,{to:"../promo"})}),d&&u&&s.jsx(E,{path:"*",element:s.jsx(_,{to:"../setup"})})]}):z.pathname.includes("/reimbursement")?s.jsxs(s.Fragment,{children:[s.jsx(E,{path:"new",element:s.jsx(xe,{})}),s.jsx(E,{path:":reimbursementId",element:s.jsx(Kn,{})}),s.jsx(E,{path:":reimbursementId/edit",element:s.jsx(xe,{})}),s.jsx(E,{path:"*",element:s.jsx(re,{})})]}):s.jsx(E,{path:"*",element:s.jsx(ge,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${F.sp1} ${r.colors.dropShadowNormal}`}})}),s.jsx(E,{path:"*",element:s.jsx(re,{})})]})}export{Pa as default};