@zeniai/web-app-ui 5.1.27-dev → 5.1.27-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddressRoutes-BEx7pIyJ.js → AddressRoutes-grM9hmtH.js} +1 -1
- package/dist/assets/{AddressScreen-NX75uxLP.js → AddressScreen-m3-Kscdf.js} +1 -1
- package/dist/assets/{AiCfoScreen-CZb65z7d.js → AiCfoScreen-FswGnA2W.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DpviM7Hj.js → BillPayApprovalRoutes-pW0mD7wM.js} +1 -1
- package/dist/assets/{BillPayRoutes-CEExTPhN.js → BillPayRoutes-B2Z3NvHi.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BrTGOncN.js → BusinessVerificationPageScreen-C-6S-jFq.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-B1YXL7MO.js → ChargeCardRoutes-Boj3Vpg3.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-i0UsKfLm.js → CompanyPassportScreen-BXvU3-bZ.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-C5vKD3w5.js → ConnectionAuthScreen-ByuhDlR6.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-CiW0f9pK.js → CustomerOnboardingAuthScreen-xEDT9ftG.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-OE4wpozP.js → CustomerOnboardingRoutes-kLBRPvaQ.js} +1 -1
- package/dist/assets/{DashboardRoutes-7xj8FEBo.js → DashboardRoutes-De2_e-6I.js} +1 -1
- package/dist/assets/{DefaultTenantHome-ChjGBZYC.js → DefaultTenantHome-CNCiGI3m.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-D6V50bQg.js → DomesticWireDetailScreen-BNqpU9kr.js} +1 -1
- package/dist/assets/{DrawerScreen-DJHmM0O7.js → DrawerScreen-BLYKH6HL.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-C4efmnJS.js → EntityDetailRoutes-CMTMCLDV.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-D9ixaUzm.js → ExpenseAutomationRoutes-HgQuX9He.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-BAyL66YE.js → FeaturePreviewScreen--3IRWa9I.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-BPiwWr2-.js → HubSpotOAuthCallbackScreen-CLi29ZpN.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-cUIc5JL6.js → MagicLinkRoutes-CSv1U0vJ.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-C33e3haJ.js → MagicLinkSignInScreen-fAlnVOPG.js} +1 -1
- package/dist/assets/{MobileAppDrawer-CZdE1-bN.js → MobileAppDrawer-Cvrk0aA5.js} +1 -1
- package/dist/assets/{NotFoundScreen-DX_llqMh.js → NotFoundScreen-DXqfpA8J.js} +1 -1
- package/dist/assets/{NotificationRoutes-DaXop-Kw.js → NotificationRoutes-C-WteHc_.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-pOZW-eNU.js → OAuthConsentScreen-BP-A_UHq.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-Co54bj0J.js → PandLWithForecastRoutes-Boih151J.js} +1 -1
- package/dist/assets/{PeopleRoutes-9vWHHz2M.js → PeopleRoutes-CK_KnFLl.js} +1 -1
- package/dist/assets/{PerformanceRoutes-sQeICA2b.js → PerformanceRoutes-DYJwGDQ0.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CfgNXch3.js → QBOConnectionScreen-B0drHqyu.js} +1 -1
- package/dist/assets/{ReferralListScreen-fPRYSLID.js → ReferralListScreen-JMU6dR_V.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes---hNOkvq.js → ReimbursementApprovalRoutes-Bus9PTO2.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Dyn7RSI8.js → ReimbursementApprovalRuleDetailScreen-DB-J-QIJ.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BYrKyLZ5.js → ReimbursementRoutes-CHz3b4Xh.js} +1 -1
- package/dist/assets/{ReportsRoutes-CUKyDjF3.js → ReportsRoutes-BljUuEhi.js} +1 -1
- package/dist/assets/{RewardsRoutes-CaV3J1uX.js → RewardsRoutes-gKsGO58l.js} +1 -1
- package/dist/assets/{ScreenRoutes-BFQCZFGJ.js → ScreenRoutes-D34p2LTh.js} +2 -2
- package/dist/assets/{SettingsRoutes-CkJ075Ax.js → SettingsRoutes-zrVjsmQ5.js} +1 -1
- package/dist/assets/{SetupPagesScreen-XTexjMJo.js → SetupPagesScreen-DV28qGiQ.js} +1 -1
- package/dist/assets/{SignInScreen-pvkgtVi3.js → SignInScreen-9HbINlJG.js} +1 -1
- package/dist/assets/{SignOutScreen-Cbyp-03M.js → SignOutScreen-BSYsTkcd.js} +1 -1
- package/dist/assets/{TaskListScreen-D710Rpak.js → TaskListScreen-CvdASg3r.js} +1 -1
- package/dist/assets/{TaskRoutes-COd2p3oz.js → TaskRoutes-CViy4Fc0.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-WDvIYLwr.js → TransactionDetailRoutes-DVmC_GO5.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BGtmtzWU.js → TransactionDetailScreen-CpmzsSf7.js} +1 -1
- package/dist/assets/{TransactionListRoutes-CYIV6Wye.js → TransactionListRoutes-KM7k8Agf.js} +1 -1
- package/dist/assets/{TreasuryRoutes-DGqpKuqj.js → TreasuryRoutes-CbKugAAT.js} +1 -1
- package/dist/assets/{VendorsRoutes-MGXSfJTY.js → VendorsRoutes-CWPfBp_P.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CaHgXzgN.js → WiseConfirmationScreen-BcSzBlLu.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-Bk5y1BRP.js → ZeniAccountRoutes-c0RnDA1n.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BWYeePA_.js → ZeniAccountStatementScreen-B8oovtzJ.js} +1 -1
- package/dist/assets/{analyticsHelper-MLU40ae_.js → analyticsHelper-DB3_ay5h.js} +1 -1
- package/dist/assets/{getLocaleForTenant-BVJn38ps.js → getLocaleForTenant-Ba61Gz0E.js} +1 -1
- package/dist/assets/{index-Dccod20C.js → index-DgJtatP0.js} +5 -5
- package/dist/assets/{routePaths-DiDc2DBY.js → routePaths-CpXTBLF_.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CFwAZJWa.js → useAiCfoDashboardSuggestedQuestionsChips-CWAGANr4.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-CR3Kbk6n.js → useAskAiCfoHostNavButtonProps-DAyGHIvM.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-C5nc3ybP.js → useInitialThreadRequest-Dg2cJQuZ.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-B8L5PzVM.js → withTransactionSidePanel-Bh7VGJfn.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-DAjhbt80.js";import{A as d}from"./AddressScreen-
|
|
1
|
+
import{j as e}from"./liveblocks-DAjhbt80.js";import{A as d}from"./AddressScreen-m3-Kscdf.js";import i from"./NotFoundScreen-DXqfpA8J.js";import"./sentry-BchnSYMz.js";import{o as s,p as r}from"./core-Csep4njy.js";import"./zeni-epic-state-B_XLk_Px.js";import"./recharts-D7BeuhCa.js";import"./index-DgJtatP0.js";import"./mui-BwrnAXoT.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="4677917c-1bd8-4b00-9bd0-d308073173a3",t._sentryDebugIdIdentifier="sentry-dbid-4677917c-1bd8-4b00-9bd0-d308073173a3")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-DAjhbt80.js";import{a as h}from"./sentry-BchnSYMz.js";import{h as T,u as _,g as j,i as E,j as B,n as K}from"./core-Csep4njy.js";import{m as M,h as $,z as D,S as L,B as R,A as z,d as C,f as m,q as F,i as b,r as N}from"./index-
|
|
1
|
+
import{j as r}from"./liveblocks-DAjhbt80.js";import{a as h}from"./sentry-BchnSYMz.js";import{h as T,u as _,g as j,i as E,j as B,n as K}from"./core-Csep4njy.js";import{m as M,h as $,z as D,S as L,B as R,A as z,d as C,f as m,q as F,i as b,r as N}from"./index-DgJtatP0.js";import{Kn as k,h2 as U,eQ as q,Ko as G,c2 as O,Kp as V,kn as H}from"./zeni-epic-state-B_XLk_Px.js";import{n as Q}from"./mui-BwrnAXoT.js";import J from"./NotFoundScreen-DXqfpA8J.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]="c66a498e-17ce-4893-a847-1c35d676a7d6",e._sentryDebugIdIdentifier="sentry-dbid-c66a498e-17ce-4893-a847-1c35d676a7d6")}catch{}})();const W=Q.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-DAjhbt80.js";import{a as r}from"./sentry-BchnSYMz.js";import{u as ge,h as Ce,g as Ie,j as Y,i as be,n as ke}from"./core-Csep4njy.js";import{W as we,z as xe,m as Pe,cR as Ee,cS as Te,b4 as J,cT as ve,b3 as Z,r as D,A as L,d as I,cU as F,cV as ye,cW as Qe,a1 as _e,f as Oe,a7 as Ae,cX as Ue,a2 as je,v as Le,b0 as Fe,cY as Re}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-DAjhbt80.js";import{a as r}from"./sentry-BchnSYMz.js";import{u as ge,h as Ce,g as Ie,j as Y,i as be,n as ke}from"./core-Csep4njy.js";import{W as we,z as xe,m as Pe,cR as Ee,cS as Te,b4 as J,cT as ve,b3 as Z,r as D,A as L,d as I,cU as F,cV as ye,cW as Qe,a1 as _e,f as Oe,a7 as Ae,cX as Ue,a2 as je,v as Le,b0 as Fe,cY as Re}from"./index-DgJtatP0.js";import{fJ as De,eP as ee,eQ as Be,hI as Me,R9 as Ve,eT as Ge,hS as $e,hO as Ne,eR as R,fu as qe,fn as ze,fr as K,fv as We,fw as He,fx as Ye,fy as Je,fz as Ke}from"./zeni-epic-state-B_XLk_Px.js";import{D as Xe,n as b,S as Ze,P as et}from"./mui-BwrnAXoT.js";import{u as tt}from"./useAiCfoDashboardSuggestedQuestionsChips-CWAGANr4.js";import{p as st}from"./pathToGoBack-odCpMm49.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new a.Error().stack;i&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[i]="485a3216-9607-4938-85f8-3aba992b3133",a._sentryDebugIdIdentifier="sentry-dbid-485a3216-9607-4938-85f8-3aba992b3133")}catch{}})();const te="chat-response-generated",ot=ke(function(a,i){const s=ee(a),m=i.isSubmitting;return{showSampleQuestions:i.sessionFromUrl==="explore"&&s.uiState.currentChatSessionId==null,aiCfoView:s,isSubmitting:m,isNewChatSession:i.sessionFromUrl==="new_chat"||i.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${je}/tableDownload`,emailLinkQuestion:i.emailLinkQuestion,autoSubmitEmailLinkQuestion:i.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:i.onEmailLinkQuestionProcessed,routedInitialQuestionSource:i.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:i.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:i.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:i.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:i.isFileUploadEnabled,isUploadPromoVisible:i.isUploadPromoVisible,onUploadPromoClose:i.onUploadPromoClose}},function(a,i){const{location:s,currentTenant:m,userId:l,navigate:S,currentChatSessionId:h,allSessionsWithOrderedQuestionAnswers:d,setIsAiCfoOpen:f}=i;return{onEventReceived:(e,p)=>{if(e===te&&typeof p.text=="string"&&typeof p.metadata=="object"){const o=p,c=He(o.type),t=o.metadata.chat_session_id??null,{currentChatSession:E,currentQuestionAnswer:k,currentQuestionAnswerSummary:T}=Z(d,t);c!=="answer"?I.trackAICFOChatResponseGenerated(c,k?.question.questionText??"",o.text,t,Re(T,E),o.metadata.message_id??null):I.trackAICFOChatAnswerGenerated(o.text,k?.question.questionText??"",(o.follow_up_questions?.length??0)>0,!!o.assumptions,!!o.insights,o.visualization!=null,Ye(o.visualization?.type??"")??null,t,o.summarized_title,o.metadata.message_id??null),a(Je({chatSessionId:o.metadata.chat_session_id,responseType:c,fetchState:{fetchState:"Completed",error:void 0}})),a(Ke({chatSessionId:o.metadata.chat_session_id,answerPayload:o,userId:l}))}},onSubmit:(e,p,o,c)=>{e&&Fe(a,e,p,h,d,l,c,o)},updateCurrentInput:e=>{a(K(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{a(We(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{S(-1)},onCloseClick:()=>{const e=D(s.state?.pathnameStackToGoBack),p=e.poppedPathname??st(1);S(p,{state:{...s.state,pathnameStackToGoBack:e.newStack}}),a(K(""))},togglePageView:()=>{const e=D(s.state?.pathnameStackToGoBack),p=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;S(p,{state:{...s.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),f(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{S(-1)},onNewChatClick:()=>{h!=null&&a(ze());const e=Le(s.state?.pathnameStackToGoBack,s.pathname);S(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,p)=>{a(qe({questionAnswerId:e,isCollapsed:p}))},onMenuClick:i.onMenuClick}})(Ae(Ue)),Et=({isFileUploadEnabled:a})=>{const{setIsAiCfoOpen:i}=we(),s=ge(),m=Ce(),l=Ie(),[S,h]=r.useState(!1);r.useEffect(()=>{s(De())},[s]);const d=Y(n=>ee(n)),f=xe.getSignedInUser(),{session_id:e}=be(),p=Pe(),o=_e(p),c=Y(n=>Be(n)),t=d.uiState.currentChatSessionId,E=c.tenantEmailDomain,{handleUploadPromoClose:k,isUploadPromoVisible:T}=Ee({isFileUploadEnabled:a,tenantEmailDomain:E}),v=Te({currentTenant:c,currentChatSessionId:t,aiCfoView:d}),{isSuggestedQuestionsLoading:se,suggestedPromptQuestions:oe}=tt(),w=l.state,x=w?.aiCfoInitialQuestion,B=!!w?.aiCfoShouldSubmit;r.useEffect(()=>{const n=l.state;if(n?.[J]!==!0)return;h(!0);const g={...n};delete g[J],m(l,{replace:!0,state:g})},[l.pathname,l.search,l.state,m]);const[ae,y]=r.useState(null),[ne,Q]=r.useState(!1),[ie,_]=r.useState(void 0),[re,O]=r.useState(void 0),M=r.useRef(!1);r.useEffect(()=>{if(!M.current&&x!=null&&x!==""){const n=l.state;y(x),Q(B),_(n?.aiCfoInitialSubmissionSource!=null?n.aiCfoInitialSubmissionSource:void 0);const g=n?.aiCfoSuggestionIndex;O(typeof g=="number"?g:void 0),M.current=!0}},[x,B,l.state]);const le=r.useCallback(()=>{y(null),Q(!1),_(void 0),O(void 0)},[]),V=r.useMemo(()=>new URLSearchParams(l.search),[l.search]),G=V.get("ref")??w?.aiCfoRef,A=V.get("emailRefId")??w?.aiCfoEmailRefId,$=r.useRef(!1);r.useEffect(()=>{$.current||G!=="month-end-email"||A==null||t!=null||f==null||(s(Me("controller",f.userId,A,"MONTH_END_EMAIL")),$.current=!0)},[G,A,t,s,f]);const P=d.uiState.lastContextMessage;r.useEffect(()=>{P!=null&&P!==""&&t!=null&&(y(P),Q(!0),_(void 0),O(void 0),s(Ve()))},[P,t,s]);const ue=c.masterTOSInfo,C=ue?.isMasterTOSAccepted??!1,{visitedSessions:N}=ve(t),U=d.fetchState,j=d.uiState.chatSessionsNextPageToken.hasMore||!d.uiState.chatSessionsFirstPageFetched,q=t!=null?d.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",z=t==null||(d.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),W=d.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:ce}=Z(W,t),de=ce.length===0;r.useEffect(()=>{C||o||m("../dashboard",{state:{...l.state,message:"open_ai_cfo_drawer"}})},[C,o,m,l.state]);const me=r.useCallback(()=>{const n=D(l.state?.pathnameStackToGoBack),g=c.tenantEmailDomain;m(n.poppedPathname??(g!=null?`/${g}/dashboard`:".."),{state:{...l.state,pathnameStackToGoBack:n.newStack}})},[c.tenantEmailDomain,l.state,m]);r.useEffect(()=>{t!=null&&e!==t&&m(`../ai-cfo/${t}`,{state:{...l.state}})},[t,e]),r.useEffect(()=>{e!=null&&t==null&&e!=="new_chat"&&e!=="explore"&&s(Ge({sessionId:e,agentId:"controller"}))},[]);const pe=r.useMemo(()=>({events:N.map(n=>`private-encrypted-chat-${n}.${te}`),eventCallback:(n,g,fe)=>fe.onEventReceived(n,g)}),[N]);r.useEffect(()=>{U!=="In-Progress"&&j&&s($e())},[U,j,s]),r.useEffect(()=>{t!=null&&q!=="In-Progress"&&z&&f!=null&&U==="Completed"&&!j&&s(Ne(t,f.userId))},[q,z,t,f,s]);const H=n=>n.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(f==null||e==null)throw Error("Can't access AI Controller page without signing in...");const he=t!=null&&d.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";if(!C&&o)return u.jsxs(nt,{children:[u.jsx(L,{analytics:I,onLoad:H}),v.drawerElement,u.jsx(it,{children:u.jsx(X,{children:u.jsx(F,{isTOSAccepted:!1,acceptMasterTOSState:d.masterTOSAcceptanceState,onCloseClick:me,onCompleteClick:()=>{c.userRoleId!=null&&s(R(c.userRoleId))}})})})]});const Se=u.jsxs(u.Fragment,{children:[S&&!C?u.jsx(L,{analytics:I,onLoad:H}):null,u.jsx(F,{isTOSAccepted:C,acceptMasterTOSState:d.masterTOSAcceptanceState,showHeader:!1,togglePageView:C?()=>h(!1):void 0,onCloseClick:()=>h(!1),onCompleteClick:()=>{C||c.userRoleId==null||s(R(c.userRoleId)),h(!1)}})]});return u.jsxs(u.Fragment,{children:[u.jsxs(at,{children:[u.jsx(L,{analytics:I,onLoad:n=>n.trackPageLoaded(Oe.Event.aiCFOPage)}),o&&v.drawerElement,u.jsx(ot,{...pe,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:W,openOnboardingPage:()=>h(!0),userId:f.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:e,location:l,isSubmitting:he,isEmptyChatWithSession:de,currentTenant:c,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:ne,onEmailLinkQuestionProcessed:le,routedInitialQuestionSource:ie,routedInitialQuestionSuggestionIndex:re,onMenuClick:o?v.open:void 0,isFileUploadEnabled:a,isUploadPromoVisible:T,onUploadPromoClose:k,exploreSuggestedPromptQuestions:oe,exploreSuggestedPromptQuestionsLoading:se}),S&&o?u.jsx(Xe,{anchor:"right",open:S,transitionDuration:250,PaperProps:{component:rt,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>h(!1),children:u.jsx(X,{onClick:n=>n.stopPropagation(),children:u.jsx(F,{isTOSAccepted:C,acceptMasterTOSState:d.masterTOSAcceptanceState,onCloseClick:()=>h(!1),onCompleteClick:()=>{C||c.userRoleId==null||s(R(c.userRoleId)),h(!1)}})})}):null]}),S&&!o?u.jsx(ye,{open:S,onClose:()=>h(!1),children:u.jsx(Qe,{children:Se})}):null]})},X=b(Ze)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-DAjhbt80.js";import{a as y}from"./sentry-BchnSYMz.js";import{h as B,g as U,u as T,j as v,N,n as j,i as $,o as O,p as h}from"./core-Csep4njy.js";import{eQ as F,NG as R,Nm as b,y4 as I,x_ as L,y2 as w,xT as W,No as G,xW as q,y6 as z,y5 as C}from"./zeni-epic-state-B_XLk_Px.js";import{h as P,z as k,B as V,a7 as Q,bF as H,af as _,bG as J}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-DAjhbt80.js";import{a as y}from"./sentry-BchnSYMz.js";import{h as B,g as U,u as T,j as v,N,n as j,i as $,o as O,p as h}from"./core-Csep4njy.js";import{eQ as F,NG as R,Nm as b,y4 as I,x_ as L,y2 as w,xT as W,No as G,xW as q,y6 as z,y5 as C}from"./zeni-epic-state-B_XLk_Px.js";import{h as P,z as k,B as V,a7 as Q,bF as H,af as _,bG as J}from"./index-DgJtatP0.js";import"./mui-BwrnAXoT.js";import{i as K}from"./ReimbursementApprovalRuleDetailScreen-DB-J-QIJ.js";import M from"./NotFoundScreen-DXqfpA8J.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]="ce49ee17-c603-416c-a82d-897206d4509e",e._sentryDebugIdIdentifier="sentry-dbid-ce49ee17-c603-416c-a82d-897206d4509e")}catch{}})();const x="bill-approval-rule-update",X=j(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(x)&&e(G(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(W(a))},onEditRuleClick:a=>{a!=null?(e(w(a)),t(`./${a}/edit`)):(e(w()),t("./new"))}}})(Q(H)),Y=()=>{const e=B(),o=U(),t=T(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>F(i)),r=v(i=>R(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(I())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(L(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(w())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${x}`]:[],eventCallback:(i,A,m)=>{i.endsWith(x)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx(N,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(X,{currentTenant:c,location:o,navigate:e,...f})},Z=j(function(e,o){const t=b(e),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=f.actors.selectedNonUsers.map(S=>{const E=!!K(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(A);g.push({action:f.stepType.selectedOption,actors:m,operator:m.length>1?f.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}},onResetClick:()=>{e(I()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(I()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(z())},onSaveRuleSuccess:()=>{t("../")}}})(J);function D(){const e=B(),o=T(),t=U(),{approvalRuleId:p}=$(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>R(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(q(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs(O,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(M,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DAjhbt80.js";import{h as J,u as se,g as Y,i as ae,j as v,N as te,n as Q,l as na,o as ia,p as S}from"./core-Csep4njy.js";import{eQ as Z,MY as Le,bt as It,HS as oa,bo as wt,bF as pe,MZ as Ct,xo as xt,yy as Ve,xX as la,bn as De,M_ as sa,M$ as ra,c2 as ca,N0 as da,jH as Bt,N1 as At,N2 as Et,z7 as _e,xD as Be,N3 as ua,xc as tt,N4 as pa,Cj as ma,xg as ba,xm as Dt,N5 as ke,N6 as Ge,yz as Me,N7 as ha,N8 as ga,yC as Oe,N9 as ya,yP as Sa,Na as jt,yj as at,yo as fa,Nb as ka,Nc as ue,Nd as Tt,Ne as Pt,Nf as Ft,fN as va,xI as $e,cx as Rt,Ng as Ia,gU as wa,Nh as Ca,Ni as xa,e$ as Nt,eZ as Vt,Nj as ze,Nk as Ba,Nl as Aa,KH as Ze,Nm as Ea,KI as oe,KJ as He,Nn as Da,No as ja,Np as Ta,yq as nt,yn as Pa,Nq as Fa,Nr as Ra,Ns as Na,y9 as Va,Nt as $a,Nu as Ua,Nv as La,cl as $t,cM as Ut,jS as _a,bL as Ga,bq as Lt,bM as _t,wu as Ma,Nw as Oa,C6 as za,Cc as Za,sS as Ha,yA as Wa,ze as qa,k3 as fe,Nx as Ka,Ny as Gt,kx as Ja,jZ as Mt,ki as Ot,kh as it,bE as be,bK as Ya,Nz as Qa,NA as ve,iC as Xa,NB as ot,NC as en,iG as tn,i$ as an,zs as nn,ND as on,kq as ln,zi as sn,NE as lt,zm as rn,zr as cn,zo as dn,zg as un,NF as zt,xx as pn,NG as mn,NH as bn,fF as hn,fE as gn,fD as yn,k6 as Sn,ko as st,kz as fn,qp as kn,kf as vn,zk as In,iM as wn,kE as Cn,NI as xn,iE as Bn,qg as An,NJ as En,yf as Dn,bG as jn,bs as Tn,JC as Pn,cO as Fn,cN as Rn,cw as Nn,cC as Vn}from"./zeni-epic-state-B_XLk_Px.js";import{h as me,z as N,S as Ie,_ as We,n as le,c as y,aN as Ae,B as re,o as A,A as je,d as D,bc as $n,r as z,a2 as qe,v as E,m as we,bd as rt,be as ct,bf as Un,ak as Ln,H as _n,aH as Gn,F as Zt,D as Ke,I as Je,bg as Mn,at as Ht,bh as On,Y as zn,f as Wt,a7 as Zn,bi as Hn,bj as Wn,bk as qn,bl as Kn,bm as Jn,bn as Yn,bo as Qn,bp as Xn,bq as ei,x as ti,br as ai,b7 as ni,bs as ii,bt as oi,a9 as li}from"./index-Dccod20C.js";import{n as U,S as si}from"./mui-BwrnAXoT.js";import{A as dt}from"./AddressScreen-NX75uxLP.js";import{g as ie,a as Te,i as qt,V as Ye,b as Qe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-D6V50bQg.js";import{a as f}from"./sentry-BchnSYMz.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-CR3Kbk6n.js";import{u as Kt}from"./useInitialThreadRequest-C5nc3ybP.js";import Ee from"./NotFoundScreen-DX_llqMh.js";import{D as ui}from"./DrawerScreen-DJHmM0O7.js";import{M as Jt}from"./MobileAppDrawer-CZdE1-bN.js";import{F as Yt}from"./FeaturePreviewScreen-BAyL66YE.js";import{S as Pe}from"./SetupPagesScreen-XTexjMJo.js";import{B as pi}from"./BillPayApprovalRoutes-DpviM7Hj.js";import{FallBackRoute as mi}from"./ScreenRoutes-BFQCZFGJ.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";import"./analyticsHelper-MLU40ae_.js";import"./routePaths-DiDc2DBY.js";import"./BusinessVerificationPageScreen-BrTGOncN.js";import"./ReimbursementApprovalRuleDetailScreen-Dyn7RSI8.js";import"./getLocaleForTenant-BVJn38ps.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]="7dd866cf-6c9c-47bf-9c7c-3cd046493759",e._sentryDebugIdIdentifier="sentry-dbid-7dd866cf-6c9c-47bf-9c7c-3cd046493759")}catch{}})();const bi=Q(function(e,t){const l=Le(e,t.billId),i=N.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=z(t.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;const n=De(i);n||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:g,isMarkAsPaidBtnVisible:b}=sa(l.billActivities,ra(t.currentTenant),i);d=g,p=b}const m=ca(t.currentTenant?.userRole??[]),h=l.transactionDetails!=null&&da(l.transactionDetails,m,i);return{billDetails:l,isAccountingClassesEnabled:Bt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${qe}/transaction_attachment`,signedInUser:i,showBackButton:o,isAdmin:m,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:D,showMarkAsPaidButtonToCreator:h,isZeniUser:n}},function(e,t){const{billId:l,currentTenant:i,location:c,navigate:r}=t,{tenantEmailDomain:u}=i;return{redirectToBillsScreen:()=>{const o=ie(u),s=E(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(ke({}))},deleteBill:o=>{D.trackBillPayDeleteBill(l,o),e(Dt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?D.trackBillPayCancelAndDeleteBill(l,o):D.trackBillPayCancelBill(l),e(ba(l,s))},onSaveRealTimeApprovals:o=>{e(ma(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pa({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(tt(l,o.type,"")):e(tt(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Be(l,"retry")):e(Be(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const n=Te(u,o,s),d=E(c.state?.pathnameStackToGoBack,c.pathname);r(n,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ie(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ua({billId:t.billId}))},onRefundPaymentClick:()=>{e(Be(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(At({billId:l}))}}})($n);function hi(){const e=J(),t=se(),l=Y(),{billId:i}=ae(),c=me(),r=N.getSignedInUser(),u=Ie(),o=v(M=>Z(M)),s=v(M=>Le(M,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Kt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Xe({mobileExploreReferrer:"Bill Details"});We({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,C]=f.useState(!1),[x,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:L}=le(),{isFeatureEnabled:V}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=L(Ae.zeniAssistConfig),B=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),$=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:K}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:X}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{V&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&B===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(M=>M.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,B,r]),f.useEffect(()=>{i!=null&&t(Ct(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(xt(i??"",V,$,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(C(!0),t(Ve(!1,V,$,X,i)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(la()))},[j,s,i,t]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?a.jsx(te,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(re,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(je,{analytics:D,onLoad:M=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(M)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:V,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:x,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:K,hasZeniAssistAccess:$,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=Ke.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Q(function(e,t){const l=N.getSignedInUser(),i=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Ht.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:D,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=N.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Oe(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Me(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function w({appContent:e}){const t=se(),l=J(),{billId:i}=ae(),c=Y(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=N.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(y.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(y.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ae.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),C=v(F=>Z(F)),[x,_]=f.useState(!1),[T,L]=f.useState(!1),[V,I]=f.useState(!1),[H,G]=f.useState(),B=v(F=>Ge(F,m,g,i));let q=B.fetchState,W=B.file,$=B.showAutofill;const K=v(F=>Le(F,i??""));u===!1&&(q=K.fetchState,W=K.transactionDetails?.attachments?.[0],$=!1);const X=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;f.useEffect(()=>{i==null&&t(Me(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?L(!1):!u&&x&&_(!1))},[i]),f.useEffect(()=>{x||i==null||u||(_(!0),t(xt(i,h,j,!1)),T||(L(!0),t(Ve(!1,h,j,b,i)))),u&&!T&&(L(!0),t(Ve(!1,h,j,b,i)))},[x,T,u,i,t]);const M={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Oe(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(C.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,C.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||K.fetchState==="Error")return a.jsx(Ee,{});if(q!="Completed")return i==null&&o!=="small"?a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[a.jsx(mt,{}),a.jsx(Re,{}),a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:!0,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!B.isInitialEdit,billStage:X}),a.jsx(Ne,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||$?null:a.jsx(pt,{children:a.jsx(Qt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Ne,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[$&&o!=="small"?a.jsx(mt,{}):null,V?a.jsx(Ln,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(Ci,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:M,isEditPopup:!0}):null,o==="small"||$?null:a.jsx(pt,{children:a.jsx(yi,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:$,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,K,B),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,B),isInitialEdit:!!B.isInitialEdit,billStage:F}),a.jsx(Ne,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Mn();return a.jsx(Qt,{onClick:e,"data-testid":"nav-bar-back-click"})}function Si(e,t,l){let i,c;return e?(i=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(i=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(ki,{children:[a.jsx(vi,{children:`${ye.recurringBill.recurringCycle}
|
|
1
|
+
import{j as a}from"./liveblocks-DAjhbt80.js";import{h as J,u as se,g as Y,i as ae,j as v,N as te,n as Q,l as na,o as ia,p as S}from"./core-Csep4njy.js";import{eQ as Z,MY as Le,bt as It,HS as oa,bo as wt,bF as pe,MZ as Ct,xo as xt,yy as Ve,xX as la,bn as De,M_ as sa,M$ as ra,c2 as ca,N0 as da,jH as Bt,N1 as At,N2 as Et,z7 as _e,xD as Be,N3 as ua,xc as tt,N4 as pa,Cj as ma,xg as ba,xm as Dt,N5 as ke,N6 as Ge,yz as Me,N7 as ha,N8 as ga,yC as Oe,N9 as ya,yP as Sa,Na as jt,yj as at,yo as fa,Nb as ka,Nc as ue,Nd as Tt,Ne as Pt,Nf as Ft,fN as va,xI as $e,cx as Rt,Ng as Ia,gU as wa,Nh as Ca,Ni as xa,e$ as Nt,eZ as Vt,Nj as ze,Nk as Ba,Nl as Aa,KH as Ze,Nm as Ea,KI as oe,KJ as He,Nn as Da,No as ja,Np as Ta,yq as nt,yn as Pa,Nq as Fa,Nr as Ra,Ns as Na,y9 as Va,Nt as $a,Nu as Ua,Nv as La,cl as $t,cM as Ut,jS as _a,bL as Ga,bq as Lt,bM as _t,wu as Ma,Nw as Oa,C6 as za,Cc as Za,sS as Ha,yA as Wa,ze as qa,k3 as fe,Nx as Ka,Ny as Gt,kx as Ja,jZ as Mt,ki as Ot,kh as it,bE as be,bK as Ya,Nz as Qa,NA as ve,iC as Xa,NB as ot,NC as en,iG as tn,i$ as an,zs as nn,ND as on,kq as ln,zi as sn,NE as lt,zm as rn,zr as cn,zo as dn,zg as un,NF as zt,xx as pn,NG as mn,NH as bn,fF as hn,fE as gn,fD as yn,k6 as Sn,ko as st,kz as fn,qp as kn,kf as vn,zk as In,iM as wn,kE as Cn,NI as xn,iE as Bn,qg as An,NJ as En,yf as Dn,bG as jn,bs as Tn,JC as Pn,cO as Fn,cN as Rn,cw as Nn,cC as Vn}from"./zeni-epic-state-B_XLk_Px.js";import{h as me,z as N,S as Ie,_ as We,n as le,c as y,aN as Ae,B as re,o as A,A as je,d as D,bc as $n,r as z,a2 as qe,v as E,m as we,bd as rt,be as ct,bf as Un,ak as Ln,H as _n,aH as Gn,F as Zt,D as Ke,I as Je,bg as Mn,at as Ht,bh as On,Y as zn,f as Wt,a7 as Zn,bi as Hn,bj as Wn,bk as qn,bl as Kn,bm as Jn,bn as Yn,bo as Qn,bp as Xn,bq as ei,x as ti,br as ai,b7 as ni,bs as ii,bt as oi,a9 as li}from"./index-DgJtatP0.js";import{n as U,S as si}from"./mui-BwrnAXoT.js";import{A as dt}from"./AddressScreen-m3-Kscdf.js";import{g as ie,a as Te,i as qt,V as Ye,b as Qe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-BNqpU9kr.js";import{a as f}from"./sentry-BchnSYMz.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-DAyGHIvM.js";import{u as Kt}from"./useInitialThreadRequest-Dg2cJQuZ.js";import Ee from"./NotFoundScreen-DXqfpA8J.js";import{D as ui}from"./DrawerScreen-BLYKH6HL.js";import{M as Jt}from"./MobileAppDrawer-Cvrk0aA5.js";import{F as Yt}from"./FeaturePreviewScreen--3IRWa9I.js";import{S as Pe}from"./SetupPagesScreen-DV28qGiQ.js";import{B as pi}from"./BillPayApprovalRoutes-pW0mD7wM.js";import{FallBackRoute as mi}from"./ScreenRoutes-D34p2LTh.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";import"./analyticsHelper-DB3_ay5h.js";import"./routePaths-CpXTBLF_.js";import"./BusinessVerificationPageScreen-C-6S-jFq.js";import"./ReimbursementApprovalRuleDetailScreen-DB-J-QIJ.js";import"./getLocaleForTenant-Ba61Gz0E.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]="7dd866cf-6c9c-47bf-9c7c-3cd046493759",e._sentryDebugIdIdentifier="sentry-dbid-7dd866cf-6c9c-47bf-9c7c-3cd046493759")}catch{}})();const bi=Q(function(e,t){const l=Le(e,t.billId),i=N.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=z(t.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;const n=De(i);n||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:g,isMarkAsPaidBtnVisible:b}=sa(l.billActivities,ra(t.currentTenant),i);d=g,p=b}const m=ca(t.currentTenant?.userRole??[]),h=l.transactionDetails!=null&&da(l.transactionDetails,m,i);return{billDetails:l,isAccountingClassesEnabled:Bt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${qe}/transaction_attachment`,signedInUser:i,showBackButton:o,isAdmin:m,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:D,showMarkAsPaidButtonToCreator:h,isZeniUser:n}},function(e,t){const{billId:l,currentTenant:i,location:c,navigate:r}=t,{tenantEmailDomain:u}=i;return{redirectToBillsScreen:()=>{const o=ie(u),s=E(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(ke({}))},deleteBill:o=>{D.trackBillPayDeleteBill(l,o),e(Dt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?D.trackBillPayCancelAndDeleteBill(l,o):D.trackBillPayCancelBill(l),e(ba(l,s))},onSaveRealTimeApprovals:o=>{e(ma(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pa({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(tt(l,o.type,"")):e(tt(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Be(l,"retry")):e(Be(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const n=Te(u,o,s),d=E(c.state?.pathnameStackToGoBack,c.pathname);r(n,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ie(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ua({billId:t.billId}))},onRefundPaymentClick:()=>{e(Be(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(At({billId:l}))}}})($n);function hi(){const e=J(),t=se(),l=Y(),{billId:i}=ae(),c=me(),r=N.getSignedInUser(),u=Ie(),o=v(M=>Z(M)),s=v(M=>Le(M,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Kt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Xe({mobileExploreReferrer:"Bill Details"});We({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,C]=f.useState(!1),[x,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:L}=le(),{isFeatureEnabled:V}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=L(Ae.zeniAssistConfig),B=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),$=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:K}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:X}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{V&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&B===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(M=>M.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,B,r]),f.useEffect(()=>{i!=null&&t(Ct(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(xt(i??"",V,$,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(C(!0),t(Ve(!1,V,$,X,i)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(la()))},[j,s,i,t]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?a.jsx(te,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(re,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(je,{analytics:D,onLoad:M=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(M)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:V,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:x,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:K,hasZeniAssistAccess:$,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=Ke.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Q(function(e,t){const l=N.getSignedInUser(),i=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Ht.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:D,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=N.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Oe(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Me(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function w({appContent:e}){const t=se(),l=J(),{billId:i}=ae(),c=Y(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=N.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(y.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(y.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ae.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),C=v(F=>Z(F)),[x,_]=f.useState(!1),[T,L]=f.useState(!1),[V,I]=f.useState(!1),[H,G]=f.useState(),B=v(F=>Ge(F,m,g,i));let q=B.fetchState,W=B.file,$=B.showAutofill;const K=v(F=>Le(F,i??""));u===!1&&(q=K.fetchState,W=K.transactionDetails?.attachments?.[0],$=!1);const X=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;f.useEffect(()=>{i==null&&t(Me(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?L(!1):!u&&x&&_(!1))},[i]),f.useEffect(()=>{x||i==null||u||(_(!0),t(xt(i,h,j,!1)),T||(L(!0),t(Ve(!1,h,j,b,i)))),u&&!T&&(L(!0),t(Ve(!1,h,j,b,i)))},[x,T,u,i,t]);const M={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Oe(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(C.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,C.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||K.fetchState==="Error")return a.jsx(Ee,{});if(q!="Completed")return i==null&&o!=="small"?a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[a.jsx(mt,{}),a.jsx(Re,{}),a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:!0,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!B.isInitialEdit,billStage:X}),a.jsx(Ne,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||$?null:a.jsx(pt,{children:a.jsx(Qt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Ne,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[$&&o!=="small"?a.jsx(mt,{}):null,V?a.jsx(Ln,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(Ci,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:M,isEditPopup:!0}):null,o==="small"||$?null:a.jsx(pt,{children:a.jsx(yi,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:$,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,K,B),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,B),isInitialEdit:!!B.isInitialEdit,billStage:F}),a.jsx(Ne,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Mn();return a.jsx(Qt,{onClick:e,"data-testid":"nav-bar-back-click"})}function Si(e,t,l){let i,c;return e?(i=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(i=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(ki,{children:[a.jsx(vi,{children:`${ye.recurringBill.recurringCycle}
|
|
2
2
|
${i}/${c}`}),a.jsx(Ii,{})]}):void 0}function fi(e,t){const l=t.billActivities?.[0],i=t.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(t.billStage==="draft"||i)}const pt=U.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-DAjhbt80.js";import{a as V}from"./sentry-BchnSYMz.js";import{h as ae,g as ne,u as se,i as ie,j as C,N as oe,n as re}from"./core-Csep4njy.js";import{S as ce,n as ue,aN as de,z as B,A as pe,d as z,af as E,f as x,bB as le,at as fe,v as R,au as P}from"./index-
|
|
1
|
+
import{j as k}from"./liveblocks-DAjhbt80.js";import{a as V}from"./sentry-BchnSYMz.js";import{h as ae,g as ne,u as se,i as ie,j as C,N as oe,n as re}from"./core-Csep4njy.js";import{S as ce,n as ue,aN as de,z as B,A as pe,d as z,af as E,f as x,bB as le,at as fe,v as R,au as P}from"./index-DgJtatP0.js";import{Nu as me,eQ as q,sh as ye,HW as Se,y9 as ge,AS as Ie,Dp as he,E2 as be,EX as Te,NR as De,NS as Oe,NT as ke,NU as Ce,NV as Ve,Ko as Ne,MT as Ae,KA as we,kn as _e,fF as ve,fE as Fe,fD as Ee,qp as xe,qg as Be,qd as ze,kf as Re,sq as Pe,so as M,bE as U,sC as L,cv as Me}from"./zeni-epic-state-B_XLk_Px.js";import{n as Ue}from"./mui-BwrnAXoT.js";import{d as j}from"./routePaths-CpXTBLF_.js";import{M as Le}from"./MobileAppDrawer-Cvrk0aA5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="3dffa3fa-e9a5-418f-9cd3-2958b1fb338c",e._sentryDebugIdIdentifier="sentry-dbid-3dffa3fa-e9a5-418f-9cd3-2958b1fb338c")}catch{}})();const je=Ue.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DAjhbt80.js";import{h as me,i as ba,u as Ce,j as S,g as Se,n as he,N as Ta,s as jt,o as Rn,p as se}from"./core-Csep4njy.js";import{eQ as de,bs as He,Po as ja,eZ as Ie,e_ as Ae,e$ as Ee,fU as qe,cs as Qe,Pp as Je,Pq as lt,tw as xa,jP as Ba,Pr as La,gU as pa,A9 as ca,Ab as Ne,Ac as ut,jF as Vt,Ps as Xe,zZ as ha,Pt as Un,Pu as On,A0 as Va,Pv as jn,NO as Na,rI as Nt,A6 as na,h3 as Vn,Pw as Ht,Px as ea,bq as Nn,Py as Hn,fF as Ha,fE as Ma,AG as Mn,fD as $a,Nu as $n,Pz as Mt,cl as $t,cM as Gn,NN as ya,Bg as Gt,PA as Ft,AS as fa,PB as zt,Bh as zn,Od as Zn,Bi as Yn,Cc as Kn,sS as Wn,C6 as qn,PC as Qn,Aa as Ye,PD as Jn,PE as Xn,PF as er,PG as ar,PH as tr,PI as mt,PJ as nr,Ar as Zt,Ak as rr,PK as sr,fW as cr,AA as Yt,AE as Kt,fV as or,PL as ir,B2 as Wt,PM as dr,PN as lr,PO as ur,AC as qt,An as Qt,A3 as Jt,Aw as Xt,Au as en,Ay as mr,PP as an,PQ as Ga,AP as ga,Kt as tn,cN as Ct,PR as Cr,PS as pr,PT as hr,PU as fr,AM as st,B9 as gr,B5 as br,AI as yr,B7 as Sr,AZ as Ir,A$ as Ar,PV as nn,Bf as Fa,HS as Er,PW as kr,PX as _r,PY as Dr,PZ as rn,P_ as Pr,BC as wr,AR as sn,AL as ve,AQ as vr,P$ as Fr,Q0 as Tr,zW as xr,Q1 as cn,Q2 as on,Q3 as Br,zY as Lr,zX as Tt,Q4 as Rr,Q5 as Ur,Q6 as Or,Kp as jr,Q7 as pt,Q8 as Vr,wx as dn,kn as Nr,gV as Hr,BH as Mr,Q9 as ln,Qa as $r,BI as Gr,Qb as zr,de as Zr,tq as Yr,Bx as Kr,Br as Ve,bt as Wr,bF as qr,cx as Qr,bG as Jr,JC as Xr}from"./zeni-epic-state-B_XLk_Px.js";import{z as ee,S as $e,n as oe,c as Z,B as Sa,c2 as za,cd as es,ce as as,cf as ts,r as Re,cg as ns,ch as rs,m as Ia,aN as Le,v as ye,bm as ht,ci as ss,F as Aa,i as Za,h as ft,d as q,D as gt,a7 as Ya,cj as cs,_ as un,aq as bt,by as ra,ck as ct,cl as os,A as yt,cm as is,at as mn,a2 as ot,Y as Cn,f as pn,cn as ds,co as ls,cp as us,cq as ms,cr as Cs,cs as ps,o as Ra,ct as hs,cu as fs,cv as at,x as gs,cw as bs,cx as ys,cy as Ss,cz as Is,cA as As,a9 as Es}from"./index-Dccod20C.js";import{n as Fe,D as hn,S as ks}from"./mui-BwrnAXoT.js";import{a as d}from"./sentry-BchnSYMz.js";import{g as pe,a as Ea,b as fn,c as ke,d as _e,e as Me,f as Ge,h as ze,A as _s,i as St,P as Ds,j as It,s as sa,k as gn,l as Ke,m as bn,n as Ps,o as yn,p as ws,S as xt}from"./SetupPagesScreen-XTexjMJo.js";import{u as Sn}from"./useInitialThreadRequest-C5nc3ybP.js";import Ka from"./NotFoundScreen-DX_llqMh.js";import{M as We}from"./MobileAppDrawer-CZdE1-bN.js";import{u as In}from"./useAskAiCfoHostNavButtonProps-CR3Kbk6n.js";import{v as Bt}from"./utils-aai5Jslk.js";import{d as vs}from"./recharts-D7BeuhCa.js";import{t as Fs}from"./AddressScreen-NX75uxLP.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./analyticsHelper-MLU40ae_.js";import"./routePaths-DiDc2DBY.js";import"./BusinessVerificationPageScreen-BrTGOncN.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]="33b2ab37-3766-45cc-872f-84a9e3fe40c1",e._sentryDebugIdIdentifier="sentry-dbid-33b2ab37-3766-45cc-872f-84a9e3fe40c1")}catch{}})();function Ts(){const e=me(),{cardId:a}=ba(),t=Ce(),r=ee.getSignedInUser(),n=S(K=>de(K)),f=$e(),p=He(f?.loggedInUserRoleMap),{useFeatureGate:g}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[_,c]=d.useState(!1),l=S(K=>ja(K).firstViewAfterActivation);if(a==null)throw Error("Empty card id is not valid...");const v=n.userRole.includes("charge_card_user"),{isFeatureEnabled:y}=g(Z.isChargeCardFeatureEnabled),h=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:B}=g(Z.isDebitCardFeatureEnabled),T=Ie(n),L=Ae(n),C=Ee(B,n),u=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,D=ke({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:C}),o=_e({isCardsOnlyTenant:T,isChargeCardFeatureEnabled:y,isBookKeepingTenant:L,isDebitCardProductVisible:D,chargeCardsCreditAccountLimit:u}),I=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,A=S(K=>qe(K,n.companyId)),j=Qe(A.controllers),{creditAccount:E,creditAccountRepayment:b}=S(K=>Je(K)),x=S(K=>K.classListState.fetchState),i=!v&&o&&h,m=S(K=>lt(K,a,i,o)),[U,M]=d.useState(!1),R=m.chargeCard,F=R?.cardCreatedByUser?.userId,$=S(K=>F!=null?xa(K.userRoleState,F):void 0),G=$?.accountingClassIDs[0],V=S(K=>G!=null?Ba(K.classState,{classId:G,reportId:"class_list"}):void 0),P=R?.cardHolderUser?.userId,Y=S(K=>P!=null?xa(K.userRoleState,P):void 0),Q=Y?.accountingClassIDs[0],w=S(K=>Q!=null?Ba(K.classState,{classId:Q,reportId:"class_list"}):void 0),O=R?.type.code==="business_physical_credit_card"||R?.type.code==="business_physical_debit_card",te=R?.type.code==="business_physical_debit_card";d.useEffect(()=>{l&&_===!1&&O&&(c(!0),setTimeout(()=>{t(La()),te&&t(pa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[l,_,O,te]),d.useEffect(()=>{U||m.fetchState==="Completed"||m.fetchState==="In-Progress"||a==null||(M(!0),t(ca(a,i,!1)))},[U,m,a,t]),d.useEffect(()=>{if(m.fetchState==="Completed"&&(O===!1||O&&R?.status?.code!=="active"||R?.cardHolderUserId!==r.userId||l===!1&&_===!1||R?.type.code==="business_physical_debit_card"||R?.type.code==="business_virtual_debit_card")){const K=pe(n.tenantEmailDomain,a,r,R,l);e(K)}},[m.fetchState,l,O]),d.useEffect(()=>{E.fetchState!=="Completed"&&E.fetchState!=="In-Progress"&&o&&h&&p&&t(Ne()),b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&o&&h&&p&&t(ut()),x!=="Completed"&&x!=="In-Progress"&&t(Vt())},[E.fetchState,b.fetchState,t,o,h,p,x]);const ae=()=>{if(r!=null&&a!=null){t(La());const K=pe(n.tenantEmailDomain,a,r);e(K)}},k=R?.type.code==="business_physical_debit_card"||R?.type.code==="business_virtual_debit_card",z=Me(o,D,I,h),J=Ea(o,h,p,E,b),X=fn(k,m);return m.fetchState!=="Completed"?s.jsx(Sa,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(za,{showConfetti:l}),s.jsx(es,{onGotItClick:ae,isDebitCard:R?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:o,isDebitCardFeatureEnabled:D,isDebitCardSetupEnabled:I,isChargeCardSetupEnabled:h,productInformation:z,creditAccountInformation:J,debitAccountInformation:X,chargeCardDetailView:m,creditAccount:E,classListFetchState:x,creditAccountRepayment:b,cardIssuedByRoles:$?.userRoles,cardIssuedByDepartmentName:V?.className,cardHolderRoles:Y?.userRoles,cardHolderDepartmentName:w?.className})]})}const At=e=>{const{events:a,onEvent:t,onSubscribed:r}=e,n=as(),f=d.useRef(t),p=d.useRef(r),g=d.useRef(0);d.useEffect(()=>{f.current=t},[t]),d.useEffect(()=>{p.current=r},[r]);const _=d.useMemo(()=>[...a].sort().join("|"),[a]);d.useEffect(()=>{if(n==null||a.length===0)return;const c=[],l=new Set,v=()=>{if(p.current==null)return;const y=Date.now();y-g.current<5e3||(g.current=y,p.current())};return a.forEach(y=>{const[h,B]=ts(y);if(B==="")return;const T=n.channel(h),L=u=>{f.current(B,u)};let C;if(T?.subscribed===!0)C=T,C.bind(B,L),l.has(h)||(l.add(h),v()),c.push(()=>{T.unbind(B,L)});else{if(C=T??n.subscribe(h),C.bind(B,L),!l.has(h)){l.add(h);const u=()=>{v()};C.bind("pusher:subscription_succeeded",u),c.push(()=>{C.unbind("pusher:subscription_succeeded",u)})}c.push(()=>{C.unbind(B,L)})}}),()=>{c.forEach(y=>y())}},[n,_])},An="charge-card-transaction-update",En="charge-card-transaction-created",kn="charge-card-transaction-declined",_n="charge-card-transaction-updated",Dn="charge-card-transaction-receipt-uploaded",aa="charge-card-status-update",Et="charge-card-spending-updated",Wa="credit-account-balance-updated",qa="charge-card-created",kt="charge-card-limit-updated",_t="charge-card-limit-reset",Dt="charge-card-renamed",xs="charge-card-department-updated",Pn="charge-card-repayment-completed",wn="charge-card-payment-date-updated",ka="charge-card-cashback-redeemed",_a="charge-card-cashback-earned",ta=(e,a)=>e==null||e===""?[]:a.map(t=>`private-encrypted-${e}.${t}`),Bs=[_a,ka],Ls=he(function(e){const a=Xe(e);return{insightsData:a.insight,cashbackByPeriod:a.cashbackByPeriod,uiState:a.uiState,cashbackSummary:a.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(a,t)=>{e(Un({uiState:{sortKey:a,sortOrder:t}}))}}})(rs);function Rs(){const e=me(),a=Ce(),t=Se(),r=ee.getSignedInUser(),n=S(B=>de(B)),{useFeatureGate:f}=oe(),{isFeatureEnabled:p}=f(Z.isCardsCommentingEnabled),[g,_]=d.useState(!1),c=S(B=>Xe(B)),l=Sn(n.companyId,{clearParams:c.fetchState==="Completed"}),v=d.useCallback(()=>{const B=Re(t.state?.pathnameStackToGoBack),T=B.poppedPathname??Us(n.tenantEmailDomain);e(T,{state:{pathnameStackToGoBack:B.newStack}})},[e,t,n.tenantEmailDomain]),y=Ge(n);if(At({events:ta(y,Bs),onEvent:B=>{switch(B){case _a:case ka:return void a(ha(!0))}},onSubscribed:()=>{a(ha(!0))}}),d.useEffect(()=>{g||c.fetchState==="Completed"||c.fetchState==="In-Progress"||(_(!0),a(ha()))},[g,c,a]),r==null)throw Error("Can't access cashback detail page without signing in...");const h=c.cashbackSummary?.cashbackEarned?.amount!=null&&c.fetchState!=="Not-Started";return c.fetchState!=="In-Progress"||h?(c.cashbackSummary?.cashbackEarned?.amount??0)===0&&c.fetchState==="Completed"?s.jsx(Ka,{}):s.jsx(Ls,{onBackClick:v,isCardsCommentingEnabled:p,initialOpenThreadRequest:l}):s.jsx(ns,{onBackClick:v})}const Us=e=>`/${e}/cards`,Os={containerWidth:new Aa(100,58)},js=({appContent:e})=>{const a=Ia(),t=Ce(),r=me(),{cardId:n}=ba(),f=Se(),{useDynamicConfig:p}=oe(),[g,_]=d.useState(!1),[c,l]=d.useState(!1),[v,y]=d.useState(!1),[h,B]=d.useState(!1),T=ee.getSignedInUser();if(T==null)throw Error("Can't access onboarding card page without signing in...");const L=S(w=>de(w));if(n==null)throw Error("Empty card id is not valid...");const{configValue:C}=p(Le.zeniCardsConfig),u=C.max_charge_card_activation_attempts_by_card_id,D=S(w=>On(w,n)),o=D.chargeCard,I=S(w=>w.chargeCardConfigState.fetchState),{useFeatureGate:A}=oe(),{isFeatureEnabled:j}=A(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:E}=A(Z.isDebitCardFeatureEnabled),b=Ee(E,L),x=ke({isDebitCardFeatureEnabled:E,isBankingOnlyTenant:b}),i=!!L.companyChargeCardInfo?.info?.isChargeCardEnabled,m=L.userRole.includes("charge_card_user"),U=Ie(L),M=Ae(L),R=L.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,F=_e({isCardsOnlyTenant:U,isChargeCardFeatureEnabled:j,isBookKeepingTenant:M,isDebitCardProductVisible:x,chargeCardsCreditAccountLimit:R}),$=!m&&F&&i;d.useEffect(()=>{g===!1&&I!=="In-Progress"&&I!=="Completed"&&(t(Va()),_(!0)),c===!1&&D.fetchState==="Not-Started"&&(l(!0),t(ca(n,$,F)))},[c,D.fetchState,g,I]);const G=o?.type.code==="business_physical_credit_card"||o?.type.code==="business_physical_debit_card";d.useEffect(()=>{if(D.fetchState==="Completed"){if(v===!1&&(G===!1||G&&o?.status?.code!=="inactive"||o?.cardHolderUserId!==T.userId)){const w=pe(L.tenantEmailDomain,n,T,o,!0),O=ye(f.state?.pathnameStackToGoBack,f.pathname);r(w,{state:{pathnameStackToGoBack:O}})}else if(v&&D.isRefreshingViewInBackground===!1&&o?.status?.code==="active"){t(jn({chargeCardId:n}));const w=pe(L.tenantEmailDomain,n,T,o,!0),O=ye(f.state?.pathnameStackToGoBack,f.pathname);t(Na()),r(w,{state:{pathnameStackToGoBack:O}})}}},[D.fetchState,o?.type.code,v,D.isRefreshingViewInBackground]);const V=ee.getZeniOtpTokenForCardHolder(n),P=S(w=>Nt(w.userState,T.userId)),Y=()=>{o?.status?.code!=="active"&&t(na(n,!0))};d.useEffect(()=>{D.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&o?.cardActivationAttemptHistory.some(w=>w.statusCode==="success")===!0&&v===!1&&(setTimeout(Y,3e3),y(!0))},[D.updatePhysicalChargeCardAttemptFetchState.fetchState,o?.cardActivationAttemptHistory]);const Q=w=>{B(w)};if(I!=="Completed"||o==null)return s.jsx(Sa,{fetchState:"In-Progress"});if(o.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(P?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Hs,{children:[s.jsx(We,{isAppContentDrawerOpen:h,handleDrawerToggle:Q}),s.jsx(Vs,{cardId:n,card:o,shippingAddressId:o.shippingAddressId,phone:P.phone,signedInUser:T,isSandboxEnv:ht(),chargeCardDetailState:D,signedInUserToken:V,navigate:r,currentTenant:L,location:f,maxChargeCardActivationAttempts:u[n]!=null?u[n]:C.default_max_charge_card_activation_attempts!=null?C.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:C.charge_card_cashback_rate_per_transaction!=null?C.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{Q(!0)}}),e!=null?s.jsx(Ns,{windowSize:a,children:e}):null]})},Vs=he(function(e,{chargeCardDetailState:a,shippingAddressId:t,location:r,cardId:n}){const f=Vn(e.addressState,t);if(f==null)throw Error("Can't access shippingAddress.");const p=Ht(e,n),g=a.updateStatus,_=ea(e,!1,!1,!1);let c=!1;_.fetchState==="Completed"&&_.cards.length<=1&&(c=!0);const l=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:a.chargeCard?.providerCardCreateTime!=null&&a.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Nn())||l,showMenuIcon:c,shippingAddress:f,vgsVaultId:Za.cardVaultId,twoFAView:p,activationWaitStatus:g,isRefreshingViewInBackground:a.isRefreshingViewInBackground}},function(e,a){const{navigate:t,cardId:r,location:n,currentTenant:f,chargeCardDetailState:p}=a,g=p.chargeCard?.cardProviderID,{tenantEmailDomain:_}=f;return{onGetOtp:c=>{g!=null&&e($a(c,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:c=>{e(Mn(r,c))},onResendOtp:c=>{g!=null&&e(Ma(c,"ChargeCardHolder",r))},onVerifyOtp:(c,l)=>{g!=null&&e(Ha(c,l,"ChargeCardHolder",r))},onVerifyOtpSuccess:c=>{c!=null&&ee.saveZeniOtpTokenForCardHolder(c,r)},onCVVActivateSuccess:()=>{e(Hn({chargeCardId:r}))},onBackClick:()=>{const c=Re(n.state?.pathnameStackToGoBack),l=c.poppedPathname==null||c.poppedPathname.includes("onboard")===!0?ze(_):c.poppedPathname;t(l,{state:{pathnameStackToGoBack:c.newStack}})}}})(ss),Ns=Fe.div`
|
|
1
|
+
import{j as s}from"./liveblocks-DAjhbt80.js";import{h as me,i as ba,u as Ce,j as S,g as Se,n as he,N as Ta,s as jt,o as Rn,p as se}from"./core-Csep4njy.js";import{eQ as de,bs as He,Po as ja,eZ as Ie,e_ as Ae,e$ as Ee,fU as qe,cs as Qe,Pp as Je,Pq as lt,tw as xa,jP as Ba,Pr as La,gU as pa,A9 as ca,Ab as Ne,Ac as ut,jF as Vt,Ps as Xe,zZ as ha,Pt as Un,Pu as On,A0 as Va,Pv as jn,NO as Na,rI as Nt,A6 as na,h3 as Vn,Pw as Ht,Px as ea,bq as Nn,Py as Hn,fF as Ha,fE as Ma,AG as Mn,fD as $a,Nu as $n,Pz as Mt,cl as $t,cM as Gn,NN as ya,Bg as Gt,PA as Ft,AS as fa,PB as zt,Bh as zn,Od as Zn,Bi as Yn,Cc as Kn,sS as Wn,C6 as qn,PC as Qn,Aa as Ye,PD as Jn,PE as Xn,PF as er,PG as ar,PH as tr,PI as mt,PJ as nr,Ar as Zt,Ak as rr,PK as sr,fW as cr,AA as Yt,AE as Kt,fV as or,PL as ir,B2 as Wt,PM as dr,PN as lr,PO as ur,AC as qt,An as Qt,A3 as Jt,Aw as Xt,Au as en,Ay as mr,PP as an,PQ as Ga,AP as ga,Kt as tn,cN as Ct,PR as Cr,PS as pr,PT as hr,PU as fr,AM as st,B9 as gr,B5 as br,AI as yr,B7 as Sr,AZ as Ir,A$ as Ar,PV as nn,Bf as Fa,HS as Er,PW as kr,PX as _r,PY as Dr,PZ as rn,P_ as Pr,BC as wr,AR as sn,AL as ve,AQ as vr,P$ as Fr,Q0 as Tr,zW as xr,Q1 as cn,Q2 as on,Q3 as Br,zY as Lr,zX as Tt,Q4 as Rr,Q5 as Ur,Q6 as Or,Kp as jr,Q7 as pt,Q8 as Vr,wx as dn,kn as Nr,gV as Hr,BH as Mr,Q9 as ln,Qa as $r,BI as Gr,Qb as zr,de as Zr,tq as Yr,Bx as Kr,Br as Ve,bt as Wr,bF as qr,cx as Qr,bG as Jr,JC as Xr}from"./zeni-epic-state-B_XLk_Px.js";import{z as ee,S as $e,n as oe,c as Z,B as Sa,c2 as za,cd as es,ce as as,cf as ts,r as Re,cg as ns,ch as rs,m as Ia,aN as Le,v as ye,bm as ht,ci as ss,F as Aa,i as Za,h as ft,d as q,D as gt,a7 as Ya,cj as cs,_ as un,aq as bt,by as ra,ck as ct,cl as os,A as yt,cm as is,at as mn,a2 as ot,Y as Cn,f as pn,cn as ds,co as ls,cp as us,cq as ms,cr as Cs,cs as ps,o as Ra,ct as hs,cu as fs,cv as at,x as gs,cw as bs,cx as ys,cy as Ss,cz as Is,cA as As,a9 as Es}from"./index-DgJtatP0.js";import{n as Fe,D as hn,S as ks}from"./mui-BwrnAXoT.js";import{a as d}from"./sentry-BchnSYMz.js";import{g as pe,a as Ea,b as fn,c as ke,d as _e,e as Me,f as Ge,h as ze,A as _s,i as St,P as Ds,j as It,s as sa,k as gn,l as Ke,m as bn,n as Ps,o as yn,p as ws,S as xt}from"./SetupPagesScreen-DV28qGiQ.js";import{u as Sn}from"./useInitialThreadRequest-Dg2cJQuZ.js";import Ka from"./NotFoundScreen-DXqfpA8J.js";import{M as We}from"./MobileAppDrawer-Cvrk0aA5.js";import{u as In}from"./useAskAiCfoHostNavButtonProps-DAyGHIvM.js";import{v as Bt}from"./utils-aai5Jslk.js";import{d as vs}from"./recharts-D7BeuhCa.js";import{t as Fs}from"./AddressScreen-m3-Kscdf.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./analyticsHelper-DB3_ay5h.js";import"./routePaths-CpXTBLF_.js";import"./BusinessVerificationPageScreen-C-6S-jFq.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]="33b2ab37-3766-45cc-872f-84a9e3fe40c1",e._sentryDebugIdIdentifier="sentry-dbid-33b2ab37-3766-45cc-872f-84a9e3fe40c1")}catch{}})();function Ts(){const e=me(),{cardId:a}=ba(),t=Ce(),r=ee.getSignedInUser(),n=S(K=>de(K)),f=$e(),p=He(f?.loggedInUserRoleMap),{useFeatureGate:g}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[_,c]=d.useState(!1),l=S(K=>ja(K).firstViewAfterActivation);if(a==null)throw Error("Empty card id is not valid...");const v=n.userRole.includes("charge_card_user"),{isFeatureEnabled:y}=g(Z.isChargeCardFeatureEnabled),h=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:B}=g(Z.isDebitCardFeatureEnabled),T=Ie(n),L=Ae(n),C=Ee(B,n),u=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,D=ke({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:C}),o=_e({isCardsOnlyTenant:T,isChargeCardFeatureEnabled:y,isBookKeepingTenant:L,isDebitCardProductVisible:D,chargeCardsCreditAccountLimit:u}),I=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,A=S(K=>qe(K,n.companyId)),j=Qe(A.controllers),{creditAccount:E,creditAccountRepayment:b}=S(K=>Je(K)),x=S(K=>K.classListState.fetchState),i=!v&&o&&h,m=S(K=>lt(K,a,i,o)),[U,M]=d.useState(!1),R=m.chargeCard,F=R?.cardCreatedByUser?.userId,$=S(K=>F!=null?xa(K.userRoleState,F):void 0),G=$?.accountingClassIDs[0],V=S(K=>G!=null?Ba(K.classState,{classId:G,reportId:"class_list"}):void 0),P=R?.cardHolderUser?.userId,Y=S(K=>P!=null?xa(K.userRoleState,P):void 0),Q=Y?.accountingClassIDs[0],w=S(K=>Q!=null?Ba(K.classState,{classId:Q,reportId:"class_list"}):void 0),O=R?.type.code==="business_physical_credit_card"||R?.type.code==="business_physical_debit_card",te=R?.type.code==="business_physical_debit_card";d.useEffect(()=>{l&&_===!1&&O&&(c(!0),setTimeout(()=>{t(La()),te&&t(pa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[l,_,O,te]),d.useEffect(()=>{U||m.fetchState==="Completed"||m.fetchState==="In-Progress"||a==null||(M(!0),t(ca(a,i,!1)))},[U,m,a,t]),d.useEffect(()=>{if(m.fetchState==="Completed"&&(O===!1||O&&R?.status?.code!=="active"||R?.cardHolderUserId!==r.userId||l===!1&&_===!1||R?.type.code==="business_physical_debit_card"||R?.type.code==="business_virtual_debit_card")){const K=pe(n.tenantEmailDomain,a,r,R,l);e(K)}},[m.fetchState,l,O]),d.useEffect(()=>{E.fetchState!=="Completed"&&E.fetchState!=="In-Progress"&&o&&h&&p&&t(Ne()),b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&o&&h&&p&&t(ut()),x!=="Completed"&&x!=="In-Progress"&&t(Vt())},[E.fetchState,b.fetchState,t,o,h,p,x]);const ae=()=>{if(r!=null&&a!=null){t(La());const K=pe(n.tenantEmailDomain,a,r);e(K)}},k=R?.type.code==="business_physical_debit_card"||R?.type.code==="business_virtual_debit_card",z=Me(o,D,I,h),J=Ea(o,h,p,E,b),X=fn(k,m);return m.fetchState!=="Completed"?s.jsx(Sa,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(za,{showConfetti:l}),s.jsx(es,{onGotItClick:ae,isDebitCard:R?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:o,isDebitCardFeatureEnabled:D,isDebitCardSetupEnabled:I,isChargeCardSetupEnabled:h,productInformation:z,creditAccountInformation:J,debitAccountInformation:X,chargeCardDetailView:m,creditAccount:E,classListFetchState:x,creditAccountRepayment:b,cardIssuedByRoles:$?.userRoles,cardIssuedByDepartmentName:V?.className,cardHolderRoles:Y?.userRoles,cardHolderDepartmentName:w?.className})]})}const At=e=>{const{events:a,onEvent:t,onSubscribed:r}=e,n=as(),f=d.useRef(t),p=d.useRef(r),g=d.useRef(0);d.useEffect(()=>{f.current=t},[t]),d.useEffect(()=>{p.current=r},[r]);const _=d.useMemo(()=>[...a].sort().join("|"),[a]);d.useEffect(()=>{if(n==null||a.length===0)return;const c=[],l=new Set,v=()=>{if(p.current==null)return;const y=Date.now();y-g.current<5e3||(g.current=y,p.current())};return a.forEach(y=>{const[h,B]=ts(y);if(B==="")return;const T=n.channel(h),L=u=>{f.current(B,u)};let C;if(T?.subscribed===!0)C=T,C.bind(B,L),l.has(h)||(l.add(h),v()),c.push(()=>{T.unbind(B,L)});else{if(C=T??n.subscribe(h),C.bind(B,L),!l.has(h)){l.add(h);const u=()=>{v()};C.bind("pusher:subscription_succeeded",u),c.push(()=>{C.unbind("pusher:subscription_succeeded",u)})}c.push(()=>{C.unbind(B,L)})}}),()=>{c.forEach(y=>y())}},[n,_])},An="charge-card-transaction-update",En="charge-card-transaction-created",kn="charge-card-transaction-declined",_n="charge-card-transaction-updated",Dn="charge-card-transaction-receipt-uploaded",aa="charge-card-status-update",Et="charge-card-spending-updated",Wa="credit-account-balance-updated",qa="charge-card-created",kt="charge-card-limit-updated",_t="charge-card-limit-reset",Dt="charge-card-renamed",xs="charge-card-department-updated",Pn="charge-card-repayment-completed",wn="charge-card-payment-date-updated",ka="charge-card-cashback-redeemed",_a="charge-card-cashback-earned",ta=(e,a)=>e==null||e===""?[]:a.map(t=>`private-encrypted-${e}.${t}`),Bs=[_a,ka],Ls=he(function(e){const a=Xe(e);return{insightsData:a.insight,cashbackByPeriod:a.cashbackByPeriod,uiState:a.uiState,cashbackSummary:a.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(a,t)=>{e(Un({uiState:{sortKey:a,sortOrder:t}}))}}})(rs);function Rs(){const e=me(),a=Ce(),t=Se(),r=ee.getSignedInUser(),n=S(B=>de(B)),{useFeatureGate:f}=oe(),{isFeatureEnabled:p}=f(Z.isCardsCommentingEnabled),[g,_]=d.useState(!1),c=S(B=>Xe(B)),l=Sn(n.companyId,{clearParams:c.fetchState==="Completed"}),v=d.useCallback(()=>{const B=Re(t.state?.pathnameStackToGoBack),T=B.poppedPathname??Us(n.tenantEmailDomain);e(T,{state:{pathnameStackToGoBack:B.newStack}})},[e,t,n.tenantEmailDomain]),y=Ge(n);if(At({events:ta(y,Bs),onEvent:B=>{switch(B){case _a:case ka:return void a(ha(!0))}},onSubscribed:()=>{a(ha(!0))}}),d.useEffect(()=>{g||c.fetchState==="Completed"||c.fetchState==="In-Progress"||(_(!0),a(ha()))},[g,c,a]),r==null)throw Error("Can't access cashback detail page without signing in...");const h=c.cashbackSummary?.cashbackEarned?.amount!=null&&c.fetchState!=="Not-Started";return c.fetchState!=="In-Progress"||h?(c.cashbackSummary?.cashbackEarned?.amount??0)===0&&c.fetchState==="Completed"?s.jsx(Ka,{}):s.jsx(Ls,{onBackClick:v,isCardsCommentingEnabled:p,initialOpenThreadRequest:l}):s.jsx(ns,{onBackClick:v})}const Us=e=>`/${e}/cards`,Os={containerWidth:new Aa(100,58)},js=({appContent:e})=>{const a=Ia(),t=Ce(),r=me(),{cardId:n}=ba(),f=Se(),{useDynamicConfig:p}=oe(),[g,_]=d.useState(!1),[c,l]=d.useState(!1),[v,y]=d.useState(!1),[h,B]=d.useState(!1),T=ee.getSignedInUser();if(T==null)throw Error("Can't access onboarding card page without signing in...");const L=S(w=>de(w));if(n==null)throw Error("Empty card id is not valid...");const{configValue:C}=p(Le.zeniCardsConfig),u=C.max_charge_card_activation_attempts_by_card_id,D=S(w=>On(w,n)),o=D.chargeCard,I=S(w=>w.chargeCardConfigState.fetchState),{useFeatureGate:A}=oe(),{isFeatureEnabled:j}=A(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:E}=A(Z.isDebitCardFeatureEnabled),b=Ee(E,L),x=ke({isDebitCardFeatureEnabled:E,isBankingOnlyTenant:b}),i=!!L.companyChargeCardInfo?.info?.isChargeCardEnabled,m=L.userRole.includes("charge_card_user"),U=Ie(L),M=Ae(L),R=L.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,F=_e({isCardsOnlyTenant:U,isChargeCardFeatureEnabled:j,isBookKeepingTenant:M,isDebitCardProductVisible:x,chargeCardsCreditAccountLimit:R}),$=!m&&F&&i;d.useEffect(()=>{g===!1&&I!=="In-Progress"&&I!=="Completed"&&(t(Va()),_(!0)),c===!1&&D.fetchState==="Not-Started"&&(l(!0),t(ca(n,$,F)))},[c,D.fetchState,g,I]);const G=o?.type.code==="business_physical_credit_card"||o?.type.code==="business_physical_debit_card";d.useEffect(()=>{if(D.fetchState==="Completed"){if(v===!1&&(G===!1||G&&o?.status?.code!=="inactive"||o?.cardHolderUserId!==T.userId)){const w=pe(L.tenantEmailDomain,n,T,o,!0),O=ye(f.state?.pathnameStackToGoBack,f.pathname);r(w,{state:{pathnameStackToGoBack:O}})}else if(v&&D.isRefreshingViewInBackground===!1&&o?.status?.code==="active"){t(jn({chargeCardId:n}));const w=pe(L.tenantEmailDomain,n,T,o,!0),O=ye(f.state?.pathnameStackToGoBack,f.pathname);t(Na()),r(w,{state:{pathnameStackToGoBack:O}})}}},[D.fetchState,o?.type.code,v,D.isRefreshingViewInBackground]);const V=ee.getZeniOtpTokenForCardHolder(n),P=S(w=>Nt(w.userState,T.userId)),Y=()=>{o?.status?.code!=="active"&&t(na(n,!0))};d.useEffect(()=>{D.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&o?.cardActivationAttemptHistory.some(w=>w.statusCode==="success")===!0&&v===!1&&(setTimeout(Y,3e3),y(!0))},[D.updatePhysicalChargeCardAttemptFetchState.fetchState,o?.cardActivationAttemptHistory]);const Q=w=>{B(w)};if(I!=="Completed"||o==null)return s.jsx(Sa,{fetchState:"In-Progress"});if(o.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(P?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Hs,{children:[s.jsx(We,{isAppContentDrawerOpen:h,handleDrawerToggle:Q}),s.jsx(Vs,{cardId:n,card:o,shippingAddressId:o.shippingAddressId,phone:P.phone,signedInUser:T,isSandboxEnv:ht(),chargeCardDetailState:D,signedInUserToken:V,navigate:r,currentTenant:L,location:f,maxChargeCardActivationAttempts:u[n]!=null?u[n]:C.default_max_charge_card_activation_attempts!=null?C.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:C.charge_card_cashback_rate_per_transaction!=null?C.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{Q(!0)}}),e!=null?s.jsx(Ns,{windowSize:a,children:e}):null]})},Vs=he(function(e,{chargeCardDetailState:a,shippingAddressId:t,location:r,cardId:n}){const f=Vn(e.addressState,t);if(f==null)throw Error("Can't access shippingAddress.");const p=Ht(e,n),g=a.updateStatus,_=ea(e,!1,!1,!1);let c=!1;_.fetchState==="Completed"&&_.cards.length<=1&&(c=!0);const l=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:a.chargeCard?.providerCardCreateTime!=null&&a.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Nn())||l,showMenuIcon:c,shippingAddress:f,vgsVaultId:Za.cardVaultId,twoFAView:p,activationWaitStatus:g,isRefreshingViewInBackground:a.isRefreshingViewInBackground}},function(e,a){const{navigate:t,cardId:r,location:n,currentTenant:f,chargeCardDetailState:p}=a,g=p.chargeCard?.cardProviderID,{tenantEmailDomain:_}=f;return{onGetOtp:c=>{g!=null&&e($a(c,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:c=>{e(Mn(r,c))},onResendOtp:c=>{g!=null&&e(Ma(c,"ChargeCardHolder",r))},onVerifyOtp:(c,l)=>{g!=null&&e(Ha(c,l,"ChargeCardHolder",r))},onVerifyOtpSuccess:c=>{c!=null&&ee.saveZeniOtpTokenForCardHolder(c,r)},onCVVActivateSuccess:()=>{e(Hn({chargeCardId:r}))},onBackClick:()=>{const c=Re(n.state?.pathnameStackToGoBack),l=c.poppedPathname==null||c.poppedPathname.includes("onboard")===!0?ze(_):c.poppedPathname;t(l,{state:{pathnameStackToGoBack:c.newStack}})}}})(ss),Ns=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: ${e=>`${Os.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-DAjhbt80.js";import{a as g}from"./sentry-BchnSYMz.js";import{h as w,u as T,g as k,i as x,j as O,n as E}from"./core-Csep4njy.js";import{z as C,b7 as F,A as P,d as V,f as A,af as N,b8 as L,at as j,au as M,v as U}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-DAjhbt80.js";import{a as g}from"./sentry-BchnSYMz.js";import{h as w,u as T,g as k,i as x,j as O,n as E}from"./core-Csep4njy.js";import{z as C,b7 as F,A as P,d as V,f as A,af as N,b8 as L,at as j,au as M,v as U}from"./index-DgJtatP0.js";import{eQ as h,fH as B,sh as _,fC as R,c2 as z,MT as G,bn as q,qp as H,qd as Y,kf as Q,lL as S,MU as W,bE as Z,cv as b,lT as $,lW as J}from"./zeni-epic-state-B_XLk_Px.js";import"./mui-BwrnAXoT.js";import{d as K}from"./routePaths-CpXTBLF_.js";import{M as X}from"./MobileAppDrawer-Cvrk0aA5.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="9d738ca6-f256-4e35-b3f2-aaafaf107959",n._sentryDebugIdIdentifier="sentry-dbid-9d738ca6-f256-4e35-b3f2-aaafaf107959")}catch{}})();const ee=E(function(n){const t=R(n),i=C.getSignedInUser(),l=h(n),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${j.fileMicroServiceBaseUrl}`,isZeniUser:q(i)}},function(n,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(J())},onAddressClick:e=>{const a=K(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n($({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:D}=r,v={companyInfo:{...a,website:u!=""&&u!=null?b(u):void 0,meetingLink:y!=""&&y!=null?b(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:M(I))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?Z(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:D.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(W(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(Q({files:e}))},onDeleteFile:e=>{n(Y(e))},onEditFileName:(e,a)=>{n(H(e,a.split(".")[0]))}}})(L);function de(){const n=w(),t=T(),i=k(),{tenantEmailDomain:l}=x(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>h(s)),d=r.companyId??C.getSignedInUserTenant(l)?.companyId;if(C.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||a!=="Not-Started"||d==null||(p(!0),t(B(d)))},[c,a,d,t]),g.useEffect(()=>{o==="Not-Started"&&t(_())},[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(A.Event.companyPassport,N(i)?"Settings":"Company Passport")}),N(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:N(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-DAjhbt80.js";import{a}from"./sentry-BchnSYMz.js";import{u as D,g as v,j as u,N as w}from"./core-Csep4njy.js";import{Jy as A,eQ as O,fp as j,mX as U,fQ as h,fo as _,eX as F,JF as L}from"./zeni-epic-state-B_XLk_Px.js";import{u as $,z as c,L as g,D as k,o as H}from"./index-
|
|
1
|
+
import{j as C}from"./liveblocks-DAjhbt80.js";import{a}from"./sentry-BchnSYMz.js";import{u as D,g as v,j as u,N as w}from"./core-Csep4njy.js";import{Jy as A,eQ as O,fp as j,mX as U,fQ as h,fo as _,eX as F,JF as L}from"./zeni-epic-state-B_XLk_Px.js";import{u as $,z as c,L as g,D as k,o as H}from"./index-DgJtatP0.js";import{n as Q}from"./mui-BwrnAXoT.js";import{t as z}from"./getLocaleForTenant-Ba61Gz0E.js";import{g as R,Q as J}from"./QBOConnectionScreen-B0drHqyu.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";import"./empty-DUEvEoMc.js";import"./pdf-lib-jdfyLvIR.js";import"./index-Brq6QGrX.js";import"./url-UFdKDvUl.js";import"./index-CNDQ8F1I.js";import"./decodeURIComponentSafe-C5ifH7fM.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="cb0427d8-047c-46b0-afdd-57c244789af4",t._sentryDebugIdIdentifier="sentry-dbid-cb0427d8-047c-46b0-afdd-57c244789af4")}catch{}})();const P=Q.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-DAjhbt80.js";import{z as n}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-DAjhbt80.js";import{z as n}from"./index-DgJtatP0.js";import{g as d}from"./QBOConnectionScreen-B0drHqyu.js";import"./sentry-BchnSYMz.js";import{g as p,N as a}from"./core-Csep4njy.js";import"./zeni-epic-state-B_XLk_Px.js";import"./recharts-D7BeuhCa.js";import"./mui-BwrnAXoT.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";import"./empty-DUEvEoMc.js";import"./pdf-lib-jdfyLvIR.js";import"./index-Brq6QGrX.js";import"./url-UFdKDvUl.js";import"./index-CNDQ8F1I.js";import"./decodeURIComponentSafe-C5ifH7fM.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]="e53e9b9f-4e1e-4d41-afae-a46e42efc4b3",e._sentryDebugIdIdentifier="sentry-dbid-e53e9b9f-4e1e-4d41-afae-a46e42efc4b3")}catch{}})();const U=()=>{const e=p(),{code:t,realmId:o,state:r}=d(e.search),s=n.getSignedInUser()?.userId??"";if(f(t,o,r,s)===!0){const m=`../../${r}/onboarding?code=${t}&realmId=${o}&state=auth_flow`;return i.jsx(a,{to:m})}return i.jsx(a,{to:"../../"})},f=(e,t,o,r)=>e!=""&&t!=""&&o!=""&&r!=null&&r!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-OE4wpozP.js → CustomerOnboardingRoutes-kLBRPvaQ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-DAjhbt80.js";import{t as Ke,A as Ce}from"./AddressScreen-
|
|
1
|
+
import{j as a}from"./liveblocks-DAjhbt80.js";import{t as Ke,A as Ce}from"./AddressScreen-m3-Kscdf.js";import $e from"./NotFoundScreen-DXqfpA8J.js";import{a as g}from"./sentry-BchnSYMz.js";import{h as se,g as oe,u as ie,i as re,j as D,N as E,n as ce,l as ze,o as Me,p as z}from"./core-Csep4njy.js";import{x as de,S as le,z as B,n as ue,h as qe,c as _,v as V,A as W,d as N,B as je,f as X,ap as Qe,m as Ze,aq as Ie,i as te,ar as He,as as ke,o as We,at as Je,au as Ee,av as Xe}from"./index-DgJtatP0.js";import{bn as Ye,eQ as ee,fh as et,e$ as pe,eZ as me,bt as tt,mV as at,fd as nt,bO as st,jj as ae,jm as ve,K2 as ot,bT as it,c2 as ge,sv as he,sg as rt,Ky as Y,sw as _e,HW as ct,kn as Ue,Kz as Ve,KA as dt,KB as lt,KC as ut,jh as pt,jk as mt,si as Be,su as gt,bE as Te,cv as ht,sI as xe,qp as ft,qd as yt,kf as St,fF as bt,fE as Ct,fD as It,KD as kt,sa as Et,sJ as Tt,sM as xt,sP as Ot,sV as Pt,cT as At}from"./zeni-epic-state-B_XLk_Px.js";import{n as fe}from"./mui-BwrnAXoT.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-B0drHqyu.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";import"./empty-DUEvEoMc.js";import"./pdf-lib-jdfyLvIR.js";import"./index-Brq6QGrX.js";import"./url-UFdKDvUl.js";import"./index-CNDQ8F1I.js";import"./decodeURIComponentSafe-C5ifH7fM.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]="038a9313-768e-47ca-9841-4454b1737f12",t._sentryDebugIdIdentifier="sentry-dbid-038a9313-768e-47ca-9841-4454b1737f12")}catch{}})();const wt=ce(function(t,s){const o=[];s.isApAgingFeatureEnabled===!1&&o.push("accounts_payable_aging"),s.isArAgingFeatureEnabled===!1&&o.push("accounts_receivable_aging"),s.shouldFetchZeniAccountsPromoCard===!1&&o.push("zeni_accounts_promo_card"),s.shouldFetchRewardsPlanCard===!1&&o.push("rewards_card"),s.isExpenseAutomationEnabledForUser===!1&&o.push("expense_automation_card");const u=nt(t,o,s.signedInUser,s.isExpenseAutomationFeatureEnabledV2,s.isExpenseAutomationEnabledForUser,s.isTreasuryEnabled);return{dashboardFetchState:st(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,s){const{themeState:o,navigate:u,location:d}=s;return{onZeniLogoClick:()=>{o.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Qe),jt=()=>{const t=se(),s=oe(),o=ie(),u=de(),[d,r]=g.useState(!1),[p,S]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),h=Ye(i),{useFeatureGate:m}=ue(),k=qe(),{isFeatureEnabled:T}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:x}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:I}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),K=C||U&&h,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),w=c.company!=null&&et(c.company),R=L&&w,O=D(l=>l.onboardingCustomerViewState.fetchState),b=c.excludedResources,G=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const j=pe(F,c),P=me(c),A=[],Q=b?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,$=b?.resources?.find(l=>l.resource==="/reports/task_card")==null,M=c?.userRole!=null&&tt(c?.userRole),v=b?.resources?.find(l=>l.resource==="/bills")==null&&!M,q=b?.resources?.find(l=>l.resource==="/reimbursements")==null;if(Q===!1&&A.push("top_expenses"),$===!1&&A.push("task_card"),v===!1&&A.push("bill_pay_card","bill_pay_promo_card"),q===!1&&A.push("reimbursement_card","reimbursement_promo_card"),I===!1&&A.push("zeni_accounts_promo_card"),f===!1&&A.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||j||P||(r(!0),o(at(i.userId,G,c.tenantId,!0,!1,A)))},[d,O,j,P,i,c.tenantId,o]),g.useEffect(()=>{(j||P)&&setTimeout(()=>{S(!0)},5e3)},[j,P]),O!=="Completed")return a.jsx(E,{to:"../"});if(O==="Completed"&&p){const l=V(s.state?.pathnameStackToGoBack,s.pathname);if(j)return a.jsx(E,{to:"../../checking",state:{...s.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(E,{to:"../../cards",state:{...s.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(W,{analytics:N,onLoad:l=>(Z=>Z.trackPageLoaded(X.Event.onboardingDashboardActivation))(l)}),a.jsx(wt,{navigate:t,location:s,themeState:u,signedInUser:i,isApAgingFeatureEnabled:T,isArAgingFeatureEnabled:x,shouldFetchZeniAccountsPromoCard:I,shouldFetchRewardsPlanCard:f,isExpenseAutomationEnabledForUser:K,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:R,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(je,{fetchState:"In-Progress",style:{backgroundColor:k.colors.grey5}})},Oe=fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${t=>t.theme.colors.grey4};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-DAjhbt80.js";import{i as K,j as _,g as H,u as z,h as W,n as te,k as oa,o as gt,p as F}from"./core-Csep4njy.js";import{eQ as L,KT as Xe,bE as sa,bq as xe,M4 as In,i7 as Tn,M5 as Nt,M6 as xn,ia as bt,M7 as Qe,M8 as Dn,ig as wn,M9 as $t,Ma as Fn,ik as Ct,Mb as He,Mc as On,cl as St,Md as Pn,Me as Mn,Lb as Rn,jd as Bn,Mf as jn,bn as Ge,Mg as ra,KH as ce,bc as ia,jr as ca,n3 as la,ja as da,KJ as le,KI as ee,eP as ua,eV as Un,fr as kt,Mh as Ln,Mi as Gn,Mj as ma,Mk as Re,uw as Ye,ux as Ve,uU as De,uO as de,uB as Ne,Ml as Yn,Mm as Vn,Mn as Nn,Mo as pa,Mp as Be,Mq as $n,dE as Je,qZ as ha,Mr as zn,Ms as Kn,Mt as qn,Mu as yt,K4 as At,jH as we,v0 as vt,r5 as Zn,Mv as Qn,uy as zt,r0 as Ie,qY as fa,Mw as ge,Mx as Hn,My as Et,K3 as It,sZ as ga,Mz as Wn,MA as Xn,MB as Jn,MC as Tt,ta as eo,MD as to,uA as Kt,sY as ba,ME as be,MF as ao,bt as Ca,v4 as ka,MG as no,MH as oo,MI as so,MJ as xt,u$ as ro,MK as io,uz as qt,v3 as _a,ML as Ce,MM as co,MN as lo,MO as Sa,jw as ya,n0 as Aa,jB as va,m_ as Ea,mZ as Ia,mY as Ta,sl as uo,fh as mo,cN as po,cO as ho,mV as fo,fd as go,na as bo,E8 as Zt,MP as Co,MQ as ko,MR as _o,MS as So,b5 as et,f5 as yo,gS as Ao,fH as vo,n4 as Eo,j3 as Io,n1 as To,m$ as xo,e$ as Do,eZ as wo}from"./zeni-epic-state-B_XLk_Px.js";import{z as j,a2 as ae,v as D,d as x,D as q,aU as Fo,_ as $e,A as ze,aV as xa,f as N,aW as Oo,S as _e,aX as Da,n as Se,c as R,h as Po,aY as Mo,aZ as Ro,W as wa,m as Fa,a as Oa,Z as Bo,a_ as jo,U as Uo,aN as Pa,$ as se,a$ as Ma,b0 as Ra,a1 as Ba,b1 as Lo,b2 as Go,aq as Yo,r as Vo,Y as No,b3 as $o,b4 as zo,b5 as Ko,b6 as ke}from"./index-Dccod20C.js";import{n as Dt}from"./mui-BwrnAXoT.js";import{a as b}from"./sentry-BchnSYMz.js";import{w as ja}from"./withTransactionSidePanel-B8L5PzVM.js";import{c as Ua,t as Fe,f as ue,a as wt,v as qo}from"./routePaths-DiDc2DBY.js";import{u as ne}from"./useAskAiCfoHostNavButtonProps-CR3Kbk6n.js";import Le from"./NotFoundScreen-DX_llqMh.js";import{u as Ft}from"./useInitialThreadRequest-C5nc3ybP.js";import{t as La}from"./analyticsHelper-MLU40ae_.js";import{C as Zo}from"./CompanyPassportScreen-i0UsKfLm.js";import{u as Qo}from"./useAiCfoDashboardSuggestedQuestionsChips-CFwAZJWa.js";import{F as Ho}from"./FeaturePreviewScreen-BAyL66YE.js";import{R as Wo}from"./ReferralListScreen-fPRYSLID.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";import"./TransactionDetailScreen-BGtmtzWU.js";import"./decodeURIComponentSafe-C5ifH7fM.js";import"./MobileAppDrawer-CZdE1-bN.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]="52fae53a-3fee-44b3-81dc-9844d62f9533",e._sentryDebugIdIdentifier="sentry-dbid-52fae53a-3fee-44b3-81dc-9844d62f9533")}catch{}})();const Xo=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(y=>y.tenantState.currentTenantId),c=_(y=>L(y)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),h=b.useMemo(()=>r!=null?sa(r):xe(),[r]),p=z(),f=W(),A=_(y=>In(y,h,o)),E=b.useCallback(()=>{o!=null&&A.fetchState!=="In-Progress"&&A.fetchState!=="Completed"&&p(Tn(o,h))},[h]),S=b.useCallback(()=>{f("../../",{relative:"path"})},[]),I=b.useCallback((y,M)=>{p(Nt({sortKey:y,sortOrder:M}))},[]),T=b.useCallback(y=>{p(Nt({downloadState:y}))},[]),U=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(m!=null){const M=Ua({id:y.transactionId,type:y.transactionType},m);f(M);const X=D(g.state?.pathnameStackToGoBack,g.pathname);f(M,{state:{pathnameStackToGoBack:X}})}},[m,e]),k=b.useCallback(()=>{A.vendor!=null&&x.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),A.vendor.id,A.vendor.name)},[A.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{A.fetchState==="Completed"&&k()},[k,A.fetchState]),d.jsx(Fo,{apAgingDetail:A,downloadParams:l,reportDate:h,analytics:x,onTransactionClick:U,onReload:E,onBackClick:S,onColumnSortConfigChanged:I,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Jo=()=>{const e=z(),a=W(),t=_(I=>xn(I)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AP Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(I=>I.tenantState.currentTenantId),i=_(I=>L(I)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),C=t.apAgingUIState.selectedDate??xe(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(I=>{e(Qe({searchString:I}))},[]),p=b.useCallback((I,T)=>{e(Qe({sortKey:T,sortOrder:I}))},[]),f=b.useCallback(I=>{a(`./${I}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),A=b.useCallback(I=>{e(Qe({downloadState:I}))},[]),E=b.useCallback((I,T)=>{},[]),S=b.useCallback((I,T)=>{e(Qe({selectedDate:I,agingDateSelectionType:T})),e(bt(I))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(xa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:x,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:A,onSelectedDateChanged:S,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},es=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(k=>L(k)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),l=b.useMemo(()=>r!=null?sa(r):xe(),[r]),h=z(),p=W(),f=_(k=>Dn(k,l,o)),A=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(wn(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),S=b.useCallback((k,y)=>{h($t({sortKey:k,sortOrder:y}))},[]),I=b.useCallback(k=>{h($t({downloadState:k}))},[]),T=b.useCallback(k=>{if(e)e(k.transactionId,k.transactionType);else if(c!=null){const y=Ua({id:k.transactionId,type:k.transactionType},c);p(y);const M=D(m.state?.pathnameStackToGoBack,m.pathname);p(y,{state:{pathnameStackToGoBack:M}})}},[c,e]),U=b.useCallback(()=>{f.customer!=null&&x.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{A()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&U()},[f.fetchState,U]),d.jsx(Oo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:x,onTransactionClick:T,onReload:A,onBackClick:E,onColumnSortConfigChanged:S,updateDownloadStateHandler:I,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ts=()=>{const e=z(),a=W(),t=_(S=>Fn(S)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AR Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(S=>L(S)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),g=t.arAgingUIState.selectedDate??xe(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(Ct(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(S=>{e(He({searchString:S}))},[]),h=b.useCallback((S,I)=>{e(He({sortKey:I,sortOrder:S}))},[]),p=b.useCallback(S=>{a(`./${S}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(S=>{e(He({downloadState:S}))},[]),A=b.useCallback((S,I)=>{e(He({selectedDate:S,agingDateSelectionType:I})),e(Ct(S))},[]),E=b.useCallback((S,I)=>{e(On({nodeId:S,isCollapsed:I}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(xa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:x,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:A,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 Ya(e,a){const t=Rn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Fe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Bn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?x.trackZeniAccountsCashBalancePromoClicked("Move Money"):(x.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else x.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const as=te(function(e){const a=Pn(e).accountsInOrder.map((n,o)=>Ga(n,o)),t=Mn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:x}},Ya)(Da),ns=te(function(e){const a=jn(e).accountsInOrder.map((o,r)=>Ga(o,r)),t=j.getSignedInUser(),n=Ge(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:x}},Ya)(Da);function os(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=_(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=St(n?.loggedInUserRoleMap);return _(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(Le,{}):d.jsx(as,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ss(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=St(n?.loggedInUserRoleMap),r=_(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return _(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(Le,{}):d.jsx(ns,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const rs=Dt.div`
|
|
1
|
+
import{j as d}from"./liveblocks-DAjhbt80.js";import{i as K,j as _,g as H,u as z,h as W,n as te,k as oa,o as gt,p as F}from"./core-Csep4njy.js";import{eQ as L,KT as Xe,bE as sa,bq as xe,M4 as In,i7 as Tn,M5 as Nt,M6 as xn,ia as bt,M7 as Qe,M8 as Dn,ig as wn,M9 as $t,Ma as Fn,ik as Ct,Mb as He,Mc as On,cl as St,Md as Pn,Me as Mn,Lb as Rn,jd as Bn,Mf as jn,bn as Ge,Mg as ra,KH as ce,bc as ia,jr as ca,n3 as la,ja as da,KJ as le,KI as ee,eP as ua,eV as Un,fr as kt,Mh as Ln,Mi as Gn,Mj as ma,Mk as Re,uw as Ye,ux as Ve,uU as De,uO as de,uB as Ne,Ml as Yn,Mm as Vn,Mn as Nn,Mo as pa,Mp as Be,Mq as $n,dE as Je,qZ as ha,Mr as zn,Ms as Kn,Mt as qn,Mu as yt,K4 as At,jH as we,v0 as vt,r5 as Zn,Mv as Qn,uy as zt,r0 as Ie,qY as fa,Mw as ge,Mx as Hn,My as Et,K3 as It,sZ as ga,Mz as Wn,MA as Xn,MB as Jn,MC as Tt,ta as eo,MD as to,uA as Kt,sY as ba,ME as be,MF as ao,bt as Ca,v4 as ka,MG as no,MH as oo,MI as so,MJ as xt,u$ as ro,MK as io,uz as qt,v3 as _a,ML as Ce,MM as co,MN as lo,MO as Sa,jw as ya,n0 as Aa,jB as va,m_ as Ea,mZ as Ia,mY as Ta,sl as uo,fh as mo,cN as po,cO as ho,mV as fo,fd as go,na as bo,E8 as Zt,MP as Co,MQ as ko,MR as _o,MS as So,b5 as et,f5 as yo,gS as Ao,fH as vo,n4 as Eo,j3 as Io,n1 as To,m$ as xo,e$ as Do,eZ as wo}from"./zeni-epic-state-B_XLk_Px.js";import{z as j,a2 as ae,v as D,d as x,D as q,aU as Fo,_ as $e,A as ze,aV as xa,f as N,aW as Oo,S as _e,aX as Da,n as Se,c as R,h as Po,aY as Mo,aZ as Ro,W as wa,m as Fa,a as Oa,Z as Bo,a_ as jo,U as Uo,aN as Pa,$ as se,a$ as Ma,b0 as Ra,a1 as Ba,b1 as Lo,b2 as Go,aq as Yo,r as Vo,Y as No,b3 as $o,b4 as zo,b5 as Ko,b6 as ke}from"./index-DgJtatP0.js";import{n as Dt}from"./mui-BwrnAXoT.js";import{a as b}from"./sentry-BchnSYMz.js";import{w as ja}from"./withTransactionSidePanel-Bh7VGJfn.js";import{c as Ua,t as Fe,f as ue,a as wt,v as qo}from"./routePaths-CpXTBLF_.js";import{u as ne}from"./useAskAiCfoHostNavButtonProps-DAyGHIvM.js";import Le from"./NotFoundScreen-DXqfpA8J.js";import{u as Ft}from"./useInitialThreadRequest-Dg2cJQuZ.js";import{t as La}from"./analyticsHelper-DB3_ay5h.js";import{C as Zo}from"./CompanyPassportScreen-BXvU3-bZ.js";import{u as Qo}from"./useAiCfoDashboardSuggestedQuestionsChips-CWAGANr4.js";import{F as Ho}from"./FeaturePreviewScreen--3IRWa9I.js";import{R as Wo}from"./ReferralListScreen-JMU6dR_V.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";import"./TransactionDetailScreen-CpmzsSf7.js";import"./decodeURIComponentSafe-C5ifH7fM.js";import"./MobileAppDrawer-Cvrk0aA5.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]="52fae53a-3fee-44b3-81dc-9844d62f9533",e._sentryDebugIdIdentifier="sentry-dbid-52fae53a-3fee-44b3-81dc-9844d62f9533")}catch{}})();const Xo=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(y=>y.tenantState.currentTenantId),c=_(y=>L(y)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),h=b.useMemo(()=>r!=null?sa(r):xe(),[r]),p=z(),f=W(),A=_(y=>In(y,h,o)),E=b.useCallback(()=>{o!=null&&A.fetchState!=="In-Progress"&&A.fetchState!=="Completed"&&p(Tn(o,h))},[h]),S=b.useCallback(()=>{f("../../",{relative:"path"})},[]),I=b.useCallback((y,M)=>{p(Nt({sortKey:y,sortOrder:M}))},[]),T=b.useCallback(y=>{p(Nt({downloadState:y}))},[]),U=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(m!=null){const M=Ua({id:y.transactionId,type:y.transactionType},m);f(M);const X=D(g.state?.pathnameStackToGoBack,g.pathname);f(M,{state:{pathnameStackToGoBack:X}})}},[m,e]),k=b.useCallback(()=>{A.vendor!=null&&x.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),A.vendor.id,A.vendor.name)},[A.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{A.fetchState==="Completed"&&k()},[k,A.fetchState]),d.jsx(Fo,{apAgingDetail:A,downloadParams:l,reportDate:h,analytics:x,onTransactionClick:U,onReload:E,onBackClick:S,onColumnSortConfigChanged:I,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Jo=()=>{const e=z(),a=W(),t=_(I=>xn(I)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AP Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(I=>I.tenantState.currentTenantId),i=_(I=>L(I)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),C=t.apAgingUIState.selectedDate??xe(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(I=>{e(Qe({searchString:I}))},[]),p=b.useCallback((I,T)=>{e(Qe({sortKey:T,sortOrder:I}))},[]),f=b.useCallback(I=>{a(`./${I}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),A=b.useCallback(I=>{e(Qe({downloadState:I}))},[]),E=b.useCallback((I,T)=>{},[]),S=b.useCallback((I,T)=>{e(Qe({selectedDate:I,agingDateSelectionType:T})),e(bt(I))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(xa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:x,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:A,onSelectedDateChanged:S,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},es=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(k=>L(k)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),l=b.useMemo(()=>r!=null?sa(r):xe(),[r]),h=z(),p=W(),f=_(k=>Dn(k,l,o)),A=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(wn(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),S=b.useCallback((k,y)=>{h($t({sortKey:k,sortOrder:y}))},[]),I=b.useCallback(k=>{h($t({downloadState:k}))},[]),T=b.useCallback(k=>{if(e)e(k.transactionId,k.transactionType);else if(c!=null){const y=Ua({id:k.transactionId,type:k.transactionType},c);p(y);const M=D(m.state?.pathnameStackToGoBack,m.pathname);p(y,{state:{pathnameStackToGoBack:M}})}},[c,e]),U=b.useCallback(()=>{f.customer!=null&&x.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{A()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&U()},[f.fetchState,U]),d.jsx(Oo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:x,onTransactionClick:T,onReload:A,onBackClick:E,onColumnSortConfigChanged:S,updateDownloadStateHandler:I,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ts=()=>{const e=z(),a=W(),t=_(S=>Fn(S)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AR Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(S=>L(S)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),g=t.arAgingUIState.selectedDate??xe(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(Ct(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(S=>{e(He({searchString:S}))},[]),h=b.useCallback((S,I)=>{e(He({sortKey:I,sortOrder:S}))},[]),p=b.useCallback(S=>{a(`./${S}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(S=>{e(He({downloadState:S}))},[]),A=b.useCallback((S,I)=>{e(He({selectedDate:S,agingDateSelectionType:I})),e(Ct(S))},[]),E=b.useCallback((S,I)=>{e(On({nodeId:S,isCollapsed:I}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(xa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:x,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:A,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 Ya(e,a){const t=Rn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Fe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Bn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?x.trackZeniAccountsCashBalancePromoClicked("Move Money"):(x.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else x.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const as=te(function(e){const a=Pn(e).accountsInOrder.map((n,o)=>Ga(n,o)),t=Mn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:x}},Ya)(Da),ns=te(function(e){const a=jn(e).accountsInOrder.map((o,r)=>Ga(o,r)),t=j.getSignedInUser(),n=Ge(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:x}},Ya)(Da);function os(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=_(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=St(n?.loggedInUserRoleMap);return _(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(Le,{}):d.jsx(as,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ss(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=St(n?.loggedInUserRoleMap),r=_(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return _(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(Le,{}):d.jsx(ns,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const rs=Dt.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-DAjhbt80.js";import{a as u}from"./sentry-BchnSYMz.js";import{u as y,j as b,n as A,g as w,N}from"./core-Csep4njy.js";import{Jy as U,eQ as _,fp as k,Jz as z,mX as L,JA as R}from"./zeni-epic-state-B_XLk_Px.js";import{u as j,z as f,L as T,t as I,D as O,b as $}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-DAjhbt80.js";import{a as u}from"./sentry-BchnSYMz.js";import{u as y,j as b,n as A,g as w,N}from"./core-Csep4njy.js";import{Jy as U,eQ as _,fp as k,Jz as z,mX as L,JA as R}from"./zeni-epic-state-B_XLk_Px.js";import{u as j,z as f,L as T,t as I,D as O,b as $}from"./index-DgJtatP0.js";import"./mui-BwrnAXoT.js";import{t as P}from"./getLocaleForTenant-Ba61Gz0E.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.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]="7244a088-3778-4aab-8788-0de16bbca1d2",t._sentryDebugIdIdentifier="sentry-dbid-7244a088-3778-4aab-8788-0de16bbca1d2")}catch{}})();const Q=A(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:R(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>U(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!z(i))&&t(L(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const J=["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 J)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-D6V50bQg.js → DomesticWireDetailScreen-BNqpU9kr.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-DAjhbt80.js";import{h as w,g as C,j as h,n as A,i as P}from"./core-Csep4njy.js";import{NA as k,NH as K,fF as q,fE as Q,fD as W,iE as X,KI as J,qg as L,eQ as V,N6 as D,iC as F,NB as v,NK as T,iA as G,iX as N}from"./zeni-epic-state-B_XLk_Px.js";import{bu as M,m as j,n as R,z as U,h as H,r as p,c as S,B as O,bv as Y,o as Z,bw as ee,v as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-DAjhbt80.js";import{h as w,g as C,j as h,n as A,i as P}from"./core-Csep4njy.js";import{NA as k,NH as K,fF as q,fE as Q,fD as W,iE as X,KI as J,qg as L,eQ as V,N6 as D,iC as F,NB as v,NK as T,iA as G,iX as N}from"./zeni-epic-state-B_XLk_Px.js";import{bu as M,m as j,n as R,z as U,h as H,r as p,c as S,B as O,bv as Y,o as Z,bw as ee,v as te}from"./index-DgJtatP0.js";import{n as z}from"./mui-BwrnAXoT.js";import"./sentry-BchnSYMz.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]="7b850909-1f7c-4b18-803b-4c1cd1525443",e._sentryDebugIdIdentifier="sentry-dbid-7b850909-1f7c-4b18-803b-4c1cd1525443")}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(J("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(W(n,"BillPayVendor"))},onResendOtp:n=>{e(Q(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(K(n,a,o))}}})(M);function _({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=z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-DAjhbt80.js";import{m as l,F as c,h as f}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-DAjhbt80.js";import{m as l,F as c,h as f}from"./index-DgJtatP0.js";import{D as b}from"./mui-BwrnAXoT.js";import"./sentry-BchnSYMz.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]="0f65b2b1-5da3-42b9-b99b-23a69911cdcf",e._sentryDebugIdIdentifier="sentry-dbid-0f65b2b1-5da3-42b9-b99b-23a69911cdcf")}catch{}})();const p={drawerLeftMargin:new c(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=l(),s=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),d=f();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DAjhbt80.js";import{a as d}from"./sentry-BchnSYMz.js";import{h as B,u as G,g as L,i as H,j as l,N as q,n as F,o as O,p as N}from"./core-Csep4njy.js";import{LP as _,eQ as K,Lc as R,kH as M,HO as k,LU as W,KH as Y,jH as $,HP as S,Lh as z,Li as J,KJ as Q,KI as U}from"./zeni-epic-state-B_XLk_Px.js";import{aR as V,d as X,r as Z,v as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-DAjhbt80.js";import{a as d}from"./sentry-BchnSYMz.js";import{h as B,u as G,g as L,i as H,j as l,N as q,n as F,o as O,p as N}from"./core-Csep4njy.js";import{LP as _,eQ as K,Lc as R,kH as M,HO as k,LU as W,KH as Y,jH as $,HP as S,Lh as z,Li as J,KJ as Q,KI as U}from"./zeni-epic-state-B_XLk_Px.js";import{aR as V,d as X,r as Z,v as tt}from"./index-DgJtatP0.js";import"./mui-BwrnAXoT.js";import{d as b}from"./decodeURIComponentSafe-C5ifH7fM.js";import{w as et}from"./withTransactionSidePanel-Bh7VGJfn.js";import{f as at,c as nt}from"./routePaths-CpXTBLF_.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";import"./useAskAiCfoHostNavButtonProps-DAyGHIvM.js";import"./TransactionDetailScreen-CpmzsSf7.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]="3f3b7036-b85a-47c0-989d-920e43a45be7",a._sentryDebugIdIdentifier="sentry-dbid-3f3b7036-b85a-47c0-989d-920e43a45be7")}catch{}})();const it=F(function(a,t){const e=t.entity,i=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:i,analytics:X,isAccountingClassesEnabled:$(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const i=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(i,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(Q({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(U("common"))},onAutoCompleteEntity:e=>{const i=at(e,t.tenantEmailDomain);a(z()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(i,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),i=e.poppedPathname??I();t.navigate(i,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const i=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(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:i}))}}}})(V),ot=et(function({entityType:a,...t}){const e=B(),i=G(),c=L(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:w}=H(),r=b(j??""),p=b(w??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),o={name:p,id:r,type:a,zeniId:r,qboId:r},P=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,o,"quarter")),v=l(n=>K(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>R(n.trendWithTransactionsState,o,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),i(M(o)))},[m,u,o]);const g=l(n=>n.trendState.fetchState),E=f?.selectedPeriod?.timePeriod??P,A=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,P);return d.useEffect(()=>{m===!0&&h===!1&&g==="Completed"&&(D(!0),E!=null&&i(k(o,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))},[m,h,g]),u?s.jsx(it,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:o,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(O,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(ot,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-D9ixaUzm.js → ExpenseAutomationRoutes-HgQuX9He.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as S}from"./liveblocks-DAjhbt80.js";import Bn from"./NotFoundScreen-
|
|
1
|
+
import{j as S}from"./liveblocks-DAjhbt80.js";import Bn from"./NotFoundScreen-DXqfpA8J.js";import{a,b as xt}from"./sentry-BchnSYMz.js";import{n as Fe,S as _n}from"./mui-BwrnAXoT.js";import{u as de,h as Pt,g as qe,j as A,n as Vn,i as dt,o as zn,p as je}from"./core-Csep4njy.js";import{eQ as Re,Qh as On,n5 as ke,fk as Mn,qT as jn,nn as Rt,nI as Dt,Qi as Ut,nS as Ln,Qj as Ft,ng as Qn,qp as $n,f4 as fe,Qk as De,sS as Bt,Cc as _t,Ql as Vt,Qm as qn,pZ as Ge,LQ as ut,LS as Gn,jK as Jn,LT as Nn,jR as Kn,cV as Yn,u3 as Je,nt as zt,nX as Ue,Qn as Hn,KJ as mt,KI as we,Qo as pt,k6 as Zn,Qp as Wn,Qq as Xn,Qr as ea,Qs as ta,nA as na,nl as ue,n_ as xe,Qt as aa,Qu as oa,Qv as sa,o5 as ca,jV as ia,jM as la,Qw as ra,jU as ht,L_ as da,Qx as ua,Qy as ma,pV as pa,px as ha,nY as le,pw as Le,Qz as ga,QA as Ca,QB as Sa,lp as Ia,bq as fa,lk as gt,l6 as ka,QC as Ea,gU as Ct,fV as ya,lh as ba,vZ as va,QD as Ta,ow as Aa,or as wa,ov as xa,og as Pa,QE as Ra,f7 as Ot,nL as Da,nw as Ua,fl as St,o0 as Fa,QF as Ba,QG as _a,nZ as Mt,QH as Va,QI as za,QJ as Oa,QK as Ma,QL as It,q5 as ja,pn as La,KH as Qa,QM as $a,QN as qa,jT as Ga,QO as Ja,GK as Na,jS as Ka,jH as Ya,f6 as Ha,oX as jt,pf as Za,nW as ft,n$ as Wa,bE as Xa,le as eo,lb as to,QP as no,of as kt,pd as Et,pb as ao,p0 as oo,oH as so,pe as co,QQ as io,QR as lo,oL as ro,QS as uo,oB as mo,oK as po,oI as ho,pi as go}from"./zeni-epic-state-B_XLk_Px.js";import{n as Lt,c as re,d as M,v as W,Y as Qt,_ as $t,cE as Co,z as Be,cF as So,at as Pe,cG as Io,aT as yt,B as qt,cH as fo,aq as Qe,D as ko,cI as Eo,a2 as yo,cJ as bo,W as vo,cK as To,cL as Ao,x as wo,S as xo,aN as Po,b7 as Ro,F as Do,cM as Uo}from"./index-DgJtatP0.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-DAyGHIvM.js";import{c as bt,C as Fo}from"./TransactionDetailScreen-CpmzsSf7.js";import{w as Bo}from"./withTransactionSidePanel-Bh7VGJfn.js";import{h as _o,v as Vo}from"./routePaths-CpXTBLF_.js";import{g as $e}from"./accountMappingHelper-spXTehHl.js";import{D as zo}from"./DrawerScreen-BLYKH6HL.js";import"./recharts-D7BeuhCa.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.js";import"./decodeURIComponentSafe-C5ifH7fM.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="0c6714cb-4bc2-4de7-994f-5d6e5b36dc6c",t._sentryDebugIdIdentifier="sentry-dbid-0c6714cb-4bc2-4de7-994f-5d6e5b36dc6c")}catch{}})();const Oo=()=>{const t=de(),l=Pt(),w=qe(),f=A(d=>Re(d)),{useFeatureGate:E}=Lt(),{isFeatureEnabled:g}=E(re.isRealtimeInsightsFeatureEnabled),u=A(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=A(d=>On(d,f.tenantId)),{isAiCfoAccessEnabled:y,onAskAiCfoClick:C}=Gt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,U,K=!1)=>{t(ke({tenantId:U,period:{month:d.month,year:d.year},refreshViewInBackground:K}))},[]),b=a.useCallback(d=>{const U=w.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&M.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,U??null),t(Mn(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],_=a.useCallback(()=>{const d=w.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&M.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),p=W(w.state?.pathnameStackToGoBack,w.pathname),x=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(U=>U.progress<100);if(d!=null)return void l(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:p,message:"comingFromOverview"}});l(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:p,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=Qt();return $t({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(jn(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&_()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=w.state?.referrer;M.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),S.jsx(Mo,{children:S.jsx(Co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{l(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:p,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:b,handleReviewButtonClick:x,onBackClick:()=>{l("../../dashboard")},onReload:_,isAiCfoAccessEnabled:y,onAskAiCfoClick:C})})},Mo=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-DAjhbt80.js";import{a as r}from"./sentry-BchnSYMz.js";import{a3 as l,a4 as p,a5 as d,r as f}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-DAjhbt80.js";import{a as r}from"./sentry-BchnSYMz.js";import{a3 as l,a4 as p,a5 as d,r as f}from"./index-DgJtatP0.js";import"./mui-BwrnAXoT.js";import m from"./NotFoundScreen-DXqfpA8J.js";import{h as u,g as b}from"./core-Csep4njy.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]="5300824e-7c2e-424f-a4a9-b633eae03cb4",e._sentryDebugIdIdentifier="sentry-dbid-5300824e-7c2e-424f-a4a9-b633eae03cb4")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=f(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:d(o),onDemoClick:t,onGoBack:i}):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 r}from"./sentry-BchnSYMz.js";import{u as l,h as f,g as m}from"./core-Csep4njy.js";import{gB as p,JW as g,JX as b}from"./zeni-epic-state-B_XLk_Px.js";import{u as _,L as h,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-BchnSYMz.js";import{u as l,h as f,g as m}from"./core-Csep4njy.js";import{gB as p,JW as g,JX as b}from"./zeni-epic-state-B_XLk_Px.js";import{u as _,L as h,z as y}from"./index-DgJtatP0.js";import"./liveblocks-DAjhbt80.js";import"./recharts-D7BeuhCa.js";import"./mui-BwrnAXoT.js";import"./analytics-D1kzjJGV.js";import"./plaid-BKdRBTqL.js";import"./dnd-Cjdb2KWD.js";import"./stripe-DMRn4zHo.js";import"./lottie-DYZ-hqab.js";import"./lexical-wVYu_9-d.js";import"./pdf-Cc8ZGklh.js";import"./utils-aai5Jslk.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]="2b092f06-11bd-4722-8e28-f2ba2dc9e72e",e._sentryDebugIdIdentifier="sentry-dbid-2b092f06-11bd-4722-8e28-f2ba2dc9e72e")}catch{}})();function R(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:c}=_(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|