@zeniai/web-app-ui 5.0.9-qa → 5.0.10-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-ClrG4czN.js +1 -0
- package/dist/assets/AddressScreen-UQTTt07o.js +9 -0
- package/dist/assets/AiCfoScreen-D0ZuamWZ.js +11 -0
- package/dist/assets/{BillPayApprovalRoutes-CJE_IX4Q.js → BillPayApprovalRoutes-BLBcPx1B.js} +1 -1
- package/dist/assets/{BillPayRoutes-BVpwpJeS.js → BillPayRoutes-7EIRA000.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-Dxwunudy.js → BusinessVerificationPageScreen-BCq9-s11.js} +2 -2
- package/dist/assets/{ChargeCardRoutes-DFsJs27j.js → ChargeCardRoutes-CqL5qnQo.js} +9 -9
- package/dist/assets/CompanyPassportScreen-9atxEdFF.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-CJFQNtT-.js → ConnectionAuthScreen-BMnYn9YI.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-Cg582Z8u.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DvOoPfWt.js → CustomerOnboardingRoutes-QRW1FZfI.js} +4 -4
- package/dist/assets/{DashboardRoutes-CvNE50xa.js → DashboardRoutes-TZIxTJeb.js} +1 -1
- package/dist/assets/{DefaultTenantHome-CQerPq3w.js → DefaultTenantHome-Dhx02wWv.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DS0jhd8K.js → DomesticWireDetailScreen-DjDGDTBz.js} +3 -3
- package/dist/assets/DrawerScreen-DG33YoSv.js +1 -0
- package/dist/assets/{EntityDetailRoutes-BsX1LVY_.js → EntityDetailRoutes-Dql5Od85.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-B_atYPpu.js → ExpenseAutomationRoutes-CYo6nFC7.js} +5 -5
- package/dist/assets/FeaturePreviewScreen-DgltNyCi.js +1 -0
- package/dist/assets/{MagicLinkRoutes-BiIIoUL2.js → MagicLinkRoutes-BGM-sZzT.js} +6 -6
- package/dist/assets/MagicLinkSignInScreen-CRNknrGE.js +12 -0
- package/dist/assets/MobileAppDrawer-jslKljAh.js +1 -0
- package/dist/assets/NotFoundScreen-BOOShTFL.js +1 -0
- package/dist/assets/{NotificationRoutes-Beu1xrKN.js → NotificationRoutes-DOHToAa0.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-DT93-O0O.js +1 -0
- package/dist/assets/{PeopleRoutes-CS4AyLI0.js → PeopleRoutes-BdMtXhM0.js} +5 -5
- package/dist/assets/PerformanceRoutes-DA01xJZL.js +1 -0
- package/dist/assets/{Preview-DYcWSu_p.js → Preview-Ce-yKggj.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-ZEEwbiGa.js → QBOConnectionScreen-DaAy9F4R.js} +1 -1
- package/dist/assets/ReferralListScreen-CT6Goua6.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-C76OIpQC.js +1 -0
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-11PK2nAa.js → ReimbursementApprovalRuleDetailScreen-CwI2DR20.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DbgdD1EK.js → ReimbursementRoutes-By4bhdmE.js} +1 -1
- package/dist/assets/{ReportsRoutes-BKtpC9XB.js → ReportsRoutes-CUGvAqPf.js} +1 -1
- package/dist/assets/RewardsRoutes-BYzVPFGi.js +1 -0
- package/dist/assets/ScreenRoutes-B6e-0n2O.js +2 -0
- package/dist/assets/{SettingsRoutes-COEmh4Di.js → SettingsRoutes-AaKbs5Fo.js} +7 -7
- package/dist/assets/{SetupPagesScreen-D282hX_7.js → SetupPagesScreen-BCxvmwj2.js} +5 -5
- package/dist/assets/{SignInScreen-AtppA5UF.js → SignInScreen-CxIts5DK.js} +1 -1
- package/dist/assets/SignOutScreen-27MvP0w6.js +9 -0
- package/dist/assets/{TaskListScreen-DCBibdTK.js → TaskListScreen-BCHbQwTl.js} +2 -2
- package/dist/assets/TaskRoutes-Bf2oLDNl.js +9 -0
- package/dist/assets/TransactionDetailRoutes-BZGy1w7P.js +1 -0
- package/dist/assets/{TransactionDetailScreen-Dy0Z71fZ.js → TransactionDetailScreen-CfRj9Znj.js} +2 -2
- package/dist/assets/{TransactionListRoutes-i0dmIphX.js → TransactionListRoutes-D0AbWIhY.js} +1 -1
- package/dist/assets/{TreasuryRoutes-ByB56Bdd.js → TreasuryRoutes-CHF8__07.js} +5 -5
- package/dist/assets/{VendorsRoutes-BcMQFhN_.js → VendorsRoutes-FdyKnvtG.js} +12 -12
- package/dist/assets/WiseConfirmationScreen-CoxEFEpW.js +12 -0
- package/dist/assets/{ZeniAccountRoutes-BF2T4rC9.js → ZeniAccountRoutes-C6tX7kSt.js} +12 -12
- package/dist/assets/ZeniAccountStatementScreen--z-dKl5C.js +9 -0
- package/dist/assets/{accountMappingHelper-BmWub9rZ.js → accountMappingHelper-DC8hLo25.js} +1 -1
- package/dist/assets/{analytics-Fp0p9zzF.js → analytics-D76TbnBG.js} +1 -1
- package/dist/assets/{analyticsHelper-DbL2hXxT.js → analyticsHelper-BvhlneFh.js} +1 -1
- package/dist/assets/{core-BxynaUfL.js → core--8kDo-LJ.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-C4CdHegQ.js → decodeURIComponentSafe-C7w4UFFF.js} +1 -1
- package/dist/assets/{dnd-DTmBUnLk.js → dnd-C7FILogn.js} +1 -1
- package/dist/assets/{empty-Cr-F5mUv.js → empty-3u2VxJVl.js} +1 -1
- package/dist/assets/{empty-BCapHP-3.js → empty-Be_BVx3n.js} +1 -1
- package/dist/assets/{emptyVideoElement-DFWZAgeK.js → emptyVideoElement-2PLigQOf.js} +1 -1
- package/dist/assets/{epic-BRaAmsNG.js → epic-RtUezbdm.js} +1 -1
- package/dist/assets/{getLocaleForTenant-m4i18THA.js → getLocaleForTenant-BNCERJ--.js} +1 -1
- package/dist/assets/{index-BoAQJ4XP.js → index-B9x4skgF.js} +1 -1
- package/dist/assets/{index-0JOtcwRL.js → index-BWzDqQ_Z.js} +1 -1
- package/dist/assets/{index-BXlN7b10.js → index-BZ4v8_jI.js} +2 -2
- package/dist/assets/{index-BJLEQ2__.js → index-D2BuA-Eq.js} +1 -1
- package/dist/assets/{index-WqxyGdxr.js → index-DO3Ev_EW.js} +8162 -8188
- package/dist/assets/{index-z5S8dnQk.js → index-DwK3E-F6.js} +1 -1
- package/dist/assets/{index-DxCK0Ves.js → index-GDJvj_1Q.js} +1 -1
- package/dist/assets/{lexical-BgdBwfNo.js → lexical-roIufkFt.js} +1 -1
- package/dist/assets/{liveblocks-BOEQeN-H.js → liveblocks-CGYIz1sf.js} +1 -1
- package/dist/assets/{lottie-CHRWrHfY.js → lottie-BwZdyUox.js} +1 -1
- package/dist/assets/{mui-D7DqO3YQ.js → mui-COKu087d.js} +1 -1
- package/dist/assets/{pathToGoBack-5wx41ypO.js → pathToGoBack-BAEmu1ZG.js} +1 -1
- package/dist/assets/{pdf-DEWT-QpZ.js → pdf-CBQkrKS2.js} +4 -4
- package/dist/assets/{pdf-lib-DOPLrm4O.js → pdf-lib-C9qLw4cO.js} +1 -1
- package/dist/assets/{plaid-lowWm0fK.js → plaid-DzMABTsR.js} +1 -1
- package/dist/assets/{pusher-dR6xTdBt.js → pusher-TSE9lTnh.js} +1 -1
- package/dist/assets/{react-DHCq2NZd.js → react-BwlBpQg6.js} +1 -1
- package/dist/assets/{react-CITxf4P4.js → react-CG2bsPU9.js} +1 -1
- package/dist/assets/{react-wqVrph3b.js → react-D77OVu9R.js} +1 -1
- package/dist/assets/{react-BGoqYhRz.js → react-NGMn_z4n.js} +1 -1
- package/dist/assets/{react-4OyDFrBO.js → react-Q-oC4eFq.js} +1 -1
- package/dist/assets/{react-B5NEquCq.js → react-wPUmTj8i.js} +1 -1
- package/dist/assets/{recharts-DFfCUpO3.js → recharts-jENt1xXk.js} +1 -1
- package/dist/assets/{routePaths-BUUPXGIP.js → routePaths-BOWJQWRe.js} +1 -1
- package/dist/assets/{sentry-BcE91o8k.js → sentry-ClGNqxTu.js} +1 -1
- package/dist/assets/{url-Cr6I6Veb.js → url-BQx25DrG.js} +1 -1
- package/dist/assets/{url-CKFkQ8vX.js → url-BVVYwai7.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-BECmuzX_.js +1 -0
- package/dist/assets/{useDeviceId-L-TdNFYo.js → useDeviceId-CESE7gTF.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-CnxX7TBH.js → useFetchSuggestedQuestionsWhenReady-CapxOzLt.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BliXhJGz.js → useInitialThreadRequest-B5pNRjBx.js} +1 -1
- package/dist/assets/{utils-BMw-tiy-.js → utils-C9gYeSwW.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-9qBDBkF1.js → withTransactionSidePanel-IHJ8nGIi.js} +2 -2
- package/dist/assets/{zeni-epic-state-C9u4BvTm.js → zeni-epic-state-Cb3mJiT_.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-BBrnt8gl.js +0 -1
- package/dist/assets/AddressScreen-CDhIDDwp.js +0 -9
- package/dist/assets/AiCfoScreen-BMO5rEJv.js +0 -11
- package/dist/assets/CompanyPassportScreen-BJMMhtCv.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-D_RI0hgb.js +0 -1
- package/dist/assets/DrawerScreen-CjkZs0Cy.js +0 -1
- package/dist/assets/FeaturePreviewScreen-C7kdCQc-.js +0 -1
- package/dist/assets/MagicLinkSignInScreen-B8aDnqqY.js +0 -12
- package/dist/assets/MobileAppDrawer-C1oJKBTP.js +0 -1
- package/dist/assets/NotFoundScreen-Bi7CPczJ.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-Ov1Y7At7.js +0 -1
- package/dist/assets/PerformanceRoutes-DKTQsu_Y.js +0 -1
- package/dist/assets/ReferralListScreen-D3bgC_4v.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-BY3O294s.js +0 -1
- package/dist/assets/RewardsRoutes-CQaq7ndw.js +0 -1
- package/dist/assets/ScreenRoutes-DroUcwmE.js +0 -2
- package/dist/assets/SignOutScreen-CtvSHFvd.js +0 -9
- package/dist/assets/TaskRoutes-BYGYaLzj.js +0 -9
- package/dist/assets/TransactionDetailRoutes-C90gjzCq.js +0 -1
- package/dist/assets/WiseConfirmationScreen-DnEE5EHJ.js +0 -12
- package/dist/assets/ZeniAccountStatementScreen-BEhzvl9P.js +0 -9
- package/dist/assets/useAskAiCfoHostNavButtonProps-CnRBupY3.js +0 -1
package/dist/assets/{CustomerOnboardingRoutes-DvOoPfWt.js → CustomerOnboardingRoutes-QRW1FZfI.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-CGYIz1sf.js";import{t as $e,A as Ce}from"./AddressScreen-UQTTt07o.js";import ze from"./NotFoundScreen-BOOShTFL.js";import{a as g}from"./sentry-ClGNqxTu.js";import{j as oe,u as se,h as ie,l as re,g as D,N as E,k as ce,i as Me,n as Qe,o as M}from"./core--8kDo-LJ.js";import{Z as de,S as le,z as B,i as ue,h as qe,s as _,r as V,O as Y,d as N,v as je,f as W,ak as Je,J as Ke,al as Ie,k as te,am as Ze,an as ke,o as Ye,ao as He,ap as Ee,aq as We}from"./index-DO3Ev_EW.js";import{bm as Xe,eM as ee,fb as et,eT as pe,eR as me,bu as tt,mf as at,f7 as nt,bL as ot,i_ as ae,j1 as ve,IY as st,bQ as it,b$ as ge,rH as fe,rs as rt,J8 as X,rI as _e,GE as ct,k2 as Ue,J9 as Ve,Ja as dt,Jb as lt,Jc as ut,iY as pt,i$ as mt,ru as Be,rG as gt,bB as xe,cr as ft,rU as Te,pB as ht,pp as yt,jW as bt,fA as St,fz as Ct,fy as It,Jd as kt,rm as Et,rV as xt,rY as Tt,r$ as Ot,s5 as Pt,cR as At}from"./zeni-epic-state-Cb3mJiT_.js";import{n as he}from"./mui-COKu087d.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-DaAy9F4R.js";import"./recharts-jENt1xXk.js";import"./analytics-D76TbnBG.js";import"./plaid-DzMABTsR.js";import"./dnd-C7FILogn.js";import"./stripe-DMRn4zHo.js";import"./lottie-BwZdyUox.js";import"./lexical-roIufkFt.js";import"./pdf-CBQkrKS2.js";import"./utils-C9gYeSwW.js";import"./empty-Be_BVx3n.js";import"./pdf-lib-C9qLw4cO.js";import"./index-BWzDqQ_Z.js";import"./url-BQx25DrG.js";import"./index-GDJvj_1Q.js";import"./decodeURIComponentSafe-C7w4UFFF.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="092386e7-7f94-4246-ba9b-271dfc38aca0",t._sentryDebugIdIdentifier="sentry-dbid-092386e7-7f94-4246-ba9b-271dfc38aca0")}catch{}})();const wt=ce(function(t,o){const s=[];o.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),o.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),o.shouldFetchZeniAccountsPromoCard===!1&&s.push("zeni_accounts_promo_card"),o.shouldFetchRewardsPlanCard===!1&&s.push("rewards_card"),o.isExpenseAutomationEnabledForUser===!1&&s.push("expense_automation_card");const u=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,o){const{themeState:s,navigate:u,location:d}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Je),jt=()=>{const t=oe(),o=se(),s=ie(),u=de(),[d,r]=g.useState(!1),[p,b]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),f=Xe(i),{useFeatureGate:m}=ue(),k=qe(),{isFeatureEnabled:x}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:T}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:I}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:h}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),$=C||U&&f,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),w=c.company!=null&&et(c.company),R=L&&w,O=D(l=>l.onboardingCustomerViewState.fetchState),S=c.excludedResources,G=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const j=pe(F,c),P=me(c),A=[],J=S?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,z=S?.resources?.find(l=>l.resource==="/reports/task_card")==null,Q=c?.userRole!=null&&tt(c?.userRole),v=S?.resources?.find(l=>l.resource==="/bills")==null&&!Q,q=S?.resources?.find(l=>l.resource==="/reimbursements")==null;if(J===!1&&A.push("top_expenses"),z===!1&&A.push("task_card"),v===!1&&A.push("bill_pay_card","bill_pay_promo_card"),q===!1&&A.push("reimbursement_card","reimbursement_promo_card"),I===!1&&A.push("zeni_accounts_promo_card"),h===!1&&A.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||j||P||(r(!0),s(at(i.userId,G,c.tenantId,!0,!1,A)))},[d,O,j,P,i,c.tenantId,s]),g.useEffect(()=>{(j||P)&&setTimeout(()=>{b(!0)},5e3)},[j,P]),O!=="Completed")return a.jsx(E,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(j)return a.jsx(E,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(E,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(Y,{analytics:N,onLoad:l=>(K=>K.trackPageLoaded(W.Event.onboardingDashboardActivation))(l)}),a.jsx(wt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:x,isArAgingFeatureEnabled:T,shouldFetchZeniAccountsPromoCard:I,shouldFetchRewardsPlanCard:h,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:R,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(je,{fetchState:"In-Progress",style:{backgroundColor:k.colors.grey5}})},Oe=he.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${t=>t.theme.colors.grey4};
|
|
5
|
-
`,Pe=
|
|
5
|
+
`,Pe=he.div`
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
align-items: center;
|
|
@@ -16,8 +16,8 @@ import{j as a}from"./liveblocks-BOEQeN-H.js";import{t as $e,A as Ce}from"./Addre
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
${t=>t.windowSize!=="small"?"overflow: auto;":""}
|
|
19
|
-
`,Ae=ce(function(t,o){const{companyId:s,isAdmin:u,currentTenant:d,isOnAddressPage:r}=o,p=B.getSignedInUser(),b=d.tenantId,e={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:b??""},n=ee(t),i=
|
|
19
|
+
`,Ae=ce(function(t,o){const{companyId:s,isAdmin:u,currentTenant:d,isOnAddressPage:r}=o,p=B.getSignedInUser(),b=d.tenantId,e={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:b??""},n=ee(t),i=fe(t,s),f=Ve(t),m=ge(d?.userRole??[])&&i.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",k=dt(t.userRoleConfigState);return{onboardingCustomerView:i,analytics:N,isRefreshingViewInBackground:!1,isDisabled:m,companyTitles:k.companyTitles,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:He.fileMicroServiceBaseUrl,authParams:e},signedInUser:B.getSignedInUser(),currentTenant:d,isAdmin:u,isOnAddressPage:r,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",cardPaymentView:f,isCardPaymentPopupOpen:!1,stripeKey:te.stripeKey}},function(t,o){const{companyId:s,currentTenant:u,themeState:d,navigate:r,location:p}=o,{tenantEmailDomain:b}=u;return{onFetchLinkTokenClick:(e,n)=>{t(Pt(e,n))},onEstablishConnectionClick:(e,n)=>{t(Ot(e,n))},onUpdatePaymentAccountStatus:(e,n,i)=>{t(Tt(e,n,i))},onUpdatePaymentAccountLoginStatus:(e,n)=>{t(xt(!1,e,n))},onEstablishConnectionSuccess:()=>{t(Et(s,!0,!1))},handleOnConnectClick:()=>{N.trackOnboardingConnectQBO(),ne.handleClick()},updateQBOPopupState:e=>{t(X({isQBOPopupOpen:e}))},onCompanyOfficerUpdated:e=>{const n=e.map(i=>{const{officerType:f,userId:m,name:k,email:x,ssn:T,nationalityCountryCode:I,dob:h,phone:U,syncToken:C,selectDocument:F,role:$,ownership:c,isSelectedForVerification:L,userVerificationStatus:w,fileIds:R,isPhoneVerified:O}=i;let S;return F.selectDocumentType==="driverLicense"?S="driving_license":F.selectDocumentType==="passport"?S="passport":F.selectDocumentType==="stateId"?S="id_document":F.selectDocumentType==="ssnCard"&&(S="social_security_card"),{officerType:f,userId:m,firstName:k.firstName,lastName:k.lastName,email:x,ssn:T,nationalityCountryCode:I?.selectedOption!=null?Ee(I.selectedOption):void 0,phone:U,birthday:h!=null?xe(h?.toString()):h,syncToken:C,titleAtCompany:$.selectedOption,ownershipInCompany:c,documentTypeSelectedForVerification:S,isSelectedForVerification:L,userVerificationStatus:w,fileIds:R,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:O}});t(Te({officers:n}))},onGetOtp:(e,n)=>{t(It(e,"CustomerOnboarding")),n!=null&&t(kt({officerType:n,phone:e}))},onResendOtp:e=>{t(Ct(e,"CustomerOnboarding"))},onVerifyOtp:(e,n)=>{t(St(e,n,"CustomerOnboarding"))},updateFilesEntity:e=>{t(bt({files:e}))},onDeleteFile:e=>{t(yt(e))},onEditFileName:(e,n)=>{t(ht(e,n.split(".")[0]))},onCompanyDetailsChanged:e=>{const{companyDescription:n,companyIndustry:i,companyIndustryType:f,companyLegalName:m,companyTaxId:k,companyWebsite:x,companyPhone:T,primaryContactEmail:I,primaryContactName:h,primaryContactUserId:U,primaryContactSyncToken:C,syncToken:F,fileIds:$,typeOfIncorporation:c,stateOfIncorporation:L,incDate:w,companySourceOfFunds:R,companySourceOfFundsDescription:O,companySubIndustry:S,countriesOfOperations:G,purposeOfAccount:j,purposeOfAccountDescription:P,regulatedStatus:A,regulatedStatusDescription:J,transactionVolume:z,transactionVolumeDescription:Q,usNexus:v,usNexusTypes:q}=e,l={companyId:s,companyDescription:n,companyIndustry:i.selectedOption,companyIndustryType:f?.selectedOption??"",companyLegalName:m,taxIdOrEIN:k,website:x!=""&&x!=null?ft(x):void 0,phone:T,syncToken:F,fileIds:$,incDate:w!=null?xe(w?.toString()):w,typeOfIncorporation:c?.selectedOption??"",stateOfIncorporation:L?.selectedOption??"",companySourceOfFunds:R?.selectedOption??"",companySourceOfFundsDescription:O,companySubIndustry:S?.selectedOption??"",countriesOfOperations:G?.selectedOptions.map(Z=>Z.length===2?Z:Ee(Z))??[],purposeOfAccount:j?.selectedOption??"",purposeOfAccountDescription:P,regulatedStatus:A??"",regulatedStatusDescription:J,transactionVolume:z?.selectedOption??"",transactionVolumeDescription:Q,usNexus:v,usNexusTypes:q?.selectedOptions??[]},K={userId:U,firstName:h.firstName,lastName:h.lastName,email:I,syncToken:C};t(Te({companyDetails:l,primaryContactDetails:K}))},onAddressClick:(e,n)=>{const i=De(b,e,n),f=V(p.state?.pathnameStackToGoBack,p.pathname);r(i,{state:{pathnameStackToGoBack:f}})},onRegisteredAddressClick:(e,n)=>{const i=De(b,e,n),f=V(p.state?.pathnameStackToGoBack,p.pathname);r(i,{state:{pathnameStackToGoBack:f}})},onUpdateCustomerView:(e,n,i)=>{t(gt(s,!1,n,i,e))},onAddressEditHandler:e=>{if(e!=null){const n=$e(e);t(Ue({addressType:"subscription_billing_address",addressToCreate:n}))}},onSkipSetupClick:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);t(Be(s,!1,!1)),r("./activation",{state:{pathnameStackToGoBack:e}})},onUpdateStep:e=>{t(_e({step:e}))},onZeniLogoClick:()=>{d.toggle()},handleLogOutClick:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleCreateCardSetupIntent:e=>{t(ve(e))},handleConfirmCardSetupIntent:e=>{t(mt(e))},updateCardPaymentModalState:e=>{t(X({isCardPaymentPopupOpen:e}))},handleAddCardPaymentSource:(e,n,i)=>{t(pt(e,n,i))},handleFetchPaymentSources:()=>{t(ae())},resetCardPaymentViewState:()=>{t(ut())},handleResetCardPaymentErrorStatuses:()=>{t(lt())},redirectToProductSuitePage:()=>{const e=V(p.state?.pathnameStackToGoBack,p.pathname);r(`/${b}/onboarding/thankyou`,{state:{pathnameStackToGoBack:e,message:"OnboardingThankyou"},replace:!0})}}})(Ze),H=({taxCFOCustomer:t=!1,isOnAddressPage:o=!1,appContent:s})=>{const u=oe(),d=se(),r=ie(),p=Ke(),b=de(),[e,n]=g.useState(!1),[i,f]=g.useState(!1),[m,k]=g.useState(!1),{tenantEmailDomain:x}=re(),T=le(),{useFeatureGate:I}=ue(),{isFeatureEnabled:h}=I(_.isDebitCardFeatureEnabled),U=Me("/:tenantEmailDomain/onboarding")!==null&&d.search?.includes("code"),C=D(y=>y.onboardingCustomerViewState.fetchState),F=D(y=>y.onboardingCustomerViewState.currentStep),$=D(y=>y.onboardingCustomerViewState.uiState),c=D(y=>ee(y)),L=D(y=>y.userRoleConfigState.fetchState),w=D(y=>y.cardPaymentViewState),R=Ie(w.addCardPaymentSourceStatus.fetchState),O=w.addCardPaymentSourceStatus.fetchState,{code:S,realmId:G,state:j}=Dt(d.search),P=c.externalConnections?.accounting[0],A=P?.connectionType,J=P?.connectionName,z=P?.connectionId??"",Q=B.getSignedInUser()?.userId??"";g.useEffect(()=>{i||(f(!0),r(ae()))},[i,r]),g.useEffect(()=>{m||(ve(["card"]),k(!0))},[m]),g.useEffect(()=>{R==="In-Progress"&&O==="Completed"&&r(ae())},[R,O]),g.useEffect(()=>{Ft(S,G,j,z,Q)===!0&&c.externalConnections?.saveConnectionState!=="In-Progress"&&C==="Completed"&&(r(st(c.tenantId,{connection_type:A??"accounting",connection_name:J??"quickbooks_online",authorization_code:S,realm_id:G,connection_id:z,user_id:Q},it(window.location.origin+"/onboarding/auth"))),N.trackOnboardingSaveQBOConnection(G,z),u(d.pathname))},[S,G,j,d.pathname,C]),g.useEffect(()=>{ne.isInitiated===!1&&C==="Completed"&&ne.init("/onboarding/auth",c.tenantEmailDomain)},[C]);const v=c.companyId??B.getSignedInUserTenant(x)?.companyId,q=ge(c?.userRole??[]),l=D(y=>fe(y,v));g.useEffect(()=>{e||C!=="Not-Started"||v==null||(n(!0),r(rt(v,!0,!U)))},[e,C,v]),g.useEffect(()=>{c.externalConnections?.saveConnectionState!=="Completed"&&c.externalConnections?.saveConnectionState!=="Error"||!$.isQBOPopupOpen||F!=="qbo_connection"||r(X({isQBOPopupOpen:!1}))},[c.externalConnections?.saveConnectionState]),g.useEffect(()=>{C==="Completed"&&U&&(r(_e({step:"qbo_connection"})),r(X({isQBOPopupOpen:!0})))},[U,C]),g.useEffect(()=>{L==="Not-Started"&&r(ct(!0))},[L,r]);const K=Ie(l.companyDetailsLocalData?.addressStatus);g.useEffect(()=>{l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&l.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&K==null&&r(Ue({addressType:"company_registered_address",addressToCreate:l.companyDetailsLocalData?.addressStatus?.addressToCreate}))},[l.companyDetailsLocalData?.addressStatus?.addressToCreate,l.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const Z=l.isInterimEmailSent;if(B.getSignedInUser()==null)throw Error("Can't access onboarding flow without signing in...");const Le=pe(h,c),Re=me(c),ye=c.company?.companyOnboardingInfo.isOnboardingCompleted,be=y=>y.trackPageLoaded(W.Event.onboardingPage),Se=c.productSettings.isOtherProductsEnabled,Ge=c.productSettings.isTreasuryEnabled;if(ye===!0){if(!Se)return Ge?a.jsx(E,{to:"../../treasury"}):Le?a.jsx(E,{to:"../../checking"}):Re?a.jsx(E,{to:"../../cards"}):a.jsx(E,{to:"../../dashboard"});const y=l.updateStatus.fetchState==="In-Progress";if(Se&&!y)return t?a.jsxs(Oe,{children:[a.jsx(Y,{analytics:N,onLoad:Ne=>be(Ne)}),a.jsx(Ae,{navigate:u,location:d,companyId:v,currentTenant:c,isAdmin:q,isOnAddressPage:o,themeState:b,googleAPIKey:te.googleMapsAPIKey}),s!=null?a.jsx(Pe,{windowSize:p,children:s}):null]}):a.jsx(E,{to:"../../onboarding/thankyou"})}else if(ye===!1&&T?.loggedInUserRoleMap!=null)return Z===!0?a.jsx(E,{to:"../../onboarding/thankyou"}):a.jsxs(Oe,{children:[a.jsx(Y,{analytics:N,onLoad:y=>be(y)}),a.jsx(Ae,{navigate:u,location:d,companyId:v,currentTenant:c,isAdmin:q,isOnAddressPage:o,themeState:b,googleAPIKey:te.googleMapsAPIKey}),s!=null?a.jsx(Pe,{windowSize:p,children:s}):null]});return null};function De(t,o,s){let u=`/${t}/onboarding/address`;return u=s!=null?u.concat(`/edit/${o}/${encodeURIComponent(s)}`):u.concat(`/new/${o}`),u}const Fe=he.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
height: 100vh;
|
|
22
22
|
background-color: ${t=>t.theme.colors.grey4};
|
|
23
|
-
`,we=ce(function(t,o){const{companyId:s,currentTenant:u}=o,d=
|
|
23
|
+
`,we=ce(function(t,o){const{companyId:s,currentTenant:u}=o,d=fe(t,s),r=Ve(t);return{hasVerifiedBankAccount:(d.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(r.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:ge(u?.userRole??[])&&d.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:B.getSignedInUser(),currentTenant:u,meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true"}},function(t,o){const{currentTenant:s,themeState:u,navigate:d,location:r}=o,{tenantEmailDomain:p}=s;return{onZeniLogoClick:()=>{u.toggle()},handleLogOutClick:()=>{const b=V(r.state?.pathnameStackToGoBack,r.pathname);d("/signout",{replace:!0,state:{pathnameStackToGoBack:b,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleUpdatePaymentAddressDetailClick:()=>{const b=V(r.state?.pathnameStackToGoBack,r.pathname);d(`/${p}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:b,message:"UpdatePaymentAddressDetail"}})}}})(We),vt=()=>{const t=oe(),o=ie(),s=se(),u=de(),{useFeatureGate:d}=ue(),{isFeatureEnabled:r}=d(_.isDebitCardFeatureEnabled),{tenantEmailDomain:p}=re(),b=le(),[e,n]=g.useState(!1);g.useEffect(()=>{e===!1&&s.state?.message==="OnboardingThankyou"&&n(!0)},[s.state]);const i=D(h=>ee(h)),f=i.productSettings.isOtherProductsEnabled;g.useEffect(()=>{o(Be(m,!1,!f))},[]);const m=i.companyId??B.getSignedInUserTenant(p)?.companyId;if(b.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const k=pe(r,i),x=me(i),T=D(h=>h.onboardingCustomerViewState.updateStatus.fetchState),I=i.company?.companyOnboardingInfo.isOnboardingCompleted;return I!==!0||f?T==="Completed"&&I===!0&&f&&b?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(Y,{analytics:N,onLoad:h=>{h.trackPageLoaded(W.Event.onboardingLandingPage,"Onboarding",At(i.productSettings))}}),a.jsx(we,{navigate:t,showUpdatePaymentDetailButton:f,location:s,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):T==="Completed"&&I===!1&&b?.loggedInUserRoleMap!=null?a.jsxs(Fe,{children:[a.jsx(Y,{analytics:N,onLoad:h=>{h.trackPageLoaded(W.Event.onboardingInterimPage)}}),a.jsx(we,{navigate:t,showUpdatePaymentDetailButton:f,location:s,companyId:m,currentTenant:i,themeState:u,isVisitingFirstTime:e})]}):a.jsx(je,{fetchState:T}):k?a.jsx(E,{to:"../../checking"}):x?a.jsx(E,{to:"../../cards"}):a.jsx(E,{to:"../../dashboard"})};function oa(){return a.jsxs(Qe,{children:[a.jsx(M,{path:"/",element:a.jsx(H,{})}),a.jsx(M,{path:"/billing/edit",element:a.jsx(H,{taxCFOCustomer:!0})}),a.jsx(M,{path:"/thankyou",element:a.jsx(vt,{})}),a.jsx(M,{path:"/activation",element:a.jsx(jt,{})}),a.jsx(M,{path:"/address/edit/:addressType/:addressId",element:a.jsx(H,{isOnAddressPage:!0,appContent:a.jsx(Ce,{})})}),a.jsx(M,{path:"/address/new/:addressType",element:a.jsx(H,{isOnAddressPage:!0,appContent:a.jsx(Ce,{})})}),a.jsx(M,{path:"*",element:a.jsx(ze,{})})]})}export{oa as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-BOEQeN-H.js";import{l as G,g as k,u as $,h as K,j as q,k as Z,n as We,o as D}from"./core-BxynaUfL.js";import{eM as j,Jt as Fe,bB as Ut,bp as de,KG as Ka,hO as Na,KH as Tt,KI as Ga,hR as Qe,KJ as we,KK as za,hW as $a,KL as wt,KM as qa,h_ as et,KN as xe,KO as Za,cN as at,KP as Ha,KQ as Ja,JN as Xa,iU as Wa,KR as Qa,bm as _e,KS as Yt,Jh as Q,bc as Vt,j6 as Kt,mp as Nt,iR as Gt,Jj as ee,Ji as z,KT as en,KU as tn,KV as zt,KW as pe,tx as ke,ty as ye,tV as ue,tP as te,tC as Se,KX as an,KY as nn,KZ as on,K_ as $t,K$ as he,L0 as sn,dF as Oe,q9 as qt,L1 as rn,L2 as cn,L3 as ln,L4 as nt,IE as ot,jm as st,u1 as rt,qh as dn,L5 as un,tz as xt,qc as ie,q8 as Zt,L6 as oe,L7 as mn,L8 as ct,ID as it,s9 as Ht,L9 as pn,La as hn,Lb as fn,Lc as lt,sm as gn,Ld as bn,tB as Dt,s8 as Jt,Le as se,Lf as Cn,bu as Xt,u5 as Wt,Lg as _n,Lh as kn,Li as yn,Lj as dt,u0 as Sn,Lk as vn,tA as Ft,u4 as Qt,Ll as re,Lm as In,Ln as An,Lo as ea,jb as ta,mm as aa,jg as na,mk as oa,mj as sa,mi as ra,rx as En,fb as Tn,cK as wn,cL as xn,mf as Dn,f7 as Fn,mv as On,Lp as Pn,D9 as Bn,Lq as Rn,Lr as jn,Ls as Ln,b5 as ut,eZ as Mn,gw as Un,fC as Yn,mq as Vn,iK as Kn,mn as Nn,ml as Gn,eT as zn,eR as $n}from"./zeni-epic-state-C9u4BvTm.js";import{z as B,U as H,r as F,c as S,D as N,aP as qn,O as Pe,x as ve,aQ as ca,f as Y,aR as Zn,S as Ie,aS as ia,i as mt,s as L,h as Hn,aT as Jn,aU as Xn,aV as Ae,aW as Wn,a as Qn,al as eo,aI as to,q as ao,Q as no,aX as oo,aY as ge}from"./index-WqxyGdxr.js";import{n as pt}from"./mui-D7DqO3YQ.js";import{a as _}from"./sentry-BcE91o8k.js";import{w as la}from"./withTransactionSidePanel-9qBDBkF1.js";import{b as da,t as me,e as ae,a as ht,v as so}from"./routePaths-BUUPXGIP.js";import{u as Be}from"./useAskAiCfoHostNavButtonProps-CnRBupY3.js";import{c as Re}from"./useFetchSuggestedQuestionsWhenReady-CnxX7TBH.js";import Ce from"./NotFoundScreen-Bi7CPczJ.js";import{t as ua}from"./analyticsHelper-DbL2hXxT.js";import{C as ro}from"./CompanyPassportScreen-BJMMhtCv.js";import{F as co}from"./FeaturePreviewScreen-C7kdCQc-.js";import{R as io}from"./ReferralListScreen-D3bgC_4v.js";import"./recharts-DFfCUpO3.js";import"./analytics-Fp0p9zzF.js";import"./plaid-lowWm0fK.js";import"./dnd-DTmBUnLk.js";import"./stripe-DMRn4zHo.js";import"./lottie-CHRWrHfY.js";import"./lexical-BgdBwfNo.js";import"./pdf-DEWT-QpZ.js";import"./utils-BMw-tiy-.js";import"./TransactionDetailScreen-Dy0Z71fZ.js";import"./decodeURIComponentSafe-C4CdHegQ.js";import"./MobileAppDrawer-C1oJKBTP.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]="9f1d6141-c9d8-4a15-9df3-f9b02570b582",e._sentryDebugIdIdentifier="sentry-dbid-9f1d6141-c9d8-4a15-9df3-f9b02570b582")}catch{}})();const lo=la(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=G(),s=B.getSignedInUser(),c=k(T=>T.tenantState.currentTenantId),u=k(T=>j(T)),{tenantEmailDomain:m}=G(),C=$(),b=u?.companyName??"",h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:c??""},l=_.useMemo(()=>({authParams:h,companyName:b,downloadEndPoint:`${H}/agingDetailedReport`,timezone:Fe()}),[]),d=_.useMemo(()=>r!=null?Ut(r):de(),[r]),p=K(),g=q(),f=k(T=>Ka(T,d,o)),v=_.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&p(Na(o,d))},[d]),E=_.useCallback(()=>{g("../../",{relative:"path"})},[]),R=_.useCallback((T,J)=>{p(Tt({sortKey:T,sortOrder:J}))},[]),A=_.useCallback(T=>{p(Tt({downloadState:T}))},[]),I=_.useCallback(T=>{if(e)e(T.transactionId,T.transactionType);else if(m!=null){const J=da({id:T.transactionId,type:T.transactionType},m);g(J);const Le=F(C.state?.pathnameStackToGoBack,C.pathname);g(J,{state:{pathnameStackToGoBack:Le}})}},[m,e]),x=_.useCallback(()=>{f.vendor!=null&&S.trackApAgingDetail("AP Aging",d.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.vendor.id,f.vendor.name)},[f.vendor,d]);return _.useEffect(()=>{v()},[]),_.useEffect(()=>{f.fetchState==="Completed"&&x()},[x,f.fetchState]),i.jsx(qn,{apAgingDetail:f,downloadParams:l,reportDate:d,analytics:S,onTransactionClick:I,onReload:v,onBackClick:E,onColumnSortConfigChanged:R,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),uo=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=K(),n=q(),o=k(I=>Ga(I)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AP Aging"});Re({isDataReady:o.fetchState==="Completed"});const c=B.getSignedInUser(),u=k(I=>I.tenantState.currentTenantId),m=k(I=>j(I)),C=m?.companyName??"",b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u??""},h=_.useMemo(()=>({authParams:b,companyName:C,downloadEndPoint:`${H}/agingReport`,timezone:Fe()}),[]),l=o.apAgingUIState.selectedDate??de(),d=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(Qe(l))},[]);_.useEffect(()=>{d()},[]);const p=_.useCallback(()=>{n("../",{relative:"path"})},[]),g=_.useCallback(I=>{t(we({searchString:I}))},[]),f=_.useCallback((I,x)=>{t(we({sortKey:x,sortOrder:I}))},[]),v=_.useCallback(I=>{n(`./${I}/${l.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[l]),E=_.useCallback(I=>{t(we({downloadState:I}))},[]),R=_.useCallback((I,x)=>{},[]),A=_.useCallback((I,x)=>{t(we({selectedDate:I,agingDateSelectionType:x})),t(Qe(I))},[]);return i.jsxs(i.Fragment,{children:[o.fetchState==="Completed"?i.jsx(ve,{analytics:S,onLoad:I=>I.trackPageLoaded(Y.Event.agingReport,"AP Aging")}):null,i.jsx(ca,{uiState:o.apAgingUIState,report:o,downloadParams:h,analytics:S,onReloadReport:d,onBackClick:p,onSearchTextChange:g,onSortOrderChange:f,onEntityNameClick:v,updateDownloadStateHandler:E,onSelectedDateChanged:A,onNodeCollapseToggled:R,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},mo=la(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=G(),s=B.getSignedInUser(),c=k(x=>j(x)),{tenantEmailDomain:u}=G(),m=$(),C=c.companyName,b={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:c.tenantId},h=_.useMemo(()=>({authParams:b,companyName:C,downloadEndPoint:`${H}/agingDetailedReport`,timezone:Fe()}),[]),l=_.useMemo(()=>r!=null?Ut(r):de(),[r]),d=K(),p=q(),g=k(x=>za(x,l,o)),f=_.useCallback(()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&d($a(o,l))},[l]),v=_.useCallback(()=>{p("../../",{relative:"path"})},[]),E=_.useCallback((x,T)=>{d(wt({sortKey:x,sortOrder:T}))},[]),R=_.useCallback(x=>{d(wt({downloadState:x}))},[]),A=_.useCallback(x=>{if(e)e(x.transactionId,x.transactionType);else if(u!=null){const T=da({id:x.transactionId,type:x.transactionType},u);p(T);const J=F(m.state?.pathnameStackToGoBack,m.pathname);p(T,{state:{pathnameStackToGoBack:J}})}},[u,e]),I=_.useCallback(()=>{g.customer!=null&&S.trackArAgingDetail("AR Aging",l.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)},[g.customer,l]);return _.useEffect(()=>{f()},[]),_.useEffect(()=>{g.fetchState==="Completed"&&I()},[g.fetchState,I]),i.jsx(Zn,{arAgingDetail:g,downloadParams:h,reportDate:l,analytics:S,onTransactionClick:A,onReload:f,onBackClick:v,onColumnSortConfigChanged:E,updateDownloadStateHandler:R,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),po=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=K(),n=q(),o=k(A=>qa(A)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AR Aging"});Re({isDataReady:o.fetchState==="Completed"});const c=B.getSignedInUser(),u=k(A=>j(A)),m=u.companyName,C={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u.tenantId},b=_.useMemo(()=>({authParams:C,companyName:m,downloadEndPoint:`${H}/agingReport`,timezone:Fe()}),[]),h=o.arAgingUIState.selectedDate??de(),l=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(et(h))},[]);_.useEffect(()=>{l()},[]);const d=_.useCallback(()=>{n("../",{relative:"path"})},[]),p=_.useCallback(A=>{t(xe({searchString:A}))},[]),g=_.useCallback((A,I)=>{t(xe({sortKey:I,sortOrder:A}))},[]),f=_.useCallback(A=>{n(`./${A}/${h.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[h]),v=_.useCallback(A=>{t(xe({downloadState:A}))},[]),E=_.useCallback((A,I)=>{t(xe({selectedDate:A,agingDateSelectionType:I})),t(et(A))},[]),R=_.useCallback((A,I)=>{t(Za({nodeId:A,isCollapsed:I}))},[]);return i.jsxs(i.Fragment,{children:[o.fetchState==="Completed"?i.jsx(ve,{analytics:S,onLoad:A=>A.trackPageLoaded(Y.Event.agingReport,"AR Aging")}):null,i.jsx(ca,{uiState:o.arAgingUIState,report:o,downloadParams:b,analytics:S,onReloadReport:l,onBackClick:d,onSearchTextChange:p,onSortOrderChange:g,onEntityNameClick:f,updateDownloadStateHandler:v,onSelectedDateChanged:E,onNodeCollapseToggled:R,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},ma=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function pa(e,a){const t=Xa(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=me(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),c=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Wa(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?S.trackZeniAccountsCashBalancePromoClicked("Move Money"):(S.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else S.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const ho=Z(function(e){const a=Ha(e).accountsInOrder.map((n,o)=>ma(n,o)),t=Ja(e);return{sectionTitle:N.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:S}},pa)(ia),fo=Z(function(e){const a=Qa(e).accountsInOrder.map((o,r)=>ma(o,r)),t=B.getSignedInUser(),n=_e(t);return{sectionTitle:N.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:S}},pa)(ia);function go(){const e=q(),a=$(),{tenantEmailDomain:t}=G(),n=Ie(),o=k(s=>j(s).company?.companyInfo.firstMonthOfFY??1),r=at(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?i.jsx(Ce,{}):i.jsx(ho,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function bo(){const e=q(),a=$(),{tenantEmailDomain:t}=G(),n=Ie(),o=at(n?.loggedInUserRoleMap),r=k(s=>j(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?i.jsx(Ce,{}):i.jsx(fo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Co=pt.div`
|
|
1
|
+
import{j as i}from"./liveblocks-CGYIz1sf.js";import{l as G,g as k,u as $,h as K,j as q,k as Z,n as We,o as D}from"./core--8kDo-LJ.js";import{eM as j,Jt as Fe,bB as Ut,bp as de,KG as Ka,hO as Na,KH as Tt,KI as Ga,hR as Qe,KJ as we,KK as za,hW as $a,KL as wt,KM as qa,h_ as et,KN as xe,KO as Za,cN as at,KP as Ha,KQ as Ja,JN as Xa,iU as Wa,KR as Qa,bm as _e,KS as Yt,Jh as Q,bc as Vt,j6 as Kt,mp as Nt,iR as Gt,Jj as ee,Ji as z,KT as en,KU as tn,KV as zt,KW as pe,tx as ke,ty as ye,tV as ue,tP as te,tC as Se,KX as an,KY as nn,KZ as on,K_ as $t,K$ as he,L0 as sn,dF as Oe,q9 as qt,L1 as rn,L2 as cn,L3 as ln,L4 as nt,IE as ot,jm as st,u1 as rt,qh as dn,L5 as un,tz as xt,qc as ie,q8 as Zt,L6 as oe,L7 as mn,L8 as ct,ID as it,s9 as Ht,L9 as pn,La as hn,Lb as fn,Lc as lt,sm as gn,Ld as bn,tB as Dt,s8 as Jt,Le as se,Lf as Cn,bu as Xt,u5 as Wt,Lg as _n,Lh as kn,Li as yn,Lj as dt,u0 as Sn,Lk as vn,tA as Ft,u4 as Qt,Ll as re,Lm as In,Ln as An,Lo as ea,jb as ta,mm as aa,jg as na,mk as oa,mj as sa,mi as ra,rx as En,fb as Tn,cK as wn,cL as xn,mf as Dn,f7 as Fn,mv as On,Lp as Pn,D9 as Bn,Lq as Rn,Lr as jn,Ls as Ln,b5 as ut,eZ as Mn,gw as Un,fC as Yn,mq as Vn,iK as Kn,mn as Nn,ml as Gn,eT as zn,eR as $n}from"./zeni-epic-state-Cb3mJiT_.js";import{z as B,T as H,r as F,d as S,D as N,aP as qn,M as Pe,O as ve,aQ as ca,f as Y,aR as Zn,S as Ie,aS as ia,i as mt,s as L,h as Hn,aT as Jn,aU as Xn,aV as Ae,aW as Wn,a as Qn,al as eo,aI as to,q as ao,N as no,aX as oo,aY as ge}from"./index-DO3Ev_EW.js";import{n as pt}from"./mui-COKu087d.js";import{a as _}from"./sentry-ClGNqxTu.js";import{w as la}from"./withTransactionSidePanel-IHJ8nGIi.js";import{b as da,t as me,e as ae,a as ht,v as so}from"./routePaths-BOWJQWRe.js";import{u as Be}from"./useAskAiCfoHostNavButtonProps-BECmuzX_.js";import{c as Re}from"./useFetchSuggestedQuestionsWhenReady-CapxOzLt.js";import Ce from"./NotFoundScreen-BOOShTFL.js";import{t as ua}from"./analyticsHelper-BvhlneFh.js";import{C as ro}from"./CompanyPassportScreen-9atxEdFF.js";import{F as co}from"./FeaturePreviewScreen-DgltNyCi.js";import{R as io}from"./ReferralListScreen-CT6Goua6.js";import"./recharts-jENt1xXk.js";import"./analytics-D76TbnBG.js";import"./plaid-DzMABTsR.js";import"./dnd-C7FILogn.js";import"./stripe-DMRn4zHo.js";import"./lottie-BwZdyUox.js";import"./lexical-roIufkFt.js";import"./pdf-CBQkrKS2.js";import"./utils-C9gYeSwW.js";import"./TransactionDetailScreen-CfRj9Znj.js";import"./decodeURIComponentSafe-C7w4UFFF.js";import"./MobileAppDrawer-jslKljAh.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]="b16a9b9b-9016-448f-8346-ae360957b5c8",e._sentryDebugIdIdentifier="sentry-dbid-b16a9b9b-9016-448f-8346-ae360957b5c8")}catch{}})();const lo=la(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=G(),s=B.getSignedInUser(),c=k(T=>T.tenantState.currentTenantId),u=k(T=>j(T)),{tenantEmailDomain:m}=G(),C=$(),b=u?.companyName??"",h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:c??""},l=_.useMemo(()=>({authParams:h,companyName:b,downloadEndPoint:`${H}/agingDetailedReport`,timezone:Fe()}),[]),d=_.useMemo(()=>r!=null?Ut(r):de(),[r]),p=K(),g=q(),f=k(T=>Ka(T,d,o)),v=_.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&p(Na(o,d))},[d]),E=_.useCallback(()=>{g("../../",{relative:"path"})},[]),R=_.useCallback((T,J)=>{p(Tt({sortKey:T,sortOrder:J}))},[]),A=_.useCallback(T=>{p(Tt({downloadState:T}))},[]),I=_.useCallback(T=>{if(e)e(T.transactionId,T.transactionType);else if(m!=null){const J=da({id:T.transactionId,type:T.transactionType},m);g(J);const Le=F(C.state?.pathnameStackToGoBack,C.pathname);g(J,{state:{pathnameStackToGoBack:Le}})}},[m,e]),x=_.useCallback(()=>{f.vendor!=null&&S.trackApAgingDetail("AP Aging",d.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.vendor.id,f.vendor.name)},[f.vendor,d]);return _.useEffect(()=>{v()},[]),_.useEffect(()=>{f.fetchState==="Completed"&&x()},[x,f.fetchState]),i.jsx(qn,{apAgingDetail:f,downloadParams:l,reportDate:d,analytics:S,onTransactionClick:I,onReload:v,onBackClick:E,onColumnSortConfigChanged:R,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),uo=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=K(),n=q(),o=k(I=>Ga(I)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AP Aging"});Re({isDataReady:o.fetchState==="Completed"});const c=B.getSignedInUser(),u=k(I=>I.tenantState.currentTenantId),m=k(I=>j(I)),C=m?.companyName??"",b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u??""},h=_.useMemo(()=>({authParams:b,companyName:C,downloadEndPoint:`${H}/agingReport`,timezone:Fe()}),[]),l=o.apAgingUIState.selectedDate??de(),d=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(Qe(l))},[]);_.useEffect(()=>{d()},[]);const p=_.useCallback(()=>{n("../",{relative:"path"})},[]),g=_.useCallback(I=>{t(we({searchString:I}))},[]),f=_.useCallback((I,x)=>{t(we({sortKey:x,sortOrder:I}))},[]),v=_.useCallback(I=>{n(`./${I}/${l.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[l]),E=_.useCallback(I=>{t(we({downloadState:I}))},[]),R=_.useCallback((I,x)=>{},[]),A=_.useCallback((I,x)=>{t(we({selectedDate:I,agingDateSelectionType:x})),t(Qe(I))},[]);return i.jsxs(i.Fragment,{children:[o.fetchState==="Completed"?i.jsx(ve,{analytics:S,onLoad:I=>I.trackPageLoaded(Y.Event.agingReport,"AP Aging")}):null,i.jsx(ca,{uiState:o.apAgingUIState,report:o,downloadParams:h,analytics:S,onReloadReport:d,onBackClick:p,onSearchTextChange:g,onSortOrderChange:f,onEntityNameClick:v,updateDownloadStateHandler:E,onSelectedDateChanged:A,onNodeCollapseToggled:R,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},mo=la(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=G(),s=B.getSignedInUser(),c=k(x=>j(x)),{tenantEmailDomain:u}=G(),m=$(),C=c.companyName,b={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:c.tenantId},h=_.useMemo(()=>({authParams:b,companyName:C,downloadEndPoint:`${H}/agingDetailedReport`,timezone:Fe()}),[]),l=_.useMemo(()=>r!=null?Ut(r):de(),[r]),d=K(),p=q(),g=k(x=>za(x,l,o)),f=_.useCallback(()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&d($a(o,l))},[l]),v=_.useCallback(()=>{p("../../",{relative:"path"})},[]),E=_.useCallback((x,T)=>{d(wt({sortKey:x,sortOrder:T}))},[]),R=_.useCallback(x=>{d(wt({downloadState:x}))},[]),A=_.useCallback(x=>{if(e)e(x.transactionId,x.transactionType);else if(u!=null){const T=da({id:x.transactionId,type:x.transactionType},u);p(T);const J=F(m.state?.pathnameStackToGoBack,m.pathname);p(T,{state:{pathnameStackToGoBack:J}})}},[u,e]),I=_.useCallback(()=>{g.customer!=null&&S.trackArAgingDetail("AR Aging",l.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)},[g.customer,l]);return _.useEffect(()=>{f()},[]),_.useEffect(()=>{g.fetchState==="Completed"&&I()},[g.fetchState,I]),i.jsx(Zn,{arAgingDetail:g,downloadParams:h,reportDate:l,analytics:S,onTransactionClick:A,onReload:f,onBackClick:v,onColumnSortConfigChanged:E,updateDownloadStateHandler:R,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),po=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Pe(),t=K(),n=q(),o=k(A=>qa(A)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Be({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AR Aging"});Re({isDataReady:o.fetchState==="Completed"});const c=B.getSignedInUser(),u=k(A=>j(A)),m=u.companyName,C={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:u.tenantId},b=_.useMemo(()=>({authParams:C,companyName:m,downloadEndPoint:`${H}/agingReport`,timezone:Fe()}),[]),h=o.arAgingUIState.selectedDate??de(),l=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(et(h))},[]);_.useEffect(()=>{l()},[]);const d=_.useCallback(()=>{n("../",{relative:"path"})},[]),p=_.useCallback(A=>{t(xe({searchString:A}))},[]),g=_.useCallback((A,I)=>{t(xe({sortKey:I,sortOrder:A}))},[]),f=_.useCallback(A=>{n(`./${A}/${h.format(N.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[h]),v=_.useCallback(A=>{t(xe({downloadState:A}))},[]),E=_.useCallback((A,I)=>{t(xe({selectedDate:A,agingDateSelectionType:I})),t(et(A))},[]),R=_.useCallback((A,I)=>{t(Za({nodeId:A,isCollapsed:I}))},[]);return i.jsxs(i.Fragment,{children:[o.fetchState==="Completed"?i.jsx(ve,{analytics:S,onLoad:A=>A.trackPageLoaded(Y.Event.agingReport,"AR Aging")}):null,i.jsx(ca,{uiState:o.arAgingUIState,report:o,downloadParams:b,analytics:S,onReloadReport:l,onBackClick:d,onSearchTextChange:p,onSortOrderChange:g,onEntityNameClick:f,updateDownloadStateHandler:v,onSelectedDateChanged:E,onNodeCollapseToggled:R,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},ma=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function pa(e,a){const t=Xa(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=me(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),c=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:c,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Wa(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?S.trackZeniAccountsCashBalancePromoClicked("Move Money"):(S.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=F(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else S.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const ho=Z(function(e){const a=Ha(e).accountsInOrder.map((n,o)=>ma(n,o)),t=Ja(e);return{sectionTitle:N.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:S}},pa)(ia),fo=Z(function(e){const a=Qa(e).accountsInOrder.map((o,r)=>ma(o,r)),t=B.getSignedInUser(),n=_e(t);return{sectionTitle:N.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:S}},pa)(ia);function go(){const e=q(),a=$(),{tenantEmailDomain:t}=G(),n=Ie(),o=k(s=>j(s).company?.companyInfo.firstMonthOfFY??1),r=at(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?i.jsx(Ce,{}):i.jsx(ho,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function bo(){const e=q(),a=$(),{tenantEmailDomain:t}=G(),n=Ie(),o=at(n?.loggedInUserRoleMap),r=k(s=>j(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?i.jsx(Ce,{}):i.jsx(fo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Co=pt.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
min-height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-
|
|
1
|
+
import{j as v}from"./liveblocks-CGYIz1sf.js";import{a as u}from"./sentry-ClGNqxTu.js";import{h as y,g as b,k as w,u as A,N as k}from"./core--8kDo-LJ.js";import{Ic as N,eM as _,fj as U,Id as L,mh as R,Ie as z}from"./zeni-epic-state-Cb3mJiT_.js";import{u as j,z as f,L as T,t as S,D as O,b as $}from"./index-DO3Ev_EW.js";import"./mui-COKu087d.js";import{t as P}from"./getLocaleForTenant-BNCERJ--.js";import"./recharts-jENt1xXk.js";import"./analytics-D76TbnBG.js";import"./plaid-DzMABTsR.js";import"./dnd-C7FILogn.js";import"./stripe-DMRn4zHo.js";import"./lottie-BwZdyUox.js";import"./lexical-roIufkFt.js";import"./pdf-CBQkrKS2.js";import"./utils-C9gYeSwW.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]="6edb8790-83dc-44ea-9d73-f957931ec959",t._sentryDebugIdIdentifier="sentry-dbid-6edb8790-83dc-44ea-9d73-f957931ec959")}catch{}})();const Q=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,I=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,I=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(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:I}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(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&&S.shouldFetchActiveTenant(e)&&(h.current=!0,S.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,I=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&I&&S.shouldFetchAllTenants()&&(r.current=!0,S.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||(O.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}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"],G={"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 G[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-DS0jhd8K.js → DomesticWireDetailScreen-DjDGDTBz.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-CGYIz1sf.js";import{j as w,u as C,g as h,k as A,l as V}from"./core--8kDo-LJ.js";import{Ma as k,Mh as _,fA as J,fz as q,fy as L,ii as W,Ji as K,ps as Q,eM as B,LI as D,ig as T,Mb as v,Mk as F,id as G,iC as j}from"./zeni-epic-state-Cb3mJiT_.js";import{bj as X,J as R,i as N,z as U,h as M,q as p,s as S,v as z,bk as Y,o as O,bl as ee,r as te}from"./index-DO3Ev_EW.js";import{n as Z}from"./mui-COKu087d.js";import"./sentry-ClGNqxTu.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]="18cd381e-c70b-4676-8e06-dba0041b42ab",e._sentryDebugIdIdentifier="sentry-dbid-18cd381e-c70b-4676-8e06-dba0041b42ab")}catch{}})();const ae=A(null,function(e,t){return{onSaveVendor:a=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(K("common")),a!=null&&e(Q(a))},onGetOtp:a=>{e(L(a,"BillPayVendor"))},onResendOtp:a=>{e(q(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(J(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(_(a,n,o))}}})(X);function H({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=Z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as l}from"./liveblocks-BOEQeN-H.js";import{j as w,u as C,g as h,k as A,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=A(function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:a,location:n,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(n.state?.pathnameStackToGoBack),r=s.poppedPathname??P();a(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(
|
|
9
|
+
`,oe=A(function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{navigate:a,location:n,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(n.state?.pathnameStackToGoBack),r=s.poppedPathname??P();a(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(v())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(F({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??P(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(v())}}})(Y);function fe({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=R(),{vendorId:s,billId:r}=V(),d=e??s,{useFeatureGate:i}=N(),c=U.getSignedInUser(),b=h(u=>B(u)),g=M(),I=p(n.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:x}=i(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(S.isDepositAccountsFeatureEnabled);if(c==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ne,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:r}),l.jsx(oe,{location:n,navigate:a,billId:r,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t},me=(e,t,a)=>{let n=`/${e}/bill/${encodeURIComponent(t)}`;return a=="draft"&&(n+="/edit"),n},he=e=>`/${e}/bills`,ke=(e,t)=>{let a=`/${e}/bill`;return a=t!=null?a.concat(`/${t}/edit`):a.concat("/new"),a},E=(e,t,a,n)=>{let o=`/${e}/bill`;return o+=a!=null?`/${a}/edit/vendor`:"/new/vendor",o+=n!=null?`/${n}/edit/${t}`:`/create/${t}`,o};function ve(e,t,a){return E(e,"ach",t,a)}function Se(e,t,a){return E(e,"domestic",t,a)}function ge(e,t,a){return E(e,"international",t,a)}const se=(e,t,a)=>{let n=`/${e}/bill/`;return n=a!=null?n.concat(`${encodeURIComponent(a)}/${t}/`):n.concat(`new/${t}/`),n},ie=Z.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100vh;
|
|
12
12
|
width: 100%;
|
|
@@ -15,4 +15,4 @@ import{j as l}from"./liveblocks-BOEQeN-H.js";import{j as w,u as C,g as h,k as A,
|
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
17
|
box-shadow: ${e=>`0px 2px ${O.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,re=A(function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:a,navigate:n,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:d}=r;return{onFetchBankName:i=>{e(j(i))},onSaveHandler:i=>{e(G(t.bankAccountContext,i,"us-domestic",s))},onWireDetailsUpdated:i=>{const{bankAccountSection:c}=i;e(F({data:c}))},onCancel:()=>{(()=>{const i=p(o.state?.pathnameStackToGoBack),c=i.poppedPathname??$();n(c,{state:{pathnameStackToGoBack:i.newStack}})})(),e(
|
|
18
|
+
`,re=A(function(e,t){const{vendorId:a,billId:n}=t,o=k(e,a),s=D(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,n);return{billId:n,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}},function(e,t){const{billId:a,navigate:n,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:d}=r;return{onFetchBankName:i=>{e(j(i))},onSaveHandler:i=>{e(G(t.bankAccountContext,i,"us-domestic",s))},onWireDetailsUpdated:i=>{const{bankAccountSection:c}=i;e(F({data:c}))},onCancel:()=>{(()=>{const i=p(o.state?.pathnameStackToGoBack),c=i.poppedPathname??$();n(c,{state:{pathnameStackToGoBack:i.newStack}})})(),e(v())},onAddressClick:i=>{if(t.bankAccountContext==="express-pay")n("./add-address");else{const c=se(d,i,a),b=te(o.state?.pathnameStackToGoBack,o.pathname);n(c,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const i=p(t.location.state?.pathnameStackToGoBack),c=i.poppedPathname??$(0);t.navigate(c,{state:{pathnameStackToGoBack:i.newStack}})}e(v())}}})(ee);function Ie({vendorIdParam:e,accountContext:t}){const a=w(),n=C(),o=R(),{vendorId:s,billId:r}=V(),d=e??s,i=U.getSignedInUser(),{useFeatureGate:c}=N(),b=M(),g=h(u=>B(u)),I=p(n.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h(u=>k(u,d)),{isFeatureEnabled:x}=c(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(S.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(z,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${O.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(ie,{windowSize:o,children:[l.jsx(H,{vendorId:d,billId:r}),l.jsx(re,{location:n,navigate:a,billId:r,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{fe as A,Ie as D,H as V,me as a,se as b,ke as c,Se as d,he as g,ge as i,ve as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-CGYIz1sf.js";import{J as f,A as l,h as c}from"./index-DO3Ev_EW.js";import{D as p}from"./mui-COKu087d.js";import"./sentry-ClGNqxTu.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]="029b96e7-5aad-4b4d-a728-6ee39fef0fde",e._sentryDebugIdIdentifier="sentry-dbid-029b96e7-5aad-4b4d-a728-6ee39fef0fde")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=f(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-CGYIz1sf.js";import{a as d}from"./sentry-ClGNqxTu.js";import{j as A,h as B,u as J,l as q,g as l,N as F,k as M,n as O,o as N}from"./core--8kDo-LJ.js";import{Kp as _,eM as K,JO as R,km as W,Gw as I,Ku as Y,Jh as $,jm as z,Gx as S,JT as U,JU as V,Jj as H,Ji as L}from"./zeni-epic-state-Cb3mJiT_.js";import{aM as Q,d as X,q as Z,r as tt}from"./index-DO3Ev_EW.js";import"./mui-COKu087d.js";import{d as k}from"./decodeURIComponentSafe-C7w4UFFF.js";import{w as et}from"./withTransactionSidePanel-IHJ8nGIi.js";import{e as at,b as nt}from"./routePaths-BOWJQWRe.js";import"./recharts-jENt1xXk.js";import"./analytics-D76TbnBG.js";import"./plaid-DzMABTsR.js";import"./dnd-C7FILogn.js";import"./stripe-DMRn4zHo.js";import"./lottie-BwZdyUox.js";import"./lexical-roIufkFt.js";import"./pdf-CBQkrKS2.js";import"./utils-C9gYeSwW.js";import"./useAskAiCfoHostNavButtonProps-BECmuzX_.js";import"./useFetchSuggestedQuestionsWhenReady-CapxOzLt.js";import"./TransactionDetailScreen-CfRj9Znj.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]="7ad989ca-d27e-48c7-91fe-68de1ef97344",a._sentryDebugIdIdentifier="sentry-dbid-7ad989ca-d27e-48c7-91fe-68de1ef97344")}catch{}})();const ot=M(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:X,isAccountingClassesEnabled:z(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(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(U()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=J(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:j,entityNameEncoded:x}=q(),r=k(j??""),p=k(x??""),u=rt(r,p),w=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),G=l(n=>K(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(W(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:b,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:C(w.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(O,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-B_atYPpu.js → ExpenseAutomationRoutes-CYo6nFC7.js}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-CGYIz1sf.js";import un from"./NotFoundScreen-BOOShTFL.js";import{a as l}from"./sentry-ClGNqxTu.js";import{n as Te,D as St,S as ze}from"./mui-COKu087d.js";import{h as he,j as It,u as Ve,g as V,l as nt,k as mn,n as hn,o as Be}from"./core--8kDo-LJ.js";import{eM as $e,OI as pn,f0 as me,fe as gn,q3 as Cn,OJ as Me,mI as ft,mO as kt,OK as Et,nb as Sn,OL as yt,mB as In,pB as fn,OM as kn,jy as En,ON as yn,Fx as vn,eY as je,pg as vt,Kq as at,Ks as bn,jp as Tn,Kt as An,jw as Pn,cT as wn,t5 as Le,Jh as xn,jx as Rn,e_ as Dn,mP as bt,ng as be,ob as Tt,oK as Un,e$ as At,nf as ot,mG as ae,ni as Pt,nk as Bn,bB as On,kV as Fn,kS as _n,nj as Ee,nh as ue,OO as Vn,nA as st,Bd as wt,OP as xt,s2 as Rt,oG as Mn,jm as jn,OQ as Ln,Jj as ct,Ji as ke,OR as it,jN as zn,OS as $n,OT as Gn,OU as qn,OV as Jn,mY as Yn,OW as Nn,OX as Kn,OY as Zn,nq as Hn,jA as Qn,jr as Wn,OZ as Xn,jz as lt,KA as ea,O_ as ta,O$ as na,pc as aa,oT as oa,oS as Oe,P0 as sa,P1 as ca,l4 as ia,bp as la,k$ as rt,kN as ra,P2 as da,gy as dt,fL as ua,kY as ma,u_ as ha,P3 as pa,nR as ga,nM as Ca,nQ as Sa,nB as Ia,P4 as fa,n4 as ka,mV as Ea,ff as ut,nl as ya,P5 as va,P6 as ba,P7 as Ta,P8 as Aa,P9 as Pa,Pa as mt,po as wa,oB as xa,ok as ht,ot as Ra,og as Da,oH as Ua,ol as Ba,Pb as Oa,Pc as Fa,n_ as _a,Pd as Va,nY as Ma,nZ as ja,nW as La,ov as za}from"./zeni-epic-state-Cb3mJiT_.js";import{M as Dt,i as Ut,s as ye,d as j,r as H,N as Bt,cq as $a,h as Ot,z as Ae,cr as Ga,ao as ve,cs as qa,v as Ft,ct as Ja,cu as Ya,al as Fe,Z as Na,S as Ka,aI as Za,cv as Ha,aZ as Qa,A as Wa,D as Xa,cw as eo,T as to,cx as no}from"./index-DO3Ev_EW.js";import{u as _t}from"./useAskAiCfoHostNavButtonProps-BECmuzX_.js";import{c as Vt}from"./useFetchSuggestedQuestionsWhenReady-CapxOzLt.js";import{c as pt,C as ao}from"./TransactionDetailScreen-CfRj9Znj.js";import{w as oo}from"./withTransactionSidePanel-IHJ8nGIi.js";import{h as so,v as co}from"./routePaths-BOWJQWRe.js";import{g as _e}from"./accountMappingHelper-DC8hLo25.js";import{D as io}from"./DrawerScreen-DG33YoSv.js";import"./recharts-jENt1xXk.js";import"./analytics-D76TbnBG.js";import"./plaid-DzMABTsR.js";import"./dnd-C7FILogn.js";import"./stripe-DMRn4zHo.js";import"./lottie-BwZdyUox.js";import"./lexical-roIufkFt.js";import"./pdf-CBQkrKS2.js";import"./utils-C9gYeSwW.js";import"./decodeURIComponentSafe-C7w4UFFF.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new t.Error().stack;c&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[c]="ad61c106-e04c-44d2-96aa-28ab22aeb5b4",t._sentryDebugIdIdentifier="sentry-dbid-ad61c106-e04c-44d2-96aa-28ab22aeb5b4")}catch{}})();const lo=()=>{const{isAiCfoOpen:t,setIsAiCfoOpen:c}=Dt(),w=he(),A=It(),y=Ve(),r=V(p=>$e(p)),{useFeatureGate:m}=Ut(),{isFeatureEnabled:x}=m(ye.isRealtimeInsightsFeatureEnabled),g=V(p=>p.expenseAutomationViewState.selectedPeriodByTenantId),a=V(p=>pn(p,r.tenantId)),{isAiCfoAccessEnabled:M,onAskAiCfoClick:v}=_t({isAiCfoOpen:t,setIsAiCfoOpen:c,mobileExploreReferrer:"Month-End Close Overview"}),I=l.useCallback((p,E,U=!1)=>{w(me({tenantId:E,period:{month:p.month,year:p.year},refreshViewInBackground:U}))},[]),$=l.useCallback(p=>{const E=y.state?.referrer;a.monthEndCloseChecks?.auditSummary!=null&&j.trackMonthCloseAuditPage(p.month,p.year,a.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",a.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,E??null),w(gn(r.tenantId,p))},[r.tenantId,a.monthEndCloseChecks?.auditSummary,a.monthEndCloseChecks?.reportEmailSentDate]),S=g[r.tenantId],k=l.useCallback(()=>{const p=y.state?.referrer;a.monthEndCloseChecks?.auditSummary!=null&&j.trackMonthCloseAuditPage(S.month,S.year,a.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",a.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),I(S,r.tenantId,!0)},[I,S,r.tenantId,a.monthEndCloseChecks?.auditSummary,a.monthEndCloseChecks?.reportEmailSentDate]),L=H(y.state?.pathnameStackToGoBack,y.pathname),N=l.useCallback(()=>{if(a.monthEndCloseChecks!=null&&S!=null){const p=a.monthEndCloseChecks.monthEndCloseCheckList.find(E=>E.progress<100);if(p!=null)return void A(`./${p.id}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:L,message:"comingFromOverview"}});A(`./month_end_insights/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:L,message:"comingFromOverview"}})}},[a.monthEndCloseChecks,S]),{areTenantIdsInSync:d}=Bt();return Vt({isDataReady:a.fetchState==="Completed"}),l.useEffect(()=>{S!=null&&a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&d&&I(S,r.tenantId)},[I,S,a.fetchState,r.tenantId,d]),l.useEffect(()=>{S!=null&&a.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&a.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&d&&w(Cn(S))},[S,a.monthClosePerformanceTrendFetchStatus.fetchState,d]),l.useEffect(()=>{const p=setInterval(()=>{a.fetchState!=="In-Progress"&&a.fetchState==="Completed"&&k()},3e5);return()=>clearInterval(p)},[a.fetchState]),l.useEffect(()=>{if(a.fetchState==="Completed"&&a.monthEndCloseChecks?.auditSummary!=null){const p=y.state?.referrer;j.trackMonthCloseAuditPage(a.selectedPeriod.month,a.selectedPeriod.year,a.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",a.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}},[a.fetchState,a.selectedPeriod,a.monthEndCloseChecks?.auditSummary,a.monthEndCloseChecks?.reportEmailSentDate]),u.jsx(ro,{children:u.jsx($a,{monthEndCloseChecksView:a,isRealtimeInsightsFeatureEnabled:x,onMonthEndCheckClick:p=>{A(`./${p}/${S.month}-${S.year}`,{state:{pathnameStackToGoBack:L,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:$,handleReviewButtonClick:N,onBackClick:()=>{A("../../dashboard")},onReload:k,isAiCfoAccessEnabled:M,onAskAiCfoClick:v})})},ro=Te.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
|
-
`,uo="512px",mo=({reconciliation:t,selectedDrawerAccountId:c,onFetchLinkTokenClick:w,onEstablishConnectionClick:A})=>{const y=
|
|
8
|
+
`,uo="512px",mo=({reconciliation:t,selectedDrawerAccountId:c,onFetchLinkTokenClick:w,onEstablishConnectionClick:A})=>{const y=Ot(),r=he(),m=Ae.getSignedInUser(),x=V(s=>$e(s)),g=t.excludedAccountIDs,a={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:x.tenantId??""},{accountReconciliationsByAccountID:M,monthYearPeriod:v,statementUploadChosen:I}=t,$=c!=null?M[c]:void 0,S=$?.accountReconEntity.statementMetaData?.statementUploadId,k=l.useCallback(()=>{c!=null&&r(Me({selectedDrawerAccountId:void 0}))},[r,c]),L=(s,C)=>{r(fn(s,C.split(".")[0]))},N=s=>{S!=null&&r(In({accountId:c??"",selectedPeriod:v,fileId:s,statementUploadId:S}))},d=()=>{r(Et({statementUploadChosen:!1}))},p=s=>{c!=null&&r(Sn({accountId:c,selectedPeriod:v,payload:s}))},E=s=>{c!=null&&r(yt({accountId:c,selectedPeriod:v,localData:{accountSource:s}}))},U=l.useCallback(()=>{c!=null&&r(ft({accountId:c}))},[r,c]),e=l.useCallback(()=>{c!=null&&r(kt({accountId:c}))},[r,c]),n=g.includes(c??"")?t.excludedAccountReconciliationByAccountID[c??""]:void 0,o=$!=null?u.jsx(Ga,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:$,monthYearPeriod:v,onDismissClick:k,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:w,onEstablishConnectionClick:A,onEditFileName:L,onDeleteFile:N,onSelectSourceType:E,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`,authParams:a,openFilePicker:I,onStatementUploadSuccess:p,onUploadWindowOpenedOnce:d,onExcludeFromReconciliation:U}):n!=null?u.jsx(qa,{excludedAccountReconciliation:n,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:e}):null;return o==null?null:u.jsx(St,{anchor:"right",open:c!=null,PaperProps:{style:{width:uo,color:y.colors.grey4}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>k(),children:u.jsx(ho,{onClick:s=>s.stopPropagation(),children:o})})},ho=Te(ze)`
|
|
9
9
|
display: flex;
|
|
10
10
|
min-height: 100%;
|
|
11
11
|
flex-direction: column;
|
|
12
|
-
`;function po({companyId:t,closeCustomerRequestDrawer:c,addCustomerRequest:w,resetCustomerRequest:A}){const y=Ae.getSignedInUser();if(y==null)throw Error("Can't access Customer Request page without signing in...");const r=V(m=>kn(m,t,y));return l.useEffect(()=>{A()},[]),u.jsx(u.Fragment,{children:r.fetchState==="In-Progress"||r.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?u.jsx(Ft,{fetchState:"In-Progress"}):u.jsx(Ja,{onCloseClick:c,addCustomerRequest:w,snippets:r.companyMonthEndReportTemplatesData,bulletPoints:r.zeniRequestsData??[]})})}const go=t=>u.jsx(Ya,{...t}),Co="512px",So=({selectedTransactionId:t,onClose:c})=>{const w=
|
|
12
|
+
`;function po({companyId:t,closeCustomerRequestDrawer:c,addCustomerRequest:w,resetCustomerRequest:A}){const y=Ae.getSignedInUser();if(y==null)throw Error("Can't access Customer Request page without signing in...");const r=V(m=>kn(m,t,y));return l.useEffect(()=>{A()},[]),u.jsx(u.Fragment,{children:r.fetchState==="In-Progress"||r.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?u.jsx(Ft,{fetchState:"In-Progress"}):u.jsx(Ja,{onCloseClick:c,addCustomerRequest:w,snippets:r.companyMonthEndReportTemplatesData,bulletPoints:r.zeniRequestsData??[]})})}const go=t=>u.jsx(Ya,{...t}),Co="512px",So=({selectedTransactionId:t,onClose:c})=>{const w=Ot(),A=he(),y=V(g=>t==null?void 0:En(g.transactionState,t)),r=y?.qboId,m=V(g=>r==null?void 0:yn(g,r));l.useEffect(()=>{r!=null&&A(vn(r))},[A,t,r]);const x=l.useCallback(()=>{c()},[c]);return t==null||m==null?null:u.jsx(St,{anchor:"right",open:t!=null,PaperProps:{style:{width:Co,color:w.colors.grey4}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:x,children:u.jsx(Io,{onClick:g=>g.stopPropagation(),children:u.jsx(go,{transactionActivityLogSelectorView:m,onClose:x})})})},Io=Te(ze)`
|
|
13
13
|
display: flex;
|
|
14
14
|
min-height: 100%;
|
|
15
15
|
flex-direction: column;
|
|
16
|
-
`,fo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:ko,comma:gt,space:Eo}},dateFormat:jt}=Xa.getLocalizedStrings(),Ct=za,yo=mn(function(t,c){const{uncategorizedAccounts:w,vendorSearchAutoCompleteData:A,monthEndInsightsCustomerRequestData:y,monthEndInsightsPreviewMode:r,companyId:m,isMissingReceiptsBulkUploadEnabled:x,isTransactionActivityEnabled:g}=c,a=Ae.getSignedInUser(),j=t.tenantState.currentTenantId,v={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:j??""},I=Me(t),{selectedTransactionCategorizationTab:$}=I;return{expenseAutomationViewSelector:I,bulkUploadSelector:I.missingReceipts.bulkUpload,vendorSearchAutoCompleteData:A,authParams:v,receiptUploadEndpoint:`${ve.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${to}/transaction_attachments`,bulkUploadEndpoint:x===!0?`${ve.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:$,monthEndInsightsCustomerRequestData:y,monthEndInsightsPreviewMode:r,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:a,uncategorizedAccounts:w,companyId:m,isTransactionActivityEnabled:g,isAccountingClassesEnabled:Mn(t)}},function(t,c){const{themeState:w,isCOTEnabled:A,isUncategorizedExpenseCategoryEnabled:y,isMissingReceiptsBulkUploadEnabled:r,location:m,vendorSearchAutoCompleteData:x,expenseAutomationViewSelector:g,currentTenant:a,uncategorizedAccounts:j,navigate:v,onClickCustomerRequest:I,handleEditClick:$,setActivityLogTransactionId:S}=c,{selectedPeriod:k,currentSelectedView:L,reconciliation:{selectedAccountId:K}}=g,{accountSettingsView:d}=g.jeSchedules,p=bt(k),E=be(p.start),U=be(p.end);return{onZeniLogoClick:()=>{w.toggle()},onUploadReceiptAttachment:e=>{M.trackMissingReceiptAttached(k.month,k.year),t(xa(e))},onUploadTransactionReceipt:(e,n,o,s,C,h)=>{t(mt(e,n,{fetchState:"In-Progress"}));const f=()=>t(mt(e,n,{fetchState:"Error"}));no(`${ve.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,h,n,o,s,C).then(b=>{b!=null?t(wa(e,b)):f()}).catch(f)},onMissingReceiptsRowClick:(e,n)=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,n);const o=Q(m.state?.pathnameStackToGoBack,m.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Pa(e,n)),a!=null&&t(me({tenantId:a.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,o,s)=>{t(Aa(e,{fetchState:n,error:o})),o!=null&&t(dt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:s!=null?Eo+ko+s+gt:gt}]}))},onUpdateJESchedulesUIState:e=>{t(Ta(e))},onUpdateMissingReceiptsUIState:e=>{t(ba(e))},onFetchMissingReceiptsList:()=>{U!=null&&E!=null&&t(Pt({start:E,end:U},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(La(e))},onBulkUploadProgress:e=>{t(Ma(e))},onBulkUploadSuccess:e=>{t(ja({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Va(e))},onConfirmBulkUploadMatch:(e,n,o,s,C)=>{t(_a(e,n,o,s,C))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Fa())},onSetBulkUploadResultsTab:e=>{t(Ba(e))},onSetBulkUploadCompletedSubTab:e=>{t(Oa(e))},onSetBulkUploadSortConfig:(e,n)=>{t(ht({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Ua())},onSearchTransactionsForManualMatch:(e,n)=>{t(Ct(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=g.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Ct(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Da(e,n))},onFetchBulkUploadBatches:e=>{t(Tt(e))},onFetchMoreBatchDetails:()=>{t(Ra())},onResetBulkUploadSort:()=>{t(ht({sortKey:"date",sortOrder:"descending"}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(va())},onSearchTextChanged:e=>{const n=g.currentSelectedView,o=g.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Be({selectedTab:o,uiState:{searchString:e}})),U!=null&&E!=null&&t(ue(o,{start:E,end:U},!0,!1,e,void 0,!0)))},onRefresh:()=>{c.trackExpenseAutomationTabAnalytics(!0),t(ya(y))},onClose:()=>{L==="reconciliation"&&K!=null&&t(ut({selectedAccountId:void 0})),v("../")},onBack:()=>{L==="reconciliation"&&K!=null&&t(ut({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Ea(e))},onSaveReconciliationReview:e=>{t(ka(e))},onUpdateStep:e=>{const{selectedPeriod:n}=g,o=Q(m.state?.pathnameStackToGoBack,m.pathname);v(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:o,referrer:g.currentSelectedView}}),t(At(e))},handleLogOutClick:()=>{const e=Q(m.state?.pathnameStackToGoBack,m.pathname);v("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:o,fixedAssetsAccount:s,accruedExpensesAccount:C}=n,h=_e(d.prepaidExpensesAccountList,o.selectedOptions),f=_e(d.fixedAssetsAccountList,s.selectedOptions),b=_e(d.accruedExpensesAccountList,C.selectedOptions),z={selectedPrepaidExpensesAccountIds:h.map(O=>O.accountId),selectedFixedAssetsAccountIds:f.map(O=>O.accountId),selectedAccruedExpensesAccountIds:b.map(O=>O.accountId)};t(fa({data:z}))},onSaveJeAccountSettingsClick:()=>{t(Ia())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:o,accumulatedDepreciationCategory:s,scheduleClass:C,scheduleExpenseCategory:h,vendor:f}=n,{allAccountList:b,allClassList:z,allDepreciationAccountList:O}=g.jeSchedules,N=x.entityAutoCompleteView.vendor.length>0?x.entityAutoCompleteView.vendor.find(G=>G.id===f?.selectedOption):void 0,oe={id:N?.zeniId??f?.selectedOption??"",name:N?.name??f?.defaultOptions.find(G=>G.value===f?.selectedOption)?.label??"",logo:N?.logo},pe=h?.selectedOption!=null?b.find(G=>G.qboId===h.selectedOption):void 0,Pe=C?.selectedOption!=null?z.find(G=>G.classId===C.selectedOption):void 0,te=s?.selectedOption!=null?O.find(G=>G.qboId===s.selectedOption):void 0;t(Sa({scheduledJournalEntryID:e,localData:{jeScheduleID:o,scheduledJournalEntryID:e,updatedCategoryId:pe?.accountId,updatedClassId:Pe?.classId,updatedAccumulatedDepreciationCategoryID:te?.accountId,updatedVendor:{id:oe.id,name:oe.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Ca(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ct({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(ke("common"))},onCancelAutoComplete:()=>{t(ke("common"))}},onPostJESchedule(e,n){t(ga({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(pa())},handleJeScheduleClick:(e,n,o)=>{t(ha({selectedJEScheduleKey:n}));const s=Q(m.state?.pathnameStackToGoBack,m.pathname);v(`../../vendors/schedules/${o}/details/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{a!=null&&t(ma(e,a.companyId,a.tenantId))},onClickCustomerRequest:I,setActivityLogTransactionId:S,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(ua())},onOpenFileAttachmentSnackBar:()=>{t(dt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(da(e))},onUpdateFileAttachment:e=>{t(ra({files:e}))},previewMonthEndReport:(e,n,o,s)=>{a!=null&&t(rt(e,a.companyId,n,!0,o,s,a.tenantId))},saveMonthEndReport:(e,n,o,s)=>{a!=null&&t(rt(e,a.companyId,n,!1,o,s,a.tenantId))},onEditMonthEndInsightsClick:$,sendMonthEndReport:e=>{const n=m.state?.referrer,{selectedPeriod:o,auditSummary:s}=g;a!=null&&s?.auditScorePercentage!=null&&(t(ia(a.companyId,e,a.tenantId)),M.trackInsightsEmailPage(o.month,o.year,!1,"draft",s.auditScorePercentage,la().format(jt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,n);const o=Q(m.state?.pathnameStackToGoBack,m.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,o,s,C,h,f,b,z,O,N)=>{t(ca(e,n,o,s,j,C,h,f,b,z,O,N))},onCancelAutoComplete:()=>{t(ke("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(it({scrollPosition:e}))},onUpdateTab:e=>{c.closeSidePanel?.(),U!=null&&E!=null&&(t(ue(e,{start:E,end:U},!1,!1)),t(sa(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Be({selectedTab:e,uiState:n})),U!=null&&E!=null&&t(ue(e,{start:E,end:U},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Be({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,o,s,C,h,f)=>{U!=null&&E!=null&&t(ue(e,{start:E,end:U},!0,o,n,s,C,h,f))},resetTransactionCategorizationLocalData:(e,n,o,s,C,h,f,b)=>{t(oa(e,n,o,s,b??null,C,h,!1,f))},updateSelectedVendorForTransaction:(e,n,o,s,C)=>{t(lt({selectedTab:e,transactionId:n,lineId:o,selectedTransaction:s,uncategorizedAccounts:j,updatedVendor:C}))},onSaveUpdateTransactionCategorization:(e,n,o)=>{const s=m.state?.referrer;e==="autoCategorized"?M.trackTransactionsAutoCategorisedPage(k.month,k.year,g.transactionView.totalCountByTab.autoCategorized,n.length,!1,s??null):M.trackTransactionsReviewPage(k.month,k.year,g.transactionView.totalCountByTab.review,n.length,!1,s??null),t(aa(e,n,o,y))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(na({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,o,s,C,h,f)=>{const{transactionId:b,transaction:z,lineIds:O}=n;h!=null&&t(ea({transactionId:b,customerUpdates:h})),t(ta({selectedTab:s,transactionId:b.id,lineId:O[0],selectedTransaction:z,uncategorizedAccounts:j,updatedCustomer:h,selectedEntity:C,isUncategorizedExpenseCategoryEnabled:f})),C!=null&&t(Le(C,e,n,o,!0,A,f))},onFetchRecommendationsForEntityCategorization:(e,n,o,s,C,h,f)=>{const{transactionId:b,transaction:z,lineIds:O}=n;h!=null&&(t(Hn({transactionId:b,vendorUpdates:{name:h.name,id:h.id?h.id:void 0}})),t(Wn({vendorId:h.id?h.id:void 0,localData:{vendorName:h.name,vendorId:h.id?h.id:void 0}}))),h?.id?(t(lt({selectedTab:s,transactionId:b.id,lineId:O[0],selectedTransaction:z,uncategorizedAccounts:j,updatedVendor:h,selectedEntity:C,isUncategorizedExpenseCategoryEnabled:f})),C!=null&&t(Le(C,e,n,o,!0,A,f))):t(Xn({selectedTab:s,transactionId:b.id,lineId:O[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Ee(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Ee(k,!0,!1,null,!1,!1))},markAsReview:(e,n,o,s)=>{M.trackFluxAnalysisReviewed(o.month,o.year,s??!1,e),t(Qn(n,e,o,s??!1))},onUpdateFluxAnalysisUIState:e=>{t(Zn(e))},updateOperatingExpensesIdsForReview:e=>{t(Nn({operatingExpenseIds:e,selectedPeriod:k}))},redirectToVendorDetailPage:e=>{if(c.tenantEmailDomain!=null){const n=co(e.id,e.qboId,c.tenantEmailDomain),o=Q(c.location.state?.pathnameStackToGoBack,c.location.pathname);c.navigate(n,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Kn({sectionId:e,selectedPeriod:k}))},onFetchReimbursementView:(e,n,o)=>{t(Ee(e,!0,!1,n,!0,o))},onReviewClicked:e=>{t(ae(k,e))},setOpenDrawerClicked:e=>{t(je({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Rt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const o=a?.companyId;o!=null&&(t(wt(e,o,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(xt({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(je({selectedDrawerAccountId:e})),t(yt({accountId:e,selectedPeriod:k,localData:{accountSource:"bank_statement"}})),t(Et({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ae(k,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Yn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Jn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(qn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{c.closeSidePanel?.(),t(Gn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,o)=>{const s=e.vendor?.id;o&&s!=null&&t(zn(s)),t($n({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,vt("bill"));const n=Q(m.state?.pathnameStackToGoBack,m.pathname);v(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{v(-1)},onReconListPageScroll:e=>{t(it({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ct({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(ke("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Ln({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(ft({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(kt({accountId:e}))}}},(t,c,w)=>{const{isMissingReceiptsBulkUploadEnabled:A,...y}=w;return function(r,m,x){return{...r,...m,...x,onUploadTransactionReceipt:(g,a,j,v,I)=>{m.onUploadTransactionReceipt(g,a,j,v,I,r.authParams)}}}(t,c,y)})(eo),vo=oo(({closeSidePanel:t,openTransactionPanel:c,panelContent:w,sidePanelIsFullView:A,sidePanelIsOpen:y})=>{const{isAiCfoOpen:r,setIsAiCfoOpen:m}=Dt(),x=It(),g=Ve(),a=he(),{isAiCfoAccessEnabled:j,onAskAiCfoClick:v}=_t({isAiCfoOpen:r,setIsAiCfoOpen:m,mobileExploreReferrer:"Transaction categorization"}),{areTenantIdsInSync:I}=Ot(),$=(()=>{const i=V(q=>Me(q)),T=Ve(),{currentSelectedViewFetchState:D,currentSelectedView:F,selectedPeriod:R}=i,de=Fe(F),X=Fe(D.fetchState),Se=l.useCallback(q=>{const Z=T.state?.referrer;F==="transaction_categorization"&&(i.selectedTransactionCategorizationTab==="review"?M.trackTransactionsReviewPage(R.month,R.year,i.transactionView.totalCountByTab.review,0,q,Z??null):M.trackTransactionsAutoCategorisedPage(R.month,R.year,i.transactionView.totalCountByTab.autoCategorized,0,q,Z??null)),F==="missing_receipts"&&M.trackMissingReceiptsPage(R.month,R.year,q,i.missingReceipts.transactions.length,Z??null),F==="je_schedules"&&M.trackMonthCloseScheduleListPage(R.month,R.year,q,i.jeSchedules.draftSchedules.length,i.jeSchedules.resolveSchedules.length,Z??null),F==="flux_analysis"&&M.trackFluxAnalysisPage(R.month,R.year,q,fo(i.fluxAnalysis),Z??null),F==="month_end_insights"&&i.auditSummary?.auditScorePercentage!=null&&M.trackInsightsEmailPage(R.month,R.year,q,"draft",i.auditSummary.auditScorePercentage,null,Z??null)},[R,i]);return l.useEffect(()=>{X===D.fetchState&&F===de||D.fetchState!=="Completed"||Se(!1)},[F,D.fetchState,de]),Se})(),S=Ka(),[k,L]=l.useState(!1),K=V(i=>at(i)),d=V(i=>$e(i)),[p,E]=l.useState(!1),[U,e]=l.useState(!1),[n,o]=l.useState([]),[s,C]=l.useState(void 0),[h,f]=l.useState(!1),b=l.useRef(!1),{selectedTab:z}=nt(),{tenantEmailDomain:O}=nt(),[N,oe]=l.useState(g.state?.message==="comingFromTransactionDetail"),pe=g.state?.message==="comingFromOverview",Pe=Na(),te=Ae.getSignedInUser(),{useDynamicConfig:G,useFeatureGate:we}=Ut(),{configValue:Mt}=G(Za.enableUncategorizedExpenseCategory),H=Mt?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Ge}=we(ye.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:se}=we(ye.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:qe}=we(ye.isTransactionActivityEnabled),Lt=V(i=>xn(i,"common")),_=V(i=>Me(i)),{monthEndCloseChecksView:Y,currentSelectedView:B,selectedPeriod:P,selectedTransactionCategorizationTab:Je,currentSelectedViewBackgroundRefreshFetchState:zt,currentSelectedViewFetchState:W,jeSchedules:xe,reconciliation:$t}=_,{selectedAccountId:ce}=$t,Ye=Fe(xe.accountSettingsView.saveState.fetchState),Gt=V(i=>Rn(i.accountState,i.accountListState,"accountList")),ie=z!=null?Dn(z):B,qt=V(i=>i.entityAutoCompleteState.autoCompleteText.common);if(Vt({isDataReady:W.fetchState==="Completed"}),te==null)throw Error("Can't access expense automation screen without signing in...");const Ke=bt(P),le=be(Ke.start),re=be(Ke.end);if(le==null||re==null)throw Error(`Invalid start - ${le} and end - ${re} period from given ${P}`);const Jt=l.useCallback(()=>{E(!1)},[]),Yt=l.useCallback(()=>{e(!0)},[]),Kt=l.useCallback(i=>{o(i),e(!1)},[]),Nt=l.useCallback(()=>{o([])},[]),Re=`private-${te.userId}`,Ne="missing-receipts-batch-completed",ge=Qa();l.useEffect(()=>{if(ge==null||B!=="missing_receipts"||se===!1)return;const i=ge.channel(Re)??ge.subscribe(Re),T=D=>{a(jn({batchId:D.batch_id,progress:D.progress,status:D.status.toLowerCase()}))};return i.bind(Ne,T),()=>{i.unbind(Ne,T)}},[ge,B,Re,a,se]);const Ce=_.missingReceipts.bulkUpload.phase,Ze=_.missingReceipts.bulkUpload.currentBatchId;l.useEffect(()=>{B==="missing_receipts"&&Ce==="matching"&&Ze!=null&&a(Tt({cacheOverride:!0}))},[B,Ce,Ze,a]);const Qe=te?.userId,Zt=P.month,Qt=P.year,He=d?.tenantId;l.useEffect(()=>{B==="missing_receipts"&&se!==!1&&Ce==="idle"&&Qe!=null&&He!=null&&a(Un())},[B,se,Ce,Qe,He,Zt,Qt,a]),l.useEffect(()=>{K.newVendorState?.vendorDetailLocalData?.vendorName!=null?L(!0):L(!1)},[K.newVendorState?.vendorDetailLocalData?.vendorName]),l.useEffect(()=>{ie!=null&&B!==ie&&a(At(ie))},[ie]),l.useEffect(()=>{h!==!1||W.fetchState!=="Completed"&&W.fetchState!=="Error"||!I||(f(!0),a(ot(!1,!1,H)))},[h,W,I,H]),l.useEffect(()=>{!pe&&I&&(a(ot(!1,!1,H)),a(ae(P,ce,!1,!1)))},[P.month,P.year,I,H]);const We=l.useCallback((i=!1,T=!1)=>{const D={start:le,end:re};switch(B){case"transaction_categorization":a(ue(Je,D,i,!N,void 0,void 0,T,void 0,H)),oe(!1);break;case"flux_analysis":a(Ee(P,i,T,null));break;case"month_end_insights":if(T===!1){const F=new Date(P.year,P.month,0),R=Bn(F.toDateString()).format(jt.analytics.YYYYDashMMDashDDFormat);a(Fn(!0,d.companyId,d.tenantId,R)),a(_n(d.companyId,d.tenantId))}break;case"je_schedules":a(On(D,T));break;case"missing_receipts":a(Pt(D,{amount:75,currencyCode:"USD",currencySymbol:"$"},i,T));break;default:a(ae(P,ce,i,T))}},[B,le,re,d.companyId,d.tenantId,Je,P,ce,N,oe,H]);l.useEffect(()=>{B===ie&&W.fetchState==="Not-Started"&&I&&We(!0)},[W,le,re,d.companyId,d.tenantId,I]),l.useEffect(()=>{pe||N||b.current||zt.fetchState==="In-Progress"||W.fetchState!=="Completed"||(b.current=!0,We(!0,!0))},[]),l.useEffect(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState!=="Completed"&&a(me({tenantId:d.tenantId,period:P,refreshViewInBackground:!1}))},[Y.fetchState,d.tenantId]),l.useEffect(()=>{_.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?E(!0):E(!1)},[_.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),l.useEffect(()=>{_.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&I&&(a(me({tenantId:d.tenantId,period:P,refreshViewInBackground:!0})),a(Vn({companyId:d.companyId})),x("../"))},[_.monthEndInsights?.sendMonthEndReportStatus?.fetchState,d.tenantId,P,d.companyId,I]),l.useEffect(()=>{const i=setInterval(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState==="Completed"&&a(me({tenantId:d.tenantId,period:P,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(i)},[Y.fetchState,d.tenantId,P,a]),l.useEffect(()=>{const i=setInterval(()=>{B==="reconciliation"&&ce==null&&_.reconciliation.fetchStatus.fetchState==="Completed"&&_.reconciliation.refreshStatus.fetchState!=="In-Progress"&&a(ae(P,void 0,!0,!0))},3e5);return()=>clearInterval(i)},[B,a,_.reconciliation.fetchStatus.fetchState,_.reconciliation.refreshStatus.fetchState,ae,ce,P]);const Ht=pt();l.useEffect(()=>{const i=(Y.monthEndCloseChecks?.monthEndCloseCheckList.find(T=>T.id==="month_end_insights")?.isDisabled??!1)&&!Ge;B!=="month_end_insights"||!i&&Y.monthEndCloseChecks?.reportEmailSentDate==null||x("../")},[B,Y.monthEndCloseChecks]);const Wt=_.reconciliation.selectedDrawerAccountId;l.useEffect(()=>{Ye==="In-Progress"&&xe.accountSettingsView.saveState.fetchState==="Completed"&&a(st())},[Ye,xe.accountSettingsView.saveState.fetchState,st]);const{transactionId:Xe,onSaveVendor:Xt,onSaveSuccess:en,onCancel:tn,vendorViewDetails:nn}=(({expenseAutomationViewSelector:i,closeDrawerHandler:T,currentSelectedView:D})=>{const F=he();let R,de,X;const Se=pt(),q=i.transactionView;let Z=()=>{};const{transactions:an,selectedTransactionId:ne,selectedTransactionLineId:Ie,transactionLocalData:on}=q;if(D==="transaction_categorization"){const De=on.find(ee=>ee.transactionId===ne),J=an.find(ee=>ee.id===ne),et=Ie!=null?De?.transactionReviewLocalData?.lineItemById[Ie]:void 0,tt=et?.account;de=et?.class?.classId,R=["Uncategorized Income","Uncategorized Expense"].includes(tt?.accountName??"")?void 0:tt?.accountId;const cn=so(ne,J?.typeOfTransaction);J!=null&&cn&&(X={id:ne,type:vt(J.typeOfTransaction)}),Z=()=>{if(ne!=null&&Ie!=null&&J!=null){const ee=q.transactionLocalData.find(fe=>fe.transactionId===ne)?.transactionReviewLocalData;if(ee!=null&&J.lines!=null&&J.lines.length>0){const fe=ee.lineItemById[Ie];let Ue=ee.selectedEntity;if(wn(J)||(Ue=fe.selectedEntityLine),Ue!=null){const ln=Ue,rn={transactionId:{id:J.id,type:J.type},transaction:J,lineIds:J.lines.map(dn=>dn.id)??[]};F(Le(ln,fe.amount.amount,rn,!1,!0,Se))}}}}}const sn=V(De=>at(De,void 0,R,de));return{transactionId:X,onSaveVendor:()=>{F(Pn(X,void 0,!1,!0))},onSaveSuccess:Z,onCancel:()=>{X!=null&&F(bn({transactionId:X})),F(Tn()),F(An()),T()},vendorViewDetails:sn}})({expenseAutomationViewSelector:_,closeDrawerHandler:()=>{L(!1)},currentSelectedView:B});return Pe?.loggedInUserRoleMap==null?Y.fetchState==="Error"?u.jsx(Ha,{onGoHome:()=>x("../",{replace:!0}),onReload:()=>window.location.reload()}):u.jsx(Ft,{fetchState:"In-Progress"}):u.jsxs(u.Fragment,{children:[u.jsx(io,{isOpen:U,drawerLeftMargin:new Wa(0,0,300,650),onClose:()=>{e(!1)},children:u.jsx(bo,{onClick:i=>i.stopPropagation(),children:u.jsx(po,{companyId:d.companyId,closeCustomerRequestDrawer:()=>e(!1),addCustomerRequest:Kt,resetCustomerRequest:Nt})})}),Xe!=null&&k&&u.jsx(ao,{isOpen:k,transactionId:Xe,onSaveVendor:Xt,onSaveSuccess:en,onCancel:tn,vendorViewDetails:nn}),u.jsx(mo,{selectedDrawerAccountId:Wt,reconciliation:_.reconciliation,onFetchLinkTokenClick:(i,T)=>{a(Rt("expense_automation_reconcile",i,T))},onEstablishConnectionClick:(i,T)=>{const D=d?.companyId;D!=null&&(a(wt(i,D,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",T)),a(xt({accountId:T,connectionInProgress:!0})))}}),qe&&u.jsx(So,{selectedTransactionId:s,onClose:()=>C(void 0)}),u.jsx(yo,{navigate:x,location:g,themeState:S,vendorSearchAutoCompleteData:{autoCompleteText:qt,entityAutoCompleteView:Lt},expenseAutomationViewSelector:_,isMissingReceiptsBulkUploadEnabled:se,monthEndInsightsPreviewMode:p,monthEndInsightsCustomerRequestData:n,isRealtimeInsightsFeatureEnabled:Ge,isUncategorizedExpenseCategoryEnabled:H,isCOTEnabled:Ht,currentTenant:d,companyId:d.companyId,signedInUser:te,isTransactionActivityEnabled:qe,uncategorizedAccounts:Gt,onClickCustomerRequest:Yt,handleEditClick:Jt,tenantEmailDomain:O,trackExpenseAutomationTabAnalytics:$,setActivityLogTransactionId:C,closeSidePanel:t,openTransactionPanel:c,sidePanelIsOpen:y,sidePanelIsFullView:A,panelContent:w,isAiCfoAccessEnabled:j,onAskAiCfoClick:v})]})}),bo=Te(ze)`
|
|
16
|
+
`,fo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:ko,comma:gt,space:Eo}},dateFormat:Mt}=Xa.getLocalizedStrings(),Ct=za,yo=mn(function(t,c){const{uncategorizedAccounts:w,vendorSearchAutoCompleteData:A,monthEndInsightsCustomerRequestData:y,monthEndInsightsPreviewMode:r,companyId:m,isMissingReceiptsBulkUploadEnabled:x,isTransactionActivityEnabled:g}=c,a=Ae.getSignedInUser(),M=t.tenantState.currentTenantId,v={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:M??""},I=je(t),{selectedTransactionCategorizationTab:$}=I;return{expenseAutomationViewSelector:I,bulkUploadSelector:I.missingReceipts.bulkUpload,vendorSearchAutoCompleteData:A,authParams:v,receiptUploadEndpoint:`${ve.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${to}/transaction_attachments`,bulkUploadEndpoint:x===!0?`${ve.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:$,monthEndInsightsCustomerRequestData:y,monthEndInsightsPreviewMode:r,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:a,uncategorizedAccounts:w,companyId:m,isTransactionActivityEnabled:g,isAccountingClassesEnabled:jn(t)}},function(t,c){const{themeState:w,isCOTEnabled:A,isUncategorizedExpenseCategoryEnabled:y,isMissingReceiptsBulkUploadEnabled:r,location:m,vendorSearchAutoCompleteData:x,expenseAutomationViewSelector:g,currentTenant:a,uncategorizedAccounts:M,navigate:v,onClickCustomerRequest:I,handleEditClick:$,setActivityLogTransactionId:S}=c,{selectedPeriod:k,currentSelectedView:L,reconciliation:{selectedAccountId:N}}=g,{accountSettingsView:d}=g.jeSchedules,p=bt(k),E=be(p.start),U=be(p.end);return{onZeniLogoClick:()=>{w.toggle()},onUploadReceiptAttachment:e=>{j.trackMissingReceiptAttached(k.month,k.year),t(xa(e))},onUploadTransactionReceipt:(e,n,o,s,C,h)=>{t(mt(e,n,{fetchState:"In-Progress"}));const f=()=>t(mt(e,n,{fetchState:"Error"}));no(`${ve.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,h,n,o,s,C).then(b=>{b!=null?t(wa(e,b)):f()}).catch(f)},onMissingReceiptsRowClick:(e,n)=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,n);const o=H(m.state?.pathnameStackToGoBack,m.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Pa(e,n)),a!=null&&t(me({tenantId:a.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,o,s)=>{t(Aa(e,{fetchState:n,error:o})),o!=null&&t(dt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:s!=null?Eo+ko+s+gt:gt}]}))},onUpdateJESchedulesUIState:e=>{t(Ta(e))},onUpdateMissingReceiptsUIState:e=>{t(ba(e))},onFetchMissingReceiptsList:()=>{U!=null&&E!=null&&t(Pt({start:E,end:U},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(La(e))},onBulkUploadProgress:e=>{t(ja(e))},onBulkUploadSuccess:e=>{t(Ma({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Va(e))},onConfirmBulkUploadMatch:(e,n,o,s,C)=>{t(_a(e,n,o,s,C))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Fa())},onSetBulkUploadResultsTab:e=>{t(Oa(e))},onSetBulkUploadCompletedSubTab:e=>{t(Ba(e))},onSetBulkUploadSortConfig:(e,n)=>{t(ht({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Ua())},onSearchTransactionsForManualMatch:(e,n)=>{t(Ct(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=g.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Ct(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Da(e,n))},onFetchBulkUploadBatches:e=>{t(Tt(e))},onFetchMoreBatchDetails:()=>{t(Ra())},onResetBulkUploadSort:()=>{t(ht({sortKey:"date",sortOrder:"descending"}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(va())},onSearchTextChanged:e=>{const n=g.currentSelectedView,o=g.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Oe({selectedTab:o,uiState:{searchString:e}})),U!=null&&E!=null&&t(ue(o,{start:E,end:U},!0,!1,e,void 0,!0)))},onRefresh:()=>{c.trackExpenseAutomationTabAnalytics(!0),t(ya(y))},onClose:()=>{L==="reconciliation"&&N!=null&&t(ut({selectedAccountId:void 0})),v("../")},onBack:()=>{L==="reconciliation"&&N!=null&&t(ut({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Ea(e))},onSaveReconciliationReview:e=>{t(ka(e))},onUpdateStep:e=>{const{selectedPeriod:n}=g,o=H(m.state?.pathnameStackToGoBack,m.pathname);v(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:o,referrer:g.currentSelectedView}}),t(At(e))},handleLogOutClick:()=>{const e=H(m.state?.pathnameStackToGoBack,m.pathname);v("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:o,fixedAssetsAccount:s,accruedExpensesAccount:C}=n,h=_e(d.prepaidExpensesAccountList,o.selectedOptions),f=_e(d.fixedAssetsAccountList,s.selectedOptions),b=_e(d.accruedExpensesAccountList,C.selectedOptions),z={selectedPrepaidExpensesAccountIds:h.map(B=>B.accountId),selectedFixedAssetsAccountIds:f.map(B=>B.accountId),selectedAccruedExpensesAccountIds:b.map(B=>B.accountId)};t(fa({data:z}))},onSaveJeAccountSettingsClick:()=>{t(Ia())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:o,accumulatedDepreciationCategory:s,scheduleClass:C,scheduleExpenseCategory:h,vendor:f}=n,{allAccountList:b,allClassList:z,allDepreciationAccountList:B}=g.jeSchedules,K=x.entityAutoCompleteView.vendor.length>0?x.entityAutoCompleteView.vendor.find(G=>G.id===f?.selectedOption):void 0,oe={id:K?.zeniId??f?.selectedOption??"",name:K?.name??f?.defaultOptions.find(G=>G.value===f?.selectedOption)?.label??"",logo:K?.logo},pe=h?.selectedOption!=null?b.find(G=>G.qboId===h.selectedOption):void 0,Pe=C?.selectedOption!=null?z.find(G=>G.classId===C.selectedOption):void 0,te=s?.selectedOption!=null?B.find(G=>G.qboId===s.selectedOption):void 0;t(Sa({scheduledJournalEntryID:e,localData:{jeScheduleID:o,scheduledJournalEntryID:e,updatedCategoryId:pe?.accountId,updatedClassId:Pe?.classId,updatedAccumulatedDepreciationCategoryID:te?.accountId,updatedVendor:{id:oe.id,name:oe.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Ca(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ct({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(ke("common"))},onCancelAutoComplete:()=>{t(ke("common"))}},onPostJESchedule(e,n){t(ga({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(pa())},handleJeScheduleClick:(e,n,o)=>{t(ha({selectedJEScheduleKey:n}));const s=H(m.state?.pathnameStackToGoBack,m.pathname);v(`../../vendors/schedules/${o}/details/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{a!=null&&t(ma(e,a.companyId,a.tenantId))},onClickCustomerRequest:I,setActivityLogTransactionId:S,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(ua())},onOpenFileAttachmentSnackBar:()=>{t(dt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(da(e))},onUpdateFileAttachment:e=>{t(ra({files:e}))},previewMonthEndReport:(e,n,o,s)=>{a!=null&&t(rt(e,a.companyId,n,!0,o,s,a.tenantId))},saveMonthEndReport:(e,n,o,s)=>{a!=null&&t(rt(e,a.companyId,n,!1,o,s,a.tenantId))},onEditMonthEndInsightsClick:$,sendMonthEndReport:e=>{const n=m.state?.referrer,{selectedPeriod:o,auditSummary:s}=g;a!=null&&s?.auditScorePercentage!=null&&(t(ia(a.companyId,e,a.tenantId)),j.trackInsightsEmailPage(o.month,o.year,!1,"draft",s.auditScorePercentage,la().format(Mt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,n);const o=H(m.state?.pathnameStackToGoBack,m.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,o,s,C,h,f,b,z,B,K)=>{t(ca(e,n,o,s,M,C,h,f,b,z,B,K))},onCancelAutoComplete:()=>{t(ke("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(it({scrollPosition:e}))},onUpdateTab:e=>{c.closeSidePanel?.(),U!=null&&E!=null&&(t(ue(e,{start:E,end:U},!1,!1)),t(sa(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Oe({selectedTab:e,uiState:n})),U!=null&&E!=null&&t(ue(e,{start:E,end:U},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Oe({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,o,s,C,h,f)=>{U!=null&&E!=null&&t(ue(e,{start:E,end:U},!0,o,n,s,C,h,f))},resetTransactionCategorizationLocalData:(e,n,o,s,C,h,f,b)=>{t(oa(e,n,o,s,b??null,C,h,!1,f))},updateSelectedVendorForTransaction:(e,n,o,s,C)=>{t(lt({selectedTab:e,transactionId:n,lineId:o,selectedTransaction:s,uncategorizedAccounts:M,updatedVendor:C}))},onSaveUpdateTransactionCategorization:(e,n,o)=>{const s=m.state?.referrer;e==="autoCategorized"?j.trackTransactionsAutoCategorisedPage(k.month,k.year,g.transactionView.totalCountByTab.autoCategorized,n.length,!1,s??null):j.trackTransactionsReviewPage(k.month,k.year,g.transactionView.totalCountByTab.review,n.length,!1,s??null),t(aa(e,n,o,y))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(na({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,o,s,C,h,f)=>{const{transactionId:b,transaction:z,lineIds:B}=n;h!=null&&t(ea({transactionId:b,customerUpdates:h})),t(ta({selectedTab:s,transactionId:b.id,lineId:B[0],selectedTransaction:z,uncategorizedAccounts:M,updatedCustomer:h,selectedEntity:C,isUncategorizedExpenseCategoryEnabled:f})),C!=null&&t(Le(C,e,n,o,!0,A,f))},onFetchRecommendationsForEntityCategorization:(e,n,o,s,C,h,f)=>{const{transactionId:b,transaction:z,lineIds:B}=n;h!=null&&(t(Qn({transactionId:b,vendorUpdates:{name:h.name,id:h.id?h.id:void 0}})),t(Wn({vendorId:h.id?h.id:void 0,localData:{vendorName:h.name,vendorId:h.id?h.id:void 0}}))),h?.id?(t(lt({selectedTab:s,transactionId:b.id,lineId:B[0],selectedTransaction:z,uncategorizedAccounts:M,updatedVendor:h,selectedEntity:C,isUncategorizedExpenseCategoryEnabled:f})),C!=null&&t(Le(C,e,n,o,!0,A,f))):t(Xn({selectedTab:s,transactionId:b.id,lineId:B[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Ee(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Ee(k,!0,!1,null,!1,!1))},markAsReview:(e,n,o,s)=>{j.trackFluxAnalysisReviewed(o.month,o.year,s??!1,e),t(Hn(n,e,o,s??!1))},onUpdateFluxAnalysisUIState:e=>{t(Zn(e))},updateOperatingExpensesIdsForReview:e=>{t(Kn({operatingExpenseIds:e,selectedPeriod:k}))},redirectToVendorDetailPage:e=>{if(c.tenantEmailDomain!=null){const n=co(e.id,e.qboId,c.tenantEmailDomain),o=H(c.location.state?.pathnameStackToGoBack,c.location.pathname);c.navigate(n,{state:{pathnameStackToGoBack:o,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Nn({sectionId:e,selectedPeriod:k}))},onFetchReimbursementView:(e,n,o)=>{t(Ee(e,!0,!1,n,!0,o))},onReviewClicked:e=>{t(ae(k,e))},setOpenDrawerClicked:e=>{t(Me({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Rt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const o=a?.companyId;o!=null&&(t(wt(e,o,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(xt({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(Me({selectedDrawerAccountId:e})),t(yt({accountId:e,selectedPeriod:k,localData:{accountSource:"bank_statement"}})),t(Et({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ae(k,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Yn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Jn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(qn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{c.closeSidePanel?.(),t(Gn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,o)=>{const s=e.vendor?.id;o&&s!=null&&t(zn(s)),t($n({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(c.openTransactionPanel)return void c.openTransactionPanel(e,vt("bill"));const n=H(m.state?.pathnameStackToGoBack,m.pathname);v(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{v(-1)},onReconListPageScroll:e=>{t(it({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ct({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(ke("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Ln({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(ft({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(kt({accountId:e}))}}},(t,c,w)=>{const{isMissingReceiptsBulkUploadEnabled:A,...y}=w;return function(r,m,x){return{...r,...m,...x,onUploadTransactionReceipt:(g,a,M,v,I)=>{m.onUploadTransactionReceipt(g,a,M,v,I,r.authParams)}}}(t,c,y)})(eo),vo=oo(({closeSidePanel:t,openTransactionPanel:c,panelContent:w,sidePanelIsFullView:A,sidePanelIsOpen:y})=>{const{isAiCfoOpen:r,setIsAiCfoOpen:m}=Dt(),x=It(),g=Ve(),a=he(),{isAiCfoAccessEnabled:M,onAskAiCfoClick:v}=_t({isAiCfoOpen:r,setIsAiCfoOpen:m,mobileExploreReferrer:"Transaction categorization"}),{areTenantIdsInSync:I}=Bt(),$=(()=>{const i=V(q=>je(q)),T=Ve(),{currentSelectedViewFetchState:D,currentSelectedView:F,selectedPeriod:R}=i,de=Fe(F),X=Fe(D.fetchState),Se=l.useCallback(q=>{const Z=T.state?.referrer;F==="transaction_categorization"&&(i.selectedTransactionCategorizationTab==="review"?j.trackTransactionsReviewPage(R.month,R.year,i.transactionView.totalCountByTab.review,0,q,Z??null):j.trackTransactionsAutoCategorisedPage(R.month,R.year,i.transactionView.totalCountByTab.autoCategorized,0,q,Z??null)),F==="missing_receipts"&&j.trackMissingReceiptsPage(R.month,R.year,q,i.missingReceipts.transactions.length,Z??null),F==="je_schedules"&&j.trackMonthCloseScheduleListPage(R.month,R.year,q,i.jeSchedules.draftSchedules.length,i.jeSchedules.resolveSchedules.length,Z??null),F==="flux_analysis"&&j.trackFluxAnalysisPage(R.month,R.year,q,fo(i.fluxAnalysis),Z??null),F==="month_end_insights"&&i.auditSummary?.auditScorePercentage!=null&&j.trackInsightsEmailPage(R.month,R.year,q,"draft",i.auditSummary.auditScorePercentage,null,Z??null)},[R,i]);return l.useEffect(()=>{X===D.fetchState&&F===de||D.fetchState!=="Completed"||Se(!1)},[F,D.fetchState,de]),Se})(),S=Na(),[k,L]=l.useState(!1),N=V(i=>at(i)),d=V(i=>$e(i)),[p,E]=l.useState(!1),[U,e]=l.useState(!1),[n,o]=l.useState([]),[s,C]=l.useState(void 0),[h,f]=l.useState(!1),b=l.useRef(!1),{selectedTab:z}=nt(),{tenantEmailDomain:B}=nt(),[K,oe]=l.useState(g.state?.message==="comingFromTransactionDetail"),pe=g.state?.message==="comingFromOverview",Pe=Ka(),te=Ae.getSignedInUser(),{useDynamicConfig:G,useFeatureGate:we}=Ut(),{configValue:jt}=G(Za.enableUncategorizedExpenseCategory),Q=jt?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Ge}=we(ye.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:se}=we(ye.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:qe}=we(ye.isTransactionActivityEnabled),Lt=V(i=>xn(i,"common")),_=V(i=>je(i)),{monthEndCloseChecksView:Y,currentSelectedView:O,selectedPeriod:P,selectedTransactionCategorizationTab:Je,currentSelectedViewBackgroundRefreshFetchState:zt,currentSelectedViewFetchState:W,jeSchedules:xe,reconciliation:$t}=_,{selectedAccountId:ce}=$t,Ye=Fe(xe.accountSettingsView.saveState.fetchState),Gt=V(i=>Rn(i.accountState,i.accountListState,"accountList")),ie=z!=null?Dn(z):O,qt=V(i=>i.entityAutoCompleteState.autoCompleteText.common);if(Vt({isDataReady:W.fetchState==="Completed"}),te==null)throw Error("Can't access expense automation screen without signing in...");const Ne=bt(P),le=be(Ne.start),re=be(Ne.end);if(le==null||re==null)throw Error(`Invalid start - ${le} and end - ${re} period from given ${P}`);const Jt=l.useCallback(()=>{E(!1)},[]),Yt=l.useCallback(()=>{e(!0)},[]),Nt=l.useCallback(i=>{o(i),e(!1)},[]),Kt=l.useCallback(()=>{o([])},[]),Re=`private-${te.userId}`,Ke="missing-receipts-batch-completed",ge=Ha();l.useEffect(()=>{if(ge==null||O!=="missing_receipts"||se===!1)return;const i=ge.channel(Re)??ge.subscribe(Re),T=D=>{a(Mn({batchId:D.batch_id,progress:D.progress,status:D.status.toLowerCase()}))};return i.bind(Ke,T),()=>{i.unbind(Ke,T)}},[ge,O,Re,a,se]);const Ce=_.missingReceipts.bulkUpload.phase,Ze=_.missingReceipts.bulkUpload.currentBatchId;l.useEffect(()=>{O==="missing_receipts"&&Ce==="matching"&&Ze!=null&&a(Tt({cacheOverride:!0}))},[O,Ce,Ze,a]);const He=te?.userId,Zt=P.month,Ht=P.year,Qe=d?.tenantId;l.useEffect(()=>{O==="missing_receipts"&&se!==!1&&Ce==="idle"&&He!=null&&Qe!=null&&a(Un())},[O,se,Ce,He,Qe,Zt,Ht,a]),l.useEffect(()=>{N.newVendorState?.vendorDetailLocalData?.vendorName!=null?L(!0):L(!1)},[N.newVendorState?.vendorDetailLocalData?.vendorName]),l.useEffect(()=>{ie!=null&&O!==ie&&a(At(ie))},[ie]),l.useEffect(()=>{h!==!1||W.fetchState!=="Completed"&&W.fetchState!=="Error"||!I||(f(!0),a(ot(!1,!1,Q)))},[h,W,I,Q]),l.useEffect(()=>{!pe&&I&&(a(ot(!1,!1,Q)),a(ae(P,ce,!1,!1)))},[P.month,P.year,I,Q]);const We=l.useCallback((i=!1,T=!1)=>{const D={start:le,end:re};switch(O){case"transaction_categorization":a(ue(Je,D,i,!K,void 0,void 0,T,void 0,Q)),oe(!1);break;case"flux_analysis":a(Ee(P,i,T,null));break;case"month_end_insights":if(T===!1){const F=new Date(P.year,P.month,0),R=On(F.toDateString()).format(Mt.analytics.YYYYDashMMDashDDFormat);a(Fn(!0,d.companyId,d.tenantId,R)),a(_n(d.companyId,d.tenantId))}break;case"je_schedules":a(Bn(D,T));break;case"missing_receipts":a(Pt(D,{amount:75,currencyCode:"USD",currencySymbol:"$"},i,T));break;default:a(ae(P,ce,i,T))}},[O,le,re,d.companyId,d.tenantId,Je,P,ce,K,oe,Q]);l.useEffect(()=>{O===ie&&W.fetchState==="Not-Started"&&I&&We(!0)},[W,le,re,d.companyId,d.tenantId,I]),l.useEffect(()=>{pe||K||b.current||zt.fetchState==="In-Progress"||W.fetchState!=="Completed"||(b.current=!0,We(!0,!0))},[]),l.useEffect(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState!=="Completed"&&a(me({tenantId:d.tenantId,period:P,refreshViewInBackground:!1}))},[Y.fetchState,d.tenantId]),l.useEffect(()=>{_.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?E(!0):E(!1)},[_.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),l.useEffect(()=>{_.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&I&&(a(me({tenantId:d.tenantId,period:P,refreshViewInBackground:!0})),a(Vn({companyId:d.companyId})),x("../"))},[_.monthEndInsights?.sendMonthEndReportStatus?.fetchState,d.tenantId,P,d.companyId,I]),l.useEffect(()=>{const i=setInterval(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState==="Completed"&&a(me({tenantId:d.tenantId,period:P,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(i)},[Y.fetchState,d.tenantId,P,a]),l.useEffect(()=>{const i=setInterval(()=>{O==="reconciliation"&&ce==null&&_.reconciliation.fetchStatus.fetchState==="Completed"&&_.reconciliation.refreshStatus.fetchState!=="In-Progress"&&a(ae(P,void 0,!0,!0))},3e5);return()=>clearInterval(i)},[O,a,_.reconciliation.fetchStatus.fetchState,_.reconciliation.refreshStatus.fetchState,ae,ce,P]);const Qt=pt();l.useEffect(()=>{const i=(Y.monthEndCloseChecks?.monthEndCloseCheckList.find(T=>T.id==="month_end_insights")?.isDisabled??!1)&&!Ge;O!=="month_end_insights"||!i&&Y.monthEndCloseChecks?.reportEmailSentDate==null||x("../")},[O,Y.monthEndCloseChecks]);const Wt=_.reconciliation.selectedDrawerAccountId;l.useEffect(()=>{Ye==="In-Progress"&&xe.accountSettingsView.saveState.fetchState==="Completed"&&a(st())},[Ye,xe.accountSettingsView.saveState.fetchState,st]);const{transactionId:Xe,onSaveVendor:Xt,onSaveSuccess:en,onCancel:tn,vendorViewDetails:nn}=(({expenseAutomationViewSelector:i,closeDrawerHandler:T,currentSelectedView:D})=>{const F=he();let R,de,X;const Se=pt(),q=i.transactionView;let Z=()=>{};const{transactions:an,selectedTransactionId:ne,selectedTransactionLineId:Ie,transactionLocalData:on}=q;if(D==="transaction_categorization"){const De=on.find(ee=>ee.transactionId===ne),J=an.find(ee=>ee.id===ne),et=Ie!=null?De?.transactionReviewLocalData?.lineItemById[Ie]:void 0,tt=et?.account;de=et?.class?.classId,R=["Uncategorized Income","Uncategorized Expense"].includes(tt?.accountName??"")?void 0:tt?.accountId;const cn=so(ne,J?.typeOfTransaction);J!=null&&cn&&(X={id:ne,type:vt(J.typeOfTransaction)}),Z=()=>{if(ne!=null&&Ie!=null&&J!=null){const ee=q.transactionLocalData.find(fe=>fe.transactionId===ne)?.transactionReviewLocalData;if(ee!=null&&J.lines!=null&&J.lines.length>0){const fe=ee.lineItemById[Ie];let Ue=ee.selectedEntity;if(wn(J)||(Ue=fe.selectedEntityLine),Ue!=null){const ln=Ue,rn={transactionId:{id:J.id,type:J.type},transaction:J,lineIds:J.lines.map(dn=>dn.id)??[]};F(Le(ln,fe.amount.amount,rn,!1,!0,Se))}}}}}const sn=V(De=>at(De,void 0,R,de));return{transactionId:X,onSaveVendor:()=>{F(Pn(X,void 0,!1,!0))},onSaveSuccess:Z,onCancel:()=>{X!=null&&F(bn({transactionId:X})),F(Tn()),F(An()),T()},vendorViewDetails:sn}})({expenseAutomationViewSelector:_,closeDrawerHandler:()=>{L(!1)},currentSelectedView:O});return Pe?.loggedInUserRoleMap==null?Y.fetchState==="Error"?u.jsx(Qa,{onGoHome:()=>x("../",{replace:!0}),onReload:()=>window.location.reload()}):u.jsx(Ft,{fetchState:"In-Progress"}):u.jsxs(u.Fragment,{children:[u.jsx(io,{isOpen:U,drawerLeftMargin:new Wa(0,0,300,650),onClose:()=>{e(!1)},children:u.jsx(bo,{onClick:i=>i.stopPropagation(),children:u.jsx(po,{companyId:d.companyId,closeCustomerRequestDrawer:()=>e(!1),addCustomerRequest:Nt,resetCustomerRequest:Kt})})}),Xe!=null&&k&&u.jsx(ao,{isOpen:k,transactionId:Xe,onSaveVendor:Xt,onSaveSuccess:en,onCancel:tn,vendorViewDetails:nn}),u.jsx(mo,{selectedDrawerAccountId:Wt,reconciliation:_.reconciliation,onFetchLinkTokenClick:(i,T)=>{a(Rt("expense_automation_reconcile",i,T))},onEstablishConnectionClick:(i,T)=>{const D=d?.companyId;D!=null&&(a(wt(i,D,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",T)),a(xt({accountId:T,connectionInProgress:!0})))}}),qe&&u.jsx(So,{selectedTransactionId:s,onClose:()=>C(void 0)}),u.jsx(yo,{navigate:x,location:g,themeState:S,vendorSearchAutoCompleteData:{autoCompleteText:qt,entityAutoCompleteView:Lt},expenseAutomationViewSelector:_,isMissingReceiptsBulkUploadEnabled:se,monthEndInsightsPreviewMode:p,monthEndInsightsCustomerRequestData:n,isRealtimeInsightsFeatureEnabled:Ge,isUncategorizedExpenseCategoryEnabled:Q,isCOTEnabled:Qt,currentTenant:d,companyId:d.companyId,signedInUser:te,isTransactionActivityEnabled:qe,uncategorizedAccounts:Gt,onClickCustomerRequest:Yt,handleEditClick:Jt,tenantEmailDomain:B,trackExpenseAutomationTabAnalytics:$,setActivityLogTransactionId:C,closeSidePanel:t,openTransactionPanel:c,sidePanelIsOpen:y,sidePanelIsFullView:A,panelContent:w,isAiCfoAccessEnabled:M,onAskAiCfoClick:v})]})}),bo=Te(ze)`
|
|
17
17
|
display: flex;
|
|
18
18
|
min-height: 100%;
|
|
19
19
|
flex-direction: column;
|
|
20
|
-
`;function Zo(){return u.jsxs(hn,{children:[u.jsx(
|
|
20
|
+
`;function Zo(){return u.jsxs(hn,{children:[u.jsx(Be,{path:"*",element:u.jsx(lo,{})}),u.jsx(Be,{path:"/:selectedTab/:selectedPeriod/*",element:u.jsx(vo,{})}),u.jsx(Be,{path:"*",element:u.jsx(un,{})})]})}export{Zo as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-CGYIz1sf.js";import{a as r}from"./sentry-ClGNqxTu.js";import{W as c,X as i,Y as l,q as p}from"./index-DO3Ev_EW.js";import"./mui-COKu087d.js";import m from"./NotFoundScreen-BOOShTFL.js";import{j as u,u as b}from"./core--8kDo-LJ.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]="adffae9f-52bc-4220-8365-cd49cb24872a",e._sentryDebugIdIdentifier="sentry-dbid-adffae9f-52bc-4220-8365-cd49cb24872a")}catch{}})();const D=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=p(a.state?.pathnameStackToGoBack),f=n.poppedPathname??k();e(f,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(a.pathname);return o!=null?s.jsx(i,{menuItem:l(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{D as F};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-CGYIz1sf.js";import{l as w,k as x,j,u as y,h as Y,q as ee,g as A,N as te,n as ae,o as p}from"./core--8kDo-LJ.js";import{Iu as S,Iv as k,Iw as N,yQ as $,yC as L,Ix as C,Iy as ne,Iz as oe,yG as ie,eN as I,yN as se,yK as le}from"./zeni-epic-state-Cb3mJiT_.js";import{J as g,o as r,p as re,d as v,k as E,H as de,q as ce,B as me,r as F,i as pe,s as ue,E as he,Z as xe,h as ge,v as fe,O as be,m as we,w as ye,x as Se,A as ke,F as ve}from"./index-DO3Ev_EW.js";import{n as c}from"./mui-COKu087d.js";import f from"./NotFoundScreen-BOOShTFL.js";import{a as P}from"./sentry-ClGNqxTu.js";import"./recharts-jENt1xXk.js";import"./analytics-D76TbnBG.js";import"./plaid-DzMABTsR.js";import"./dnd-C7FILogn.js";import"./stripe-DMRn4zHo.js";import"./lottie-BwZdyUox.js";import"./lexical-roIufkFt.js";import"./pdf-CBQkrKS2.js";import"./utils-C9gYeSwW.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]="6e8dc9a7-7b2e-4d1e-bc26-3ea85b469ecf",e._sentryDebugIdIdentifier="sentry-dbid-6e8dc9a7-7b2e-4d1e-bc26-3ea85b469ecf")}catch{}})();const Ie=c.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -7,7 +7,7 @@ import{j as t}from"./liveblocks-BOEQeN-H.js";import{l as w,k as x,j,u as y,h as
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
9
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
-
`,je=x(function(e){const a=S(e),n=k(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:i=>{e(L(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e($(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(
|
|
10
|
+
`,je=x(function(e){const a=S(e),n=k(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:i=>{e(L(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e($(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(N({data:l}))}}})(re);function z(){const e=g(),{vendorId:a,billId:n}=w();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(je,{vendorId:a,billId:n})})})}const $e=c.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
height: 100vh;
|
|
13
13
|
width: 100%;
|
|
@@ -16,7 +16,7 @@ import{j as t}from"./liveblocks-BOEQeN-H.js";import{l as w,k as x,j,u as y,h as
|
|
|
16
16
|
align-items: center;
|
|
17
17
|
background-color: ${e=>e.theme.colors.grey4};
|
|
18
18
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
-
`,Ce=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:C(e),googleAPIKey:E.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,i=()=>{const l=ce(o.state?.pathnameStackToGoBack),s=l.poppedPathname??De();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Ae(l);e(ne({addressToCreate:s})),i()},onCancel:()=>{i()}}})(de);function Be({isSubPage:e}){const a=j(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx($e,{windowSize:o,children:t.jsx(Ce,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:E.googleMapsAPIKey})})})}const De=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Ae=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),
|
|
19
|
+
`,Ce=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:C(e),googleAPIKey:E.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,i=()=>{const l=ce(o.state?.pathnameStackToGoBack),s=l.poppedPathname??De();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Ae(l);e(ne({addressToCreate:s})),i()},onCancel:()=>{i()}}})(de);function Be({isSubPage:e}){const a=j(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx($e,{windowSize:o,children:t.jsx(Ce,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:E.googleMapsAPIKey})})})}const De=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Ae=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Pe=c.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
height: 100%;
|
|
22
22
|
width: 100%;
|
|
@@ -25,7 +25,7 @@ import{j as t}from"./liveblocks-BOEQeN-H.js";import{l as w,k as x,j,u as y,h as
|
|
|
25
25
|
align-items: center;
|
|
26
26
|
background-color: ${e=>e.theme.colors.grey4};
|
|
27
27
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
-
`,
|
|
28
|
+
`,ze=x(function(e){const a=S(e),n=k(e),o=C(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankName:s=>{e(L(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(N({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(me);function Ne(){const e=j(),a=y(),n=g(),{vendorId:o,billId:i}=w();return o==null||i==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Pe,{windowSize:n,children:t.jsx(ze,{location:a,navigate:e,vendorId:o,billId:i})})})}const Le=c.div`
|
|
29
29
|
display: flex;
|
|
30
30
|
height: 100%;
|
|
31
31
|
width: 100%;
|
|
@@ -34,7 +34,7 @@ import{j as t}from"./liveblocks-BOEQeN-H.js";import{l as w,k as x,j,u as y,h as
|
|
|
34
34
|
align-items: center;
|
|
35
35
|
background-color: ${e=>e.theme.colors.grey4};
|
|
36
36
|
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
-
`,Ee=x(function(e){const a=S(e),n=k(e),o=C(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankNameBySwift:s=>{e(ie(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"international",i,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(oe({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(he);function Fe(){const e=j(),a=y(),n=g(),{vendorId:o,billId:i}=w(),{useFeatureGate:l}=pe(),{isFeatureEnabled:s}=l(ue.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?t.jsx(
|
|
37
|
+
`,Ee=x(function(e){const a=S(e),n=k(e),o=C(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankNameBySwift:s=>{e(ie(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"international",i,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(oe({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(he);function Fe(){const e=j(),a=y(),n=g(),{vendorId:o,billId:i}=w(),{useFeatureGate:l}=pe(),{isFeatureEnabled:s}=l(ue.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?t.jsx(f,{}):t.jsx(Le,{windowSize:n,children:t.jsx(Ee,{location:a,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Te={containerWidth:new ke(100,58)},Ge=c(ye)`
|
|
38
38
|
width: ${r.sp4};
|
|
39
39
|
height: ${r.sp4};
|
|
40
40
|
margin-bottom: ${r.sp3};
|
|
@@ -69,4 +69,4 @@ import{j as t}from"./liveblocks-BOEQeN-H.js";import{l as w,k as x,j,u as y,h as
|
|
|
69
69
|
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
70
|
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
71
|
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
-
`,Ve=x(function(e,a){return{file:a.file,type:a.type}})(Se);function h({appContent:e}){const a=
|
|
72
|
+
`,Ve=x(function(e,a){return{file:a.file,type:a.type}})(Se);function h({appContent:e}){const a=Y(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=w(),[s]=ee(),d=s.get("token"),T=n.pathname.includes("address"),b=g(),G=xe(),B=ge(),M=()=>{G.toggle()},H=A(u=>S(u)),K=A(u=>k(u)),{authParams:V,fetchState:m,billAttachment:W,billFetchState:D,companyName:_,currencySymbol:U,amount:J}=H,{tenantId:q,userId:O,sessionId:Q}=V,{fetchState:Z,internationalBankAccountCreateStatus:R}=K;return P.useEffect(()=>{I(),m==="Not-Started"&&i!=null&&o!=null&&d!=null&&a(se(i,o,d))},[]),P.useEffect(()=>{m==="Completed"&&(I(O,Q,q),l!=null&&a(le(l)))},[m]),m==="Error"?t.jsx(f,{}):Z==="Completed"||R.fetchState==="Completed"?(I(),t.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):m==="In-Progress"?t.jsx(fe,{fetchState:m,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${B.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[m==="Completed"&&D==="Completed"&&t.jsx(be,{analytics:v,onLoad:u=>(X=>X.trackBillPayMagicLinkPageLoad(o??"",i??"",_,l??"",We(n.pathname),U,J))(u)}),t.jsxs(Me,{windowSize:b,children:[b!=="small"?t.jsx(Ge,{onClick:M}):null,t.jsx(Ke,{windowSize:b,isAddressPage:T,children:D==="In-Progress"?t.jsx(we,{size:"ExtraLarge",start:!0}):t.jsx(Ve,{file:W,type:"bill"})}),t.jsx(He,{windowSize:b,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function _e(){return t.jsx(ve,{})}function lt(){return t.jsxs(ae,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(_e,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(z,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(z,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(Be,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ne,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Fe,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{lt as default};
|