@zeniai/web-app-ui 5.1.25-dev → 5.1.26-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/assets/AddressRoutes-0R3_aA41.js +1 -0
  2. package/dist/assets/{AddressScreen-t45pXVvS.js → AddressScreen-CwUitmLb.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-7mHfCmdb.js → AiCfoScreen-BM-zywQS.js} +5 -5
  4. package/dist/assets/BillPayApprovalRoutes-CeirfROW.js +1 -0
  5. package/dist/assets/{BillPayRoutes-DGHURUBB.js → BillPayRoutes-DizlFO2c.js} +33 -33
  6. package/dist/assets/{BusinessVerificationPageScreen-DRR9km69.js → BusinessVerificationPageScreen-DelMZ43T.js} +2 -2
  7. package/dist/assets/ChargeCardRoutes-BCHHiOh2.js +71 -0
  8. package/dist/assets/{CompanyPassportScreen-03cd6rew.js → CompanyPassportScreen-bMh32BNk.js} +1 -1
  9. package/dist/assets/ConnectionAuthScreen-CND1CVE1.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-i3t4DdMS.js +1 -0
  11. package/dist/assets/CustomerOnboardingRoutes-Ckf9CRVp.js +23 -0
  12. package/dist/assets/{DashboardRoutes-BWWut7Lp.js → DashboardRoutes-Xz9tLvD4.js} +3 -3
  13. package/dist/assets/{DefaultTenantHome-D0x0VK8i.js → DefaultTenantHome-BL1VliOs.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-By9DmOyv.js → DomesticWireDetailScreen-C-2o-pdl.js} +4 -4
  15. package/dist/assets/DrawerScreen-B6LOqRIW.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-Ber7e70j.js +1 -0
  17. package/dist/assets/ExpenseAutomationRoutes-D2gCOOi9.js +25 -0
  18. package/dist/assets/{FeaturePreviewScreen-4ttP8nOi.js → FeaturePreviewScreen-B3xiV9TQ.js} +1 -1
  19. package/dist/assets/HubSpotOAuthCallbackScreen-DkX4qyEK.js +1 -0
  20. package/dist/assets/{MagicLinkRoutes-BKlgQ_Ie.js → MagicLinkRoutes-BNSEJyYK.js} +9 -9
  21. package/dist/assets/MagicLinkSignInScreen-napOy1l_.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-Biso_61t.js → MobileAppDrawer-BUMTEMjO.js} +1 -1
  23. package/dist/assets/NotFoundScreen-D9VlElva.js +1 -0
  24. package/dist/assets/NotificationRoutes-DSGiis40.js +1 -0
  25. package/dist/assets/OAuthConsentScreen-BJzmb188.js +1 -0
  26. package/dist/assets/PandLWithForecastRoutes-CRfRYmWG.js +1 -0
  27. package/dist/assets/{PeopleRoutes-CfzOn3nZ.js → PeopleRoutes-BVuTVBzj.js} +3 -3
  28. package/dist/assets/PerformanceRoutes-CxloQO2x.js +1 -0
  29. package/dist/assets/{Preview-CmzR2zNp.js → Preview-Bs7oNsaZ.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-CmHLrNN0.js → QBOConnectionScreen-DQcyCDZo.js} +1 -1
  31. package/dist/assets/ReferralListScreen-BTfLX813.js +5 -0
  32. package/dist/assets/ReimbursementApprovalRoutes-B-jnIbQC.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DYLPHNtr.js → ReimbursementApprovalRuleDetailScreen-DW8nJs5W.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-B0uSlLog.js → ReimbursementRoutes-DJRM01sd.js} +9 -9
  35. package/dist/assets/{ReportsRoutes-RqLKE5WA.js → ReportsRoutes-BPWLXTzc.js} +1 -1
  36. package/dist/assets/RewardsRoutes-B5hgkkv5.js +1 -0
  37. package/dist/assets/ScreenRoutes-Capq29v6.js +2 -0
  38. package/dist/assets/{SettingsRoutes-CzU-HcCn.js → SettingsRoutes-2UnfXGWw.js} +7 -7
  39. package/dist/assets/{SetupPagesScreen-Bi9C_-FR.js → SetupPagesScreen-CSEiZvDo.js} +5 -5
  40. package/dist/assets/SignInScreen-CRSyr-sR.js +1 -0
  41. package/dist/assets/SignOutScreen-DDguUbw1.js +9 -0
  42. package/dist/assets/{TaskListScreen-Bwwbd5X8.js → TaskListScreen-CwZLrcJh.js} +2 -2
  43. package/dist/assets/TaskRoutes-gPAeHYb4.js +9 -0
  44. package/dist/assets/{TransactionDetailRoutes-BtVYAo59.js → TransactionDetailRoutes-KHwSkMWo.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-BxH3gBsf.js → TransactionDetailScreen-EjPCKwQc.js} +2 -2
  46. package/dist/assets/{TransactionListRoutes-DaBzUpfC.js → TransactionListRoutes-BGRi67NF.js} +1 -1
  47. package/dist/assets/TreasuryRoutes-Cun7cIJu.js +37 -0
  48. package/dist/assets/{VendorsRoutes-Fq7EQRDW.js → VendorsRoutes-D2kooM2G.js} +27 -27
  49. package/dist/assets/WiseConfirmationScreen-BOfPIcqz.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-2E4c7VWB.js → ZeniAccountRoutes-BCzDkNgd.js} +11 -11
  51. package/dist/assets/ZeniAccountStatementScreen-DmPXkrSN.js +9 -0
  52. package/dist/assets/{accountMappingHelper-EVwRyhXo.js → accountMappingHelper-DP34_oVo.js} +1 -1
  53. package/dist/assets/{analytics-DyffXLrl.js → analytics-kuRARP-L.js} +1 -1
  54. package/dist/assets/{analyticsHelper-tq4PT7c_.js → analyticsHelper-DojlKZDc.js} +1 -1
  55. package/dist/assets/{core-DYij5xsh.js → core-r5mQR9TZ.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-CSUd4Wt5.js → decodeURIComponentSafe-Cj9PISMb.js} +1 -1
  57. package/dist/assets/{dnd-BU-7caEQ.js → dnd-DDJsx0NB.js} +1 -1
  58. package/dist/assets/{empty-Bz6RdLl6.js → empty-C7oiOVn1.js} +1 -1
  59. package/dist/assets/{empty-zLrsqSwy.js → empty-DzaiFamT.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-Cxq76LDO.js → emptyVideoElement-Dc3Z5fQ2.js} +1 -1
  61. package/dist/assets/epic-txtfG7Wc.js +2 -0
  62. package/dist/assets/getLocaleForTenant-DOneLAv7.js +1 -0
  63. package/dist/assets/{index-3OE7eXoF.js → index-1UV4MMXg.js} +1 -1
  64. package/dist/assets/{index-44V9br91.js → index-B4Setfuo.js} +1 -1
  65. package/dist/assets/{index-hKAQTJHr.js → index-B7hYa0nv.js} +1 -1
  66. package/dist/assets/{index-C2zxt7CG.js → index-BGRPzhmG.js} +1 -1
  67. package/dist/assets/{index-BCP41PwF.js → index-BJKl78Nr.js} +13161 -13358
  68. package/dist/assets/{index-C90tJyPI.js → index-CYC7JL6T.js} +1 -1
  69. package/dist/assets/{index-BdURJOvl.js → index-K_-AH8Oz.js} +2 -2
  70. package/dist/assets/{index-CeyemrXI.js → index-Lvqs6gyM.js} +1 -1
  71. package/dist/assets/{lexical-eKqIIoQI.js → lexical-Cgnkx0ca.js} +1 -1
  72. package/dist/assets/{liveblocks-BiGkkGoP.js → liveblocks-BqBYCpDO.js} +1 -1
  73. package/dist/assets/{lottie-CCiYx5dW.js → lottie-C0ZKrLeQ.js} +1 -1
  74. package/dist/assets/{mui-CdvNR06J.js → mui-BOya5KC5.js} +1 -1
  75. package/dist/assets/{pathToGoBack-DzYXGaMH.js → pathToGoBack-ChXz-wsR.js} +1 -1
  76. package/dist/assets/{pdf-05F57jtv.js → pdf-B1xdy5_9.js} +3 -3
  77. package/dist/assets/{pdf-lib-CUEF9aFq.js → pdf-lib-p4rDaah8.js} +1 -1
  78. package/dist/assets/{plaid-CsGNESZa.js → plaid-CbVh_Xmg.js} +1 -1
  79. package/dist/assets/{pusher-C7xS39FJ.js → pusher-DmGzlgPh.js} +1 -1
  80. package/dist/assets/{react-hPevf4CC.js → react-B6e4iCGm.js} +1 -1
  81. package/dist/assets/{react-CltIT5UZ.js → react-C4tdQB-d.js} +1 -1
  82. package/dist/assets/{react-Ce6YQI4l.js → react-CCV4IaFY.js} +1 -1
  83. package/dist/assets/{react-i6kyX3or.js → react-CWHwcQ3R.js} +1 -1
  84. package/dist/assets/{react-D3qjGIuX.js → react-CaSq6h7K.js} +1 -1
  85. package/dist/assets/{react-BcY5rxQv.js → react-Cc3_o3W5.js} +1 -1
  86. package/dist/assets/{recharts-D0oa1BQl.js → recharts-BFPpJ278.js} +1 -1
  87. package/dist/assets/{routePaths-jIme_4o7.js → routePaths-UaNYOkz2.js} +1 -1
  88. package/dist/assets/{sentry-DQGl2YSn.js → sentry-CDxqFZbe.js} +1 -1
  89. package/dist/assets/{url-DRf0E0e8.js → url-BQNxUbT3.js} +1 -1
  90. package/dist/assets/{url-DJZEEGtj.js → url-CuFpLP5d.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Duk5q7Ch.js → useAiCfoDashboardSuggestedQuestionsChips-R--C8uA4.js} +1 -1
  92. package/dist/assets/useAskAiCfoHostNavButtonProps-CMXbmaYh.js +1 -0
  93. package/dist/assets/{useDeviceId-Dsh8klAH.js → useDeviceId-RFazXO8K.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-Du_koxHd.js → useInitialThreadRequest-B-46KSo3.js} +1 -1
  95. package/dist/assets/{utils-BCjesvPZ.js → utils-BMmLL9nY.js} +1 -1
  96. package/dist/assets/withTransactionSidePanel-ByoBtmM4.js +21 -0
  97. package/dist/assets/{zeni-epic-state-YenBAkdY.js → zeni-epic-state-CRBir-xp.js} +6 -6
  98. package/dist/index.html +1 -1
  99. package/package.json +6 -11
  100. package/dist/assets/AddressRoutes-BB0ro6wv.js +0 -1
  101. package/dist/assets/BillPayApprovalRoutes-DbZZgApj.js +0 -1
  102. package/dist/assets/ChargeCardRoutes-DSSh6FmN.js +0 -71
  103. package/dist/assets/ConnectionAuthScreen-CUXkV4cL.js +0 -11
  104. package/dist/assets/CustomerOnboardingAuthScreen-DxioIAXi.js +0 -1
  105. package/dist/assets/CustomerOnboardingRoutes-CJBZR08A.js +0 -23
  106. package/dist/assets/DrawerScreen-DHM1klM-.js +0 -1
  107. package/dist/assets/EntityDetailRoutes-CETjyGK7.js +0 -1
  108. package/dist/assets/ExpenseAutomationRoutes-BMCXnpCB.js +0 -25
  109. package/dist/assets/HubSpotOAuthCallbackScreen-CNkM-iq3.js +0 -1
  110. package/dist/assets/MagicLinkSignInScreen-CQoHv1Ew.js +0 -12
  111. package/dist/assets/NotFoundScreen-C0-Skng9.js +0 -1
  112. package/dist/assets/NotificationRoutes-D9fJ9SYM.js +0 -1
  113. package/dist/assets/OAuthConsentScreen-C9NM67kC.js +0 -1
  114. package/dist/assets/PandLWithForecastRoutes-DTh6WUET.js +0 -1
  115. package/dist/assets/PerformanceRoutes-BRNqvpgs.js +0 -1
  116. package/dist/assets/ReferralListScreen-DGyOm6sF.js +0 -5
  117. package/dist/assets/ReimbursementApprovalRoutes-CCftKChl.js +0 -1
  118. package/dist/assets/RewardsRoutes-COd7r8nd.js +0 -1
  119. package/dist/assets/ScreenRoutes-nOndy_UK.js +0 -2
  120. package/dist/assets/SignInScreen-BfWJdDbb.js +0 -1
  121. package/dist/assets/SignOutScreen-DqrJH-ux.js +0 -9
  122. package/dist/assets/TaskRoutes-CBdj5pZX.js +0 -9
  123. package/dist/assets/TreasuryRoutes-opcOBJb-.js +0 -37
  124. package/dist/assets/WiseConfirmationScreen-C3f57wCu.js +0 -12
  125. package/dist/assets/ZeniAccountStatementScreen-CgW4jBMr.js +0 -9
  126. package/dist/assets/epic-knsZntkZ.js +0 -2
  127. package/dist/assets/getLocaleForTenant-DwUbw-k6.js +0 -1
  128. package/dist/assets/useAskAiCfoHostNavButtonProps-CVdued0l.js +0 -1
  129. package/dist/assets/withTransactionSidePanel-DYnpLjtY.js +0 -21
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-BiGkkGoP.js";import{i as S,n as x,h as C,g as y,u as ee,s as ae,j as E,N as te,o as ne,p}from"./core-DYij5xsh.js";import{JG as k,JH as v,JI as T,zG as D,zs as G,JJ as z,JK as oe,JL as se,zw as ie,eX as $,zD as le,zA as de}from"./zeni-epic-state-YenBAkdY.js";import{k as g,o as d,m as re,d as j,i as J,E as ce,p as me,q as pe,r as H,n as ue,c as he,s as xe,v as ge,h as be,w as fe,B as we,x as Se,M as ye,S as ke,X as ve,y as je,C as $e}from"./index-BCP41PwF.js";import{n as m}from"./mui-CdvNR06J.js";import b from"./NotFoundScreen-C0-Skng9.js";import{a as I}from"./sentry-DQGl2YSn.js";import"./recharts-D0oa1BQl.js";import"./analytics-DyffXLrl.js";import"./plaid-CsGNESZa.js";import"./dnd-BU-7caEQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CCiYx5dW.js";import"./lexical-eKqIIoQI.js";import"./pdf-05F57jtv.js";import"./utils-BCjesvPZ.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]="504cabe5-8a87-4e2b-8b5d-d88b917ba85d",e._sentryDebugIdIdentifier="sentry-dbid-504cabe5-8a87-4e2b-8b5d-d88b917ba85d")}catch{}})();const Ie=m.div`
1
+ import{j as a}from"./liveblocks-BqBYCpDO.js";import{i as S,n as x,h as C,g as y,u as ee,s as ae,j as E,N as te,o as ne,p}from"./core-r5mQR9TZ.js";import{JD as k,JE as v,JF as T,zD as D,zp as G,JG as z,JH as oe,JI as se,zt as ie,eW as $,zA as le,zx as de}from"./zeni-epic-state-CRBir-xp.js";import{J as g,o as d,j as re,d as j,i as J,m as ce,p as me,n as pe,r as M,S as ue,c as he,s as xe,v as ge,h as fe,w as we,B as be,x as Se,R as ye,A as ke,C as ve,F as je,G as $e}from"./index-BJKl78Nr.js";import{n as m}from"./mui-BOya5KC5.js";import f from"./NotFoundScreen-D9VlElva.js";import{a as I}from"./sentry-CDxqFZbe.js";import"./recharts-BFPpJ278.js";import"./analytics-kuRARP-L.js";import"./plaid-CbVh_Xmg.js";import"./dnd-DDJsx0NB.js";import"./stripe-DMRn4zHo.js";import"./lottie-C0ZKrLeQ.js";import"./lexical-Cgnkx0ca.js";import"./pdf-B1xdy5_9.js";import"./utils-BMmLL9nY.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]="85e595ad-16aa-40d2-a9cc-2e95d7dcec3d",e._sentryDebugIdIdentifier="sentry-dbid-85e595ad-16aa-40d2-a9cc-2e95d7dcec3d")}catch{}})();const Ie=m.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -7,7 +7,7 @@ import{j as a}from"./liveblocks-BiGkkGoP.js";import{i as S,n as x,h as C,g as y,
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
9
  box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=x(function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(D(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(re);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(b,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const De=m.div`
