@zeniai/web-app-ui 5.3.94-qa → 5.3.95-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/{AccountMappingScreen-Bmgb_C78.js → AccountMappingScreen-CJpxPjym.js} +2 -2
- package/dist/assets/{ActualMatchingMatchDetailScreen-C1bjwCFl.js → ActualMatchingMatchDetailScreen-BI1Xbj3L.js} +1 -1
- package/dist/assets/AddressRoutes-27wvZSFH.js +1 -0
- package/dist/assets/{AddressScreen-CK7gWJ3b.js → AddressScreen-Ce6wpOqL.js} +1 -1
- package/dist/assets/{AiCfoScreen-DZTFzOoQ.js → AiCfoScreen-baKqq38G.js} +1 -1
- package/dist/assets/{AppDrawer-B0tY-mbb.js → AppDrawer-BAy3i2Dk.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-As3uwuI9.js → BillPayApprovalRoutes-BLLQGNfF.js} +1 -1
- package/dist/assets/{BillPayRoutes-CNicLDHc.js → BillPayRoutes-BF0qZi8Q.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-XCpwbT_u.js → BusinessVerificationPageScreen-B6gKgGKZ.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-CR7H5Cjw.js → CardsAiCfoScreen-495-iwbX.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CvgIEppy.js → ChargeCardRoutes-CsLMN32g.js} +6 -6
- package/dist/assets/{CompanyPassportScreen-Ce1nt64R.js → CompanyPassportScreen-DFOWHlG6.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-BoHBkoTA.js → ConnectionAuthScreen-DcGlWxyf.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-Da1wSVu0.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BqfmzhEq.js → CustomerOnboardingRoutes-7Bwv09dV.js} +3 -3
- package/dist/assets/{DashboardRoutes-BOltuZlc.js → DashboardRoutes-s3deN1Di.js} +1 -1
- package/dist/assets/{DefaultTenantHome-8uw_qEVS.js → DefaultTenantHome-Bi2eWO-I.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-Bvz9Us9E.js → DomesticWireDetailScreen-CVJejZP9.js} +3 -3
- package/dist/assets/{DrawerScreen-CvDLyMZu.js → DrawerScreen-Bev9sxN6.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-DFhL5J8C.js → EntityDetailRoutes-DTd2OX4g.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DoK_XMNy.js → ExpenseAutomationRoutes-BNvZ1Bwi.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BGHnB8b3.js → FeaturePreviewScreen-DETqyCpy.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-c0FU4r-Q.js → HubSpotOAuthCallbackScreen-LgF5qdxr.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider--Aami2sh.js → InboxNotificationsProvider-LdTK3V9o.js} +1 -1
- package/dist/assets/{InvoicingRoutes-DUWtt8Eb.js → InvoicingRoutes-Mbynj2-j.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-AI8HhWqx.js → MagicLinkRoutes-BAL4OpO8.js} +2 -2
- package/dist/assets/{MagicLinkSignInScreen-DPb178mw.js → MagicLinkSignInScreen-BIY2mGLo.js} +1 -1
- package/dist/assets/{MobileAppDrawer-19QV1aJW.js → MobileAppDrawer-CsfNveW9.js} +1 -1
- package/dist/assets/NotFoundScreen-DDA41Ig7.js +1 -0
- package/dist/assets/{NotificationRoutes-C4OXv-1x.js → NotificationRoutes-_8GAMr1Q.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-Vj49k0-r.js → OAuthConsentScreen-DrAajreS.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DzLJcvPv.js → PandLWithForecastRoutes-BoihVLwz.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-IRyciPP9.js → PaymentLinkScreen-QPSeahMe.js} +1 -1
- package/dist/assets/{PeopleRoutes-BkO8mrqO.js → PeopleRoutes-BJ_Rsbpd.js} +3 -3
- package/dist/assets/{PerformanceRoutes-BeXCSQ0N.js → PerformanceRoutes-BU_ssv__.js} +1 -1
- package/dist/assets/{Preview-9JjGFG_v.js → Preview-S6mtKRFK.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-Dl0Qw4Ez.js → QBOConnectionScreen-DMcsRcZG.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-y51Pu840.js → ReimbursementApprovalRoutes-c_eicF80.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Qa443otK.js → ReimbursementApprovalRuleDetailScreen-NQbCpzYz.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DZ-o_U5h.js → ReimbursementRoutes-BVOB8GHt.js} +4 -4
- package/dist/assets/{ReportsRoutes-B9FFHrty.js → ReportsRoutes-BaXWnnZZ.js} +1 -1
- package/dist/assets/RewardsRoutes-Dr_V6CBY.js +1 -0
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-D4H8zaDQ.js → ScheduleDetailsPrepaidExpensesScreen-OdknWRFf.js} +1 -1
- package/dist/assets/ScreenRoutes-MAHnboyU.js +2 -0
- package/dist/assets/{SettingsRoutes-C3YnRk2C.js → SettingsRoutes-CwikuwVk.js} +6 -6
- package/dist/assets/{SetupPagesScreen-DxHvejwN.js → SetupPagesScreen-B0b-Fgla.js} +1 -1
- package/dist/assets/{SignInScreen-FX9szdof.js → SignInScreen-DYTURHhx.js} +1 -1
- package/dist/assets/{SignOutScreen-CpXVn5Ew.js → SignOutScreen-Be_uJc5B.js} +1 -1
- package/dist/assets/{TaskListScreen-Dbq61IaU.js → TaskListScreen-adKZru26.js} +2 -2
- package/dist/assets/{TaskRoutes-BkbMTDBr.js → TaskRoutes-B74sfUtJ.js} +2 -2
- package/dist/assets/TransactionDetailRoutes-DRKjV_CD.js +1 -0
- package/dist/assets/{TransactionDetailScreen-D_BQMHcD.js → TransactionDetailScreen-CS9DS32g.js} +1 -1
- package/dist/assets/{TransactionListRoutes-O31xG-O6.js → TransactionListRoutes-BIufDhIc.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BTyChGzt.js → TreasuryRoutes-Bt27xnQK.js} +5 -5
- package/dist/assets/{VendorsRoutes-Bwv_4S82.js → VendorsRoutes-ZMV0CecT.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-T1fHWPXX.js → WiseConfirmationScreen-ZJ4gewaT.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-Efan6E53.js → ZeniAccountRoutes-DV3rsGFn.js} +9 -9
- package/dist/assets/{ZeniAccountStatementScreen-BHjgQw1R.js → ZeniAccountStatementScreen-B-L8iMJL.js} +1 -1
- package/dist/assets/{accountMappingHelper-jzkx0QiS.js → accountMappingHelper-1wM-u5pk.js} +1 -1
- package/dist/assets/{analytics-BE49_JfE.js → analytics-DhotUQIQ.js} +1 -1
- package/dist/assets/{analyticsHelper-DsYWZWVt.js → analyticsHelper-BkudU6tc.js} +1 -1
- package/dist/assets/{core-R1zvmcG1.js → core-B1R51LGS.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-D4d600vS.js → decodeURIComponentSafe-sNmSv15A.js} +1 -1
- package/dist/assets/{dnd-LSyMQh_7.js → dnd-CBDtHD8g.js} +1 -1
- package/dist/assets/{empty-BfAyW5rR.js → empty-1ZFG33kK.js} +1 -1
- package/dist/assets/{empty-CtFP9XJw.js → empty-DDVSRnUK.js} +1 -1
- package/dist/assets/{emptyVideoElement-DYu9DRPv.js → emptyVideoElement-Cmgjsfjv.js} +1 -1
- package/dist/assets/{epic-DI5821Fd.js → epic--rTGN1ZF.js} +2 -2
- package/dist/assets/{expenseAutomationHelper-BlCRyV8f.js → expenseAutomationHelper-Bb1c_nBx.js} +1 -1
- package/dist/assets/{getLocaleForTenant-CeS3nhP_.js → getLocaleForTenant-Nj4zPyxj.js} +1 -1
- package/dist/assets/{index-IzH6rGRi.js → index-4kuDVIdn.js} +1 -1
- package/dist/assets/{index-ARkELHLC.js → index-B4fRbcqK.js} +1 -1
- package/dist/assets/{index-LeoAhFsn.js → index-BgCxp-PW.js} +1 -1
- package/dist/assets/{index-CooR7eTi.js → index-C5-029-z.js} +1 -1
- package/dist/assets/{index-D7BxdwHb.js → index-CmqWYVaK.js} +1 -1
- package/dist/assets/{index-DhHwwWlj.js → index-DUjhchTx.js} +1 -1
- package/dist/assets/{index-B-tyZK_L.js → index-DaxOKW2h.js} +2 -2
- package/dist/assets/{index-YJiDWVEq.js → index-Dp_Uc3gy.js} +1704 -1703
- package/dist/assets/{lexical-BG-nDmQN.js → lexical-Cft6chCX.js} +1 -1
- package/dist/assets/{liveblocks-DOdRxZ-H.js → liveblocks-BYqz0SWy.js} +1 -1
- package/dist/assets/{lottie-Z_NAxrmn.js → lottie-C4orech3.js} +1 -1
- package/dist/assets/{mui-ZKvbmPSP.js → mui-D-_RYGgU.js} +1 -1
- package/dist/assets/{pathToGoBack-DioXT2-t.js → pathToGoBack-DZ8Lgq0-.js} +1 -1
- package/dist/assets/{pdf-_w1KRTSP.js → pdf-DFgrdLB6.js} +3 -3
- package/dist/assets/{pdf-lib-Ctu1umZQ.js → pdf-lib-2bJZTByw.js} +1 -1
- package/dist/assets/{plaid-tDbexfSh.js → plaid-B0PWXAfV.js} +1 -1
- package/dist/assets/{pusher-9ZSIvZ4p.js → pusher-F6-lSe0Y.js} +1 -1
- package/dist/assets/{react-DofVj9Pu.js → react-BwTGo4yk.js} +1 -1
- package/dist/assets/{react-dAAwh8YD.js → react-CB4vP-t_.js} +1 -1
- package/dist/assets/{react-V1QPqCMR.js → react-CM16A7NA.js} +1 -1
- package/dist/assets/{react-DLfHBjuE.js → react-DUg8Ws81.js} +1 -1
- package/dist/assets/{react-CNq4EJHI.js → react-D_SPu3Ud.js} +1 -1
- package/dist/assets/{react-BwaH8vjo.js → react-DyLpv-r1.js} +1 -1
- package/dist/assets/{recharts-UmMlzZlF.js → recharts-By7FVN8f.js} +1 -1
- package/dist/assets/{routePaths-BNKCrZ3Q.js → routePaths-BALvGXpp.js} +1 -1
- package/dist/assets/{sentry-DvoFEQx8.js → sentry-DjmIorbX.js} +1 -1
- package/dist/assets/{stripSplatSuffix-BaAbZcaB.js → stripSplatSuffix-B5IwbFj2.js} +1 -1
- package/dist/assets/{url-C4ptnP9R.js → url-B8llcdww.js} +1 -1
- package/dist/assets/{url-CxALZHMf.js → url-SyxPcinx.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-C9lZ7dv8.js → useActualMatchingMatchDetail-CuDY29_K.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DmqH-0FB.js → useAiCfoDashboardSuggestedQuestionsChips-B5pmnrb8.js} +1 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DWkTPomv.js +1 -0
- package/dist/assets/{useChargeCardPusherEvents-Bu7pKwYt.js → useChargeCardPusherEvents-Ce-wULUB.js} +1 -1
- package/dist/assets/{useDeviceId-DiDVtEd4.js → useDeviceId-D6nAUa-g.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-DPZz3eYz.js → useEmailConnectResultRefresh-CQX3dx0q.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-GgBZ_4tu.js → useInitialThreadRequest-BaIZPAUw.js} +1 -1
- package/dist/assets/useTaskManagerAccess-CFJAytRv.js +1 -0
- package/dist/assets/{useTaskManagerPusherEvents-L5Pm4CZg.js → useTaskManagerPusherEvents-B_vM_sss.js} +1 -1
- package/dist/assets/{utils-D06mHID-.js → utils-iOnDyQuG.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BDeFEYwi.js → withTransactionSidePanel-BuJ7rAhb.js} +2 -2
- package/dist/assets/{zeni-epic-state-Mdu-dKQU.js → zeni-epic-state-M9sMLOaG.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-C0qHVetk.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-z17kHs9H.js +0 -1
- package/dist/assets/NotFoundScreen-BBkmIYq4.js +0 -1
- package/dist/assets/RewardsRoutes-BiZmHyKs.js +0 -1
- package/dist/assets/ScreenRoutes-Ci74b2y0.js +0 -2
- package/dist/assets/TransactionDetailRoutes-BsViYeoe.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-DsA2c_Lu.js +0 -1
- package/dist/assets/useTaskManagerAccess-B2Iv2NJX.js +0 -1
package/dist/assets/{CustomerOnboardingRoutes-BqfmzhEq.js → CustomerOnboardingRoutes-7Bwv09dV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-BYqz0SWy.js";import{t as wn,A as Ge}from"./AddressScreen-Ce6wpOqL.js";import An from"./NotFoundScreen-DDA41Ig7.js";import{a as d,u as Me}from"./sentry-DjmIorbX.js";import{h as _e,g as xe,u as se,i as Ee,j as T,N as Q,q as Pn,l as cn,n as Dn,o as q}from"./core-B1R51LGS.js";import{fI as Y,e0 as Te,d$ as we,bq as jn,UL as Bn,bS as Fn,pU as Un,BL as Vn,BO as Ln,W6 as Rn,W7 as Nn,ly as Oe,lB as dn,Vm as $n,c0 as Gn,c9 as fe,Cd as Ae,B_ as Mn,W8 as me,Ce as un,SV as Qn,mL as ln,dj as pn,W9 as Kn,Wa as Wn,uL as zn,V9 as Ce,hZ as qn,V8 as be,hW as Hn,GJ as Jn,uP as Zn,hO as Xn,hR as Qe,Wb as mn,Wc as Yn,Mz as et,Wd as nt,MD as tt,BR as at,We as ot,Wf as st,lw as rt,lz as it,Cq as ct,C0 as gn,Cc as dt,bF as Ke,cF as ut,Cp as We,v2 as lt,uS as pt,mD as mt,gJ as gt,gI as ft,gH as yt,Wg as ht,BU as Ct,Cr as bt,Cu as St,Cx as It,CD as kt,dk as Ot}from"./zeni-epic-state-M9sMLOaG.js";import{z as W,c as Pe,$ as Z,f as vt,p as z,a6 as re,l as g,aC as _t,ag as fn,_ as xt,k as yn,V as hn,j as X,Q as ge,K as ve,aD as Et,E as ze,v as qe,ac as Tt,aE as He,aF as wt,aG as At}from"./index-Dp_Uc3gy.js";import{n as De}from"./mui-D-_RYGgU.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-DMcsRcZG.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-CQX3dx0q.js";import{u as Ft}from"./useChargeCardPusherEvents-Ce-wULUB.js";import"./recharts-By7FVN8f.js";import"./analytics-DhotUQIQ.js";import"./plaid-B0PWXAfV.js";import"./dnd-CBDtHD8g.js";import"./stripe-cKAAJElX.js";import"./lottie-C4orech3.js";import"./lexical-Cft6chCX.js";import"./pdf-DFgrdLB6.js";import"./utils-iOnDyQuG.js";import"./empty-DDVSRnUK.js";import"./pdf-lib-2bJZTByw.js";import"./index-DUjhchTx.js";import"./url-SyxPcinx.js";import"./index-BgCxp-PW.js";import"./decodeURIComponentSafe-sNmSv15A.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="93f06eba-272a-4956-b823-4caab7ed152a",e._sentryDebugIdIdentifier="sentry-dbid-93f06eba-272a-4956-b823-4caab7ed152a")}catch{}})();const Je=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Ut=()=>{const e=_e(),l=xe(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Ee(),n=W.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(Z.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(Z.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(Z.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(Z.isDebitCardFeatureEnabled),k=vt(),O=T((S=>Y(S))),P=T((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??W.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Te(w,O),b=we(O),D=[],V=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,E=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;V===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),E===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=T((S=>{const U=[];C===!1&&U.push("accounts_payable_aging"),a===!1&&U.push("accounts_receivable_aging"),U.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&U.push("rewards_card"),k===!1&&U.push("expense_automation_card");const H=Bn(S,U);return Fn(H.reportsInOrder.map((G=>({fetchState:G.fetchState,error:G.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Un(n.userId,F,O.tenantId,!0,!1,D)))}),[o,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:z(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),$=d.useCallback((()=>{j.current||(j.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout($,6e3);return()=>clearTimeout(S)}),[$]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||$()}),[u,f,m,b,$]),P!=="Completed")return s.jsx(Q,{to:"../"});const R=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:R?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:R?.onboardingToQuoteSignMinutes??0,isKybDone:Je(R?.businessVerified?.status),isKycDone:Je(R?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:R?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:$})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],Ze=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return l.every((o=>i.get(o)?.status==="ready"))},Ye=De.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${e=>e.theme.colors.grey4};
|
|
@@ -23,8 +23,8 @@ import{j as s}from"./liveblocks-DOdRxZ-H.js";import{t as wn,A as Ge}from"./Addre
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
26
|
-
`,nn=cn((function(e,l){const{companyId:i,isAdmin:o,currentTenant:p,isOnAddressPage:u}=l,c=W.getSignedInUser(),v=p.tenantId,n={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:v??""},t=X(e),C=Ae(e,i),a=mn(e),A=fe(p?.userRole??[])&&C.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",w=Xn(e.userRoleConfigState);return{onboardingCustomerView:C,analytics:g,isRefreshingViewInBackground:!1,isDisabled:A,companyTitles:w.companyTitles,connectedAccountProvider:t.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:Tt.fileMicroServiceBaseUrl,authParams:n},signedInUser:W.getSignedInUser(),currentTenant:t,isAdmin:o,isOnAddressPage:u,cardPaymentView:a,isCardPaymentPopupOpen:!1,stripeKey:ge.stripeKey}}),(function(e,l){const{companyId:i,currentTenant:o,themeState:p,navigate:u,location:c}=l,{tenantEmailDomain:v}=o;return{onFetchLinkTokenClick:(n,t)=>{e(kt(n,t))},onEstablishConnectionClick:(n,t)=>{e(It(n,t))},onUpdatePaymentAccountStatus:(n,t,C)=>{e(St(n,t,C))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(bt(!1,n,t))},onEstablishConnectionSuccess:()=>{e(Ct(i,!0,!1))},handleOnConnectClick:()=>{g.trackOnboardingConnectQBO(),ie.handleClick()},updateQBOPopupState:n=>{e(me({isQBOPopupOpen:n}))},onCompanyOfficerUpdated:n=>{const t=n.map((C=>{const{officerType:a,userId:A,name:w,email:k,ssn:O,nationalityCountryCode:P,dob:_,phone:F,syncToken:m,selectDocument:b,role:D,ownership:V,isSelectedForVerification:h,userVerificationStatus:r,fileIds:x,isPhoneVerified:E}=C;let f;return b.selectDocumentType==="driverLicense"?f="driving_license":b.selectDocumentType==="passport"?f="passport":b.selectDocumentType==="stateId"?f="id_document":b.selectDocumentType==="ssnCard"&&(f="social_security_card"),{officerType:a,userId:A,firstName:w.firstName,lastName:w.lastName,email:k,ssn:O,nationalityCountryCode:P?.selectedOption!=null?He(P.selectedOption):void 0,phone:F,birthday:_!=null?Ke(_?.toString()):_,syncToken:m,titleAtCompany:D.selectedOption,ownershipInCompany:V,documentTypeSelectedForVerification:f,isSelectedForVerification:h,userVerificationStatus:r,fileIds:x,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:E}}));e(We({officers:t}))},onGetOtp:(n,t)=>{e(yt(n,"CustomerOnboarding")),t!=null&&e(ht({officerType:t,phone:n}))},onResendOtp:n=>{e(ft(n,"CustomerOnboarding"))},onVerifyOtp:(n,t)=>{g.trackOnboardingPhoneVerified(),e(gt(n,t,"CustomerOnboarding"))},updateFilesEntity:n=>{e(mt({files:n}))},onDeleteFile:n=>{e(pt(n))},onEditFileName:(n,t)=>{e(lt(n,t.split(".")[0]))},onCompanyDetailsChanged:n=>{const{companyDescription:t,companyIndustry:C,companyIndustryType:a,companyLegalName:A,companyTaxId:w,companyWebsite:k,companyPhone:O,primaryContactEmail:P,primaryContactName:_,primaryContactUserId:F,primaryContactSyncToken:m,syncToken:b,fileIds:D,typeOfIncorporation:V,stateOfIncorporation:h,incDate:r,companySourceOfFunds:x,companySourceOfFundsDescription:E,companySubIndustry:f,countriesOfOperations:j,purposeOfAccount:N,purposeOfAccountDescription:$,regulatedStatus:R,regulatedStatusDescription:ee,transactionVolume:S,transactionVolumeDescription:U,usNexus:H,usNexusTypes:G}=n,M={companyId:i,companyDescription:t,companyIndustry:C.selectedOption,companyIndustryType:a?.selectedOption??"",companyLegalName:A,taxIdOrEIN:w,website:k!=""&&k!=null?ut(k):void 0,phone:O,syncToken:b,fileIds:D,incDate:r!=null?Ke(r?.toString()):r,typeOfIncorporation:V?.selectedOption??"",stateOfIncorporation:h?.selectedOption??"",companySourceOfFunds:x?.selectedOption??"",companySourceOfFundsDescription:E,companySubIndustry:f?.selectedOption??"",countriesOfOperations:j?.selectedOptions.map((L=>L.length===2?L:He(L)))??[],purposeOfAccount:N?.selectedOption??"",purposeOfAccountDescription:$,regulatedStatus:R??"",regulatedStatusDescription:ee,transactionVolume:S?.selectedOption??"",transactionVolumeDescription:U,usNexus:H,usNexusTypes:G?.selectedOptions??[]},ce={userId:F,firstName:_.firstName,lastName:_.lastName,email:P,syncToken:m};e(We({companyDetails:M,primaryContactDetails:ce}))},onAddressClick:(n,t)=>{const C=an(v,n,t),a=z(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:a}})},onRegisteredAddressClick:(n,t)=>{const C=an(v,n,t),a=z(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:a}})},onUpdateCustomerView:(n,t,C,a)=>{e(dt(i,!1,t,C,n,a))},onAddressEditHandler:n=>{if(n!=null){const t=wn(n);e(ln({addressType:"subscription_billing_address",addressToCreate:t}))}},onSkipSetupClick:()=>{const n=z(c.state?.pathnameStackToGoBack,c.pathname);e(gn(i,!1,!1)),u("./activation",{state:{pathnameStackToGoBack:n}})},onUpdateStep:n=>{e(un({step:n}))},onUpdateSubStep:n=>{e(ct({subStep:n}))},onZeniLogoClick:()=>{p.toggle()},handleLogOutClick:()=>{const n=z(c.state?.pathnameStackToGoBack,c.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:n,message:"logout"}})},handleCockpitClick:()=>{g.trackOnboardingFlowExited("cockpit"),window.open("/cockpit")},handleReferralsClick:()=>{u(`/${v}/rewards`)},handleCreateCardSetupIntent:n=>{e(dn(n))},handleConfirmCardSetupIntent:n=>{e(it(n))},updateCardPaymentModalState:n=>{e(me({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,C)=>{e(rt(n,t,C))},handleFetchPaymentSources:()=>{e(Oe())},resetCardPaymentViewState:()=>{e(st())},handleResetCardPaymentErrorStatuses:()=>{e(ot())},redirectToProductSuitePage:()=>{g.trackOnboardingFlowExited("product_suite");const n=z(c.state?.pathnameStackToGoBack,c.pathname);u(`/${v}/onboarding/thankyou`,{state:{pathnameStackToGoBack:n,message:"OnboardingThankyou"},replace:!0})},onAcknowledgeAiFinanceTeam:()=>{i!=null&&(g.trackOnboardingAiFinanceTeamAcknowledged(),e(at(i)))},onIdentityDocumentUploadedForAutofill:n=>{if(i==null)return;const t=nt(n.documentType);t!=null&&(g.trackOnboardingDocumentUploaded("kyc",t),e(tt({target:"onboarding",companyId:i,officerType:n.officerType,fileId:n.fileId,documentType:t})))},onCompanyDocumentUploadedForAutofill:n=>{i!=null&&(g.trackOnboardingDocumentUploaded("kyb",n.documentType),e(et({target:"onboarding",companyId:i,fileId:n.fileId,documentType:n.documentType})))}}}))(Et),le=({taxCFOCustomer:e=!1,isOnAddressPage:l=!1,appContent:i})=>{const o=fn(),p=_e(),u=xe(),c=se(),v=xt(),n=yn(),[t,C]=d.useState(!1),[a,A]=d.useState(!1),[w,k]=d.useState(!1),{tenantEmailDomain:O}=Ee(),P=hn(),{useFeatureGate:_}=Pe(),{isFeatureEnabled:F}=_(Z.isDebitCardFeatureEnabled),m=Pn("/:tenantEmailDomain/onboarding")!==null&&u.search?.includes("code"),b=T((y=>y.onboardingCustomerViewState.fetchState)),D=T((y=>y.onboardingCustomerViewState.currentStep)),V=T((y=>y.onboardingCustomerViewState.uiState)),h=T((y=>X(y))),r=T((y=>y.userRoleConfigState.fetchState)),x=T((y=>y.cardPaymentViewState)),E=Y(x.addCardPaymentSourceStatus.fetchState),f=x.addCardPaymentSourceStatus.fetchState,{code:j,realmId:N,state:$}=Pt(u.search),R=h.externalConnections?.accounting[0],ee=R?.connectionType,S=R?.connectionName,U=R?.connectionId??"",H=W.getSignedInUser()?.userId??"",G=d.useRef({realmId:"",connectionId:""});d.useEffect((()=>{a||(A(!0),c(Oe()))}),[a,c]),d.useEffect((()=>{w||(dn(["card"]),k(!0))}),[w]),d.useEffect((()=>{E==="In-Progress"&&f==="Completed"&&c(Oe())}),[E,f]),d.useEffect((()=>{Dt(j,N,$,U,H)===!0&&h.externalConnections?.saveConnectionState!=="In-Progress"&&b==="Completed"&&(c($n(h.tenantId,{connection_type:ee??"accounting",connection_name:S??"quickbooks_online",authorization_code:j,realm_id:N,connection_id:U,user_id:H},Gn(window.location.origin+"/onboarding/auth"))),G.current={realmId:N,connectionId:U},g.trackOnboardingSaveQBOConnection(N,U),p(u.pathname))}),[j,N,$,u.pathname,b]),d.useEffect((()=>{ie.isInitiated===!1&&b==="Completed"&&ie.init("/onboarding/auth",h.tenantEmailDomain)}),[b]);const M=h.companyId??W.getSignedInUserTenant(O)?.companyId,ce=fe(h?.userRole??[]),L=T((y=>Ae(y,M)));d.useEffect((()=>{t||b!=="Not-Started"||M==null||(C(!0),c(Mn(M,!0,!m)))}),[t,b,M]);const ne=h.externalConnections?.saveConnectionState,je=Y(ne);d.useEffect((()=>{je==="In-Progress"&&(ne==="Completed"||ne==="Error")&&V.isQBOPopupOpen&&D==="connect_ledger"&&(ne==="Completed"?g.trackOnboardingQBOConnectionSuccess(G.current.realmId,G.current.connectionId):g.trackOnboardingQBOConnectionFailed(G.current.realmId,G.current.connectionId,h.externalConnections?.saveOAuthConnectionError?.message??""),c(me({isQBOPopupOpen:!1})))}),[ne,je,V.isQBOPopupOpen,D,g,c]),d.useEffect((()=>{b==="Completed"&&m&&(c(un({step:"connect_ledger"})),c(me({isQBOPopupOpen:!0})))}),[m,b]),d.useEffect((()=>{r==="Not-Started"&&c(Qn(!0))}),[r,c]);const Cn=Y(L.companyDetailsLocalData?.addressStatus);d.useEffect((()=>{L.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&L.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&Cn==null&&c(ln({addressType:"company_registered_address",addressToCreate:L.companyDetailsLocalData?.addressStatus?.addressToCreate}))}),[L.companyDetailsLocalData?.addressStatus?.addressToCreate,L.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const bn=L.isInterimEmailSent,Be=W.getSignedInUser();if(Be==null)throw Error("Can't access onboarding flow without signing in...");const Sn=Te(F,h),In=we(h),Fe=h.company?.companyOnboardingInfo.isOnboardingCompleted,Ue=y=>y.trackPageLoaded(ve.Event.onboardingPage),ye=h.productSettings.isOtherProductsEnabled,kn=ye===!0&&!pn(h),On=h.productSettings.isTreasuryEnabled,Ve=Vt({tenantEmailDomain:O??"",signedInUserEmail:Be.userEmail??"",companyId:M}),Le=(({companyId:y})=>{const K=se(),de=T((B=>B.onboardingCustomerViewState?.aiAgentsActivation)),te=T((B=>X(B).company?.companyOnboardingInfo?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiActivationViewed??!1)),he=d.useCallback((()=>{K(Vn())}),[K]);d.useEffect((()=>{he()}),[he]);const Re=d.useCallback((()=>{y==null||y===""||te||K(Ln(y))}),[y,te,K]),vn=d.useMemo((()=>{if(y==null||y==="")return[];const B=`private-encrypted-${y}`;return[`${B}.ledger-ingestion.counts-updated`,`${B}.ai-agents-activation.phase-changed`]}),[y]),_n=d.useCallback(((B,ae)=>{if(ae==null||typeof ae!="object")return;const I=ae;if(B!=="ledger-ingestion.counts-updated"){if(B==="ai-agents-activation.phase-changed"){const ue=typeof I.phase_key=="string"?I.phase_key:typeof I.key=="string"?I.key:"",J=typeof I.status=="string"?I.status:"idle";if(ue==="")return;K(Nn({key:ue,status:J==="starting"||J==="building"||J==="ready"?J:"idle",startedAt:typeof I.started_at=="string"?I.started_at:void 0,completedAt:typeof I.completed_at=="string"?I.completed_at:void 0}))}}else K(Rn({customerCount:typeof I.customer_count=="number"?I.customer_count:void 0,glAccountCount:typeof I.gl_account_count=="number"?I.gl_account_count:void 0,targetTransactionCount:typeof I.target_transaction_count=="number"?I.target_transaction_count:void 0,transactionCount:typeof I.transaction_count=="number"?I.transaction_count:void 0,vendorCount:typeof I.vendor_count=="number"?I.vendor_count:void 0}))}),[K]);return Ft({events:vn,onEvent:_n,onSubscribed:he}),d.useMemo((()=>{const B=de?.phases??[],ae=Ze(B,Se),I=Ze(B,Ie),ue=Ye(B,Se),J=Ye(B,Ie),Ne=B.some((Tn=>Tn.status!=="idle")),oe=!te&&!Ne,$e=te&&!Ne,xn=$e?Se.map((()=>"building")):ae,En=$e?Ie.map((()=>"building")):I;return{ledgerRowStatuses:oe?void 0:xn,backgroundRowStatuses:oe?void 0:En,showLedgerReadyInLabel:oe?void 0:ue,showBackgroundReadyInLabel:oe?void 0:J,forceContinueEnabled:!oe||void 0,counts:de?.counts,onContinueClicked:Re}}),[de?.phases,de?.counts,te,Re])})({companyId:M});if(Fe===!0){if(!ye)return On?s.jsx(Q,{to:"../../treasury"}):Sn?s.jsx(Q,{to:"../../checking"}):In?s.jsx(Q,{to:"../../cards"}):s.jsx(Q,{to:"../../dashboard"});const y=L.updateStatus.fetchState==="In-Progress";if(ye&&!y)return e?s.jsxs(Xe,{children:[s.jsx(re,{analytics:g,onLoad:K=>Ue(K)}),s.jsx(nn,{navigate:p,location:u,companyId:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:n,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ve,aiAgentsActivationProps:Le,meetingUrl:o("onboarding_overview")}),i!=null?s.jsx(en,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]}):s.jsx(Q,{to:"../../onboarding/thankyou"})}else if(Fe===!1&&P?.loggedInUserRoleMap!=null)return bn===!0&&kn?s.jsx(Q,{to:"../../onboarding/thankyou"}):s.jsxs(Xe,{children:[s.jsx(re,{analytics:g,onLoad:y=>Ue(y)}),s.jsx(nn,{navigate:p,location:u,companyId:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:n,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ve,aiAgentsActivationProps:Le,meetingUrl:o("onboarding_overview")}),i!=null?s.jsx(en,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]});return null},ke="external_integrations",Vt=({tenantEmailDomain:e,signedInUserEmail:l,companyId:i})=>{const o=se(),{pendingAutoFocusTabId:p}=jt(),{plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v}=Bt({companyId:i}),n=T((r=>r.plaidAccountViewState.external_account.plaidConnectionDetails)),t=T((r=>X(r))),C=T((r=>r.tenantState.fetchState)),a=T((r=>Kn(r,i))),A=T((r=>Wn(r,ke))),w=d.useMemo((()=>new Set(A.map((r=>r.additionalInfo)).filter((r=>r!=null)))),[A]),k=t.tenantId,O=fe(t.userRole??[]);d.useEffect((()=>{o(zn(ke))}),[o]);const P=a.externalConnections?.saveAPIKeyConnectionState,_=a.externalConnections?.saveAPIKeyConnectionError?.message,F=Y(P);d.useEffect((()=>{F==="In-Progress"&&(P==="Completed"?g.trackIntegrationConnected("chargebee","Onboarding","revenue"):P==="Error"&&g.trackIntegrationConnectFailed("chargebee","Onboarding","revenue",_??""))}),[P,F,_]);const m=a.externalConnections?.saveOAuthConnectionState,b=a.externalConnections?.saveOAuthConnectionError?.message,D=Y(m);d.useEffect((()=>{D==="In-Progress"&&(m==="Completed"?g.trackIntegrationConnected("hubspot","Onboarding","revenue"):m==="Error"&&g.trackIntegrationConnectFailed("hubspot","Onboarding","revenue",b??""))}),[m,D,b]);const V=a.externalConnections?.saveConnectorCredentialsStateBySlug,h=Y(V);return d.useEffect((()=>{const r=V??{},x=h??{},E=a.externalConnections?.saveConnectorCredentialsErrorBySlug??{};Object.keys(r).forEach((f=>{if(x[f]!=="In-Progress")return;let j;try{j=Ce(f)}catch{return}r[f]==="Completed"?g.trackIntegrationConnected(j,"Onboarding","payments"):r[f]==="Error"&&g.trackIntegrationConnectFailed(j,"Onboarding","payments",E[f]?.message??"")}))}),[V,h,a]),d.useMemo((()=>({isAdmin:O,analytics:g,referrer:"Onboarding",integrationsView:a,isLoading:C==="In-Progress",notifyMeRegisteredSlugs:w,autoFocusTabId:p??void 0,saveChargeBeeState:a.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:a.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:a.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:a.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:a.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(a.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([r,x])=>[r,x?.message]))),deleteConnectionState:a.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:a.externalConnections?.deleteConnectionError?.message,onConnectGmail:()=>{g.trackIntegrationConnectClicked("gmail","Onboarding","email"),o(Qe(k,"gmail",tn()))},onConnectOutlook:()=>{g.trackIntegrationConnectClicked("outlook","Onboarding","email"),o(Qe(k,"outlook",tn()))},onConnectHubSpot:(r,x)=>{const E=a.externalConnections?.revenue?.find((j=>j.connectionName==="hubspot"))?.connectionId;if(E==null)return;g.trackIntegrationCredentialsSubmitted("hubspot","Onboarding","revenue");const f=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:r,client_secret:x,connection_id:E,redirect_uri:f,tenant_id:k})),window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(r)}&scope=${encodeURIComponent("oauth crm.objects.deals.read crm.objects.owners.read")}&redirect_uri=${encodeURIComponent(f)}`},onDisconnect:(r,x)=>{const E=[...a.externalConnections?.accounting??[],...a.externalConnections?.payments??[],...a.externalConnections?.revenue??[]].find((j=>j.connectionId===r))?.connectionName;let f;try{f=E!=null?Ce(E):void 0}catch{f=void 0}f!=null&&g.trackIntegrationDisconnected(f,"Onboarding",x),o(Yn(k,r,be(x)))},onNotifyMe:r=>{g.trackIntegrationsNotifyMeClicked("Onboarding",r),o(Zn(ke,r,l))},onReconnectQBO:()=>{ie.init("/onboarding/auth",e),ie.handleClick()},onRefreshClick:()=>{a.integrations.refreshQBO.fetchState!=="In-Progress"&&o(Jn())},onSaveChargeBeeCredentials:(r,x)=>{const E=a.externalConnections?.revenue?.find((f=>f.connectionName==="chargebee"))?.connectionId;E!=null&&(g.trackIntegrationCredentialsSubmitted("chargebee","Onboarding","revenue"),o(Hn(k,E,be("revenue"),Ce("chargebee"),{api_key:r,site:x})))},onSaveConnectorCredentials:r=>{g.trackIntegrationCredentialsSubmitted(r.connectionName,"Onboarding","payments"),o(qn(k,be("payments"),r))},plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v,plaidConnectionDetails:n})),[O,a,C,w,p,k,l,e,o,u,c,v,n])};function tn(){const e=new URL(window.location.href);return e.searchParams.set("onboarding_step","connect_data_source"),e.toString()}function an(e,l,i){let o=`/${e}/onboarding/address`;return o=i!=null?o.concat(`/edit/${l}/${encodeURIComponent(i)}`):o.concat(`/new/${l}`),o}const on=De.div`
|
|
26
|
+
`,nn=cn((function(e,l){const{companyId:i,isAdmin:o,currentTenant:p,isOnAddressPage:u}=l,c=W.getSignedInUser(),v=p.tenantId,n={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:v??""},t=Y(e),C=Ae(e,i),a=mn(e),A=fe(p?.userRole??[])&&C.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",w=Yn(e.userRoleConfigState);return{onboardingCustomerView:C,analytics:g,isRefreshingViewInBackground:!1,isDisabled:A,companyTitles:w.companyTitles,connectedAccountProvider:t.company?.featuresActivationInfo.connectedAccountProvider??"",fileProps:{filesEndPoint:Tt.fileMicroServiceBaseUrl,authParams:n},signedInUser:W.getSignedInUser(),currentTenant:t,isAdmin:o,isOnAddressPage:u,cardPaymentView:a,isCardPaymentPopupOpen:!1,stripeKey:ge.stripeKey}}),(function(e,l){const{companyId:i,currentTenant:o,themeState:p,navigate:u,location:c}=l,{tenantEmailDomain:v}=o;return{onFetchLinkTokenClick:(n,t)=>{e(kt(n,t))},onEstablishConnectionClick:(n,t)=>{e(It(n,t))},onUpdatePaymentAccountStatus:(n,t,C)=>{e(St(n,t,C))},onUpdatePaymentAccountLoginStatus:(n,t)=>{e(bt(!1,n,t))},onEstablishConnectionSuccess:()=>{e(Ct(i,!0,!1))},handleOnConnectClick:()=>{g.trackOnboardingConnectQBO(),ie.handleClick()},updateQBOPopupState:n=>{e(me({isQBOPopupOpen:n}))},onCompanyOfficerUpdated:n=>{const t=n.map((C=>{const{officerType:a,userId:A,name:w,email:k,ssn:O,nationalityCountryCode:P,dob:_,phone:F,syncToken:m,selectDocument:b,role:D,ownership:V,isSelectedForVerification:h,userVerificationStatus:r,fileIds:x,isPhoneVerified:E}=C;let f;return b.selectDocumentType==="driverLicense"?f="driving_license":b.selectDocumentType==="passport"?f="passport":b.selectDocumentType==="stateId"?f="id_document":b.selectDocumentType==="ssnCard"&&(f="social_security_card"),{officerType:a,userId:A,firstName:w.firstName,lastName:w.lastName,email:k,ssn:O,nationalityCountryCode:P?.selectedOption!=null?He(P.selectedOption):void 0,phone:F,birthday:_!=null?Ke(_?.toString()):_,syncToken:m,titleAtCompany:D.selectedOption,ownershipInCompany:V,documentTypeSelectedForVerification:f,isSelectedForVerification:h,userVerificationStatus:r,fileIds:x,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1,isPhoneVerified:E}}));e(We({officers:t}))},onGetOtp:(n,t)=>{e(yt(n,"CustomerOnboarding")),t!=null&&e(ht({officerType:t,phone:n}))},onResendOtp:n=>{e(ft(n,"CustomerOnboarding"))},onVerifyOtp:(n,t)=>{g.trackOnboardingPhoneVerified(),e(gt(n,t,"CustomerOnboarding"))},updateFilesEntity:n=>{e(mt({files:n}))},onDeleteFile:n=>{e(pt(n))},onEditFileName:(n,t)=>{e(lt(n,t.split(".")[0]))},onCompanyDetailsChanged:n=>{const{companyDescription:t,companyIndustry:C,companyIndustryType:a,companyLegalName:A,companyTaxId:w,companyWebsite:k,companyPhone:O,primaryContactEmail:P,primaryContactName:_,primaryContactUserId:F,primaryContactSyncToken:m,syncToken:b,fileIds:D,typeOfIncorporation:V,stateOfIncorporation:h,incDate:r,companySourceOfFunds:x,companySourceOfFundsDescription:E,companySubIndustry:f,countriesOfOperations:j,purposeOfAccount:N,purposeOfAccountDescription:$,regulatedStatus:R,regulatedStatusDescription:ee,transactionVolume:S,transactionVolumeDescription:U,usNexus:H,usNexusTypes:G}=n,M={companyId:i,companyDescription:t,companyIndustry:C.selectedOption,companyIndustryType:a?.selectedOption??"",companyLegalName:A,taxIdOrEIN:w,website:k!=""&&k!=null?ut(k):void 0,phone:O,syncToken:b,fileIds:D,incDate:r!=null?Ke(r?.toString()):r,typeOfIncorporation:V?.selectedOption??"",stateOfIncorporation:h?.selectedOption??"",companySourceOfFunds:x?.selectedOption??"",companySourceOfFundsDescription:E,companySubIndustry:f?.selectedOption??"",countriesOfOperations:j?.selectedOptions.map((L=>L.length===2?L:He(L)))??[],purposeOfAccount:N?.selectedOption??"",purposeOfAccountDescription:$,regulatedStatus:R??"",regulatedStatusDescription:ee,transactionVolume:S?.selectedOption??"",transactionVolumeDescription:U,usNexus:H,usNexusTypes:G?.selectedOptions??[]},ce={userId:F,firstName:_.firstName,lastName:_.lastName,email:P,syncToken:m};e(We({companyDetails:M,primaryContactDetails:ce}))},onAddressClick:(n,t)=>{const C=an(v,n,t),a=z(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:a}})},onRegisteredAddressClick:(n,t)=>{const C=an(v,n,t),a=z(c.state?.pathnameStackToGoBack,c.pathname);u(C,{state:{pathnameStackToGoBack:a}})},onUpdateCustomerView:(n,t,C,a)=>{e(dt(i,!1,t,C,n,a))},onAddressEditHandler:n=>{if(n!=null){const t=wn(n);e(ln({addressType:"subscription_billing_address",addressToCreate:t}))}},onSkipSetupClick:()=>{const n=z(c.state?.pathnameStackToGoBack,c.pathname);e(gn(i,!1,!1)),u("./activation",{state:{pathnameStackToGoBack:n}})},onUpdateStep:n=>{e(un({step:n}))},onUpdateSubStep:n=>{e(ct({subStep:n}))},onZeniLogoClick:()=>{p.toggle()},handleLogOutClick:()=>{const n=z(c.state?.pathnameStackToGoBack,c.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:n,message:"logout"}})},handleCockpitClick:()=>{g.trackOnboardingFlowExited("cockpit"),window.open("/cockpit")},handleReferralsClick:()=>{u(`/${v}/rewards`)},handleCreateCardSetupIntent:n=>{e(dn(n))},handleConfirmCardSetupIntent:n=>{e(it(n))},updateCardPaymentModalState:n=>{e(me({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,t,C)=>{e(rt(n,t,C))},handleFetchPaymentSources:()=>{e(Oe())},resetCardPaymentViewState:()=>{e(st())},handleResetCardPaymentErrorStatuses:()=>{e(ot())},redirectToProductSuitePage:()=>{g.trackOnboardingFlowExited("product_suite");const n=z(c.state?.pathnameStackToGoBack,c.pathname);u(`/${v}/onboarding/thankyou`,{state:{pathnameStackToGoBack:n,message:"OnboardingThankyou"},replace:!0})},onAcknowledgeAiFinanceTeam:()=>{i!=null&&(g.trackOnboardingAiFinanceTeamAcknowledged(),e(at(i)))},onIdentityDocumentUploadedForAutofill:n=>{if(i==null)return;const t=nt(n.documentType);t!=null&&(g.trackOnboardingDocumentUploaded("kyc",t),e(tt({target:"onboarding",companyId:i,officerType:n.officerType,fileId:n.fileId,documentType:t})))},onCompanyDocumentUploadedForAutofill:n=>{i!=null&&(g.trackOnboardingDocumentUploaded("kyb",n.documentType),e(et({target:"onboarding",companyId:i,fileId:n.fileId,documentType:n.documentType})))}}}))(Et),le=({taxCFOCustomer:e=!1,isOnAddressPage:l=!1,appContent:i})=>{const o=fn(),p=_e(),u=xe(),c=se(),v=xt(),n=yn(),[t,C]=d.useState(!1),[a,A]=d.useState(!1),[w,k]=d.useState(!1),{tenantEmailDomain:O}=Ee(),P=hn(),{useFeatureGate:_}=Pe(),{isFeatureEnabled:F}=_(Z.isDebitCardFeatureEnabled),m=Pn("/:tenantEmailDomain/onboarding")!==null&&u.search?.includes("code"),b=T((y=>y.onboardingCustomerViewState.fetchState)),D=T((y=>y.onboardingCustomerViewState.currentStep)),V=T((y=>y.onboardingCustomerViewState.uiState)),h=T((y=>Y(y))),r=T((y=>y.userRoleConfigState.fetchState)),x=T((y=>y.cardPaymentViewState)),E=X(x.addCardPaymentSourceStatus.fetchState),f=x.addCardPaymentSourceStatus.fetchState,{code:j,realmId:N,state:$}=Pt(u.search),R=h.externalConnections?.accounting[0],ee=R?.connectionType,S=R?.connectionName,U=R?.connectionId??"",H=W.getSignedInUser()?.userId??"",G=d.useRef({realmId:"",connectionId:""});d.useEffect((()=>{a||(A(!0),c(Oe()))}),[a,c]),d.useEffect((()=>{w||(dn(["card"]),k(!0))}),[w]),d.useEffect((()=>{E==="In-Progress"&&f==="Completed"&&c(Oe())}),[E,f]),d.useEffect((()=>{Dt(j,N,$,U,H)===!0&&h.externalConnections?.saveConnectionState!=="In-Progress"&&b==="Completed"&&(c($n(h.tenantId,{connection_type:ee??"accounting",connection_name:S??"quickbooks_online",authorization_code:j,realm_id:N,connection_id:U,user_id:H},Gn(window.location.origin+"/onboarding/auth"))),G.current={realmId:N,connectionId:U},g.trackOnboardingSaveQBOConnection(N,U),p(u.pathname))}),[j,N,$,u.pathname,b]),d.useEffect((()=>{ie.isInitiated===!1&&b==="Completed"&&ie.init("/onboarding/auth",h.tenantEmailDomain)}),[b]);const M=h.companyId??W.getSignedInUserTenant(O)?.companyId,ce=fe(h?.userRole??[]),L=T((y=>Ae(y,M)));d.useEffect((()=>{t||b!=="Not-Started"||M==null||(C(!0),c(Mn(M,!0,!m)))}),[t,b,M]);const ne=h.externalConnections?.saveConnectionState,je=X(ne);d.useEffect((()=>{je==="In-Progress"&&(ne==="Completed"||ne==="Error")&&V.isQBOPopupOpen&&D==="connect_ledger"&&(ne==="Completed"?g.trackOnboardingQBOConnectionSuccess(G.current.realmId,G.current.connectionId):g.trackOnboardingQBOConnectionFailed(G.current.realmId,G.current.connectionId,h.externalConnections?.saveOAuthConnectionError?.message??""),c(me({isQBOPopupOpen:!1})))}),[ne,je,V.isQBOPopupOpen,D,g,c]),d.useEffect((()=>{b==="Completed"&&m&&(c(un({step:"connect_ledger"})),c(me({isQBOPopupOpen:!0})))}),[m,b]),d.useEffect((()=>{r==="Not-Started"&&c(Qn(!0))}),[r,c]);const Cn=X(L.companyDetailsLocalData?.addressStatus);d.useEffect((()=>{L.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&L.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&Cn==null&&c(ln({addressType:"company_registered_address",addressToCreate:L.companyDetailsLocalData?.addressStatus?.addressToCreate}))}),[L.companyDetailsLocalData?.addressStatus?.addressToCreate,L.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate]);const bn=L.isInterimEmailSent,Be=W.getSignedInUser();if(Be==null)throw Error("Can't access onboarding flow without signing in...");const Sn=Te(F,h),In=we(h),Fe=h.company?.companyOnboardingInfo.isOnboardingCompleted,Ue=y=>y.trackPageLoaded(ve.Event.onboardingPage),ye=h.productSettings.isOtherProductsEnabled,kn=ye===!0&&!pn(h),On=h.productSettings.isTreasuryEnabled,Ve=Vt({tenantEmailDomain:O??"",signedInUserEmail:Be.userEmail??"",companyId:M}),Le=(({companyId:y})=>{const K=se(),de=T((B=>B.onboardingCustomerViewState?.aiAgentsActivation)),te=T((B=>Y(B).company?.companyOnboardingInfo?.onboardingInfo?.onboardingAiActivationInfo?.isOnboardingAiActivationViewed??!1)),he=d.useCallback((()=>{K(Vn())}),[K]);d.useEffect((()=>{he()}),[he]);const Re=d.useCallback((()=>{y==null||y===""||te||K(Ln(y))}),[y,te,K]),vn=d.useMemo((()=>{if(y==null||y==="")return[];const B=`private-encrypted-${y}`;return[`${B}.ledger-ingestion.counts-updated`,`${B}.ai-agents-activation.phase-changed`]}),[y]),_n=d.useCallback(((B,ae)=>{if(ae==null||typeof ae!="object")return;const I=ae;if(B!=="ledger-ingestion.counts-updated"){if(B==="ai-agents-activation.phase-changed"){const ue=typeof I.phase_key=="string"?I.phase_key:typeof I.key=="string"?I.key:"",J=typeof I.status=="string"?I.status:"idle";if(ue==="")return;K(Nn({key:ue,status:J==="starting"||J==="building"||J==="ready"?J:"idle",startedAt:typeof I.started_at=="string"?I.started_at:void 0,completedAt:typeof I.completed_at=="string"?I.completed_at:void 0}))}}else K(Rn({customerCount:typeof I.customer_count=="number"?I.customer_count:void 0,glAccountCount:typeof I.gl_account_count=="number"?I.gl_account_count:void 0,targetTransactionCount:typeof I.target_transaction_count=="number"?I.target_transaction_count:void 0,transactionCount:typeof I.transaction_count=="number"?I.transaction_count:void 0,vendorCount:typeof I.vendor_count=="number"?I.vendor_count:void 0}))}),[K]);return Ft({events:vn,onEvent:_n,onSubscribed:he}),d.useMemo((()=>{const B=de?.phases??[],ae=Ze(B,Se),I=Ze(B,Ie),ue=Xe(B,Se),J=Xe(B,Ie),Ne=B.some((Tn=>Tn.status!=="idle")),oe=!te&&!Ne,$e=te&&!Ne,xn=$e?Se.map((()=>"building")):ae,En=$e?Ie.map((()=>"building")):I;return{ledgerRowStatuses:oe?void 0:xn,backgroundRowStatuses:oe?void 0:En,showLedgerReadyInLabel:oe?void 0:ue,showBackgroundReadyInLabel:oe?void 0:J,forceContinueEnabled:!oe||void 0,counts:de?.counts,onContinueClicked:Re}}),[de?.phases,de?.counts,te,Re])})({companyId:M});if(Fe===!0){if(!ye)return On?s.jsx(Q,{to:"../../treasury"}):Sn?s.jsx(Q,{to:"../../checking"}):In?s.jsx(Q,{to:"../../cards"}):s.jsx(Q,{to:"../../dashboard"});const y=L.updateStatus.fetchState==="In-Progress";if(ye&&!y)return e?s.jsxs(Ye,{children:[s.jsx(re,{analytics:g,onLoad:K=>Ue(K)}),s.jsx(nn,{navigate:p,location:u,companyId:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:n,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ve,aiAgentsActivationProps:Le,meetingUrl:o("onboarding_overview")}),i!=null?s.jsx(en,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]}):s.jsx(Q,{to:"../../onboarding/thankyou"})}else if(Fe===!1&&P?.loggedInUserRoleMap!=null)return bn===!0&&kn?s.jsx(Q,{to:"../../onboarding/thankyou"}):s.jsxs(Ye,{children:[s.jsx(re,{analytics:g,onLoad:y=>Ue(y)}),s.jsx(nn,{navigate:p,location:u,companyId:M,currentTenant:h,isAdmin:ce,isOnAddressPage:l,themeState:n,googleAPIKey:ge.googleMapsAPIKey,integrationsSectionProps:Ve,aiAgentsActivationProps:Le,meetingUrl:o("onboarding_overview")}),i!=null?s.jsx(en,{windowSize:v,skipLegacyDrawerOffset:l&&h.productSettings.isOtherProductsEnabled!==!0,children:i}):null]});return null},ke="external_integrations",Vt=({tenantEmailDomain:e,signedInUserEmail:l,companyId:i})=>{const o=se(),{pendingAutoFocusTabId:p}=jt(),{plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v}=Bt({companyId:i}),n=T((r=>r.plaidAccountViewState.external_account.plaidConnectionDetails)),t=T((r=>Y(r))),C=T((r=>r.tenantState.fetchState)),a=T((r=>Kn(r,i))),A=T((r=>Wn(r,ke))),w=d.useMemo((()=>new Set(A.map((r=>r.additionalInfo)).filter((r=>r!=null)))),[A]),k=t.tenantId,O=fe(t.userRole??[]);d.useEffect((()=>{o(zn(ke))}),[o]);const P=a.externalConnections?.saveAPIKeyConnectionState,_=a.externalConnections?.saveAPIKeyConnectionError?.message,F=X(P);d.useEffect((()=>{F==="In-Progress"&&(P==="Completed"?g.trackIntegrationConnected("chargebee","Onboarding","revenue"):P==="Error"&&g.trackIntegrationConnectFailed("chargebee","Onboarding","revenue",_??""))}),[P,F,_]);const m=a.externalConnections?.saveOAuthConnectionState,b=a.externalConnections?.saveOAuthConnectionError?.message,D=X(m);d.useEffect((()=>{D==="In-Progress"&&(m==="Completed"?g.trackIntegrationConnected("hubspot","Onboarding","revenue"):m==="Error"&&g.trackIntegrationConnectFailed("hubspot","Onboarding","revenue",b??""))}),[m,D,b]);const V=a.externalConnections?.saveConnectorCredentialsStateBySlug,h=X(V);return d.useEffect((()=>{const r=V??{},x=h??{},E=a.externalConnections?.saveConnectorCredentialsErrorBySlug??{};Object.keys(r).forEach((f=>{if(x[f]!=="In-Progress")return;let j;try{j=Ce(f)}catch{return}r[f]==="Completed"?g.trackIntegrationConnected(j,"Onboarding","payments"):r[f]==="Error"&&g.trackIntegrationConnectFailed(j,"Onboarding","payments",E[f]?.message??"")}))}),[V,h,a]),d.useMemo((()=>({isAdmin:O,analytics:g,referrer:"Onboarding",integrationsView:a,isLoading:C==="In-Progress",notifyMeRegisteredSlugs:w,autoFocusTabId:p??void 0,saveChargeBeeState:a.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:a.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:a.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:a.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:a.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(a.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map((([r,x])=>[r,x?.message]))),deleteConnectionState:a.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:a.externalConnections?.deleteConnectionError?.message,onConnectGmail:()=>{g.trackIntegrationConnectClicked("gmail","Onboarding","email"),o(Qe(k,"gmail",tn()))},onConnectOutlook:()=>{g.trackIntegrationConnectClicked("outlook","Onboarding","email"),o(Qe(k,"outlook",tn()))},onConnectHubSpot:(r,x)=>{const E=a.externalConnections?.revenue?.find((j=>j.connectionName==="hubspot"))?.connectionId;if(E==null)return;g.trackIntegrationCredentialsSubmitted("hubspot","Onboarding","revenue");const f=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:r,client_secret:x,connection_id:E,redirect_uri:f,tenant_id:k})),window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(r)}&scope=${encodeURIComponent("oauth crm.objects.deals.read crm.objects.owners.read")}&redirect_uri=${encodeURIComponent(f)}`},onDisconnect:(r,x)=>{const E=[...a.externalConnections?.accounting??[],...a.externalConnections?.payments??[],...a.externalConnections?.revenue??[]].find((j=>j.connectionId===r))?.connectionName;let f;try{f=E!=null?Ce(E):void 0}catch{f=void 0}f!=null&&g.trackIntegrationDisconnected(f,"Onboarding",x),o(Xn(k,r,be(x)))},onNotifyMe:r=>{g.trackIntegrationsNotifyMeClicked("Onboarding",r),o(Zn(ke,r,l))},onReconnectQBO:()=>{ie.init("/onboarding/auth",e),ie.handleClick()},onRefreshClick:()=>{a.integrations.refreshQBO.fetchState!=="In-Progress"&&o(Jn())},onSaveChargeBeeCredentials:(r,x)=>{const E=a.externalConnections?.revenue?.find((f=>f.connectionName==="chargebee"))?.connectionId;E!=null&&(g.trackIntegrationCredentialsSubmitted("chargebee","Onboarding","revenue"),o(Hn(k,E,be("revenue"),Ce("chargebee"),{api_key:r,site:x})))},onSaveConnectorCredentials:r=>{g.trackIntegrationCredentialsSubmitted(r.connectionName,"Onboarding","payments"),o(qn(k,be("payments"),r))},plaidAccounts:u,onAddPlaidAccount:c,onReLoginPlaidAccount:v,plaidConnectionDetails:n})),[O,a,C,w,p,k,l,e,o,u,c,v,n])};function tn(){const e=new URL(window.location.href);return e.searchParams.set("onboarding_step","connect_data_source"),e.toString()}function an(e,l,i){let o=`/${e}/onboarding/address`;return o=i!=null?o.concat(`/edit/${l}/${encodeURIComponent(i)}`):o.concat(`/new/${l}`),o}const on=De.div`
|
|
27
27
|
display: flex;
|
|
28
28
|
height: 100vh;
|
|
29
29
|
background-color: ${e=>e.theme.colors.grey4};
|
|
30
|
-
`,sn=cn((function(e,l){const{companyId:i,currentTenant:o}=l,p=Ae(e,i),u=mn(e);return{hasVerifiedBankAccount:(p.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(u.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:fe(o?.userRole??[])&&p.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:W.getSignedInUser(),currentTenant:o}}),(function(e,l){const{currentTenant:i,themeState:o,navigate:p,location:u}=l,{tenantEmailDomain:c}=i;return{onZeniLogoClick:()=>{o.toggle()},handleLogOutClick:()=>{const v=z(u.state?.pathnameStackToGoBack,u.pathname);p("/signout",{replace:!0,state:{pathnameStackToGoBack:v,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleReferralsClick:()=>{p(`/${c}/rewards`)},handleUpdatePaymentAddressDetailClick:()=>{const v=z(u.state?.pathnameStackToGoBack,u.pathname);p(`/${c}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:v,message:"UpdatePaymentAddressDetail"}})}}}))(At),Lt=()=>{const e=fn(),l=_e(),i=se(),o=xe(),p=yn(),{useFeatureGate:u}=Pe(),{isFeatureEnabled:c}=u(Z.isDebitCardFeatureEnabled),{tenantEmailDomain:v}=Ee(),n=hn(),[t,C]=d.useState(!1);d.useEffect((()=>{t===!1&&o.state?.message==="OnboardingThankyou"&&C(!0)}),[o.state]);const a=T((m=>
|
|
30
|
+
`,sn=cn((function(e,l){const{companyId:i,currentTenant:o}=l,p=Ae(e,i),u=mn(e);return{hasVerifiedBankAccount:(p.paymentAccount?.providerVerificationStatus?.code?.includes("verified")??!1)||(u.bankAccountsList[0]?.providerVerificationStatus?.code?.includes("verified")??!1),isDisabled:fe(o?.userRole??[])&&p.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",signedInUser:W.getSignedInUser(),currentTenant:o}}),(function(e,l){const{currentTenant:i,themeState:o,navigate:p,location:u}=l,{tenantEmailDomain:c}=i;return{onZeniLogoClick:()=>{o.toggle()},handleLogOutClick:()=>{const v=z(u.state?.pathnameStackToGoBack,u.pathname);p("/signout",{replace:!0,state:{pathnameStackToGoBack:v,message:"logout"}})},handleCockpitClick:()=>{window.open("/cockpit")},handleReferralsClick:()=>{p(`/${c}/rewards`)},handleUpdatePaymentAddressDetailClick:()=>{const v=z(u.state?.pathnameStackToGoBack,u.pathname);p(`/${c}/onboarding/billing/edit`,{state:{pathnameStackToGoBack:v,message:"UpdatePaymentAddressDetail"}})}}}))(At),Lt=()=>{const e=fn(),l=_e(),i=se(),o=xe(),p=yn(),{useFeatureGate:u}=Pe(),{isFeatureEnabled:c}=u(Z.isDebitCardFeatureEnabled),{tenantEmailDomain:v}=Ee(),n=hn(),[t,C]=d.useState(!1);d.useEffect((()=>{t===!1&&o.state?.message==="OnboardingThankyou"&&C(!0)}),[o.state]);const a=T((m=>Y(m))),A=a.productSettings.isOtherProductsEnabled,w=A===!0&&!pn(a);d.useEffect((()=>{i(gn(k,!1,!w))}),[]);const k=a.companyId??W.getSignedInUserTenant(v)?.companyId;if(n.loggedInUser==null)throw Error("Can't access onboarding flow without signing in...");const O=Te(c,a),P=we(a),_=T((m=>m.onboardingCustomerViewState.updateStatus.fetchState)),F=a.company?.companyOnboardingInfo.isOnboardingCompleted;if(F!==!0||w)return _==="Completed"&&F===!0&&w&&n?.loggedInUserRoleMap!=null?s.jsxs(on,{children:[s.jsx(re,{analytics:g,onLoad:m=>{m.trackPageLoaded(ve.Event.onboardingLandingPage,"Onboarding",Ot(a.productSettings))}}),s.jsx(sn,{navigate:l,showUpdatePaymentDetailButton:A,location:o,companyId:k,currentTenant:a,themeState:p,isVisitingFirstTime:t,meetingUrl:e("onboarding_overview")})]}):_==="Completed"&&F===!1&&n?.loggedInUserRoleMap!=null?s.jsxs(on,{children:[s.jsx(re,{analytics:g,onLoad:m=>{m.trackPageLoaded(ve.Event.onboardingInterimPage)}}),s.jsx(sn,{navigate:l,showUpdatePaymentDetailButton:A,location:o,companyId:k,currentTenant:a,themeState:p,isVisitingFirstTime:t,meetingUrl:e("onboarding_overview")})]}):s.jsx(wt,{});{const m={pathnameStackToGoBack:o.state?.pathnameStackToGoBack,message:"activation"};return O?s.jsx(Q,{to:"../../checking",state:m,replace:!0}):P?s.jsx(Q,{to:"../../cards",state:m,replace:!0}):s.jsx(Q,{to:"../../dashboard",state:m,replace:!0})}};function rn(){return typeof Me=="function"?Me():void 0}let pe=0;function Rt(){d.useEffect((()=>{if(!ge.sentryDsn?.trim())return;let e,l=!1,i=0;const o=()=>{e!==void 0&&(clearInterval(e),e=void 0)},p=()=>{const u=rn();return u!==void 0&&(u.flush(),!0)};return pe+=1,p()||(e=setInterval((()=>{i+=1,(l||p()||i>=10)&&o()}),1e3)),()=>{l=!0,o(),pe-=1,queueMicrotask((()=>{pe===0&&(function(){const u=rn();if(u===void 0)return;const c=()=>{if(pe===0)try{u.startBuffering()}catch{}};u.stop().then(c,c)})()}))}}),[])}function pa(){return Rt(),s.jsxs(Dn,{children:[s.jsx(q,{path:"/",element:s.jsx(le,{})}),s.jsx(q,{path:"/billing/edit",element:s.jsx(le,{taxCFOCustomer:!0})}),s.jsx(q,{path:"/thankyou",element:s.jsx(Lt,{})}),s.jsx(q,{path:"/activation",element:s.jsx(Ut,{})}),s.jsx(q,{path:"/address/edit/:addressType/:addressId",element:s.jsx(le,{isOnAddressPage:!0,appContent:s.jsx(Ge,{})})}),s.jsx(q,{path:"/address/new/:addressType",element:s.jsx(le,{isOnAddressPage:!0,appContent:s.jsx(Ge,{})})}),s.jsx(q,{path:"*",element:s.jsx(An,{})})]})}export{pa as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-DOdRxZ-H.js";import{i as q,j as S,g as H,u as z,h as W,l as ne,k as oa,n as ht,o as P,N as vn}from"./core-R1zvmcG1.js";import{fI as Y,Ws as We,bF as sa,br as Ee,XQ as En,ke as xn,XR as Vt,XS as wn,kh as ft,XT as Qe,XU as Tn,km as Dn,XV as Gt,XW as Pn,kq as gt,XX as Ze,XY as On,XZ as Fn,WM as jn,ls as Rn,X_ as Mn,bn as Je,X$ as ra,Xq as le,bc as ia,lG as ca,lp as la,Xs as de,Xr as ae,fH as da,gd as Yn,gt as bt,Y0 as Bn,Y1 as Un,Y2 as ua,Y3 as Oe,Er as Ye,Es as Be,EQ as xe,EK as ue,Ew as Ue,Y4 as Ln,c0 as Le,Y5 as Vn,Y6 as Gn,Y7 as ma,Y8 as Fe,Y9 as Nn,ek as et,Ax as pa,Ya as $n,Yb as ha,Yc as zn,Yd as Kn,Ye as qn,Yf as _t,Vo as St,uh as we,m3 as Te,E_ as kt,AE as Xn,AL as Qn,Yg as Zn,Yh as Hn,Et as Nt,Yi as Wn,AA as Ie,Av as fa,Yj as ge,Yk as $t,Yl as Jn,Ym as yt,Vn as At,CI as ga,Yn as eo,Yo as ba,Yp as to,Yq as ao,Yr as no,Ys as It,CX as oo,D2 as so,Yt as ro,Yu as io,Ev as zt,Yv as co,CG as Ca,Yw as be,Yx as Kt,Yy as lo,bq as _a,F3 as Sa,Yz as uo,YA as ka,YB as mo,YC as po,YD as ho,YE as vt,EX as fo,EZ as go,YF as bo,YG as Co,Eu as qt,YH as _o,F1 as ya,YI as Ce,YJ as Xt,YK as So,YL as ko,YM as Aa,lU as Ia,p$ as va,lZ as Ea,pZ as xa,pY as wa,pX as Ta,C3 as yo,dd as Ao,pU as Io,UL as vo,q9 as Eo,YN as xo,YO as wo,YP as To,b5 as Et,q3 as Do,ih as Po,gL as Oo,q2 as Fo,li as jo,q0 as Ro,p_ as Mo,e0 as Yo,d$ as Bo}from"./zeni-epic-state-Mdu-dKQU.js";import{z as B,at as oe,p as O,l as w,G as X,b9 as Uo,aq as Ve,a6 as Ge,ba as Da,K as N,bb as Lo,bc as Pa,bd as Vo,be as Go,a as Oa,_ as Fa,d as ja,ap as No,bf as $o,am as zo,Y as xt,bg as Ra,x as re,bh as Ma,bi as Ya,as as Ba,bj as Ko,ag as Ne,V as $e,bk as qo,H as Xo,bl as Qo,$ as G,e as Zo,j as Ho,a2 as Wo,ao as Jo,bm as es,bn as ts,bo as as,bp as ve}from"./index-YJiDWVEq.js";import{u as ns,n as wt}from"./mui-ZKvbmPSP.js";import{a as b}from"./sentry-DvoFEQx8.js";import{w as Ua}from"./withTransactionSidePanel-BDeFEYwi.js";import{c as La,t as De,f as me,b as Tt,a as Dt,v as os}from"./routePaths-BNKCrZ3Q.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-DsA2c_Lu.js";import Me from"./NotFoundScreen-BBkmIYq4.js";import{u as Pt}from"./useInitialThreadRequest-GgBZ_4tu.js";import{t as Va}from"./analyticsHelper-DsYWZWVt.js";import{C as ss}from"./CompanyPassportScreen-Ce1nt64R.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-DmqH-0FB.js";import{F as is}from"./FeaturePreviewScreen-BGHnB8b3.js";import"./recharts-UmMlzZlF.js";import"./analytics-BE49_JfE.js";import"./plaid-tDbexfSh.js";import"./dnd-LSyMQh_7.js";import"./stripe-cKAAJElX.js";import"./lottie-Z_NAxrmn.js";import"./lexical-BG-nDmQN.js";import"./pdf-_w1KRTSP.js";import"./utils-D06mHID-.js";import"./TransactionDetailScreen-D_BQMHcD.js";import"./decodeURIComponentSafe-D4d600vS.js";import"./expenseAutomationHelper-BlCRyV8f.js";import"./stripSplatSuffix-BaAbZcaB.js";import"./MobileAppDrawer-19QV1aJW.js";import"./InboxNotificationsProvider--Aami2sh.js";import"./useTaskManagerAccess-B2Iv2NJX.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]="21f743b4-b9a8-4c11-91b0-2e9679afb3e2",e._sentryDebugIdIdentifier="sentry-dbid-21f743b4-b9a8-4c11-91b0-2e9679afb3e2")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=B.getSignedInUser(),i=S((_=>_.tenantState.currentTenantId)),l=S((_=>Y(_))),{tenantEmailDomain:m}=q(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=z(),g=W(),y=S((_=>En(_,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(xn(o,u))}),[u]),I=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((_,A)=>{C(Vt({sortKey:_,sortOrder:A}))}),[]),x=b.useCallback((_=>{C(Vt({downloadState:_}))}),[]),R=b.useCallback((_=>{if(e)e(_.transactionId,_.transactionType);else if(m!=null){const A=La({id:_.transactionId,type:_.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),T=b.useCallback((()=>{y.vendor!=null&&w.trackApAgingDetail("AP Aging",u.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&T()}),[T,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:w,onTransactionClick:R,onReload:E,onBackClick:I,onColumnSortConfigChanged:k,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=z(),a=W(),t=S((k=>wn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S((k=>k.tenantState.currentTenantId)),i=S((k=>Y(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,x)=>{e(Qe({sortKey:x,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,x)=>{}),[]),I=b.useCallback(((k,x)=>{e(Qe({selectedDate:k,agingDateSelectionType:x})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:w,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:I,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=B.getSignedInUser(),i=S((T=>Y(T))),{tenantEmailDomain:l}=q(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=z(),C=W(),g=S((T=>Tn(T,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),I=b.useCallback(((T,_)=>{u(Gt({sortKey:T,sortOrder:_}))}),[]),k=b.useCallback((T=>{u(Gt({downloadState:T}))}),[]),x=b.useCallback((T=>{if(e)e(T.transactionId,T.transactionType);else if(l!=null){const _=La({id:T.transactionId,type:T.transactionType},l);C(_);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(_,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&w.trackArAgingDetail("AR Aging",c.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:w,onTransactionClick:x,onReload:y,onBackClick:E,onColumnSortConfigChanged:I,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=z(),a=W(),t=S((I=>Pn(I))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S((I=>Y(I))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((I=>{e(Ze({searchString:I}))}),[]),u=b.useCallback(((I,k)=>{e(Ze({sortKey:k,sortOrder:I}))}),[]),C=b.useCallback((I=>{a(`./${I}/${p.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((I=>{e(Ze({downloadState:I}))}),[]),y=b.useCallback(((I,k)=>{e(Ze({selectedDate:I,agingDateSelectionType:k})),e(gt(I))}),[]),E=b.useCallback(((I,k)=>{e(On({nodeId:I,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:w,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:X.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:w}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=B.getSignedInUser(),n=Je(t);return{sectionTitle:X.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:w}}),Na)(Pa);function hs(){const e=W(),a=H(),{tenantEmailDomain:t}=q(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=W(),a=H(),{tenantEmailDomain:t}=q(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=wt.div`
|
|
1
|
+
import{j as d}from"./liveblocks-BYqz0SWy.js";import{i as q,j as S,g as H,u as z,h as W,l as ne,k as oa,n as ht,o as P,N as vn}from"./core-B1R51LGS.js";import{fI as Y,Ws as We,bF as sa,br as Ee,XQ as En,ke as xn,XR as Vt,XS as wn,kh as ft,XT as Qe,XU as Tn,km as Dn,XV as Gt,XW as Pn,kq as gt,XX as Ze,XY as On,XZ as Fn,WM as jn,ls as Rn,X_ as Mn,bn as Je,X$ as ra,Xq as le,bc as ia,lG as ca,lp as la,Xs as de,Xr as ae,fH as da,gd as Yn,gt as bt,Y0 as Bn,Y1 as Un,Y2 as ua,Y3 as Oe,Er as Ye,Es as Be,EQ as xe,EK as ue,Ew as Ue,Y4 as Ln,c0 as Le,Y5 as Vn,Y6 as Gn,Y7 as ma,Y8 as Fe,Y9 as Nn,ek as et,Ax as pa,Ya as $n,Yb as ha,Yc as zn,Yd as Kn,Ye as qn,Yf as _t,Vo as St,uh as we,m3 as Te,E_ as kt,AE as Xn,AL as Qn,Yg as Zn,Yh as Hn,Et as Nt,Yi as Wn,AA as Ie,Av as fa,Yj as ge,Yk as $t,Yl as Jn,Ym as yt,Vn as At,CI as ga,Yn as eo,Yo as ba,Yp as to,Yq as ao,Yr as no,Ys as It,CX as oo,D2 as so,Yt as ro,Yu as io,Ev as zt,Yv as co,CG as Ca,Yw as be,Yx as Kt,Yy as lo,bq as _a,F3 as Sa,Yz as uo,YA as ka,YB as mo,YC as po,YD as ho,YE as vt,EX as fo,EZ as go,YF as bo,YG as Co,Eu as qt,YH as _o,F1 as ya,YI as Ce,YJ as Xt,YK as So,YL as ko,YM as Aa,lU as Ia,p$ as va,lZ as Ea,pZ as xa,pY as wa,pX as Ta,C3 as yo,dd as Ao,pU as Io,UL as vo,q9 as Eo,YN as xo,YO as wo,YP as To,b5 as Et,q3 as Do,ih as Po,gL as Oo,q2 as Fo,li as jo,q0 as Ro,p_ as Mo,e0 as Yo,d$ as Bo}from"./zeni-epic-state-M9sMLOaG.js";import{z as B,at as oe,p as O,l as w,G as X,b9 as Uo,aq as Ve,a6 as Ge,ba as Da,K as N,bb as Lo,bc as Pa,bd as Vo,be as Go,a as Oa,_ as Fa,e as ja,ap as No,bf as $o,am as zo,c as xt,bg as Ra,x as re,bh as Ma,bi as Ya,as as Ba,bj as Ko,ag as Ne,V as $e,bk as qo,H as Xo,bl as Qo,$ as G,f as Zo,j as Ho,a2 as Wo,ao as Jo,bm as es,bn as ts,bo as as,bp as ve}from"./index-Dp_Uc3gy.js";import{u as ns,n as wt}from"./mui-D-_RYGgU.js";import{a as b}from"./sentry-DjmIorbX.js";import{w as Ua}from"./withTransactionSidePanel-BuJ7rAhb.js";import{c as La,t as De,f as me,b as Tt,a as Dt,v as os}from"./routePaths-BALvGXpp.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-DWkTPomv.js";import Me from"./NotFoundScreen-DDA41Ig7.js";import{u as Pt}from"./useInitialThreadRequest-BaIZPAUw.js";import{t as Va}from"./analyticsHelper-BkudU6tc.js";import{C as ss}from"./CompanyPassportScreen-DFOWHlG6.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-B5pmnrb8.js";import{F as is}from"./FeaturePreviewScreen-DETqyCpy.js";import"./recharts-By7FVN8f.js";import"./analytics-DhotUQIQ.js";import"./plaid-B0PWXAfV.js";import"./dnd-CBDtHD8g.js";import"./stripe-cKAAJElX.js";import"./lottie-C4orech3.js";import"./lexical-Cft6chCX.js";import"./pdf-DFgrdLB6.js";import"./utils-iOnDyQuG.js";import"./TransactionDetailScreen-CS9DS32g.js";import"./decodeURIComponentSafe-sNmSv15A.js";import"./expenseAutomationHelper-Bb1c_nBx.js";import"./stripSplatSuffix-B5IwbFj2.js";import"./MobileAppDrawer-CsfNveW9.js";import"./InboxNotificationsProvider-LdTK3V9o.js";import"./useTaskManagerAccess-CFJAytRv.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]="824b4886-2aac-4e73-b8fc-2c9d62fcd0fd",e._sentryDebugIdIdentifier="sentry-dbid-824b4886-2aac-4e73-b8fc-2c9d62fcd0fd")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=B.getSignedInUser(),i=S((_=>_.tenantState.currentTenantId)),l=S((_=>Y(_))),{tenantEmailDomain:m}=q(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=z(),g=W(),y=S((_=>En(_,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(xn(o,u))}),[u]),I=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((_,A)=>{C(Vt({sortKey:_,sortOrder:A}))}),[]),x=b.useCallback((_=>{C(Vt({downloadState:_}))}),[]),R=b.useCallback((_=>{if(e)e(_.transactionId,_.transactionType);else if(m!=null){const A=La({id:_.transactionId,type:_.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),T=b.useCallback((()=>{y.vendor!=null&&w.trackApAgingDetail("AP Aging",u.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&T()}),[T,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:w,onTransactionClick:R,onReload:E,onBackClick:I,onColumnSortConfigChanged:k,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=z(),a=W(),t=S((k=>wn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S((k=>k.tenantState.currentTenantId)),i=S((k=>Y(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,x)=>{e(Qe({sortKey:x,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,x)=>{}),[]),I=b.useCallback(((k,x)=>{e(Qe({selectedDate:k,agingDateSelectionType:x})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:w,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:I,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=B.getSignedInUser(),i=S((T=>Y(T))),{tenantEmailDomain:l}=q(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=z(),C=W(),g=S((T=>Tn(T,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),I=b.useCallback(((T,_)=>{u(Gt({sortKey:T,sortOrder:_}))}),[]),k=b.useCallback((T=>{u(Gt({downloadState:T}))}),[]),x=b.useCallback((T=>{if(e)e(T.transactionId,T.transactionType);else if(l!=null){const _=La({id:T.transactionId,type:T.transactionType},l);C(_);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(_,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&w.trackArAgingDetail("AR Aging",c.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:w,onTransactionClick:x,onReload:y,onBackClick:E,onColumnSortConfigChanged:I,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=z(),a=W(),t=S((I=>Pn(I))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S((I=>Y(I))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((I=>{e(Ze({searchString:I}))}),[]),u=b.useCallback(((I,k)=>{e(Ze({sortKey:k,sortOrder:I}))}),[]),C=b.useCallback((I=>{a(`./${I}/${p.format(X.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((I=>{e(Ze({downloadState:I}))}),[]),y=b.useCallback(((I,k)=>{e(Ze({selectedDate:I,agingDateSelectionType:k})),e(gt(I))}),[]),E=b.useCallback(((I,k)=>{e(On({nodeId:I,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:w,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:w,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:X.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:w}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=B.getSignedInUser(),n=Je(t);return{sectionTitle:X.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:w}}),Na)(Pa);function hs(){const e=W(),a=H(),{tenantEmailDomain:t}=q(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=W(),a=H(),{tenantEmailDomain:t}=q(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=wt.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-BYqz0SWy.js";import{a as u}from"./sentry-DjmIorbX.js";import{u as w,j as b,l as y,g as U,N as A}from"./core-B1R51LGS.js";import{Uu as N,fI as _,go as k,Uv as L,pW as R,Uw as z}from"./zeni-epic-state-M9sMLOaG.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-Dp_Uc3gy.js";import"./mui-D-_RYGgU.js";import{t as P}from"./getLocaleForTenant-Nj4zPyxj.js";import"./recharts-By7FVN8f.js";import"./analytics-DhotUQIQ.js";import"./plaid-B0PWXAfV.js";import"./dnd-CBDtHD8g.js";import"./stripe-cKAAJElX.js";import"./lottie-C4orech3.js";import"./lexical-Cft6chCX.js";import"./pdf-DFgrdLB6.js";import"./utils-iOnDyQuG.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]="d73b09da-2f5b-499c-95a6-e5ebd93abece",t._sentryDebugIdIdentifier="sentry-dbid-d73b09da-2f5b-499c-95a6-e5ebd93abece")}catch{}})();const G=y((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=U(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=w(),{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&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-Bvz9Us9E.js → DomesticWireDetailScreen-CVJejZP9.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-BYqz0SWy.js";import{h as w,g as C,j as h,l as A,i as V}from"./core-B1R51LGS.js";import{Zt as k,ZA as J,gJ as L,gI as M,gH as W,kT as X,Xr as q,uV as K,fI as D,Z0 as B,kR as T,Zu as S,ZD as F,kP as G,la as j}from"./zeni-epic-state-M9sMLOaG.js";import{bL as Q,_ as R,c as N,z as Z,a2 as p,$ as v,a5 as U,bM as Y,E as _,bN as ee,p as te}from"./index-Dp_Uc3gy.js";import{u as H,n as O}from"./mui-D-_RYGgU.js";import"./sentry-DjmIorbX.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]="9355634f-6522-424c-8cb5-9418a1ff9b64",e._sentryDebugIdIdentifier="sentry-dbid-9355634f-6522-424c-8cb5-9418a1ff9b64")}catch{}})();const ne=A(null,(function(e,t){return{onSaveVendor:n=>{e(X(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(M(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(L(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(J(n,a,o))}}}))(Q);function z({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -6,7 +6,7 @@ import{j as l}from"./liveblocks-DOdRxZ-H.js";import{h as w,g as C,j as h,l as A,
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
align-items: center;
|
|
8
8
|
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
-
`,oe=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=B(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),r=s.poppedPathname??P();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(F({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??P(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}}))(
|
|
9
|
+
`,oe=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=B(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{navigate:n,location:a,vendorId:o}=t;return{onFetchBankName:s=>{e(j(s))},onSaveHandler:s=>{e(G(t.bankAccountContext,s,"standard",o))},onCancel:()=>{(()=>{const s=p(a.state?.pathnameStackToGoBack),r=s.poppedPathname??P();n(r,{state:{pathnameStackToGoBack:s.newStack}})})(),e(S())},onACHDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(F({data:r}))},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")n("../",{relative:"path"});else{const s=p(t.location.state?.pathnameStackToGoBack),r=s.poppedPathname??P(0);t.navigate(r,{state:{pathnameStackToGoBack:s.newStack}})}e(S())}}}))(Y);function fe({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:r}=V(),d=e??s,{useFeatureGate:c}=N(),i=Z.getSignedInUser(),b=h((u=>D(u))),g=H(),I=p(a.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,d))),{isFeatureEnabled:x}=c(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=c(v.isDepositAccountsFeatureEnabled);if(i==null)throw Error("Can't access address page without signing in...");return f==="billDetail"&&m.editVendorState?.saveStatus.fetchState==="In-Progress"?l.jsx(U,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:g.colors.grey5}}):l.jsxs(ae,{windowSize:o,children:[l.jsx(z,{vendorId:d,billId:r}),l.jsx(oe,{location:a,navigate:n,billId:r,vendorId:d,currentTenant:b,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const P=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},me=(e,t,n)=>{let a=`/${e}/bill/${encodeURIComponent(t)}`;return n=="draft"&&(a+="/edit"),a},he=e=>`/${e}/bills`,ke=(e,t)=>{let n=`/${e}/bill`;return n=t!=null?n.concat(`/${t}/edit`):n.concat("/new"),n},E=(e,t,n,a)=>{let o=`/${e}/bill`;return o+=n!=null?`/${n}/edit/vendor`:"/new/vendor",o+=a!=null?`/${a}/edit/${t}`:`/create/${t}`,o};function Se(e,t,n){return E(e,"ach",t,n)}function ve(e,t,n){return E(e,"domestic",t,n)}function ge(e,t,n){return E(e,"international",t,n)}const se=(e,t,n)=>{let a=`/${e}/bill/`;return a=n!=null?a.concat(`${encodeURIComponent(n)}/${t}/`):a.concat(`new/${t}/`),a},ce=O.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100vh;
|
|
12
12
|
width: 100%;
|
|
@@ -15,4 +15,4 @@ import{j as l}from"./liveblocks-DOdRxZ-H.js";import{h as w,g as C,j as h,l as A,
|
|
|
15
15
|
align-items: center;
|
|
16
16
|
background-color: ${e=>e.theme.colors.grey4};
|
|
17
17
|
box-shadow: ${e=>`0px 2px ${_.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
18
|
-
`,re=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=B(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:
|
|
18
|
+
`,re=A((function(e,t){const{vendorId:n,billId:a}=t,o=k(e,n),s=B(e,t.isVendorRecommendationEnabled,t.isZeniAccountsFeatureEnabled,a);return{billId:a,isDisabled:o.bankAccountCreationState.fetchState==="In-Progress"?"readonly":void 0,vendorViewDetails:o,file:s.file,bankAccountContext:t.bankAccountContext}}),(function(e,t){const{billId:n,navigate:a,location:o,vendorId:s,currentTenant:r}=t,{tenantEmailDomain:d}=r;return{onFetchBankName:c=>{e(j(c))},onSaveHandler:c=>{e(G(t.bankAccountContext,c,"us-domestic",s))},onWireDetailsUpdated:c=>{const{bankAccountSection:i}=c;e(F({data:i}))},onCancel:()=>{(()=>{const c=p(o.state?.pathnameStackToGoBack),i=c.poppedPathname??$();a(i,{state:{pathnameStackToGoBack:c.newStack}})})(),e(S())},onAddressClick:c=>{if(t.bankAccountContext==="express-pay")a("./add-address");else{const i=se(d,c,n),b=te(o.state?.pathnameStackToGoBack,o.pathname);a(i,{state:{pathnameStackToGoBack:b}})}},onBackClick:()=>{if(e(T({fetchState:"Not-Started"})),t.bankAccountContext==="express-pay")a("../",{relative:"path"});else{const c=p(t.location.state?.pathnameStackToGoBack),i=c.poppedPathname??$(0);t.navigate(i,{state:{pathnameStackToGoBack:c.newStack}})}e(S())}}}))(ee);function Ie({vendorIdParam:e,accountContext:t}){const n=w(),a=C(),o=R(),{vendorId:s,billId:r}=V(),d=e??s,c=Z.getSignedInUser(),{useFeatureGate:i}=N(),b=H(),g=h((u=>D(u))),I=p(a.state?.pathnameStackToGoBack),f=t??(I.poppedPathname?.includes("vendor")===!0?"vendor":"billDetail"),m=h((u=>k(u,d))),{isFeatureEnabled:x}=i(v.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:y}=i(v.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(U,{fetchState:m.editVendorState?.saveStatus.fetchState??"Not-Started",style:{backgroundColor:b.colors.grey5,boxShadow:`0px 2px ${_.sp1} ${b.colors.dropShadowNormal}`}}):l.jsxs(ce,{windowSize:o,children:[l.jsx(z,{vendorId:d,billId:r}),l.jsx(re,{location:a,navigate:n,billId:r,vendorId:d,currentTenant:g,bankAccountContext:f,isVendorRecommendationEnabled:x,isZeniAccountsFeatureEnabled:y})]})}const $=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t};export{fe as A,Ie as D,z as V,me as a,se as b,ke as c,ve as d,he as g,ge as i,Se as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-BYqz0SWy.js";import{_ as l,a9 as c}from"./index-Dp_Uc3gy.js";import{u as f,D as p}from"./mui-D-_RYGgU.js";import"./sentry-DjmIorbX.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]="7343a8d4-dee6-4ca7-9ab3-2b3236099e14",e._sentryDebugIdIdentifier="sentry-dbid-7343a8d4-dee6-4ca7-9ab3-2b3236099e14")}catch{}})();const b={drawerLeftMargin:new c(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=l(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=f();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-BYqz0SWy.js";import{a as c}from"./sentry-DjmIorbX.js";import{h as q,u as A,g as G,i as N,j as d,N as W,l as X,n as F,o as O}from"./core-B1R51LGS.js";import{Xw as _,fI as M,WN as R,n3 as Y,SN as k,XB as $,Xq as z,m3 as V,SO as P,WS as H,WT as J,Xs as K,Xr as L}from"./zeni-epic-state-M9sMLOaG.js";import{b6 as Q,l as U,a2 as Z,p as tt}from"./index-Dp_Uc3gy.js";import"./mui-D-_RYGgU.js";import{d as I}from"./decodeURIComponentSafe-sNmSv15A.js";import{w as et}from"./withTransactionSidePanel-BuJ7rAhb.js";import{f as at,c as nt}from"./routePaths-BALvGXpp.js";import"./recharts-By7FVN8f.js";import"./analytics-DhotUQIQ.js";import"./plaid-B0PWXAfV.js";import"./dnd-CBDtHD8g.js";import"./stripe-cKAAJElX.js";import"./lottie-C4orech3.js";import"./lexical-Cft6chCX.js";import"./pdf-DFgrdLB6.js";import"./utils-iOnDyQuG.js";import"./useAskAiCfoHostNavButtonProps-DWkTPomv.js";import"./TransactionDetailScreen-CS9DS32g.js";import"./useInitialThreadRequest-BaIZPAUw.js";import"./expenseAutomationHelper-Bb1c_nBx.js";import"./stripSplatSuffix-B5IwbFj2.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]="a6866467-5cf7-4cd2-8cf2-4241e73c8538",a._sentryDebugIdIdentifier="sentry-dbid-a6866467-5cf7-4cd2-8cf2-4241e73c8538")}catch{}})();const ot=X((function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:V(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),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(P(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(P(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:a,...t}){const e=q(),o=A(),l=G(),[m,T]=c.useState(!1),[h,D]=c.useState(!1),{tenantEmailDomain:b,entityIdEncoded:w,entityNameEncoded:x}=N(),r=I(w??""),p=I(x??""),f=rt(r,p),j=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=d((n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),v=d((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=d((n=>R(n.trendWithTransactionsState,i,"EntityDetail")));c.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))}),[m,f,i]);const S=d((n=>n.trendState.fetchState)),E=u?.selectedPeriod?.timePeriod??g,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return c.useEffect((()=>{m===!0&&h===!1&&S==="Completed"&&(D(!0),E!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,h,S]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(W,{to:C(j.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 vt({entityType:a}){return s.jsx(F,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{vt as EntityDetailRoutes,vt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-DoK_XMNy.js → ExpenseAutomationRoutes-BNvZ1Bwi.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as T}from"./liveblocks-
|
|
1
|
+
import{j as T}from"./liveblocks-BYqz0SWy.js";import{u as Se,h as _e,g as fe,j as O,i as Te,t as qn,l as io,n as lo,o as Ge,N as ro}from"./core-B1R51LGS.js";import{fI as ye,a1F as Jn,q4 as De,UN as xt,Aq as uo,a1G as mo,a1H as po,a1I as ho,a1J as yt,a1K as it,gk as Rt,a1L as In,eH as So,g3 as fo,a1M as Cn,a1N as lt,qX as go,uY as Io,gW as Co,gU as ko,a1O as bo,r8 as To,rh as yo,qf as Po,qt as Yn,gT as re,gV as vo,a1P as Eo,qP as Wn,ri as Ao,qq as xo,ql as Ro,v2 as wo,gS as Fe,a1Q as ut,CA as Hn,N3 as Kn,a1R as Xn,F_ as Qn,a1S as Do,e$ as Fo,f1 as _o,sZ as wt,Xx as kn,Xz as Mo,m6 as Oo,XA as Uo,md as Bo,dm as Vo,DT as Dt,a1T as jo,a1U as $o,a1V as zo,a1W as Lo,fp as Ft,sN as bn,Xq as Go,a1X as No,a1Y as qo,mf as Jo,a1Z as Yo,RO as Wo,me as Ho,m3 as Ko,qI as Zn,rn as mt,tA as ea,tW as Xo,UD as ta,rm as Tn,rp as na,rr as Qo,bF as Zo,nC as es,nz as ts,rq as rt,ro as be,a1_ as ns,rI as yn,a1$ as as,a20 as os,sR as ss,sS as cs,Xm as is,Ws as ls,a17 as rs,a21 as ds,Xs as Pn,Xr as ct,a22 as vn,mu as us,a23 as ms,a24 as ps,a25 as hs,a26 as Ss,qD as fs,a27 as gs,a28 as Is,a29 as Cs,ry as ks,mh as bs,m8 as Ts,a2a as ys,mg as En,XK as Ps,a2b as vs,a2c as Es,uz as As,ua as xs,u9 as Pt,a2d as Rs,a2e as ws,a2f as Ds,a2g as Fs,nN as _s,br as aa,nI as An,nu as Ms,a2h as Os,h3 as Us,nF as Bs,s$ as Vs,t1 as js,sK as $s,Wv as zs,Ww as Ls,Fs as Gs,Fr as Ns,FI as qs,a2i as xn,sQ as Js,sl as Ys,a2j as Ws,s1 as Hs,s6 as Ks,sh as Xs,s4 as Qs,a2k as Zs,rZ as ec,sg as tc,sW as nc,a2l as ac,t7 as oc,sE as sc,td as cc,sJ as ic,rJ as lc,a2m as rc,q$ as dc,qz as uc,qG as Rn,rt as mc,a2n as pc,a2o as hc,a2p as Sc,a2q as fc,a2r as gc,a2s as Ic,a2t as Cc,th as kc,a2u as bc,a2v as Tc,a2w as wn,uK as yc,u1 as Pc,tS as Dn,tQ as vc,a2x as Ec,tF as Ac,tk as xc,tT as Rc,a2y as wc,a2z as Dc,tq as Fc,a2A as _c,tl as Mc,tp as Oc,tn as Uc,tZ as Bc,a2B as Vc,q8 as Fn,a2C as jc,E3 as _n,cz as $c}from"./zeni-epic-state-M9sMLOaG.js";import Ut from"./NotFoundScreen-DDA41Ig7.js";import{a as o,R as oa}from"./sentry-DjmIorbX.js";import{n as Me,S as zc}from"./mui-D-_RYGgU.js";import{c as qe,$ as X,l as ee,p as Z,ao as sa,aq as ca,dM as Lc,dN as Gc,z as Je,dO as _t,dP as Nc,dQ as qc,ac as Ne,dR as Jc,dS as Mn,b8 as On,dT as Yc,a5 as ia,dU as Wc,j as dt,a as Hc,dV as Kc,dW as Xc,k as Qc,V as Zc,dX as ei,dY as ti,dZ as ni,b2 as ai,bq as oi,a9 as si,b3 as ci,b4 as ii,G as la,w as li,d_ as ri,at as Mt,d$ as di,a2 as ui,e0 as mi}from"./index-Dp_Uc3gy.js";import{u as Bt}from"./useAskAiCfoHostNavButtonProps-DWkTPomv.js";import{g as Un,b as pi,c as hi,h as Si,a as fi,i as gi,r as Ii,C as Ci}from"./TransactionDetailScreen-CS9DS32g.js";import{u as ki,a as bi}from"./useActualMatchingMatchDetail-CuDY29_K.js";import{d as Ti}from"./decodeURIComponentSafe-sNmSv15A.js";import{m as Vt,a as ra,b as da,i as Ot}from"./expenseAutomationHelper-Bb1c_nBx.js";import{u as ua,a as ma,w as yi}from"./withTransactionSidePanel-BuJ7rAhb.js";import{b as Pi,S as vi,a as Ei,J as Ai}from"./ScheduleDetailsPrepaidExpensesScreen-OdknWRFf.js";import{s as Bn,i as pa,h as xi,v as Ri,c as wi}from"./routePaths-BALvGXpp.js";import{a as vt}from"./accountMappingHelper-1wM-u5pk.js";import{D as Di}from"./DrawerScreen-Bev9sxN6.js";import"./recharts-By7FVN8f.js";import"./analytics-DhotUQIQ.js";import"./plaid-B0PWXAfV.js";import"./dnd-CBDtHD8g.js";import"./stripe-cKAAJElX.js";import"./lottie-C4orech3.js";import"./lexical-Cft6chCX.js";import"./pdf-DFgrdLB6.js";import"./utils-iOnDyQuG.js";import"./useInitialThreadRequest-BaIZPAUw.js";import"./stripSplatSuffix-B5IwbFj2.js";import"./pathToGoBack-DZ8Lgq0-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="aa8b360a-3222-4a76-98cd-37c7675f9168",t._sentryDebugIdIdentifier="sentry-dbid-aa8b360a-3222-4a76-98cd-37c7675f9168")}catch{}})();const Fi=()=>{const t=Se(),a=_e(),S=fe(),I=O((u=>ye(u))),{useFeatureGate:d}=qe(),{isFeatureEnabled:i}=d(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:l}=d(X.aiAuditScorePercentage),x=O((u=>u.expenseAutomationViewState.selectedPeriodByTenantId)),r=O((u=>Jn(u,I.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:R}=Bt({mobileExploreReferrer:"Month-End Close Overview"}),C=o.useCallback(((u,y,p=!1)=>{t(De({tenantId:y,period:{month:u.month,year:u.year},refreshViewInBackground:p}))}),[]),h=o.useCallback((u=>{const y=S.state?.referrer;r.monthEndCloseChecks?.auditSummary!=null&&ee.trackMonthCloseAuditPage(u.month,u.year,r.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",r.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,y??null),t(xt(I.tenantId,u))}),[I.tenantId,r.monthEndCloseChecks?.auditSummary,r.monthEndCloseChecks?.reportEmailSentDate]),g=x[I.tenantId],D=o.useCallback((()=>{const u=S.state?.referrer;r.monthEndCloseChecks?.auditSummary!=null&&ee.trackMonthCloseAuditPage(g.month,g.year,r.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",r.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,u??null),C(g,I.tenantId,!0)}),[C,g,I.tenantId,r.monthEndCloseChecks?.auditSummary,r.monthEndCloseChecks?.reportEmailSentDate]),B=Z(S.state?.pathnameStackToGoBack,S.pathname),V=o.useCallback((()=>{if(r.monthEndCloseChecks!=null&&g!=null){const u=r.monthEndCloseChecks.monthEndCloseCheckList.find((y=>y.progress<100));if(u!=null)return void a(`./${u.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:B,message:"comingFromOverview"}});a(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:B,message:"comingFromOverview"}})}}),[r.monthEndCloseChecks,g]),{areTenantIdsInSync:b}=sa();return ca({isDataReady:r.fetchState==="Completed"}),o.useEffect((()=>{g!=null&&r.fetchState!=="In-Progress"&&r.fetchState!=="Completed"&&b&&C(g,I.tenantId)}),[C,g,r.fetchState,I.tenantId,b]),o.useEffect((()=>{g!=null&&r.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&r.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&b&&t(uo(g))}),[g,r.monthClosePerformanceTrendFetchStatus.fetchState,b]),o.useEffect((()=>{const u=setInterval((()=>{r.fetchState!=="In-Progress"&&r.fetchState==="Completed"&&D()}),3e5);return()=>clearInterval(u)}),[r.fetchState]),o.useEffect((()=>{if(r.fetchState==="Completed"&&r.monthEndCloseChecks?.auditSummary!=null){const u=S.state?.referrer;ee.trackMonthCloseAuditPage(r.selectedPeriod.month,r.selectedPeriod.year,r.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",r.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,u??null)}}),[r.fetchState,r.selectedPeriod,r.monthEndCloseChecks?.auditSummary,r.monthEndCloseChecks?.reportEmailSentDate]),T.jsx(_i,{children:T.jsx(Lc,{monthEndCloseChecksView:r,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:u=>{a(`./${u}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:B,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:h,handleReviewButtonClick:V,onBackClick:()=>{a("../../dashboard")},onReload:D,isAiCfoAccessEnabled:v,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:l})})},_i=Me.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-BYqz0SWy.js";import{a as r}from"./sentry-DjmIorbX.js";import{au as f,av as i,Z as l,a2 as p}from"./index-Dp_Uc3gy.js";import"./mui-D-_RYGgU.js";import m from"./NotFoundScreen-DDA41Ig7.js";import{h as b,g as u}from"./core-B1R51LGS.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]="c5cccb90-93ef-49b9-9d2f-d25df6a7e6b3",e._sentryDebugIdIdentifier="sentry-dbid-c5cccb90-93ef-49b9-9d2f-d25df6a7e6b3")}catch{}})();const _=()=>{const e=b(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=p(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=f(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{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./sentry-
|
|
1
|
+
import{a as i}from"./sentry-DjmIorbX.js";import{u as l,h as f,g as m}from"./core-B1R51LGS.js";import{i0 as p,V8 as g,V9 as _}from"./zeni-epic-state-M9sMLOaG.js";import{u as b,L as h,z as y}from"./index-Dp_Uc3gy.js";import"./liveblocks-BYqz0SWy.js";import"./recharts-By7FVN8f.js";import"./mui-D-_RYGgU.js";import"./analytics-DhotUQIQ.js";import"./plaid-B0PWXAfV.js";import"./dnd-CBDtHD8g.js";import"./stripe-cKAAJElX.js";import"./lottie-C4orech3.js";import"./lexical-Cft6chCX.js";import"./pdf-DFgrdLB6.js";import"./utils-iOnDyQuG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a48ab914-268c-45f4-8c38-e3b31f5837ea",e._sentryDebugIdIdentifier="sentry-dbid-a48ab914-268c-45f4-8c38-e3b31f5837ea")}catch{}})();function V(){const e=l(),n=f(),r=m(),{setLoading:o,clearAllLoading:d}=b(),a=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(r.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as s}from"./liveblocks-
|
|
1
|
+
import{n as s}from"./liveblocks-BYqz0SWy.js";import{j as c}from"./core-B1R51LGS.js";import{fI as f}from"./zeni-epic-state-M9sMLOaG.js";import"./sentry-DjmIorbX.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="25fc1afa-344c-4436-b7c0-ce0cb6697f63",e._sentryDebugIdIdentifier="sentry-dbid-25fc1afa-344c-4436-b7c0-ce0cb6697f63")}catch{}})();const b=()=>c((e=>f(e))).tenantId==null?{inboxNotifications:[],isLoading:!1,isFetchingMore:!1,hasFetchedAll:!0,fetchMore:()=>null}:(()=>{const{inboxNotifications:e,isLoading:o,isFetchingMore:i,hasFetchedAll:t,fetchMore:n}=s();return{inboxNotifications:e,isLoading:o,isFetchingMore:i,hasFetchedAll:t,fetchMore:n}})();export{b as u};
|