@zeniai/web-app-ui 5.1.86-dev → 5.1.87-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 (132) hide show
  1. package/dist/assets/AddressRoutes-DxEoxIUb.js +1 -0
  2. package/dist/assets/AddressScreen-Chily4bM.js +9 -0
  3. package/dist/assets/{AiCfoScreen-DK7jWO5l.js → AiCfoScreen-BBEO3Suh.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-Bufqh5bf.js → BillPayApprovalRoutes-DaiEsNWA.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-DQrVntHX.js → BillPayRoutes-PIaeEBdZ.js} +11 -11
  6. package/dist/assets/{BusinessVerificationPageScreen-BVO4LcOB.js → BusinessVerificationPageScreen-D5dvQNJp.js} +2 -2
  7. package/dist/assets/{CardsAiCfoScreen-BPq182YL.js → CardsAiCfoScreen-BXBY9Hni.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes--1Cz6d6F.js → ChargeCardRoutes-BK0OrIBV.js} +11 -11
  9. package/dist/assets/CompanyPassportScreen-Cm4gk9yY.js +1 -0
  10. package/dist/assets/ConnectionAuthScreen-CffoYAGH.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-C8YQtDAl.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-DBUibBfl.js → CustomerOnboardingRoutes-Cy5fh7Ph.js} +3 -3
  13. package/dist/assets/{DashboardRoutes-CWiRUKmL.js → DashboardRoutes-BEwjeJIS.js} +4 -4
  14. package/dist/assets/{DefaultTenantHome-Q8Gr6wzz.js → DefaultTenantHome-Dek2VXLS.js} +1 -1
  15. package/dist/assets/{DomesticWireDetailScreen-Bg4bD2vf.js → DomesticWireDetailScreen-B1_XQRWz.js} +4 -4
  16. package/dist/assets/{DrawerScreen-ESB0V3An.js → DrawerScreen-DvcQwYJL.js} +1 -1
  17. package/dist/assets/EntityDetailRoutes-DmlCVpq5.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-DRdJk7UH.js → ExpenseAutomationRoutes-B51dpCOX.js} +1 -1
  19. package/dist/assets/FeaturePreviewScreen-rsKGOKMt.js +1 -0
  20. package/dist/assets/HubSpotOAuthCallbackScreen-B8HTRdsG.js +1 -0
  21. package/dist/assets/MagicLinkRoutes-w7z-lC8R.js +72 -0
  22. package/dist/assets/MagicLinkSignInScreen-DRVCTLxJ.js +12 -0
  23. package/dist/assets/{MobileAppDrawer-CNkPd-0r.js → MobileAppDrawer-C4Qb7oTx.js} +1 -1
  24. package/dist/assets/NotFoundScreen-DF585FcE.js +1 -0
  25. package/dist/assets/{NotificationRoutes-CDTyM5yC.js → NotificationRoutes-B1yY0K-v.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-DjqkjsZh.js +1 -0
  27. package/dist/assets/{PandLWithForecastRoutes-CgJVRO_P.js → PandLWithForecastRoutes-DVRTwbY5.js} +1 -1
  28. package/dist/assets/PeopleRoutes-DNIjECiJ.js +22 -0
  29. package/dist/assets/PerformanceRoutes-CBA6LdQM.js +1 -0
  30. package/dist/assets/{Preview-ng4_PqRv.js → Preview-Dva_bJum.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-B3-UhwG_.js → QBOConnectionScreen-CGkERoNs.js} +1 -1
  32. package/dist/assets/ReferralListScreen-CjqD8MEj.js +5 -0
  33. package/dist/assets/{ReimbursementApprovalRoutes-DJ6r8--7.js → ReimbursementApprovalRoutes-C6wjjcY2.js} +1 -1
  34. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CGou3dCd.js → ReimbursementApprovalRuleDetailScreen-lqMGwwjC.js} +1 -1
  35. package/dist/assets/{ReimbursementRoutes-C1KqmlyM.js → ReimbursementRoutes-DwMQE72_.js} +9 -9
  36. package/dist/assets/{ReportsRoutes-BTVnfyaM.js → ReportsRoutes-AH6kORjA.js} +1 -1
  37. package/dist/assets/RewardsRoutes-CV4ZZqiN.js +1 -0
  38. package/dist/assets/ScreenRoutes-CWOU9Zyz.js +2 -0
  39. package/dist/assets/{SettingsRoutes-ZI-PRowa.js → SettingsRoutes-B4qGOdQZ.js} +7 -7
  40. package/dist/assets/{SetupPagesScreen-CnFtaoyZ.js → SetupPagesScreen-CZVsa4S1.js} +5 -5
  41. package/dist/assets/SignInScreen-BMK86dbR.js +1 -0
  42. package/dist/assets/SignOutScreen-DS_DDs6h.js +9 -0
  43. package/dist/assets/TaskListScreen-C5s1cVme.js +9 -0
  44. package/dist/assets/TaskRoutes-C2QoRTON.js +9 -0
  45. package/dist/assets/{TransactionDetailRoutes-75MHva3P.js → TransactionDetailRoutes-DvTD9yn_.js} +1 -1
  46. package/dist/assets/{TransactionDetailScreen-BdRaLDX3.js → TransactionDetailScreen-D3MDrNqC.js} +2 -2
  47. package/dist/assets/{TransactionListRoutes-BK2uV7qm.js → TransactionListRoutes-DqVFZNDK.js} +1 -1
  48. package/dist/assets/{TreasuryRoutes-JT_IY3Gx.js → TreasuryRoutes-_BFzpxv8.js} +6 -6
  49. package/dist/assets/VendorsRoutes-Dc2IVyP5.js +112 -0
  50. package/dist/assets/WiseConfirmationScreen-6okfuCMP.js +12 -0
  51. package/dist/assets/{ZeniAccountRoutes-BPiHmqg-.js → ZeniAccountRoutes--kyyJ82L.js} +11 -11
  52. package/dist/assets/ZeniAccountStatementScreen-D99BQFQI.js +9 -0
  53. package/dist/assets/{accountMappingHelper-COLWfB1U.js → accountMappingHelper-Du8kIzw4.js} +1 -1
  54. package/dist/assets/{analytics-dJ9Vu0DH.js → analytics-BY30ztud.js} +1 -1
  55. package/dist/assets/{analyticsHelper-B2nQzr20.js → analyticsHelper-CxPzmrE2.js} +1 -1
  56. package/dist/assets/{core-Ca6G0voE.js → core-FEzHdTwu.js} +1 -1
  57. package/dist/assets/{decodeURIComponentSafe-BMcEUj25.js → decodeURIComponentSafe-_VO6ySKg.js} +1 -1
  58. package/dist/assets/{dnd-Be5WoH8E.js → dnd-Cb_vPZwC.js} +1 -1
  59. package/dist/assets/{empty-uy3M1msm.js → empty-C5RcOwbi.js} +1 -1
  60. package/dist/assets/{empty-DHGdIlcJ.js → empty-C8ieKMB7.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-IUbgWLFZ.js → emptyVideoElement-BmUcQvfG.js} +1 -1
  62. package/dist/assets/epic-BNsbOFuA.js +2 -0
  63. package/dist/assets/getLocaleForTenant-C7oVCXTV.js +1 -0
  64. package/dist/assets/{index-sd36C9hC.js → index-B4FjCn1f.js} +1 -1
  65. package/dist/assets/{index-D3FowIif.js → index-C7vi0ZZK.js} +1 -1
  66. package/dist/assets/{index-Dpm9OcRr.js → index-CBsCykBf.js} +1 -1
  67. package/dist/assets/{index-Dcmv7y8l.js → index-CVniyevN.js} +1 -1
  68. package/dist/assets/{index-Vw1oLCxE.js → index-CkBh8V_t.js} +2 -2
  69. package/dist/assets/{index-BMVCuDFR.js → index-DgG7sdLK.js} +1 -1
  70. package/dist/assets/{index-Ck8HU4ZH.js → index-jQssSn-J.js} +1 -1
  71. package/dist/assets/{index-DD9OmSLj.js → index-pXx5w7oJ.js} +14263 -14305
  72. package/dist/assets/{lexical-DTpvAJin.js → lexical-fJeYHrZP.js} +1 -1
  73. package/dist/assets/{liveblocks-4PIBJMyE.js → liveblocks-B2D23g1h.js} +1 -1
  74. package/dist/assets/{lottie-B7am_Gp2.js → lottie-BKshFrBj.js} +1 -1
  75. package/dist/assets/{mui-BI3ZId9r.js → mui-C754KMjM.js} +1 -1
  76. package/dist/assets/{pathToGoBack-CrG50xVP.js → pathToGoBack-UuLm5E-W.js} +1 -1
  77. package/dist/assets/{pdf-DUHWpwzW.js → pdf-BSvba1pn.js} +3 -3
  78. package/dist/assets/{pdf-lib-DyNMbFeB.js → pdf-lib-DwZXgIAK.js} +1 -1
  79. package/dist/assets/{plaid-BFzM5Kog.js → plaid--k8gbxl0.js} +1 -1
  80. package/dist/assets/{pusher-BmnXBdoc.js → pusher-DZSPU4Iz.js} +1 -1
  81. package/dist/assets/{react-CffrEBOp.js → react-Bv0wImI-.js} +1 -1
  82. package/dist/assets/{react-BOWfROr3.js → react-Bwb7DPQL.js} +1 -1
  83. package/dist/assets/{react-DM-Vx6Nk.js → react-CNLrYL7C.js} +1 -1
  84. package/dist/assets/{react-CZFZzs7c.js → react-DTEOm1rk.js} +1 -1
  85. package/dist/assets/{react-Wm4oo8rw.js → react-KlSSTbpt.js} +1 -1
  86. package/dist/assets/{react-DMQWnTjk.js → react-_GRuT6vD.js} +1 -1
  87. package/dist/assets/{recharts-D6NnjcYi.js → recharts-CIXkvtnT.js} +1 -1
  88. package/dist/assets/{routePaths-BumbtdKN.js → routePaths-x0riE4xM.js} +1 -1
  89. package/dist/assets/{sentry-CXcgkCeA.js → sentry-BQ1KU1t3.js} +1 -1
  90. package/dist/assets/{url-DVO5HPAn.js → url-BWcieJIW.js} +1 -1
  91. package/dist/assets/{url-DsqsNUWn.js → url-DLepITYL.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DQzT3CdB.js → useAiCfoDashboardSuggestedQuestionsChips-CVRUasWi.js} +1 -1
  93. package/dist/assets/useAskAiCfoHostNavButtonProps-Be2oPcqW.js +1 -0
  94. package/dist/assets/useCashManagementBanner-GC5G0bCW.js +1 -0
  95. package/dist/assets/{useChargeCardPusherEvents-CtFgCR2P.js → useChargeCardPusherEvents-B89u0v4H.js} +1 -1
  96. package/dist/assets/{useDeviceId-BbYF3u-l.js → useDeviceId-C0O1xmgi.js} +1 -1
  97. package/dist/assets/useEmailConnectResultRefresh-BS2g621b.js +1 -0
  98. package/dist/assets/{useInitialThreadRequest-B6-oXb8Z.js → useInitialThreadRequest-qt3qTzlR.js} +1 -1
  99. package/dist/assets/{utils-DFP_hVXq.js → utils-C8oTXAPM.js} +1 -1
  100. package/dist/assets/{withTransactionSidePanel-iSi7Lgwj.js → withTransactionSidePanel-CYkngv7G.js} +1 -1
  101. package/dist/assets/{zeni-epic-state-BIxjj87B.js → zeni-epic-state-Bxb-N0Vf.js} +5 -5
  102. package/dist/index.html +1 -1
  103. package/package.json +3 -3
  104. package/dist/assets/AddressRoutes-CYnGGpGr.js +0 -1
  105. package/dist/assets/AddressScreen-Cgf_DSfy.js +0 -9
  106. package/dist/assets/CompanyPassportScreen-Cr6_STQF.js +0 -1
  107. package/dist/assets/ConnectionAuthScreen-DPDyawJA.js +0 -11
  108. package/dist/assets/CustomerOnboardingAuthScreen-CwgXB2Ot.js +0 -1
  109. package/dist/assets/EntityDetailRoutes-BgIcnD30.js +0 -1
  110. package/dist/assets/FeaturePreviewScreen-CPre8DhJ.js +0 -1
  111. package/dist/assets/HubSpotOAuthCallbackScreen-D1vja8MF.js +0 -1
  112. package/dist/assets/MagicLinkRoutes-50BdhE1X.js +0 -72
  113. package/dist/assets/MagicLinkSignInScreen-oln-_jh3.js +0 -12
  114. package/dist/assets/NotFoundScreen-C4hj38o6.js +0 -1
  115. package/dist/assets/OAuthConsentScreen-Bfra_k87.js +0 -1
  116. package/dist/assets/PeopleRoutes-DsSKCjjc.js +0 -22
  117. package/dist/assets/PerformanceRoutes-5mjMtnxs.js +0 -1
  118. package/dist/assets/ReferralListScreen-Dt6a-ZaL.js +0 -5
  119. package/dist/assets/RewardsRoutes-DdOKhqcE.js +0 -1
  120. package/dist/assets/ScreenRoutes-CR7u1SOQ.js +0 -2
  121. package/dist/assets/SignInScreen-BoQaZMzp.js +0 -1
  122. package/dist/assets/SignOutScreen-BWN6fg9F.js +0 -9
  123. package/dist/assets/TaskListScreen-wwlTbcpO.js +0 -9
  124. package/dist/assets/TaskRoutes-BZfNRRg-.js +0 -9
  125. package/dist/assets/VendorsRoutes-BS6JrHkM.js +0 -112
  126. package/dist/assets/WiseConfirmationScreen-CrmCNnnU.js +0 -12
  127. package/dist/assets/ZeniAccountStatementScreen-DxgFXxRD.js +0 -9
  128. package/dist/assets/epic-DoVGgmyH.js +0 -2
  129. package/dist/assets/getLocaleForTenant-DVEihZ-H.js +0 -1
  130. package/dist/assets/useAskAiCfoHostNavButtonProps-CSLK93Wz.js +0 -1
  131. package/dist/assets/useCashManagementBanner-BNEI8i2V.js +0 -1
  132. package/dist/assets/useEmailConnectResultRefresh-CMs316dl.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-4PIBJMyE.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-Ca6G0voE.js";import{Q1 as k,Q8 as _,gh as q,gg as K,gf as W,ju as X,N8 as J,rt as L,eX as D,Pz as V,js as T,Q2 as S,Qb as j,jq as F,jN as G}from"./zeni-epic-state-BIxjj87B.js";import{bB as M,K as N,C as R,z as U,y as z,q as p,U as v,B as O,bC as Y,o as Q,bD as ee,s as te}from"./index-DD9OmSLj.js";import{n as Z}from"./mui-BI3ZId9r.js";import"./sentry-CXcgkCeA.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]="6c1dbe60-f032-4564-9ec0-39a28fae7037",e._sentryDebugIdIdentifier="sentry-dbid-6c1dbe60-f032-4564-9ec0-39a28fae7037")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(J("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(c=>k(c,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Z.div`
1
+ import{j as l}from"./liveblocks-B2D23g1h.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-FEzHdTwu.js";import{Q4 as k,Qb as _,gh as q,gg as K,gf as W,ju as X,Nb as J,rt as L,eX as D,PC as V,js as T,Q5 as S,Qe as j,jq as F,jN as G}from"./zeni-epic-state-Bxb-N0Vf.js";import{bB as M,K as N,C as R,z as U,y as O,p,U as v,B as Q,bC as Y,o as Z,bD as ee,q as te}from"./index-pXx5w7oJ.js";import{n as z}from"./mui-C754KMjM.js";import"./sentry-BQ1KU1t3.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]="c02703aa-2be5-490b-be66-724eef9e23c6",e._sentryDebugIdIdentifier="sentry-dbid-c02703aa-2be5-490b-be66-724eef9e23c6")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(J("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(M);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(c=>k(c,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=z.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as l}from"./liveblocks-4PIBJMyE.js";import{h as w,g as C,j as h,n as A,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{e(F(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),c=s.poppedPathname??E();n(c,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:c}=s;e(j({data:c}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),c=s.poppedPathname??E(0);t.navigate(c,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:c}=B(),d=e??s,{useFeatureGate:r}=R(),i=U.getSignedInUser(),b=h(u=>D(u)),g=z(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:c}),l.jsx(oe,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},P=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return P(e,"ach",t,n)}function ve(e,t,n){return P(e,"domestic",t,n)}function ge(e,t,n){return P(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=Z.div`
9
+ `,oe=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(G(s))},onSaveHandler:s=>{e(F(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),c=s.poppedPathname??E();n(c,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:c}=s;e(j({data:c}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),c=s.poppedPathname??E(0);t.navigate(c,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:c}=B(),d=e??s,{useFeatureGate:r}=R(),i=U.getSignedInUser(),b=h(u=>D(u)),g=O(),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=r(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=r(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Q,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:c}),l.jsx(oe,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const E=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},P=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return P(e,"ach",t,n)}function ve(e,t,n){return P(e,"domestic",t,n)}function ge(e,t,n){return P(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},re=z.div`
10
10
  display: flex;
11
11
  height: 100vh;
12
12
  width: 100%;
@@ -14,5 +14,5 @@ import{j as l}from"./liveblocks-4PIBJMyE.js";import{h as w,g as C,j as h,n as A,
14
14
  flex-direction: column;
15
15
  align-items: center;
16
16
  background-color: ${e=>e.theme.colors.grey4};
17
- box-shadow: ${e=>`0px 2px ${Q.sp1} ${e.theme.colors.dropShadowNormal}`};
18
- `,ce=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:c}=t,{tenantEmailDomain:d}=c;return{onFetchBankName:r=>{e(G(r))},onSaveHandler:r=>{e(F(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(j({data:i}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),i=r.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(d,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:c}=B(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:i}=R(),b=z(),g=h(u=>D(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(O,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Q.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:c}),l.jsx(ce,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,H as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
17
+ box-shadow: ${e=>`0px 2px ${Z.sp1} ${e.theme.colors.dropShadowNormal}`};
18
+ `,ce=A(function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=V(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:c}=t,{tenantEmailDomain:d}=c;return{onFetchBankName:r=>{e(G(r))},onSaveHandler:r=>{e(F(t.bankAccountContext,r,"us-domestic",s))},onWireDetailsUpdated:r=>{const{bankAccountSection:i}=r;e(j({data:i}))},onCancel:()=>{(()=>{const r=p(o.state?.pathnameStackToGoBack),i=r.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:r.newStack}})})(),e(S())},onAddressClick:r=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(d,r,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const r=p(t.location.state?.pathnameStackToGoBack),i=r.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:r.newStack}})}e(S())}}})(ee);function xe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=N(),{vendorId:s,billId:c}=B(),d=e??s,r=U.getSignedInUser(),{useFeatureGate:i}=R(),b=O(),g=h(u=>D(u)),x=p(a.state?.pathnameStackToGoBack),f=t??(x.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:I}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.isDepositAccountsFeatureEnabled);if(r==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(Q,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${Z.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(re,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:c}),l.jsx(ce,{location:a,navigate:n,billId:c,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:I,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,xe as D,H as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-4PIBJMyE.js";import{K as f,E as l,y as c}from"./index-DD9OmSLj.js";import{D as p}from"./mui-BI3ZId9r.js";import"./sentry-CXcgkCeA.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]="d636e153-afe0-43db-9e0f-2ffcb0dec795",e._sentryDebugIdIdentifier="sentry-dbid-d636e153-afe0-43db-9e0f-2ffcb0dec795")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=f(),d=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${d})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{h as D};
1
+ import{j as i}from"./liveblocks-B2D23g1h.js";import{K as f,E as l,y as c}from"./index-pXx5w7oJ.js";import{D as p}from"./mui-C754KMjM.js";import"./sentry-BQ1KU1t3.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]="d636e153-afe0-43db-9e0f-2ffcb0dec795",e._sentryDebugIdIdentifier="sentry-dbid-d636e153-afe0-43db-9e0f-2ffcb0dec795")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=f(),d=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${d})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{h as D};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-B2D23g1h.js";import{a as d}from"./sentry-BQ1KU1t3.js";import{h as A,u as B,g as G,i as q,j as c,N as O,n as F,o as M,p as _}from"./core-FEzHdTwu.js";import{Oj as z,eX as K,NH as R,lx as W,Kc as I,Oo as X,Na as Y,kx as $,Kd as S,NM as H,NN as V,Nc as J,Nb as L}from"./zeni-epic-state-Bxb-N0Vf.js";import{aX as Q,d as U,p as Z,q as tt}from"./index-pXx5w7oJ.js";import"./mui-C754KMjM.js";import{d as k}from"./decodeURIComponentSafe-_VO6ySKg.js";import{w as et}from"./withTransactionSidePanel-CYkngv7G.js";import{f as at,c as nt}from"./routePaths-x0riE4xM.js";import"./recharts-CIXkvtnT.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.js";import"./useAskAiCfoHostNavButtonProps-Be2oPcqW.js";import"./TransactionDetailScreen-D3MDrNqC.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]="4edd11ca-9e08-4526-95d2-c1efd2dc99b7",a._sentryDebugIdIdentifier="sentry-dbid-4edd11ca-9e08-4526-95d2-c1efd2dc99b7")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=X(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:$(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:N}=q(),r=k(x??""),p=k(N??""),u=rt(r,p),j=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),w=c(n=>K(n).company?.companyInfo.firstMonthOfFY??1),f=c(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(W(i)))},[m,u,i]);const E=c(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(O,{to:b(j.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(M,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
@@ -1,4 +1,4 @@
1
- import{j as h}from"./liveblocks-4PIBJMyE.js";import oa from"./NotFoundScreen-C4hj38o6.js";import{a as o,b as Nt}from"./sentry-CXcgkCeA.js";import{n as Ue,S as sa}from"./mui-BI3ZId9r.js";import{u as pe,h as Yt,g as Ke,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-Ca6G0voE.js";import{eX as Re,S$ as la,oj as Ee,fY as ra,s4 as da,oB as Kt,oW as Zt,T0 as Ht,p4 as ua,T1 as Qt,ou as ma,rC as pa,fJ as Ie,T2 as De,ub as Wt,Eu as Xt,T3 as en,T4 as ha,ra as Ze,Oh as Pt,Oj as ga,kA as Ca,Ok as Sa,kH as fa,c_ as Ia,vo as He,oH as tn,p9 as Fe,oz as de,T5 as Ea,N9 as Rt,N8 as we,T6 as Dt,kY as ka,T7 as Ta,T8 as ya,T9 as ba,Ta as va,oO as Aa,pc as xe,Tb as wa,Tc as xa,Td as Pa,pj as Ra,kL as Da,kC as Fa,Te as Ua,kK as Ft,Or as Ba,Tf as Oa,Tg as Va,r6 as _a,qK as za,pa as me,qJ as Je,Th as Ma,Ti as ja,Tj as La,mf as $a,bo as qa,ma as Ut,lY as Ga,Tk as Ja,fz as Bt,gx as Na,m7 as Ya,xh as Ka,Tl as Za,pK as Ha,pF as Qa,pJ as Wa,pu as Xa,Tm as eo,fM as nn,oZ as to,oK as no,fZ as Ot,pe as ao,Tn as oo,To as so,pb as an,Tp as co,Tq as io,Tr as lo,Ts as ro,Tt as Vt,ri as uo,qB as mo,N7 as po,Tu as ho,Tv as go,kJ as Co,Tw as So,Ja as fo,kI as Io,kx as Eo,fL as ko,q7 as on,qt as To,p8 as _t,pd as yo,bE as bo,m4 as vo,m1 as Ao,Tx as wo,pt as zt,qp as Mt,qn as xo,Ty as Po,qc as Ro,pU as Do,qq as Fo,Tz as Uo,TA as Bo,pY as Oo,TB as Vo,pP as _o,pX as zo,pV as Mo,qw as jo}from"./zeni-epic-state-BIxjj87B.js";import{C as sn,U as X,e as q,s as ae,_ as cn,a0 as ln,c$ as Lo,z as Be,d0 as $o,au as Pe,d1 as qo,aZ as jt,B as rn,d2 as Go,ar as Ne,a as Jo,a9 as No,d3 as Yo,a4 as Ko,d4 as Zo,Z as Ho,d5 as Qo,d6 as Wo,F as Xo,j as es,aS as ts,d7 as ns,d8 as as,be as os,E as ss,aV as cs}from"./index-DD9OmSLj.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-CSLK93Wz.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-BdRaLDX3.js";import{w as us}from"./withTransactionSidePanel-iSi7Lgwj.js";import{h as ms,v as ps}from"./routePaths-BumbtdKN.js";import{g as Ye}from"./accountMappingHelper-COLWfB1U.js";import{D as hs}from"./DrawerScreen-ESB0V3An.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.js";import"./decodeURIComponentSafe-BMcEUj25.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]="bcb3d7e4-76b7-417d-8c23-08e6dffd015c",t._sentryDebugIdIdentifier="sentry-dbid-bcb3d7e4-76b7-417d-8c23-08e6dffd015c")}catch{}})();const gs=()=>{const t=pe(),l=Yt(),B=Ke(),f=x(d=>Re(d)),{useFeatureGate:b}=sn(),{isFeatureEnabled:S}=b(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=b(X.aiAuditScorePercentage),I=x(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=x(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),k=o.useCallback((d,G,ee=!1)=>{t(Ee({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),v=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(g,f.tenantId,!0)},[k,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ae(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:T}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&T&&k(g,f.tenantId)},[k,g,s.fetchState,f.tenantId,T]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(da(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(Cs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:E,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},Cs=Ue.div`
1
+ import{j as h}from"./liveblocks-B2D23g1h.js";import oa from"./NotFoundScreen-DF585FcE.js";import{a as o,b as Nt}from"./sentry-BQ1KU1t3.js";import{n as Ue,S as sa}from"./mui-C754KMjM.js";import{u as pe,h as Yt,g as Ke,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-FEzHdTwu.js";import{eX as Re,T2 as la,oj as Ee,fY as ra,s4 as da,oB as Kt,oW as Zt,T3 as Ht,p4 as ua,T4 as Qt,ou as ma,rC as pa,fJ as Ie,T5 as De,ub as Wt,Ex as Xt,T6 as en,T7 as ha,ra as Ze,Ok as Pt,Om as ga,kA as Ca,On as Sa,kH as fa,c_ as Ia,vr as He,oH as tn,p9 as Fe,oz as de,T8 as Ea,Nc as Rt,Nb as we,T9 as Dt,kY as ka,Ta,Tb as ya,Tc as ba,Td as va,oO as Aa,pc as xe,Te as wa,Tf as xa,Tg as Pa,pj as Ra,kL as Da,kC as Fa,Th as Ua,kK as Ft,Ou as Ba,Ti as Oa,Tj as Va,r6 as _a,qK as za,pa as me,qJ as Je,Tk as Ma,Tl as ja,Tm as La,mf as $a,bo as qa,ma as Ut,lY as Ga,Tn as Ja,fz as Bt,gx as Na,m7 as Ya,xk as Ka,To as Za,pK as Ha,pF as Qa,pJ as Wa,pu as Xa,Tp as eo,fM as nn,oZ as to,oK as no,fZ as Ot,pe as ao,Tq as oo,Tr as so,pb as an,Ts as co,Tt as io,Tu as lo,Tv as ro,Tw as Vt,ri as uo,qB as mo,Na as po,Tx as ho,Ty as go,kJ as Co,Tz as So,Jd as fo,kI as Io,kx as Eo,fL as ko,q7 as on,qt as To,p8 as _t,pd as yo,bE as bo,m4 as vo,m1 as Ao,TA as wo,pt as zt,qp as Mt,qn as xo,TB as Po,qc as Ro,pU as Do,qq as Fo,TC as Uo,TD as Bo,pY as Oo,TE as Vo,pP as _o,pX as zo,pV as Mo,qw as jo}from"./zeni-epic-state-Bxb-N0Vf.js";import{C as sn,U as X,d as q,q as ae,Z as cn,a0 as ln,c$ as Lo,z as Be,d0 as $o,au as Pe,d1 as qo,aZ as jt,B as rn,d2 as Go,ar as Ne,a as Jo,a9 as No,d3 as Yo,a4 as Ko,d4 as Zo,Y as Ho,d5 as Qo,d6 as Wo,v as Xo,j as es,aS as ts,d7 as ns,d8 as as,be as os,E as ss,aV as cs}from"./index-pXx5w7oJ.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-Be2oPcqW.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-D3MDrNqC.js";import{w as us}from"./withTransactionSidePanel-CYkngv7G.js";import{h as ms,v as ps}from"./routePaths-x0riE4xM.js";import{g as Ye}from"./accountMappingHelper-Du8kIzw4.js";import{D as hs}from"./DrawerScreen-DvcQwYJL.js";import"./recharts-CIXkvtnT.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.js";import"./decodeURIComponentSafe-_VO6ySKg.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]="a193e428-5bab-408b-b720-ac50318ebc55",t._sentryDebugIdIdentifier="sentry-dbid-a193e428-5bab-408b-b720-ac50318ebc55")}catch{}})();const gs=()=>{const t=pe(),l=Yt(),B=Ke(),f=x(d=>Re(d)),{useFeatureGate:b}=sn(),{isFeatureEnabled:S}=b(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=b(X.aiAuditScorePercentage),I=x(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=x(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),k=o.useCallback((d,G,ee=!1)=>{t(Ee({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),v=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(g,f.tenantId,!0)},[k,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ae(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:T}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&T&&k(g,f.tenantId)},[k,g,s.fetchState,f.tenantId,T]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(da(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(Cs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:E,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},Cs=Ue.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-B2D23g1h.js";import{a as r}from"./sentry-BQ1KU1t3.js";import{a5 as f,a6 as l,a7 as p,p as m}from"./index-pXx5w7oJ.js";import"./mui-C754KMjM.js";import c from"./NotFoundScreen-DF585FcE.js";import{h as u,g as b}from"./core-FEzHdTwu.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]="b50ef9de-1e19-4e43-a9d6-fe41049e3584",e._sentryDebugIdIdentifier="sentry-dbid-b50ef9de-1e19-4e43-a9d6-fe41049e3584")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -0,0 +1 @@
1
+ import{a as i}from"./sentry-BQ1KU1t3.js";import{u as l,h as m,g as p}from"./core-FEzHdTwu.js";import{ht as f,Mi as g,Mj as _}from"./zeni-epic-state-Bxb-N0Vf.js";import{u as b,L as h,z as y}from"./index-pXx5w7oJ.js";import"./liveblocks-B2D23g1h.js";import"./recharts-CIXkvtnT.js";import"./mui-C754KMjM.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5a4e2792-9e7c-455b-9206-5ea0cc0a061b",e._sentryDebugIdIdentifier="sentry-dbid-5a4e2792-9e7c-455b-9206-5ea0cc0a061b")}catch{}})();function M(){const e=l(),n=m(),r=p(),{setLoading:o,clearAllLoading:d}=b(),a=i.useRef(!1);return i.useLayoutEffect(()=>{o(h.CONNECTION_AUTH)},[o]),i.useEffect(()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(r.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&c!=null){const t=JSON.parse(c);e(f(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{M as default};
@@ -0,0 +1,72 @@
1
+ import{j as t}from"./liveblocks-B2D23g1h.js";import{i as S,n as g,h as C,g as y,u as ee,t as te,j as E,N as ae,o as ne,p}from"./core-FEzHdTwu.js";import{Mb as k,Mc as v,Md as M,Bf as B,B1 as T,Me as D,Mf as oe,Mg as ie,B5 as se,fA as $,Bc as le,B9 as re}from"./zeni-epic-state-Bxb-N0Vf.js";import{K as x,o as r,k as de,d as j,h as G,m as ce,p as me,n as pe,q as _,C as ue,U as he,r as ge,v as xe,y as fe,w as we,B as be,x as Se,_ as ye,S as ke,D as ve,E as je,F as $e}from"./index-pXx5w7oJ.js";import{n as m}from"./mui-C754KMjM.js";import f from"./NotFoundScreen-DF585FcE.js";import{a as I}from"./sentry-BQ1KU1t3.js";import"./recharts-CIXkvtnT.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.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]="976ced6c-5f13-450a-b99e-f2e7470b9efd",e._sentryDebugIdIdentifier="sentry-dbid-976ced6c-5f13-450a-b99e-f2e7470b9efd")}catch{}})();const Ie=m.div`
2
+ display: flex;
3
+ height: 100%;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
+ `,Ce=g(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(M({data:l}))}}})(de);function F(){const e=x(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Be=m.div`
11
+ display: flex;
12
+ height: 100vh;
13
+ width: 100%;
14
+ flex: 1 1 auto;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ background-color: ${e=>e.theme.colors.grey4};
18
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
+ `,De=g(function(e,a){const{isSubPage:n}=a;return{addressToEdit:D(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Pe();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=ze(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}})(ce);function Ae({isSubPage:e}){const a=C(),n=y(),o=x();return t.jsx(t.Fragment,{children:t.jsx(Be,{windowSize:o,children:t.jsx(De,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
20
+ display: flex;
21
+ height: 100%;
22
+ width: 100%;
23
+ flex: 1 1 auto;
24
+ flex-direction: column;
25
+ align-items: center;
26
+ background-color: ${e=>e.theme.colors.grey4};
27
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
+ `,Ne=g(function(e){const a=k(e),n=v(e),o=D(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(M({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=_(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=y(),n=x(),{vendorId:o,billId:i}=S();return o==null||i==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:i})})})}const Fe=m.div`
29
+ display: flex;
30
+ height: 100%;
31
+ width: 100%;
32
+ flex: 1 1 auto;
33
+ flex-direction: column;
34
+ align-items: center;
35
+ background-color: ${e=>e.theme.colors.grey4};
36
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
+ `,Me=g(function(e){const a=k(e),n=v(e),o=D(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"international",i,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=_(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(ge);function Te(){const e=C(),a=y(),n=x(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Me,{location:a,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Ge={containerWidth:new je(100,58)},_e=m(ke)`
38
+ width: ${r.sp4};
39
+ height: ${r.sp4};
40
+ margin-bottom: ${r.sp3};
41
+ margin-top: ${r.sp3};
42
+ margin-left: ${r.sp8};
43
+ cursor: pointer;
44
+ position: absolute;
45
+ color: ${e=>e.theme.colors.brandColorJade};
46
+ `,Ke=m.div`
47
+ display: flex;
48
+ height: 100vh;
49
+ flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
+ width: 100vw;
51
+ overflow-y: scroll;
52
+ background-color: ${e=>e.theme.colors.grey4};
53
+ `,Ve=m.div`
54
+ display: flex;
55
+ flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
+ flex-direction: column;
57
+ width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
58
+ ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
+ padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
+ `,He=m.div`
62
+ display: flex;
63
+ flex-direction: column;
64
+ align-items: center;
65
+ justify-content: center;
66
+ padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
67
+ height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
+ overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
+ width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
+ background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
+ margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
+ `,Ue=g(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=te(),d=s.get("token"),K=n.pathname.includes("address"),w=x(),V=xe(),A=fe(),b=we(),H=()=>{V.toggle()},U=E(u=>k(u)),W=E(u=>v(u)),{authParams:O,fetchState:c,billAttachment:q,billFetchState:P,companyName:J,currencySymbol:Q,amount:R}=U,{tenantId:z,userId:L,sessionId:N}=O,{fetchState:X,internationalBankAccountCreateStatus:Y}=W;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&a(le(i,o,d))},[b,c,i,o,d,a]),I.useEffect(()=>{b&&c==="Completed"&&($(L,N,z),l!=null&&a(re(l)))},[c,b,L,N,z,l,a]),c==="Error"?t.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&P==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",J,l??"",We(n.pathname),Q,R))(u)}),t.jsxs(Ke,{windowSize:w,children:[w!=="small"?t.jsx(_e,{onClick:H}):null,t.jsx(He,{windowSize:w,isAddressPage:K,children:P==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(Ue,{file:q,type:"bill"})}),t.jsx(Ve,{windowSize:w,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Oe(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Oe,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(Ae,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Te,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
@@ -0,0 +1,12 @@
1
+ import{j as u}from"./liveblocks-B2D23g1h.js";import{a as g}from"./sentry-BQ1KU1t3.js";import{u as F,g as _,h as O,t as w,j as l,N as T}from"./core-FEzHdTwu.js";import{z as r,y as A,a as P,e as V,d as N,f as Y,H,_ as R,g as W}from"./index-pXx5w7oJ.js";import{eX as X,LY as Z,M6 as $,LZ as q,fA as B,g0 as G,M2 as J,go as K,cY as Q,M7 as ee,M8 as te}from"./zeni-epic-state-Bxb-N0Vf.js";import{n as ne}from"./mui-C754KMjM.js";import{u as se}from"./useDeviceId-C0O1xmgi.js";import{f as ae}from"./analyticsHelper-CxPzmrE2.js";import{t as ie}from"./getLocaleForTenant-C7oVCXTV.js";import"./recharts-CIXkvtnT.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.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]="2f2f2758-3e2b-4ce0-9a1c-7e59e307b0cd",t._sentryDebugIdIdentifier="sentry-dbid-2f2f2758-3e2b-4ce0-9a1c-7e59e307b0cd")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=F(),a=_(),m=O(),[y]=w(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),k=l(e=>e.tenantState.activeTenantFetchState.fetchState),I=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>X(e)),b=l(e=>Z(e)),E=r.getSignedInUser(),v=A().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t($(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{I!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(q(b.tenantsInOrder),s.zeniSessionId),B(s.userId,s.zeniSessionId,o.tenantId),t(G(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(J("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),K().then(()=>{const e=W();e!=null&&V(e)}),setTimeout(()=>{N.trackLogin(Y.Event.loginSuccess,"email",Q(o.productSettings))},2e3))},[I,S,k,s,o,b,v,a.state,t]);const M=g.useCallback(()=>{m("/signin/auth")},[m]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),j=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(H,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:M});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||f==null||h==="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??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ z-index: 9999;
11
+ background-color: ${t=>t.theme.colors.background};
12
+ `;export{xe as default};
@@ -1 +1 @@
1
- import{j as N}from"./liveblocks-4PIBJMyE.js";import{a as c}from"./sentry-CXcgkCeA.js";import{u as fe,j as n,i as Ye,g as We,h as Xe,l as P}from"./core-Ca6G0voE.js";import{eX as me,fF as qe,fG as be,fr as Ke,bn as Qe,eW as Je,fH as ea,fI as aa,fK as ta,fN as na,fO as g,fQ as sa,fR as de,fU as oa,fS as ia,fT as ra,fV as da,cN as la,fX as ca,cT as ua,fq as fa,g0 as ma,g1 as ba,f$ as pa}from"./zeni-epic-state-BIxjj87B.js";import{a9 as ha,aa as Sa,F as ga,C as Ea,z as k,w as ka,u as Ca,U as r,i as ya,d as Ia,ab as Ta,j as wa,c as Aa,ac as _a,a5 as Fa,ad as Da,ae as va,af as le,ag as ce,L as $a,ah as Ga,ai as ue,e as R,a1 as Ma,s as w,aj as x,ak as Pa}from"./index-DD9OmSLj.js";import{D as Ra}from"./mui-BI3ZId9r.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]="02407b25-fb44-47a4-8b29-aef7cfd3f263",f._sentryDebugIdIdentifier="sentry-dbid-02407b25-fb44-47a4-8b29-aef7cfd3f263")}catch{}})();const xa=ha(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ye(),a=We(),C=ga(),o=Xe(),U=Ke(),m=fe(),{useFeatureGate:i}=Ea(),V=k.getSignedInUser(),B=Qe(V),s=n(e=>me(e)),pe=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>Je(e)),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[A,L]=c.useState(void 0),_=P("/:tenantEmailDomain/dashboard")!==null,z=P("/:tenantEmailDomain/reports")!==null,I=P("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,Z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ea(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n(e=>aa(e));c.useEffect(()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(ta(!0))},[y,T,F.fetchState,I]);const h=k.getSignedInUser(),D=n(e=>e.tenantState),Ce=n(e=>D.fetchState==="Completed"?na(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),Y=Ia(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=B||!B&&ve,Ge=n(e=>g(e).totalUnreadCount),Me=n(e=>g(e).reducedFetchCountState),W=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),X=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Pe=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:q,isLoading:K,isFetchingMore:Q,hasFetchedAll:J,fetchMore:Re}=Ta();c.useEffect(()=>{const e=setTimeout(()=>Re?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(K===!1&&Q===!1&&J===!0)if(s?.companyId!=null&&q!=null){const e=`dashboard_${s.companyId}`;L(q.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[K,Q,J]),c.useEffect(()=>{y&&!I&&Pe.fetchState==="Not-Started"&&U.tenantId!=null&&m(sa("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{A!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:A},"comments")))},[A,$.fetchState]);const xe={fetchStatus:Me,count:Ge},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n(e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),Y===!1&&S.push("expense_automation_card");const Ne=wa(),te=n(e=>ia(e,S,h,we,Te).fetchState),ne=n(e=>ra(e).fetchState),Ue=_&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!_&&!z?void 0:"disabled",Ve=c.useMemo(()=>da(s.userRole),[s.userRole]),Be=la(Ve),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&H.fetchState==="Completed"&&ca(H.notificationSettings,h.userEmail,Z,s),se=Aa(),Le=se&&_a(a),oe=ua(Ne?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Fa(a.pathname)!=="treasury",[v,oe,ie,a.pathname,t]),[ze,re]=c.useState(G);c.useEffect(()=>{re(G())},[G]);const Ze=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=Da(Ze);return N.jsx(Ra,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:N.jsx(va,{signedInUser:V,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ue,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Be,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:He,isTreasuryPopupVisible:ze,isNotificationsTabVisible:je,notificationCountDetails:xe,isExpenseAutomationEnabledForUser:Y,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=W===0&&X>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=W===0&&X>0?"../../notifications/comments":"../../notifications/tasks");const u=w(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!pe)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=w(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=w(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=x(l)&&l!=="command_center";if(x(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Pa(e.type);ue(e.type)?(j!=null&&m(pa()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let b=`/${encodeURIComponent(u)}/`;const M=x(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ga(l)?b+="settings/my_profile":ue(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(ba(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:_,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),La=f=>{const d=fe(),t=n(C=>me(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&qe(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return N.jsx(xa,{...f,...a})};export{La as M};
1
+ import{j as N}from"./liveblocks-B2D23g1h.js";import{a as c}from"./sentry-BQ1KU1t3.js";import{u as fe,j as n,i as Ye,g as qe,h as We,l as P}from"./core-FEzHdTwu.js";import{eX as me,fF as Xe,fG as pe,fr as Ke,bn as Qe,eW as Je,fH as ea,fI as aa,fK as ta,fN as na,fO as g,fQ as sa,fR as de,fU as oa,fS as ia,fT as ra,fV as da,cN as la,fX as ca,cT as ua,fq as fa,g0 as ma,g1 as pa,f$ as ba}from"./zeni-epic-state-Bxb-N0Vf.js";import{a9 as ha,aa as Sa,v as ga,C as Ea,z as k,w as ka,u as Ca,U as r,i as ya,s as Ia,ab as Ta,j as wa,c as Aa,ac as _a,a5 as Fa,ad as Da,ae as va,af as le,ag as ce,L as $a,ah as Ga,ai as ue,d as R,a1 as Ma,q as w,aj as x,ak as Pa}from"./index-pXx5w7oJ.js";import{D as Ra}from"./mui-C754KMjM.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]="724184a6-8096-4285-b491-32da0d422589",f._sentryDebugIdIdentifier="sentry-dbid-724184a6-8096-4285-b491-32da0d422589")}catch{}})();const xa=ha(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ye(),a=qe(),C=ga(),o=We(),U=Ke(),m=fe(),{useFeatureGate:i}=Ea(),V=k.getSignedInUser(),B=Qe(V),s=n(e=>me(e)),be=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>Je(e)),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[A,L]=c.useState(void 0),_=P("/:tenantEmailDomain/dashboard")!==null,z=P("/:tenantEmailDomain/reports")!==null,I=P("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,Z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ea(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n(e=>aa(e));c.useEffect(()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(ta(!0))},[y,T,F.fetchState,I]);const h=k.getSignedInUser(),D=n(e=>e.tenantState),Ce=n(e=>D.fetchState==="Completed"?na(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),Y=Ia(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=B||!B&&ve,Ge=n(e=>g(e).totalUnreadCount),Me=n(e=>g(e).reducedFetchCountState),q=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),W=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Pe=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:K,isFetchingMore:Q,hasFetchedAll:J,fetchMore:Re}=Ta();c.useEffect(()=>{const e=setTimeout(()=>Re?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(K===!1&&Q===!1&&J===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[K,Q,J]),c.useEffect(()=>{y&&!I&&Pe.fetchState==="Not-Started"&&U.tenantId!=null&&m(sa("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{A!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:A},"comments")))},[A,$.fetchState]);const xe={fetchStatus:Me,count:Ge},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n(e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),Y===!1&&S.push("expense_automation_card");const Ne=wa(),te=n(e=>ia(e,S,h,we,Te).fetchState),ne=n(e=>ra(e).fetchState),Ue=_&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!_&&!z?void 0:"disabled",Ve=c.useMemo(()=>da(s.userRole),[s.userRole]),Be=la(Ve),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&H.fetchState==="Completed"&&ca(H.notificationSettings,h.userEmail,Z,s),se=Aa(),Le=se&&_a(a),oe=ua(Ne?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Fa(a.pathname)!=="treasury",[v,oe,ie,a.pathname,t]),[ze,re]=c.useState(G);c.useEffect(()=>{re(G())},[G]);const Ze=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=Da(Ze);return N.jsx(Ra,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:N.jsx(va,{signedInUser:V,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ue,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Be,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:He,isTreasuryPopupVisible:ze,isNotificationsTabVisible:je,notificationCountDetails:xe,isExpenseAutomationEnabledForUser:Y,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=q===0&&W>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=q===0&&W>0?"../../notifications/comments":"../../notifications/tasks");const u=w(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!be)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=w(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=w(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=x(l)&&l!=="command_center";if(x(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Pa(e.type);ue(e.type)?(j!=null&&m(ba()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let p=`/${encodeURIComponent(u)}/`;const M=x(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Ga(l)?p+="settings/my_profile":ue(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(pa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;R.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:_,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),La=f=>{const d=fe(),t=n(C=>me(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Xe(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return N.jsx(xa,{...f,...a})};export{La as M};
@@ -0,0 +1 @@
1
+ import{j as r}from"./liveblocks-B2D23g1h.js";import{h as n,n as i}from"./core-FEzHdTwu.js";import{V as e}from"./index-pXx5w7oJ.js";import"./mui-C754KMjM.js";import"./sentry-BQ1KU1t3.js";import"./zeni-epic-state-Bxb-N0Vf.js";import"./recharts-CIXkvtnT.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.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]="83df1d3c-82df-44f1-96da-d439d2110caa",o._sentryDebugIdIdentifier="sentry-dbid-83df1d3c-82df-44f1-96da-d439d2110caa")}catch{}})();const d=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(e);function _(){const o=n();return r.jsx(d,{navigate:o})}export{_ as default};
@@ -1 +1 @@
1
- import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-4PIBJMyE.js";import lt from"./NotFoundScreen-C4hj38o6.js";import{a as k}from"./sentry-CXcgkCeA.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 q}from"./core-Ca6G0voE.js";import{cu as St,fH as Y,eX as H,fV as bt,fO as b,SW as J,fR as d,fG as y,so as M,xU as It,SX as Ct,fF as Tt,fX as yt,st as _t,SY as F,bo as $,fz as w,sx as O,SZ as At,cG as Et,cz as Nt}from"./zeni-epic-state-BIxjj87B.js";import{_ as xt,z as Bt,C as wt,U as Rt,a0 as Ut,cY as Gt,s as N,a9 as Dt,cZ as vt,aa as Pt,q as Ft}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CSLK93Wz.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="3d0a9c43-8cad-4f1e-9da4-aa68ffc0765e",t._sentryDebugIdIdentifier="sentry-dbid-3d0a9c43-8cad-4f1e-9da4-aa68ffc0765e")}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=Y(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(O("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(J(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(O("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>Y(e)),o=S(e=>H(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Ut({isDataReady:!0});const K=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),U=S(e=>b(e).currentSubTab),Q=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),G=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=Gt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:z,isLoading:W,fetchMore:L,isFetchingMore:X,hasFetchedAll:Z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(J(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Q.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const v=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{v&&G!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):v||G!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[v,G]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&W===!1&&B!=null&&z!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=z.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(X||Z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,X,C,Z,W,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];U==="all"?A.push("read","unread"):U!=="mentions"&&A.push(U),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:K,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(q,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(q,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
1
+ import{l as ct,a as dt,m as mt,j as E}from"./liveblocks-B2D23g1h.js";import lt from"./NotFoundScreen-DF585FcE.js";import{a as k}from"./sentry-BQ1KU1t3.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as O}from"./core-FEzHdTwu.js";import{cu as St,fH as Y,eX as H,fV as bt,fO as b,SZ as J,fR as m,fG as y,so as M,xX as It,S_ as Ct,fF as Tt,fX as yt,st as _t,S$ as $,bo as F,fz as w,sx as W,T0 as At,cG as Et,cz as Nt}from"./zeni-epic-state-Bxb-N0Vf.js";import{Z as xt,z as Bt,C as wt,U as Rt,a0 as Gt,cY as Ut,q as N,a9 as Dt,cZ as vt,aa as Pt,p as $t}from"./index-pXx5w7oJ.js";import"./mui-C754KMjM.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-Be2oPcqW.js";import"./recharts-CIXkvtnT.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.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]="e4062c2f-2da2-4a5d-8a41-655d4413d237",t._sentryDebugIdIdentifier="sentry-dbid-e4062c2f-2da2-4a5d-8a41-655d4413d237")}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=Y(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,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(W("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,d)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){d==="unread"&&(x(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(J(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 R?.()},onUpdateNotificationStatus:(a,o,d,c)=>{a==="tasks"?t(W("task_manager",d,c)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{d==="read"&&(x(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(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t($(s,F())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(m({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({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}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>Y(e)),o=S(e=>H(e)),{useFeatureGate:d}=wt(),{isFeatureEnabled:c}=d(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const K=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),G=S(e=>b(e).currentSubTab),Q=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:z,isLoading:X,fetchMore:q,isFetchingMore:L,hasFetchedAll:Z}=dt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(J(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Q.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"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&X===!1&&B!=null&&z!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=z.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||Z===!0||q==null||q(),null)}).filter(f=>f!=null);s(m({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,L,C,Z,X,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];G==="all"?A.push("read","unread"):G!=="mentions"&&A.push(G),s(M("task_manager",T,A,!0))}}}},nt=mt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:K,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(O,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(O,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
@@ -0,0 +1 @@
1
+ import{j as f}from"./liveblocks-B2D23g1h.js";import{a as r}from"./sentry-BQ1KU1t3.js";import{u as T,g as A,j as o,N as j}from"./core-FEzHdTwu.js";import{Ml as C,eX as P,fN as x,Mm as z,Mn as D,Mo as L,Mp as N,o9 as R,Li as k}from"./zeni-epic-state-Bxb-N0Vf.js";import{z as h,J as I}from"./index-pXx5w7oJ.js";import"./mui-C754KMjM.js";import"./recharts-CIXkvtnT.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.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]="a15da9d2-9365-47e6-9bc9-5a91e1673b7a",n._sentryDebugIdIdentifier="sentry-dbid-a15da9d2-9365-47e6-9bc9-5a91e1673b7a")}catch{}})();function ee(){const n=T(),a=A(),{params:t,error:i}=r.useMemo(()=>C(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=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),y=o(z),b=o(D),u=o(L),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(N())},[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&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(s.userId,s.zeniSessionId??void 0))))},[p,s,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const M=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(U=>U.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),c=v??M;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&s!=null&&c!=null&&n(k(s.userId,s.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(j,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -1 +1 @@
1
- import{j as n}from"./liveblocks-4PIBJMyE.js";import{h as z,u as H,g as K,i as Q,j as d,n as X,o as Z,p as I}from"./core-Ca6G0voE.js";import{eX as U,sc as P,rM as J,MP as v,rH as S,bs as ee,bn as ae,bY as te,rI as se,MQ as oe,MC as C,dK as re,vR as ne,MR as ie,wc as ce,fE as le,fC as de}from"./zeni-epic-state-BIxjj87B.js";import{z as me,_ as fe,a0 as pe,j as ue,C as O,U as w,x as he,e as $,ap as ge,s as Fe}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import be from"./NotFoundScreen-C4hj38o6.js";import{F as Ie}from"./FeaturePreviewScreen-CPre8DhJ.js";import{a as g}from"./sentry-CXcgkCeA.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CSLK93Wz.js";import{u as Se}from"./useInitialThreadRequest-B6-oXb8Z.js";import{t as Te}from"./routePaths-BumbtdKN.js";import{M as ye}from"./MobileAppDrawer-CNkPd-0r.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="aa6b3d09-552f-41a9-9ed1-6e2256a33eff",s._sentryDebugIdIdentifier="sentry-dbid-aa6b3d09-552f-41a9-9ed1-6e2256a33eff")}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})}},xe=X(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},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 M(){const s=z(),e=H(),a=K(),{forecastId:o,tenantEmailDomain:r}=Q(),[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=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),k=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:N}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(J());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(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&&!k(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,S,F]);const D=ue(),W=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:q}=O(),{isFeatureEnabled:j}=q(w.isReportsCommentingEnabled),G=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[Y,V]=g.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:E}),n.jsx(xe,{firstMonthOfFY:_,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:k,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:W,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ve(){const s=d(i=>U(i)),{useFeatureGate:e}=O(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Z,{children:[n.jsx(I,{path:"/",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
1
+ import{j as n}from"./liveblocks-B2D23g1h.js";import{h as z,u as Z,g as H,i as K,j as d,n as X,o as J,p as I}from"./core-FEzHdTwu.js";import{eX as P,sc as U,rM as Q,MS as v,rH as S,bs as ee,bn as ae,bY as te,rI as se,MT as oe,MF as C,dK as re,vU as ne,MU as ie,wf as ce,fE as le,fC as de}from"./zeni-epic-state-Bxb-N0Vf.js";import{z as me,Z as fe,a0 as pe,j as ue,C as O,U as w,x as he,d as $,ap as Fe,q as ge}from"./index-pXx5w7oJ.js";import"./mui-C754KMjM.js";import be from"./NotFoundScreen-DF585FcE.js";import{F as Ie}from"./FeaturePreviewScreen-rsKGOKMt.js";import{a as F}from"./sentry-BQ1KU1t3.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-Be2oPcqW.js";import{u as Se}from"./useInitialThreadRequest-qt3qTzlR.js";import{t as Te}from"./routePaths-x0riE4xM.js";import{M as ye}from"./MobileAppDrawer-C4Qb7oTx.js";import"./recharts-CIXkvtnT.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.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]="83a745bf-954e-41ee-a85b-599601ceab53",s._sentryDebugIdIdentifier="sentry-dbid-83a745bf-954e-41ee-a85b-599601ceab53")}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})}},xe=X(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},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=ge(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("../../")}}})(Fe);function M(){const s=z(),e=Z(),a=H(),{forecastId:o,tenantEmailDomain:r}=K(),[i,p]=F.useState(!1),[m,u]=F.useState(!1),h=me.getSignedInUser(),y=d(t=>P(t)),q=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>U(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),k=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:N}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect(()=>{if(!i&&g)p(!0),l||e(Q());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(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&&!k(c.forecasts[t].id)&&g&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,U,S,g]);const D=ue(),W=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=O(),{isFeatureEnabled:j}=_(w.isReportsCommentingEnabled),G=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[Y,V]=F.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:E}),n.jsx(xe,{firstMonthOfFY:q,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:k,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:W,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ve(){const s=d(i=>P(i)),{useFeatureGate:e}=O(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
@@ -0,0 +1,22 @@
1
+ import{j as a}from"./liveblocks-B2D23g1h.js";import{MO as ne,eX as Y,kx as z,fE as X,fC as oe,Kg as J,Ms as ie,uR as ke,MP as N,uG as Ee,u$ as Pe,uV as re,uK as le,uZ as je,uW as ve,MQ as de,wG as Le,fo as Te,ge as Re,MR as K,uO as ce,uN as pe,v2 as Oe,c6 as Ae}from"./zeni-epic-state-Bxb-N0Vf.js";import{K as ue,C as ee,U as M,z as W,i as me,R as ge,G as fe,al as he,am as Fe,E as Ce,o as F,I as ye,a as be,an as Ve,Z as Ze,a0 as Ue,x as Be,d as Se,f as $e,q as Ge,ao as Ke,j as Me}from"./index-pXx5w7oJ.js";import{D as we,n as q,S as xe}from"./mui-C754KMjM.js";import se from"./NotFoundScreen-DF585FcE.js";import{a as d}from"./sentry-BQ1KU1t3.js";import{u as ae,i as He,j as g,h as _e,g as ze,n as We,o as te,p as G}from"./core-FEzHdTwu.js";import{u as qe}from"./useAskAiCfoHostNavButtonProps-Be2oPcqW.js";import{M as Qe}from"./MobileAppDrawer-C4Qb7oTx.js";import"./recharts-CIXkvtnT.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.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]="2d6ca540-8147-4c02-980c-f2b6f7d6896d",e._sentryDebugIdIdentifier="sentry-dbid-2d6ca540-8147-4c02-980c-f2b6f7d6896d")}catch{}})();const Ne={overlayWidth:new Ce(100,100,48)},H=be.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=ue(),m=ae(),[V,Z]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=He(),r=g(l=>ne(l)),p=g(l=>Y(l)),E=g(l=>z(l)),{useFeatureGate:D}=ee(),{isFeatureEnabled:I}=D(M.isDebitCardFeatureEnabled),P=X(I,p),L=oe(p),T=J(p),U=ie(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(N()),b()},R=()=>{V===!0?S(!0):C()},$=c.companyView?.controllers?.map(l=>l.user),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=D(M.isChargeCardFeatureEnabled),v=me(p,j,I),{isCardsHidden:O}=ge(p?.tenantId),y=!v||O,A=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(le(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(re({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?Ee(e):Pe(T))},onCloseClick:R,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return d.useEffect(()=>{x===!1&&w!=null&&m(ke(w))},[x,w]),d.useEffect(()=>{r.updatePersonState.fetchState==="Completed"&&C()},[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:R,children:a.jsxs(Xe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(he,{titleComponent:a.jsx(De,{children:H.discardTitle}),descriptionComponent:a.jsx(Ie,{children:H.discardDescription}),primaryButtonText:H.discard,secondaryButtonText:H.no,action:o,isEditPopup:!0}):null,a.jsx(Fe,{...s})]})})},Xe=q(xe)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,De=q(ye.H6Regular)`
6
+ margin-top: ${F.sp7};
7
+ padding-left: ${F.sp8};
8
+ padding-right: ${F.sp8};
9
+ color: ${e=>e.theme.colors.primary};
10
+ word-break: break-word;
11
+ `,Ie=q(ye.LargeRegularSp)`
12
+ color: ${e=>e.theme.colors.hero};
13
+ padding-left: ${F.sp8};
14
+ padding-right: ${F.sp8};
15
+ margin-bottom: 30px;
16
+ margin-top: ${F.sp4};
17
+ white-space: pre-line;
18
+ `,Je={overlayWidth:new Ce(100,100,48)},_=be.getLocalizedStrings().peoplePage.invitePage,ea=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=ue(),m=ae(),[V,Z]=d.useState(!1),[k,S]=d.useState(!1),w=g(o=>ne(o)),r=g(o=>Y(o)),p=g(o=>z(o)),{useFeatureGate:E}=ee(),{isFeatureEnabled:D}=E(M.isDebitCardFeatureEnabled),I=X(D,r),P=oe(r),L=J(r),T=ie(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(N())},C=()=>{V===!0?S(!0):x()},R={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map(o=>o.user),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(M.isChargeCardFeatureEnabled),v=me(r,j,D),{isCardsHidden:O}=ge(r?.tenantId),y=!v||O,A=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:o=>{m(re({peopleLocalData:o})),Z(!0)},onResetClick:x,onSaveClick:()=>{m(f==="zeni_only"?je(e):ve())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:A===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:B};return d.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(N()))},[w.invitePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(aa,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(he,{titleComponent:a.jsx(De,{children:_.discardTitle}),descriptionComponent:a.jsx(Ie,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:R}):null,a.jsx(Ve,{...s})]})})},aa=q(xe)`
19
+ display: flex;
20
+ min-height: 100%;
21
+ flex-direction: column;
22
+ `,sa=We(function(e,t){const c=de(e),n=W.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(e),analytics:Se}},function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(le(i,b))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(ce()),e(pe(n,f))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(K({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(K({searchText:i}))}}}})(Ke);function Q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=_e(),n=ae(),f=ze(),{areTenantIdsInSync:i}=Ze(),b=W.getSignedInUser(),h=g(s=>Y(s)),{useFeatureGate:m}=ee(),{isFeatureEnabled:V}=m(M.isDebitCardFeatureEnabled),Z=g(s=>z(s)),k=!X(V,h)&&Z,S=J(h),w=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=d.useState(!1),[D,I]=d.useState(!1),[P,L]=d.useState(!1),[T,U]=d.useState("off"),[B,x]=d.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:$}=qe({mobileExploreReferrer:"People"}),u=g(s=>de(s));Ue({isDataReady:u.fetchState==="Completed"});const j=g(s=>Le(s.classState,s.classListState)),v=g(s=>Te(s.userState,s.userRoleState,s.userListViewState,"manager")),O=g(s=>Re(s)),y=h?.companyId;d.useEffect(()=>{p&&T===u.uiState.mode||!i||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(ce()))},[p,b,w,n,u.uiState.mode,i]),d.useEffect(()=>{y!=null&&i&&n(pe(y,k))},[y,k,i]),d.useEffect(()=>{I(e!=null&&e===!0),L(t!=null&&t===!0&&t)},[e,t]),d.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const A=()=>{I(!1),L(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(Be,{analytics:Se,onLoad:s=>s.trackPageLoaded($e.Event.members)}):null,D===!0?a.jsx(ea,{closeDrawerHandler:A,isInvitePeopleDrawerOpen:D,managersListView:v,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Ye,{closeDrawerHandler:A,isEditPeopleDrawerOpen:P,managersListView:v,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Qe,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),a.jsx(sa,{navigate:c,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:v,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(K({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=Ge(f.state?.pathnameStackToGoBack,f.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:R,onAskAiCfoClick:$})]})}function wa(){const e=Me();return Ae(e?.loggedInUserRole??[])?a.jsxs(te,{children:[a.jsx(G,{path:"/",element:a.jsx(Q,{})}),a.jsx(G,{path:"new",element:a.jsx(Q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(G,{path:":userId/edit",element:a.jsx(Q,{isEditPeopleDrawerOpen:!0})}),a.jsx(G,{path:"*",element:a.jsx(se,{})})]}):a.jsx(te,{children:a.jsx(G,{path:"*",element:a.jsx(se,{})})})}export{wa as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-B2D23g1h.js";import E from"./NotFoundScreen-DF585FcE.js";import{a as r}from"./sentry-BQ1KU1t3.js";import{h as _,g as v,j as p,i as M,u as U,N as z,n as P,o as O,p as h}from"./core-FEzHdTwu.js";import{eX as B,T1 as b,bq as F,bn as N,ie as V,fz as q}from"./zeni-epic-state-Bxb-N0Vf.js";import{v as X,z as I,a0 as $,c_ as G}from"./index-pXx5w7oJ.js";import"./mui-C754KMjM.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-Be2oPcqW.js";import{M as J}from"./MobileAppDrawer-C4Qb7oTx.js";import"./recharts-CIXkvtnT.js";import"./analytics-BY30ztud.js";import"./plaid--k8gbxl0.js";import"./dnd-Cb_vPZwC.js";import"./stripe-DMRn4zHo.js";import"./lottie-BKshFrBj.js";import"./lexical-fJeYHrZP.js";import"./pdf-BSvba1pn.js";import"./utils-C8oTXAPM.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]="7d85c5e2-ffa8-4445-98ca-5087483a0d15",e._sentryDebugIdIdentifier="sentry-dbid-7d85c5e2-ffa8-4445-98ca-5087483a0d15")}catch{}})();const K=P(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=X(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=M(),u=U(),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(q({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 $({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(z,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{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-CXcgkCeA.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-BQ1KU1t3.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-4PIBJMyE.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CXcgkCeA.js";import{L as dt,bY as Tc,eX as Ac,LV as Rc,Mn as kl,c6 as Tl,g0 as Al,g1 as Rl}from"./zeni-epic-state-BIxjj87B.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-DFP_hVXq.js";import{r as un}from"./empty-uy3M1msm.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DyNMbFeB.js";import{r as Gl}from"./index-Dcmv7y8l.js";import{r as zl}from"./index-D3FowIif.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-Ca6G0voE.js";import{u as Kl,z as Pc,L as Wl,O as Jl,Q as Xl,k as Ql,e as tf}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import{d as Pe}from"./decodeURIComponentSafe-BMcEUj25.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]="4b4c349c-fe8f-4796-a523-53b1e1868fad",t._sentryDebugIdIdentifier="sentry-dbid-4b4c349c-fe8f-4796-a523-53b1e1868fad")}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-B2D23g1h.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-BQ1KU1t3.js";import{L as dt,bY as Tc,eX as Ac,LY as Rc,Mq as kl,c6 as Tl,g0 as Al,g1 as Rl}from"./zeni-epic-state-Bxb-N0Vf.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-C8oTXAPM.js";import{r as un}from"./empty-C5RcOwbi.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DwZXgIAK.js";import{r as Gl}from"./index-CVniyevN.js";import{r as zl}from"./index-C7vi0ZZK.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-FEzHdTwu.js";import{u as Kl,z as Pc,L as Wl,M as Jl,O as Xl,h as Ql,d as tf}from"./index-pXx5w7oJ.js";import"./mui-C754KMjM.js";import{d as Pe}from"./decodeURIComponentSafe-_VO6ySKg.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]="eda82522-d7e1-4bd8-a805-2bcc885356ae",t._sentryDebugIdIdentifier="sentry-dbid-eda82522-d7e1-4bd8-a805-2bcc885356ae")}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-B2D23g1h.js";import{a as o}from"./sentry-BQ1KU1t3.js";import{j as f,h as F,u as H,g as V,n as K}from"./core-FEzHdTwu.js";import{y as N,K as W,z as P,bg as _,E as M,Z as U,a0 as $,x as q,d as l,f as z,a9 as X,bh as Z}from"./index-pXx5w7oJ.js";import{fI as G,eX as J,Pp as R,Pq as Q,vK as Y,vA as g,fK as ee,bS as ae,vF as re,Pr as ne}from"./zeni-epic-state-Bxb-N0Vf.js";import{D as te,e as se,n as oe,S as ie}from"./mui-C754KMjM.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-Be2oPcqW.js";import{M as de}from"./MobileAppDrawer-C4Qb7oTx.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]="205daaab-ce25-42d6-a6f7-d2236750b8fc",e._sentryDebugIdIdentifier="sentry-dbid-205daaab-ce25-42d6-a6f7-d2236750b8fc")}catch{}})();const ce={overlayWidth:new M(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=N(),n=W();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>G(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(_,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,I="refer-and-earn-status-update",pe=K(function(e){const a=R(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(X(Z));function ye({isReferralDrawerOpen:e}){const a=F(),r=H(),n=V(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),p=P.getSignedInUser(),C=f(t=>J(t)),v=f(t=>R(t)),b=v.fetchState,w=f(t=>t.referralViewState.rewardsPlanFetchState),m=Q([v,w]),{areTenantIdsInSync:c}=U();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(r(Y()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),r(g(!0)))},[b,r,c]),o.useEffect(()=>{!d&&w.fetchState==="Not-Started"&&c&&(x(!0),r(ee(!0)))},[w,r,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),y=t=>{A(t)},{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=le({mobileExploreReferrer:"Rewards"});$({isDataReady:m===!0});const O={events:p?.userId!=null?[`private-encrypted-${p.userId}.${I}`]:[],eventCallback:(t,S,L)=>{L.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[m===!0?s.jsx(q,{analytics:l,onLoad:t=>(S=>{p!=null&&S.trackPageLoaded(z.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:y}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(pe,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B,...O})]})}export{ye as R};
@@ -1 +1 @@
1
- import{j as r}from"./liveblocks-4PIBJMyE.js";import O from"./NotFoundScreen-C4hj38o6.js";import{a as p}from"./sentry-CXcgkCeA.js";import{h as A,g as x,u as C,j as u,N as D,n as k,o as W,p as g}from"./core-Ca6G0voE.js";import{eX as E,Qg as b,Qw as S,FC as V,EL as U,FB as d,Fs as B,QJ as L,FE as _}from"./zeni-epic-state-BIxjj87B.js";import{z as N,a9 as $,b$ as Q,ag as T,bE as z,c0 as J}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import{u as K,R as I}from"./ReimbursementApprovalRuleDetailScreen-CGou3dCd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="d6bf0d1f-456c-4b46-9c34-8ad07c47a6ef",e._sentryDebugIdIdentifier="sentry-dbid-d6bf0d1f-456c-4b46-9c34-8ad07c47a6ef")}catch{}})();const y="reimbursement-approval-rule-update",X=k(function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(L(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})($(Q)),q=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>E(a)),c=u(a=>b(a)),v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,F,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(X,{currentTenant:l,location:s,navigate:o,...R})},j="reimbursement-approval-rule-update",G=k(function(e){const o=b(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(L(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(_(t,!0))}}})($(J)),H=()=>{const e=u(n=>E(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(q,{isLoading:s})},M=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>E(a)),c=u(a=>b(a));K();const v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,F,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(G,{currentTenant:l,location:s,navigate:o,isLoading:e,...R})};function oe(){return r.jsxs(W,{children:[r.jsx(g,{path:"/",element:r.jsx(H,{})}),r.jsx(g,{path:"/new",element:r.jsx(I,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(I,{})}),r.jsx(g,{path:"*",element:r.jsx(O,{})})]})}export{oe as R};
1
+ import{j as r}from"./liveblocks-B2D23g1h.js";import O from"./NotFoundScreen-DF585FcE.js";import{a as p}from"./sentry-BQ1KU1t3.js";import{h as A,g as x,u as C,j as u,N as D,n as k,o as W,p as g}from"./core-FEzHdTwu.js";import{eX as E,Qj as b,Qz as S,FF as V,EO as U,FE as d,Fv as $,QM as B,FH as _}from"./zeni-epic-state-Bxb-N0Vf.js";import{z as N,a9 as L,b$ as Q,ag as T,bE as z,c0 as H}from"./index-pXx5w7oJ.js";import"./mui-C754KMjM.js";import{u as K,R as I}from"./ReimbursementApprovalRuleDetailScreen-lqMGwwjC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="a1723cb0-164c-4fd8-856a-69a2e5e3e559",e._sentryDebugIdIdentifier="sentry-dbid-a1723cb0-164c-4fd8-856a-69a2e5e3e559")}catch{}})();const y="reimbursement-approval-rule-update",M=k(function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})(L(Q)),X=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>E(a)),c=u(a=>b(a)),v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,F,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(M,{currentTenant:l,location:s,navigate:o,...R})},j="reimbursement-approval-rule-update",q=k(function(e){const o=b(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(_(t,!0))}}})(L(H)),G=()=>{const e=u(n=>E(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(X,{isLoading:s})},J=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>E(a)),c=u(a=>b(a));K();const v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,F,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:l,location:s,navigate:o,isLoading:e,...R})};function oe(){return r.jsxs(W,{children:[r.jsx(g,{path:"/",element:r.jsx(G,{})}),r.jsx(g,{path:"/new",element:r.jsx(I,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(I,{})}),r.jsx(g,{path:"*",element:r.jsx(O,{})})]})}export{oe as R};