10
+ `,Ce=x(function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(D(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(re);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const De=m.div`
11
11
  display: flex;
12
12
  height: 100vh;
13
13
  width: 100%;
@@ -16,7 +16,7 @@ import{j as a}from"./liveblocks-BiGkkGoP.js";import{i as S,n as x,h as C,g as y,
16
16
  align-items: center;
17
17
  background-color: ${e=>e.theme.colors.grey4};
18
18
  box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,ze=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:z(e),googleAPIKey:J.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Ae();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function Be({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(De,{windowSize:o,children:a.jsx(ze,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:J.googleMapsAPIKey})})})}const Ae=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Pe=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`
19
+ `,ze=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:z(e),googleAPIKey:J.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Be();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function Ae({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(De,{windowSize:o,children:a.jsx(ze,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:J.googleMapsAPIKey})})})}const Be=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Pe=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%;
@@ -25,7 +25,7 @@ import{j as a}from"./liveblocks-BiGkkGoP.js";import{i as S,n as x,h as C,g as y,
25
25
  align-items: center;
26
26
  background-color: ${e=>e.theme.colors.grey4};
27
27
  box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Ne=x(function(e){const t=k(e),n=v(e),o=z(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:r}=i;e(T({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),r=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(pe);function Ee(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(b,{}):a.jsx(a.Fragment,{children:a.jsx(Le,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
28
+ `,Ne=x(function(e){const t=k(e),n=v(e),o=z(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:r}=i;e(T({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(),t=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Le,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
29
  display: flex;
30
30
  height: 100%;
31
31
  width: 100%;
@@ -34,7 +34,7 @@ import{j as a}from"./liveblocks-BiGkkGoP.js";import{i as S,n as x,h as C,g as y,
34
34
  align-items: center;
35
35
  background-color: ${e=>e.theme.colors.grey4};
36
36
  box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Te=x(function(e){const t=k(e),n=v(e),o=z(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:r}=i;e(se({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),r=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(xe);function Ge(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(b,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Je={containerWidth:new je(100,58)},He=m(ke)`
37
+ `,Te=x(function(e){const t=k(e),n=v(e),o=z(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(i,"international",s,l,t.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}})}}})(xe);function Ge(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Je={containerWidth:new je(100,58)},Me=m(ke)`
38
38
  width: ${d.sp4};
39
39
  height: ${d.sp4};
40
40
  margin-bottom: ${d.sp3};
@@ -43,14 +43,14 @@ import{j as a}from"./liveblocks-BiGkkGoP.js";import{i as S,n as x,h as C,g as y,
43
43
  cursor: pointer;
44
44
  position: absolute;
45
45
  color: ${e=>e.theme.colors.brandColorJade};
46
- `,Ke=m.div`
46
+ `,He=m.div`
47
47
  display: flex;
48
48
  height: 100vh;
49
49
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
50
  width: 100vw;
51
51
  overflow-y: scroll;
52
52
  background-color: ${e=>e.theme.colors.grey4};
53
- `,Me=m.div`
53
+ `,Ve=m.div`
54
54
  display: flex;
55
55
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
56
  flex-direction: column;
@@ -58,7 +58,7 @@ import{j as a}from"./liveblocks-BiGkkGoP.js";import{i as S,n as x,h as C,g as y,
58
58
  ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
59
  box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
60
60
  padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
61
- `,Ve=m.div`
61
+ `,We=m.div`
62
62
  display: flex;
63
63
  flex-direction: column;
64
64
  align-items: center;
@@ -69,4 +69,4 @@ import{j as a}from"./liveblocks-BiGkkGoP.js";import{i as S,n as x,h as C,g as y,
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=x(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),r=i.get("token"),K=n.pathname.includes("address"),f=g(),M=ge(),B=be(),w=fe(),V=()=>{M.toggle()},_=E(u=>k(u)),W=E(u=>v(u)),{authParams:U,fetchState:c,billAttachment:O,billFetchState:A,companyName:X,currencySymbol:q,amount:Q}=_,{tenantId:P,userId:L,sessionId:N}=U,{fetchState:R,internationalBankAccountCreateStatus:Y}=W;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&s!=null&&o!=null&&r!=null&&t(le(s,o,r))},[w,c,s,o,r,t]),I.useEffect(()=>{w&&c==="Completed"&&($(L,N,P),l!=null&&t(de(l)))},[c,w,L,N,P,l,t]),c==="Error"?a.jsx(b,{}):R==="Completed"||Y.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${B.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&A==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",X,l??"",We(n.pathname),q,Q))(u)}),a.jsxs(Ke,{windowSize:f,children:[f!=="small"?a.jsx(He,{onClick:V}):null,a.jsx(Ve,{windowSize:f,isAddressPage:K,children:A==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(_e,{file:O,type:"bill"})}),a.jsx(Me,{windowSize:f,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Ue(){return a.jsx($e,{})}function ra(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Ue,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Be,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ge,{})})}),a.jsx(p,{path:"*",element:a.jsx(b,{})})]})}export{ra as default};
72
+ `,_e=x(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),r=i.get("token"),H=n.pathname.includes("address"),w=g(),V=ge(),A=fe(),b=we(),W=()=>{V.toggle()},_=E(u=>k(u)),K=E(u=>v(u)),{authParams:U,fetchState:c,billAttachment:q,billFetchState:B,companyName:O,currencySymbol:Q,amount:R}=_,{tenantId:P,userId:L,sessionId:N}=U,{fetchState:X,internationalBankAccountCreateStatus:Y}=K;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&r!=null&&t(le(s,o,r))},[b,c,s,o,r,t]),I.useEffect(()=>{b&&c==="Completed"&&($(L,N,P),l!=null&&t(de(l)))},[c,b,L,N,P,l,t]),c==="Error"?a.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&B==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",O,l??"",Ke(n.pathname),Q,R))(u)}),a.jsxs(He,{windowSize:w,children:[w!=="small"?a.jsx(Me,{onClick:W}):null,a.jsx(We,{windowSize:w,isAddressPage:H,children:B==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(_e,{file:q,type:"bill"})}),a.jsx(Ve,{windowSize:w,children:e})]})]})}const Ke=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Ue(){return a.jsx($e,{})}function ra(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Ue,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ge,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{ra as default};
@@ -0,0 +1,12 @@
1
+ import{j as u}from"./liveblocks-BqBYCpDO.js";import{a as g}from"./sentry-CDxqFZbe.js";import{u as U,g as _,h as w,s as J,j as l,N as T}from"./core-r5mQR9TZ.js";import{z as r,h as P,D as A,e as M,d as V,f as N,Z as R,R as W,g as Z}from"./index-BJKl78Nr.js";import{eP as $,Jo as q,Jy as B,Jp as G,eW as H,fn as K,Ju as Q,fL as X,cT as Y,Jz as ee,JA as te}from"./zeni-epic-state-CRBir-xp.js";import{n as ne}from"./mui-BOya5KC5.js";import{u as se}from"./useDeviceId-RFazXO8K.js";import{f as ae}from"./analyticsHelper-DojlKZDc.js";import{t as ie}from"./getLocaleForTenant-DOneLAv7.js";import"./recharts-BFPpJ278.js";import"./analytics-kuRARP-L.js";import"./plaid-CbVh_Xmg.js";import"./dnd-DDJsx0NB.js";import"./stripe-DMRn4zHo.js";import"./lottie-C0ZKrLeQ.js";import"./lexical-Cgnkx0ca.js";import"./pdf-B1xdy5_9.js";import"./utils-BMmLL9nY.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]="c348860b-f974-4e13-8207-0bc1974ad277",t._sentryDebugIdIdentifier="sentry-dbid-c348860b-f974-4e13-8207-0bc1974ad277")}catch{}})();const z=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function ze(){const t=U(),a=_(),m=w(),[y]=J(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:D,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),k=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=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&z(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&k!=="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(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),X().then(()=>{const e=Z();e!=null&&M(e)}),setTimeout(()=>{V.trackLogin(N.Event.loginSuccess,"email",Y(o.productSettings))},2e3))},[h,S,k,s,o,b,v,a.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),F=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=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(R,{phoneNumber:D,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});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(!z(n,p)||f==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(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ z-index: 9999;
11
+ background-color: ${t=>t.theme.colors.background};
12
+ `;export{ze as default};
@@ -1 +1 @@
1
- import{j as U}from"./liveblocks-BiGkkGoP.js";import{a as c}from"./sentry-DQGl2YSn.js";import{u as pe,j as s,i as Qe,g as We,h as qe,l as M}from"./core-DYij5xsh.js";import{eQ as he,f0 as Ke,f1 as Se,eU as Xe,bn as ea,eP as aa,f2 as ta,f3 as na,f5 as sa,f8 as oa,fh as ia,f9 as g,fb as ra,fc as ue,ff as da,fd as la,fe as ca,fg as ua,cJ as fa,fj as ma,cO as ba,bt as pa,eT as ha,fo as Sa,fp as ga,fn as Ea}from"./zeni-epic-state-YenBAkdY.js";import{a7 as ka,a8 as Ca,v as ya,n as Ia,z as k,w as Ta,u as wa,c as r,a9 as Aa,aa as _a,A as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ga,ae as fe,af as me,L as Pa,ag as Ma,ah as be,d as R,$ as Ra,r as A,ai as N,aj as Na}from"./index-BCP41PwF.js";import{D as Ua}from"./mui-CdvNR06J.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]="eeaefe33-1ddd-4bfa-8388-4cf9001ce0de",f._sentryDebugIdIdentifier="sentry-dbid-eeaefe33-1ddd-4bfa-8388-4cf9001ce0de")}catch{}})();const Va=ka(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Qe(),a=We(),C=ya(),o=qe(),V=Xe(),m=pe(),{useFeatureGate:i}=Ia(),O=k.getSignedInUser(),_=ea(O),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,j=s(e=>aa(e)),x=j.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[F,L]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),Ce=Aa(n,ke,H),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),Z=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:J}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Q}=i(r.isExpenseAutomationEnabledV2),W=Q||J&&_,{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=_||!_&&$e,Ge=n.company!=null&&ia(n.company),w=ve&&Ge,Pe=s(e=>g(e).totalUnreadCount),Me=s(e=>g(e).reducedFetchCountState),q=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ue={fetchStatus:Me,count:Pe},ne=t!=null?k.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),W===!1&&S.push("expense_automation_card");const Ve=Fa(),oe=s(e=>la(e,S,h,Q,J,w).fetchState),ie=s(e=>ca(e).fetchState),Oe=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",je=c.useMemo(()=>ua(n.userRole),[n.userRole]),xe=fa(je),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&Z.fetchState==="Completed"&&ma(Z.notificationSettings,h.userEmail,H,n),re=Da(),Ye=re&&va(a),de=ba(Ve?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[He,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const Ze=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Je=Ba(Ze);return U.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:U.jsx(Ga,{signedInUser:O,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Oe,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:xe,isZeniAccountEnabled:Y,isChargeCardEnabled:Ce,isTreasuryEnabled:w,treasuryYieldPercentage:Je,isTreasuryPopupVisible:He,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:W&&pa(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=q===0&&K>0?"notifications/comments":"notifications/tasks";me(a)&&(e=q===0&&K>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(R.trackAICFOChatScreenStateChanged("viewed","left_menu",x??null,null),!ge)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=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const p=E[n.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Na(e.type);be(e.type)?(x!=null&&m(Ea()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${P}`,{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=>{Ee(Pa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ma(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:j,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Ha=f=>{const d=pe(),t=s(C=>he(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ca(o)&&Ke(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Va,{...f,...a})};export{Ha as M};
1
+ import{j as U}from"./liveblocks-BqBYCpDO.js";import{a as c}from"./sentry-CDxqFZbe.js";import{u as pe,j as s,i as We,g as qe,h as Ke,l as M}from"./core-r5mQR9TZ.js";import{eP as he,e$ as Qe,f0 as Se,eT as Xe,bn as ea,eO as aa,f1 as ta,f2 as na,f4 as sa,f7 as oa,fg as ia,f8 as g,fa as ra,fb as ue,fe as da,fc as la,fd as ca,ff as ua,cJ as fa,fi as ma,cO as ba,bt as pa,eS as ha,fn as Sa,fo as ga,fm as Ea}from"./zeni-epic-state-CRBir-xp.js";import{a7 as ka,a8 as Ca,v as ya,S as Ia,z as k,w as Ta,u as wa,c as r,a9 as Aa,aa as _a,k as Fa,a as Da,ab as va,a3 as $a,ac as Ba,ad as Ga,ae as fe,af as me,L as Pa,ag as Ma,ah as be,d as R,$ as Ra,r as A,ai as N,aj as Na}from"./index-BJKl78Nr.js";import{D as Ua}from"./mui-BOya5KC5.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]="7e5d0c70-2883-4db2-80c9-05db3450d897",f._sentryDebugIdIdentifier="sentry-dbid-7e5d0c70-2883-4db2-80c9-05db3450d897")}catch{}})();const Va=ka(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=We(),a=qe(),C=ya(),o=Ke(),V=Xe(),m=pe(),{useFeatureGate:i}=Ia(),O=k.getSignedInUser(),_=ea(O),n=s(e=>he(e)),ge=n.masterTOSInfo?.isMasterTOSAccepted??!1,x=s(e=>aa(e)),j=x.uiState.currentChatSessionId,y=Ta(),{setLoading:Ee}=wa(),[F,L]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),Ce=Aa(n,ke,H),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),Z=s(e=>ta(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>na(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(sa(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),Ie=s(e=>$.fetchState==="Completed"?oa(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:J}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabledV2),q=W||J&&_,{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:ve}=i(r.isTreasuryEnabled),{isFeatureEnabled:$e}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=_||!_&&$e,Ge=n.company!=null&&ia(n.company),w=ve&&Ge,Pe=s(e=>g(e).totalUnreadCount),Me=s(e=>g(e).reducedFetchCountState),K=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),Q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Re=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ne}=_a();c.useEffect(()=>{const e=setTimeout(()=>Ne?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Re.fetchState==="Not-Started"&&V.tenantId!=null&&m(ra("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ue={fetchStatus:Me,count:Pe},ne=t!=null?k.getSignedInUserTenant(t):null,se=s(e=>ne?.tenantId!=null?da(e,ne.tenantId):void 0),S=[];Te===!1&&S.push("accounts_payable_aging"),we===!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=Fa(),oe=s(e=>la(e,S,h,W,J,w).fetchState),ie=s(e=>ca(e).fetchState),Oe=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",xe=c.useMemo(()=>ua(n.userRole),[n.userRole]),je=fa(xe),Le=n?.rewardsLastViewedTime==null,ze=h?.userEmail!=null&&Z.fetchState==="Completed"&&ma(Z.notificationSettings,h.userEmail,H,n),re=Da(),Ye=re&&va(a),de=ba(Ve?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(t??"")&&le===!1&&$a(a.pathname)!=="treasury",[w,de,le,a.pathname,t]),[He,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const Ze=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Je=Ba(Ze);return U.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:U.jsx(Ga,{signedInUser:O,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?Ie:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Oe,isSettings:me(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:je,isZeniAccountEnabled:Y,isChargeCardEnabled:Ce,isTreasuryEnabled:w,treasuryYieldPercentage:Je,isTreasuryPopupVisible:He,isNotificationsTabVisible:ze,notificationCountDetails:Ue,isExpenseAutomationEnabledForUser:q&&pa(n.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=K===0&&Q>0?"notifications/comments":"notifications/tasks";me(a)&&(e=K===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(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!ge)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=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&R.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const p=E[n.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Na(e.type);be(e.type)?(j!=null&&m(Ea()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${P}`,{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=>{Ee(Pa.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ma(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(Sa(e.tenantId)),m(ga(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ye,aiCfoView:x,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ha({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),Ha=f=>{const d=pe(),t=s(C=>he(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ca(o)&&Qe(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Va,{...f,...a})};export{Ha as M};
@@ -0,0 +1 @@
1
+ import{j as r}from"./liveblocks-BqBYCpDO.js";import{h as n,n as e}from"./core-r5mQR9TZ.js";import{X as i}from"./index-BJKl78Nr.js";import"./mui-BOya5KC5.js";import"./sentry-CDxqFZbe.js";import"./zeni-epic-state-CRBir-xp.js";import"./recharts-BFPpJ278.js";import"./analytics-kuRARP-L.js";import"./plaid-CbVh_Xmg.js";import"./dnd-DDJsx0NB.js";import"./stripe-DMRn4zHo.js";import"./lottie-C0ZKrLeQ.js";import"./lexical-Cgnkx0ca.js";import"./pdf-B1xdy5_9.js";import"./utils-BMmLL9nY.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]="d2880e61-6042-4034-8b74-bf61aa1c7379",o._sentryDebugIdIdentifier="sentry-dbid-d2880e61-6042-4034-8b74-bf61aa1c7379")}catch{}})();const a=e(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
@@ -0,0 +1 @@
1
+ import{l as ct,a as dt,m as mt,j as E}from"./liveblocks-BqBYCpDO.js";import lt from"./NotFoundScreen-D9VlElva.js";import{a as k}from"./sentry-CDxqFZbe.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as K}from"./core-r5mQR9TZ.js";import{cr as St,f1 as H,eP as J,ff as bt,f8 as b,PU as Q,fb as m,f0 as y,r1 as M,wo as It,PV as Ct,e$ as Tt,fi as yt,r6 as _t,PW as $,bq as F,gT as x,ra as O,PX as At,cC as Et,cw as Nt}from"./zeni-epic-state-CRBir-xp.js";import{W as wt,z as Bt,S as xt,c as Pt,_ as Rt,cz as Ut,r as N,a7 as Dt,cA as vt,a8 as Gt,p as $t}from"./index-BJKl78Nr.js";import"./mui-BOya5KC5.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-CMXbmaYh.js";import"./recharts-BFPpJ278.js";import"./analytics-kuRARP-L.js";import"./plaid-CbVh_Xmg.js";import"./dnd-DDJsx0NB.js";import"./stripe-DMRn4zHo.js";import"./lottie-C0ZKrLeQ.js";import"./lexical-Cgnkx0ca.js";import"./pdf-B1xdy5_9.js";import"./utils-BMmLL9nY.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]="bd785bdb-9381-4b46-839b-5ff4a61cddc0",t._sentryDebugIdIdentifier="sentry-dbid-bd785bdb-9381-4b46-839b-5ff4a61cddc0")}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=H(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=J(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:w,fetchMoreCommentsNotifications:P}=l;return{onNotificationClick:(a,o,d,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"}})}d==="unread"&&t(O("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,d)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){d==="unread"&&(w(a),t($([a],F())));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(m(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const d=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(d,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const d=[];o==="all"?d.push("read","unread"):o!=="mentions"&&d.push(o),t(M("task_manager","dashboard",d))}else P?.()},onUpdateNotificationStatus:(a,o,d,c)=>{a==="tasks"?t(O("task_manager",d,c)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{d==="read"&&(w(r),t($([r],F())))})).then(()=>{t(m({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(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,w).then(()=>{t($(s,F())),t(m({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(m({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=wt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[w,P]=k.useState(!1),a=S(e=>H(e)),o=S(e=>J(e)),{useFeatureGate:d}=xt(),{isFeatureEnabled:c}=d(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const Y=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),R=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=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=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:W,isLoading:z,fetchMore:L,isFetchingMore:q,hasFetchedAll:X}=dt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Q(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(m({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(m({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 v=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{v&&U!=="In-Progress"?s(m({fetchState:"In-Progress",error:void 0},"comments")):v||U!=="In-Progress"||s(m({fetchState:"Completed",error:void 0},"comments"))},[v,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&w===!1&&(P(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&z===!1&&B!=null&&W!=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 G=W.find(rt=>rt.id===f.threadId);return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(q||X===!0||L==null||L(),null)}).filter(f=>f!=null);s(m({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,q,C,X,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];R==="all"?A.push("read","unread"):R!=="mentions"&&A.push(R),s(M("task_manager",T,A,!0))}}}},nt=mt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,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(K,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(K,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
@@ -0,0 +1 @@
1
+ import{j as f}from"./liveblocks-BqBYCpDO.js";import{a as r}from"./sentry-CDxqFZbe.js";import{u as T,g as A,j as o,N as J}from"./core-r5mQR9TZ.js";import{JN as j,eP as C,f7 as R,JO as x,JP as z,JQ as D,JR as M,mW as N,IJ as L}from"./zeni-epic-state-CRBir-xp.js";import{z as h,K as I}from"./index-BJKl78Nr.js";import"./mui-BOya5KC5.js";import"./recharts-BFPpJ278.js";import"./analytics-kuRARP-L.js";import"./plaid-CbVh_Xmg.js";import"./dnd-DDJsx0NB.js";import"./stripe-DMRn4zHo.js";import"./lottie-C0ZKrLeQ.js";import"./lexical-Cgnkx0ca.js";import"./pdf-B1xdy5_9.js";import"./utils-BMmLL9nY.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="7ce85421-c0f9-4b5a-bab3-a9375237c89e",n._sentryDebugIdIdentifier="sentry-dbid-7ce85421-c0f9-4b5a-bab3-a9375237c89e")}catch{}})();function ee(){const n=T(),a=A(),{params:t,error:i}=r.useMemo(()=>j(a.search),[a.search]),w=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),m=o(e=>C(e)),l=o(e=>R(e)),c=o(e=>e.tenantState.fetchState),b=o(x),y=o(z),d=o(D),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(M())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&s!=null&&!g.current&&(c!=="Not-Started"&&c!=="Error"||(g.current=!0,n(N(s.userId,s.zeniSessionId??void 0))))},[p,s,c,n]),r.useEffect(()=>{d!=null&&d!==""&&(window.location.href=d)},[d]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(P=>P.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),u=v??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:c!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??y,isApproving:b==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(L(s.userId,s.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.")}}}):f.jsx(J,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -0,0 +1 @@
1
+ import{j as n}from"./liveblocks-BqBYCpDO.js";import{h as V,u as z,g as Z,i as H,j as d,n as J,o as Q,p as I}from"./core-r5mQR9TZ.js";import{eP as U,qR as R,qp as X,Kj as v,qk as S,bt as ee,bn as ae,bT as te,ql as se,Kk as oe,K5 as C,dE as re,ul as ne,Kl as ie,uI as ce,e_ as le,eY as de}from"./zeni-epic-state-CRBir-xp.js";import{z as me,W as fe,_ as pe,k as ue,S as q,c as M,x as he,d as w,ao as ge,r as Fe}from"./index-BJKl78Nr.js";import"./mui-BOya5KC5.js";import be from"./NotFoundScreen-D9VlElva.js";import{F as Ie}from"./FeaturePreviewScreen-B3xiV9TQ.js";import{a as g}from"./sentry-CDxqFZbe.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CMXbmaYh.js";import{u as Se}from"./useInitialThreadRequest-B-46KSo3.js";import{t as Te}from"./routePaths-UaNYOkz2.js";import{M as ye}from"./MobileAppDrawer-BUMTEMjO.js";import"./recharts-BFPpJ278.js";import"./analytics-kuRARP-L.js";import"./plaid-CbVh_Xmg.js";import"./dnd-DDJsx0NB.js";import"./stripe-DMRn4zHo.js";import"./lottie-C0ZKrLeQ.js";import"./lexical-Cgnkx0ca.js";import"./pdf-B1xdy5_9.js";import"./utils-BMmLL9nY.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]="78bdb393-fb5a-40de-a533-5915158446e9",s._sentryDebugIdIdentifier="sentry-dbid-78bdb393-fb5a-40de-a533-5915158446e9")}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=J(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(v(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 O(){const s=V(),e=z(),a=Z(),{forecastId:o,tenantEmailDomain:r}=H(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>U(t)),$=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>R(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),x=d(t=>t.reportUIOptionsState.selectedForecast),A=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:B}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex(b=>b.id===L):P!=null?f.forecasts.findIndex(b=>b.id===P):f.forecasts.length>0?0:-1)(c,o,x?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(e(v(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&&!A(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,R,S,F]);const D=ue(),N=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:W}=q(),{isFeatureEnabled:j}=W(M.isReportsCommentingEnabled),Y=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[G,K]=g.useState(!1),E=t=>{K(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:E}),n.jsx(ke,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:A,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:N,isAiCfoAccessEnabled:_,onAskAiCfoClick:B,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{E(!0)}})]})}function Ke(){const s=d(i=>U(i)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ke as PandLWithForecastRoutes,Ke as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-BiGkkGoP.js";import{Kh as te,eQ as q,jH as _,e$ as Q,eZ as ne,HJ as X,JX as oe,tu as Ee,Ki as N,ti as ke,tD as Ie,tx as ie,tm as re,tB as Pe,ty as je,Kj as le,va as Te,Kk as Le,fC as ve,Kl as K,tr as de,tp as ce,tG as Fe,c2 as Ae}from"./zeni-epic-state-YenBAkdY.js";import{k as pe,n as Y,c as E,z,a9 as ue,F as me,ak as ge,al as Re,y as he,o as R,U as fe,D as Ce,am as Oe,W as Ve,Z as Ue,x as Be,d as be,f as Ze,r as $e,an as Ke,A as Ge}from"./index-BCP41PwF.js";import{D as ye,n as W,S as Se}from"./mui-CdvNR06J.js";import ae from"./NotFoundScreen-C0-Skng9.js";import{a as r}from"./sentry-DQGl2YSn.js";import{u as ee,i as He,j as m,h as _e,g as ze,n as We,o as se,p as $}from"./core-DYij5xsh.js";import{u as Je}from"./useAskAiCfoHostNavButtonProps-CVdued0l.js";import{M as Me}from"./MobileAppDrawer-Biso_61t.js";import"./recharts-D0oa1BQl.js";import"./analytics-DyffXLrl.js";import"./plaid-CsGNESZa.js";import"./dnd-BU-7caEQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CCiYx5dW.js";import"./lexical-eKqIIoQI.js";import"./pdf-05F57jtv.js";import"./utils-BCjesvPZ.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]="0afd7c6e-d62d-412c-96e8-86ccb0266d6e",a._sentryDebugIdIdentifier="sentry-dbid-0afd7c6e-d62d-412c-96e8-86ccb0266d6e")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,S]=r.useState(!1),{userId:w}=He(),d=m(e=>te(e)),u=m(e=>q(e)),D=m(e=>_(e)),{useFeatureGate:f}=Y(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Q(k,u),L=ne(u),v=X(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?S(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,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:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return r.useEffect(()=>{x===!1&&w!=null&&p(Ee(w))},[x,w]),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(we,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Qe=W(Se)`
1
+ import{j as s}from"./liveblocks-BqBYCpDO.js";import{Ke as te,eP as Q,jG as H,e_ as Y,eY as ne,HG as q,JU as oe,tr as Ee,Kf as N,tf as ke,tA as Ie,tu as ie,tj as re,ty as Pe,tv as je,Kg as le,v7 as Te,Kh as ve,fB as Le,Ki as K,to as de,tm as ce,tD as Fe,c2 as Ae}from"./zeni-epic-state-CRBir-xp.js";import{J as pe,S as X,c as E,z,a9 as ue,I as me,ak as ge,al as Re,F as he,o as R,V as fe,D as Ce,am as Oe,W as Ve,_ as Ue,x as Be,d as be,f as Ze,r as $e,an as Ke,k as _e}from"./index-BJKl78Nr.js";import{D as ye,n as W,S as Se}from"./mui-BOya5KC5.js";import ae from"./NotFoundScreen-D9VlElva.js";import{a as r}from"./sentry-CDxqFZbe.js";import{u as ee,i as Ge,j as m,h as He,g as ze,n as We,o as se,p as $}from"./core-r5mQR9TZ.js";import{u as Je}from"./useAskAiCfoHostNavButtonProps-CMXbmaYh.js";import{M as Me}from"./MobileAppDrawer-BUMTEMjO.js";import"./recharts-BFPpJ278.js";import"./analytics-kuRARP-L.js";import"./plaid-CbVh_Xmg.js";import"./dnd-DDJsx0NB.js";import"./stripe-DMRn4zHo.js";import"./lottie-C0ZKrLeQ.js";import"./lexical-Cgnkx0ca.js";import"./pdf-B1xdy5_9.js";import"./utils-BMmLL9nY.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]="767a2685-0de4-40a7-8c53-3dbdc43369d6",a._sentryDebugIdIdentifier="sentry-dbid-767a2685-0de4-40a7-8c53-3dbdc43369d6")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,S]=r.useState(!1),{userId:w}=Ge(),d=m(e=>te(e)),u=m(e=>Q(e)),D=m(e=>H(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Y(k,u),v=ne(u),L=q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?S(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,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(L))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return r.useEffect(()=>{x===!1&&w!=null&&p(Ee(w))},[x,w]),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(Ye,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Ye=W(Se)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -15,8 +15,8 @@ import{j as s}from"./liveblocks-BiGkkGoP.js";import{Kh as te,eQ as q,jH as _,e$
15
15
  margin-bottom: 30px;
16
16
  margin-top: ${R.sp4};
17
17
  white-space: pre-line;
18
- `,Xe={overlayWidth:new he(100,100,48)},H=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,S]=r.useState(!1),w=m(i=>te(i)),d=m(i=>q(i)),u=m(i=>_(i)),{useFeatureGate:D}=Y(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Q(f,d),P=ne(d),L=X(d),v=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?S(!0):x()},F={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[w.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Xe.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(we,{children:H.discardTitle}),descriptionComponent:s.jsx(De,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(Se)`
18
+ `,qe={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,S]=r.useState(!1),w=m(i=>te(i)),d=m(i=>Q(i)),u=m(i=>H(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Y(f,d),P=ne(d),v=q(d),L=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(z.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?S(!0):x()},F={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:L===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[w.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:qe.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(we,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(Se)`
19
19
  display: flex;
20
20
  min-height: 100%;
21
21
  flex-direction: column;
22
- `,aa=We(function(a,t){const l=le(a),n=z.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:_(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(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=_e(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),y=z.getSignedInUser(),h=m(e=>q(e)),{useFeatureGate:p}=Y(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>_(e)),I=!Q(O,h)&&V,S=X(h),w=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[v,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=Je({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>ve(e)),b=h?.companyId;r.useEffect(()=>{u&&v===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,w,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Ye,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,J)=>{n(K({sortKey:e,sortOrder:J}))},onRowClick:e=>{const J=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(J,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function Sa(){const a=Ge();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(M,{})}),s.jsx($,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
22
+ `,aa=We(function(a,t){const l=le(a),n=z.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:H(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(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=He(),n=ee(),g=ze(),{areTenantIdsInSync:o}=Ve(),y=z.getSignedInUser(),h=m(e=>Q(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>H(e)),I=!Y(O,h)&&V,S=q(h),w=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,v]=r.useState(!1),[L,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=Je({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>ve(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Le(e)),b=h?.companyId;r.useEffect(()=>{u&&L===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,w,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),v(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),v(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,J)=>{n(K({sortKey:e,sortOrder:J}))},onRowClick:e=>{const J=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(J,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function Sa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(M,{})}),s.jsx($,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-BqBYCpDO.js";import E from"./NotFoundScreen-D9VlElva.js";import{a as r}from"./sentry-CDxqFZbe.js";import{h as _,g as v,j as p,i as P,u as M,N as U,n as z,o as B,p as h}from"./core-r5mQR9TZ.js";import{eP as O,PY as b,bo as F,bn as N,hn as V,gT as Y}from"./zeni-epic-state-CRBir-xp.js";import{v as $,z as I,_ as q,cB as G}from"./index-BJKl78Nr.js";import"./mui-BOya5KC5.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-CMXbmaYh.js";import{M as J}from"./MobileAppDrawer-BUMTEMjO.js";import"./recharts-BFPpJ278.js";import"./analytics-kuRARP-L.js";import"./plaid-CbVh_Xmg.js";import"./dnd-DDJsx0NB.js";import"./stripe-DMRn4zHo.js";import"./lottie-C0ZKrLeQ.js";import"./lexical-Cgnkx0ca.js";import"./pdf-B1xdy5_9.js";import"./utils-BMmLL9nY.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]="2ead32b6-f1fd-40e3-96ab-4cd7688ae228",e._sentryDebugIdIdentifier="sentry-dbid-2ead32b6-f1fd-40e3-96ab-4cd7688ae228")}catch{}})();const K=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),L=()=>{const e=_(),t=v(),c=$(),o=p(a=>O(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=P(),u=M(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u(Y({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(U,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(B,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1 +1 @@
1
- import{a as h,b as t}from"./sentry-DQGl2YSn.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-CDxqFZbe.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-BiGkkGoP.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DQGl2YSn.js";import{L as dt,bT as Tc,eQ as Ac,Jr as Rc,JV as kl,c2 as Tl,fo as Al,fp as Rl}from"./zeni-epic-state-YenBAkdY.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-BCjesvPZ.js";import{r as un}from"./empty-zLrsqSwy.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CUEF9aFq.js";import{r as Gl}from"./index-C2zxt7CG.js";import{r as zl}from"./index-3OE7eXoF.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-DYij5xsh.js";import{u as Kl,z as Pc,L as Wl,_ as Jl,H as Xl,i as Ql,d as tf}from"./index-BCP41PwF.js";import"./mui-CdvNR06J.js";import{d as Pe}from"./decodeURIComponentSafe-CSUd4Wt5.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]="49641ee9-8b1c-442d-8d0c-de0975779049",t._sentryDebugIdIdentifier="sentry-dbid-49641ee9-8b1c-442d-8d0c-de0975779049")}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-BqBYCpDO.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CDxqFZbe.js";import{L as dt,bT as Tc,eP as Ac,Jo as Rc,JS as kl,c2 as Tl,fn as Al,fo as Rl}from"./zeni-epic-state-CRBir-xp.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-BMmLL9nY.js";import{r as un}from"./empty-DzaiFamT.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-p4rDaah8.js";import{r as Gl}from"./index-BGRPzhmG.js";import{r as zl}from"./index-1UV4MMXg.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-r5mQR9TZ.js";import{u as Kl,z as Pc,L as Wl,M as Jl,N as Xl,i as Ql,d as tf}from"./index-BJKl78Nr.js";import"./mui-BOya5KC5.js";import{d as Pe}from"./decodeURIComponentSafe-Cj9PISMb.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]="35ac6104-a58d-4558-9b5c-ec2ccb40f7c9",t._sentryDebugIdIdentifier="sentry-dbid-35ac6104-a58d-4558-9b5c-ec2ccb40f7c9")}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-BqBYCpDO.js";import{a as o}from"./sentry-CDxqFZbe.js";import{j as f,h as F,u as W,g as _,n as H}from"./core-r5mQR9TZ.js";import{h as M,J as V,z as R,b9 as J,F as N,W as U,_ as $,x as z,d as l,f as K,a7 as q,ba as G}from"./index-BJKl78Nr.js";import{f2 as Q,eP as X,MJ as P,MK as Y,ub as Z,u1 as g,f4 as ee,bO as ae,u6 as re,ML as ne}from"./zeni-epic-state-CRBir-xp.js";import{D as te,e as se,n as oe,S as ie}from"./mui-BOya5KC5.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-CMXbmaYh.js";import{M as de}from"./MobileAppDrawer-BUMTEMjO.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]="aa2248b9-f8b4-4c16-8197-fbf38e9174be",e._sentryDebugIdIdentifier="sentry-dbid-aa2248b9-f8b4-4c16-8197-fbf38e9174be")}catch{}})();const ce={overlayWidth:new N(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=M(),n=V();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>Q(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(J,{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=H(function(e){const a=P(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))}}})(q(G));function ve({isReferralDrawerOpen:e}){const a=F(),r=W(),n=_(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,b]=o.useState(!1),w=R.getSignedInUser(),h=f(t=>X(t)),C=f(t=>P(t)),m=C.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=Y([C,p]),{areTenantIdsInSync:c}=U();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&c&&(u(!0),r(g(!0)))},[m,r,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(x(!0),r(ee(!0)))},[p,r,c]),o.useEffect(()=>{b(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:B}=le({mobileExploreReferrer:"Rewards"});$({isDataReady:y===!0});const L={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,T)=>{T.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(z,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(K.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{b(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:B,...L})]})}export{ve as R};
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-BqBYCpDO.js";import x from"./NotFoundScreen-D9VlElva.js";import{a as p}from"./sentry-CDxqFZbe.js";import{h as C,g as I,u as D,j as u,N as A,n as E,o as k,p as c}from"./core-r5mQR9TZ.js";import{eP as T,ND as g,NT as S,D8 as V,Ch as _,D7 as m,C_ as N,O7 as U}from"./zeni-epic-state-CRBir-xp.js";import{h as O,z as $,B,a7 as P,bQ as W,af as z}from"./index-BJKl78Nr.js";import"./mui-BOya5KC5.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-DW8nJs5W.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="b2f855a3-5abe-40c7-8e44-051b5112cd58",e._sentryDebugIdIdentifier="sentry-dbid-b2f855a3-5abe-40c7-8e44-051b5112cd58")}catch{}})();const d="reimbursement-approval-rule-update",Q=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(d)&&e(U(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(N(s))},onEditRuleClick:s=>{s!=null?(e(m(s)),a(`./${s}/edit`)):(e(m()),a("./new"))}}})(P(W)),q=()=>{const e=C(),r=I(),a=D(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=O(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(_(!0)))},[l,b,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(m())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${d}`]:[],eventCallback:(n,F,R)=>{n.endsWith(d)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(B,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(Q,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(q,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
@@ -1 +1 @@
1
- import{j as g}from"./liveblocks-BiGkkGoP.js";import{a as y}from"./sentry-DQGl2YSn.js";import{h as w,u as A,g as T,i as U,j as b,n as E}from"./core-DYij5xsh.js";import{NW as D,NG as C,D4 as x,Dd as _,Db as S,Dc as h,NX as B}from"./zeni-epic-state-YenBAkdY.js";import{z as k,h as N,B as V,bH as j,af as F}from"./index-BCP41PwF.js";import"./mui-CdvNR06J.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]="3090e16b-5067-440b-a98d-f6fb6c37f105",e._sentryDebugIdIdentifier="sentry-dbid-3090e16b-5067-440b-a98d-f6fb6c37f105")}catch{}})();function O(e){return B(e)==null}const $=E(function(e,a){const t=D(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=F(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const f=[];return p.forEach(c=>{const R=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const m=!!O(d.value);return{type:m?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!m}}),v=R.concat(I);f.push({action:c.stepType.selectedOption,actors:v,operator:v.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),f};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(j);function W(){const e=w(),a=A(),t=T(),{approvalRuleId:s}=U(),n=k.getSignedInUser(),l=N(),r=b(p=>D(p)),i=b(p=>C(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(V,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx($,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{W as R,O as i};
1
+ import{j as g}from"./liveblocks-BqBYCpDO.js";import{a as y}from"./sentry-CDxqFZbe.js";import{h as w,u as A,g as T,i as U,j as b,n as E}from"./core-r5mQR9TZ.js";import{NT as D,ND as C,D1 as x,Da as _,D8 as S,D9 as h,NU as B}from"./zeni-epic-state-CRBir-xp.js";import{z as k,h as N,B as V,bH as j,af as F}from"./index-BJKl78Nr.js";import"./mui-BOya5KC5.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]="f23b5203-9f39-49ca-ae0e-2802596f3b85",e._sentryDebugIdIdentifier="sentry-dbid-f23b5203-9f39-49ca-ae0e-2802596f3b85")}catch{}})();function O(e){return B(e)==null}const $=E(function(e,a){const t=D(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=F(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const f=[];return p.forEach(c=>{const R=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const m=!!O(d.value);return{type:m?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!m}}),v=R.concat(I);f.push({action:c.stepType.selectedOption,actors:v,operator:v.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),f};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(h(p))}},onResetClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(S()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(j);function J(){const e=w(),a=A(),t=T(),{approvalRuleId:s}=U(),n=k.getSignedInUser(),l=N(),r=b(p=>D(p)),i=b(p=>C(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(V,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx($,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{J as R,O as i};