@zeniai/web-app-ui 5.3.29-dev → 5.3.29-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-CDcb3dR7.js → AccountMappingScreen-Bim1Hr_z.js} +1 -1
- package/dist/assets/AddressRoutes-CdDnkC-7.js +1 -0
- package/dist/assets/{AddressScreen-KciR_hsZ.js → AddressScreen-Dyq7f1j-.js} +1 -1
- package/dist/assets/{AiCfoScreen-CL9wzpIP.js → AiCfoScreen-BAtt2kQC.js} +1 -1
- package/dist/assets/{AppDrawer-CBFgx_xO.js → AppDrawer-BGKn6F8p.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DmmLz8dY.js → BillPayApprovalRoutes-Cf5w1Fd_.js} +1 -1
- package/dist/assets/{BillPayRoutes-C_uGbX5e.js → BillPayRoutes-DDeK4O3Z.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CBOgxA4z.js → BusinessVerificationPageScreen-BhpdMjkc.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-B8SHn0bs.js → CardsAiCfoScreen-BmeTr_5u.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-Dkpm3e49.js → ChargeCardRoutes-Y_ZnY6a9.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-C-SlqPHT.js → CompanyPassportScreen-BChXj6Kk.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-IHk0kFrL.js → ConnectionAuthScreen-DboT0gK7.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-C9C7O3K1.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BRdsXEtS.js → CustomerOnboardingRoutes-CRNi6Rqr.js} +1 -1
- package/dist/assets/{DashboardRoutes-CLhCpuhB.js → DashboardRoutes-CzNNddHy.js} +1 -1
- package/dist/assets/{DefaultTenantHome-Btkw8Ap3.js → DefaultTenantHome-CmugmZX7.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-Dzk5sa_d.js → DomesticWireDetailScreen-C2hFGwu0.js} +1 -1
- package/dist/assets/{DrawerScreen-Cq2VoXGn.js → DrawerScreen-lK0vJxIS.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CTolGUo8.js → EntityDetailRoutes-BSm0QeV6.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-Dsuu9sFZ.js → ExpenseAutomationRoutes-CVR_qG3c.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-h7p9MMUf.js → FeaturePreviewScreen-CVnp0bZd.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-BTzQvozK.js → HubSpotOAuthCallbackScreen-Ck10qQ6V.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-Y2y35nP6.js → InboxNotificationsProvider-MlM0K3gF.js} +1 -1
- package/dist/assets/{InvoicingRoutes-MDlqxyil.js → InvoicingRoutes-Q8vi5u3U.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CP3vqiHe.js → MagicLinkRoutes-B3omwZ45.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BMClM24d.js → MagicLinkSignInScreen-D8Vs7E-F.js} +1 -1
- package/dist/assets/{MobileAppDrawer-DLiH8K3Y.js → MobileAppDrawer-DigqZbbY.js} +1 -1
- package/dist/assets/NotFoundScreen-C_nzijM_.js +1 -0
- package/dist/assets/{NotificationRoutes-Dhiufflf.js → NotificationRoutes-DKgxAwSp.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-Ca-lx4xM.js → OAuthConsentScreen-DY5NR4TR.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-aW5WT5CH.js → PandLWithForecastRoutes-5el-0Lj7.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-C2OZJlFd.js → PaymentLinkScreen-fA05KlxQ.js} +1 -1
- package/dist/assets/{PeopleRoutes-B2NEnvyj.js → PeopleRoutes-DJYa775V.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DphKMt6B.js → PerformanceRoutes-CrDIRhB1.js} +1 -1
- package/dist/assets/{Preview-BeiBQxK-.js → Preview-CzyJ4PGQ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-O0kY1C3B.js → QBOConnectionScreen-ByKxBz2v.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-Dzvw2fZr.js → ReimbursementApprovalRoutes-CGtOCJ7F.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BaxtZSL2.js → ReimbursementApprovalRuleDetailScreen-CuE7ORwk.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DmbcBT5E.js → ReimbursementRoutes-6nUym5eB.js} +1 -1
- package/dist/assets/{ReportsRoutes-BQmYqXvS.js → ReportsRoutes-s2hJ2RsR.js} +1 -1
- package/dist/assets/{RewardsRoutes-DvgOSJy0.js → RewardsRoutes-C-di4Yoz.js} +1 -1
- package/dist/assets/{ScreenRoutes-D76vOiPC.js → ScreenRoutes-BhCi8qGV.js} +2 -2
- package/dist/assets/{SettingsRoutes-DNrMSB0r.js → SettingsRoutes-AaNqIdby.js} +1 -1
- package/dist/assets/{SetupPagesScreen-28K-Ej_i.js → SetupPagesScreen-BgHIeOKB.js} +1 -1
- package/dist/assets/{SignInScreen-JKxT9Chm.js → SignInScreen-DCTVuESb.js} +1 -1
- package/dist/assets/{SignOutScreen-DkhnXWYi.js → SignOutScreen-Dl74ZT33.js} +1 -1
- package/dist/assets/{TaskListScreen-D13comxS.js → TaskListScreen-D4isBRlx.js} +1 -1
- package/dist/assets/{TaskRoutes-BOftPZQw.js → TaskRoutes-BWLw4wFO.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-BLhI-0B0.js +1 -0
- package/dist/assets/{TransactionDetailScreen-B1_fDc_7.js → TransactionDetailScreen-IKPgPc-W.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DQwcR30R.js → TransactionListRoutes-Bu8kgDQQ.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Dnwm_7bw.js → TreasuryRoutes-CZBiOy69.js} +1 -1
- package/dist/assets/{VendorsRoutes-BCbNpFFW.js → VendorsRoutes-KMa9llQ2.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-mPs6_3sL.js → WiseConfirmationScreen-tpmS2fpR.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-CQnM-9GW.js → ZeniAccountRoutes-DpPln-Iv.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-CTIued6H.js → ZeniAccountStatementScreen-C_X33S2u.js} +1 -1
- package/dist/assets/{accountMappingHelper-CJgy_TdU.js → accountMappingHelper-BIF4Ld_b.js} +1 -1
- package/dist/assets/{analytics-drf9tsEq.js → analytics-B5-t19F2.js} +1 -1
- package/dist/assets/{analyticsHelper-CDqT9wg1.js → analyticsHelper-5kEw8e8E.js} +1 -1
- package/dist/assets/{core-OUhaP0nM.js → core-C5rVvNoh.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CoJI0rbl.js → decodeURIComponentSafe-ChlmY296.js} +1 -1
- package/dist/assets/{dnd-XtKnRPbJ.js → dnd-DqvXOfHm.js} +1 -1
- package/dist/assets/{empty-CJaMNnL0.js → empty-BTHEbwNZ.js} +1 -1
- package/dist/assets/{empty-DC6SKf2K.js → empty-D5lwiblX.js} +1 -1
- package/dist/assets/{emptyVideoElement-b-LZRj6t.js → emptyVideoElement-I-9RXuP2.js} +1 -1
- package/dist/assets/{epic-Cg0CX13O.js → epic-DYPr57kS.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-DlI9q6Vn.js → expenseAutomationHelper-DT3oLJj6.js} +1 -1
- package/dist/assets/{getLocaleForTenant-aTGgtilb.js → getLocaleForTenant-DQ9OiUn_.js} +1 -1
- package/dist/assets/{index-BjnriIg-.js → index-BTTzX8oM.js} +8 -8
- package/dist/assets/{index-Ic-s4E7h.js → index-Bue9AeKl.js} +1 -1
- package/dist/assets/{index-DmRkUvqd.js → index-CGyxP256.js} +1 -1
- package/dist/assets/{index-B1OJLTM8.js → index-CZcqif3N.js} +2 -2
- package/dist/assets/{index-9ur6Fy2d.js → index-CibO_KMz.js} +1 -1
- package/dist/assets/{index-DkPv0SRW.js → index-DCp3lIjg.js} +1 -1
- package/dist/assets/{index-DWbw7UWG.js → index-DMhoHJcD.js} +1 -1
- package/dist/assets/{index-BEdQXZ7l.js → index-De1cB3Ka.js} +1 -1
- package/dist/assets/{lexical-cGeYDtsl.js → lexical-BO1ifV0W.js} +1 -1
- package/dist/assets/{liveblocks-QA8yK6T_.js → liveblocks-BhGApeF9.js} +1 -1
- package/dist/assets/{lottie-DaBLQBPb.js → lottie-CSUQXsXJ.js} +1 -1
- package/dist/assets/{mui-BtZD__8k.js → mui-AVx3Hg0F.js} +1 -1
- package/dist/assets/{pathToGoBack-C7Q0VFSf.js → pathToGoBack-CW7sD0XS.js} +1 -1
- package/dist/assets/{pdf-BMGNA2GO.js → pdf-B6tAgCXh.js} +3 -3
- package/dist/assets/{pdf-lib-BukwiyrA.js → pdf-lib-u-Ml-CIk.js} +1 -1
- package/dist/assets/{plaid-Bbika4Gn.js → plaid-BuoWWOAj.js} +1 -1
- package/dist/assets/{pusher-9ZM5Kdsl.js → pusher-D8sdZANA.js} +1 -1
- package/dist/assets/{react-Cvhq9zob.js → react-BslW5-Xl.js} +1 -1
- package/dist/assets/{react-SMF3sABx.js → react-DAMRot7g.js} +1 -1
- package/dist/assets/{react-BbnUu-8y.js → react-DbafCI99.js} +1 -1
- package/dist/assets/{react-DyjJC6aa.js → react-DzRqKqJZ.js} +1 -1
- package/dist/assets/{react-_5p9PyE0.js → react-Sh9CA0od.js} +1 -1
- package/dist/assets/{react-B7VQZShg.js → react-q70XtbNu.js} +1 -1
- package/dist/assets/{recharts-CnI5kYGO.js → recharts-uwVP8vj-.js} +1 -1
- package/dist/assets/{routePaths-Cz-sxWeK.js → routePaths-Cx9L8hBM.js} +1 -1
- package/dist/assets/{sentry-DX8X0N2R.js → sentry-B98sAG37.js} +1 -1
- package/dist/assets/{url-DKOm_9Da.js → url-RaJlDbzw.js} +1 -1
- package/dist/assets/{url-DEE9M609.js → url-qe19dJXu.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CCxuDvI3.js → useAiCfoDashboardSuggestedQuestionsChips-C7_zR2C_.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-B4mPUD91.js → useAskAiCfoHostNavButtonProps-Ddvy6nOQ.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-u2vXo3UU.js → useChargeCardPusherEvents-XPXgI-Bx.js} +1 -1
- package/dist/assets/{useDeviceId-Bunv1-ta.js → useDeviceId-6INyJgde.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-DRqxGzlR.js → useEmailConnectResultRefresh-98NnzJRh.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BR_6LodZ.js → useInitialThreadRequest-DuL5mYzq.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-3mEVnK_N.js → useTaskManagerAccess-vcnpqvQT.js} +1 -1
- package/dist/assets/{utils-CHDSUF0P.js → utils-B1bcOxs7.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DRyJqOb1.js → withTransactionSidePanel-F28FfzEK.js} +1 -1
- package/dist/assets/{zeni-epic-state-DzFY1eNZ.js → zeni-epic-state-BVExw1ei.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-loJi-MTb.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-9EVdL7z6.js +0 -1
- package/dist/assets/NotFoundScreen-CBOeKuhG.js +0 -1
- package/dist/assets/TransactionDetailRoutes-Br_-ul_i.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-BhGApeF9.js";import E from"./NotFoundScreen-C_nzijM_.js";import{a as r}from"./sentry-B98sAG37.js";import{h as _,g as v,j as p,i as M,u as U,N as P,l as z,n as B,o as h}from"./core-C5rVvNoh.js";import{fB as O,a0d as b,bo as F,bn as N,iI as V,gd as q}from"./zeni-epic-state-BVExw1ei.js";import{_ as L,z as I,aq as $,dL as G}from"./index-BTTzX8oM.js";import"./mui-AVx3Hg0F.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-Ddvy6nOQ.js";import{M as J}from"./MobileAppDrawer-DigqZbbY.js";import"./recharts-uwVP8vj-.js";import"./analytics-B5-t19F2.js";import"./plaid-BuoWWOAj.js";import"./dnd-DqvXOfHm.js";import"./stripe-cKAAJElX.js";import"./lottie-CSUQXsXJ.js";import"./lexical-BO1ifV0W.js";import"./pdf-B6tAgCXh.js";import"./utils-B1bcOxs7.js";import"./InboxNotificationsProvider-MlM0K3gF.js";import"./useTaskManagerAccess-vcnpqvQT.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]="f4a2f384-abaa-4a7f-80f2-d920a4fe50ce",e._sentryDebugIdIdentifier="sentry-dbid-f4a2f384-abaa-4a7f-80f2-d920a4fe50ce")}catch{}})();const K=z((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(G),Q=()=>{const e=_(),t=v(),d=L(),o=p((a=>O(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,c=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);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"||c(a,i,!0),f.current=!0}),[n?.fetchState,c]),j=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=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:d,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${m}/dashboard`,replace:!0})};function he(){return s.jsxs(B,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as a}from"./sentry-
|
|
1
|
+
import{a as h,R as a}from"./sentry-B98sAG37.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`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:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-BhGApeF9.js";import{p as Q,d as kc,c as an,g as jl,a as xl}from"./sentry-B98sAG37.js";import{L as dt,b_ as Tc,fB as Ac,Tb as Rc,TY as kl,c7 as Tl}from"./zeni-epic-state-BVExw1ei.js";import{a as lt,b as Al,c as Rl,d as Il,e as un,f as Pl,g as Nl,h as Ll,i as Vt,j as Ic,k as oe,l as je,m as $l,o as Yt,p as ue,q as Ml}from"./utils-B1bcOxs7.js";import{r as cn}from"./empty-BTHEbwNZ.js";import{r as Cl,a as Dl,b as Fl,c as Bl}from"./pdf-lib-u-Ml-CIk.js";import{r as Ul}from"./index-DMhoHJcD.js";import{r as ql}from"./index-CGyxP256.js";import{h as Gl,g as zl,u as Zl,j as _n,l as Hl}from"./core-C5rVvNoh.js";import{u as Vl,z as Pc,L as Yl,ai as Kl,aj as Wl,U as Jl,A as Xl}from"./index-BTTzX8oM.js";import"./mui-AVx3Hg0F.js";import{d as Pe}from"./decodeURIComponentSafe-ChlmY296.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="3088e73b-f45a-4434-94ba-6421d4739e9b",t._sentryDebugIdIdentifier="sentry-dbid-3088e73b-f45a-4434-94ba-6421d4739e9b")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,In,Pn,Nn,Ne,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,zn,Le,Zn,Hn,Vn,Yn,Kn,Wn,Jn,$e,Xn,Qn,to,eo,ro,no,oo,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(jn)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 u(r,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},u(r,e)}function d(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=o(r);if(e){var h=o(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(m,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})(m)})(this,a)}}function o(r){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(r)}jn=1;var c,i,n={};function s(r,e,a){a||(a=Error);var p=(function(h){(function(l,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(y&&y.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),y&&u(l,y)})(g,h);var m,b=d(g);function g(l,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)})(l,y,v)),S.code=r,S}return m=g,Object.defineProperty(m,"prototype",{writable:!1}),m})(a);n[r]=p}function f(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 s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,m;if(c===void 0&&(c=ie()),c(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,l,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-l.length,y)===l})(r," argument"))m="The ".concat(r," ").concat(p," ").concat(f(e,"type"));else{var b=(function(g,l,y){return typeof y!="number"&&(y=0),!(y+l.length>g.length)&&g.indexOf(l,y)!==-1})(r,".")?"property":"argument";m='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(f(e,"type"))}return m+=". Received type ".concat(t(a))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";i===void 0&&(i=lt());var p=i.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),s("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),s("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];c===void 0&&(c=ie()),c(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(m){return'"'.concat(m,'"')})),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 Ql(){if(kn)return xn;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 u(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){d(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 d(k,E,j){return(E=c(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function o(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,c(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function c(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 i(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 s(k){var E=typeof Map=="function"?new Map:void 0;return s=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 f(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},s(k)}function f(k,E,j){return f=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},f.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)}kn=1;var h=lt().inspect,m=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="",l="",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
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-BhGApeF9.js";import W from"./NotFoundScreen-C_nzijM_.js";import{a as p}from"./sentry-B98sAG37.js";import{h as C,g as D,u as V,j as u,N as k,l as U,n as Y,o as g}from"./core-C5rVvNoh.js";import{fB as E,Yh as h,Yy as R,MY as N,MU as B,MX as f,MN as L,YX as M,MR as X,M_ as z}from"./zeni-epic-state-BVExw1ei.js";import{z as T,w as $,c7 as K,l as _,bQ as Q,c8 as q}from"./index-BTTzX8oM.js";import"./mui-AVx3Hg0F.js";import{u as F,R as x}from"./ReimbursementApprovalRuleDetailScreen-CuE7ORwk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="b9167535-79e7-453b-8234-6e937df608da",e._sentryDebugIdIdentifier="sentry-dbid-b9167535-79e7-453b-8234-6e937df608da")}catch{}})();const A="reimbursement-approval-rule-update",G=U((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:R(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(M(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))($(K)),H=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>R(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(N())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!1)))}),[t,S,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(w(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${A}`]:[],eventCallback:(o,y,j)=>{o.endsWith(A)&&j.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(G,{currentTenant:c,location:n,navigate:s,...m})},I="reimbursement-approval-rule-update",J=U((function(e){const s=h(e),n=R(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e(M(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(L(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(z(t,!0))}}}))($(q)),P=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=Q(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(H,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));F();const y=u((i=>R(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(N())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(B(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(X(!1,!0)))}),[v,b,e,a]),T.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${I}`]:[],eventCallback:(i,ee,O)=>{i.endsWith(I)&&O.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(J,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function le(){return r.jsxs(Y,{children:[r.jsx(g,{path:"/",element:r.jsx(P,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(W,{})})]})}export{le as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-BhGApeF9.js";import{a as f}from"./sentry-B98sAG37.js";import{u as U,j as g,h as C,g as O,i as V,l as k}from"./core-C5rVvNoh.js";import{mn as q,Yy as w,Yh as _,MQ as B,N1 as j,MY as A,MZ as E,Yz as N,fB as L,MX as z}from"./zeni-epic-state-BVExw1ei.js";import{z as F,E as P,a5 as $,b_ as Q,l as M,bQ as K,b$ as W}from"./index-BTTzX8oM.js";import"./mui-AVx3Hg0F.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="373a50a5-e6e5-4ffc-9822-8d59ed0cbe98",e._sentryDebugIdIdentifier="sentry-dbid-373a50a5-e6e5-4ffc-9822-8d59ed0cbe98")}catch{}})();function X(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(q({})))}),[p,t,e])}const Z=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=M(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const I=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),R=u.actors.selectedNonUsers.map((m=>{const y=(b=m.value,N(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(R);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(Q);function G(){const e=C(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>_(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(B(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(Z,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return N(e)==null}const H=k((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:_(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=M(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((y=>{const b=y.actorKind?.selectedOption,Y=y.selectedRole?.selectedNonUsers??[];let D=[];b==="role"?D=Y.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=S?.selection.selectedOptions??[];if(R.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(j(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=g((t=>L(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?h.jsx(J,{}):h.jsx(G,{})}function J(){const e=C(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>_(n))),[a,d]=f.useState(!1);if(X(),f.useEffect((()=>{a||(d(!0),s(B(!1)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(H,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,X as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-QA8yK6T_.js";import{u as ae,j as v,h as K,g as Q,i as ie,N as P,l as ee,q as ct,n as dt,o as w}from"./core-OUhaP0nM.js";import{fB as Z,MU as ut,_2 as ge,c7 as he,L_ as Ue,m6 as pt,Md as ce,Mc as de,_3 as bt,bn as fe,gS as _e,_4 as gt,V0 as ht,lX as Me,V1 as Ce,V2 as ft,kJ as St,Y3 as It,kY as yt,LO as Rt,Bv as vt,kQ as At,Mz as Pe,_5 as $e,_6 as Ee,_7 as kt,_8 as Ct,_9 as Et,Mj as we,l2 as wt,Yc as xt,Mb as Bt,LY as Tt,_a as Dt,LX as jt,_b as Ft,M3 as xe,Mn as Lt,Mm as Ut,Mi as _t,_c as Ne,Rx as Mt,bo as Pt,M6 as $t,MR as Nt,_d as Ot,_e as zt,Mv as Gt,Ms as Be,Xz as Vt,LV as Zt,_f as Oe,Ni as Te,Nq as Ht,_g as Wt,_h as Y,_i as qt,_j as ze,_k as Yt,_l as Ge,_m as Ve,MH as ue,bu as Xt,bK as Se,cL as Ie,dV as Ze,dU as He,_n as Qt,gd as Jt,XM as Kt,_o as en,_p as We,XQ as tn,Yy as nn,_q as an,YX as sn,Nn as De,Nm as on,_r as rn,_s as ln,_t as mn,_u as cn,_v as dn,Yi as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cF as fn,ct as Sn,bt as In,Ts as yn,d6 as Rn,d9 as vn,d8 as An,cE as kn}from"./zeni-epic-state-DzFY1eNZ.js";import{bQ as Cn,_ as qe,$ as Ye,O as oe,y as x,z as _,cP as Xe,a6 as re,h as C,aW as je,H as F,ac as se,ad as En,G as Qe,cQ as wn,p as X,aq as Je,cR as xn,V as le,cS as Bn,ao as Tn,a9 as Dn,a5 as ye,Q as Ke,w as jn,by as Fn,at as Ln,ag as Un,E as et,cT as _n,f as Mn}from"./index-BjnriIg-.js";import{n as $,S as Pn}from"./mui-BtZD__8k.js";import pe from"./NotFoundScreen-CBOeKuhG.js";import{S as Fe}from"./SetupPagesScreen-28K-Ej_i.js";import{F as tt}from"./FeaturePreviewScreen-h7p9MMUf.js";import{a as h}from"./sentry-DX8X0N2R.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-B4mPUD91.js";import{u as nt}from"./useInitialThreadRequest-BR_6LodZ.js";import{D as $n}from"./DrawerScreen-Cq2VoXGn.js";import{M as at}from"./MobileAppDrawer-DLiH8K3Y.js";import{F as Nn}from"./ScreenRoutes-D76vOiPC.js";import{R as On}from"./ReimbursementApprovalRoutes-Dzvw2fZr.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.js";import"./BusinessVerificationPageScreen-CBOgxA4z.js";import"./routePaths-Cz-sxWeK.js";import"./analyticsHelper-CDqT9wg1.js";import"./InboxNotificationsProvider-Y2y35nP6.js";import"./useTaskManagerAccess-3mEVnK_N.js";import"./getLocaleForTenant-aTGgtilb.js";import"./ReimbursementApprovalRuleDetailScreen-BaxtZSL2.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]="4f26d643-5218-4539-99cc-46b6898b09ed",e._sentryDebugIdIdentifier="sentry-dbid-4f26d643-5218-4539-99cc-46b6898b09ed")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Qe.getLocalizedStrings(),Gn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},clearRemiSaveStatus:()=>{e(Lt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e($e()),e(Ee({}));const i=st(o),l=X(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Pe(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Le(){const e=K(),t=ae(),n=Q(),{reimbursementId:r}=ie(),c=qe(),d=Ye(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=Q().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>Z(p))),g=v((p=>ge(p,r))),L=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=he(I?.userRole??[]);(function(){const p=ae(),N=v((J=>Z(J))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:H}=Cn(O),W=v((J=>J.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||H||W==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,H,z,W,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Ue(!1,b,y,r)))}));const M=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(P,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Xe,{isNewReimbursement:r==null}):s.jsxs(Vn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Zn,{}):null,m&&d!=="small"?s.jsx(Hn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Wn,{children:[s.jsx(qn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Yn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Vn=$.div`
|
|
1
|
+
import{j as s}from"./liveblocks-BhGApeF9.js";import{u as ae,j as v,h as K,g as Q,i as ie,N as P,l as ee,q as ct,n as dt,o as w}from"./core-C5rVvNoh.js";import{fB as Z,MU as ut,_2 as ge,c7 as he,L_ as Ue,m6 as pt,Md as ce,Mc as de,_3 as bt,bn as fe,gS as _e,_4 as gt,V0 as ht,lX as Me,V1 as Ce,V2 as ft,kJ as St,Y3 as It,kY as yt,LO as Rt,Bv as vt,kQ as At,Mz as Pe,_5 as $e,_6 as Ee,_7 as kt,_8 as Ct,_9 as Et,Mj as we,l2 as wt,Yc as xt,Mb as Bt,LY as Tt,_a as Dt,LX as jt,_b as Ft,M3 as xe,Mn as Lt,Mm as Ut,Mi as _t,_c as Ne,Rx as Mt,bo as Pt,M6 as $t,MR as Nt,_d as Ot,_e as zt,Mv as Gt,Ms as Be,Xz as Vt,LV as Zt,_f as Oe,Ni as Te,Nq as Ht,_g as Wt,_h as Y,_i as qt,_j as ze,_k as Yt,_l as Ge,_m as Ve,MH as ue,bu as Xt,bK as Se,cL as Ie,dV as Ze,dU as He,_n as Qt,gd as Jt,XM as Kt,_o as en,_p as We,XQ as tn,Yy as nn,_q as an,YX as sn,Nn as De,Nm as on,_r as rn,_s as ln,_t as mn,_u as cn,_v as dn,Yi as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cF as fn,ct as Sn,bt as In,Ts as yn,d6 as Rn,d9 as vn,d8 as An,cE as kn}from"./zeni-epic-state-BVExw1ei.js";import{bQ as Cn,_ as qe,$ as Ye,O as oe,y as x,z as _,cP as Xe,a6 as re,h as C,aW as je,H as F,ac as se,ad as En,G as Qe,cQ as wn,p as X,aq as Je,cR as xn,V as le,cS as Bn,ao as Tn,a9 as Dn,a5 as ye,Q as Ke,w as jn,by as Fn,at as Ln,ag as Un,E as et,cT as _n,f as Mn}from"./index-BTTzX8oM.js";import{n as $,S as Pn}from"./mui-AVx3Hg0F.js";import pe from"./NotFoundScreen-C_nzijM_.js";import{S as Fe}from"./SetupPagesScreen-BgHIeOKB.js";import{F as tt}from"./FeaturePreviewScreen-CVnp0bZd.js";import{a as h}from"./sentry-B98sAG37.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-Ddvy6nOQ.js";import{u as nt}from"./useInitialThreadRequest-DuL5mYzq.js";import{D as $n}from"./DrawerScreen-lK0vJxIS.js";import{M as at}from"./MobileAppDrawer-DigqZbbY.js";import{F as Nn}from"./ScreenRoutes-BhCi8qGV.js";import{R as On}from"./ReimbursementApprovalRoutes-CGtOCJ7F.js";import"./recharts-uwVP8vj-.js";import"./analytics-B5-t19F2.js";import"./plaid-BuoWWOAj.js";import"./dnd-DqvXOfHm.js";import"./stripe-cKAAJElX.js";import"./lottie-CSUQXsXJ.js";import"./lexical-BO1ifV0W.js";import"./pdf-B6tAgCXh.js";import"./utils-B1bcOxs7.js";import"./BusinessVerificationPageScreen-BhpdMjkc.js";import"./routePaths-Cx9L8hBM.js";import"./analyticsHelper-5kEw8e8E.js";import"./InboxNotificationsProvider-MlM0K3gF.js";import"./useTaskManagerAccess-vcnpqvQT.js";import"./getLocaleForTenant-DQ9OiUn_.js";import"./ReimbursementApprovalRuleDetailScreen-CuE7ORwk.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]="4f26d643-5218-4539-99cc-46b6898b09ed",e._sentryDebugIdIdentifier="sentry-dbid-4f26d643-5218-4539-99cc-46b6898b09ed")}catch{}})();const st=e=>`/${e}/reimbursements`,zn=e=>h.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},h.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),h.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Qe.getLocalizedStrings(),Gn=ee((function(e,t){const n=t.currentTenant?.companyId,r=bt(e.plaidAccountViewState,"user_reimbursement_account"),c=_.getSignedInUser(),d=fe(c),m=r.plaidConnectionDetails,o=_e(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),b=gt(e,c?.userId??"");let y=`${c?.firstName} ${c?.lastName}`,f=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,f=c?.userId===l.createdBy?.userId);const B=e.entityAutoCompleteState?.autoCompleteText?.common,u=ht(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:B,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:d,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:C,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:f,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Me(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:c,navigate:d,themeState:m}=t,{tenantEmailDomain:o}=r,a=_.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(de(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(xe(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(_t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ut())},clearRemiSaveStatus:()=>{e(Lt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(xe(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(jt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(Dt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Bt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(we(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(xt({data:l}))},onFetchBankName:i=>{e(wt(i))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Ee({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ce({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e($e()),e(Ee({}));const i=st(o),l=X(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e(Pe(n)))},onSaveBankAccount:()=>{a?.userId&&e(At(a?.userId,n))},onFetchLinkTokenClick:i=>{e(vt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(Rt(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(yt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(St({fetchState:"Not-Started"})),e(It())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ft({searchString:i,entityType:l,searchOrigin:"common"})):e(Ce("common"))},onCancelAutoComplete:()=>{e(Ce("common"))}}}}))(wn);function Le(){const e=K(),t=ae(),n=Q(),{reimbursementId:r}=ie(),c=qe(),d=Ye(),[m,o]=h.useState(r==null),[a,i]=h.useState(1),{useFeatureGate:l}=oe(),{isFeatureEnabled:b}=l(x.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(x.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:f}=l(x.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:B,onAskAiCfoClick:u}=Re({mobileExploreReferrer:"Reimbursement Details"}),T=Q().pathname,D=T.includes("edit"),j=T.includes("reimbursement/new"),[A,k]=h.useState(!1),E=_.getSignedInUser(),I=v((p=>Z(p))),g=v((p=>ge(p,r))),L=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=he(I?.userRole??[]);(function(){const p=ae(),N=v((J=>Z(J))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:H}=Cn(O),W=v((J=>J.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||H||W==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,H,z,W,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Ue(!1,b,y,r)))}));const M=v((p=>pt(p.accountState,p.accountListState,"reimbursementAccountList")));if(E==null)throw Error("Can't access address page without signing in...");const R={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(P,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Xe,{isNewReimbursement:r==null}):s.jsxs(Vn,{windowSize:d,children:[s.jsx(re,{analytics:C,onLoad:p=>(N=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&N.trackReimbursementEditReimbursement(r)})(p)}),m&&d!=="small"?s.jsx(Zn,{}):null,m&&d!=="small"?s.jsx(Hn,{children:s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:F.sp3,paddingBottom:"15px",paddingLeft:F.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,m&&d==="small"?s.jsxs(Wn,{children:[s.jsx(qn,{onClick:()=>o(!1),children:s.jsx(zn,{})}),s.jsx(je,{showAutofill:m,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:E?.userId??"",sessionId:E?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(de(p,a,!0,r,E?.userId))},updateInvoiceUploadFetchState:p=>{t(ce({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:F.sp5,paddingRight:F.sp3,paddingBottom:F.sp5,paddingLeft:F.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Yn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:L??void 0,isReimbursementCommentingEnabled:f,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:c,uncategorizedAccounts:M,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:B,onAskAiCfoClick:u})})]})}const Vn=$.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-QA8yK6T_.js";import{g as W,h as De,u as Oe,i as Fe,j as d,l as Ae,n as Pe,o as ee}from"./core-OUhaP0nM.js";import{fB as $,Dr as R,TZ as Ee,lX as le,tx as ce,um as F,lC as Le,lL as A,lD as P,kG as E,kx as L,kw as Me,CB as ie,ur as Be,bq as ve,T_ as Ve,bn as xe,DO as ze,T$ as Ge,U0 as He,ch as S,Cu as Ye,U1 as ae,U2 as qe,U3 as Ne,U4 as $e,U5 as Ze,U6 as Qe,U7 as Xe,U8 as Je,U9 as Ke,Ua as We,Ub as ea,Uc as aa,Ud as sa,Ue as k,Uf as M,Ug as B,Uh as v,Ui as V,Uj as x,Uk as z,Ul as G,Um as H,Un as Y,e8 as ta,Ds as oa,Df as se,Dg as te,Dy as na,Dk as oe,DE as ra,Uo as la,Up as ca,Uq as ia,Ur as da,Us as pa,Ut as _a,Uu as fa,Uv as ma,Uw as ba,Ux as ua,dV as ha,dU as ya}from"./zeni-epic-state-DzFY1eNZ.js";import{al as Ca,am as wa,an as ga,a as Sa,$ as Ia,O as de,y as q,z as pe,ao as Ra,V as Ta,d as ka,ap as ja,aq as Ua,a6 as Da,h as N,Q as Oa,q as Fa,p as _e,ar as Aa,as as Pa,at as Ea}from"./index-BjnriIg-.js";import"./mui-BtZD__8k.js";import La from"./NotFoundScreen-CBOeKuhG.js";import{F as Ma}from"./FeaturePreviewScreen-h7p9MMUf.js";import{a as b}from"./sentry-DX8X0N2R.js";import{u as Ba}from"./useInitialThreadRequest-BR_6LodZ.js";import{t as ne,a as re,b as va}from"./routePaths-Cz-sxWeK.js";import{M as Va}from"./MobileAppDrawer-DLiH8K3Y.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.js";import"./InboxNotificationsProvider-Y2y35nP6.js";import"./useTaskManagerAccess-3mEVnK_N.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]="e94eb7dc-a9d0-40f5-a917-ab08ab03f386",e._sentryDebugIdIdentifier="sentry-dbid-e94eb7dc-a9d0-40f5-a917-ab08ab03f386")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(V({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(B({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ba()),e(ua())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=$(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=Ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(k(a)),(I(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(oa({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=ta(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?va(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(V({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(B({scrollPosition:s}));break;case"cash_flow":e(M({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(V({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=S(t);l?(e(Je({viewMode:a})),e(Ke({viewMode:a}))):r?(e(We({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(k(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(k(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(k(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Qe({classesToFilterOut:a})):e(Xe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e(qe({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e($e({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():Ye()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(He(a))},onUpdateReportFormat:a=>{za(e),e(Ge(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Aa);function Ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=De(),s=Oe(),t=W(),{tenantEmailDomain:r}=Fe(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(q.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,C]=b.useState(!1),[Z,fe]=b.useState(!1),{isFeatureEnabled:Q}=l(q.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const U=d((n=>$(n))),me=U.masterTOSInfo?.isMasterTOSAccepted??!1,be=U.company?.companyInfo.firstMonthOfFY??1,ue=Ba(Q?U?.companyId:void 0),w=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:u}=Ra(),D=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),g=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),Ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));b.useEffect((()=>{!c&&u&&(C(!0),s(F(i.userId,!0,!0,!1)))}),[c,i,s,u]),b.useEffect((()=>{c&&!Z&&w==="Completed"&&u&&(s(F(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,w,u]),b.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&u)switch(D){case"profit_and_loss":case"profit_and_loss_by_classes":s(Be(h.timeframe));break;case"profit_and_loss_by_projects":g&&s(ie());break;case"balance_sheet":s(Me(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(A());break;case"cash_flow":s(Le(h.timeframe))}}),[c,D,O,u,T,g]);const X=Ta(),we=X?.loggedInUserRole!=null&&ve(X?.loggedInUserRole)!==!0,[ge,Se]=b.useState(!1),J=n=>{Se(n)},Ie=ka(),Re=ja();return(function(n){const{isDataReady:Te}=n,{pathname:ke}=W(),K=Ca(ke??"")==="reports",je=wa(Te),Ue=b.useMemo((()=>K?xa:void 0),[K]);ga({canFetchSuggestedQuestions:je,pageContexts:Ue})})({isDataReady:w==="Completed"}),Ua({isDataReady:w==="Completed"}),p.jsxs(p.Fragment,{children:[w==="Completed"?p.jsx(Da,{analytics:N,onLoad:n=>n.trackPageLoaded(Oa.Event.reports)}):null,p.jsx(Va,{isAppContentDrawerOpen:ge,handleDrawerToggle:J}),p.jsx(Ga,{firstMonthOfFY:be,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:Ce,selectedReportID:D,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:J,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Fa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Q,initialOpenThreadRequest:ue})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>$(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o(q.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(Ma,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ha,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
1
|
+
import{j as p}from"./liveblocks-BhGApeF9.js";import{g as W,h as De,u as Oe,i as Fe,j as d,l as Ae,n as Pe,o as ee}from"./core-C5rVvNoh.js";import{fB as $,Dr as R,TZ as Ee,lX as le,tx as ce,um as F,lC as Le,lL as A,lD as P,kG as E,kx as L,kw as Me,CB as ie,ur as Be,bq as ve,T_ as Ve,bn as xe,DO as ze,T$ as Ge,U0 as He,ch as S,Cu as Ye,U1 as ae,U2 as qe,U3 as Ne,U4 as $e,U5 as Ze,U6 as Qe,U7 as Xe,U8 as Je,U9 as Ke,Ua as We,Ub as ea,Uc as aa,Ud as sa,Ue as k,Uf as M,Ug as B,Uh as v,Ui as V,Uj as x,Uk as z,Ul as G,Um as H,Un as Y,e8 as ta,Ds as oa,Df as se,Dg as te,Dy as na,Dk as oe,DE as ra,Uo as la,Up as ca,Uq as ia,Ur as da,Us as pa,Ut as _a,Uu as fa,Uv as ma,Uw as ba,Ux as ua,dV as ha,dU as ya}from"./zeni-epic-state-BVExw1ei.js";import{al as Ca,am as wa,an as ga,a as Sa,$ as Ia,O as de,y as q,z as pe,ao as Ra,V as Ta,d as ka,ap as ja,aq as Ua,a6 as Da,h as N,Q as Oa,q as Fa,p as _e,ar as Aa,as as Pa,at as Ea}from"./index-BTTzX8oM.js";import"./mui-AVx3Hg0F.js";import La from"./NotFoundScreen-C_nzijM_.js";import{F as Ma}from"./FeaturePreviewScreen-CVnp0bZd.js";import{a as b}from"./sentry-B98sAG37.js";import{u as Ba}from"./useInitialThreadRequest-DuL5mYzq.js";import{t as ne,a as re,b as va}from"./routePaths-Cx9L8hBM.js";import{M as Va}from"./MobileAppDrawer-DigqZbbY.js";import"./recharts-uwVP8vj-.js";import"./analytics-B5-t19F2.js";import"./plaid-BuoWWOAj.js";import"./dnd-DqvXOfHm.js";import"./stripe-cKAAJElX.js";import"./lottie-CSUQXsXJ.js";import"./lexical-BO1ifV0W.js";import"./pdf-B6tAgCXh.js";import"./utils-B1bcOxs7.js";import"./InboxNotificationsProvider-MlM0K3gF.js";import"./useTaskManagerAccess-vcnpqvQT.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]="e94eb7dc-a9d0-40f5-a917-ab08ab03f386",e._sentryDebugIdIdentifier="sentry-dbid-e94eb7dc-a9d0-40f5-a917-ab08ab03f386")}catch{}})();const xa=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",y=e=>{e(Y({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0})),e(V({resetLeftScroll:!0})),e(M({resetLeftScroll:!0})),e(v({resetLeftScroll:!0})),e(B({resetLeftScroll:!0}))},za=e=>{e(ca()),e(ia()),e(da()),e(pa()),e(_a()),e(fa()),e(ma()),e(ba()),e(ua())},Ga=Ae((function(e){const o=pe.getSignedInUser(),_=e.tenantState.currentTenantId,m=$(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:_??""},t=R(e),r=Ve(m);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:N,isZeniUser:xe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:le(e),isAccountingProjectsEnabled:ce(e),currentTenantCompanyName:a,statementEndPoint:`${Ea}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:_,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(F(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(la(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ra(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:f,balancesRange:i}=l;let c=[...f];a==="year"&&(c=c.filter((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year"))),e(se(o.firstMonthOfFY,r,i.numberOfPeriods<1?1:i.numberOfPeriods,c)),f.length>0&&e(te(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",i.numberOfPeriods<1?1:i.numberOfPeriods,c))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(k(a)),(I(a)||S(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(oe({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ae({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(oe(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(na(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(se(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(te(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(oa({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=ta(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const f=a.accountName===""?a.accountDescription:a.accountName,i=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return re(o.tenantEmailDomain,a.accountId,a.accountType,s.id,f,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?va(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,f,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?re(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],f,r,l):a.accountType!=null?ne(o.tenantEmailDomain,a.accountId,a.accountType,f,r,l):void 0})();if(i!=null){const c=_e(o.location.state?.pathnameStackToGoBack,o.location.pathname);_(i,{state:{pathnameStackToGoBack:c,referrer:j(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Y({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(H({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(G({scrollPosition:s}));break;case"balance_sheet":e(z({scrollPosition:s}));break;case"balance_sheet_by_classes":e(x({scrollPosition:s}));break;case"balance_sheet_by_projects":e(V({scrollPosition:s}));break;case"cash_flow_by_classes":e(v({scrollPosition:s}));break;case"cash_flow_by_projects":e(B({scrollPosition:s}));break;case"cash_flow":e(M({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(V({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(v({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(B({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(M({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{_("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,r=I(t),l=S(t);l?(e(Je({viewMode:a})),e(Ke({viewMode:a}))):r?(e(We({viewMode:a})),e(ea({viewMode:a}))):(e(aa({viewMode:a})),e(sa({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",j(t)),e(k(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(k(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(k(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Ze({classesToFilterOut:a})):I(o.selectedReportID)?e(Qe({classesToFilterOut:a})):e(Xe({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{S(o.selectedReportID)?e(qe({projectsToFilterOut:a})):I(o.selectedReportID)?e(Ne({projectsToFilterOut:a})):e($e({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(ae({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=S(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?L():Ye()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(He(a))},onUpdateReportFormat:a=>{za(e),e(Ge(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?ze(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):A(!0):P(!0):E(!0):L(!0))}}}))(Aa);function Ha(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=De(),s=Oe(),t=W(),{tenantEmailDomain:r}=Fe(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(q.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,C]=b.useState(!1),[Z,fe]=b.useState(!1),{isFeatureEnabled:Q}=l(q.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const U=d((n=>$(n))),me=U.masterTOSInfo?.isMasterTOSAccepted??!1,be=U.company?.companyInfo.firstMonthOfFY??1,ue=Ba(Q?U?.companyId:void 0),w=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:u}=Ra(),D=d((n=>n.financeStatementState.selectedReportId)),T=d((n=>le(n))),g=d((n=>ce(n))),ye=d((n=>R(n).isCompareModeOn)),h=d((n=>R(n).filter)),O=d((n=>R(n).selectedReportAndTimeframeFetchState)),Ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));b.useEffect((()=>{!c&&u&&(C(!0),s(F(i.userId,!0,!0,!1)))}),[c,i,s,u]),b.useEffect((()=>{c&&!Z&&w==="Completed"&&u&&(s(F(i.userId,!1,!0,!1)),fe(!0))}),[c,Z,w,u]),b.useEffect((()=>{if(c&&O.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&u)switch(D){case"profit_and_loss":case"profit_and_loss_by_classes":s(Be(h.timeframe));break;case"profit_and_loss_by_projects":g&&s(ie());break;case"balance_sheet":s(Me(h.timeframe));break;case"balance_sheet_by_classes":T&&s(L());break;case"balance_sheet_by_projects":g&&s(E());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(A());break;case"cash_flow":s(Le(h.timeframe))}}),[c,D,O,u,T,g]);const X=Ta(),we=X?.loggedInUserRole!=null&&ve(X?.loggedInUserRole)!==!0,[ge,Se]=b.useState(!1),J=n=>{Se(n)},Ie=ka(),Re=ja();return(function(n){const{isDataReady:Te}=n,{pathname:ke}=W(),K=Ca(ke??"")==="reports",je=wa(Te),Ue=b.useMemo((()=>K?xa:void 0),[K]);ga({canFetchSuggestedQuestions:je,pageContexts:Ue})})({isDataReady:w==="Completed"}),Ua({isDataReady:w==="Completed"}),p.jsxs(p.Fragment,{children:[w==="Completed"?p.jsx(Da,{analytics:N,onLoad:n=>n.trackPageLoaded(Oa.Event.reports)}):null,p.jsx(Va,{isAppContentDrawerOpen:ge,handleDrawerToggle:J}),p.jsx(Ga,{firstMonthOfFY:be,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:Ce,selectedReportID:D,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:we,signedInUser:i,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:J,reportsResyncFetchState:he.reportsResyncFetchState,isAiCfoAccessEnabled:Re&&Ie&&!e,onAskAiCfoClick:()=>{if(me)if(m){const n=_e(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else Fa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Q,initialOpenThreadRequest:ue})]})}const j=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function _s(){const e=d((s=>$(s))),{useFeatureGate:o}=de(),{isFeatureEnabled:_}=o(q.isDebitCardFeatureEnabled),m=ha(_,e),a=ya(e);return m===!0||a===!0?p.jsx(Ma,{}):p.jsxs(Pe,{children:[p.jsx(ee,{path:"/",element:p.jsx(Ha,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-BhGApeF9.js";import{z as b,a6 as N,h as f,Q as S,d_ as E,O as k,y as I}from"./index-BTTzX8oM.js";import"./mui-AVx3Hg0F.js";import g from"./NotFoundScreen-C_nzijM_.js";import{a as c}from"./sentry-B98sAG37.js";import{u as C,j as h,h as F,g as L,l as _,n as T,o as d,N as y}from"./core-C5rVvNoh.js";import{fB as U,a13 as w,a14 as p,D6 as P,pX as V,a15 as z,D4 as B}from"./zeni-epic-state-BVExw1ei.js";import"./recharts-uwVP8vj-.js";import"./analytics-B5-t19F2.js";import"./plaid-BuoWWOAj.js";import"./dnd-DqvXOfHm.js";import"./stripe-cKAAJElX.js";import"./lottie-CSUQXsXJ.js";import"./lexical-BO1ifV0W.js";import"./pdf-B6tAgCXh.js";import"./utils-B1bcOxs7.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]="216bc121-eca2-4673-ba4b-d54b553a077a",e._sentryDebugIdIdentifier="sentry-dbid-216bc121-eca2-4673-ba4b-d54b553a077a")}catch{}})();const G=_((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),f.trackInviteEmailClicked("send",s,r,s.length)}e(B())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&f.trackInviteEmailClicked("cancel")}}}))(E),O=()=>{const e=C(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(o))),l=F(),j=L(),u=b.getSignedInUser();if(u==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>w(o))),x=u?.firstName!=null?u.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(N,{analytics:f,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:l,location:j,currentTenant:r,companyName:D,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-
|
|
2
|
-
import{_ as s,bn as cs,fB as ms,dV as _s,dU as Es,Aj as hs,de as ps,gG as gs,g5 as xs,db as pe,cF as Rs,gj as js,cx as Is,bE as Ts,br as As,Tp as bs,v as fs,Tr as ys,bq as Ds,Ts as Cs,bK as vs,bJ as Os,bt as Ps,ct as Us,Tt as ws,Tu as Fs,d6 as Ls,d9 as Vs,d8 as ks,cE as Hs,cL as Bs,pO as ge,ge as xe,gV as Ss,gg as Re,gI as je,gJ as Ie,gh as Ns}from"./zeni-epic-state-DzFY1eNZ.js";import{j as e}from"./liveblocks-QA8yK6T_.js";import{a as U}from"./sentry-DX8X0N2R.js";import{N as u,u as Ms,h as Zs,i as Gs,g as $s,j as $,q as Te,n as zs,o as n}from"./core-OUhaP0nM.js";import{J as l,E as qs,u as Ws,z as y,O as Ys,d as Js,W as Ks,y as M,f as Xs,K as Qs,V as et,L as F,G as Ae,t as _,P as st,M as tt,h as te}from"./index-BjnriIg-.js";import"./mui-BtZD__8k.js";import{f as be}from"./analyticsHelper-CDqT9wg1.js";import{t as nt}from"./getLocaleForTenant-aTGgtilb.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="2590d965-53a8-4bd9-ae07-41556cbf73d9",a._sentryDebugIdIdentifier="sentry-dbid-2590d965-53a8-4bd9-ae07-41556cbf73d9")}catch{}})();const at=l((()=>s((()=>import("./NotFoundScreen-CBOeKuhG.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ot=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),rt=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),fe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),D=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(De,{tenantEmailDomain:v})}return a?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(De,{tenantEmailDomain:v}):A?e.jsx(rt,{tenantEmailDomain:v}):B?e.jsx(ot,{tenantEmailDomain:v}):e.jsx(at,{})},it={dashboard:()=>s((()=>import("./DashboardRoutes-CLhCpuhB.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-C_uGbX5e.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-DmbcBT5E.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-DQwcR30R.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-DNrMSB0r.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-BQmYqXvS.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-Dkpm3e49.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-B2NEnvyj.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-Dsuu9sFZ.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-Dnwm_7bw.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-BCbNpFFW.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CQnM-9GW.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},lt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ne=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},ut=l((()=>s((()=>import("./ReportsRoutes-BQmYqXvS.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),dt=l((()=>s((()=>import("./AddressRoutes-loJi-MTb.js")),__vite__mapDeps([55,1,2,3,25,4,5,6,7,0,8])))),ct=l((()=>s((()=>import("./PeopleRoutes-B2NEnvyj.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),mt=l((()=>s((()=>import("./PandLWithForecastRoutes-aW5WT5CH.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),_t=l((()=>s((()=>import("./CustomerOnboardingRoutes-BRdsXEtS.js")),__vite__mapDeps([57,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),Et=l((()=>s((()=>import("./VendorsRoutes-BCbNpFFW.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])))),ht=l((()=>s((()=>import("./TransactionDetailRoutes-Br_-ul_i.js")),__vite__mapDeps([58,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-CTolGUo8.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),pt=l((()=>s((()=>import("./DashboardRoutes-CLhCpuhB.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-C_uGbX5e.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),gt=l((()=>s((()=>import("./SettingsRoutes-DNrMSB0r.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),xt=l((()=>s((()=>import("./InvoicingRoutes-MDlqxyil.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-DmbcBT5E.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),Rt=l((()=>s((()=>import("./ZeniAccountRoutes-CQnM-9GW.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),jt=l((()=>s((()=>import("./TreasuryRoutes-Dnwm_7bw.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),It=l((()=>s((()=>import("./TransactionListRoutes-DQwcR30R.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),Tt=l((()=>s((()=>import("./ChargeCardRoutes-Dkpm3e49.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),At=l((()=>s((()=>import("./NotificationRoutes-Dhiufflf.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,11,21,8])))),bt=l((()=>s((()=>import("./PerformanceRoutes-DphKMt6B.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,19,20,21,8])))),ft=l((()=>s((()=>import("./ExpenseAutomationRoutes-Dsuu9sFZ.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])))),yt=l((()=>s((()=>import("./RewardsRoutes-DvgOSJy0.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,0,8])))),Dt=l((()=>s((()=>import("./TaskRoutes-BOftPZQw.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,14,19,20,21,65,11,8])))),Ct=l((()=>s((()=>import("./AiCfoScreen-CL9wzpIP.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,22,53,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-B8SHn0bs.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-CBOeKuhG.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),vt=l((()=>s((()=>import("./TaskListScreen-D13comxS.js").then((a=>a.f))),__vite__mapDeps([65,1,2,3,4,5,6,7,11,19,20,21,8])))),Ot=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Bt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Ms(),B=Zs(),{tenantEmailDomain:i}=Gs(),V=qs().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Ws(),b=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),J=cs(I),z=$s(),[L,we]=U.useState(!1),r=$((o=>ms(o))),{useFeatureGate:S}=Ys(),Z=Js(),ae=Ks(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=S(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=S(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?_s(oe,r):void 0,K=p==="Completed"||T==="Completed"?Es(r):void 0,re=p==="Completed"||T==="Completed"?hs(r)&&!ps(r):void 0,ke=Xs(r,Ve,oe),{isCardsHidden:He}=Qs(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=S(M.isSettingsFeatureEnabled),{isFeatureEnabled:X}=S(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=S(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||tt==="DEV",q=$((o=>gs(o)));if(i!=null){const o=y.getSignedInUserTenant(i);I!=null&&o!=null&&be(I,r,V)}const G={tenantId:b,userId:I?.userId,sessionId:I?.zeniSessionId},ie=xs(),h=et(),Ze=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),Ge=Rs(h?.loggedInUserRoleMap),Q=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),$e=$((o=>G.tenantId!=null?js(o,G.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),U.useEffect((()=>{if(ee!=null&&b!=null){const o=ee.params.selectedPeriod;if(o!=null){const f=o.split("-");if(f.length===2){const d=Is(Number(f[0])),t=Number(f[1]),c=Ts(`01-${d<10?`0${d}`:d}-${t}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=As();c.isAfter(N,"month")===!1?A(bs(b,{month:d,year:t})):B(`/${i}/month_end_close_checks/review`)}}}}),[ee,b]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,G,ie,I,A,y]),U.useLayoutEffect((()=>{!fs(ie,G)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,t){if(xe(f?.userId,f?.zeniSessionId,o.tenantId),d(Ss(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=y.getSignedInUserTenantWithId(o.tenantId);t&&Ae.updateAppLocaleID(nt(t)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?te.identify(o.userId,{tenant_id:o.tenantId}):te.resetUserIdentity()})(G,I,A,$e))}),[b]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,t,c,N,H){if(d==null&&t==null)return void console.warn("There is no current tenant selected!!");const W=t!=null&&c?.zeniSessionId!=null,ls=d==null||d.tenantId!==t,us=d!=null&&d.excludedResources==null,ds=d!=null&&d.externalConnections==null;if(W&&ls){H(Re(t));const Y=y.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),H(je(c.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),H(Ie(c.userId,t)))}else W&&us&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),H(je(c.userId,t))),W&&ds&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),H(Ie(c.userId,t)));if(W){te.identify(c.userId,{tenant_id:t});const Y=t==null||t!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),N(F.TENANT_FETCHING),H(Ns(c.userId,t,c.zeniSessionId))),Y&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,b,I,O,A))}),[b,p]),U.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(ys(q.tenantsBaseInOrder)),I!=null&&be(I,r,V,void 0,q.tenantsBaseInOrder))}),[q,T,r,I]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=lt,f=3e3){setTimeout((()=>{const d=t=>{if(t>=o.length)return;const c=o[t],N=it[c];N!=null?N().then((()=>ne((()=>d(t+1))))).catch((()=>ne((()=>d(t+1))))):d(t+1)};ne((()=>d(0)))}),f)})())}),[p,L]);const P=r?.userRole!=null&&Ds(r?.userRole),{isFeatureEnabled:ze}=S(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),We=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,Ye=Cs(h?.loggedInUserRoleMap),Je=r.externalConnections?.accounting[0]?.isValid,Ke=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&vs(h?.loggedInUserRoleMap),_e=Fe&&!P,Xe=Le&&!P,Qe=ue&&Os(h?.loggedInUserRoleMap),es=de&&Ps(h?.loggedInUserRoleMap),ss=_e&&Us(h?.loggedInUserRoleMap),ts=ws(h?.loggedInUserRoleMap),ns=Fs(h?.loggedInUserRoleMap),as=Ls(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=ks(h?.loggedInUserRoleMap),g=Hs(h?.loggedInUserRoleMap),x=Bs(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&as,j=Xe&&os,m=de&&rs,is=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||Ge===!0||Ye===!0||ts===!0||ns===!0;return y.isSignedIn()?b==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&T!=="In-Progress"&&A(ge(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||J&&!Q)&&Ke&&Je!==!0&&E===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||Q||J?!L||se!==!1||Q||J?L&&r?.userRole&&E!=null&&K!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(zs,{children:e.jsxs(n,{element:e.jsx(st,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Ot,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(pt,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ut,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:is||w?e.jsx(ct,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(mt,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(_t,{})}),e.jsx(n,{path:"transaction/*",element:w&&P===!1||qe||We?e.jsx(ht,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&P===!1?e.jsx(It,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(vt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Dt,{})}),e.jsx(n,{path:"address/*",element:Qe||me||ss||es?e.jsx(dt,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Rt,{}):e.jsx(C,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(jt,{}):e.jsx(C,{})}),e.jsx(n,{path:"performance",element:ae===!0?e.jsx(bt,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(ft,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"notifications/*",element:e.jsx(At,{})}),e.jsx(n,{path:"vendors/*",element:Ze?e.jsx(Et,{}):e.jsx(C,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(gt,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(n,{path:"invoicing/*",element:Me?e.jsx(xt,{}):e.jsx(C,{})}),e.jsx(n,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:X}):e.jsx(C,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:X}):e.jsx(C,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Tt,{}):e.jsx(C,{})}),e.jsx(n,{path:"rewards/*",element:ze?e.jsx(yt,{}):e.jsx(C,{})}),e.jsx(n,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(n,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Ct,{isFileUploadEnabled:X}):e.jsx(C,{})}),e.jsx(n,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{D as F,Bt as S};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-C_nzijM_.js","assets/sentry-B98sAG37.js","assets/core-C5rVvNoh.js","assets/zeni-epic-state-BVExw1ei.js","assets/index-BTTzX8oM.js","assets/mui-AVx3Hg0F.js","assets/analytics-B5-t19F2.js","assets/utils-B1bcOxs7.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-CzNNddHy.js","assets/withTransactionSidePanel-F28FfzEK.js","assets/useAskAiCfoHostNavButtonProps-Ddvy6nOQ.js","assets/TransactionDetailScreen-IKPgPc-W.js","assets/decodeURIComponentSafe-ChlmY296.js","assets/useInitialThreadRequest-DuL5mYzq.js","assets/routePaths-Cx9L8hBM.js","assets/expenseAutomationHelper-DT3oLJj6.js","assets/analyticsHelper-5kEw8e8E.js","assets/CompanyPassportScreen-BChXj6Kk.js","assets/MobileAppDrawer-DigqZbbY.js","assets/InboxNotificationsProvider-MlM0K3gF.js","assets/useTaskManagerAccess-vcnpqvQT.js","assets/useAiCfoDashboardSuggestedQuestionsChips-C7_zR2C_.js","assets/FeaturePreviewScreen-CVnp0bZd.js","assets/BillPayRoutes-DDeK4O3Z.js","assets/AddressScreen-Dyq7f1j-.js","assets/DomesticWireDetailScreen-C2hFGwu0.js","assets/BusinessVerificationPageScreen-BhpdMjkc.js","assets/DrawerScreen-lK0vJxIS.js","assets/SetupPagesScreen-BgHIeOKB.js","assets/BillPayApprovalRoutes-Cf5w1Fd_.js","assets/ReimbursementApprovalRuleDetailScreen-CuE7ORwk.js","assets/getLocaleForTenant-DQ9OiUn_.js","assets/ReimbursementRoutes-6nUym5eB.js","assets/ReimbursementApprovalRoutes-CGtOCJ7F.js","assets/TransactionListRoutes-Bu8kgDQQ.js","assets/ZeniAccountStatementScreen-C_X33S2u.js","assets/SettingsRoutes-AaNqIdby.js","assets/AccountMappingScreen-Bim1Hr_z.js","assets/QBOConnectionScreen-ByKxBz2v.js","assets/empty-BTHEbwNZ.js","assets/index-DMhoHJcD.js","assets/url-RaJlDbzw.js","assets/index-CGyxP256.js","assets/accountMappingHelper-BIF4Ld_b.js","assets/useEmailConnectResultRefresh-98NnzJRh.js","assets/ReportsRoutes-s2hJ2RsR.js","assets/ChargeCardRoutes-Y_ZnY6a9.js","assets/useChargeCardPusherEvents-XPXgI-Bx.js","assets/PeopleRoutes-DJYa775V.js","assets/ExpenseAutomationRoutes-CVR_qG3c.js","assets/TreasuryRoutes-CZBiOy69.js","assets/VendorsRoutes-KMa9llQ2.js","assets/pathToGoBack-CW7sD0XS.js","assets/ZeniAccountRoutes-DpPln-Iv.js","assets/AddressRoutes-CdDnkC-7.js","assets/PandLWithForecastRoutes-5el-0Lj7.js","assets/CustomerOnboardingRoutes-CRNi6Rqr.js","assets/TransactionDetailRoutes-BLhI-0B0.js","assets/EntityDetailRoutes-BSm0QeV6.js","assets/InvoicingRoutes-Q8vi5u3U.js","assets/NotificationRoutes-DKgxAwSp.js","assets/PerformanceRoutes-CrDIRhB1.js","assets/RewardsRoutes-C-di4Yoz.js","assets/TaskRoutes-BWLw4wFO.js","assets/TaskListScreen-D4isBRlx.js","assets/AiCfoScreen-BAtt2kQC.js","assets/CardsAiCfoScreen-BmeTr_5u.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as cs,fB as ms,dV as _s,dU as Es,Aj as hs,de as ps,gG as gs,g5 as xs,db as pe,cF as Rs,gj as js,cx as Is,bE as Ts,br as As,Tp as bs,v as fs,Tr as ys,bq as Ds,Ts as Cs,bK as vs,bJ as Os,bt as Ps,ct as Us,Tt as ws,Tu as Fs,d6 as Ls,d9 as Vs,d8 as ks,cE as Hs,cL as Bs,pO as ge,ge as xe,gV as Ss,gg as Re,gI as je,gJ as Ie,gh as Ns}from"./zeni-epic-state-BVExw1ei.js";import{j as e}from"./liveblocks-BhGApeF9.js";import{a as U}from"./sentry-B98sAG37.js";import{N as u,u as Ms,h as Zs,i as Gs,g as $s,j as $,q as Te,n as zs,o as n}from"./core-C5rVvNoh.js";import{J as l,E as qs,u as Ws,z as y,O as Ys,d as Js,W as Ks,y as M,f as Xs,K as Qs,V as et,L as F,G as Ae,t as _,P as st,M as tt,h as te}from"./index-BTTzX8oM.js";import"./mui-AVx3Hg0F.js";import{f as be}from"./analyticsHelper-5kEw8e8E.js";import{t as nt}from"./getLocaleForTenant-DQ9OiUn_.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},A=new a.Error().stack;A&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[A]="2590d965-53a8-4bd9-ae07-41556cbf73d9",a._sentryDebugIdIdentifier="sentry-dbid-2590d965-53a8-4bd9-ae07-41556cbf73d9")}catch{}})();const at=l((()=>s((()=>import("./NotFoundScreen-C_nzijM_.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ot=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),rt=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),fe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),ye=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),D=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:V,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(V===!0){if(a)return e.jsx(ye,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(De,{tenantEmailDomain:v})}return a?e.jsx(ye,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(De,{tenantEmailDomain:v}):A?e.jsx(rt,{tenantEmailDomain:v}):B?e.jsx(ot,{tenantEmailDomain:v}):e.jsx(at,{})},it={dashboard:()=>s((()=>import("./DashboardRoutes-CzNNddHy.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])),bills:()=>s((()=>import("./BillPayRoutes-DDeK4O3Z.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-6nUym5eB.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])),transactions:()=>s((()=>import("./TransactionListRoutes-Bu8kgDQQ.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-AaNqIdby.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])),reports:()=>s((()=>import("./ReportsRoutes-s2hJ2RsR.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-Y_ZnY6a9.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])),people:()=>s((()=>import("./PeopleRoutes-DJYa775V.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-CVR_qG3c.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-CZBiOy69.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-KMa9llQ2.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-DpPln-Iv.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},lt=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ne=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},ut=l((()=>s((()=>import("./ReportsRoutes-s2hJ2RsR.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),dt=l((()=>s((()=>import("./AddressRoutes-CdDnkC-7.js")),__vite__mapDeps([55,1,2,3,25,4,5,6,7,0,8])))),ct=l((()=>s((()=>import("./PeopleRoutes-DJYa775V.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),mt=l((()=>s((()=>import("./PandLWithForecastRoutes-5el-0Lj7.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),_t=l((()=>s((()=>import("./CustomerOnboardingRoutes-CRNi6Rqr.js")),__vite__mapDeps([57,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),Et=l((()=>s((()=>import("./VendorsRoutes-KMa9llQ2.js")),__vite__mapDeps([52,1,2,3,4,5,6,7,25,0,23,53,15,11,19,20,21,28,44,8])))),ht=l((()=>s((()=>import("./TransactionDetailRoutes-BLhI-0B0.js")),__vite__mapDeps([58,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-BSm0QeV6.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),pt=l((()=>s((()=>import("./DashboardRoutes-CzNNddHy.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,0,17,18,19,20,21,22,23,8])))),ve=l((()=>s((()=>import("./BillPayRoutes-DDeK4O3Z.js")),__vite__mapDeps([24,1,2,3,4,5,6,7,25,0,26,11,14,27,15,19,20,21,28,23,29,17,30,31,32,8])))),gt=l((()=>s((()=>import("./SettingsRoutes-AaNqIdby.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,21,38,19,20,39,40,41,42,43,13,44,25,0,17,27,15,18,45,30,31,34,8])))),xt=l((()=>s((()=>import("./InvoicingRoutes-Q8vi5u3U.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-6nUym5eB.js")),__vite__mapDeps([33,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,11,14,28,34,31,32,8])))),Rt=l((()=>s((()=>import("./ZeniAccountRoutes-DpPln-Iv.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),jt=l((()=>s((()=>import("./TreasuryRoutes-CZBiOy69.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),It=l((()=>s((()=>import("./TransactionListRoutes-Bu8kgDQQ.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),Tt=l((()=>s((()=>import("./ChargeCardRoutes-Y_ZnY6a9.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),At=l((()=>s((()=>import("./NotificationRoutes-DKgxAwSp.js")),__vite__mapDeps([61,1,2,3,0,4,5,6,7,11,21,8])))),bt=l((()=>s((()=>import("./PerformanceRoutes-CrDIRhB1.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,19,20,21,8])))),ft=l((()=>s((()=>import("./ExpenseAutomationRoutes-CVR_qG3c.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,10,44,28,8])))),yt=l((()=>s((()=>import("./RewardsRoutes-C-di4Yoz.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,0,8])))),Dt=l((()=>s((()=>import("./TaskRoutes-BWLw4wFO.js")),__vite__mapDeps([64,1,2,3,0,4,5,6,7,14,19,20,21,65,11,8])))),Ct=l((()=>s((()=>import("./AiCfoScreen-BAtt2kQC.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,22,53,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-BmeTr_5u.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-C_nzijM_.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),vt=l((()=>s((()=>import("./TaskListScreen-D4isBRlx.js").then((a=>a.f))),__vite__mapDeps([65,1,2,3,4,5,6,7,11,19,20,21,8])))),Ot=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:V,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(V)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):V?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Bt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=Ms(),B=Zs(),{tenantEmailDomain:i}=Gs(),V=qs().mode,{setLoading:O,clearAllLoading:v,clearLoading:k}=Ws(),b=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),J=cs(I),z=$s(),[L,we]=U.useState(!1),r=$((o=>ms(o))),{useFeatureGate:S}=Ys(),Z=Js(),ae=Ks(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Ve}=S(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=S(M.isDebitCardFeatureEnabled),T=$((o=>o.tenantState.fetchState)),p=$((o=>o.tenantState.activeTenantFetchState.fetchState)),E=p==="Completed"||T==="Completed"?_s(oe,r):void 0,K=p==="Completed"||T==="Completed"?Es(r):void 0,re=p==="Completed"||T==="Completed"?hs(r)&&!ps(r):void 0,ke=Xs(r,Ve,oe),{isCardsHidden:He}=Qs(r?.tenantId),Be=!ke||!!He,{isFeatureEnabled:Se}=S(M.isSettingsFeatureEnabled),{isFeatureEnabled:X}=S(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=S(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||tt==="DEV",q=$((o=>gs(o)));if(i!=null){const o=y.getSignedInUserTenant(i);I!=null&&o!=null&&be(I,r,V)}const G={tenantId:b,userId:I?.userId,sessionId:I?.zeniSessionId},ie=xs(),h=et(),Ze=r.company==null||h?.loggedInUserRoleMap!=null&&pe(h.loggedInUserRole),Ge=Rs(h?.loggedInUserRoleMap),Q=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),$e=$((o=>G.tenantId!=null?js(o,G.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),U.useEffect((()=>{if(ee!=null&&b!=null){const o=ee.params.selectedPeriod;if(o!=null){const f=o.split("-");if(f.length===2){const d=Is(Number(f[0])),t=Number(f[1]),c=Ts(`01-${d<10?`0${d}`:d}-${t}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=As();c.isAfter(N,"month")===!1?A(bs(b,{month:d,year:t})):B(`/${i}/month_end_close_checks/review`)}}}}),[ee,b]),U.useEffect((()=>{L||(we(!0),O(F.TENANT_FETCHING))}),[L,G,ie,I,A,y]),U.useLayoutEffect((()=>{!fs(ie,G)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,t){if(xe(f?.userId,f?.zeniSessionId,o.tenantId),d(Ss(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=y.getSignedInUserTenantWithId(o.tenantId);t&&Ae.updateAppLocaleID(nt(t)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?te.identify(o.userId,{tenant_id:o.tenantId}):te.resetUserIdentity()})(G,I,A,$e))}),[b]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,t,c,N,H){if(d==null&&t==null)return void console.warn("There is no current tenant selected!!");const W=t!=null&&c?.zeniSessionId!=null,ls=d==null||d.tenantId!==t,us=d!=null&&d.excludedResources==null,ds=d!=null&&d.externalConnections==null;if(W&&ls){H(Re(t));const Y=y.getSignedInUserTenantWithId(t);Y?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(Y?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),H(je(c.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),H(Ie(c.userId,t)))}else W&&us&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),H(je(c.userId,t))),W&&ds&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),H(Ie(c.userId,t)));if(W){te.identify(c.userId,{tenant_id:t});const Y=t==null||t!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),N(F.TENANT_FETCHING),H(Ns(c.userId,t,c.zeniSessionId))),Y&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,b,I,O,A))}),[b,p]),U.useEffect((()=>{y.isSignedIn()&&T==="Completed"&&q.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(ys(q.tenantsBaseInOrder)),I!=null&&be(I,r,V,void 0,q.tenantsBaseInOrder))}),[q,T,r,I]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&b!=null?(v(),_.markActiveTenantFetchCompleted(b)):p==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,b,L]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=lt,f=3e3){setTimeout((()=>{const d=t=>{if(t>=o.length)return;const c=o[t],N=it[c];N!=null?N().then((()=>ne((()=>d(t+1))))).catch((()=>ne((()=>d(t+1))))):d(t+1)};ne((()=>d(0)))}),f)})())}),[p,L]);const P=r?.userRole!=null&&Ds(r?.userRole),{isFeatureEnabled:ze}=S(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),We=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,Ye=Cs(h?.loggedInUserRoleMap),Je=r.externalConnections?.accounting[0]?.isValid,Ke=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&vs(h?.loggedInUserRoleMap),_e=Fe&&!P,Xe=Le&&!P,Qe=ue&&Os(h?.loggedInUserRoleMap),es=de&&Ps(h?.loggedInUserRoleMap),ss=_e&&Us(h?.loggedInUserRoleMap),ts=ws(h?.loggedInUserRoleMap),ns=Fs(h?.loggedInUserRoleMap),as=Ls(h?.loggedInUserRoleMap),os=Vs(h?.loggedInUserRoleMap),rs=ks(h?.loggedInUserRoleMap),g=Hs(h?.loggedInUserRoleMap),x=Bs(h?.loggedInUserRoleMap),Ee=ue&&g,he=ce&&x,R=_e&&as,j=Xe&&os,m=de&&rs,is=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||Ge===!0||Ye===!0||ts===!0||ns===!0;return y.isSignedIn()?b==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&T!=="In-Progress"&&A(ge(I.userId,I.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||J&&!Q)&&Ke&&Je!==!0&&E===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||Q||J?!L||se!==!1||Q||J?L&&r?.userRole&&E!=null&&K!=null&&i!=null&&Object.keys(h.loggedInUserRoleMap).length>0?e.jsx(zs,{children:e.jsxs(n,{element:e.jsx(st,{}),children:[e.jsx(n,{path:"/",element:e.jsx(Ot,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(pt,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(ut,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:is||w?e.jsx(ct,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(mt,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(_t,{})}),e.jsx(n,{path:"transaction/*",element:w&&P===!1||qe||We?e.jsx(ht,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&P===!1?e.jsx(It,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:E,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(vt,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Dt,{})}),e.jsx(n,{path:"address/*",element:Qe||me||ss||es?e.jsx(dt,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Rt,{}):e.jsx(C,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(jt,{}):e.jsx(C,{})}),e.jsx(n,{path:"performance",element:ae===!0?e.jsx(bt,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(ft,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"notifications/*",element:e.jsx(At,{})}),e.jsx(n,{path:"vendors/*",element:Ze?e.jsx(Et,{}):e.jsx(C,{})}),e.jsx(n,{path:"bill/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:Ee?e.jsx(ve,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:he?e.jsx(Oe,{}):e.jsx(D,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:j,isTenantBankingOnly:E,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(gt,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(n,{path:"invoicing/*",element:Me?e.jsx(xt,{}):e.jsx(C,{})}),e.jsx(n,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:X}):e.jsx(C,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:X}):e.jsx(C,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Tt,{}):e.jsx(C,{})}),e.jsx(n,{path:"rewards/*",element:ze?e.jsx(yt,{}):e.jsx(C,{})}),e.jsx(n,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(n,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Ct,{isFileUploadEnabled:X}):e.jsx(C,{})}),e.jsx(n,{path:"*",element:e.jsx(C,{})})]})}):null:(a(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(a(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),a(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{D as F,Bt as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-BhGApeF9.js";import{a as d}from"./sentry-B98sAG37.js";import{h as N,g as Z,u as T,i as V,j as C,l as H,n as z,o as k}from"./core-C5rVvNoh.js";import{fB as w,YA as je,MU as ve,Y8 as we,Yh as Ae,c7 as W,cQ as De,cR as Ue,bq as Te,da as Re,Ff as _e,YB as Me,Ol as Be,LL as Fe,LC as de,Lz as Le,Fj as ue,LF as pe,LI as ge,LO as X,Bv as ee,Fi as Oe,lq as G,lt as me,YC as Ne,mD as Ve,FB as Ye,UQ as $e,UR as Ge,lo as Ze,YD as He,lr as Ke,t$ as Qe,UL as qe,UM as ze,u3 as Je,hS as We,TL as q,hK as ae,hH as Xe,hP as en,TM as nn,Fy as tn,YE as an,YF as on,M0 as sn,lX as rn,dU as fe,dV as he,YG as ln,gz as cn,T_ as dn,Fx as oe,gE as se,gD as un,Fw as pn,gC as gn,gB as mn,YH as fn,Te as Ce,YI as hn,YJ as Cn,YK as yn,YL as bn,YM as Sn,YN as In,FE as xn,YO as En,Fv as ie,Fp as $,YP as kn,YQ as Pn,YR as re,YS as jn,dN as vn,YT as wn,YU as An,YV as Dn,To as Un,b$ as Tn,c6 as Rn,c5 as _n,c0 as Mn,YW as Bn,c3 as Fn,c2 as Ln,c4 as On,c1 as Nn}from"./zeni-epic-state-BVExw1ei.js";import{bQ as Vn,z as v,V as Y,a5 as ne,c0 as Yn,h as K,O as te,y as L,f as ye,K as be,c1 as $n,g as Gn,U as Se,c2 as Zn,ag as Hn,c3 as Kn,c4 as Qn,ao as qn,c5 as zn,p as Jn,c as Ie,c6 as Wn}from"./index-BTTzX8oM.js";import{n as B}from"./mui-AVx3Hg0F.js";import{u as xe}from"./useTaskManagerAccess-vcnpqvQT.js";import{U as Xn}from"./AccountMappingScreen-Bim1Hr_z.js";import{t as et,A as nt}from"./AddressScreen-Dyq7f1j-.js";import O from"./NotFoundScreen-C_nzijM_.js";import{g as tt}from"./analyticsHelper-5kEw8e8E.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-BhpdMjkc.js";import{C as st}from"./CompanyPassportScreen-BChXj6Kk.js";import{M as _}from"./MobileAppDrawer-DigqZbbY.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-98NnzJRh.js";import{q as le}from"./QBOConnectionScreen-ByKxBz2v.js";import{B as lt}from"./BillPayApprovalRoutes-Cf5w1Fd_.js";import{R as ct}from"./ReimbursementApprovalRoutes-CGtOCJ7F.js";import"./recharts-uwVP8vj-.js";import"./analytics-B5-t19F2.js";import"./plaid-BuoWWOAj.js";import"./dnd-DqvXOfHm.js";import"./stripe-cKAAJElX.js";import"./lottie-CSUQXsXJ.js";import"./lexical-BO1ifV0W.js";import"./pdf-B6tAgCXh.js";import"./utils-B1bcOxs7.js";import"./accountMappingHelper-BIF4Ld_b.js";import"./routePaths-Cx9L8hBM.js";import"./InboxNotificationsProvider-MlM0K3gF.js";import"./empty-BTHEbwNZ.js";import"./pdf-lib-u-Ml-CIk.js";import"./index-DMhoHJcD.js";import"./url-RaJlDbzw.js";import"./index-CGyxP256.js";import"./decodeURIComponentSafe-ChlmY296.js";import"./ReimbursementApprovalRuleDetailScreen-CuE7ORwk.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="299af742-236a-48d8-9aad-8bb42a94bb80",e._sentryDebugIdIdentifier="sentry-dbid-299af742-236a-48d8-9aad-8bb42a94bb80")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-BhGApeF9.js";import{h as X,g as J,u as ee,i as W,j as v,N as j,l as H,t as Je}from"./core-C5rVvNoh.js";import{bJ as en,fB as F,cF as nn,H6 as Z,Y8 as tn,Yb as an,ui as ne,u6 as te,mv as ae,B1 as L,Yd as Ce,gD as $e,gC as We,gB as He,Ye as sn,Hf as on,LL as he,LC as Ie,Lz as Ae,Lh as Q,LF as _e,LI as ke,LO as ve,Bv as Pe,gX as cn,cA as rn,dV as un,dU as dn,de as ln,bt as pn,ct as Fe,Yf as mn,Kh as de,KV as yn,Yg as fn,bK as gn,N4 as le,MU as Sn,Yh as bn,Yi as Cn,N8 as hn,Nc as In,Yj as je,AW as An,RA as _n,NK as be,Oz as pe,Yk as kn,Yl as vn,Ym as Pn,Yn as Ge,Yo as Tn,Uz as En,Xp as Dn,UO as Un,Yp as Ke,Ll as wn,UP as On,Lp as Fn,Yq as Oe,NU as qe,mD as Vn,u9 as Qe,B3 as xn,bE as Ne,Bf as Le,cD as Bn,Yr as Xe,Nr as jn,Ns as Nn,Nw as Ln,Ys as Rn,NN as Re,Yt as zn,Yu as Mn,Yv as Yn,Yw as Zn,gS as $n,Iq as Wn,Yx as Hn,Iv as Gn,Iu as Kn}from"./zeni-epic-state-BVExw1ei.js";import{ag as Te,V as ie,O as me,y as q,E as Ee,z as E,a6 as se,h as D,a5 as De,Q as $,bN as qn,ac as oe,bO as V,bg as Ve,bP as Qn,bQ as Xn,bR as Jn,l as Be,bS as et,p as ze,aE as Me,$ as nt,a9 as tt,bT as at,bU as it,bV as st,w as ot}from"./index-BTTzX8oM.js";import{a as h}from"./sentry-B98sAG37.js";import{n as xe,D as ct,S as rt}from"./mui-AVx3Hg0F.js";import{u as ut,B as we}from"./BusinessVerificationPageScreen-BhpdMjkc.js";import{M as ye}from"./MobileAppDrawer-DigqZbbY.js";import N from"./NotFoundScreen-C_nzijM_.js";import{a as Ye}from"./analyticsHelper-5kEw8e8E.js";import{d as Ze}from"./routePaths-Cx9L8hBM.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]="b6de9c68-7148-4877-81fd-3935e2ae0f0d",e._sentryDebugIdIdentifier="sentry-dbid-b6de9c68-7148-4877-81fd-3935e2ae0f0d")}catch{}})();const dt=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-
|
|
1
|
+
import{j as f}from"./liveblocks-BhGApeF9.js";import{a as u,R as C,q as A}from"./sentry-B98sAG37.js";import{u as z,h as D,j as l,g as M,N as O,l as j}from"./core-C5rVvNoh.js";import{u as P,z as s,E as _,h as E,G as F,N,Q as B,R,S as V,T as $,U as b}from"./index-BTTzX8oM.js";import{fB as q,Tb as J,Tr as Q,ge as W,gg as G,Tw as H,gR as K,df as X,Tx as y,Ty as Y,Tz as Z,b_ as v}from"./zeni-epic-state-BVExw1ei.js";import"./mui-AVx3Hg0F.js";import{u as ee}from"./useDeviceId-6INyJgde.js";import{f as te}from"./analyticsHelper-5kEw8e8E.js";import{t as ne}from"./getLocaleForTenant-DQ9OiUn_.js";import"./recharts-uwVP8vj-.js";import"./analytics-B5-t19F2.js";import"./plaid-BuoWWOAj.js";import"./dnd-DqvXOfHm.js";import"./stripe-cKAAJElX.js";import"./lottie-CSUQXsXJ.js";import"./lexical-BO1ifV0W.js";import"./pdf-B6tAgCXh.js";import"./utils-B1bcOxs7.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="3c764fdf-b2d3-4ae2-bdc8-b6571ebb38f5",t._sentryDebugIdIdentifier="sentry-dbid-3c764fdf-b2d3-4ae2-bdc8-b6571ebb38f5")}catch{}})();const ie=j((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:b.googleClientId,microsoftClientId:b.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:v(c),sourceUri:v(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(y())}}}))($),ae=C.memo(ie);function be({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:T,accountUnlockTime:L}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),k=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>q(e))),I=l((e=>J(e))),m=M(),w=_().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(Q(I.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then((()=>{const e=V();e!=null&&N(e)})),setTimeout((()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))}),2e3))}),[S,p,k,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),T===!0&&L!=null?f.jsx(R,{onClose:()=>i(y()),unlockDate:L}):null]})}export{be as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-BhGApeF9.js";import{a as i}from"./sentry-B98sAG37.js";import{u as c,g as d,N as u}from"./core-C5rVvNoh.js";import{z as n,h as a,Q as m,a5 as p}from"./index-BTTzX8oM.js";import{gU as g,TN as y}from"./zeni-epic-state-BVExw1ei.js";import{n as b}from"./mui-AVx3Hg0F.js";import"./recharts-uwVP8vj-.js";import"./analytics-B5-t19F2.js";import"./plaid-BuoWWOAj.js";import"./dnd-DqvXOfHm.js";import"./stripe-cKAAJElX.js";import"./lottie-CSUQXsXJ.js";import"./lexical-BO1ifV0W.js";import"./pdf-B6tAgCXh.js";import"./utils-B1bcOxs7.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="96b186c5-39ba-4640-9408-426124f45d62",t._sentryDebugIdIdentifier="sentry-dbid-96b186c5-39ba-4640-9408-426124f45d62")}catch{}})();function L(){const t=c(),e=d(),r=i.useRef(!1),f=n.isSignedIn(),o=e.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{t(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(l){console.error("Error during sign out:",l)}finally{window.location.replace("/signin/auth")}}}),[o,t]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-BhGApeF9.js";import{a as T}from"./sentry-B98sAG37.js";import{h as pe,u as fe,g as Te,k as ge,j as F,i as _e,l as me}from"./core-C5rVvNoh.js";import{aI as De,aJ as be,z as x,O as Se,y as G,aq as he,a6 as Ee,h as ye,Q as Ae,e1 as Ce,p as R,a2 as Ge}from"./index-BTTzX8oM.js";import{fB as Ie,a1a as X,Qm as B,a1b as Y,a16 as Be,PK as M,a1c as Ke,PS as q,Ps as ve,P4 as Le,Qn as V,a1d as W,gd as we,Qd as Re,Qi as Ue,Q5 as Pe,Q3 as J,Qj as Fe,Q0 as je,a1e as xe,a1f as Oe,a1g as $e,a1h as Ne,a1i as I,dt as Qe,ds as ze,a1j as Ze,Pp as Me}from"./zeni-epic-state-BVExw1ei.js";import{n as qe}from"./mui-AVx3Hg0F.js";import{u as Ve}from"./useAskAiCfoHostNavButtonProps-Ddvy6nOQ.js";import{M as We}from"./MobileAppDrawer-DigqZbbY.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="182ee7ef-1dd0-44be-80f3-01f551571ef5",a._sentryDebugIdIdentifier="sentry-dbid-182ee7ef-1dd0-44be-80f3-01f551571ef5")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},Je=(a,e)=>a==null||a===""?[]:e.map((n=>`private-encrypted-${a}.${n}`)),He=(a,e)=>a==null||a===""?[]:e.map((n=>`private-encrypted-${a}.${n}`)),U=a=>Array.isArray(a)&&a.every((e=>typeof e=="string")),Xe=a=>{if(a==null||typeof a!="object")return null;const e=a,n=typeof e.task_id=="string"?e.task_id:typeof e.id=="string"?e.id:null;if(n==null||typeof e.tenant_id!="string"||typeof e.event_type!="string")return null;const o={task_id:n,tenant_id:e.tenant_id,event_type:e.event_type};return typeof e.is_private=="boolean"&&(o.is_private=e.is_private),U(e.assignees)&&(o.assignees=e.assignees),U(e.direct_assignees)&&(o.direct_assignees=e.direct_assignees),typeof e.created_by=="string"&&(o.created_by=e.created_by),U(e.task_group_ids)&&(o.task_group_ids=e.task_group_ids),typeof e.name=="string"&&(o.name=e.name),typeof e.parent_task_id=="string"&&(o.parent_task_id=e.parent_task_id),o},Ye=a=>{if(a==null||typeof a!="object")return null;const e=a;return U(e.task_ids)?{task_ids:e.task_ids}:null},pa=a=>{if(a==null||typeof a!="object")return null;const e=a;return typeof e.task_id!="string"?null:{task_id:e.task_id}},ea=a=>{const{events:e,onEvent:n,onSubscribed:o}=a,i=De(),g=T.useRef(n),l=T.useRef(o),_=T.useRef(0);T.useEffect((()=>{g.current=n}),[n]),T.useEffect((()=>{l.current=o}),[o]);const t=T.useMemo((()=>[...e].sort().join("|")),[e]);T.useEffect((()=>{if(i==null||e.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return e.forEach((m=>{const[D,b]=be(m);if(b==="")return;const E=i.channel(D),y=f=>{g.current(b,f)};let k;if(E?.subscribed===!0){if(k=E,k.bind(b,y),!p.has(D)){p.add(D),S();const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{E.unbind(b,y)}))}else{if(k=E??i.subscribe(D),k.bind(b,y),!p.has(D)){p.add(D);const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{k.unbind(b,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},aa=qe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|