@zeniai/web-app-ui 5.2.12-qa → 5.2.13-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-DLYj8iuV.js +1 -0
- package/dist/assets/{AddressScreen-C6qRGk6n.js → AddressScreen-B_7cEnKD.js} +1 -1
- package/dist/assets/{AiCfoScreen-ChZ4u6nj.js → AiCfoScreen-BUaUMOqh.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BrG8_bHG.js → BillPayApprovalRoutes-fFL-mX-V.js} +1 -1
- package/dist/assets/{BillPayRoutes-D_u5WOiF.js → BillPayRoutes-D8lwLTXH.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BShNzAX6.js → BusinessVerificationPageScreen-Dwb9q8Sr.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BaUv9Tls.js → CardsAiCfoScreen-BnOoZ3-l.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-D85MbIGG.js → ChargeCardRoutes-BX8sKg9j.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-C0IvgrSf.js → CompanyPassportScreen-CA1rNnz6.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DyZUEreD.js → ConnectionAuthScreen-B-QI6jlM.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-66MImbnX.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BSO96x0H.js → CustomerOnboardingRoutes-BLyR0Odx.js} +1 -1
- package/dist/assets/{DashboardRoutes-CCNlEL9t.js → DashboardRoutes-PAZiNp5H.js} +1 -1
- package/dist/assets/{DefaultTenantHome-Bmj0dyC5.js → DefaultTenantHome-spOtWD3A.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-6lgCq1Oi.js → DomesticWireDetailScreen-C-fj-EK2.js} +1 -1
- package/dist/assets/{DrawerScreen-CB78UwSt.js → DrawerScreen-BWiSdsIV.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-ebwnXKfN.js → EntityDetailRoutes-sCRpS1j0.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-BGOEFhQK.js → ExpenseAutomationRoutes-VJVnQQzl.js} +3 -3
- package/dist/assets/{FeaturePreviewScreen-BuxbtmPT.js → FeaturePreviewScreen-CUKc27Vx.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CBdvuvIr.js → HubSpotOAuthCallbackScreen-B-OjwaD5.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CUrTEYe3.js → MagicLinkRoutes-Bwrv6MrB.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-C1w86A6x.js → MagicLinkSignInScreen-CIkT8Ypk.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BlUKlkof.js → MobileAppDrawer-DrKscogU.js} +1 -1
- package/dist/assets/NotFoundScreen-BGr9LaDQ.js +1 -0
- package/dist/assets/{NotificationRoutes-m1zdSxRY.js → NotificationRoutes-DtJ6zv5F.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-0d8SUlgO.js → OAuthConsentScreen-DmxAjF14.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-BGe3SifM.js → PandLWithForecastRoutes-4euaT8sc.js} +1 -1
- package/dist/assets/{PeopleRoutes-CI8mZcWj.js → PeopleRoutes-BIY3PU2s.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DTSVjeVx.js → PerformanceRoutes-BW2KAG3G.js} +1 -1
- package/dist/assets/{Preview-Cvkizx6n.js → Preview-Mf-iNnbX.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BTrTPyqS.js → QBOConnectionScreen-BTDegFyb.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-BpHYGAKS.js → ReimbursementApprovalRoutes-Brpp_tVb.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BBP2YOa7.js → ReimbursementApprovalRuleDetailScreen-BEGmFwZm.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-C5ODHJOv.js → ReimbursementRoutes-Chp3smrm.js} +1 -1
- package/dist/assets/{ReportsRoutes-YVt4z7BI.js → ReportsRoutes-JVGYt6D9.js} +1 -1
- package/dist/assets/{RewardsRoutes-DsYmuaI2.js → RewardsRoutes-C7gK933e.js} +1 -1
- package/dist/assets/{ScreenRoutes-DC80Y7ST.js → ScreenRoutes-B2M2KeTa.js} +2 -2
- package/dist/assets/{SettingsRoutes-C0ZTV4cM.js → SettingsRoutes-DMIIn4Bo.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CzqvTU7Q.js → SetupPagesScreen-ikH1-jvA.js} +1 -1
- package/dist/assets/{SignInScreen-B4tkZfBl.js → SignInScreen-Dr1D_Sql.js} +1 -1
- package/dist/assets/{SignOutScreen-Clu99CFp.js → SignOutScreen-Bc5DA_PD.js} +1 -1
- package/dist/assets/{TaskListScreen-DLCl-j3R.js → TaskListScreen-D9kTMlmb.js} +1 -1
- package/dist/assets/{TaskRoutes-BXNOpiYB.js → TaskRoutes-CzorS81R.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-Bkq0V99v.js → TransactionDetailRoutes-C2yXNhQy.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Bn-xSZGA.js → TransactionDetailScreen-DoAx_dWo.js} +1 -1
- package/dist/assets/{TransactionListRoutes-uz-zO6BU.js → TransactionListRoutes-DeAjnViL.js} +1 -1
- package/dist/assets/{TreasuryRoutes-B9RMcSaN.js → TreasuryRoutes-DruSns4N.js} +1 -1
- package/dist/assets/{VendorsRoutes-DyDKrnBl.js → VendorsRoutes-CdAuHesx.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-COPTP8wL.js → WiseConfirmationScreen-P1xAIVAG.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-B2-lwzJt.js → ZeniAccountRoutes-CppeCNmZ.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-HS25znBA.js → ZeniAccountStatementScreen-C9WZyVpo.js} +1 -1
- package/dist/assets/{accountMappingHelper-BoMcJRmU.js → accountMappingHelper-DPo5_oRM.js} +1 -1
- package/dist/assets/{analytics-tnLNAAzo.js → analytics-C3yKGO2p.js} +1 -1
- package/dist/assets/{analyticsHelper-BLN8Q7dD.js → analyticsHelper-Bb-clko5.js} +1 -1
- package/dist/assets/{core-73g-CRXm.js → core-QBDM2m9E.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-vreX6HdN.js → decodeURIComponentSafe-V0q2i3Mt.js} +1 -1
- package/dist/assets/{dnd-CCmj5-_i.js → dnd-DTpdpLY3.js} +1 -1
- package/dist/assets/{empty-Dgn5BJ4x.js → empty-CFhDMTFy.js} +1 -1
- package/dist/assets/{empty-AoB5TcI1.js → empty-DOkYgcMg.js} +1 -1
- package/dist/assets/{emptyVideoElement-BE66TwHH.js → emptyVideoElement--yp8X02p.js} +1 -1
- package/dist/assets/{epic-LDMRAHZs.js → epic-DhMQUuQ_.js} +1 -1
- package/dist/assets/{getLocaleForTenant-Ci7Iyx0p.js → getLocaleForTenant-CZ5OuBaj.js} +1 -1
- package/dist/assets/{index-CwCXBsVA.js → index-BD-4IlOh.js} +2 -2
- package/dist/assets/{index-B7mOZ36a.js → index-BMXF4zS6.js} +1 -1
- package/dist/assets/{index-B2-aA0mm.js → index-BzUA8nAy.js} +14 -14
- package/dist/assets/{index-B_4cz_K1.js → index-C-I3RcJQ.js} +1 -1
- package/dist/assets/{index-CdShvsd9.js → index-ChYlKp3n.js} +1 -1
- package/dist/assets/{index-C9WNu74T.js → index-Dgg3TEkF.js} +1 -1
- package/dist/assets/{index-BlFohoS1.js → index-PvNZ50rx.js} +1 -1
- package/dist/assets/{index-Bf1SUo7G.js → index-_F7n4D5D.js} +1 -1
- package/dist/assets/{lexical-B-MdcDyi.js → lexical-DBGXZJbY.js} +1 -1
- package/dist/assets/{liveblocks-ff5jvbRc.js → liveblocks-ufh19lah.js} +1 -1
- package/dist/assets/{lottie-DvKGbHR7.js → lottie-Ceg93JYe.js} +1 -1
- package/dist/assets/{mui-C6EPTIjM.js → mui-CB8RW45Z.js} +1 -1
- package/dist/assets/{pathToGoBack-DB-OtIUd.js → pathToGoBack-Bi5ALgzm.js} +1 -1
- package/dist/assets/{pdf-BJ608N2P.js → pdf-DdbTijar.js} +3 -3
- package/dist/assets/{pdf-lib-Dhic7kAC.js → pdf-lib-DuOAYy25.js} +1 -1
- package/dist/assets/{plaid-BGzMn-Ja.js → plaid-DAwCYgVP.js} +1 -1
- package/dist/assets/{pusher-WaTQDWIq.js → pusher-CiZh5qhj.js} +1 -1
- package/dist/assets/{react-DxulePqx.js → react-BNUtRbVm.js} +1 -1
- package/dist/assets/{react-COsTIbDv.js → react-BQkbVo66.js} +1 -1
- package/dist/assets/{react-BUwb_BL7.js → react-C-M5T2pV.js} +1 -1
- package/dist/assets/{react-BD0aRB2D.js → react-C4Bd6CfY.js} +1 -1
- package/dist/assets/{react-B29GLwIL.js → react-XuQaBloD.js} +1 -1
- package/dist/assets/{react-D8hZ-zAO.js → react-b_GUNHoi.js} +1 -1
- package/dist/assets/{recharts-CuGywxsn.js → recharts-B8SFxg38.js} +1 -1
- package/dist/assets/{routePaths-D9vDZtOv.js → routePaths-GKW140Mx.js} +1 -1
- package/dist/assets/{sentry-DRJyi6Lv.js → sentry-Co2H8v0G.js} +1 -1
- package/dist/assets/{url-94cOi_su.js → url-BD8IMRo-.js} +1 -1
- package/dist/assets/{url-nWZmwppH.js → url-D7tTbw7b.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DvNt2bSq.js → useAiCfoDashboardSuggestedQuestionsChips-UT4ITugD.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-NCLc8anu.js → useAskAiCfoHostNavButtonProps-DRkfNJU3.js} +1 -1
- package/dist/assets/{useCashManagementBanner-ChfeBgIX.js → useCashManagementBanner-CDnWdC79.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-CKUYXOLS.js → useChargeCardPusherEvents-tUZA-Moq.js} +1 -1
- package/dist/assets/{useDeviceId-Dn2y2Mec.js → useDeviceId-SWL_t36p.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-D_QaL-cQ.js → useEmailConnectResultRefresh-CeyjUEl1.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-Dt88hhBW.js → useInitialThreadRequest-y87fsb02.js} +1 -1
- package/dist/assets/{utils-DSjwo3lj.js → utils-CWM6Tene.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-hWv9TKTy.js → withTransactionSidePanel-Cx7SLti4.js} +1 -1
- package/dist/assets/{zeni-epic-state-CVqp5cMc.js → zeni-epic-state-BF09v22i.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-BeHuFlKI.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CvcKpx99.js +0 -1
- package/dist/assets/NotFoundScreen-wxvtJzir.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-
|
|
1
|
+
import{j as v}from"./liveblocks-ufh19lah.js";import{a as u}from"./sentry-Co2H8v0G.js";import{u as y,j as b,n as w,g as A,N}from"./core-QBDM2m9E.js";import{Mf as U,eZ as _,g3 as k,Mg as L,oi as R,Mh as z}from"./zeni-epic-state-BF09v22i.js";import{u as O,z as f,L as T,t as I,O as j,b as $}from"./index-BzUA8nAy.js";import"./mui-CB8RW45Z.js";import{t as P}from"./getLocaleForTenant-CZ5OuBaj.js";import"./recharts-B8SFxg38.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="629357ad-2f1f-43ad-9e60-676a80845bdc",t._sentryDebugIdIdentifier="sentry-dbid-629357ad-2f1f-43ad-9e60-676a80845bdc")}catch{}})();const M=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>U(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(M,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-6lgCq1Oi.js → DomesticWireDetailScreen-C-fj-EK2.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-ufh19lah.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-QBDM2m9E.js";import{Qm as k,Qt as _,gl as W,gk as J,gj as q,jD as K,Nw as L,rP as M,eZ as D,PU as V,jB as j,Qn as v,Qw as T,jz as F,jW as G}from"./zeni-epic-state-BF09v22i.js";import{bz as X,J as N,A as R,z as U,y as z,r as p,c as S,E as Z,bA as Y,o as O,bB as ee,v as te}from"./index-BzUA8nAy.js";import{n as Q}from"./mui-CB8RW45Z.js";import"./sentry-Co2H8v0G.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]="0118eb55-f83a-4167-ac91-c924784cfc6a",e._sentryDebugIdIdentifier="sentry-dbid-0118eb55-f83a-4167-ac91-c924784cfc6a")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(K(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),n!=null&&e(M(n))},onGetOtp:n=>{e(q(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}}))(X);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Q.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-ufh19lah.js";import{J as c,H as f,y as l}from"./index-BzUA8nAy.js";import{D as b}from"./mui-CB8RW45Z.js";import"./sentry-Co2H8v0G.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="319c5930-e5fb-4b9b-9fc6-117cfd4193ad",e._sentryDebugIdIdentifier="sentry-dbid-319c5930-e5fb-4b9b-9fc6-117cfd4193ad")}catch{}})();const p={drawerLeftMargin:new f(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=c(),a=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),d=l();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${a})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-ufh19lah.js";import{a as d}from"./sentry-Co2H8v0G.js";import{h as j,u as A,g as N,i as B,j as l,N as q,n as F,o as _,p as K}from"./core-QBDM2m9E.js";import{OE as z,eZ as M,O0 as R,lG as W,Kx as k,OJ as Y,Nv as $,kG as J,Ky as b,O5 as V,O6 as X,Nx as Z,Nw as H}from"./zeni-epic-state-BF09v22i.js";import{aX as L,f as Q,r as U,v as tt}from"./index-BzUA8nAy.js";import"./mui-CB8RW45Z.js";import{d as S}from"./decodeURIComponentSafe-V0q2i3Mt.js";import{w as et}from"./withTransactionSidePanel-Cx7SLti4.js";import{f as at,c as nt}from"./routePaths-GKW140Mx.js";import"./recharts-B8SFxg38.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.js";import"./useAskAiCfoHostNavButtonProps-DRkfNJU3.js";import"./TransactionDetailScreen-DoAx_dWo.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="7f9bebb1-bd23-44d1-80b3-c86ff1e66d65",a._sentryDebugIdIdentifier="sentry-dbid-7f9bebb1-bd23-44d1-80b3-c86ff1e66d65")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:Q,isAccountingClassesEnabled:J(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(Z({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(H("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=U(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(b(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(L),it=et((function({entityType:a,...t}){const e=j(),o=A(),c=N(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:v}=B(),r=S(x??""),f=S(v??""),p=rt(r,f),w=[r,f].filter((n=>n!=null)),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),G=l((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&p===!0&&(T(!0),o(W(i)))}),[m,p,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,O=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:O,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(w.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(_,{children:s.jsx(K,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-BGOEFhQK.js → ExpenseAutomationRoutes-VJVnQQzl.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{j as S}from"./liveblocks-
|
|
1
|
+
import{j as S}from"./liveblocks-ufh19lah.js";import da from"./NotFoundScreen-BGr9LaDQ.js";import{a,b as tn}from"./sentry-Co2H8v0G.js";import{n as Ge,S as ua}from"./mui-CB8RW45Z.js";import{u as ke,h as nn,g as st,j as x,n as ma,i as Bt,o as pa,p as et}from"./core-QBDM2m9E.js";import{eZ as Me,Tk as ha,os as we,f_ as ga,sq as Ca,Tl as tt,fB as Le,Tm as Vt,ei as Sa,fk as fa,Tn as Ot,To as Oe,pa as Ia,Tp as ka,pr as Ea,oK as an,oI as re,Tq as on,Tr as Ta,p3 as sn,pl as ba,Ts as cn,oD as ya,rY as va,fL as Ae,Tt as je,uw as ln,ES as rn,Tu as dn,Tv as Pa,rw as ct,OF as zt,OH as Aa,kJ as wa,OI as Ra,kQ as xa,c_ as Da,vM as it,oQ as un,pv as $e,p6 as Fa,Tw as _a,Nx as Mt,Nw as Ve,Tx as Lt,l5 as Ua,Ty as Ba,Tz as Va,TA as Oa,TB as za,oX as Ma,py as ze,TC as La,TD as ja,TE as $a,pF as qa,kU as Ga,kL as Na,TF as Ja,kT as jt,OP as Ya,TG as Ka,TH as Qa,rs as Za,r4 as Ha,pw as Ie,r3 as nt,TI as Wa,TJ as Xa,TK as eo,mo as to,bo as no,mj as $t,m5 as ao,TL as oo,gB as so,mg as co,xF as io,TM as lo,q4 as ro,p$ as uo,q3 as mo,pQ as po,TN as ho,fO as mn,pe as go,oT as Co,f$ as qt,pA as So,TO as fo,TP as Io,px as pn,TQ as ko,TR as Eo,TS as To,TT as bo,TU as Gt,rE as yo,qX as vo,Nv as Po,TV as Ao,TW as wo,kS as Ro,TX as xo,Jy as Do,kR as Fo,kG as _o,fN as Uo,qt as hn,qP as Bo,pu as Nt,pz as Vo,bE as Oo,md as zo,ma as Mo,TY as Lo,pP as Jt,qL as Yt,qJ as jo,TZ as $o,qy as qo,qe as Go,qM as No,T_ as Jo,T$ as Yo,qi as Ko,U0 as Qo,q9 as Zo,qh as Ho,qf as Wo,qS as Xo}from"./zeni-epic-state-BF09v22i.js";import{A as qe,c as Y,f as G,v as le,_ as gn,a0 as Cn,cZ as es,z as Ne,c_ as Kt,c$ as ts,d0 as ns,d1 as as,au as Re,d2 as os,aZ as Qt,E as Sn,d3 as ss,ar as at,O as cs,a9 as is,d4 as ls,a4 as rs,d5 as ds,Z as us,d6 as ms,d7 as ps,B as hs,e as gs,aS as Cs,d8 as Ss,d9 as fs,be as Is,H as ks,aV as Es}from"./index-BzUA8nAy.js";import{u as fn}from"./useAskAiCfoHostNavButtonProps-DRkfNJU3.js";import{f as Zt,a as Ts,b as bs,g as ys,C as vs}from"./TransactionDetailScreen-DoAx_dWo.js";import{w as Ps}from"./withTransactionSidePanel-Cx7SLti4.js";import{h as As,v as ws}from"./routePaths-GKW140Mx.js";import{g as ot}from"./accountMappingHelper-DPo5_oRM.js";import{D as Rs}from"./DrawerScreen-BWiSdsIV.js";import"./recharts-B8SFxg38.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.js";import"./decodeURIComponentSafe-V0q2i3Mt.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="91b08d65-d8ff-4b32-9522-3b1e24d1907c",t._sentryDebugIdIdentifier="sentry-dbid-91b08d65-d8ff-4b32-9522-3b1e24d1907c")}catch{}})();const xs=()=>{const t=ke(),s=nn(),w=st(),b=x((m=>Me(m))),{useFeatureGate:A}=qe(),{isFeatureEnabled:i}=A(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:p}=A(Y.aiAuditScorePercentage),I=x((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=x((m=>ha(m,b.tenantId))),{isAiCfoAccessEnabled:C,onAskAiCfoClick:g}=fn({mobileExploreReferrer:"Month-End Close Overview"}),R=a.useCallback(((m,V,te=!1)=>{t(we({tenantId:V,period:{month:m.month,year:m.year},refreshViewInBackground:te}))}),[]),y=a.useCallback((m=>{const V=w.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(m.month,m.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,V??null),t(ga(b.tenantId,m))}),[b.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),r=I[b.tenantId],h=a.useCallback((()=>{const m=w.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&G.trackMonthCloseAuditPage(r.month,r.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),R(r,b.tenantId,!0)}),[R,r,b.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),F=le(w.state?.pathnameStackToGoBack,w.pathname),J=a.useCallback((()=>{if(l.monthEndCloseChecks!=null&&r!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((V=>V.progress<100));if(m!=null)return void s(`./${m.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}});s(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,r]),{areTenantIdsInSync:u}=gn();return Cn({isDataReady:l.fetchState==="Completed"}),a.useEffect((()=>{r!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&u&&R(r,b.tenantId)}),[R,r,l.fetchState,b.tenantId,u]),a.useEffect((()=>{r!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&u&&t(Ca(r))}),[r,l.monthClosePerformanceTrendFetchStatus.fetchState,u]),a.useEffect((()=>{const m=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&h()}),3e5);return()=>clearInterval(m)}),[l.fetchState]),a.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const m=w.state?.referrer;G.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,m??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),S.jsx(Ds,{children:S.jsx(es,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{s(`./${m}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:F,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:J,onBackClick:()=>{s("../../dashboard")},onReload:h,isAiCfoAccessEnabled:C,onAskAiCfoClick:g,aiAuditScorePercentageEnabled:p})})},Ds=Ge.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
5
5
|
flex: 1 1 auto;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
-
`,Fs=tn.memo((({reconciliation:t,selectedDrawerAccountId:s,onClose:w,onFetchLinkTokenClick:
|
|
8
|
+
`,Fs=tn.memo((({reconciliation:t,selectedDrawerAccountId:s,onClose:w,onFetchLinkTokenClick:b,onEstablishConnectionClick:A})=>{const i=ke(),{useFeatureGate:p}=qe(),{isFeatureEnabled:I}=p(Y.isReconV3Enabled),l=Ne.getSignedInUser(),C=x((f=>Me(f))),g=t.excludedAccountIDs,R=a.useMemo((()=>({userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:C?.tenantId??""})),[l?.userId,l?.zeniSessionId,C?.tenantId]),{accountReconciliationsByAccountID:y,monthYearPeriod:r,statementUploadChosen:h}=t,F=y[s],J=a.useRef(!1),u=a.useRef({}),m=a.useCallback((f=>{J.current=f}),[]),V=a.useCallback((f=>{i(tt({accountId:s,selectedPeriod:r,dismissedToBackground:!0,backgroundCompletedSteps:f.completedSteps,startedAtMs:f.startedAtMs,totalDurationSeconds:f.totalDurationSeconds})),F!=null&&requestAnimationFrame((()=>{J.current||i(Le({messageSection:"statement_parsing_in_progress",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:Kt(F)}]}))}))}),[i,r,F,s]),te=a.useCallback((()=>{i(tt({accountId:s,selectedPeriod:r,dismissedToBackground:!1}))}),[i,s,r]),de=a.useCallback((f=>{i(Vt({accountId:s,selectedPeriod:r,backgroundCompletedSteps:f}))}),[i,r,s]),z=a.useCallback((()=>{i(Vt({accountId:s,selectedPeriod:r,backgroundCompletedSteps:0})),i(tt({accountId:s,selectedPeriod:r,dismissedToBackground:!1}))}),[i,r,s]);a.useEffect((()=>{Object.entries(y).forEach((([f,X])=>{const ue=X.statementParseStatus.fetchState,xe=u.current[f]??"Not-Started",Je=f===s&&J.current;X.statementProcessingDismissedToBackground!==!0||Je||xe!=="In-Progress"||ue!=="Completed"||i(Le({messageSection:"statement_parsing_complete",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:Kt(X)},{variableName:"_transaction_count_",variableValue:String(ts(X))}]})),u.current[f]=ue}))}),[y,i,s]);const B=F?.parsedStatementData?.statementUpload?.statementMeta?.statementUploadId??F?.accountReconEntity.statementMetaData?.statementUploadId,e=F?.statementDateConflict?.previousReconciliationInfo?.reconciledByUserId,n=x((f=>e!=null&&e!==""?Sa(fa(f.userState,e)):"")),c=a.useCallback((()=>{i(Ot({accountId:s,selectedPeriod:r}))}),[i,s,r]),d=a.useCallback((()=>{i(Ot({accountId:s,selectedPeriod:r})),i(Oe({statementUploadChosen:!0}))}),[i,s,r]),E=(f,X)=>{i(va(f,X.split(".")[0]))},k=f=>{B!=null&&i(ya({accountId:s,selectedPeriod:r,fileId:f,statementUploadId:B}))},v=()=>{i(Oe({statementUploadChosen:!1}))},T=f=>{i(ba({accountId:s,selectedPeriod:r,payload:f}))},M=a.useCallback(((f,X,ue)=>{i(Ia({accountId:f,selectedPeriod:X,statementUploadId:ue}))}),[i]),P=a.useCallback((f=>{i(ka({accountId:s,selectedPeriod:r,statementUpdateLocalData:f}))}),[i,s,r]),H=a.useCallback((()=>{B!=null&&i(Ea({accountId:s,selectedPeriod:r,statementUploadId:B}))}),[i,s,r,B]),W=a.useCallback((()=>{i(Oe({statementUploadChosen:!0}))}),[i]),oe=f=>{i(cn({accountId:s,selectedPeriod:r,localData:{accountSource:f}}))},he=a.useCallback((()=>{i(an({accountId:s}))}),[i,s]),ge=a.useCallback((f=>{i(re(r,f)),w()}),[i,r,w]),q=a.useCallback((()=>{i(on({accountId:s,selectedPeriod:r,statementProcessingFailed:!1})),i(Ta({accountId:s,selectedPeriod:r}))}),[i,s,r]),Ce=a.useCallback((()=>{i(sn({accountId:s}))}),[i,s]),Ee=g.includes(s)?t.excludedAccountReconciliationByAccountID[s]:void 0;if(Ee!=null)return S.jsx(Ht,{children:S.jsx(Wt,{$isV3:I===!0,children:S.jsx(ns,{excludedAccountReconciliation:Ee,includeAccountFetch:t.includeAccountFetchState,isReconV3Enabled:I,onDismissClick:w,onIncludeIntoReconciliation:Ce})})});if(F!=null){const f=I===!0?S.jsx(as,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:F,monthYearPeriod:r,onDismissClick:w,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:b,onEstablishConnectionClick:A,onEditFileName:E,onDeleteFile:k,onSelectSourceType:oe,filesEndPoint:Re.fileMicroServiceBaseUrl,authParams:R,openFilePicker:h,onStatementUploadSuccess:T,onUploadWindowOpenedOnce:v,onExcludeFromReconciliation:he,onRetryParsing:M,onReviewClicked:ge,statementProcessingFailed:F.statementProcessingFailed,statementProcessingDismissedToBackground:F.statementProcessingDismissedToBackground,onDismissStatementProcessingFailed:q,onContinueInBackground:V,onClearStatementProcessingDismissedToBackground:te,onResetStatementProcessingProgress:z,onStatementProcessingProgressChange:de,onStatementFlowVisibilityChange:m,onReuploadStatement:W,onStatementFormDataChange:P,onStatementConfirmSave:H,reconciledByName:n,onDismissDateConflict:c,onReuploadAfterDateConflict:d,isReconV3Enabled:I}):S.jsx(os,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:F,monthYearPeriod:r,onDismissClick:w,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:b,onEstablishConnectionClick:A,onEditFileName:E,onDeleteFile:k,onSelectSourceType:oe,filesEndPoint:Re.fileMicroServiceBaseUrl,authParams:R,openFilePicker:h,onStatementUploadSuccess:T,onUploadWindowOpenedOnce:v,onExcludeFromReconciliation:he});return S.jsx(Ht,{children:S.jsx(Wt,{$isV3:I===!0,children:f})})}return null})),Ht=Ge.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
height: 100%;
|
|
@@ -18,7 +18,7 @@ import{j as S}from"./liveblocks-ff5jvbRc.js";import da from"./NotFoundScreen-wxv
|
|
|
18
18
|
min-width: 0;
|
|
19
19
|
overflow-x: hidden;
|
|
20
20
|
overflow-y: ${t=>t.$isV3===!0?"hidden":"auto"};
|
|
21
|
-
`;function _s({companyId:t,closeCustomerRequestDrawer:s,addCustomerRequest:w,resetCustomerRequest:T}){const A=Ne.getSignedInUser();if(A==null)throw Error("Can't access Customer Request page without signing in...");const i=x((p=>Pa(p,t,A)));return a.useEffect((()=>{T()}),[]),S.jsx(S.Fragment,{children:i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?S.jsx(Sn,{fetchState:"In-Progress"}):S.jsx(ss,{onCloseClick:s,addCustomerRequest:w,snippets:i.companyMonthEndReportTemplatesData,bulletPoints:i.zeniRequestsData??[]})})}const Us=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,In="reconciliation-status-updated",kn="statement-status-updated",{common:{strings:{hyphen:Bs,comma:Xt,space:Vs}},dateFormat:En}=cs.getLocalizedStrings(),en=Xo,Os=ma((function(t,s){const{uncategorizedAccounts:w,vendorSearchAutoCompleteData:T,monthEndInsightsCustomerRequestData:A,monthEndInsightsPreviewMode:i,companyId:p,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:l}=s,C=Ne.getSignedInUser(),g=t.tenantState.currentTenantId,R={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:g??""},y=Ae(t),{selectedTransactionCategorizationTab:r}=y;return{expenseAutomationViewSelector:y,bulkUploadSelector:I===!0?y.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:T,authParams:R,receiptUploadEndpoint:`${Re.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${rs}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Re.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:r,monthEndInsightsCustomerRequestData:A,monthEndInsightsPreviewMode:i,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:C,uncategorizedAccounts:w,companyId:p,isTransactionActivityEnabled:l}}),(function(t,s){const{themeState:w,isAccountingClassesEnabled:T,isCOTEnabled:A,isUncategorizedExpenseCategoryEnabled:i,isMissingReceiptsBulkUploadEnabled:p,location:I,vendorSearchAutoCompleteData:l,expenseAutomationViewSelector:C,currentTenant:g,uncategorizedAccounts:R,navigate:y,onClickCustomerRequest:r,handleEditClick:h,setActivityLogTransactionId:F,isReconV3Enabled:J}=s,{selectedPeriod:u,currentSelectedView:m,reconciliation:{selectedAccountId:V}}=C,{accountSettingsView:te}=C.jeSchedules,de=un(u),z=$e(de.start),B=$e(de.end);return{onZeniLogoClick:()=>{w.toggle()},onUploadReceiptAttachment:e=>{G.trackMissingReceiptAttached(u.month,u.year),t(vo(e))},onUploadTransactionReceipt:(e,n,c,d,E,k)=>{t(Gt(e,n,{fetchState:"In-Progress"}));const v=()=>t(Gt(e,n,{fetchState:"Error"}));ds(`${Re.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,k,n,c,d,E).then((b=>{b!=null?t(yo(e,b)):v()})).catch(v)},onMissingReceiptsRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const c=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(To(e,n)),g!=null&&t(we({tenantId:g.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,d)=>{t(bo(e,{fetchState:n,error:c})),c!=null&&t(Le({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:d!=null?Vs+Bs+d+Xt:Xt}]}))},onUpdateJESchedulesUIState:e=>{t(Eo(e))},onUpdateMissingReceiptsUIState:e=>{t(ko(e))},onFetchMissingReceiptsList:()=>{B!=null&&z!=null&&t(pn({start:z,end:B},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...p===!0?{onBulkUploadFiles:e=>{t(Wo(e))},onBulkUploadProgress:e=>{t(Ho(e))},onBulkUploadSuccess:e=>{t(Zo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Qo(e))},onConfirmBulkUploadMatch:(e,n,c,d,E)=>{t(Ko(e,n,c,d,E))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Yo())},onSetBulkUploadResultsTab:e=>{t(Jo(e))},onSetBulkUploadCompletedSubTab:e=>{t(No(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Yt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Go())},onSearchTransactionsForManualMatch:(e,n)=>{t(en(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=C.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(en(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(qo(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t($o())},onFetchBulkUploadBatches:e=>{t(hn(e))},onFetchMoreBatchDetails:()=>{t(jo())},onResetBulkUploadSort:()=>{t(Yt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(Io())},onSearchTextChanged:e=>{const n=C.currentSelectedView,c=C.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(nt({selectedTab:c,uiState:{searchString:e}})),B!=null&&z!=null&&t(Ie(c,{start:z,end:B},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=C.selectedTransactionCategorizationTab;t(fo({filters:e,selectedTab:n}))},onRefresh:()=>{s.trackExpenseAutomationTabAnalytics(!0),t(So(i))},onClose:()=>{m==="reconciliation"&&V!=null&&t(qt({selectedAccountId:void 0})),y("../")},onBack:()=>{m==="reconciliation"&&V!=null&&t(qt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Co(e))},onSaveReconciliationReview:e=>{t(go(e))},onUpdateStep:e=>{const{selectedPeriod:n}=C,c=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:C.currentSelectedView}}),t(mn(e))},handleLogOutClick:()=>{const e=le(I.state?.pathnameStackToGoBack,I.pathname);y("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:d,accruedExpensesAccount:E}=n,k=ot(te.prepaidExpensesAccountList,c.selectedOptions),v=ot(te.fixedAssetsAccountList,d.selectedOptions),b=ot(te.accruedExpensesAccountList,E.selectedOptions),M={selectedPrepaidExpensesAccountIds:k.map((P=>P.accountId)),selectedFixedAssetsAccountIds:v.map((P=>P.accountId)),selectedAccruedExpensesAccountIds:b.map((P=>P.accountId))};t(ho({data:M}))},onSaveJeAccountSettingsClick:()=>{t(po())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:d,scheduleClass:E,scheduleExpenseCategory:k,vendor:v}=n,{allAccountList:b,allClassList:M,allDepreciationAccountList:P}=C.jeSchedules,Z=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((q=>q.id===v?.selectedOption)):void 0,H={id:Z?.zeniId??v?.selectedOption??"",name:Z?.name??v?.defaultOptions.find((q=>q.value===v?.selectedOption))?.label??"",logo:Z?.logo},oe=k?.selectedOption!=null?b.find((q=>q.qboId===k.selectedOption)):void 0,ge=E?.selectedOption!=null?M.find((q=>q.classId===E.selectedOption)):void 0,Ce=d?.selectedOption!=null?P.find((q=>q.qboId===d.selectedOption)):void 0;t(mo({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:oe?.accountId,updatedClassId:ge?.classId,updatedAccumulatedDepreciationCategoryID:Ce?.accountId,updatedVendor:{id:H.id,name:H.name}}}))},ignoreRecommendedJeSchedule(e,n){t(uo(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Mt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Ve("common"))},onCancelAutoComplete:()=>{t(Ve("common"))}},onPostJESchedule(e,n){t(ro({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(lo())},handleJeScheduleClick:(e,n,c)=>{t(io({selectedJEScheduleKey:n}));const d=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{g!=null&&t(co(e,g.companyId,g.tenantId))},onClickCustomerRequest:r,setActivityLogTransactionId:F,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(so())},onOpenFileAttachmentSnackBar:()=>{t(Le({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(oo(e))},onUpdateFileAttachment:e=>{t(ao({files:e}))},previewMonthEndReport:(e,n,c,d)=>{g!=null&&t($t(e,g.companyId,n,!0,c,d,g.tenantId))},saveMonthEndReport:(e,n,c,d)=>{g!=null&&t($t(e,g.companyId,n,!1,c,d,g.tenantId))},onEditMonthEndInsightsClick:h,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:d}=C;g!=null&&d?.auditScorePercentage!=null&&(t(to(g.companyId,e,g.tenantId)),G.trackInsightsEmailPage(c.month,c.year,!1,"draft",d.auditScorePercentage,no().format(En.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const c=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,d,E,k,v,b,M,P,Z,H,oe)=>{t(eo(e,n,c,d,R,E,k,v,b,M,P,Z,H,oe))},onCancelAutoComplete:()=>{t(Ve("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Lt({scrollPosition:e}))},onUpdateTab:e=>{s.closeSidePanel?.(),B!=null&&z!=null&&(t(Ie(e,{start:z,end:B},!1,!1)),t(Xa(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{s.closeSidePanel?.(),B!=null&&z!=null&&(t(Wa(e)),t(Ie("autoCategorized",{start:z,end:B},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(nt({selectedTab:e,uiState:n})),B!=null&&z!=null&&t(Ie(e,{start:z,end:B},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(nt({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,d,E,k,v)=>{B!=null&&z!=null&&t(Ie(e,{start:z,end:B},!0,c,n,d,E,k,v))},resetTransactionCategorizationLocalData:(e,n,c,d,E,k,v,b)=>{t(Ha(e,n,c,d,b??null,E,k,!1,v))},updateSelectedVendorForTransaction:(e,n,c,d,E)=>{t(jt({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:d,uncategorizedAccounts:R,updatedVendor:E,isAccountingClassesEnabled:T}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const d=I.state?.referrer;e==="autoCategorized"?G.trackTransactionsAutoCategorisedPage(u.month,u.year,C.transactionView.totalCountByTab.autoCategorized,n.length,!1,d??null):G.trackTransactionsReviewPage(u.month,u.year,C.transactionView.totalCountByTab.review,n.length,!1,d??null),t(Za(e,n,c,i))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Qa({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,d,E,k,v)=>{const{transactionId:b,transaction:M,lineIds:P}=n;k!=null&&t(Ya({transactionId:b,customerUpdates:k})),t(Ka({selectedTab:d,transactionId:b.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:R,updatedCustomer:k,selectedEntity:E,isAccountingClassesEnabled:T,isUncategorizedExpenseCategoryEnabled:v})),E!=null&&t(it({entity:E,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:A,isUncategorizedExpenseCategoryEnabled:v}))},onFetchRecommendationsForEntityCategorization:(e,n,c,d,E,k,v)=>{const{transactionId:b,transaction:M,lineIds:P}=n;k!=null&&(t(Ga({transactionId:b,vendorUpdates:{name:k.name,id:k.id?k.id:void 0}})),t(Na({vendorId:k.id?k.id:void 0,localData:{vendorName:k.name,vendorId:k.id?k.id:void 0}}))),k?.id?(t(jt({selectedTab:d,transactionId:b.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:R,updatedVendor:k,selectedEntity:E,isAccountingClassesEnabled:T,isUncategorizedExpenseCategoryEnabled:v})),E!=null&&t(it({entity:E,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:A,isUncategorizedExpenseCategoryEnabled:v}))):t(Ja({selectedTab:d,transactionId:b.id,lineId:P[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(ze(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(ze(u,!0,!1,null,!1,!1))},markAsReview:(e,n,c,d)=>{G.trackFluxAnalysisReviewed(c.month,c.year,d??!1,e),t(qa(n,e,c,d??!1))},onUpdateFluxAnalysisUIState:e=>{t($a(e))},updateOperatingExpensesIdsForReview:e=>{t(ja({operatingExpenseIds:e,selectedPeriod:u}))},redirectToVendorDetailPage:e=>{if(s.tenantEmailDomain!=null){const n=ws(e.id,e.qboId,s.tenantEmailDomain),c=le(s.location.state?.pathnameStackToGoBack,s.location.pathname);s.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(La({sectionId:e,selectedPeriod:u}))},onFetchReimbursementView:(e,n,c)=>{t(ze(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(re(u,e))},setOpenDrawerClicked:e=>{t(je({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(ln("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=g?.companyId;c!=null&&(t(rn(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(dn({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(je({selectedDrawerAccountId:e})),t(cn({accountId:e,selectedPeriod:u,localData:{accountSource:"bank_statement"}})),t(Oe({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(re(u,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Ma({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(za({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Oa({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{s.closeSidePanel?.(),t(Va({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const d=e.vendor?.id;c&&d!=null&&t(Ua(d)),t(Ba({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,ct("bill"));const n=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{y(-1)},onReconListPageScroll:e=>{t(Lt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Mt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ve("common"))},onReconNodeCollapseToggled:(e,n)=>{t(_a({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(an({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(sn({accountId:e}))},onReconciliationPusherEventReceived:(e,n)=>{const c=n??{};if((e===In||e===kn)&&m==="reconciliation"&&(t(re(u,V,!0,!0)),J===!0)){const d=c.account_id;d!=null&&c.new_statement_data_status?.code==="processed"&&c.statement_upload_id!=null&&t(Fa({accountId:d,selectedPeriod:u,statementUploadId:c.statement_upload_id})),d==null||c.new_statement_data_status?.code!=="validation_failed"&&c.new_statement_data_status?.code!=="parsing_failed"&&c.new_statement_data_status?.code!=="processing_failed"||t(on({accountId:d,selectedPeriod:u,statementProcessingFailed:!0}))}}}}),((t,s,w)=>{const{isMissingReceiptsBulkUploadEnabled:T,...A}=w;return(function(i,p,I){return{...i,...p,...I,onUploadTransactionReceipt:(l,C,g,R,y)=>{p.onUploadTransactionReceipt(l,C,g,R,y,i.authParams)}}})(t,s,A)}))(is(ls)),zs=Ps((function(t){const s=t.displayName??t.name??"Component",w=tn.memo(t),T=A=>{const i=ke(),p=(function(){const u=ke(),m=x((V=>Ae(V).reconciliation.selectedDrawerAccountId));return{isOpen:m!=null,selectedAccountId:m,openPanel:a.useCallback((V=>{u(je({selectedDrawerAccountId:V}))}),[u]),closePanel:a.useCallback((()=>{u(je({selectedDrawerAccountId:void 0}))}),[u])}})(),I=x((u=>Ae(u).reconciliation)),l=x((u=>Me(u))),C=a.useCallback(((u,m)=>{i(ln("expense_automation_reconcile",u,m))}),[i]),g=a.useCallback(((u,m)=>{const V=l?.companyId;V!=null&&(i(rn(u,V,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",m)),i(dn({accountId:m,connectionInProgress:!0})))}),[i,l?.companyId]),R=a.useMemo((()=>{if(p.isOpen&&p.selectedAccountId!=null)return S.jsx(Fs,{reconciliation:I,selectedDrawerAccountId:p.selectedAccountId,onClose:p.closePanel,onFetchLinkTokenClick:C,onEstablishConnectionClick:g})}),[p.isOpen,p.selectedAccountId,p.closePanel,I,C,g]),y=a.useMemo((()=>({reconPanelContent:R,reconSidePanelIsOpen:p.isOpen,closeReconSidePanel:p.closePanel})),[R,p.isOpen,p.closePanel]),{useFeatureGate:r}=qe(),{isFeatureEnabled:h}=r(Y.isReconV3Enabled),F=a.useContext(Qt),J=a.useMemo((()=>p.isOpen?h===!0?{selectedItemId:p.selectedAccountId}:{closePanel:p.closePanel,selectedItemId:p.selectedAccountId}:F),[p.isOpen,p.closePanel,p.selectedAccountId,F,h]);return S.jsx(Qt.Provider,{value:J,children:S.jsx(w,{...A,...y})})};return T.displayName=`withReconSidePanel(${s})`,T})((({closeSidePanel:t,openTransactionPanel:s,panelContent:w,sidePanelIsFullView:T,sidePanelIsOpen:A,reconPanelContent:i,reconSidePanelIsOpen:p,closeReconSidePanel:I})=>{const{isAiCfoOpen:l,setIsAiCfoOpen:C}=us(),g=ms(),{isOpen:R}=ps(),y=nn(),r=st(),h=ke(),{isAiCfoAccessEnabled:F,onAskAiCfoClick:J}=fn({mobileExploreReferrer:"Transaction categorization"}),u=a.useCallback((()=>{A===!0&&T!==!0&&t?.()}),[t,A,T]),{areTenantIdsInSync:m}=gn(),V=(()=>{const o=x((N=>Ae(N))),U=st(),{currentSelectedViewFetchState:j,currentSelectedView:$,selectedPeriod:D}=o,ne=at($),K=at(j.fetchState),ee=a.useCallback((N=>{const ae=U.state?.referrer;$==="transaction_categorization"&&(o.selectedTransactionCategorizationTab==="review"?G.trackTransactionsReviewPage(D.month,D.year,o.transactionView.totalCountByTab.review,0,N,ae??null):G.trackTransactionsAutoCategorisedPage(D.month,D.year,o.transactionView.totalCountByTab.autoCategorized,0,N,ae??null)),$==="missing_receipts"&&G.trackMissingReceiptsPage(D.month,D.year,N,o.missingReceipts.transactions.length,ae??null),$==="je_schedules"&&G.trackMonthCloseScheduleListPage(D.month,D.year,N,o.jeSchedules.draftSchedules.length,o.jeSchedules.resolveSchedules.length,ae??null),$==="flux_analysis"&&G.trackFluxAnalysisPage(D.month,D.year,N,Us(o.fluxAnalysis),ae??null),$==="month_end_insights"&&o.auditSummary?.auditScorePercentage!=null&&G.trackInsightsEmailPage(D.month,D.year,N,"draft",o.auditSummary.auditScorePercentage,null,ae??null)}),[D,o]);return a.useEffect((()=>{K===j.fetchState&&$===ne||j.fetchState!=="Completed"||ee(!1)}),[$,j.fetchState,ne]),ee})(),te=hs(),[de,z]=a.useState(!1),B=x((o=>zt(o))),e=x((o=>Me(o))),[n,c]=a.useState(!1),[d,E]=a.useState(!1),[k,v]=a.useState([]),[b,M]=a.useState(null),P=a.useCallback((()=>{M(null)}),[]),Z=b?.contentType==="activity"?b.detail.transactionId:void 0,H=a.useCallback((o=>{o!=null?(l&&C(!1),g(),u(),M({contentType:"activity",detail:{transactionId:o}})):M((U=>U?.contentType==="activity"?null:U))}),[u,l,g,C]),oe=a.useCallback((o=>{l&&C(!1),g(),u(),M({contentType:"transfer",detail:o})}),[u,l,g,C]),ge=a.useCallback((()=>{g(),P(),u(),J()}),[u,P,J,g]),Ce=a.useRef(l);a.useEffect((()=>{l===!0&&Ce.current===!1&&(g(),P(),u()),Ce.current=l}),[u,P,l,g]);const q=a.useRef(R);a.useEffect((()=>{R===!0&&q.current===!1&&(l&&C(!1),P(),A===!0&&T!==!0&&t?.()),q.current=R}),[P,t,R,l,C,T,A]);const Se=A===!0&&T!==!0,Ee=a.useRef(Se);a.useEffect((()=>{Se&&!Ee.current&&(l&&C(!1),g(),P()),Ee.current=Se}),[P,l,Se,g,C]);const[f,W]=a.useState(!1),ue=a.useRef(!1),{selectedTab:xe}=Bt(),{tenantEmailDomain:Je}=Bt(),[Ye,lt]=a.useState(r.state?.message==="comingFromTransactionDetail"),rt=r.state?.message==="comingFromOverview",bn=gs(),Ke=Ne.getSignedInUser(),{useDynamicConfig:Tn,useFeatureGate:se}=qe(),{configValue:yn}=Tn(Cs.enableUncategorizedExpenseCategory),ce=yn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:dt}=se(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:be}=se(Y.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Qe}=se(Y.isTransactionActivityEnabled),{isFeatureEnabled:ut}=se(Y.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:vn}=se(Y.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:Pn}=se(Y.isProjectsTransactionsEnabled),{isFeatureEnabled:An}=se(Y.isReconV3Enabled),{isFeatureEnabled:wn}=se(Y.isJEScheduleCOTEnabled),Rn=a.useCallback((o=>{const U=ct(o.view==="reconciliation"?"bill":"expense");s?.(o.entityId,U)}),[s]),xn=x((o=>Po(o,"common"))),L=x((o=>Ae(o))),{categoryOptions:Dn,paymentAccountNames:Fn}=x((o=>Ao(o.accountState))),_n=x((o=>wo(o.classState))),{monthEndCloseChecksView:X,currentSelectedView:_,selectedPeriod:O,selectedTransactionCategorizationTab:Ze,currentSelectedViewBackgroundRefreshFetchState:Un,currentSelectedViewFetchState:me,jeSchedules:He,reconciliation:mt}=L;bs(_==="transaction_categorization");const Bn=L.transactionView.saveStatus.fetchState,pt=L.transactionView.transactions,ht=a.useRef(pt);ht.current=pt;const gt=x((o=>o.expenseAutomationTransactionsViewState?.transactionCategorizationView)),Ct=x((o=>o.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab)),St=a.useRef(gt);St.current=gt;const ft=a.useRef(Ct);ft.current=Ct;const ie=Ts(Bn,(()=>{const o=[],U=ft.current,j=St.current,$=j!=null&&U!=null?j[U]:void 0;if($?.transactionReviewLocalDataById!=null)for(const ne of Object.values($.transactionReviewLocalDataById)){const K=ne?.transactionReviewLocalData?.lineItemById;if(K!=null)for(const ee of Object.values(K)){const N=ee?.account;N?.accountId!=null&&o.push(N.accountId)}}const D=ht.current;for(const ne of D)for(const K of ne.lines??[])"account"in K&&K.account?.accountId!=null&&o.push(K.account.accountId);return o}));a.useEffect((()=>{_==="transaction_categorization"&&A!==!0||H(void 0)}),[_,H,A]),a.useEffect((()=>{p===!0&&I?.()}),[_,mt.selectedAccountId]);const Vn=L.transactionView.selectedTransactionCategorizationCompletedSubTab,De=`${Ze}|${Vn}`,Fe=a.useRef(null);a.useEffect((()=>{Fe.current!==null?Fe.current!==De&&(Fe.current=De,_==="transaction_categorization"&&P()):Fe.current=De}),[P,_,De]);const On=x((o=>Z==null?void 0:Ro(o.transactionState,Z))),pe=On?.qboId,It=x((o=>pe==null?void 0:xo(o,pe)));a.useEffect((()=>{pe!=null&&h(Do(pe))}),[h,pe]);const{createTransferEntryStatus:kt,creditCardTransferAccountsList:Et,transferAccounts:bt}=L.transactionView,Tt=a.useCallback((o=>ys(h,o)),[h]),yt=a.useMemo((()=>_!=="transaction_categorization"||b==null?null:b.contentType==="activity"?Qe===!0?S.jsx(Ss,{activityLogView:It,qboId:pe,onClose:()=>M(null),selectedTransactionId:b.detail.transactionId,isQuickViewCardStyle:!0},String(b.detail.transactionId)):null:b.contentType==="transfer"?S.jsx(fs,{createTransferEntryStatus:kt,transaction:b.detail,transferAccounts:b.detail.transactionType==="credit_card_payment"?Et:bt,onClose:()=>M(null),onCreateTransfer:Tt,isQuickViewCardStyle:!0},String(b.detail.transactionId)):null),[_,b,Qe,It,pe,kt,Et,bt,Tt]),zn=yt!=null,{selectedAccountId:Te}=mt,vt=at(He.accountSettingsView.saveState.fetchState),Mn=x((o=>Fo(o.accountState,o.accountListState,"accountList"))),Ln=x((o=>_o(o))),ye=xe!=null?Uo(xe):_,jn=x((o=>o.entityAutoCompleteState.autoCompleteText.common));if(Cn({isDataReady:me.fetchState==="Completed"}),Ke==null)throw Error("Can't access expense automation screen without signing in...");const Pt=un(O),ve=$e(Pt.start),Pe=$e(Pt.end);if(ve==null||Pe==null)throw Error(`Invalid start - ${ve} and end - ${Pe} period from given ${O}`);const $n=a.useCallback((()=>{c(!1)}),[]),qn=a.useCallback((()=>{E(!0)}),[]),Gn=a.useCallback((o=>{v(o),E(!1)}),[]),Nn=a.useCallback((()=>{v([])}),[]),_e=L.missingReceipts.bulkUpload.phase,At=L.missingReceipts.bulkUpload.currentBatchId;a.useEffect((()=>{be===!0&&_==="missing_receipts"&&_e==="matching"&&At!=null&&h(hn({cacheOverride:!0}))}),[be,_,_e,At,h]);const wt=Ke?.userId,Jn=O.month,Yn=O.year,Rt=e?.tenantId;a.useEffect((()=>{_==="missing_receipts"&&be!==!1&&_e==="idle"&&wt!=null&&Rt!=null&&h(Bo())}),[_,be,_e,wt,Rt,Jn,Yn,h]),a.useEffect((()=>{B.newVendorState?.vendorDetailLocalData?.vendorName!=null?z(!0):z(!1)}),[B.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect((()=>{ye!=null&&_!==ye&&h(mn(ye))}),[ye]),a.useEffect((()=>{f!==!1||me.fetchState!=="Completed"&&me.fetchState!=="Error"||!m||(W(!0),h(Nt(!1,!1,ce)))}),[f,me,m,ce]),a.useEffect((()=>{!rt&&m&&(h(Nt(!1,!1,ce)),h(re(O,Te,!1,!1)))}),[O.month,O.year,m,ce]);const xt=a.useCallback(((o=!1,U=!1)=>{const j={start:ve,end:Pe};switch(_){case"transaction_categorization":h(Ie(Ze,j,o,!Ye,void 0,void 0,U,void 0,ce)),lt(!1);break;case"flux_analysis":h(ze(O,o,U,null));break;case"month_end_insights":if(U===!1){const $=new Date(O.year,O.month,0),D=Oo($.toDateString()).format(En.analytics.YYYYDashMMDashDDFormat);h(zo(!0,e.companyId,e.tenantId,D)),h(Mo(e.companyId,e.tenantId))}break;case"je_schedules":h(Vo(j,U));break;case"missing_receipts":h(pn(j,{amount:75,currencyCode:"USD",currencySymbol:"$"},o,U));break;default:h(re(O,Te,o,U))}}),[_,ve,Pe,e.companyId,e.tenantId,Ze,O,Te,Ye,lt,ce]);a.useEffect((()=>{_===ye&&me.fetchState==="Not-Started"&&m&&xt(!0)}),[me,ve,Pe,e.companyId,e.tenantId,m]),a.useEffect((()=>{rt||Ye||ue.current||Un.fetchState==="In-Progress"||me.fetchState!=="Completed"||(ue.current=!0,xt(!0,!0))}),[]),a.useEffect((()=>{X.fetchState!=="In-Progress"&&X.fetchState!=="Completed"&&h(we({tenantId:e.tenantId,period:O,refreshViewInBackground:!1}))}),[X.fetchState,e.tenantId]),a.useEffect((()=>{L.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?c(!0):c(!1)}),[L.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect((()=>{L.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&m&&(h(we({tenantId:e.tenantId,period:O,refreshViewInBackground:!0})),h(Lo({companyId:e.companyId})),y("../"))}),[L.monthEndInsights?.sendMonthEndReportStatus?.fetchState,e.tenantId,O,e.companyId,m]),a.useEffect((()=>{const o=setInterval((()=>{X.fetchState!=="In-Progress"&&X.fetchState==="Completed"&&h(we({tenantId:e.tenantId,period:O,refreshViewInBackground:!0}))}),3e5);return()=>clearInterval(o)}),[X.fetchState,e.tenantId,O,h]),a.useEffect((()=>{const o=setInterval((()=>{_==="reconciliation"&&Te==null&&L.reconciliation.fetchStatus.fetchState==="Completed"&&L.reconciliation.refreshStatus.fetchState!=="In-Progress"&&h(re(O,void 0,!0,!0))}),3e5);return()=>clearInterval(o)}),[_,h,L.reconciliation.fetchStatus.fetchState,L.reconciliation.refreshStatus.fetchState,re,Te,O]);const Kn=Zt();a.useEffect((()=>{const o=(X.monthEndCloseChecks?.monthEndCloseCheckList.find((U=>U.id==="month_end_insights"))?.isDisabled??!1)&&!dt;_!=="month_end_insights"||!o&&X.monthEndCloseChecks?.reportEmailSentDate==null||y("../")}),[_,X.monthEndCloseChecks]);const Qn=p===!0?i:w,Zn=p===!0||A===!0,Hn=p===!0?I:t;a.useEffect((()=>{vt==="In-Progress"&&He.accountSettingsView.saveState.fetchState==="Completed"&&h(Jt())}),[vt,He.accountSettingsView.saveState.fetchState,Jt]);const{transactionId:Dt,onSaveVendor:Wn,onSaveSuccess:Xn,onCancel:ea,vendorViewDetails:ta}=(({expenseAutomationViewSelector:o,closeDrawerHandler:U,currentSelectedView:j,isUncategorizedExpenseCategoryEnabled:$})=>{const D=ke();let ne,K,ee;const N=Zt(),ae=o.transactionView;let Ft=()=>{};const{transactions:aa,selectedTransactionId:fe,selectedTransactionLineId:Ue,transactionLocalData:oa}=ae;if(j==="transaction_categorization"){const We=oa.find((he=>he.transactionId===fe)),Q=aa.find((he=>he.id===fe)),_t=Ue!=null?We?.transactionReviewLocalData?.lineItemById[Ue]:void 0,Ut=_t?.account;K=_t?.class?.classId,ne=["Uncategorized Income","Uncategorized Expense"].includes(Ut?.accountName??"")?void 0:Ut?.accountId;const ca=As(fe,Q?.typeOfTransaction);Q!=null&&ca&&(ee={id:fe,type:ct(Q.typeOfTransaction)}),Ft=()=>{if(fe!=null&&Ue!=null&&Q!=null){const he=ae.transactionLocalData.find((Be=>Be.transactionId===fe))?.transactionReviewLocalData;if(he!=null&&Q.lines!=null&&Q.lines.length>0){const Be=he.lineItemById[Ue];let Xe=he.selectedEntity;if(Da(Q)||(Xe=Be.selectedEntityLine),Xe!=null){const ia=Xe,la={transactionId:{id:Q.id,type:Q.type},transaction:Q,lineIds:Q.lines.map((ra=>ra.id))??[]};D(it({entity:ia,amount:Be.amount.amount,transactionDetails:la,flowType:"categorization",selectedTab:o.selectedTransactionCategorizationTab,isFetchCOT:N,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const sa=x((We=>zt(We,void 0,ne,K)));return{transactionId:ee,onSaveVendor:()=>{D(xa(ee,void 0,!1,!0))},onSaveSuccess:Ft,onCancel:()=>{ee!=null&&D(Aa({transactionId:ee})),D(wa()),D(Ra()),U()},vendorViewDetails:sa}})({expenseAutomationViewSelector:L,closeDrawerHandler:()=>{z(!1)},currentSelectedView:_,isUncategorizedExpenseCategoryEnabled:ce}),na={events:e.companyId!=null?[`private-encrypted-${e.companyId}.${In}`,`private-encrypted-${e.companyId}.${kn}`]:[],eventCallback:(o,U,j)=>{j.onReconciliationPusherEventReceived(o,U)}};return bn?.loggedInUserRoleMap==null?X.fetchState==="Error"?S.jsx(Is,{onGoHome:()=>y("../",{replace:!0}),onReload:()=>window.location.reload()}):S.jsx(Sn,{fetchState:"In-Progress"}):S.jsxs(S.Fragment,{children:[S.jsx(Rs,{isOpen:d,drawerLeftMargin:new ks(0,0,300,650),onClose:()=>{E(!1)},children:S.jsx(Ms,{onClick:o=>o.stopPropagation(),children:S.jsx(_s,{companyId:e.companyId,closeCustomerRequestDrawer:()=>E(!1),addCustomerRequest:Gn,resetCustomerRequest:Nn})})}),Dt!=null&&de&&S.jsx(vs,{isOpen:de,transactionId:Dt,onSaveVendor:Wn,onSaveSuccess:Xn,onCancel:ea,vendorViewDetails:ta}),S.jsx(Os,{...na,navigate:y,location:r,themeState:te,categoryOptions:Dn,classesForFilters:_n,accountsForFilters:Fn,vendorSearchAutoCompleteData:{autoCompleteText:jn,entityAutoCompleteView:xn},expenseAutomationViewSelector:L,isMissingReceiptsBulkUploadEnabled:be,monthEndInsightsPreviewMode:n,monthEndInsightsCustomerRequestData:k,isRealtimeInsightsFeatureEnabled:dt,isCreateTransferEntryFromExpenseEnabled:ut,isUncategorizedExpenseCategoryEnabled:ce,isAccountingClassesEnabled:Ln,isProjectsTransactionsEnabled:Pn,isCOTEnabled:Kn,isJEScheduleCOTEnabled:wn,currentTenant:e,companyId:e.companyId,signedInUser:Ke,isTransactionActivityEnabled:Qe,isRightPanelOpen:zn,rightSidePanel:yt,onOpenTransferRightPanel:ut===!0?oe:void 0,uncategorizedAccounts:Mn,onClickCustomerRequest:qn,handleEditClick:$n,tenantEmailDomain:Je,trackExpenseAutomationTabAnalytics:V,setActivityLogTransactionId:H,closeSidePanel:Hn,openTransactionPanel:s,sidePanelIsOpen:Zn,sidePanelIsFullView:p!==!0&&T,panelContent:Qn,isAiCfoAccessEnabled:F,onAskAiCfoClick:ge,isExpenseAutomationCommentingEnabled:vn,isReconV3Enabled:An,onExpenseAutomationCommentingThreadClick:Rn,sidePanelListPercent:p===!0?66:void 0}),ie.showPopup&&ie.popupType!=null&&S.jsx(Es,{popupType:ie.popupType,currencySymbol:ie.currencySymbol,accountId:ie.popupAccountId??"",accountName:ie.popupAccountName??"",onSubmit:ie.handleSubmit,onDismiss:ie.handleDismiss})]})}))),Ms=Ge(ua)`
|
|
21
|
+
`;function _s({companyId:t,closeCustomerRequestDrawer:s,addCustomerRequest:w,resetCustomerRequest:b}){const A=Ne.getSignedInUser();if(A==null)throw Error("Can't access Customer Request page without signing in...");const i=x((p=>Pa(p,t,A)));return a.useEffect((()=>{b()}),[]),S.jsx(S.Fragment,{children:i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?S.jsx(Sn,{fetchState:"In-Progress"}):S.jsx(ss,{onCloseClick:s,addCustomerRequest:w,snippets:i.companyMonthEndReportTemplatesData,bulletPoints:i.zeniRequestsData??[]})})}const Us=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,In="reconciliation-status-updated",kn="statement-status-updated",{common:{strings:{hyphen:Bs,comma:Xt,space:Vs}},dateFormat:En}=cs.getLocalizedStrings(),en=Xo,Os=ma((function(t,s){const{uncategorizedAccounts:w,vendorSearchAutoCompleteData:b,monthEndInsightsCustomerRequestData:A,monthEndInsightsPreviewMode:i,companyId:p,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:l}=s,C=Ne.getSignedInUser(),g=t.tenantState.currentTenantId,R={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:g??""},y=Ae(t),{selectedTransactionCategorizationTab:r}=y;return{expenseAutomationViewSelector:y,bulkUploadSelector:I===!0?y.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:b,authParams:R,receiptUploadEndpoint:`${Re.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${rs}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Re.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:r,monthEndInsightsCustomerRequestData:A,monthEndInsightsPreviewMode:i,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:C,uncategorizedAccounts:w,companyId:p,isTransactionActivityEnabled:l}}),(function(t,s){const{themeState:w,isAccountingClassesEnabled:b,isCOTEnabled:A,isUncategorizedExpenseCategoryEnabled:i,isMissingReceiptsBulkUploadEnabled:p,location:I,vendorSearchAutoCompleteData:l,expenseAutomationViewSelector:C,currentTenant:g,uncategorizedAccounts:R,navigate:y,onClickCustomerRequest:r,handleEditClick:h,setActivityLogTransactionId:F,isReconV3Enabled:J}=s,{selectedPeriod:u,currentSelectedView:m,reconciliation:{selectedAccountId:V}}=C,{accountSettingsView:te}=C.jeSchedules,de=un(u),z=$e(de.start),B=$e(de.end);return{onZeniLogoClick:()=>{w.toggle()},onUploadReceiptAttachment:e=>{G.trackMissingReceiptAttached(u.month,u.year),t(vo(e))},onUploadTransactionReceipt:(e,n,c,d,E,k)=>{t(Gt(e,n,{fetchState:"In-Progress"}));const v=()=>t(Gt(e,n,{fetchState:"Error"}));ds(`${Re.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,k,n,c,d,E).then((T=>{T!=null?t(yo(e,T)):v()})).catch(v)},onMissingReceiptsRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const c=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(bo(e,n)),g!=null&&t(we({tenantId:g.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,d)=>{t(To(e,{fetchState:n,error:c})),c!=null&&t(Le({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:d!=null?Vs+Bs+d+Xt:Xt}]}))},onUpdateJESchedulesUIState:e=>{t(Eo(e))},onUpdateMissingReceiptsUIState:e=>{t(ko(e))},onFetchMissingReceiptsList:()=>{B!=null&&z!=null&&t(pn({start:z,end:B},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...p===!0?{onBulkUploadFiles:e=>{t(Wo(e))},onBulkUploadProgress:e=>{t(Ho(e))},onBulkUploadSuccess:e=>{t(Zo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Qo(e))},onConfirmBulkUploadMatch:(e,n,c,d,E)=>{t(Ko(e,n,c,d,E))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Yo())},onSetBulkUploadResultsTab:e=>{t(Jo(e))},onSetBulkUploadCompletedSubTab:e=>{t(No(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Yt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Go())},onSearchTransactionsForManualMatch:(e,n)=>{t(en(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=C.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(en(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(qo(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t($o())},onFetchBulkUploadBatches:e=>{t(hn(e))},onFetchMoreBatchDetails:()=>{t(jo())},onResetBulkUploadSort:()=>{t(Yt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(Io())},onSearchTextChanged:e=>{const n=C.currentSelectedView,c=C.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(nt({selectedTab:c,uiState:{searchString:e}})),B!=null&&z!=null&&t(Ie(c,{start:z,end:B},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=C.selectedTransactionCategorizationTab;t(fo({filters:e,selectedTab:n}))},onRefresh:()=>{s.trackExpenseAutomationTabAnalytics(!0),t(So(i))},onClose:()=>{m==="reconciliation"&&V!=null&&t(qt({selectedAccountId:void 0})),y("../")},onBack:()=>{m==="reconciliation"&&V!=null&&t(qt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Co(e))},onSaveReconciliationReview:e=>{t(go(e))},onUpdateStep:e=>{const{selectedPeriod:n}=C,c=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:C.currentSelectedView}}),t(mn(e))},handleLogOutClick:()=>{const e=le(I.state?.pathnameStackToGoBack,I.pathname);y("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:d,accruedExpensesAccount:E}=n,k=ot(te.prepaidExpensesAccountList,c.selectedOptions),v=ot(te.fixedAssetsAccountList,d.selectedOptions),T=ot(te.accruedExpensesAccountList,E.selectedOptions),M={selectedPrepaidExpensesAccountIds:k.map((P=>P.accountId)),selectedFixedAssetsAccountIds:v.map((P=>P.accountId)),selectedAccruedExpensesAccountIds:T.map((P=>P.accountId))};t(ho({data:M}))},onSaveJeAccountSettingsClick:()=>{t(po())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:d,scheduleClass:E,scheduleExpenseCategory:k,vendor:v}=n,{allAccountList:T,allClassList:M,allDepreciationAccountList:P}=C.jeSchedules,H=l.entityAutoCompleteView.vendor.length>0?l.entityAutoCompleteView.vendor.find((q=>q.id===v?.selectedOption)):void 0,W={id:H?.zeniId??v?.selectedOption??"",name:H?.name??v?.defaultOptions.find((q=>q.value===v?.selectedOption))?.label??"",logo:H?.logo},oe=k?.selectedOption!=null?T.find((q=>q.qboId===k.selectedOption)):void 0,he=E?.selectedOption!=null?M.find((q=>q.classId===E.selectedOption)):void 0,ge=d?.selectedOption!=null?P.find((q=>q.qboId===d.selectedOption)):void 0;t(mo({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:oe?.accountId,updatedClassId:he?.classId,updatedAccumulatedDepreciationCategoryID:ge?.accountId,updatedVendor:{id:W.id,name:W.name}}}))},ignoreRecommendedJeSchedule(e,n){t(uo(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Mt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Ve("common"))},onCancelAutoComplete:()=>{t(Ve("common"))}},onPostJESchedule(e,n){t(ro({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(lo())},handleJeScheduleClick:(e,n,c)=>{t(io({selectedJEScheduleKey:n}));const d=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{g!=null&&t(co(e,g.companyId,g.tenantId))},onClickCustomerRequest:r,setActivityLogTransactionId:F,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(so())},onOpenFileAttachmentSnackBar:()=>{t(Le({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(oo(e))},onUpdateFileAttachment:e=>{t(ao({files:e}))},previewMonthEndReport:(e,n,c,d)=>{g!=null&&t($t(e,g.companyId,n,!0,c,d,g.tenantId))},saveMonthEndReport:(e,n,c,d)=>{g!=null&&t($t(e,g.companyId,n,!1,c,d,g.tenantId))},onEditMonthEndInsightsClick:h,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:d}=C;g!=null&&d?.auditScorePercentage!=null&&(t(to(g.companyId,e,g.tenantId)),G.trackInsightsEmailPage(c.month,c.year,!1,"draft",d.auditScorePercentage,no().format(En.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const c=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,d,E,k,v,T,M,P,H,W,oe)=>{t(eo(e,n,c,d,R,E,k,v,T,M,P,H,W,oe))},onCancelAutoComplete:()=>{t(Ve("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Lt({scrollPosition:e}))},onUpdateTab:e=>{s.closeSidePanel?.(),B!=null&&z!=null&&(t(Ie(e,{start:z,end:B},!1,!1)),t(Xa(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{s.closeSidePanel?.(),B!=null&&z!=null&&(t(Wa(e)),t(Ie("autoCategorized",{start:z,end:B},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(nt({selectedTab:e,uiState:n})),B!=null&&z!=null&&t(Ie(e,{start:z,end:B},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(nt({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,d,E,k,v)=>{B!=null&&z!=null&&t(Ie(e,{start:z,end:B},!0,c,n,d,E,k,v))},resetTransactionCategorizationLocalData:(e,n,c,d,E,k,v,T)=>{t(Ha(e,n,c,d,T??null,E,k,!1,v))},updateSelectedVendorForTransaction:(e,n,c,d,E)=>{t(jt({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:d,uncategorizedAccounts:R,updatedVendor:E,isAccountingClassesEnabled:b}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const d=I.state?.referrer;e==="autoCategorized"?G.trackTransactionsAutoCategorisedPage(u.month,u.year,C.transactionView.totalCountByTab.autoCategorized,n.length,!1,d??null):G.trackTransactionsReviewPage(u.month,u.year,C.transactionView.totalCountByTab.review,n.length,!1,d??null),t(Za(e,n,c,i))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Qa({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,d,E,k,v)=>{const{transactionId:T,transaction:M,lineIds:P}=n;k!=null&&t(Ya({transactionId:T,customerUpdates:k})),t(Ka({selectedTab:d,transactionId:T.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:R,updatedCustomer:k,selectedEntity:E,isAccountingClassesEnabled:b,isUncategorizedExpenseCategoryEnabled:v})),E!=null&&t(it({entity:E,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:A,isUncategorizedExpenseCategoryEnabled:v}))},onFetchRecommendationsForEntityCategorization:(e,n,c,d,E,k,v)=>{const{transactionId:T,transaction:M,lineIds:P}=n;k!=null&&(t(Ga({transactionId:T,vendorUpdates:{name:k.name,id:k.id?k.id:void 0}})),t(Na({vendorId:k.id?k.id:void 0,localData:{vendorName:k.name,vendorId:k.id?k.id:void 0}}))),k?.id?(t(jt({selectedTab:d,transactionId:T.id,lineId:P[0],selectedTransaction:M,uncategorizedAccounts:R,updatedVendor:k,selectedEntity:E,isAccountingClassesEnabled:b,isUncategorizedExpenseCategoryEnabled:v})),E!=null&&t(it({entity:E,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:A,isUncategorizedExpenseCategoryEnabled:v}))):t(Ja({selectedTab:d,transactionId:T.id,lineId:P[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(ze(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(ze(u,!0,!1,null,!1,!1))},markAsReview:(e,n,c,d)=>{G.trackFluxAnalysisReviewed(c.month,c.year,d??!1,e),t(qa(n,e,c,d??!1))},onUpdateFluxAnalysisUIState:e=>{t($a(e))},updateOperatingExpensesIdsForReview:e=>{t(ja({operatingExpenseIds:e,selectedPeriod:u}))},redirectToVendorDetailPage:e=>{if(s.tenantEmailDomain!=null){const n=ws(e.id,e.qboId,s.tenantEmailDomain),c=le(s.location.state?.pathnameStackToGoBack,s.location.pathname);s.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(La({sectionId:e,selectedPeriod:u}))},onFetchReimbursementView:(e,n,c)=>{t(ze(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(re(u,e))},setOpenDrawerClicked:e=>{t(je({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(ln("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=g?.companyId;c!=null&&(t(rn(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(dn({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(je({selectedDrawerAccountId:e})),t(cn({accountId:e,selectedPeriod:u,localData:{accountSource:"bank_statement"}})),t(Oe({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(re(u,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Ma({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(za({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Oa({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{s.closeSidePanel?.(),t(Va({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const d=e.vendor?.id;c&&d!=null&&t(Ua(d)),t(Ba({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,ct("bill"));const n=le(I.state?.pathnameStackToGoBack,I.pathname);y(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{y(-1)},onReconListPageScroll:e=>{t(Lt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Mt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ve("common"))},onReconNodeCollapseToggled:(e,n)=>{t(_a({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(an({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(sn({accountId:e}))},onReconciliationPusherEventReceived:(e,n)=>{const c=n??{};if((e===In||e===kn)&&m==="reconciliation"&&(t(re(u,V,!0,!0)),J===!0)){const d=c.account_id;d!=null&&c.new_statement_data_status?.code==="processed"&&c.statement_upload_id!=null&&t(Fa({accountId:d,selectedPeriod:u,statementUploadId:c.statement_upload_id})),d==null||c.new_statement_data_status?.code!=="validation_failed"&&c.new_statement_data_status?.code!=="parsing_failed"&&c.new_statement_data_status?.code!=="processing_failed"||t(on({accountId:d,selectedPeriod:u,statementProcessingFailed:!0}))}}}}),((t,s,w)=>{const{isMissingReceiptsBulkUploadEnabled:b,...A}=w;return(function(i,p,I){return{...i,...p,...I,onUploadTransactionReceipt:(l,C,g,R,y)=>{p.onUploadTransactionReceipt(l,C,g,R,y,i.authParams)}}})(t,s,A)}))(is(ls)),zs=Ps((function(t){const s=t.displayName??t.name??"Component",w=tn.memo(t),b=A=>{const i=ke(),p=(function(){const u=ke(),m=x((V=>Ae(V).reconciliation.selectedDrawerAccountId));return{isOpen:m!=null,selectedAccountId:m,openPanel:a.useCallback((V=>{u(je({selectedDrawerAccountId:V}))}),[u]),closePanel:a.useCallback((()=>{u(je({selectedDrawerAccountId:void 0}))}),[u])}})(),I=x((u=>Ae(u).reconciliation)),l=x((u=>Me(u))),C=a.useCallback(((u,m)=>{i(ln("expense_automation_reconcile",u,m))}),[i]),g=a.useCallback(((u,m)=>{const V=l?.companyId;V!=null&&(i(rn(u,V,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",m)),i(dn({accountId:m,connectionInProgress:!0})))}),[i,l?.companyId]),R=a.useMemo((()=>{if(p.isOpen&&p.selectedAccountId!=null)return S.jsx(Fs,{reconciliation:I,selectedDrawerAccountId:p.selectedAccountId,onClose:p.closePanel,onFetchLinkTokenClick:C,onEstablishConnectionClick:g})}),[p.isOpen,p.selectedAccountId,p.closePanel,I,C,g]),y=a.useMemo((()=>({reconPanelContent:R,reconSidePanelIsOpen:p.isOpen,closeReconSidePanel:p.closePanel})),[R,p.isOpen,p.closePanel]),{useFeatureGate:r}=qe(),{isFeatureEnabled:h}=r(Y.isReconV3Enabled),F=a.useContext(Qt),J=a.useMemo((()=>p.isOpen?h===!0?{selectedItemId:p.selectedAccountId}:{closePanel:p.closePanel,selectedItemId:p.selectedAccountId}:F),[p.isOpen,p.closePanel,p.selectedAccountId,F,h]);return S.jsx(Qt.Provider,{value:J,children:S.jsx(w,{...A,...y})})};return b.displayName=`withReconSidePanel(${s})`,b})((({closeSidePanel:t,openTransactionPanel:s,panelContent:w,sidePanelIsFullView:b,sidePanelIsOpen:A,reconPanelContent:i,reconSidePanelIsOpen:p,closeReconSidePanel:I})=>{const{isAiCfoOpen:l,setIsAiCfoOpen:C}=us(),g=ms(),{isOpen:R}=ps(),y=nn(),r=st(),h=ke(),{isAiCfoAccessEnabled:F,onAskAiCfoClick:J}=fn({mobileExploreReferrer:"Transaction categorization"}),u=a.useCallback((()=>{A===!0&&b!==!0&&t?.()}),[t,A,b]),{areTenantIdsInSync:m}=gn(),V=(()=>{const o=x((N=>Ae(N))),U=st(),{currentSelectedViewFetchState:j,currentSelectedView:$,selectedPeriod:D}=o,ne=at($),Q=at(j.fetchState),ee=a.useCallback((N=>{const ae=U.state?.referrer;$==="transaction_categorization"&&(o.selectedTransactionCategorizationTab==="review"?G.trackTransactionsReviewPage(D.month,D.year,o.transactionView.totalCountByTab.review,0,N,ae??null):G.trackTransactionsAutoCategorisedPage(D.month,D.year,o.transactionView.totalCountByTab.autoCategorized,0,N,ae??null)),$==="missing_receipts"&&G.trackMissingReceiptsPage(D.month,D.year,N,o.missingReceipts.transactions.length,ae??null),$==="je_schedules"&&G.trackMonthCloseScheduleListPage(D.month,D.year,N,o.jeSchedules.draftSchedules.length,o.jeSchedules.resolveSchedules.length,ae??null),$==="flux_analysis"&&G.trackFluxAnalysisPage(D.month,D.year,N,Us(o.fluxAnalysis),ae??null),$==="month_end_insights"&&o.auditSummary?.auditScorePercentage!=null&&G.trackInsightsEmailPage(D.month,D.year,N,"draft",o.auditSummary.auditScorePercentage,null,ae??null)}),[D,o]);return a.useEffect((()=>{Q===j.fetchState&&$===ne||j.fetchState!=="Completed"||ee(!1)}),[$,j.fetchState,ne]),ee})(),te=hs(),[de,z]=a.useState(!1),B=x((o=>zt(o))),e=x((o=>Me(o))),[n,c]=a.useState(!1),[d,E]=a.useState(!1),[k,v]=a.useState([]),[T,M]=a.useState(null),P=a.useCallback((()=>{M(null)}),[]),H=T?.contentType==="activity"?T.detail.transactionId:void 0,W=a.useCallback((o=>{o!=null?(l&&C(!1),g(),u(),M({contentType:"activity",detail:{transactionId:o}})):M((U=>U?.contentType==="activity"?null:U))}),[u,l,g,C]),oe=a.useCallback((o=>{l&&C(!1),g(),u(),M({contentType:"transfer",detail:o})}),[u,l,g,C]),he=a.useCallback((()=>{g(),P(),u(),J()}),[u,P,J,g]),ge=a.useRef(l);a.useEffect((()=>{l===!0&&ge.current===!1&&(g(),P(),u()),ge.current=l}),[u,P,l,g]);const q=a.useRef(R);a.useEffect((()=>{R===!0&&q.current===!1&&(l&&C(!1),P(),A===!0&&b!==!0&&t?.()),q.current=R}),[P,t,R,l,C,b,A]);const Ce=A===!0&&b!==!0,Ee=a.useRef(Ce);a.useEffect((()=>{Ce&&!Ee.current&&(l&&C(!1),g(),P()),Ee.current=Ce}),[P,l,Ce,g,C]);const[f,X]=a.useState(!1),ue=a.useRef(!1),{selectedTab:xe}=Bt(),{tenantEmailDomain:Je}=Bt(),[Ye,lt]=a.useState(r.state?.message==="comingFromTransactionDetail"),rt=r.state?.message==="comingFromOverview",Tn=gs(),Ke=Ne.getSignedInUser(),{useDynamicConfig:bn,useFeatureGate:se}=qe(),{configValue:yn}=bn(Cs.enableUncategorizedExpenseCategory),ce=yn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:dt}=se(Y.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:Te}=se(Y.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Qe}=se(Y.isTransactionActivityEnabled),{isFeatureEnabled:ut}=se(Y.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:vn}=se(Y.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:Pn}=se(Y.isProjectsTransactionsEnabled),{isFeatureEnabled:An}=se(Y.isReconV3Enabled),{isFeatureEnabled:wn}=se(Y.isJEScheduleCOTEnabled),Rn=a.useCallback((o=>{const U=ct(o.view==="reconciliation"?"bill":"expense");s?.(o.entityId,U)}),[s]),xn=x((o=>Po(o,"common"))),L=x((o=>Ae(o))),{categoryOptions:Dn,paymentAccountNames:Fn}=x((o=>Ao(o.accountState))),_n=x((o=>wo(o.classState))),{monthEndCloseChecksView:K,currentSelectedView:_,selectedPeriod:O,selectedTransactionCategorizationTab:Ze,currentSelectedViewBackgroundRefreshFetchState:Un,currentSelectedViewFetchState:Se,jeSchedules:He,reconciliation:mt}=L;Ts(_==="transaction_categorization");const Bn=L.transactionView.saveStatus.fetchState,pt=L.transactionView.transactions,ht=a.useRef(pt);ht.current=pt;const gt=x((o=>o.expenseAutomationTransactionsViewState?.transactionCategorizationView)),Ct=x((o=>o.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab)),St=a.useRef(gt);St.current=gt;const ft=a.useRef(Ct);ft.current=Ct;const ie=bs(Bn,(()=>{const o=[],U=ft.current,j=St.current,$=j!=null&&U!=null?j[U]:void 0;if($?.transactionReviewLocalDataById!=null)for(const ne of Object.values($.transactionReviewLocalDataById)){const Q=ne?.transactionReviewLocalData?.lineItemById;if(Q!=null)for(const ee of Object.values(Q)){const N=ee?.account;N?.accountId!=null&&o.push(N.accountId)}}const D=ht.current;for(const ne of D)for(const Q of ne.lines??[])"account"in Q&&Q.account?.accountId!=null&&o.push(Q.account.accountId);return o}));a.useEffect((()=>{_==="transaction_categorization"&&A!==!0||W(void 0)}),[_,W,A]),a.useEffect((()=>{p===!0&&I?.()}),[_,mt.selectedAccountId]);const Vn=L.transactionView.selectedTransactionCategorizationCompletedSubTab,De=`${Ze}|${Vn}`,Fe=a.useRef(null);a.useEffect((()=>{Fe.current!==null?Fe.current!==De&&(Fe.current=De,_==="transaction_categorization"&&P()):Fe.current=De}),[P,_,De]);const On=x((o=>H==null?void 0:Ro(o.transactionState,H))),me=On?.qboId,It=x((o=>me==null?void 0:xo(o,me)));a.useEffect((()=>{me!=null&&h(Do(me))}),[h,me]);const{createTransferEntryStatus:kt,creditCardTransferAccountsList:Et,transferAccounts:Tt}=L.transactionView,bt=a.useCallback((o=>ys(h,o)),[h]),yt=a.useMemo((()=>_!=="transaction_categorization"||T==null?null:T.contentType==="activity"?Qe===!0?S.jsx(Ss,{activityLogView:It,qboId:me,onClose:()=>M(null),selectedTransactionId:T.detail.transactionId,isQuickViewCardStyle:!0},String(T.detail.transactionId)):null:T.contentType==="transfer"?S.jsx(fs,{createTransferEntryStatus:kt,transaction:T.detail,transferAccounts:T.detail.transactionType==="credit_card_payment"?Et:Tt,onClose:()=>M(null),onCreateTransfer:bt,isQuickViewCardStyle:!0},String(T.detail.transactionId)):null),[_,T,Qe,It,me,kt,Et,Tt,bt]),zn=yt!=null,{selectedAccountId:be}=mt,vt=at(He.accountSettingsView.saveState.fetchState),Mn=x((o=>Fo(o.accountState,o.accountListState,"accountList"))),Ln=x((o=>_o(o))),ye=xe!=null?Uo(xe):_,jn=x((o=>o.entityAutoCompleteState.autoCompleteText.common));if(Cn({isDataReady:Se.fetchState==="Completed"}),Ke==null)throw Error("Can't access expense automation screen without signing in...");const Pt=un(O),ve=$e(Pt.start),Pe=$e(Pt.end);if(ve==null||Pe==null)throw Error(`Invalid start - ${ve} and end - ${Pe} period from given ${O}`);const $n=a.useCallback((()=>{c(!1)}),[]),qn=a.useCallback((()=>{E(!0)}),[]),Gn=a.useCallback((o=>{v(o),E(!1)}),[]),Nn=a.useCallback((()=>{v([])}),[]),_e=L.missingReceipts.bulkUpload.phase,At=L.missingReceipts.bulkUpload.currentBatchId;a.useEffect((()=>{Te===!0&&_==="missing_receipts"&&_e==="matching"&&At!=null&&h(hn({cacheOverride:!0}))}),[Te,_,_e,At,h]);const wt=Ke?.userId,Jn=O.month,Yn=O.year,Rt=e?.tenantId;a.useEffect((()=>{_==="missing_receipts"&&Te!==!1&&_e==="idle"&&wt!=null&&Rt!=null&&h(Bo())}),[_,Te,_e,wt,Rt,Jn,Yn,h]),a.useEffect((()=>{B.newVendorState?.vendorDetailLocalData?.vendorName!=null?z(!0):z(!1)}),[B.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect((()=>{ye!=null&&_!==ye&&h(mn(ye))}),[ye]),a.useEffect((()=>{f===!1&&Se.fetchState==="Completed"&&m&&(X(!0),h(Nt(!1,!1,ce)))}),[f,Se,m,ce]),a.useEffect((()=>{!rt&&m&&(h(Nt(!1,!1,ce)),h(re(O,be,!1,!1)))}),[O.month,O.year,m,ce]);const xt=a.useCallback(((o=!1,U=!1)=>{const j={start:ve,end:Pe};switch(_){case"transaction_categorization":h(Ie(Ze,j,o,!Ye,void 0,void 0,U,void 0,ce)),lt(!1);break;case"flux_analysis":h(ze(O,o,U,null));break;case"month_end_insights":if(U===!1){const $=new Date(O.year,O.month,0),D=Oo($.toDateString()).format(En.analytics.YYYYDashMMDashDDFormat);h(zo(!0,e.companyId,e.tenantId,D)),h(Mo(e.companyId,e.tenantId))}break;case"je_schedules":h(Vo(j,U));break;case"missing_receipts":h(pn(j,{amount:75,currencyCode:"USD",currencySymbol:"$"},o,U));break;default:h(re(O,be,o,U))}}),[_,ve,Pe,e.companyId,e.tenantId,Ze,O,be,Ye,lt,ce]);a.useEffect((()=>{_===ye&&Se.fetchState==="Not-Started"&&m&&xt(!0)}),[Se,ve,Pe,e.companyId,e.tenantId,m]),a.useEffect((()=>{rt||Ye||ue.current||Un.fetchState==="In-Progress"||Se.fetchState!=="Completed"||(ue.current=!0,xt(!0,!0))}),[]),a.useEffect((()=>{K.fetchState!=="In-Progress"&&K.fetchState!=="Completed"&&K.fetchState!=="Error"&&e?.tenantId!=null&&h(we({tenantId:e.tenantId,period:O,refreshViewInBackground:!1}))}),[K.fetchState,e?.tenantId]),a.useEffect((()=>{L.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?c(!0):c(!1)}),[L.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect((()=>{L.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&m&&(h(we({tenantId:e.tenantId,period:O,refreshViewInBackground:!0})),h(Lo({companyId:e.companyId})),y("../"))}),[L.monthEndInsights?.sendMonthEndReportStatus?.fetchState,e.tenantId,O,e.companyId,m]),a.useEffect((()=>{const o=setInterval((()=>{K.fetchState!=="In-Progress"&&K.fetchState==="Completed"&&h(we({tenantId:e.tenantId,period:O,refreshViewInBackground:!0}))}),3e5);return()=>clearInterval(o)}),[K.fetchState,e.tenantId,O,h]),a.useEffect((()=>{const o=setInterval((()=>{_==="reconciliation"&&be==null&&L.reconciliation.fetchStatus.fetchState==="Completed"&&L.reconciliation.refreshStatus.fetchState!=="In-Progress"&&h(re(O,void 0,!0,!0))}),3e5);return()=>clearInterval(o)}),[_,h,L.reconciliation.fetchStatus.fetchState,L.reconciliation.refreshStatus.fetchState,re,be,O]);const Kn=Zt();a.useEffect((()=>{const o=(K.monthEndCloseChecks?.monthEndCloseCheckList.find((U=>U.id==="month_end_insights"))?.isDisabled??!1)&&!dt;_!=="month_end_insights"||!o&&K.monthEndCloseChecks?.reportEmailSentDate==null||y("../")}),[_,K.monthEndCloseChecks]);const Qn=p===!0?i:w,Zn=p===!0||A===!0,Hn=p===!0?I:t;a.useEffect((()=>{vt==="In-Progress"&&He.accountSettingsView.saveState.fetchState==="Completed"&&h(Jt())}),[vt,He.accountSettingsView.saveState.fetchState,Jt]);const{transactionId:Dt,onSaveVendor:Wn,onSaveSuccess:Xn,onCancel:ea,vendorViewDetails:ta}=(({expenseAutomationViewSelector:o,closeDrawerHandler:U,currentSelectedView:j,isUncategorizedExpenseCategoryEnabled:$})=>{const D=ke();let ne,Q,ee;const N=Zt(),ae=o.transactionView;let Ft=()=>{};const{transactions:aa,selectedTransactionId:fe,selectedTransactionLineId:Ue,transactionLocalData:oa}=ae;if(j==="transaction_categorization"){const We=oa.find((pe=>pe.transactionId===fe)),Z=aa.find((pe=>pe.id===fe)),_t=Ue!=null?We?.transactionReviewLocalData?.lineItemById[Ue]:void 0,Ut=_t?.account;Q=_t?.class?.classId,ne=["Uncategorized Income","Uncategorized Expense"].includes(Ut?.accountName??"")?void 0:Ut?.accountId;const ca=As(fe,Z?.typeOfTransaction);Z!=null&&ca&&(ee={id:fe,type:ct(Z.typeOfTransaction)}),Ft=()=>{if(fe!=null&&Ue!=null&&Z!=null){const pe=ae.transactionLocalData.find((Be=>Be.transactionId===fe))?.transactionReviewLocalData;if(pe!=null&&Z.lines!=null&&Z.lines.length>0){const Be=pe.lineItemById[Ue];let Xe=pe.selectedEntity;if(Da(Z)||(Xe=Be.selectedEntityLine),Xe!=null){const ia=Xe,la={transactionId:{id:Z.id,type:Z.type},transaction:Z,lineIds:Z.lines.map((ra=>ra.id))??[]};D(it({entity:ia,amount:Be.amount.amount,transactionDetails:la,flowType:"categorization",selectedTab:o.selectedTransactionCategorizationTab,isFetchCOT:N,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const sa=x((We=>zt(We,void 0,ne,Q)));return{transactionId:ee,onSaveVendor:()=>{D(xa(ee,void 0,!1,!0))},onSaveSuccess:Ft,onCancel:()=>{ee!=null&&D(Aa({transactionId:ee})),D(wa()),D(Ra()),U()},vendorViewDetails:sa}})({expenseAutomationViewSelector:L,closeDrawerHandler:()=>{z(!1)},currentSelectedView:_,isUncategorizedExpenseCategoryEnabled:ce}),na={events:e.companyId!=null?[`private-encrypted-${e.companyId}.${In}`,`private-encrypted-${e.companyId}.${kn}`]:[],eventCallback:(o,U,j)=>{j.onReconciliationPusherEventReceived(o,U)}};return Tn?.loggedInUserRoleMap==null?K.fetchState==="Error"?S.jsx(Is,{onGoHome:()=>y("../",{replace:!0}),onReload:()=>window.location.reload()}):S.jsx(Sn,{fetchState:"In-Progress"}):S.jsxs(S.Fragment,{children:[S.jsx(Rs,{isOpen:d,drawerLeftMargin:new ks(0,0,300,650),onClose:()=>{E(!1)},children:S.jsx(Ms,{onClick:o=>o.stopPropagation(),children:S.jsx(_s,{companyId:e.companyId,closeCustomerRequestDrawer:()=>E(!1),addCustomerRequest:Gn,resetCustomerRequest:Nn})})}),Dt!=null&&de&&S.jsx(vs,{isOpen:de,transactionId:Dt,onSaveVendor:Wn,onSaveSuccess:Xn,onCancel:ea,vendorViewDetails:ta}),S.jsx(Os,{...na,navigate:y,location:r,themeState:te,categoryOptions:Dn,classesForFilters:_n,accountsForFilters:Fn,vendorSearchAutoCompleteData:{autoCompleteText:jn,entityAutoCompleteView:xn},expenseAutomationViewSelector:L,isMissingReceiptsBulkUploadEnabled:Te,monthEndInsightsPreviewMode:n,monthEndInsightsCustomerRequestData:k,isRealtimeInsightsFeatureEnabled:dt,isCreateTransferEntryFromExpenseEnabled:ut,isUncategorizedExpenseCategoryEnabled:ce,isAccountingClassesEnabled:Ln,isProjectsTransactionsEnabled:Pn,isCOTEnabled:Kn,isJEScheduleCOTEnabled:wn,currentTenant:e,companyId:e.companyId,signedInUser:Ke,isTransactionActivityEnabled:Qe,isRightPanelOpen:zn,rightSidePanel:yt,onOpenTransferRightPanel:ut===!0?oe:void 0,uncategorizedAccounts:Mn,onClickCustomerRequest:qn,handleEditClick:$n,tenantEmailDomain:Je,trackExpenseAutomationTabAnalytics:V,setActivityLogTransactionId:W,closeSidePanel:Hn,openTransactionPanel:s,sidePanelIsOpen:Zn,sidePanelIsFullView:p!==!0&&b,panelContent:Qn,isAiCfoAccessEnabled:F,onAskAiCfoClick:he,isExpenseAutomationCommentingEnabled:vn,isReconV3Enabled:An,onExpenseAutomationCommentingThreadClick:Rn,sidePanelListPercent:p===!0?66:void 0}),ie.showPopup&&ie.popupType!=null&&S.jsx(Es,{popupType:ie.popupType,currencySymbol:ie.currencySymbol,accountId:ie.popupAccountId??"",accountName:ie.popupAccountName??"",onSubmit:ie.handleSubmit,onDismiss:ie.handleDismiss})]})}))),Ms=Ge(ua)`
|
|
22
22
|
display: flex;
|
|
23
23
|
min-height: 100%;
|
|
24
24
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-ufh19lah.js";import{a as r}from"./sentry-Co2H8v0G.js";import{a5 as l,a6 as p,a7 as m,r as c}from"./index-BzUA8nAy.js";import"./mui-CB8RW45Z.js";import f from"./NotFoundScreen-BGr9LaDQ.js";import{h as u,g as b}from"./core-QBDM2m9E.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]="5a21547d-8d37-447e-91de-3190153d226c",e._sentryDebugIdIdentifier="sentry-dbid-5a21547d-8d37-447e-91de-3190153d226c")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=c(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:m(o),onDemoClick:t,onGoBack:d}):s.jsx(f,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-
|
|
1
|
+
import{a as r}from"./sentry-Co2H8v0G.js";import{u as l,h as f,g as m}from"./core-QBDM2m9E.js";import{hx as p,MD as g,ME as b}from"./zeni-epic-state-BF09v22i.js";import{u as _,L as h,z as y}from"./index-BzUA8nAy.js";import"./liveblocks-ufh19lah.js";import"./recharts-B8SFxg38.js";import"./mui-CB8RW45Z.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3dd5c1ed-f33b-4032-9e7e-e8a6b1b794cf",e._sentryDebugIdIdentifier="sentry-dbid-3dd5c1ed-f33b-4032-9e7e-e8a6b1b794cf")}catch{}})();function M(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:u}=_(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{M as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-ufh19lah.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-QBDM2m9E.js";import{Mw as k,Mx as v,My as M,BA as B,Bm as T,Mz as A,MA as oe,MB as se,Bq as ie,fC as $,Bx as le,Bu as re}from"./zeni-epic-state-BF09v22i.js";import{J as g,o as r,q as de,f as j,m as G,D as ce,r as me,s as pe,v as V,A as ue,c as he,w as xe,B as ge,y as fe,C as be,E as we,F as Se,V as ye,G as ke,Y as ve,H as je,I as $e}from"./index-BzUA8nAy.js";import{n as m}from"./mui-CB8RW45Z.js";import f from"./NotFoundScreen-BGr9LaDQ.js";import{a as I}from"./sentry-Co2H8v0G.js";import"./recharts-B8SFxg38.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.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]="34f2ac49-1f75-4e1b-b4ef-acbb927257ad",e._sentryDebugIdIdentifier="sentry-dbid-34f2ac49-1f75-4e1b-b4ef-acbb927257ad")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-ufh19lah.js";import{a as g}from"./sentry-Co2H8v0G.js";import{u as F,g as O,h as _,t as w,j as l,N as T}from"./core-QBDM2m9E.js";import{z as r,y as V,O as P,g as A,f as N,h as Z,p as R,V as W,k as $}from"./index-BzUA8nAy.js";import{eZ as q,Mh as B,Mr as G,Mi as H,fC as J,g2 as K,Mn as Q,gs as X,cZ as Y,Ms as ee,Mt as te}from"./zeni-epic-state-BF09v22i.js";import{n as ne}from"./mui-CB8RW45Z.js";import{u as se}from"./useDeviceId-SWL_t36p.js";import{f as ie}from"./analyticsHelper-Bb-clko5.js";import{t as ae}from"./getLocaleForTenant-CZ5OuBaj.js";import"./recharts-B8SFxg38.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.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]="43cd3c48-1d53-45fd-9d22-54d017c82d2c",t._sentryDebugIdIdentifier="sentry-dbid-43cd3c48-1d53-45fd-9d22-54d017c82d2c")}catch{}})();const C=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function Ce(){const t=F(),i=O(),m=_(),[y]=w(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:D}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),b=l((e=>e.tenantState.activeTenantFetchState.fetchState)),h=l((e=>e.tenantState.signInState)),I=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>q(e))),k=l((e=>B(e))),M=r.getSignedInUser(),v=V().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&a!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(G(n,a,f)))}),[n,p,t,a,f,s?.zeniSessionId]),g.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(k.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),P.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,k.tenantsInOrder),X().then((()=>{const e=$();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin(Z.Event.loginSuccess,"email",Y(o.productSettings))}),2e3))}),[h,S,b,s,o,k,v,i.state,t]);const E=g.useCallback((()=>{m("/signin/auth")}),[m]),U=g.useCallback((()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))}),[a,d,t,c]),j=g.useCallback((e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))}),[a,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:U,onVerifyOtp:j,onCancelVerifyDevice:E});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||M!=null){const e=i.state?.origin??"/";return u.jsx(T,{to:e,state:{...i.state,origin:""}})}if(!C(n,p)||f==null||I==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(W,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as V}from"./liveblocks-
|
|
1
|
+
import{j as V}from"./liveblocks-ufh19lah.js";import{a as l}from"./sentry-Co2H8v0G.js";import{u as fe,j as n,i as He,g as We,h as Je,l as G}from"./core-QBDM2m9E.js";import{eZ as me,fH as Ke,fI as pe,ft as Qe,bn as Xe,eY as qe,fJ as ea,fK as aa,fM as ta,fP as na,fQ as g,fS as sa,fT as de,fW as oa,fU as ia,fV as ra,fX as da,cP as ca,fZ as la,cV as ua,fs as fa,g2 as ma,g3 as pa,g1 as ba}from"./zeni-epic-state-BF09v22i.js";import{a9 as ha,aa as Sa,B as ga,A as Ea,z as k,C as ka,u as Ca,c as r,i as ya,n as Ia,ab as Ta,e as Aa,a as _a,ac as wa,a5 as Da,ad as Fa,ae as va,af as ce,ag as le,L as Ba,ah as Pa,ai as ue,f as x,a1 as Ma,v as A,aj as R,ak as Ga}from"./index-BzUA8nAy.js";import{D as xa}from"./mui-CB8RW45Z.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="50ec9185-303c-426b-a68f-69031f3c8682",f._sentryDebugIdIdentifier="sentry-dbid-50ec9185-303c-426b-a68f-69031f3c8682")}catch{}})();const Ra=ha((({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=He(),a=We(),C=ga(),o=Je(),$=Qe(),m=fe(),{useFeatureGate:i}=Ea(),N=k.getSignedInUser(),U=Xe(N),s=n((e=>me(e))),be=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n((e=>qe(e))),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[_,L]=l.useState(void 0),w=G("/:tenantEmailDomain/dashboard")!==null,Z=G("/:tenantEmailDomain/reports")!==null,I=G("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),Y=n((e=>ea(e))),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),D=n((e=>aa(e)));l.useEffect((()=>{y&&T&&!I&&D.fetchState==="Not-Started"&&m(ta(!0))}),[y,T,D.fetchState,I]);const h=k.getSignedInUser(),F=n((e=>e.tenantState)),Ce=n((e=>F.fetchState==="Completed"?na(e):[])),E=n((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Ae}=i(r.isExpenseAutomationEnabledV2),H=Ia(),{isFeatureEnabled:_e}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:we}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),Be=U||!U&&ve,Pe=n((e=>g(e).totalUnreadCount)),Me=n((e=>g(e).reducedFetchCountState)),W=n((e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount)),J=n((e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount)),Ge=n((e=>g(e).notificationDetailsByTab.tasks.fetchCountState)),B=n((e=>g(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:K,isLoading:Q,isFetchingMore:X,hasFetchedAll:q,fetchMore:xe}=Ta();l.useEffect((()=>{const e=setTimeout((()=>xe?.()),0);return()=>clearTimeout(e)})),l.useEffect((()=>{if(Q===!1&&X===!1&&q===!0)if(s?.companyId!=null&&K!=null){const e=`dashboard_${s.companyId}`;L(K.filter((u=>u.roomId===e&&u.readAt==null)).length)}else L(0)}),[Q,X,q]),l.useEffect((()=>{y&&!I&&Ge.fetchState==="Not-Started"&&$.tenantId!=null&&m(sa("task_manager","dashboard"))}),[y,$.tenantId]),l.useEffect((()=>{I||B.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),l.useEffect((()=>{_!=null&&B.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:_},"comments")))}),[_,B.fetchState]);const Re={fetchStatus:Me,count:Pe},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n((e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0)),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),H===!1&&S.push("expense_automation_card");const Ve=Aa(),te=n((e=>ia(e,S,h,Ae,Te).fetchState)),ne=n((e=>ra(e).fetchState)),$e=w&&(te==="Completed"||te==="Error")||Z&&(ne==="Completed"||ne==="Error")||!w&&!Z?void 0:"disabled",Ne=l.useMemo((()=>da(s.userRole)),[s.userRole]),Ue=ca(Ne),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&Y.fetchState==="Completed"&&la(Y.notificationSettings,h.userEmail,z,s),se=_a(),Le=se&&wa(a),oe=ua(Ve?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,P=l.useCallback((()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Da(a.pathname)!=="treasury"),[v,oe,ie,a.pathname,t]),[Ze,re]=l.useState(P);l.useEffect((()=>{re(P())}),[P]);const ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,Ye=Fa(ze);return V.jsx(xa,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:V.jsx(va,{signedInUser:N,currentTenantId:F.currentTenantId??"",tenants:F.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:$e,isSettings:le(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:Ye,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:je,notificationCountDetails:Re,isExpenseAutomationEnabledForUser:H,selectedMenu:ce(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:D.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=W===0&&J>0?"notifications/comments":"notifications/tasks";le(a)&&(e=W===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(x.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!be)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=A(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),c=e.type,p=R(c)&&c!=="command_center";if(R(e.type)&&E[s.tenantId]!=null&&x.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Ga(e.type);ue(e.type)?(j!=null&&m(ba()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he(Ba.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,c=ce(a);let p=`/${encodeURIComponent(u)}/`;const M=R(c);c==="home"?p+="dashboard":c==="users_and_roles"?p+="people":Pa(c)?p+="settings/my_profile":ue(c)?p+=`ai-cfo/${c}`:p+=c==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(c),o(p,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(pa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;x.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:w,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:_e,isTaskManagerAccessEnabled:Be,thanksGivingAnimationEnabled:we,christmasAnimationEnabled:De,newYearAnimationEnabled:Fe})})})),La=f=>{const d=fe(),t=n((C=>me(C))),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Ke(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return V.jsx(Ra,{...f,...a})};export{La as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-ufh19lah.js";import{h as r,n}from"./core-QBDM2m9E.js";import{T as i}from"./index-BzUA8nAy.js";import"./mui-CB8RW45Z.js";import"./sentry-Co2H8v0G.js";import"./zeni-epic-state-BF09v22i.js";import"./recharts-B8SFxg38.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="df9e7e33-2ed0-48bd-9985-e24b323e3cf3",o._sentryDebugIdIdentifier="sentry-dbid-df9e7e33-2ed0-48bd-9985-e24b323e3cf3")}catch{}})();const d=n(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(i);function _(){const o=r();return e.jsx(d,{navigate:o})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-ufh19lah.js";import lt from"./NotFoundScreen-BGr9LaDQ.js";import{a as k}from"./sentry-Co2H8v0G.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as K}from"./core-QBDM2m9E.js";import{cw as St,fJ as q,eZ as H,fX as bt,fQ as b,Tf as Q,fT as d,fI as y,sK as M,yg as It,Tg as Tt,fH as Ct,fZ as yt,sP as _t,Th as $,bo as F,fB as x,sT as X,Ti as At,cI as Et,cB as Bt}from"./zeni-epic-state-BF09v22i.js";import{_ as Nt,z as wt,A as xt,c as Rt,a0 as vt,cW as Dt,v as B,a9 as Pt,cX as Ut,aa as Gt,r as $t}from"./index-BzUA8nAy.js";import"./mui-CB8RW45Z.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-DRkfNJU3.js";import"./recharts-B8SFxg38.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="4d06b23b-a093-467b-a6f8-c14c38a03527",t._sentryDebugIdIdentifier="sentry-dbid-4d06b23b-a093-467b-a6f8-c14c38a03527")}catch{}})();const Mt=(t,l)=>new Promise(((n,u)=>{const g=t.map((i=>new Promise((s=>{l(i),s()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((i=>{u(i)}))})),jt=kt((function(t,l){const n=q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:N,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=B(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=B(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(X("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(N(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=B(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Bt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=B(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(X("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{m==="read"&&(N(r),t($([r],F())))}))).then((()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,N).then((()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))(Pt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Nt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[N,R]=k.useState(!1),a=S((e=>q(e))),o=S((e=>H(e))),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});vt({isDataReady:!0});const O=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),V=S((e=>b(e).currentTab)),v=S((e=>b(e).currentSubTab)),Y=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),D=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),tt=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),et=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),at=Dt().allUsers,{inboxNotifications:w,isLoading:_,hasFetchedAll:T,isFetchingMore:P,fetchMore:ot}=ct(),{threads:W,isLoading:L,fetchMore:Z,isFetchingMore:z,hasFetchedAll:J}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect((()=>{if(V!==i&&i!=null&&s(Q(i)),i==null){const e=`../${V}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[i]),k.useEffect((()=>{Y.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(_===!1&&T===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter((C=>C.roomId===e&&C.readAt==null)).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}}),[_,T]),k.useEffect((()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=_||P===!0||T!==!0||_||P===!0||T!==!0;k.useEffect((()=>{U&&D!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||D!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))}),[U,D]),k.useEffect((()=>{s(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&N===!1&&(R(!0),s(It()))}),[a.fetchState]),k.useEffect((()=>{if(_===!1&&L===!1&&w!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=w.filter((f=>f.roomId===e)).filter((f=>f.kind==="thread")),C=p.filter((f=>f.readAt==null)),A=p.map((f=>f.id)),it=p.map((f=>{const G=W.find((rt=>rt.id===f.threadId));return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(z||J===!0||Z==null||Z(),null)})).filter((f=>f!=null));s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:C.length},"comments")),s(Tt(it))}}),[_,P,z,T,J,L,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const C=Ct(p.mode);if(C==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];v==="all"?A.push("read","unread"):v!=="mentions"&&A.push(v),s(M("task_manager",C,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:O,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(K,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(K,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-ufh19lah.js";import{a as r}from"./sentry-Co2H8v0G.js";import{u as T,g as A,j as o,N as P}from"./core-QBDM2m9E.js";import{MG as j,eZ as C,fP as D,MH as x,MI as z,MJ as L,MK as N,oi as R,LD as k}from"./zeni-epic-state-BF09v22i.js";import{z as h,N as I}from"./index-BzUA8nAy.js";import"./mui-CB8RW45Z.js";import"./recharts-B8SFxg38.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="4ecfaa19-78a4-4895-b509-0dd3caa97cb2",n._sentryDebugIdIdentifier="sentry-dbid-4ecfaa19-78a4-4895-b509-0dd3caa97cb2")}catch{}})();function ee(){const n=T(),a=A(),{params:t,error:i}=r.useMemo((()=>j(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),f=o((e=>C(e))),l=o((e=>D(e))),d=o((e=>e.tenantState.fetchState)),y=o(x),b=o(z),c=o(L),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(N())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(s.userId,s.zeniSessionId??void 0))))}),[p,s,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const M=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),u=v??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??b,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(k(s.userId,s.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(P,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
|
package/dist/assets/{PandLWithForecastRoutes-BGe3SifM.js → PandLWithForecastRoutes-4euaT8sc.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-ufh19lah.js";import{h as V,u as z,g as H,i as J,j as d,n as K,o as Q,p as I}from"./core-QBDM2m9E.js";import{eZ as U,sy as R,s6 as X,Nb as v,s1 as y,bs as ee,bn as ae,bZ as te,s2 as se,Nc as oe,M_ as C,dI as re,wd as ne,Nd as ce,wA as ie,fG as le,fE as de}from"./zeni-epic-state-BF09v22i.js";import{z as fe,_ as me,a0 as pe,e as ue,A as M,c as w,F as he,f as N,ap as Fe,v as ge}from"./index-BzUA8nAy.js";import"./mui-CB8RW45Z.js";import be from"./NotFoundScreen-BGr9LaDQ.js";import{F as Ie}from"./FeaturePreviewScreen-CUKc27Vx.js";import{a as F}from"./sentry-Co2H8v0G.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DRkfNJU3.js";import{u as ye}from"./useInitialThreadRequest-y87fsb02.js";import{t as Se}from"./routePaths-GKW140Mx.js";import{M as Te}from"./MobileAppDrawer-DrKscogU.js";import"./recharts-B8SFxg38.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="7038603e-9ca0-422f-94ed-c0de3fff0d86",s._sentryDebugIdIdentifier="sentry-dbid-7038603e-9ca0-422f-94ed-c0de3fff0d86")}catch{}})();const S=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=K((function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:N}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(y(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=re(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const f=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(f,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(Fe);function O(){const s=V(),e=z(),a=H(),{forecastId:o,tenantEmailDomain:r}=J(),[c,p]=F.useState(!1),[f,u]=F.useState(!1),h=fe.getSignedInUser(),T=d((t=>U(t))),$=T.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),A=d((t=>t.profitAndLossState)),k=d((t=>t.reportUIOptionsState.selectedForecast)),x=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:g}=me();pe({isDataReady:l});const{isAiCfoAccessEnabled:_,onAskAiCfoClick:q}=Ce({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!c&&g)p(!0),l||e(X());else if(l&&!f){u(!0);const t=((m,L,P)=>L!=null?m.forecasts.findIndex((b=>b.id===L)):P!=null?m.forecasts.findIndex((b=>b.id===P)):m.forecasts.length>0?0:-1)(i,o,k?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=k?.index?(e(v(i.forecasts[t].id,t)),S(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&g&&e(y(i.forecasts[t].id))}}),[c,p,e,l,i,f,u,R,y,g]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:G}=M(),{isFeatureEnabled:E}=G(w.isReportsCommentingEnabled),W=ye(E?T?.companyId:void 0,{clearParams:l&&f}),[Y,Z]=F.useState(!1),j=t=>{Z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:N,onLoad:t=>(m=>m.trackForecast())(t)}):null,n.jsx(Te,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(Ae,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:_,onAskAiCfoClick:q,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ze(){const s=d((c=>U(c))),{useFeatureGate:e}=M(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-ufh19lah.js";import{N7 as oe,eZ as Q,kG as G,fG as X,fE as ie,KB as ee,MN as re,va as ke,N8 as Y,u$ as ve,vk as Ee,ve as le,v3 as ce,vi as Pe,vf as je,N9 as de,w$ as Le,fq as Te,gi as Ae,Na as H,v7 as pe,v6 as ue,vn as Fe,c7 as Oe}from"./zeni-epic-state-BF09v22i.js";import{J as me,A as ae,c as _,z as K,i as ge,d as fe,K as he,al as Ce,am as Re,H as ye,o as R,M as be,O as M,an as Ve,_ as Ze,a0 as Be,F as Ue,f as Se,h as $e,v as ze,ao as He,e as _e}from"./index-BzUA8nAy.js";import{D as we,n as N,S as xe}from"./mui-CB8RW45Z.js";import te from"./NotFoundScreen-BGr9LaDQ.js";import{a as c}from"./sentry-Co2H8v0G.js";import{u as se,i as Ge,j as g,h as Ke,g as Me,n as Ne,o as ne,p as z}from"./core-QBDM2m9E.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-DRkfNJU3.js";import{M as qe}from"./MobileAppDrawer-DrKscogU.js";import"./recharts-B8SFxg38.js";import"./analytics-C3yKGO2p.js";import"./plaid-DAwCYgVP.js";import"./dnd-DTpdpLY3.js";import"./stripe-cKAAJElX.js";import"./lottie-Ceg93JYe.js";import"./lexical-DBGXZJbY.js";import"./pdf-DdbTijar.js";import"./utils-CWM6Tene.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]="b27b52ce-3e0a-4aa6-9a77-ff8e9fce6c45",e._sentryDebugIdIdentifier="sentry-dbid-b27b52ce-3e0a-4aa6-9a77-ff8e9fce6c45")}catch{}})();const Je={overlayWidth:new ye(100,100,48)},W=M.getLocalizedStrings().peoplePage.invitePage,Ye=M.getLocalizedStrings().common,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=Ge(),r=g((l=>oe(l))),p=g((l=>Q(l))),v=g((l=>G(l))),{useFeatureGate:D}=ae(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),E=X(I,p),L=ie(p),T=ee(p),B=re(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!E&&v&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Y()),b()},A=()=>{V===!0?S(!0):C()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(_.isChargeCardFeatureEnabled),j=ge(p,P,I),{isCardsHidden:F}=fe(p?.tenantId),y=!j||F,O=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:v,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:O===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(ce(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(le({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?ve(e):Ee(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{x===!1&&w!=null&&m(ke(w))}),[x,w]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Xe,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:W.discardTitle}),descriptionComponent:a.jsx(Ie,{children:W.discardDescription}),primaryButtonText:W.discard,secondaryButtonText:Ye.no,action:o,isEditPopup:!0}):null,a.jsx(Re,{...s})]})})},Xe=N(xe)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|