@zeniai/web-app-ui 5.3.40-dev → 5.3.40-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-BIUIsIRE.js → AccountMappingScreen-BBc4_4t5.js} +1 -1
- package/dist/assets/{AddressRoutes--gUEIlXc.js → AddressRoutes-DUeinmsu.js} +1 -1
- package/dist/assets/{AddressScreen-Bej9zQot.js → AddressScreen-ueBXhh2E.js} +1 -1
- package/dist/assets/{AiCfoScreen-BQaocZqa.js → AiCfoScreen-CSA0NZQ_.js} +1 -1
- package/dist/assets/{AppDrawer-BYM-DSkR.js → AppDrawer-BtmKncXK.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-qtIPcgB0.js → BillPayApprovalRoutes-DIMv5HVt.js} +1 -1
- package/dist/assets/{BillPayRoutes-CnpuGuHe.js → BillPayRoutes-CWQjup6l.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-D2Ary0QP.js → BusinessVerificationPageScreen-gxvPC9Nc.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-V1ZiSm5h.js → CardsAiCfoScreen-X_JzwNdn.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DgTzZTph.js → ChargeCardRoutes-Bh1W2yGQ.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CNlNZlol.js → CompanyPassportScreen-XQqdGh6R.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-5CXbYx5t.js → ConnectionAuthScreen-BKS6qkfS.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-Dwb1vXcC.js → CustomerOnboardingAuthScreen-_W8JsjC9.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-BKJm_JEE.js → CustomerOnboardingRoutes-DTHzcTqs.js} +1 -1
- package/dist/assets/{DashboardRoutes-BKHZJKkt.js → DashboardRoutes-CxJPxihE.js} +1 -1
- package/dist/assets/{DefaultTenantHome-ttl2hapk.js → DefaultTenantHome-DyfCOvBU.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BZaPu7aX.js → DomesticWireDetailScreen-Cpm9Bc_C.js} +1 -1
- package/dist/assets/{DrawerScreen-CeUxZGpo.js → DrawerScreen-BT9F-F5I.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CjcEzz2g.js → EntityDetailRoutes-GrYbpLDE.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-BJzy8xal.js → ExpenseAutomationRoutes-BAcJRoU4.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-ClB4hfhH.js → FeaturePreviewScreen-CWY6I3fG.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CvNAfhTh.js → HubSpotOAuthCallbackScreen-C1emp8KW.js} +1 -1
- package/dist/assets/{InvoicingRoutes-B1gAqEf9.js → InvoicingRoutes-BVupJlN7.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-B0E48n4q.js → MagicLinkRoutes-ujyytXrV.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-DmrCJmgr.js → MagicLinkSignInScreen-yhSK6wYK.js} +1 -1
- package/dist/assets/{MobileAppDrawer-ezuGFNmX.js → MobileAppDrawer-DH0tVOfv.js} +1 -1
- package/dist/assets/{NotFoundScreen-BHK2wcy4.js → NotFoundScreen-BF2gJW91.js} +1 -1
- package/dist/assets/{NotificationRoutes-CJaAWW0k.js → NotificationRoutes-CnZ8t_aV.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-Lh-iiFIq.js → OAuthConsentScreen-CXv-sRc6.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-BbdTHIrJ.js → PandLWithForecastRoutes-D_qmzE70.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-DtmVsAJS.js → PaymentLinkScreen-CRIOI45V.js} +1 -1
- package/dist/assets/{PeopleRoutes-CNtwYayL.js → PeopleRoutes-BBOCzTBv.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DKKm8Wqd.js → PerformanceRoutes-C5sk5hTF.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-IJewO3Tq.js → QBOConnectionScreen-3h-qdoms.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CaWqEdpt.js → ReimbursementApprovalRoutes-Bt3jod66.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-C9pFfWce.js → ReimbursementApprovalRuleDetailScreen-Bc4MC7ZP.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DxyXmLRP.js → ReimbursementRoutes-DGCHkbRG.js} +1 -1
- package/dist/assets/{ReportsRoutes-C6GStBGQ.js → ReportsRoutes-C7NbqVqm.js} +1 -1
- package/dist/assets/{RewardsRoutes-DsLNX64E.js → RewardsRoutes-CnXmBpce.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-BsuRR9R3.js → ScheduleDetailsPrepaidExpensesScreen-CplHlAVo.js} +1 -1
- package/dist/assets/{ScreenRoutes-L97Vug0k.js → ScreenRoutes-DW0KFZF8.js} +2 -2
- package/dist/assets/{SettingsRoutes-BOJoESyV.js → SettingsRoutes-CapPSjQN.js} +1 -1
- package/dist/assets/{SetupPagesScreen-D-0MxRfj.js → SetupPagesScreen-D0wYkNmR.js} +1 -1
- package/dist/assets/{SignInScreen-BE9J9fIz.js → SignInScreen-ByJdILpU.js} +1 -1
- package/dist/assets/{SignOutScreen-CTevoMDc.js → SignOutScreen-BAACKxOn.js} +1 -1
- package/dist/assets/{TaskListScreen-CnVcsAwc.js → TaskListScreen-CsxsJBj1.js} +1 -1
- package/dist/assets/{TaskRoutes-CQy6J4IF.js → TaskRoutes-DjWmgiZP.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-WkmYYr0f.js → TransactionDetailRoutes-B97JNzan.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DE0VBfkC.js → TransactionDetailScreen-p3o65tsz.js} +1 -1
- package/dist/assets/{TransactionListRoutes-D9kITRhY.js → TransactionListRoutes-BNdbZ30T.js} +1 -1
- package/dist/assets/{TreasuryRoutes-C6jv6nMF.js → TreasuryRoutes-DR87vhnp.js} +1 -1
- package/dist/assets/{VendorsRoutes-CaVrball.js → VendorsRoutes-CropWmWa.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CzbEV-Z5.js → WiseConfirmationScreen-Of1qjtDz.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-GdGf0SYA.js → ZeniAccountRoutes-BROaca6I.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-Cy-_EAj7.js → ZeniAccountStatementScreen-CBSpTdBS.js} +1 -1
- package/dist/assets/{analyticsHelper-Cw60VlOq.js → analyticsHelper-BSm7IqEZ.js} +1 -1
- package/dist/assets/{getLocaleForTenant-Cb4ANH4Q.js → getLocaleForTenant-Ct5cBG_c.js} +1 -1
- package/dist/assets/{index-nXM19luG.js → index-DXVI9ztu.js} +5 -5
- package/dist/assets/{routePaths-WEgtxKVV.js → routePaths-3iKgurJn.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DJIBd7UL.js → useAiCfoDashboardSuggestedQuestionsChips-DtwiUC9S.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-CRADLi0_.js → useAskAiCfoHostNavButtonProps-C4hcJx1x.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-BwfDpPGN.js → useChargeCardPusherEvents-BQSY-ppK.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-f-R3NS2J.js → useEmailConnectResultRefresh-BzSlD1q5.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CbTk8gTV.js → useInitialThreadRequest-BFDb_b7F.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-CCKD6ndI.js → useTaskManagerAccess-B7YJLgDK.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-D-Ctl_K2.js → withTransactionSidePanel-CkEUNYr4.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C_WAhyd7.js";import T from"./NotFoundScreen-
|
|
1
|
+
import{j as s}from"./liveblocks-C_WAhyd7.js";import T from"./NotFoundScreen-BF2gJW91.js";import{a as r}from"./sentry-lC29HHPj.js";import{h as _,g as v,j as p,i as M,u as P,N as U,l as z,n as O,o as h}from"./core-1xnf2RtE.js";import{fE as B,a0h as b,bo as F,bn as N,iK as V,gg as K}from"./zeni-epic-state-BVNUxmav.js";import{X,z as I,as as $,dP as q}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-C4hcJx1x.js";import{M as H}from"./MobileAppDrawer-DH0tVOfv.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.js";import"./InboxNotificationsProvider-BU6hQETc.js";import"./useTaskManagerAccess-B7YJLgDK.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]="9710ba3c-ea92-4f58-af45-687c109e4eb4",e._sentryDebugIdIdentifier="sentry-dbid-9710ba3c-ea92-4f58-af45-687c109e4eb4")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(q),L=()=>{const e=_(),t=v(),c=X(),o=p((a=>B(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),g=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(d),y=C||k||x,l=r.useCallback(((a,i,E)=>{g(V({fromMonth:a,toMonth:i,cacheOverride:E}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(g(K({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),m.current=!0}),[n?.fetchState,l]),j=r.useCallback(((a,i)=>{l(a,i,!1)}),[l]),u=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:u}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:d,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:u,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${f}/dashboard`,replace:!0})};function he(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(T,{})})]})}export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-C_WAhyd7.js";import{p as Q,d as kc,c as an,g as jl,a as xl}from"./sentry-lC29HHPj.js";import{L as dt,b$ as Tc,fE as Ac,Tb as Rc,U0 as kl,c8 as Tl}from"./zeni-epic-state-BVNUxmav.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-BBaMea9r.js";import{r as cn}from"./empty-GMcl-a5k.js";import{r as Dl,a as Cl,b as Fl,c as Bl}from"./pdf-lib-RqzDns79.js";import{r as Ul}from"./index-Ctq16f6K.js";import{r as ql}from"./index-Dc3AC-iD.js";import{h as Gl,g as zl,u as Zl,j as _n,l as Hl}from"./core-1xnf2RtE.js";import{u as Vl,z as Pc,L as Yl,ak as Kl,al as Wl,W as Jl,D as Xl}from"./index-
|
|
1
|
+
import{j as Ol}from"./liveblocks-C_WAhyd7.js";import{p as Q,d as kc,c as an,g as jl,a as xl}from"./sentry-lC29HHPj.js";import{L as dt,b$ as Tc,fE as Ac,Tb as Rc,U0 as kl,c8 as Tl}from"./zeni-epic-state-BVNUxmav.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-BBaMea9r.js";import{r as cn}from"./empty-GMcl-a5k.js";import{r as Dl,a as Cl,b as Fl,c as Bl}from"./pdf-lib-RqzDns79.js";import{r as Ul}from"./index-Ctq16f6K.js";import{r as ql}from"./index-Dc3AC-iD.js";import{h as Gl,g as zl,u as Zl,j as _n,l as Hl}from"./core-1xnf2RtE.js";import{u as Vl,z as Pc,L as Yl,ak as Kl,al as Wl,W as Jl,D as Xl}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import{d as Pe}from"./decodeURIComponentSafe-DcD-XNVX.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]="c7a9735e-c877-4081-9907-c6c3a9f73bde",t._sentryDebugIdIdentifier="sentry-dbid-c7a9735e-c877-4081-9907-c6c3a9f73bde")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,In,Pn,Nn,Ne,Ln,$n,Mn,Dn,Cn,Fn,Bn,Un,qn,Gn,zn,Le,Zn,Hn,Vn,Yn,Kn,Wn,Jn,$e,Xn,Qn,to,eo,ro,no,oo,Me={exports:{}},De={exports:{}},Ce={};function Nc(){if(jn)return Ce;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),Ce.codes=n,Ce}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 o}from"./liveblocks-C_WAhyd7.js";import W from"./NotFoundScreen-
|
|
1
|
+
import{j as o}from"./liveblocks-C_WAhyd7.js";import W from"./NotFoundScreen-BF2gJW91.js";import{a as p}from"./sentry-lC29HHPj.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-1xnf2RtE.js";import{fE as I,Yl as h,YC as R,MY as N,MU as L,MX as f,MN as $,Y$ as B,MR as z,M_ as K}from"./zeni-epic-state-BVNUxmav.js";import{z as M,w as T,c9 as X,o as _,bS as q,ca as F}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import{u as G,R as x}from"./ReimbursementApprovalRuleDetailScreen-Bc4MC7ZP.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]="bbbe4495-f916-4eca-b928-7d2762b78587",e._sentryDebugIdIdentifier="sentry-dbid-bbbe4495-f916-4eca-b928-7d2762b78587")}catch{}})();const A="reimbursement-approval-rule-update",H=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(B(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(T(X)),J=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,w]=p.useState(!1),S=u((r=>r.remiSetupApproverViewState.fetchState)),c=u((r=>I(r))),d=u((r=>h(r))),b=u((r=>R(r).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(N())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),M.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:(r,y,j)=>{r.endsWith(A)&&j.onApprovalRulesEventReceived(r)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(k,{to:"../../promo"}):o.jsx(H,{currentTenant:c,location:n,navigate:s,...m})},E="reimbursement-approval-rule-update",P=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(E)&&e(B(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(K(t,!0))}}}))(T(F)),Q=()=>{const e=u((a=>I(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=q(e?.tenantId);return s?o.jsx(Z,{isLoading:n}):o.jsx(J,{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=>I(i))),r=u((i=>h(i)));G();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(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(w(!0),a(z(!1,!0)))}),[v,b,e,a]),M.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,r,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${E}`]:[],eventCallback:(i,ee,O)=>{i.endsWith(E)&&O.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?o.jsx(k,{to:"../../promo"}):o.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function le(){return o.jsxs(Y,{children:[o.jsx(g,{path:"/",element:o.jsx(Q,{})}),o.jsx(g,{path:"/new",element:o.jsx(x,{})}),o.jsx(g,{path:"/:approvalRuleId/edit",element:o.jsx(x,{})}),o.jsx(g,{path:"*",element:o.jsx(W,{})})]})}export{le as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-C_WAhyd7.js";import{a as m}from"./sentry-lC29HHPj.js";import{u as U,j as g,h as _,g as O,i as V,l as k}from"./core-1xnf2RtE.js";import{mq as $,YC as w,Yl as C,MQ as B,N1 as j,MY as A,MZ as E,YD as N,fE as L,MX as z}from"./zeni-epic-state-BVNUxmav.js";import{z as F,E as P,a7 as q,c0 as K,o as M,bS as Q,c1 as W}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-C_WAhyd7.js";import{a as m}from"./sentry-lC29HHPj.js";import{u as U,j as g,h as _,g as O,i as V,l as k}from"./core-1xnf2RtE.js";import{mq as $,YC as w,Yl as C,MQ as B,N1 as j,MY as A,MZ as E,YD as N,fE as L,MX as z}from"./zeni-epic-state-BVNUxmav.js";import{z as F,E as P,a7 as q,c0 as K,o as M,bS as Q,c1 as W}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.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]="68e797c9-9747-40d7-b2e7-f570272eb894",e._sentryDebugIdIdentifier="sentry-dbid-68e797c9-9747-40d7-b2e7-f570272eb894")}catch{}})();function X(){const e=U(),s=m.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));m.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e($({})))}),[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 R=u.actors.selectedUsers.map((f=>({type:"user",subType:void 0,userId:f.userId,idType:"user",isImplicitActor:!1}))),b=u.actors.selectedNonUsers.map((f=>{const y=(I=f.value,N(I)==null);var I;return{type:y?"attribute":"role",subType:f.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=R.concat(b);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("../")}}}))(K);function G(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>C(n))),[a,d]=m.useState(!1);if(m.useEffect((()=>{a||(d(!0),s(B(!0)))})),m.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(q,{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:C(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 f=[];return c.forEach((y=>{const I=y.actorKind?.selectedOption,Y=y.selectedRole?.selectedNonUsers??[];let D=[];I==="role"?D=Y.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):I==="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";f.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),f},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 R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const b=S?.selection.selectedOptions??[];if(b.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:b}),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}=Q(e?.tenantId);return s?h.jsx(J,{}):h.jsx(G,{})}function J(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),l=P(),r=g((n=>w(n))),i=g((n=>C(n))),[a,d]=m.useState(!1);if(X(),m.useEffect((()=>{a||(d(!0),s(B(!1)))})),m.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(q,{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-C_WAhyd7.js";import{u as ae,j as v,h as Q,g as J,i as ie,N as $,l as ee,q as ct,n as dt,o as w}from"./core-1xnf2RtE.js";import{fE as Z,MU as ut,_6 as ge,c8 as he,L_ as Le,m9 as pt,Md as ce,Mc as de,_7 as bt,bn as fe,gU as _e,_8 as gt,W4 as ht,l_ as Me,W5 as Ce,W6 as ft,kM as St,Y7 as It,k$ as yt,LO as Rt,Bx as vt,kT as At,Mz as $e,_9 as Pe,_a as Ee,_b as kt,_c as Ct,_d as Et,Mj as we,l5 as wt,Yg as xt,Mb as Bt,LY as Tt,_e as Dt,LX as jt,_f as Ft,M3 as xe,Mn as Ut,Mm as Lt,Mi as _t,_g as Ne,Rx as Mt,bo as $t,M6 as Pt,MR as Nt,_h as Ot,_i as zt,Mv as Gt,Ms as Be,XD as Vt,LV as Zt,_j as Oe,Ni as Te,Nq as Wt,_k as Ht,_l as X,_m as qt,_n as ze,_o as Xt,_p as Ge,_q as Ve,MH as ue,bu as Yt,bK as Se,cM as Ie,dY as Ze,dX as We,_r as Jt,gg as Kt,XQ as Qt,_s as en,_t as He,XU as tn,YC as nn,_u as an,Y$ as sn,Nn as De,Nm as on,_v as rn,_w as ln,_x as mn,_y as cn,_z as dn,Ym as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,Tw as yn,d9 as Rn,dc as vn,db as An,cF as kn}from"./zeni-epic-state-BVNUxmav.js";import{bS as Cn,X as qe,a1 as Xe,M as oe,y as x,z as _,cT as Ye,a8 as re,h as C,aS as je,I as F,ae as se,af as En,G as Je,cU as wn,p as Y,as as Ke,cV as xn,V as le,cW as Bn,aq as Tn,ab as Dn,a7 as ye,R as Qe,w as jn,bA as Fn,av as Un,ai as Ln,E as et,cX as _n,g as Mn}from"./index-nXM19luG.js";import{n as P,S as $n}from"./mui-BAsIRnB1.js";import pe from"./NotFoundScreen-BHK2wcy4.js";import{S as Fe}from"./SetupPagesScreen-D-0MxRfj.js";import{F as tt}from"./FeaturePreviewScreen-ClB4hfhH.js";import{a as h}from"./sentry-lC29HHPj.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-CRADLi0_.js";import{u as nt}from"./useInitialThreadRequest-CbTk8gTV.js";import{D as Pn}from"./DrawerScreen-CeUxZGpo.js";import{M as at}from"./MobileAppDrawer-ezuGFNmX.js";import{F as Nn}from"./ScreenRoutes-L97Vug0k.js";import{R as On}from"./ReimbursementApprovalRoutes-CaWqEdpt.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.js";import"./BusinessVerificationPageScreen-D2Ary0QP.js";import"./routePaths-WEgtxKVV.js";import"./analyticsHelper-Cw60VlOq.js";import"./InboxNotificationsProvider-BU6hQETc.js";import"./useTaskManagerAccess-CCKD6ndI.js";import"./getLocaleForTenant-Cb4ANH4Q.js";import"./ReimbursementApprovalRuleDetailScreen-C9pFfWce.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]="2a467b25-7434-4eee-bed5-15fe86cce806",e._sentryDebugIdIdentifier="sentry-dbid-2a467b25-7434-4eee-bed5-15fe86cce806")}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}}}=Je.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(Lt())},clearRemiSaveStatus:()=>{e(Ut("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(Pe()),e(Ee({}));const i=st(o),l=Y(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e($e(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 Ue(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),c=qe(),d=Xe(),[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=J().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))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((K=>Z(K))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=Cn(O),H=v((K=>K.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,W,z,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!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"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx($,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ye,{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(Wn,{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(Hn,{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(Xn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:U??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=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-C_WAhyd7.js";import{u as ae,j as v,h as Q,g as J,i as ie,N as $,l as ee,q as ct,n as dt,o as w}from"./core-1xnf2RtE.js";import{fE as Z,MU as ut,_6 as ge,c8 as he,L_ as Le,m9 as pt,Md as ce,Mc as de,_7 as bt,bn as fe,gU as _e,_8 as gt,W4 as ht,l_ as Me,W5 as Ce,W6 as ft,kM as St,Y7 as It,k$ as yt,LO as Rt,Bx as vt,kT as At,Mz as $e,_9 as Pe,_a as Ee,_b as kt,_c as Ct,_d as Et,Mj as we,l5 as wt,Yg as xt,Mb as Bt,LY as Tt,_e as Dt,LX as jt,_f as Ft,M3 as xe,Mn as Ut,Mm as Lt,Mi as _t,_g as Ne,Rx as Mt,bo as $t,M6 as Pt,MR as Nt,_h as Ot,_i as zt,Mv as Gt,Ms as Be,XD as Vt,LV as Zt,_j as Oe,Ni as Te,Nq as Wt,_k as Ht,_l as X,_m as qt,_n as ze,_o as Xt,_p as Ge,_q as Ve,MH as ue,bu as Yt,bK as Se,cM as Ie,dY as Ze,dX as We,_r as Jt,gg as Kt,XQ as Qt,_s as en,_t as He,XU as tn,YC as nn,_u as an,Y$ as sn,Nn as De,Nm as on,_v as rn,_w as ln,_x as mn,_y as cn,_z as dn,Ym as un,Nd as pn,Nh as bn,bq as gn,bJ as hn,cG as fn,cu as Sn,bt as In,Tw as yn,d9 as Rn,dc as vn,db as An,cF as kn}from"./zeni-epic-state-BVNUxmav.js";import{bS as Cn,X as qe,a1 as Xe,M as oe,y as x,z as _,cT as Ye,a8 as re,h as C,aS as je,I as F,ae as se,af as En,G as Je,cU as wn,p as Y,as as Ke,cV as xn,V as le,cW as Bn,aq as Tn,ab as Dn,a7 as ye,R as Qe,w as jn,bA as Fn,av as Un,ai as Ln,E as et,cX as _n,g as Mn}from"./index-DXVI9ztu.js";import{n as P,S as $n}from"./mui-BAsIRnB1.js";import pe from"./NotFoundScreen-BF2gJW91.js";import{S as Fe}from"./SetupPagesScreen-D0wYkNmR.js";import{F as tt}from"./FeaturePreviewScreen-CWY6I3fG.js";import{a as h}from"./sentry-lC29HHPj.js";import{u as Re}from"./useAskAiCfoHostNavButtonProps-C4hcJx1x.js";import{u as nt}from"./useInitialThreadRequest-BFDb_b7F.js";import{D as Pn}from"./DrawerScreen-BT9F-F5I.js";import{M as at}from"./MobileAppDrawer-DH0tVOfv.js";import{F as Nn}from"./ScreenRoutes-DW0KFZF8.js";import{R as On}from"./ReimbursementApprovalRoutes-Bt3jod66.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.js";import"./BusinessVerificationPageScreen-gxvPC9Nc.js";import"./routePaths-3iKgurJn.js";import"./analyticsHelper-BSm7IqEZ.js";import"./InboxNotificationsProvider-BU6hQETc.js";import"./useTaskManagerAccess-B7YJLgDK.js";import"./getLocaleForTenant-Ct5cBG_c.js";import"./ReimbursementApprovalRuleDetailScreen-Bc4MC7ZP.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]="2a467b25-7434-4eee-bed5-15fe86cce806",e._sentryDebugIdIdentifier="sentry-dbid-2a467b25-7434-4eee-bed5-15fe86cce806")}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}}}=Je.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(Lt())},clearRemiSaveStatus:()=>{e(Ut("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(Pe()),e(Ee({}));const i=st(o),l=Y(c.state?.pathnameStackToGoBack,c.pathname);d(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(C.trackReimbursementDeleteReimbursement(n),e($e(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 Ue(){const e=Q(),t=ae(),n=J(),{reimbursementId:r}=ie(),c=qe(),d=Xe(),[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=J().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))),U=nt(I?.companyId,{clearParams:g.fetchState==="Completed"}),L=he(I?.userRole??[]);(function(){const p=ae(),N=v((K=>Z(K))),O=N?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=Cn(O),H=v((K=>K.remiSetupApproverViewState.fetchState));h.useEffect((()=>{O==null||W||H==="Not-Started"&&p(ut(!0,!1,!1,z))}),[O,W,z,H,p])})(),h.useEffect((()=>{(j&&!A||D&&!A&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(k(!0),t(Le(!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"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx($,{to:R}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ye,{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(Wn,{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(Hn,{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(Xn,{windowSize:d,children:s.jsx(Gn,{initialOpenThreadRequest:U??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=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-C_WAhyd7.js";import{g as W,h as De,u as Fe,i as Oe,j as d,l as Ae,n as Pe,o as ee}from"./core-1xnf2RtE.js";import{fE as $,Dt as R,U1 as Ee,l_ as le,tA as ce,up as O,lF as Le,lO as A,lG as P,kJ as E,kA as L,kz as Me,CD as ie,uu as Be,bq as ve,U2 as Ve,bn as xe,DQ as ze,U3 as Ge,U4 as Ye,ci as S,Cw as He,U5 as ae,U6 as qe,U7 as Ne,U8 as $e,U9 as Qe,Ua as Ze,Ub as Je,Uc as Xe,Ud as Ke,Ue as We,Uf as ea,Ug as aa,Uh as sa,Ui as U,Uj as M,Uk as B,Ul as v,Um as V,Un as x,Uo as z,Up as G,Uq as Y,Ur as H,eb as ta,Du as oa,Dh as se,Di as te,DA as na,Dm as oe,DG as ra,Us as la,Ut as ca,Uu as ia,Uv as da,Uw as pa,Ux as _a,Uy as fa,Uz as ma,UA as ua,UB as ba,dY as ha,dX as ya}from"./zeni-epic-state-BVNUxmav.js";import{an as wa,ao as Ca,ap as ga,a as Sa,a1 as Ia,M as de,y as q,z as pe,aq as Ra,V as Ta,d as Ua,ar as ja,as as ka,a8 as Da,h as N,R as Fa,v as Oa,p as _e,at as Aa,au as Pa,av as Ea}from"./index-nXM19luG.js";import"./mui-BAsIRnB1.js";import La from"./NotFoundScreen-BHK2wcy4.js";import{F as Ma}from"./FeaturePreviewScreen-ClB4hfhH.js";import{a as u}from"./sentry-lC29HHPj.js";import{u as Ba}from"./useInitialThreadRequest-CbTk8gTV.js";import{t as ne,a as re,b as va}from"./routePaths-WEgtxKVV.js";import{M as Va}from"./MobileAppDrawer-ezuGFNmX.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.js";import"./InboxNotificationsProvider-BU6hQETc.js";import"./useTaskManagerAccess-CCKD6ndI.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]="4524b71a-8356-4c6c-9c21-899e4cd2fe54",e._sentryDebugIdIdentifier="sentry-dbid-4524b71a-8356-4c6c-9c21-899e4cd2fe54")}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(H({resetLeftScroll:!0})),e(Y({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(ua()),e(ba())},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(O(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((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="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(U(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(H({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(Y({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(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(Y({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(Xe({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(U(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(U(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(U(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Qe({classesToFilterOut:a})):I(o.selectedReportID)?e(Ze({classesToFilterOut:a})):e(Je({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():He()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(Ye(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 Ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=De(),s=Fe(),t=W(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(q.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,w]=u.useState(!1),[Q,fe]=u.useState(!1),{isFeatureEnabled:Z}=l(q.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const k=d((n=>$(n))),me=k.masterTOSInfo?.isMasterTOSAccepted??!1,ue=k.company?.companyInfo.firstMonthOfFY??1,be=Ba(Z?k?.companyId:void 0),C=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:b}=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)),F=d((n=>R(n).selectedReportAndTimeframeFetchState)),we=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(O(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!Q&&C==="Completed"&&b&&(s(O(i.userId,!1,!0,!1)),fe(!0))}),[c,Q,C,b]),u.useEffect((()=>{if(c&&F.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)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,F,b,T,g]);const J=Ta(),Ce=J?.loggedInUserRole!=null&&ve(J?.loggedInUserRole)!==!0,[ge,Se]=u.useState(!1),X=n=>{Se(n)},Ie=Ua(),Re=ja();return(function(n){const{isDataReady:Te}=n,{pathname:Ue}=W(),K=wa(Ue??"")==="reports",je=Ca(Te),ke=u.useMemo((()=>K?xa:void 0),[K]);ga({canFetchSuggestedQuestions:je,pageContexts:ke})})({isDataReady:C==="Completed"}),ka({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Da,{analytics:N,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(Va,{isAppContentDrawerOpen:ge,handleDrawerToggle:X}),p.jsx(Ga,{firstMonthOfFY:ue,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:we,selectedReportID:D,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:Ce,signedInUser:i,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:X,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 Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Z,initialOpenThreadRequest:be})]})}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(Ya,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
1
|
+
import{j as p}from"./liveblocks-C_WAhyd7.js";import{g as W,h as De,u as Fe,i as Oe,j as d,l as Ae,n as Pe,o as ee}from"./core-1xnf2RtE.js";import{fE as $,Dt as R,U1 as Ee,l_ as le,tA as ce,up as O,lF as Le,lO as A,lG as P,kJ as E,kA as L,kz as Me,CD as ie,uu as Be,bq as ve,U2 as Ve,bn as xe,DQ as ze,U3 as Ge,U4 as Ye,ci as S,Cw as He,U5 as ae,U6 as qe,U7 as Ne,U8 as $e,U9 as Qe,Ua as Ze,Ub as Je,Uc as Xe,Ud as Ke,Ue as We,Uf as ea,Ug as aa,Uh as sa,Ui as U,Uj as M,Uk as B,Ul as v,Um as V,Un as x,Uo as z,Up as G,Uq as Y,Ur as H,eb as ta,Du as oa,Dh as se,Di as te,DA as na,Dm as oe,DG as ra,Us as la,Ut as ca,Uu as ia,Uv as da,Uw as pa,Ux as _a,Uy as fa,Uz as ma,UA as ua,UB as ba,dY as ha,dX as ya}from"./zeni-epic-state-BVNUxmav.js";import{an as wa,ao as Ca,ap as ga,a as Sa,a1 as Ia,M as de,y as q,z as pe,aq as Ra,V as Ta,d as Ua,ar as ja,as as ka,a8 as Da,h as N,R as Fa,v as Oa,p as _e,at as Aa,au as Pa,av as Ea}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import La from"./NotFoundScreen-BF2gJW91.js";import{F as Ma}from"./FeaturePreviewScreen-CWY6I3fG.js";import{a as u}from"./sentry-lC29HHPj.js";import{u as Ba}from"./useInitialThreadRequest-BFDb_b7F.js";import{t as ne,a as re,b as va}from"./routePaths-3iKgurJn.js";import{M as Va}from"./MobileAppDrawer-DH0tVOfv.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.js";import"./InboxNotificationsProvider-BU6hQETc.js";import"./useTaskManagerAccess-B7YJLgDK.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]="4524b71a-8356-4c6c-9c21-899e4cd2fe54",e._sentryDebugIdIdentifier="sentry-dbid-4524b71a-8356-4c6c-9c21-899e4cd2fe54")}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(H({resetLeftScroll:!0})),e(Y({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(ua()),e(ba())},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(O(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((w=>w!=="this_period_vs_same_period_last_year"&&w!=="this_period_vs_same_period_last_year_percent"&&w!=="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(U(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(H({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(Y({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(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(Y({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(Xe({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(U(l?"cash_flow_by_classes":r?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",j(t)),e(U(l?"cash_flow_by_projects":r?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",j(t)),e(U(l?"cash_flow":r?"balance_sheet":"profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{S(o.selectedReportID)?e(Qe({classesToFilterOut:a})):I(o.selectedReportID)?e(Ze({classesToFilterOut:a})):e(Je({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():He()),o.isAccountingProjectsEnabled&&e(s?A():a?E():ie())},onUpdateDisplayOrder:a=>{e(Ye(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 Ya(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Sa(),_=Ia(),m=Pa(_),a=De(),s=Fe(),t=W(),{tenantEmailDomain:r}=Oe(),{useFeatureGate:l}=de(),{isFeatureEnabled:f}=l(q.isReportsHorizontalClassLayoutSwitchEnabled),i=pe.getSignedInUser(),[c,w]=u.useState(!1),[Q,fe]=u.useState(!1),{isFeatureEnabled:Z}=l(q.isReportsCommentingEnabled);if(i==null)throw Error("Can't access reports page without signing in...");const k=d((n=>$(n))),me=k.masterTOSInfo?.isMasterTOSAccepted??!1,ue=k.company?.companyInfo.firstMonthOfFY??1,be=Ba(Z?k?.companyId:void 0),C=d((n=>R(n).fetchState)),he=d((n=>Ee(n))),{areTenantIdsInSync:b}=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)),F=d((n=>R(n).selectedReportAndTimeframeFetchState)),we=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!c&&b&&(w(!0),s(O(i.userId,!0,!0,!1)))}),[c,i,s,b]),u.useEffect((()=>{c&&!Q&&C==="Completed"&&b&&(s(O(i.userId,!1,!0,!1)),fe(!0))}),[c,Q,C,b]),u.useEffect((()=>{if(c&&F.fetchState==="Not-Started"&&h.timeframe!=="free_range"&&h.timeframe!=="week"&&b)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,F,b,T,g]);const J=Ta(),Ce=J?.loggedInUserRole!=null&&ve(J?.loggedInUserRole)!==!0,[ge,Se]=u.useState(!1),X=n=>{Se(n)},Ie=Ua(),Re=ja();return(function(n){const{isDataReady:Te}=n,{pathname:Ue}=W(),K=wa(Ue??"")==="reports",je=Ca(Te),ke=u.useMemo((()=>K?xa:void 0),[K]);ga({canFetchSuggestedQuestions:je,pageContexts:ke})})({isDataReady:C==="Completed"}),ka({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(Da,{analytics:N,onLoad:n=>n.trackPageLoaded(Fa.Event.reports)}):null,p.jsx(Va,{isAppContentDrawerOpen:ge,handleDrawerToggle:X}),p.jsx(Ga,{firstMonthOfFY:ue,tenantEmailDomain:r,location:t,navigate:a,windowSize:_,classViewLayout:we,selectedReportID:D,analytics:N,filter:h,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:ye,hasTransactionAccess:Ce,signedInUser:i,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:X,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 Oa({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:f,isReportsCommentingEnabled:Z,initialOpenThreadRequest:be})]})}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(Ya,{})}),p.jsx(ee,{path:"*",element:p.jsx(La,{})})]})}export{_s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-C_WAhyd7.js";import{z as j,a8 as E,h as u,R as N,e3 as S,M as k,y as C}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-C_WAhyd7.js";import{z as j,a8 as E,h as u,R as N,e3 as S,M as k,y as C}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import g from"./NotFoundScreen-BF2gJW91.js";import{a as m}from"./sentry-lC29HHPj.js";import{u as I,j as h,h as F,g as L,l as _,n as T,o as d,N as y}from"./core-1xnf2RtE.js";import{fE as U,a17 as w,a18 as p,D8 as P,p_ as V,a19 as R,D6 as z}from"./zeni-epic-state-BVNUxmav.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.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]="a4d3df2a-fc0c-4871-8a3e-b214dc58890c",e._sentryDebugIdIdentifier="sentry-dbid-a4d3df2a-fc0c-4871-8a3e-b214dc58890c")}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=j.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((c=>{s.push(c.companyName),r.push(c.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(R({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(S),M=()=>{const e=I(),[t,n]=m.useState(!1),[i,s]=m.useState(!1),r=h((o=>U(o))),c=F(),x=L(),f=j.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>w(o))),b=f?.firstName!=null?f.firstName:"User";m.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),m.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(E,{analytics:u,onLoad:o=>(v=>v.trackPageLoaded(N.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:c,location:x,currentTenant:r,companyName:D,userName:b,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=k(),{isFeatureEnabled:t}=e(C.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(M,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as E}from"./liveblocks-C_WAhyd7.js";import{a as I}from"./sentry-lC29HHPj.js";import{i as M,u as q,h as W,g as z,j as h,l as Z}from"./core-1xnf2RtE.js";import{V$ as we,W0 as be,l_ as X,rS as Je,s2 as Ne,sk as je,si as Oe,sl as Pe,so as _e,W1 as Ve,fE as F,U_ as oe,W2 as de,gZ as H,cB as Q,cC as ee,Ey as ge,W3 as Se,EC as Me,Sn as ie,Ew as Ge,Eq as Re,W4 as ue,Ei as $e,Eh as Fe,Ec as Ue,En as Ye,ED as Ke,W5 as U,W6 as re,Ej as We,U$ as te,gN as fe,ET as Ee,EM as De,W7 as ke,rY as Ce,EG as ye,EE as ve,W8 as Ae,E_ as Ie,EX as xe,EH as Te,EZ as Be}from"./zeni-epic-state-BVNUxmav.js";import{a4 as ae,aY as ne,aZ as ze,z as qe,l as Ze,a7 as Xe,a8 as le,h as O,av as He,a_ as Qe,p as _,G as he,X as me,a$ as et,b0 as tt,b1 as at}from"./index-
|
|
1
|
+
import{j as E}from"./liveblocks-C_WAhyd7.js";import{a as I}from"./sentry-lC29HHPj.js";import{i as M,u as q,h as W,g as z,j as h,l as Z}from"./core-1xnf2RtE.js";import{V$ as we,W0 as be,l_ as X,rS as Je,s2 as Ne,sk as je,si as Oe,sl as Pe,so as _e,W1 as Ve,fE as F,U_ as oe,W2 as de,gZ as H,cB as Q,cC as ee,Ey as ge,W3 as Se,EC as Me,Sn as ie,Ew as Ge,Eq as Re,W4 as ue,Ei as $e,Eh as Fe,Ec as Ue,En as Ye,ED as Ke,W5 as U,W6 as re,Ej as We,U$ as te,gN as fe,ET as Ee,EM as De,W7 as ke,rY as Ce,EG as ye,EE as ve,W8 as Ae,E_ as Ie,EX as xe,EH as Te,EZ as Be}from"./zeni-epic-state-BVNUxmav.js";import{a4 as ae,aY as ne,aZ as ze,z as qe,l as Ze,a7 as Xe,a8 as le,h as O,av as He,a_ as Qe,p as _,G as he,X as me,a$ as et,b0 as tt,b1 as at}from"./index-DXVI9ztu.js";import{n as pe}from"./mui-BAsIRnB1.js";import{p as nt}from"./pathToGoBack-BmzgWhs1.js";import K from"./NotFoundScreen-BF2gJW91.js";import{c as V}from"./routePaths-3iKgurJn.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]="75ba52c8-d0dd-446f-a42a-e46e1795784a",e._sentryDebugIdIdentifier="sentry-dbid-75ba52c8-d0dd-446f-a42a-e46e1795784a")}catch{}})();function wt({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:d}={}){const{accrualId:l}=M(),s=t??l,n=q(),u=W(),a=z(),{accrual:c,actionFetchState:o,detailFetchState:f,localData:D}=h((i=>we(i,s??""))),C=h((i=>be(i))),x=h((i=>X(i))),r=I.useCallback((()=>{const i=ae(a.state?.pathnameStackToGoBack);u(i.poppedPathname??nt(4),{state:{pathnameStackToGoBack:i.newStack}})}),[a.state,u]),k=I.useRef(!1);return I.useEffect((()=>{o.fetchState!=="In-Progress"&&k.current&&o.fetchState==="Completed"&&(k.current=!1,r())}),[o.fetchState,r]),I.useEffect((()=>{s!=null&&c==null&&f.fetchState==="Not-Started"&&n(Je(s))}),[s,c,f.fetchState]),I.useEffect((()=>{n(Ne({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),s==null?E.jsx(K,{}):c==null?f.fetchState==="Not-Started"||f.fetchState==="In-Progress"?E.jsx(ne,{}):E.jsx(K,{}):E.jsx(ze,{isRenderedInPanel:e,accrual:c,actionFetchState:o.fetchState,isAccountingClassesEnabled:x,localData:D,newAccrualAccountsView:C,onAccrualFormChange:(i,m)=>{n(Ve({accrualId:i,localData:m}))},onAccrualFormClear:i=>{n(_e({accrualId:i}))},onApproveAndPost:i=>{n(Pe(s,i))},onNavigateBack:d??r,onRevert:(i,m)=>{k.current=!0,n(Oe(s,i,m))},onSkip:(i,m)=>{n(je(s,i,m))}})}const lt=he.getLocalizedStrings(),st=Z((function(e,t){const d=de(e,t.scheduleTab),l=e.tenantState.currentTenantId;return{authParams:{userId:t.signedInUser.userId??"",sessionId:t.signedInUser.zeniSessionId??"",tenantId:l??""},linkBillExpenseView:d.linkBillExpenseView,transactions:d.linkBillExpenseView.transactions}}),(function(e,t){const{navigate:d,location:l}=t;return{onTransactionSelect(s){e(Se({selectedTransaction:s}))},onBackClick:()=>{d("..",{relative:"path"})},onCancel(){e(Se({selectedTransaction:void 0})),e(Me()),d("..",{relative:"path"})},onTransactionClick:s=>{const n=`${V(s,t.tenantEmailDomain)}`,u=_(l.state?.pathnameStackToGoBack,l.pathname);d(n,{state:{pathnameStackToGoBack:u}})},onLinkSave(){t.setShouldNavigateBack(!1),e(ge(t.scheduleTab,t.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(Qe),bt=({setShouldNavigateBack:e})=>{const t=W(),d=z(),{scheduleDetailId:l,tenantEmailDomain:s}=M(),{scheduleType:n}=M();if(s==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const u=h((r=>F(r))),a=oe(n)??"accrued_expenses",c=qe.getSignedInUser();if(c==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(l==null)throw Error("Invalid Schedule Detail Id");const o=h((r=>de(r,a))),f=o.selectedJELinkRowIndex,D=h((r=>H(r,u.companyId))),C=Ze(o.updateStatus.fetchState);I.useEffect((()=>{C==="In-Progress"&&o.updateStatus.fetchState==="Completed"&&t("..",{relative:"path"})}),[C,o.updateStatus.fetchState]),I.useEffect((()=>{o.fetchState==="Not-Started"&&t("..",{relative:"path"})}),[]),I.useEffect((()=>{o.selectedJEAccruedSchedule!=null&&o.selectedJELinkRowIndex!=null||t("..",{relative:"path"})}),[o.selectedJEAccruedSchedule,o.selectedJELinkRowIndex]);const x=o.linkBillExpenseView.fetchState==="Completed";return E.jsx(E.Fragment,{children:o.linkBillExpenseView.fetchState==="In-Progress"?E.jsx(Xe,{fetchState:o.linkBillExpenseView.fetchState}):o.selectedJEAccruedSchedule!=null&&f!=null?E.jsxs(E.Fragment,{children:[x===!0?E.jsx(le,{analytics:O,onLoad:()=>{ct(o,a,D)}}):null,E.jsx(st,{signedInUser:c,attachmentEndPoint:`${He}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:o.selectedJEAccruedSchedule.vendor.id??"",location:d,tenantEmailDomain:s,scheduleAccruedDetailsView:o,saveFetchState:o.updateStatus.fetchState,scheduleTab:a,navigate:t,analytics:O,controllerUserDetails:D,saveStatus:o.updateStatus.fetchState,jeAccruedSchedule:o.selectedJEAccruedSchedule,localData:o.scheduleAccruedDetailsLocalData.jeScheduleDetails[f]})]}):null})},Le=e=>{const t=lt.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(t)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(t)??null,endMonth:e.endDate?.format(t)??null}},ct=(e,t,d)=>{const l=e.selectedJEAccruedSchedule,s=e.selectedJELinkRowIndex;let n;s!=null&&l!=null&&(n=l.scheduledJournalEntry[s]);const{transactions:u}=e.linkBillExpenseView,a=u.some((f=>f.isRecommendedTransaction===!0)),c=Q(d.controllers),o=ee(d.controllerUserIds);l!=null&&O.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:t,schedule:{...Le(l)},scheduleExpenseCategoryAndClass:{expenseCategory:l.jeDebit.account?.accountName??null,expenseClass:l.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:a,journalEntryPostingStatus:n?.status.label??""},vendorName:l.vendor.name??null,controllerEmails:c,controllerUserIds:o})},ot=pe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -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 ms,fE as _s,dY as hs,dX as Es,Al as ps,dh as gs,c8 as xs,gI as Rs,g8 as Is,de as pe,cG as js,gm as Ts,cy as As,bE as ys,br as fs,Ts as Ds,v as bs,Tv as Cs,bq as vs,Tw as Os,bK as Ps,bJ as ws,bt as Us,cu as Fs,Tx as Ls,Ty as ks,d9 as Vs,dc as Hs,db as Ss,cF as Bs,cM as Ns,pR as ge,gh as xe,gX as Ms,gj as Re,gK as Ie,gL as je,gk as Zs}from"./zeni-epic-state-BVNUxmav.js";import{j as e}from"./liveblocks-C_WAhyd7.js";import{a as w}from"./sentry-lC29HHPj.js";import{N as u,u as $s,h as Gs,i as zs,g as Ys,j as G,q as Te,n as qs,o as t}from"./core-1xnf2RtE.js";import{N as l,E as Ws,u as Xs,z as D,M as Ks,d as Js,e as Qs,y as M,g as en,$ as sn,V as nn,L as F,G as Ae,t as _,P as tn,O as an,h as ne}from"./index-nXM19luG.js";import"./mui-BAsIRnB1.js";import{f as ye}from"./analyticsHelper-Cw60VlOq.js";import{t as on}from"./getLocaleForTenant-Cb4ANH4Q.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]="c0d0d858-d313-495a-9af9-25902a9b5df4",a._sentryDebugIdIdentifier="sentry-dbid-c0d0d858-d313-495a-9af9-25902a9b5df4")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-BHK2wcy4.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ln=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),un=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),fe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),be=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),b=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:S,showTreasuryRoute:i,isTenantBankingOnly:k,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(k===!0){if(a)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(be,{tenantEmailDomain:v})}return a?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(be,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):S?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-BKHZJKkt.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-CnpuGuHe.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-DxyXmLRP.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-D9kITRhY.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-BOJoESyV.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-C6GStBGQ.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-DgTzZTph.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-CNtwYayL.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-BJzy8xal.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-C6jv6nMF.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-CaVrball.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-GdGf0SYA.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},cn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},mn=l((()=>s((()=>import("./ReportsRoutes-C6GStBGQ.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes--gUEIlXc.js")),__vite__mapDeps([56,1,2,3,25,4,5,6,7,0,8])))),hn=l((()=>s((()=>import("./PeopleRoutes-CNtwYayL.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),En=l((()=>s((()=>import("./PandLWithForecastRoutes-BbdTHIrJ.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-BKJm_JEE.js")),__vite__mapDeps([58,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-CaVrball.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])))),xn=l((()=>s((()=>import("./TransactionDetailRoutes-WkmYYr0f.js")),__vite__mapDeps([59,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-CjcEzz2g.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),Rn=l((()=>s((()=>import("./DashboardRoutes-BKHZJKkt.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-CnpuGuHe.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])))),In=l((()=>s((()=>import("./SettingsRoutes-BOJoESyV.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])))),jn=l((()=>s((()=>import("./InvoicingRoutes-B1gAqEf9.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-DxyXmLRP.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])))),Tn=l((()=>s((()=>import("./ZeniAccountRoutes-GdGf0SYA.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),An=l((()=>s((()=>import("./TreasuryRoutes-C6jv6nMF.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),yn=l((()=>s((()=>import("./TransactionListRoutes-D9kITRhY.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),fn=l((()=>s((()=>import("./ChargeCardRoutes-DgTzZTph.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),Dn=l((()=>s((()=>import("./NotificationRoutes-CJaAWW0k.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,21,8])))),bn=l((()=>s((()=>import("./PerformanceRoutes-DKKm8Wqd.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-BJzy8xal.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-DsLNX64E.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-CQy6J4IF.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,14,19,20,21,66,11,8])))),Pn=l((()=>s((()=>import("./AiCfoScreen-BQaocZqa.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,22,52,15,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-V1ZiSm5h.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-BHK2wcy4.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),wn=l((()=>s((()=>import("./TaskListScreen-CnVcsAwc.js").then((a=>a.f))),__vite__mapDeps([66,1,2,3,4,5,6,7,11,19,20,21,8])))),Un=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:i,showTreasuryRoute:k,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):S?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},we=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Mn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=$s(),S=Gs(),{tenantEmailDomain:i}=zs(),k=Ws().mode,{setLoading:O,clearAllLoading:v,clearLoading:V}=Xs(),y=D.getSignedInUserTenant(i)?.tenantId,j=D.getSignedInUser(),X=ms(j),z=Ys(),[L,Ue]=w.useState(!1),r=G((o=>_s(o))),{useFeatureGate:B}=Ks(),Z=Js(),ae=Qs(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=B(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=B(M.isDebitCardFeatureEnabled),T=G((o=>o.tenantState.fetchState)),p=G((o=>o.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||T==="Completed"?hs(oe,r):void 0,K=p==="Completed"||T==="Completed"?Es(r):void 0,re=p==="Completed"||T==="Completed"?ps(r)&&!gs(r):void 0,Ve=en(r,ke,oe),{isCardsHidden:He}=sn(r?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=B(M.isSettingsFeatureEnabled),{isFeatureEnabled:J}=B(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=B(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||an==="DEV",Ze=r?.userRole!=null&&xs(r.userRole),Y=G((o=>Rs(o)));if(i!=null){const o=D.getSignedInUserTenant(i);j!=null&&o!=null&&ye(j,r,k)}const $={tenantId:y,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Is(),E=nn(),$e=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Ge=js(E?.loggedInUserRoleMap),Q=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ze=G((o=>$.tenantId!=null?Ts(o,$.tenantId):void 0));w.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),w.useEffect((()=>{if(ee!=null&&y!=null){const o=ee.params.selectedPeriod;if(o!=null){const f=o.split("-");if(f.length===2){const d=As(Number(f[0])),n=Number(f[1]),c=ys(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=fs();c.isAfter(N,"month")===!1?A(Ds(y,{month:d,year:n})):S(`/${i}/month_end_close_checks/review`)}}}}),[ee,y]),w.useEffect((()=>{L||(Ue(!0),O(F.TENANT_FETCHING))}),[L,$,ie,j,A,D]),w.useLayoutEffect((()=>{!bs(ie,$)&&D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,n){if(xe(f?.userId,f?.zeniSessionId,o.tenantId),d(Ms(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=D.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(on(n)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})($,j,A,ze))}),[y]),w.useEffect((()=>{D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,n,c,N,H){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const q=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(q&&us){H(Re(n));const W=D.getSignedInUserTenantWithId(n);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(je(c.userId,n)))}else q&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(Ie(c.userId,n))),q&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(je(c.userId,n)));if(q){ne.identify(c.userId,{tenant_id:n});const W=n==null||n!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),H(Zs(c.userId,n,c.zeniSessionId))),W&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,y,j,O,A))}),[y,p]),w.useEffect((()=>{D.isSignedIn()&&T==="Completed"&&Y.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),D.saveSignedInUserTenants(Cs(Y.tenantsBaseInOrder)),j!=null&&ye(j,r,k,void 0,Y.tenantsBaseInOrder))}),[Y,T,r,j]),w.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(v(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,y,L]);const le=w.useRef(!1);w.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,f=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=dn[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),f)})())}),[p,L]);const P=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:Ye}=B(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),We=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),U=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Se&&!P,Xe=Os(E?.loggedInUserRoleMap),Ke=r.externalConnections?.accounting[0]?.isValid,Je=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&Ps(E?.loggedInUserRoleMap),_e=Fe&&!P,Qe=Le&&!P,es=ue&&ws(E?.loggedInUserRoleMap),ss=de&&Us(E?.loggedInUserRoleMap),ns=_e&&Fs(E?.loggedInUserRoleMap),ts=Ls(E?.loggedInUserRoleMap),as=ks(E?.loggedInUserRoleMap),os=Vs(E?.loggedInUserRoleMap),rs=Hs(E?.loggedInUserRoleMap),is=Ss(E?.loggedInUserRoleMap),g=Bs(E?.loggedInUserRoleMap),x=Ns(E?.loggedInUserRoleMap),he=ue&&g,Ee=ce&&x,R=_e&&os,I=Qe&&rs,m=de&&is,ls=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||Ge===!0||Xe===!0||ts===!0||as===!0;return D.isSignedIn()?y==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(j!=null&&T!=="In-Progress"&&A(ge(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||X&&!Q)&&Je&&Ke!==!0&&h===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||Q||X?!L||se!==!1||Q||X?L&&r?.userRole&&h!=null&&K!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(qs,{children:e.jsxs(t,{element:e.jsx(tn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Un,{isDashboardAccess:U,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:U?e.jsx(Rn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:U?e.jsx(mn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ls||U?e.jsx(hn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:U?e.jsx(En,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(pn,{})}),e.jsx(t,{path:"transaction/*",element:U&&P===!1||qe||We?e.jsx(xn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:U&&P===!1?e.jsx(yn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:U&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:U&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(wn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(On,{})}),e.jsx(t,{path:"address/*",element:es||me||ns||ss?e.jsx(_n,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(Tn,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:I?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(bn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(Cn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(Dn,{})}),e.jsx(t,{path:"vendors/*",element:$e?e.jsx(gn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:he?e.jsx(ve,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:he?e.jsx(ve,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Be?e.jsx(In,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(jn,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:J}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:J}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(fn,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:Ye?e.jsx(vn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Pn,{isFileUploadEnabled:J}):e.jsx(C,{})}),e.jsx(t,{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{b as F,Mn as S};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-BF2gJW91.js","assets/sentry-lC29HHPj.js","assets/core-1xnf2RtE.js","assets/zeni-epic-state-BVNUxmav.js","assets/index-DXVI9ztu.js","assets/mui-BAsIRnB1.js","assets/analytics-N153TuwK.js","assets/utils-BBaMea9r.js","assets/index-BhC2LNQw.css","assets/DashboardRoutes-CxJPxihE.js","assets/withTransactionSidePanel-CkEUNYr4.js","assets/useAskAiCfoHostNavButtonProps-C4hcJx1x.js","assets/TransactionDetailScreen-p3o65tsz.js","assets/decodeURIComponentSafe-DcD-XNVX.js","assets/useInitialThreadRequest-BFDb_b7F.js","assets/routePaths-3iKgurJn.js","assets/expenseAutomationHelper-CNRtAWpH.js","assets/analyticsHelper-BSm7IqEZ.js","assets/CompanyPassportScreen-XQqdGh6R.js","assets/MobileAppDrawer-DH0tVOfv.js","assets/InboxNotificationsProvider-BU6hQETc.js","assets/useTaskManagerAccess-B7YJLgDK.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DtwiUC9S.js","assets/FeaturePreviewScreen-CWY6I3fG.js","assets/BillPayRoutes-CWQjup6l.js","assets/AddressScreen-ueBXhh2E.js","assets/DomesticWireDetailScreen-Cpm9Bc_C.js","assets/BusinessVerificationPageScreen-gxvPC9Nc.js","assets/DrawerScreen-BT9F-F5I.js","assets/SetupPagesScreen-D0wYkNmR.js","assets/BillPayApprovalRoutes-DIMv5HVt.js","assets/ReimbursementApprovalRuleDetailScreen-Bc4MC7ZP.js","assets/getLocaleForTenant-Ct5cBG_c.js","assets/ReimbursementRoutes-DGCHkbRG.js","assets/ReimbursementApprovalRoutes-Bt3jod66.js","assets/TransactionListRoutes-BNdbZ30T.js","assets/ZeniAccountStatementScreen-CBSpTdBS.js","assets/SettingsRoutes-CapPSjQN.js","assets/AccountMappingScreen-BBc4_4t5.js","assets/QBOConnectionScreen-3h-qdoms.js","assets/empty-GMcl-a5k.js","assets/index-Ctq16f6K.js","assets/url-LYbpMOZt.js","assets/index-Dc3AC-iD.js","assets/accountMappingHelper-DeDocU0d.js","assets/useEmailConnectResultRefresh-BzSlD1q5.js","assets/ReportsRoutes-C7NbqVqm.js","assets/ChargeCardRoutes-Bh1W2yGQ.js","assets/useChargeCardPusherEvents-BQSY-ppK.js","assets/PeopleRoutes-BBOCzTBv.js","assets/ExpenseAutomationRoutes-BAcJRoU4.js","assets/ScheduleDetailsPrepaidExpensesScreen-CplHlAVo.js","assets/pathToGoBack-BmzgWhs1.js","assets/TreasuryRoutes-DR87vhnp.js","assets/VendorsRoutes-CropWmWa.js","assets/ZeniAccountRoutes-BROaca6I.js","assets/AddressRoutes-DUeinmsu.js","assets/PandLWithForecastRoutes-D_qmzE70.js","assets/CustomerOnboardingRoutes-DTHzcTqs.js","assets/TransactionDetailRoutes-B97JNzan.js","assets/EntityDetailRoutes-GrYbpLDE.js","assets/InvoicingRoutes-BVupJlN7.js","assets/NotificationRoutes-CnZ8t_aV.js","assets/PerformanceRoutes-C5sk5hTF.js","assets/RewardsRoutes-CnXmBpce.js","assets/TaskRoutes-DjWmgiZP.js","assets/TaskListScreen-CsxsJBj1.js","assets/AiCfoScreen-CSA0NZQ_.js","assets/CardsAiCfoScreen-X_JzwNdn.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as ms,fE as _s,dY as hs,dX as Es,Al as ps,dh as gs,c8 as xs,gI as Rs,g8 as Is,de as pe,cG as js,gm as Ts,cy as As,bE as ys,br as fs,Ts as Ds,v as bs,Tv as Cs,bq as vs,Tw as Os,bK as Ps,bJ as ws,bt as Us,cu as Fs,Tx as Ls,Ty as ks,d9 as Vs,dc as Hs,db as Ss,cF as Bs,cM as Ns,pR as ge,gh as xe,gX as Ms,gj as Re,gK as Ie,gL as je,gk as Zs}from"./zeni-epic-state-BVNUxmav.js";import{j as e}from"./liveblocks-C_WAhyd7.js";import{a as w}from"./sentry-lC29HHPj.js";import{N as u,u as $s,h as Gs,i as zs,g as Ys,j as G,q as Te,n as qs,o as t}from"./core-1xnf2RtE.js";import{N as l,E as Ws,u as Xs,z as D,M as Ks,d as Js,e as Qs,y as M,g as en,$ as sn,V as nn,L as F,G as Ae,t as _,P as tn,O as an,h as ne}from"./index-DXVI9ztu.js";import"./mui-BAsIRnB1.js";import{f as ye}from"./analyticsHelper-BSm7IqEZ.js";import{t as on}from"./getLocaleForTenant-Ct5cBG_c.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]="c0d0d858-d313-495a-9af9-25902a9b5df4",a._sentryDebugIdIdentifier="sentry-dbid-c0d0d858-d313-495a-9af9-25902a9b5df4")}catch{}})();const rn=l((()=>s((()=>import("./NotFoundScreen-BF2gJW91.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ln=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/reimbursements`}),un=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/bills`}),fe=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/treasury`}),De=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/checking`}),be=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/cards`}),b=({showZeniAccountRoute:a,isUserHasBillPayAccess:A,isUserHasReimbursementAccess:S,showTreasuryRoute:i,isTenantBankingOnly:k,showChargeCardRoute:O,tenantEmailDomain:v})=>{if(k===!0){if(a)return e.jsx(De,{tenantEmailDomain:v});if(i)return e.jsx(fe,{tenantEmailDomain:v});if(O)return e.jsx(be,{tenantEmailDomain:v})}return a?e.jsx(De,{tenantEmailDomain:v}):i?e.jsx(fe,{tenantEmailDomain:v}):O?e.jsx(be,{tenantEmailDomain:v}):A?e.jsx(un,{tenantEmailDomain:v}):S?e.jsx(ln,{tenantEmailDomain:v}):e.jsx(rn,{})},dn={dashboard:()=>s((()=>import("./DashboardRoutes-CxJPxihE.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-CWQjup6l.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-DGCHkbRG.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-BNdbZ30T.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])),settings:()=>s((()=>import("./SettingsRoutes-CapPSjQN.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-C7NbqVqm.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-Bh1W2yGQ.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-BBOCzTBv.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-BAcJRoU4.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])),treasury:()=>s((()=>import("./TreasuryRoutes-DR87vhnp.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])),vendors:()=>s((()=>import("./VendorsRoutes-CropWmWa.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-BROaca6I.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8]))},cn=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],te=a=>{"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,100)},mn=l((()=>s((()=>import("./ReportsRoutes-C7NbqVqm.js")),__vite__mapDeps([46,1,2,3,4,5,6,7,0,23,14,15,19,20,21,8])))),_n=l((()=>s((()=>import("./AddressRoutes-DUeinmsu.js")),__vite__mapDeps([56,1,2,3,25,4,5,6,7,0,8])))),hn=l((()=>s((()=>import("./PeopleRoutes-BBOCzTBv.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,0,11,19,20,21,8])))),En=l((()=>s((()=>import("./PandLWithForecastRoutes-D_qmzE70.js")),__vite__mapDeps([57,1,2,3,4,5,6,7,0,23,11,14,15,19,20,21,8])))),pn=l((()=>s((()=>import("./CustomerOnboardingRoutes-DTHzcTqs.js")),__vite__mapDeps([58,1,2,3,25,4,5,6,7,0,39,40,41,42,43,13,45,48,8])))),gn=l((()=>s((()=>import("./VendorsRoutes-CropWmWa.js")),__vite__mapDeps([54,1,2,3,4,5,6,7,25,0,23,51,52,15,11,19,20,21,28,44,8])))),xn=l((()=>s((()=>import("./TransactionDetailRoutes-B97JNzan.js")),__vite__mapDeps([59,1,2,3,0,4,5,6,7,12,11,13,14,15,16,8])))),Ce=l((()=>s((()=>import("./EntityDetailRoutes-GrYbpLDE.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,13,10,11,12,14,15,16,8])))),Rn=l((()=>s((()=>import("./DashboardRoutes-CxJPxihE.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-CWQjup6l.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])))),In=l((()=>s((()=>import("./SettingsRoutes-CapPSjQN.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])))),jn=l((()=>s((()=>import("./InvoicingRoutes-BVupJlN7.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,25,0,19,20,21,39,40,41,42,43,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-DGCHkbRG.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])))),Tn=l((()=>s((()=>import("./ZeniAccountRoutes-BROaca6I.js")),__vite__mapDeps([55,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,23,26,25,11,36,8])))),An=l((()=>s((()=>import("./TreasuryRoutes-DR87vhnp.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,29,27,15,19,20,21,17,11,14,23,8])))),yn=l((()=>s((()=>import("./TransactionListRoutes-BNdbZ30T.js")),__vite__mapDeps([35,1,2,3,4,5,6,7,10,11,12,13,14,15,16,36,8])))),fn=l((()=>s((()=>import("./ChargeCardRoutes-Bh1W2yGQ.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,11,19,20,21,29,27,15,0,17,14,48,25,8])))),Dn=l((()=>s((()=>import("./NotificationRoutes-CnZ8t_aV.js")),__vite__mapDeps([62,1,2,3,0,4,5,6,7,11,21,8])))),bn=l((()=>s((()=>import("./PerformanceRoutes-C5sk5hTF.js")),__vite__mapDeps([63,1,2,3,0,4,5,6,7,11,19,20,21,8])))),Cn=l((()=>s((()=>import("./ExpenseAutomationRoutes-BAcJRoU4.js")),__vite__mapDeps([50,1,2,3,0,4,5,6,7,11,12,13,14,15,16,51,52,10,44,28,8])))),vn=l((()=>s((()=>import("./RewardsRoutes-CnXmBpce.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,0,8])))),On=l((()=>s((()=>import("./TaskRoutes-DjWmgiZP.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,14,19,20,21,66,11,8])))),Pn=l((()=>s((()=>import("./AiCfoScreen-CSA0NZQ_.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,22,52,15,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-X_JzwNdn.js")),__vite__mapDeps([68,1,2,3,4,5,6,7,8])))),C=l((()=>s((()=>import("./NotFoundScreen-BF2gJW91.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),wn=l((()=>s((()=>import("./TaskListScreen-CsxsJBj1.js").then((a=>a.f))),__vite__mapDeps([66,1,2,3,4,5,6,7,11,19,20,21,8])))),Un=({isDashboardAccess:a,showZeniAccountRoute:A,isUserHasBillPayAccess:S,isUserHasReimbursementAccess:i,showTreasuryRoute:k,isTenantBankingOnly:O,isTenantCardsOnly:v,showChargeCardRoute:V})=>{if(O===!0){if(A)return e.jsx(u,{to:"checking"});if(k)return e.jsx(u,{to:"treasury"});if(V)return e.jsx(u,{to:"cards"})}return v===!0&&V?e.jsx(u,{to:"cards"}):a?e.jsx(u,{to:"dashboard"}):A?e.jsx(u,{to:"checking"}):k?e.jsx(u,{to:"treasury"}):V?e.jsx(u,{to:"cards"}):S?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},we=({tenantEmailDomain:a})=>e.jsx(u,{to:`/${a}/dashboard`}),Mn=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:a}){const A=$s(),S=Gs(),{tenantEmailDomain:i}=zs(),k=Ws().mode,{setLoading:O,clearAllLoading:v,clearLoading:V}=Xs(),y=D.getSignedInUserTenant(i)?.tenantId,j=D.getSignedInUser(),X=ms(j),z=Ys(),[L,Ue]=w.useState(!1),r=G((o=>_s(o))),{useFeatureGate:B}=Ks(),Z=Js(),ae=Qs(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=B(M.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=B(M.isDebitCardFeatureEnabled),T=G((o=>o.tenantState.fetchState)),p=G((o=>o.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||T==="Completed"?hs(oe,r):void 0,K=p==="Completed"||T==="Completed"?Es(r):void 0,re=p==="Completed"||T==="Completed"?ps(r)&&!gs(r):void 0,Ve=en(r,ke,oe),{isCardsHidden:He}=sn(r?.tenantId),Se=!Ve||!!He,{isFeatureEnabled:Be}=B(M.isSettingsFeatureEnabled),{isFeatureEnabled:J}=B(M.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=B(M.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||an==="DEV",Ze=r?.userRole!=null&&xs(r.userRole),Y=G((o=>Rs(o)));if(i!=null){const o=D.getSignedInUserTenant(i);j!=null&&o!=null&&ye(j,r,k)}const $={tenantId:y,userId:j?.userId,sessionId:j?.zeniSessionId},ie=Is(),E=nn(),$e=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Ge=js(E?.loggedInUserRoleMap),Q=Te("/:tenantEmailDomain/onboarding/*")!==null,ee=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),ze=G((o=>$.tenantId!=null?Ts(o,$.tenantId):void 0));w.useEffect((()=>{O(F.TENANT_FETCHING),a(i)}),[i]),w.useEffect((()=>{if(ee!=null&&y!=null){const o=ee.params.selectedPeriod;if(o!=null){const f=o.split("-");if(f.length===2){const d=As(Number(f[0])),n=Number(f[1]),c=ys(`01-${d<10?`0${d}`:d}-${n}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),N=fs();c.isAfter(N,"month")===!1?A(Ds(y,{month:d,year:n})):S(`/${i}/month_end_close_checks/review`)}}}}),[ee,y]),w.useEffect((()=>{L||(Ue(!0),O(F.TENANT_FETCHING))}),[L,$,ie,j,A,D]),w.useLayoutEffect((()=>{!bs(ie,$)&&D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,n){if(xe(f?.userId,f?.zeniSessionId,o.tenantId),d(Ms(!0)),d(Re(o.tenantId)),o.tenantId!=null&&_.clearTenant(o.tenantId),o.tenantId!=null){const c=D.getSignedInUserTenantWithId(o.tenantId);n&&Ae.updateAppLocaleID(on(n)),c?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}o.userId!=null?ne.identify(o.userId,{tenant_id:o.tenantId}):ne.resetUserIdentity()})($,j,A,ze))}),[y]),w.useEffect((()=>{D.isSignedIn()&&(O(F.TENANT_FETCHING),(function(o,f,d,n,c,N,H){if(d==null&&n==null)return void console.warn("There is no current tenant selected!!");const q=n!=null&&c?.zeniSessionId!=null,us=d==null||d.tenantId!==n,ds=d!=null&&d.excludedResources==null,cs=d!=null&&d.externalConnections==null;if(q&&us){H(Re(n));const W=D.getSignedInUserTenantWithId(n);W?.tenantEmailDomain!=null&&D.saveActiveTenantDomainForUser(W?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,n),_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(Ie(c.userId,n))),_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(je(c.userId,n)))}else q&&ds&&_.shouldFetchExcludedResources(n)&&(_.markExcludedResourcesFetchStarted(n),H(Ie(c.userId,n))),q&&cs&&_.shouldFetchConnections(n)&&(_.markConnectionsFetchStarted(n),H(je(c.userId,n)));if(q){ne.identify(c.userId,{tenant_id:n});const W=n==null||n!=null&&(f==="Completed"||f==="Error");o==="Completed"||f!=="Not-Started"&&f!=="Error"||n==null||!_.shouldFetchActiveTenant(n)||(_.markActiveTenantFetchStarted(n),N(F.TENANT_FETCHING),H(Zs(c.userId,n,c.zeniSessionId))),W&&(o==="Not-Started"||o==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(ge(c.userId,c.zeniSessionId)))}})(T,p,r,y,j,O,A))}),[y,p]),w.useEffect((()=>{D.isSignedIn()&&T==="Completed"&&Y.tenantsBaseInOrder.length>0&&(V(F.TENANT_FETCHING),D.saveSignedInUserTenants(Cs(Y.tenantsBaseInOrder)),j!=null&&ye(j,r,k,void 0,Y.tenantsBaseInOrder))}),[Y,T,r,j]),w.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(v(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),V(F.TENANT_FETCHING),V(F.TENANT_SWITCHING))),T!=="Completed"&&T!=="Error"||(T==="Completed"?_.markAllTenantsFetchCompleted():T==="Error"&&_.markAllTenantsFetchFailed())}),[p,T,y,L]);const le=w.useRef(!1);w.useEffect((()=>{!le.current&&p==="Completed"&&L&&(le.current=!0,(function(o=cn,f=3e3){setTimeout((()=>{const d=n=>{if(n>=o.length)return;const c=o[n],N=dn[c];N!=null?N().then((()=>te((()=>d(n+1))))).catch((()=>te((()=>d(n+1))))):d(n+1)};te((()=>d(0)))}),f)})())}),[p,L]);const P=r?.userRole!=null&&vs(r?.userRole),{isFeatureEnabled:Ye}=B(M.isReferralFeatureEnabled),qe=r?.userRole!=null&&r.userRole.includes("charge_card_user"),We=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),U=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Se&&!P,Xe=Os(E?.loggedInUserRoleMap),Ke=r.externalConnections?.accounting[0]?.isValid,Je=r.externalConnections?.fetchState==="Completed",se=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&Ps(E?.loggedInUserRoleMap),_e=Fe&&!P,Qe=Le&&!P,es=ue&&ws(E?.loggedInUserRoleMap),ss=de&&Us(E?.loggedInUserRoleMap),ns=_e&&Fs(E?.loggedInUserRoleMap),ts=Ls(E?.loggedInUserRoleMap),as=ks(E?.loggedInUserRoleMap),os=Vs(E?.loggedInUserRoleMap),rs=Hs(E?.loggedInUserRoleMap),is=Ss(E?.loggedInUserRoleMap),g=Bs(E?.loggedInUserRoleMap),x=Ns(E?.loggedInUserRoleMap),he=ue&&g,Ee=ce&&x,R=_e&&os,I=Qe&&rs,m=de&&is,ls=r.excludedResources?.resources?.find((o=>o.resource==="/invites"))!=null||Ge===!0||Xe===!0||ts===!0||as===!0;return D.isSignedIn()?y==null?T==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(j!=null&&T!=="In-Progress"&&A(ge(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||T==="Completed"?(se===!0||X&&!Q)&&Je&&Ke!==!0&&h===!1&&K===!1&&re===!1?(a(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!L||re!==!0||se!==!0||Q||X?!L||se!==!1||Q||X?L&&r?.userRole&&h!=null&&K!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(qs,{children:e.jsxs(t,{element:e.jsx(tn,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Un,{isDashboardAccess:U,showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,isTenantCardsOnly:K,showChargeCardRoute:m})}),e.jsx(t,{path:"dashboard/*",element:U?e.jsx(Rn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reports/*",element:U?e.jsx(mn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"people/*",element:ls||U?e.jsx(hn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"forecast/*",element:U?e.jsx(En,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(pn,{})}),e.jsx(t,{path:"transaction/*",element:U&&P===!1||qe||We?e.jsx(xn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"transactions/*",element:U&&P===!1?e.jsx(yn,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"customer/*",element:U&&P===!1?e.jsx(Ce,{entityType:"customer"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,isTenantBankingOnly:h,showTreasuryRoute:I,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"vendor/*",element:U&&P===!1?e.jsx(Ce,{entityType:"vendor"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"tasks",element:e.jsx(wn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(On,{})}),e.jsx(t,{path:"address/*",element:es||me||ns||ss?e.jsx(_n,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"checking/*",element:R?e.jsx(Tn,{}):e.jsx(C,{})}),e.jsx(t,{path:"treasury/*",element:I?e.jsx(An,{}):e.jsx(C,{})}),e.jsx(t,{path:"performance",element:ae===!0?e.jsx(bn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ae===!0&&P===!1?e.jsx(Cn,{}):e.jsx(we,{tenantEmailDomain:i})}),e.jsx(t,{path:"notifications/*",element:e.jsx(Dn,{})}),e.jsx(t,{path:"vendors/*",element:$e?e.jsx(gn,{}):e.jsx(C,{})}),e.jsx(t,{path:"bill/*",element:he?e.jsx(ve,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"bills/*",element:he?e.jsx(ve,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:g,isUserHasReimbursementAccess:x,showTreasuryRoute:I,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(t,{path:"settings/*",element:Be?e.jsx(In,{hasAdminLevelAccess:me}):e.jsx(C,{})}),e.jsx(t,{path:"invoicing/*",element:Me&&Ze?e.jsx(jn,{}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:J}):e.jsx(C,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:m&&Z?e.jsx(Pe,{isFileUploadEnabled:J}):e.jsx(C,{})}),e.jsx(t,{path:"cards/*",element:m?e.jsx(fn,{}):e.jsx(C,{})}),e.jsx(t,{path:"rewards/*",element:Ye?e.jsx(vn,{}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/",element:Z?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Z?e.jsx(Pn,{isFileUploadEnabled:J}):e.jsx(C,{})}),e.jsx(t,{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{b as F,Mn as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-C_WAhyd7.js";import{a as d}from"./sentry-lC29HHPj.js";import{h as V,g as Z,u as T,i as Y,j as C,l as H,n as z,o as k}from"./core-1xnf2RtE.js";import{fE as w,YE as je,MU as ve,Yc as we,Yl as Ae,c8 as W,cT as De,cU as Ue,bq as Te,dd as _e,Fh as Re,YF as Me,Ol as Be,LL as Fe,LC as de,Lz as Le,Fl as ue,LF as pe,LI as ge,LO as X,Bx as ee,Fk as Oe,lt as $,lw as me,YG as Ve,mG as Ye,FD as Ne,UU as Ge,UV as $e,lr as Ze,YH as He,lu as Ke,u2 as Qe,UP as qe,UQ as ze,u6 as Je,hU as We,TP as q,hM as ae,hJ as Xe,hR as en,TQ as nn,FA as tn,YI as an,YJ as on,M0 as sn,l_ as rn,dX as fe,dY as he,YK as ln,gB as cn,U2 as dn,Fz as oe,gG as se,gF as un,Fy as pn,gE as gn,gD as mn,YL as fn,Tf as Ce,YM as hn,YN as Cn,YO as yn,YP as Sn,YQ as bn,YR as In,FG as xn,YS as En,Fx as ie,Fr as G,YT as kn,YU as Pn,YV as re,YW as jn,dQ as vn,YX as wn,YY as An,YZ as Dn,Tr as Un,c0 as Tn,c7 as _n,c6 as Rn,c1 as Mn,Y_ as Bn,c4 as Fn,c3 as Ln,c5 as On,c2 as Vn}from"./zeni-epic-state-BVNUxmav.js";import{bS as Yn,z as v,V as N,a7 as ne,c2 as Nn,h as K,M as te,y as L,g as ye,$ as Se,c3 as Gn,l as $n,W as be,c4 as Zn,ai as Hn,c5 as Kn,c6 as Qn,aq as qn,c7 as zn,p as Jn,c as Ie,c8 as Wn}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-C_WAhyd7.js";import{a as d}from"./sentry-lC29HHPj.js";import{h as V,g as Z,u as T,i as Y,j as C,l as H,n as z,o as k}from"./core-1xnf2RtE.js";import{fE as w,YE as je,MU as ve,Yc as we,Yl as Ae,c8 as W,cT as De,cU as Ue,bq as Te,dd as _e,Fh as Re,YF as Me,Ol as Be,LL as Fe,LC as de,Lz as Le,Fl as ue,LF as pe,LI as ge,LO as X,Bx as ee,Fk as Oe,lt as $,lw as me,YG as Ve,mG as Ye,FD as Ne,UU as Ge,UV as $e,lr as Ze,YH as He,lu as Ke,u2 as Qe,UP as qe,UQ as ze,u6 as Je,hU as We,TP as q,hM as ae,hJ as Xe,hR as en,TQ as nn,FA as tn,YI as an,YJ as on,M0 as sn,l_ as rn,dX as fe,dY as he,YK as ln,gB as cn,U2 as dn,Fz as oe,gG as se,gF as un,Fy as pn,gE as gn,gD as mn,YL as fn,Tf as Ce,YM as hn,YN as Cn,YO as yn,YP as Sn,YQ as bn,YR as In,FG as xn,YS as En,Fx as ie,Fr as G,YT as kn,YU as Pn,YV as re,YW as jn,dQ as vn,YX as wn,YY as An,YZ as Dn,Tr as Un,c0 as Tn,c7 as _n,c6 as Rn,c1 as Mn,Y_ as Bn,c4 as Fn,c3 as Ln,c5 as On,c2 as Vn}from"./zeni-epic-state-BVNUxmav.js";import{bS as Yn,z as v,V as N,a7 as ne,c2 as Nn,h as K,M as te,y as L,g as ye,$ as Se,c3 as Gn,l as $n,W as be,c4 as Zn,ai as Hn,c5 as Kn,c6 as Qn,aq as qn,c7 as zn,p as Jn,c as Ie,c8 as Wn}from"./index-DXVI9ztu.js";import{n as B}from"./mui-BAsIRnB1.js";import{u as xe}from"./useTaskManagerAccess-B7YJLgDK.js";import{U as Xn}from"./AccountMappingScreen-BBc4_4t5.js";import{t as et,A as nt}from"./AddressScreen-ueBXhh2E.js";import O from"./NotFoundScreen-BF2gJW91.js";import{g as tt}from"./analyticsHelper-BSm7IqEZ.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-gxvPC9Nc.js";import{C as st}from"./CompanyPassportScreen-XQqdGh6R.js";import{M as R}from"./MobileAppDrawer-DH0tVOfv.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-BzSlD1q5.js";import{q as le}from"./QBOConnectionScreen-3h-qdoms.js";import{B as lt}from"./BillPayApprovalRoutes-DIMv5HVt.js";import{R as ct}from"./ReimbursementApprovalRoutes-Bt3jod66.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.js";import"./accountMappingHelper-DeDocU0d.js";import"./routePaths-3iKgurJn.js";import"./InboxNotificationsProvider-BU6hQETc.js";import"./empty-GMcl-a5k.js";import"./pdf-lib-RqzDns79.js";import"./index-Ctq16f6K.js";import"./url-LYbpMOZt.js";import"./index-Dc3AC-iD.js";import"./decodeURIComponentSafe-DcD-XNVX.js";import"./ReimbursementApprovalRuleDetailScreen-Bc4MC7ZP.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]="d4f7aa34-b8cb-4e12-b1c1-1a78d4ab414f",e._sentryDebugIdIdentifier="sentry-dbid-d4f7aa34-b8cb-4e12-b1c1-1a78d4ab414f")}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-C_WAhyd7.js";import{h as J,g as Q,u as ee,i as W,j as v,N as j,l as G,t as Qe}from"./core-1xnf2RtE.js";import{bJ as en,fE as F,cG as nn,H6 as Z,Yc as tn,Yf as an,ul as ne,u9 as te,my as ae,B3 as L,Yh as Ce,gF as $e,gE as We,gD as Ge,Yi as sn,Hf as on,LL as he,LC as Ie,Lz as Ae,Lh as X,LF as _e,LI as ke,LO as ve,Bx as Pe,gZ as cn,cB as rn,dY as un,dX as dn,dh as ln,bt as pn,cu as Fe,Yj as mn,Kh as de,KV as yn,Yk as fn,bK as gn,N4 as le,MU as Sn,Yl as bn,Ym as Cn,N8 as hn,Nc as In,Yn as je,AY as An,RA as _n,NK as be,Oz as pe,Yo as kn,Yp as vn,Yq as Pn,Yr as He,Ys as Tn,UD as En,Xt as Dn,US as Un,Yt as Ke,Ll as wn,UT as On,Lp as Fn,Yu as Oe,NU as qe,mG as xn,uc as Xe,B5 as Vn,bE as Ne,Bh as Le,cE as Bn,Yv as Je,Nr as jn,Ns as Nn,Nw as Ln,Yw as Rn,NN as Re,Yx as zn,Yy as Mn,Yz as Yn,YA as Zn,gU as $n,Iq as Wn,YB as Gn,Iv as Hn,Iu as Kn}from"./zeni-epic-state-BVNUxmav.js";import{ai as Te,V as ie,M as me,y as q,E as Ee,z as E,a8 as se,h as D,a7 as De,R as $,bP as qn,ae as oe,bQ as x,bi as xe,bR as Xn,bS as Jn,bT as Qn,o as Be,bU as et,p as ze,aG as Me,a1 as nt,ab as tt,bV as at,bW as it,bX as st,w as ot}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-C_WAhyd7.js";import{h as J,g as Q,u as ee,i as W,j as v,N as j,l as G,t as Qe}from"./core-1xnf2RtE.js";import{bJ as en,fE as F,cG as nn,H6 as Z,Yc as tn,Yf as an,ul as ne,u9 as te,my as ae,B3 as L,Yh as Ce,gF as $e,gE as We,gD as Ge,Yi as sn,Hf as on,LL as he,LC as Ie,Lz as Ae,Lh as X,LF as _e,LI as ke,LO as ve,Bx as Pe,gZ as cn,cB as rn,dY as un,dX as dn,dh as ln,bt as pn,cu as Fe,Yj as mn,Kh as de,KV as yn,Yk as fn,bK as gn,N4 as le,MU as Sn,Yl as bn,Ym as Cn,N8 as hn,Nc as In,Yn as je,AY as An,RA as _n,NK as be,Oz as pe,Yo as kn,Yp as vn,Yq as Pn,Yr as He,Ys as Tn,UD as En,Xt as Dn,US as Un,Yt as Ke,Ll as wn,UT as On,Lp as Fn,Yu as Oe,NU as qe,mG as xn,uc as Xe,B5 as Vn,bE as Ne,Bh as Le,cE as Bn,Yv as Je,Nr as jn,Ns as Nn,Nw as Ln,Yw as Rn,NN as Re,Yx as zn,Yy as Mn,Yz as Yn,YA as Zn,gU as $n,Iq as Wn,YB as Gn,Iv as Hn,Iu as Kn}from"./zeni-epic-state-BVNUxmav.js";import{ai as Te,V as ie,M as me,y as q,E as Ee,z as E,a8 as se,h as D,a7 as De,R as $,bP as qn,ae as oe,bQ as x,bi as xe,bR as Xn,bS as Jn,bT as Qn,o as Be,bU as et,p as ze,aG as Me,a1 as nt,ab as tt,bV as at,bW as it,bX as st,w as ot}from"./index-DXVI9ztu.js";import{a as h}from"./sentry-lC29HHPj.js";import{n as Ve,D as ct,S as rt}from"./mui-BAsIRnB1.js";import{u as ut,B as we}from"./BusinessVerificationPageScreen-gxvPC9Nc.js";import{M as ye}from"./MobileAppDrawer-DH0tVOfv.js";import N from"./NotFoundScreen-BF2gJW91.js";import{a as Ye}from"./analyticsHelper-BSm7IqEZ.js";import{d as Ze}from"./routePaths-3iKgurJn.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]="ccfd41ac-68e5-4f37-86c4-eacf3e652686",e._sentryDebugIdIdentifier="sentry-dbid-ccfd41ac-68e5-4f37-86c4-eacf3e652686")}catch{}})();const dt=Ve.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-C_WAhyd7.js";import{a as f,R as x,q as A}from"./sentry-lC29HHPj.js";import{u as D,h as z,j as l,g as j,N as M,l as O}from"./core-1xnf2RtE.js";import{u as P,z as s,E as B,h as w,G as F,Q as _,R as N,T as $,S as R,U as V,W as v}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-C_WAhyd7.js";import{a as f,R as x,q as A}from"./sentry-lC29HHPj.js";import{u as D,h as z,j as l,g as j,N as M,l as O}from"./core-1xnf2RtE.js";import{u as P,z as s,E as B,h as w,G as F,Q as _,R as N,T as $,S as R,U as V,W as v}from"./index-DXVI9ztu.js";import{fE as W,Tb as q,Tv as J,gh as Q,gj as G,TA as H,gT as K,di as X,TB as y,TC as Y,TD as Z,b$ as b}from"./zeni-epic-state-BVNUxmav.js";import"./mui-BAsIRnB1.js";import{u as ee}from"./useDeviceId-BX84j5B2.js";import{f as te}from"./analyticsHelper-BSm7IqEZ.js";import{t as ne}from"./getLocaleForTenant-Ct5cBG_c.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.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]="b22d6894-6a72-48a7-a245-7c1b859a0ebc",t._sentryDebugIdIdentifier="sentry-dbid-b22d6894-6a72-48a7-a245-7c1b859a0ebc")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.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:b(c),sourceUri:b(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())}}}))(V),ae=x.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:T,accountUnlockTime:E}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),L=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>W(e))),I=l((e=>q(e))),m=j(),k=B().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(f.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),f.useEffect((()=>{t(void 0)}),[]),f.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(J(I.tenantsInOrder),o.zeniSessionId),Q(o.userId,o.zeniSessionId,r.tenantId),i(G(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(H("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,k,void 0,I.tenantsInOrder),K().then((()=>{const e=R();e!=null&&_(e)})),setTimeout((()=>{w.trackLogin(N.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))}),2e3))}),[S,p,L,o,r,I,k,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(M,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),T===!0&&E!=null?u.jsx($,{onClose:()=>i(y()),unlockDate:E}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-C_WAhyd7.js";import{a as i}from"./sentry-lC29HHPj.js";import{u as c,g as d,N as u}from"./core-1xnf2RtE.js";import{z as n,h as a,R as m,a7 as p}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-C_WAhyd7.js";import{a as i}from"./sentry-lC29HHPj.js";import{u as c,g as d,N as u}from"./core-1xnf2RtE.js";import{z as n,h as a,R as m,a7 as p}from"./index-DXVI9ztu.js";import{gW as g,TR as b}from"./zeni-epic-state-BVNUxmav.js";import{n as y}from"./mui-BAsIRnB1.js";import"./recharts-C2rsrRI6.js";import"./analytics-N153TuwK.js";import"./plaid-dW1_MCaE.js";import"./dnd-DsH8jkrb.js";import"./stripe-cKAAJElX.js";import"./lottie-NIzYzhlS.js";import"./lexical-d2so_3As.js";import"./pdf-BKNPlqtE.js";import"./utils-BBaMea9r.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]="28f756a2-0044-4f6f-a5b9-8b0525b0854e",e._sentryDebugIdIdentifier="sentry-dbid-28f756a2-0044-4f6f-a5b9-8b0525b0854e")}catch{}})();function N(){const e=c(),t=d(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),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,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-C_WAhyd7.js";import{a as T}from"./sentry-lC29HHPj.js";import{h as pa,u as fa,g as Ta,k as ga,j as F,i as _a,l as ma}from"./core-1xnf2RtE.js";import{aK as ba,aL as Da,z as x,M as Sa,y as G,as as ha,a8 as Ea,h as ya,R as Aa,e6 as Ca,p as R,a4 as Ga}from"./index-
|
|
1
|
+
import{j as C}from"./liveblocks-C_WAhyd7.js";import{a as T}from"./sentry-lC29HHPj.js";import{h as pa,u as fa,g as Ta,k as ga,j as F,i as _a,l as ma}from"./core-1xnf2RtE.js";import{aK as ba,aL as Da,z as x,M as Sa,y as G,as as ha,a8 as Ea,h as ya,R as Aa,e6 as Ca,p as R,a4 as Ga}from"./index-DXVI9ztu.js";import{fE as Ia,a1e as X,Qm as B,a1f as Y,a1a as Ba,PK as Z,a1g as Ka,PS as V,Ps as va,P4 as La,Qn as W,a1h as q,gg as wa,Qd as Ra,Qi as Ua,Q5 as Pa,Q3 as H,Qj as Fa,Q0 as ja,a1i as xa,a1j as $a,a1k as Na,a1l as Oa,a1m as I,dw as Qa,dv as za,a1n as Ma,Pp as Za}from"./zeni-epic-state-BVNUxmav.js";import{n as Va}from"./mui-BAsIRnB1.js";import{u as Wa}from"./useAskAiCfoHostNavButtonProps-C4hcJx1x.js";import{M as qa}from"./MobileAppDrawer-DH0tVOfv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="8ab53c42-0bff-48c2-9719-3fc2feaf35b3",e._sentryDebugIdIdentifier="sentry-dbid-8ab53c42-0bff-48c2-9719-3fc2feaf35b3")}catch{}})();const d={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"},Ha=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),Ja=(e,a)=>e==null||e===""?[]:a.map((n=>`private-encrypted-${e}.${n}`)),U=e=>Array.isArray(e)&&e.every((a=>typeof a=="string")),Xa=e=>{if(e==null||typeof e!="object")return null;const a=e,n=typeof a.task_id=="string"?a.task_id:typeof a.id=="string"?a.id:null;if(n==null||typeof a.tenant_id!="string"||typeof a.event_type!="string")return null;const o={task_id:n,tenant_id:a.tenant_id,event_type:a.event_type};return typeof a.is_private=="boolean"&&(o.is_private=a.is_private),U(a.assignees)&&(o.assignees=a.assignees),U(a.direct_assignees)&&(o.direct_assignees=a.direct_assignees),typeof a.created_by=="string"&&(o.created_by=a.created_by),U(a.task_group_ids)&&(o.task_group_ids=a.task_group_ids),typeof a.name=="string"&&(o.name=a.name),typeof a.parent_task_id=="string"&&(o.parent_task_id=a.parent_task_id),o},Ya=e=>{if(e==null||typeof e!="object")return null;const a=e;return U(a.task_ids)?{task_ids:a.task_ids}:null},pe=e=>{if(e==null||typeof e!="object")return null;const a=e;return typeof a.task_id!="string"?null:{task_id:a.task_id}},ae=e=>{const{events:a,onEvent:n,onSubscribed:o}=e,i=ba(),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((()=>[...a].sort().join("|")),[a]);T.useEffect((()=>{if(i==null||a.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 a.forEach((m=>{const[b,D]=Da(m);if(D==="")return;const E=i.channel(b),y=f=>{g.current(D,f)};let k;if(E?.subscribed===!0){if(k=E,k.bind(D,y),!p.has(b)){p.add(b),S();const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{E.unbind(D,y)}))}else{if(k=E??i.subscribe(b),k.bind(D,y),!p.has(b)){p.add(b);const f=()=>{S()};k.bind("pusher:subscription_succeeded",f),s.push((()=>{k.unbind("pusher:subscription_succeeded",f)}))}s.push((()=>{k.unbind(D,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},ee=Va.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|