@zeniai/web-app-ui 5.0.70-prod → 5.0.70-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-BTfuI9Bw.js +1 -0
- package/dist/assets/{AddressScreen-CT6TP3Z1.js → AddressScreen-jTT04DFx.js} +1 -1
- package/dist/assets/{AiCfoScreen-BWS36jvF.js → AiCfoScreen-BIhlfQQ_.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-ss8zp9B4.js → BillPayApprovalRoutes-C44-nGT6.js} +1 -1
- package/dist/assets/{BillPayRoutes-BtFNSiDK.js → BillPayRoutes-CZhvS7X4.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BGdNNp1F.js → BusinessVerificationPageScreen-DS8yDRTx.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-y2uX_nrx.js → ChargeCardRoutes-C7ZPgkk_.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CxsYYjMZ.js → CompanyPassportScreen-Dh1MJ-Ph.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-B2gLg7lc.js → ConnectionAuthScreen-B4w8rGYZ.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BVLhDDfh.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-DyOkPrNA.js → CustomerOnboardingRoutes-BeOGrGwK.js} +1 -1
- package/dist/assets/{DashboardRoutes-BaEBgxmc.js → DashboardRoutes-BSQu3xMl.js} +1 -1
- package/dist/assets/{DefaultTenantHome-ceU-YxNe.js → DefaultTenantHome-f0BMdnqq.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-C7eUBEYW.js → DomesticWireDetailScreen-Dcgzj1nk.js} +1 -1
- package/dist/assets/{DrawerScreen-CFX9aNCU.js → DrawerScreen-BIAu5bA1.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-BnUqJDu6.js → EntityDetailRoutes-BMnEqgs2.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-zrWAZ6A-.js → ExpenseAutomationRoutes-G2jBVNVU.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-Chy-C2bY.js → FeaturePreviewScreen-D6Uxvt0_.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-D1guk6IX.js → MagicLinkRoutes-BJg4uTJC.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CmXunfk5.js → MagicLinkSignInScreen-CkYMgnfC.js} +1 -1
- package/dist/assets/{MobileAppDrawer-DkH2rucX.js → MobileAppDrawer-CQwwOR5p.js} +1 -1
- package/dist/assets/NotFoundScreen-C_3ycSKf.js +1 -0
- package/dist/assets/{NotificationRoutes-CFQ9T25M.js → NotificationRoutes-17FmFpDt.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-C6ob6CWy.js → PandLWithForecastRoutes-DEaEOUDv.js} +1 -1
- package/dist/assets/{PeopleRoutes-QnA9W9te.js → PeopleRoutes-DCpSQt8d.js} +1 -1
- package/dist/assets/{PerformanceRoutes-CscGDV-a.js → PerformanceRoutes-Clc6K-Sz.js} +1 -1
- package/dist/assets/{Preview-C0AoVNkg.js → Preview-CJ0Bmv63.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CyYMqomX.js → QBOConnectionScreen-DiY0aEcB.js} +1 -1
- package/dist/assets/{ReferralListScreen-DOkwApTO.js → ReferralListScreen-Dq2B0WMt.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-B7OZneq9.js → ReimbursementApprovalRoutes-hJy0lLcU.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-C096muhL.js → ReimbursementApprovalRuleDetailScreen-DdLOedPE.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-JoYsNcyp.js → ReimbursementRoutes-CvnLlTDQ.js} +1 -1
- package/dist/assets/{ReportsRoutes-DoEMUl54.js → ReportsRoutes-CWkv155p.js} +1 -1
- package/dist/assets/{RewardsRoutes-3vkMk0d3.js → RewardsRoutes-Bl8kgQI_.js} +1 -1
- package/dist/assets/{ScreenRoutes-CFYjn9UY.js → ScreenRoutes-Bpg_5BOg.js} +2 -2
- package/dist/assets/{SettingsRoutes-nEcXq9VR.js → SettingsRoutes-BzxQN_Az.js} +1 -1
- package/dist/assets/{SetupPagesScreen-CvciPhAb.js → SetupPagesScreen-tsJgjmfM.js} +1 -1
- package/dist/assets/{SignInScreen-D0vIN08v.js → SignInScreen-Dd8ZY6ef.js} +1 -1
- package/dist/assets/{SignOutScreen-Bxw8G7ep.js → SignOutScreen-B069qVqp.js} +1 -1
- package/dist/assets/{TaskListScreen-Babx6Iz5.js → TaskListScreen-FDYDQZ8O.js} +1 -1
- package/dist/assets/{TaskRoutes-C8PZpDeD.js → TaskRoutes-DOluYvA-.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-CKqmkQac.js +1 -0
- package/dist/assets/{TransactionDetailScreen-B5S0aVL7.js → TransactionDetailScreen-CuOcn9Eq.js} +1 -1
- package/dist/assets/{TransactionListRoutes-CASYn9ig.js → TransactionListRoutes-C7qZdmUZ.js} +1 -1
- package/dist/assets/{TreasuryRoutes-S6m6I4Ob.js → TreasuryRoutes-c0G3A1dL.js} +1 -1
- package/dist/assets/{VendorsRoutes-CcrRaFs8.js → VendorsRoutes-B3BHswUk.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-Dd0le7LT.js → WiseConfirmationScreen-BtsNW7qm.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-By17jtiK.js → ZeniAccountRoutes-DOB227kl.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-D6WwbD40.js → ZeniAccountStatementScreen-CCaF_hvY.js} +1 -1
- package/dist/assets/{accountMappingHelper--Nd4AzD5.js → accountMappingHelper-dHb9X7tX.js} +1 -1
- package/dist/assets/{analytics-CBVce51h.js → analytics-COzTMS9t.js} +1 -1
- package/dist/assets/{analyticsHelper-CchhXxa7.js → analyticsHelper-CQQBcwi_.js} +1 -1
- package/dist/assets/{core-BiO8az_8.js → core-DMKpdX6V.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Drs0EkRs.js → decodeURIComponentSafe-kaKdrE3i.js} +1 -1
- package/dist/assets/{dnd-DEqqrbnG.js → dnd-B4MKAlTf.js} +1 -1
- package/dist/assets/{empty-CjJ6NPQs.js → empty-CuM4id4M.js} +1 -1
- package/dist/assets/{empty-DIbsZE_-.js → empty-_gHzexXT.js} +1 -1
- package/dist/assets/{emptyVideoElement-B-nTkhqj.js → emptyVideoElement-Ba3zd13y.js} +1 -1
- package/dist/assets/{epic-BkjwplcH.js → epic-B57XJqsg.js} +1 -1
- package/dist/assets/{getLocaleForTenant-DZ_PqUgv.js → getLocaleForTenant-DIj12PGu.js} +1 -1
- package/dist/assets/{index-__PpJYcl.js → index-1s98NswJ.js} +1 -1
- package/dist/assets/{index-DhM1NMcw.js → index-B-S1sw2q.js} +7 -7
- package/dist/assets/{index-WTq_uesm.js → index-CapqGJKF.js} +1 -1
- package/dist/assets/{index-BALn8uen.js → index-CciFFvoQ.js} +1 -1
- package/dist/assets/{index-dsZtT2Le.js → index-DgRsL-zD.js} +2 -2
- package/dist/assets/{index-CPuEfxmi.js → index-Ips891mX.js} +1 -1
- package/dist/assets/{index-CWkdTmQL.js → index-P5Uv4EpL.js} +1 -1
- package/dist/assets/{lexical-BcUhE2s3.js → lexical-ChtLw4s9.js} +1 -1
- package/dist/assets/{liveblocks-iYXuwnNJ.js → liveblocks-CqGMBzbB.js} +1 -1
- package/dist/assets/{lottie-crYXxJIl.js → lottie-BflCEFtX.js} +1 -1
- package/dist/assets/{mui-Wsw1v_RJ.js → mui-C4peJOR0.js} +1 -1
- package/dist/assets/{pathToGoBack-mF5zZGNy.js → pathToGoBack-CHCqWOFU.js} +1 -1
- package/dist/assets/{pdf-BB9eCt-A.js → pdf-C6aRryDe.js} +3 -3
- package/dist/assets/{pdf-lib-FxBSZOu8.js → pdf-lib-BMPC_qNx.js} +1 -1
- package/dist/assets/{plaid-YevEbNem.js → plaid-DWM21M_R.js} +1 -1
- package/dist/assets/{pusher-DcEB1EIs.js → pusher-DqpEa1pu.js} +1 -1
- package/dist/assets/{react-BHXMCFc8.js → react-5UT9NFJ3.js} +1 -1
- package/dist/assets/{react-BRhSxuPy.js → react-6AGaHHFp.js} +1 -1
- package/dist/assets/{react-Dxc9sTnE.js → react-B4FfdgNG.js} +1 -1
- package/dist/assets/{react-Cyny6kHD.js → react-Brr3hJcV.js} +1 -1
- package/dist/assets/{react-CGu-TC09.js → react-CmDKO3IZ.js} +1 -1
- package/dist/assets/{react-CEVNSt9Z.js → react-YdR2ykUN.js} +1 -1
- package/dist/assets/{recharts-_jQKodaN.js → recharts-DEvckcqQ.js} +1 -1
- package/dist/assets/{routePaths-DZQ5pfqe.js → routePaths-DwcIzItv.js} +1 -1
- package/dist/assets/{sentry-C0ycLLNj.js → sentry-By_w3AbQ.js} +1 -1
- package/dist/assets/{url-BaUJdhZo.js → url-B4q4O9pf.js} +1 -1
- package/dist/assets/{url-lQlWCduk.js → url-XDFiNkBY.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DoU7lqQS.js → useAskAiCfoHostNavButtonProps-CjhdCks2.js} +1 -1
- package/dist/assets/{useDeviceId-CNwwT5y9.js → useDeviceId-DH6-WcAx.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-BWXD0kZI.js → useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-COC1d6YZ.js → useInitialThreadRequest-BqzvhNbA.js} +1 -1
- package/dist/assets/{utils-84J_wB9-.js → utils-CSUcsfYh.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BlWzkOQ0.js → withTransactionSidePanel-yqBBfrLp.js} +1 -1
- package/dist/assets/{zeni-epic-state-sw_lecJS.js → zeni-epic-state-dcVRrD1h.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-CSwoj3Tc.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-Mkc8Qg4L.js +0 -1
- package/dist/assets/NotFoundScreen-CoCyTXNP.js +0 -1
- package/dist/assets/TransactionDetailRoutes-BSH_Iaci.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-CqGMBzbB.js";import{A as d}from"./AddressScreen-jTT04DFx.js";import i from"./NotFoundScreen-C_3ycSKf.js";import"./sentry-By_w3AbQ.js";import{n as s,o as r}from"./core-DMKpdX6V.js";import"./zeni-epic-state-dcVRrD1h.js";import"./recharts-DEvckcqQ.js";import"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.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]="4bd15e18-5b5f-4be1-8d33-8bd696c76da2",t._sentryDebugIdIdentifier="sentry-dbid-4bd15e18-5b5f-4be1-8d33-8bd696c76da2")}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-
|
|
1
|
+
import{j as r}from"./liveblocks-CqGMBzbB.js";import{a as h}from"./sentry-By_w3AbQ.js";import{j as T,h as _,u as j,l as E,g as B,k as M}from"./core-DMKpdX6V.js";import{r as $,h as D,z as L,j as K,B as N,C as R,c as C,e as m,v as z,i as b,w as F}from"./index-B-S1sw2q.js";import{I$ as k,gM as U,eN as G,J0 as J,c0 as O,J1 as V,k6 as q}from"./zeni-epic-state-dcVRrD1h.js";import{n as H}from"./mui-C4peJOR0.js";import Q from"./NotFoundScreen-C_3ycSKf.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]="4d953604-22ad-4c73-b593-fc9d2fe80b03",e._sentryDebugIdIdentifier="sentry-dbid-4d953604-22ad-4c73-b593-fc9d2fe80b03")}catch{}})();const W=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-CqGMBzbB.js";import{a as r}from"./sentry-By_w3AbQ.js";import{h as oe,j as ne,u as ie,g as j,l as re,k as le}from"./core-DMKpdX6V.js";import{M as ce,cG as ue,z as de,r as me,cH as pe,cI as fe,cJ as he,cK as q,C as Se,c as U,R as G,cL as ge,cM as Ce,e as be,a1 as ke,cN as we,U as Ie,y as Pe,w as V,aY as Ee,cO as Te}from"./index-B-S1sw2q.js";import{fD as ye,f2 as H,eN as _e,hq as xe,Px as Ue,eM as ve,hA as Ae,hw as Oe,ft as Qe,fn as De,fg as Fe,fk as $,fo as Le,fp as Me,fq as Be,fr as Re,fs as Ne}from"./zeni-epic-state-dcVRrD1h.js";import{D as je,n as v,P as Ge,S as Ve}from"./mui-C4peJOR0.js";import{p as $e}from"./pathToGoBack-CHCqWOFU.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new s.Error().stack;i&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[i]="ba438b7c-a92b-4c49-999c-5f04afc3a898",s._sentryDebugIdIdentifier="sentry-dbid-ba438b7c-a92b-4c49-999c-5f04afc3a898")}catch{}})();const W="chat-response-generated",qe=le(function(s,i){const a=H(s),m=i.isSubmitting;return{showSampleQuestions:i.sessionFromUrl==="explore"&&a.uiState.currentChatSessionId==null,aiCfoView:a,isSubmitting:m,isNewChatSession:i.sessionFromUrl==="new_chat"||i.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Ie}/tableDownload`,emailLinkQuestion:i.emailLinkQuestion,autoSubmitEmailLinkQuestion:i.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:i.onEmailLinkQuestionProcessed,isFileUploadEnabled:i.isFileUploadEnabled,isUploadPromoVisible:i.isUploadPromoVisible,onUploadPromoClose:i.onUploadPromoClose}},function(s,i){const{location:a,currentTenant:m,userId:d,navigate:p,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:S,setIsAiCfoOpen:l}=i;return{onEventReceived:(e,o)=>{if(e===W&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,c=Me(n.type),t=n.metadata.chat_session_id??null,{currentChatSession:I,currentQuestionAnswer:g,currentQuestionAnswerSummary:P}=q(S,t);c!=="answer"?U.trackAICFOChatResponseGenerated(c,g?.question.questionText??"",n.text,t,Te(P,I),n.metadata.message_id??null):U.trackAICFOChatAnswerGenerated(n.text,g?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,Be(n.visualization?.type??"")??null,t,n.summarized_title,n.metadata.message_id??null),s(Re({chatSessionId:n.metadata.chat_session_id,responseType:c,fetchState:{fetchState:"Completed",error:void 0}})),s(Ne({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:d}))}},onSubmit:(e,o,n,c)=>{e&&Ee(s,e,o,f,S,d,c,n)},updateCurrentInput:e=>{s($(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Le(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{p(-1)},onCloseClick:()=>{const e=V(a.state?.pathnameStackToGoBack),o=e.poppedPathname??$e(1);p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack}}),s($(""))},togglePageView:()=>{const e=V(a.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),l(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{p(-1)},onNewChatClick:()=>{f!=null&&s(Fe());const e=Pe(a.state?.pathnameStackToGoBack,a.pathname);p(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(De({questionAnswerId:e,isCollapsed:o}))},onMenuClick:i.onMenuClick}})(ke(we)),dt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:i}=ce(),a=oe(),m=ne(),d=ie(),[p,f]=r.useState(!1);r.useEffect(()=>{a(ye())},[a]);const{customPageTitle:S}=ue(),l=j(u=>H(u)),e=de.getSignedInUser(),{session_id:o}=re(),n=me(),c=j(u=>_e(u)),t=l.uiState.currentChatSessionId,I=c.tenantEmailDomain,{handleUploadPromoClose:g,isUploadPromoVisible:P}=pe({isFileUploadEnabled:s,tenantEmailDomain:I}),A=fe({currentTenant:c,currentChatSessionId:t,aiCfoView:l}),C=d.state,b=C?.aiCfoInitialQuestion,O=!!C?.aiCfoShouldSubmit,[z,E]=r.useState(null),[Y,T]=r.useState(!1),Q=r.useRef(!1);r.useEffect(()=>{Q.current||b==null||b===""||(E(b),T(O),Q.current=!0)},[b,O]);const J=r.useCallback(()=>{E(null),T(!1)},[]),D=r.useMemo(()=>new URLSearchParams(d.search),[d.search]),F=D.get("ref")??C?.aiCfoRef,y=D.get("emailRefId")??C?.aiCfoEmailRefId,L=r.useRef(!1);r.useEffect(()=>{L.current||F!=="month-end-email"||y==null||t!=null||e==null||(a(xe("controller",e.userId,y,"MONTH_END_EMAIL")),L.current=!0)},[F,y,t,a,e]);const k=l.uiState.lastContextMessage;r.useEffect(()=>{k!=null&&k!==""&&t!=null&&(E(k),T(!0),a(Ue()))},[k,t,a]);const K=c.masterTOSInfo,w=K?.isMasterTOSAccepted??!1,{visitedSessions:M}=he(t),_=l.fetchState,x=l.uiState.chatSessionsNextPageToken.hasMore||!l.uiState.chatSessionsFirstPageFetched,B=t!=null?l.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",R=t==null||(l.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),N=l.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:Z}=q(N,t),X=Z.length===0;r.useEffect(()=>{w||m("../dashboard",{state:{...d.state,message:"open_ai_cfo_drawer"}})},[w]),r.useEffect(()=>{t!=null&&o!==t&&m(`../ai-cfo/${t}`,{state:{...d.state}})},[t,o]),r.useEffect(()=>{o!=null&&t==null&&o!=="new_chat"&&o!=="explore"&&a(ve({sessionId:o,agentId:"controller"}))},[]);const ee=r.useMemo(()=>({events:M.map(u=>`private-chat-${u}.${W}`),eventCallback:(u,se,ae)=>ae.onEventReceived(u,se)}),[M]);if(r.useEffect(()=>{_!=="In-Progress"&&x&&a(Ae())},[_,x,a]),r.useEffect(()=>{t!=null&&B!=="In-Progress"&&R&&e!=null&&_==="Completed"&&!x&&a(Oe(t,e.userId))},[B,R,t,e,a]),e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const te=t!=null&&l.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return h.jsxs(We,{children:[h.jsx(Se,{analytics:U,onLoad:u=>u.trackPageLoaded(be.Event.aiCFOPage)}),G(n)&&A.drawerElement,h.jsx(qe,{...ee,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:o,location:d,isSubmitting:te,isEmptyChatWithSession:X,customPageTitle:S,currentTenant:c,emailLinkQuestion:z??void 0,autoSubmitEmailLinkQuestion:Y,onEmailLinkQuestionProcessed:J,onMenuClick:G(n)?A.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:P,onUploadPromoClose:g}),h.jsx(je,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:ze,style:{width:`${ge}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(He,{onClick:u=>u.stopPropagation(),children:h.jsx(Ce,{isTOSAccepted:w,acceptMasterTOSState:l.masterTOSAcceptanceState,customPageTitle:S,onCloseClick:()=>f(!1),onCompleteClick:()=>{w||c.userRoleId==null||a(Qe(c.userRoleId)),f(!1)}})})})]})},He=v(Ve)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-CqGMBzbB.js";import{a as y}from"./sentry-By_w3AbQ.js";import{j as B,u as U,h as j,g as f,N as $,k as T,l as N,n as O,o as b}from"./core-DMKpdX6V.js";import{eN as L,Mi as A,L_ as h,x8 as w,x2 as F,x6 as x,wX as z,M0 as M,w_ as W,xa as q,x9 as C}from"./zeni-epic-state-dcVRrD1h.js";import{h as P,z as k,B as _,a1 as X,by as G,ab as V,bz as H}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-DdLOedPE.js";import K from"./NotFoundScreen-C_3ycSKf.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]="1652140b-cd3b-4b71-94a3-d1be6dd93611",e._sentryDebugIdIdentifier="sentry-dbid-1652140b-cd3b-4b71-94a3-d1be6dd93611")}catch{}})();const I="bill-approval-rule-update",Q=T(function(e){return{approvalView:A(e),billPaySetupApproverViewUpdateData:h(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(M(!1))},onBackClick:()=>{V(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(z(a))},onEditRuleClick:a=>{a!=null?(e(x(a)),t(`./${a}/edit`)):(e(x()),t("./new"))}}})(X(G)),Y=()=>{const e=B(),o=U(),t=j(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=f(i=>i.billPaySetupApproverViewState.fetchState),c=f(i=>L(i)),r=f(i=>A(i)),g=f(i=>h(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(w())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(F(!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(x())),e("./new"))},[u,r,t]);const v={events:c.companyId!=null?[`private-${c.companyId}.${I}`]:[],eventCallback:(i,R,m)=>{i.endsWith(I)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx($,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(_,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(Q,{currentTenant:c,location:o,navigate:e,...v})},Z=T(function(e,o){const t=h(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=V(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(v=>{const i=v.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),R=v.actors.selectedNonUsers.map(S=>{const E=!!J(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(R);g.push({action:v.stepType.selectedOption,actors:m,operator:m.length>1?v.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(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(q())},onSaveRuleSuccess:()=>{t("../")}}})(H);function D(){const e=B(),o=j(),t=U(),{approvalRuleId:p}=N(),a=k.getSignedInUser(),u=P(),s=f(r=>h(r)),d=f(r=>A(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(W(!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(_,{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(b,{path:"/",element:l.jsx(Y,{})}),l.jsx(b,{path:"/new",element:l.jsx(D,{})}),l.jsx(b,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(b,{path:"*",element:l.jsx(K,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-iYXuwnNJ.js";import{j as K,h as se,u as Q,l as ae,g as v,N as te,k as X,i as na,n as ia,o as S}from"./core-BiO8az_8.js";import{eN as Z,LA as Me,bv as It,GD as oa,bo as wt,bD as pe,LB as xt,ws as Bt,xC as Ve,w$ as la,bn as De,LC as sa,LD as ra,c0 as ca,LE as da,jq as Ct,LF as At,LG as Et,yb as _e,wH as Ce,LH as ua,wg as tt,LI as pa,Bn as ma,wk as ba,wq as Dt,LJ as ke,LK as Ge,xD as Ne,LL as ha,LM as ga,xG as Oe,LN as ya,xT as Sa,LO as jt,xn as at,xs as fa,LP as ka,LQ as ue,LR as Tt,LS as Pt,LT as Ft,fH as va,wM as $e,cv as Rt,LU as Ia,gC as wa,LV as xa,LW as Ba,eT as Lt,eR as Vt,LX as ze,LY as Ca,LZ as Aa,Jj as Ze,L_ as Ea,Jk as oe,Jl as He,L$ as Da,M0 as ja,M1 as Ta,xu as nt,xr as Pa,M2 as Fa,M3 as Ra,M4 as La,xd as Va,M5 as $a,M6 as Ua,M7 as Ma,cj as $t,cL as Ut,jB as _a,bJ as Ga,bq as Mt,bK as _t,vy as Na,M8 as Oa,Ba as za,Bg as Za,s5 as Ha,xE as Wa,yi as qa,jO as fe,M9 as Ja,Ma as Gt,kg as Ka,jI as Nt,k1 as Ot,k0 as it,bC as be,bI as Qa,Mb as Xa,Mc as ve,ik as Ya,Md as ot,Me as en,ip as tn,iK as an,yw as nn,Mf as on,k9 as ln,ym as sn,Mg as lt,yq as rn,yv as cn,ys as dn,yk as un,Mh as zt,wB as pn,Mi as mn,Mj as bn,fz as hn,fy as gn,fx as yn,jR as Sn,k7 as st,ki as fn,pE as kn,j_ as vn,yo as In,iv as wn,kn as xn,Mk as Bn,im as Cn,pv as An,Ml as En,xj as Dn,bE as jn,bs as Tn,Ik as Pn,cN as Fn,cM as Rn,cu as Ln,cA as Vn}from"./zeni-epic-state-sw_lecJS.js";import{h as me,z as L,j as Ie,p as le,m as y,aJ as Ae,B as re,o as A,C as je,c as D,b5 as $n,w as z,U as We,y as E,r as we,b6 as rt,b7 as ct,b8 as Un,ag as Mn,H as _n,aD as Gn,F as Zt,D as qe,J as Je,b9 as Nn,ap as Ht,ba as On,N as zn,e as Wt,a1 as Zn,bb as Hn,bc as Wn,bd as qn,be as Jn,bf as Kn,bg as Qn,bh as Xn,bi as Yn,bj as ei,A as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a5 as li}from"./index-DhM1NMcw.js";import{n as U,S as si}from"./mui-Wsw1v_RJ.js";import{A as dt}from"./AddressScreen-CT6TP3Z1.js";import{g as ie,a as Te,i as qt,V as Ke,b as Qe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-C7eUBEYW.js";import{a as f}from"./sentry-C0ycLLNj.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-DoU7lqQS.js";import{c as Ye}from"./useFetchSuggestedQuestionsWhenReady-BWXD0kZI.js";import{u as Jt}from"./useInitialThreadRequest-COC1d6YZ.js";import Ee from"./NotFoundScreen-CoCyTXNP.js";import{D as ui}from"./DrawerScreen-CFX9aNCU.js";import{M as Kt}from"./MobileAppDrawer-DkH2rucX.js";import{F as Qt}from"./FeaturePreviewScreen-Chy-C2bY.js";import{S as Pe}from"./SetupPagesScreen-CvciPhAb.js";import{B as pi}from"./BillPayApprovalRoutes-ss8zp9B4.js";import{FallBackRoute as mi}from"./ScreenRoutes-CFYjn9UY.js";import"./recharts-_jQKodaN.js";import"./analytics-CBVce51h.js";import"./plaid-YevEbNem.js";import"./dnd-DEqqrbnG.js";import"./stripe-DMRn4zHo.js";import"./lottie-crYXxJIl.js";import"./lexical-BcUhE2s3.js";import"./pdf-BB9eCt-A.js";import"./utils-84J_wB9-.js";import"./analyticsHelper-CchhXxa7.js";import"./routePaths-DZQ5pfqe.js";import"./BusinessVerificationPageScreen-BGdNNp1F.js";import"./ReimbursementApprovalRuleDetailScreen-C096muhL.js";import"./getLocaleForTenant-DZ_PqUgv.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]="106d6a2f-5dca-4348-9e74-e779d9698f7c",e._sentryDebugIdIdentifier="sentry-dbid-106d6a2f-5dca-4348-9e74-e779d9698f7c")}catch{}})();const bi=X(function(e,t){const l=Me(e,t.billId),i=L.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:Ct(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${We}/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(Ce(l,"retry")):e(Ce(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(Ce(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=K(),t=se(),l=Q(),{billId:i}=ae(),c=me(),r=L.getSignedInUser(),u=Ie(),o=v(N=>Z(N)),s=v(N=>Me(N,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Jt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Xe({mobileExploreReferrer:"Bill Details"});Ye({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,x]=f.useState(!1),[B,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:M}=le(),{isFeatureEnabled:V}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=M(Ae.zeniAssistConfig),C=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:J}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Y}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{V&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&C===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(N=>N.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,C,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",V,$,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t(Ve(!1,V,$,Y,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:N=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(N)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:V,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:B,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:J,hasZeniAssistAccess:$,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=X(function(e,t){const l=L.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=L.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(Ne(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function w({appContent:e}){const t=se(),l=K(),{billId:i}=ae(),c=Q(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=L.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),x=v(F=>Z(F)),[B,_]=f.useState(!1),[T,M]=f.useState(!1),[V,I]=f.useState(!1),[H,G]=f.useState(),C=v(F=>Ge(F,m,g,i));let q=C.fetchState,W=C.file,$=C.showAutofill;const J=v(F=>Me(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],$=!1);const Y=C.billPayInfo!=null&&C.billPayInfo.stage.code==="pending_approval"?C.billPayInfo.billStatus.code:C.billStage;f.useEffect(()=>{i==null&&t(Ne(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?M(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(M(!0),t(Ve(!1,h,j,b,i)))),u&&!T&&(M(!0),t(Ve(!1,h,j,b,i)))},[B,T,u,i,t]);const N={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Y??"",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(Y??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(x.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,x.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||J.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:C.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!C.isInitialEdit,billStage:Y}),a.jsx(Le,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||$?null:a.jsx(pt,{children:a.jsx(Xt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Le,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=C.billPayInfo!=null&&C.billPayInfo.stage.code==="pending_approval"?C.billPayInfo.billStatus.code:C.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[$&&o!=="small"?a.jsx(mt,{}):null,V?a.jsx(Mn,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:N,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:C.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,J,C),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,C),isInitialEdit:!!C.isInitialEdit,billStage:F}),a.jsx(Le,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Nn();return a.jsx(Xt,{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-CqGMBzbB.js";import{j as K,h as se,u as Q,l as ae,g as v,N as te,k as X,i as na,n as ia,o as S}from"./core-DMKpdX6V.js";import{eN as Z,LA as Me,bv as It,GD as oa,bo as wt,bD as pe,LB as xt,ws as Bt,xC as Ve,w$ as la,bn as De,LC as sa,LD as ra,c0 as ca,LE as da,jq as Ct,LF as At,LG as Et,yb as _e,wH as Ce,LH as ua,wg as tt,LI as pa,Bn as ma,wk as ba,wq as Dt,LJ as ke,LK as Ge,xD as Ne,LL as ha,LM as ga,xG as Oe,LN as ya,xT as Sa,LO as jt,xn as at,xs as fa,LP as ka,LQ as ue,LR as Tt,LS as Pt,LT as Ft,fH as va,wM as $e,cv as Rt,LU as Ia,gC as wa,LV as xa,LW as Ba,eT as Lt,eR as Vt,LX as ze,LY as Ca,LZ as Aa,Jj as Ze,L_ as Ea,Jk as oe,Jl as He,L$ as Da,M0 as ja,M1 as Ta,xu as nt,xr as Pa,M2 as Fa,M3 as Ra,M4 as La,xd as Va,M5 as $a,M6 as Ua,M7 as Ma,cj as $t,cL as Ut,jB as _a,bJ as Ga,bq as Mt,bK as _t,vy as Na,M8 as Oa,Ba as za,Bg as Za,s5 as Ha,xE as Wa,yi as qa,jO as fe,M9 as Ja,Ma as Gt,kg as Ka,jI as Nt,k1 as Ot,k0 as it,bC as be,bI as Qa,Mb as Xa,Mc as ve,ik as Ya,Md as ot,Me as en,ip as tn,iK as an,yw as nn,Mf as on,k9 as ln,ym as sn,Mg as lt,yq as rn,yv as cn,ys as dn,yk as un,Mh as zt,wB as pn,Mi as mn,Mj as bn,fz as hn,fy as gn,fx as yn,jR as Sn,k7 as st,ki as fn,pE as kn,j_ as vn,yo as In,iv as wn,kn as xn,Mk as Bn,im as Cn,pv as An,Ml as En,xj as Dn,bE as jn,bs as Tn,Ik as Pn,cN as Fn,cM as Rn,cu as Ln,cA as Vn}from"./zeni-epic-state-dcVRrD1h.js";import{h as me,z as L,j as Ie,p as le,m as y,aJ as Ae,B as re,o as A,C as je,c as D,b5 as $n,w as z,U as We,y as E,r as we,b6 as rt,b7 as ct,b8 as Un,ag as Mn,H as _n,aD as Gn,F as Zt,D as qe,J as Je,b9 as Nn,ap as Ht,ba as On,N as zn,e as Wt,a1 as Zn,bb as Hn,bc as Wn,bd as qn,be as Jn,bf as Kn,bg as Qn,bh as Xn,bi as Yn,bj as ei,A as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a5 as li}from"./index-B-S1sw2q.js";import{n as U,S as si}from"./mui-C4peJOR0.js";import{A as dt}from"./AddressScreen-jTT04DFx.js";import{g as ie,a as Te,i as qt,V as Ke,b as Qe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-Dcgzj1nk.js";import{a as f}from"./sentry-By_w3AbQ.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import{c as Ye}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import{u as Jt}from"./useInitialThreadRequest-BqzvhNbA.js";import Ee from"./NotFoundScreen-C_3ycSKf.js";import{D as ui}from"./DrawerScreen-BIAu5bA1.js";import{M as Kt}from"./MobileAppDrawer-CQwwOR5p.js";import{F as Qt}from"./FeaturePreviewScreen-D6Uxvt0_.js";import{S as Pe}from"./SetupPagesScreen-tsJgjmfM.js";import{B as pi}from"./BillPayApprovalRoutes-C44-nGT6.js";import{FallBackRoute as mi}from"./ScreenRoutes-Bpg_5BOg.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";import"./analyticsHelper-CQQBcwi_.js";import"./routePaths-DwcIzItv.js";import"./BusinessVerificationPageScreen-DS8yDRTx.js";import"./ReimbursementApprovalRuleDetailScreen-DdLOedPE.js";import"./getLocaleForTenant-DIj12PGu.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]="106d6a2f-5dca-4348-9e74-e779d9698f7c",e._sentryDebugIdIdentifier="sentry-dbid-106d6a2f-5dca-4348-9e74-e779d9698f7c")}catch{}})();const bi=X(function(e,t){const l=Me(e,t.billId),i=L.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:Ct(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${We}/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(Ce(l,"retry")):e(Ce(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(Ce(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=K(),t=se(),l=Q(),{billId:i}=ae(),c=me(),r=L.getSignedInUser(),u=Ie(),o=v(N=>Z(N)),s=v(N=>Me(N,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Jt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Xe({mobileExploreReferrer:"Bill Details"});Ye({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,x]=f.useState(!1),[B,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:M}=le(),{isFeatureEnabled:V}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=M(Ae.zeniAssistConfig),C=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:J}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Y}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{V&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&C===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(N=>N.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,C,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",V,$,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t(Ve(!1,V,$,Y,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:N=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(N)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:V,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:B,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:J,hasZeniAssistAccess:$,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=X(function(e,t){const l=L.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=L.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(Ne(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function w({appContent:e}){const t=se(),l=K(),{billId:i}=ae(),c=Q(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=L.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),x=v(F=>Z(F)),[B,_]=f.useState(!1),[T,M]=f.useState(!1),[V,I]=f.useState(!1),[H,G]=f.useState(),C=v(F=>Ge(F,m,g,i));let q=C.fetchState,W=C.file,$=C.showAutofill;const J=v(F=>Me(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],$=!1);const Y=C.billPayInfo!=null&&C.billPayInfo.stage.code==="pending_approval"?C.billPayInfo.billStatus.code:C.billStage;f.useEffect(()=>{i==null&&t(Ne(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?M(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(M(!0),t(Ve(!1,h,j,b,i)))),u&&!T&&(M(!0),t(Ve(!1,h,j,b,i)))},[B,T,u,i,t]);const N={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Y??"",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(Y??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(x.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,x.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||J.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:C.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!C.isInitialEdit,billStage:Y}),a.jsx(Le,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||$?null:a.jsx(pt,{children:a.jsx(Xt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Le,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=C.billPayInfo!=null&&C.billPayInfo.stage.code==="pending_approval"?C.billPayInfo.billStatus.code:C.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[$&&o!=="small"?a.jsx(mt,{}):null,V?a.jsx(Mn,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:N,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:C.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,J,C),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,C),isInitialEdit:!!C.isInitialEdit,billStage:F}),a.jsx(Le,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Nn();return a.jsx(Xt,{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-
|
|
1
|
+
import{j as k}from"./liveblocks-CqGMBzbB.js";import{a as V}from"./sentry-By_w3AbQ.js";import{j as ae,u as ne,h as se,l as ie,g as C,N as oe,k as re}from"./core-DMKpdX6V.js";import{j as ce,p as ue,aJ as de,z as E,C as pe,c as M,ab as x,e as z,bu as le,ap as me,y as B,aq as R}from"./index-B-S1sw2q.js";import{M6 as fe,eN as G,rw as ye,GH as Se,xd as ge,zW as Ie,Ct as be,D6 as he,D$ as De,Mt as Oe,Mu as Te,Mv as ke,Mw as Ce,Mx as Ve,J0 as we,Lv as Ne,Jc as Ae,k6 as _e,fz as ve,fy as Fe,fx as xe,pE as ze,pv as Ee,ps as Me,j_ as Be,rF as Re,rD as P,bC as L,rR as j,ct as Pe}from"./zeni-epic-state-dcVRrD1h.js";import{n as Le}from"./mui-C4peJOR0.js";import{c as U}from"./routePaths-DwcIzItv.js";import{M as je}from"./MobileAppDrawer-CQwwOR5p.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]="0ab430a6-516f-443d-a450-b876c5d0c805",e._sentryDebugIdIdentifier="sentry-dbid-0ab430a6-516f-443d-a450-b876c5d0c805")}catch{}})();const Ue=Le.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-iYXuwnNJ.js";import{j as le,l as ia,h as ue,g as y,u as ge,k as pe,N as ga,q as lt,n as Kt,o as te}from"./core-BiO8az_8.js";import{eN as ie,bs as Ue,NZ as ka,eR as be,eS as ye,eT as Se,fO as ze,cq as $e,N_ as Ge,N$ as Ma,sL as ba,jy as ya,O0 as Sa,gC as oa,zd as Xe,zf as za,zg as $a,jo as ut,O1 as Ye,z1 as mt,O2 as Wt,O3 as qt,z4 as Da,O4 as Jt,Mq as _a,qX as Ct,za as Ga,gN as Qt,O5 as pt,O6 as Ze,bq as Xt,O7 as en,fz as wa,fy as Pa,zK as an,fx as Ta,M6 as tn,O8 as ht,cj as ft,cL as nn,Mp as da,Ak as rn,O9 as tt,zW as Fa,Oa as gt,Al as sn,MQ as on,Am as cn,Bg as dn,s5 as ln,Ba as un,zv as bt,zo as mn,Ob as Cn,fQ as pn,zE as yt,zI as St,fP as hn,Oc as fn,A6 as It,Od as gn,Oe as bn,Of as yn,zG as At,zr as Et,z7 as kt,zA as Dt,zy as _t,zC as Sn,ze as nt,Og as wt,Oh as va,zT as Ia,J5 as Pt,cM as Ya,Oi as In,Oj as An,Ok as En,Ol as kn,zQ as Na,Ad as Dn,A9 as _n,zM as wn,Ab as Pn,A1 as Tn,A3 as Fn,Om as Tt,Aj as Ft,GD as vn,On as xn,Oo as Ln,Op as On,Oq as vt,Or as Bn,AG as Un,zV as xt,zP as ca,zU as Rn,Os as jn,Ot as Nn,y_ as Vn,Ou as Lt,Ov as Ot,Ow as Hn,z0 as Mn,y$ as rt,Ox as zn,Oy as $n,Oz as Gn,J1 as Yn,OA as Za,OB as Zn,vB as Bt,k6 as Kn,gD as Wn,AL as qn,OC as Ut,OD as Jn,AM as Qn,OE as Xn,dc as er,sF as ar,AB as tr,Av as Be,bv as nr,bD as rr,cv as sr,bE as or,Ik as cr}from"./zeni-epic-state-sw_lecJS.js";import{z as X,j as je,p as ce,m as Y,B as Ke,bY as xa,c7 as ir,w as ve,c8 as dr,c9 as lr,r as la,aJ as Fe,y as fe,bf as Ka,ca as ur,F as ua,i as La,h as Wa,c as J,D as qa,cb as mr,am as Ja,br as Je,cc as Va,cd as Cr,C as Qa,a1 as pr,ce as hr,ap as Rt,U as Ha,N as jt,e as Nt,cf as fr,cg as gr,ch as br,ci as yr,cj as Sr,o as Aa,ck as Ir,cl as Ar,cm as Ua,A as Er,cn as kr,co as Dr,cp as _r,cq as wr,a5 as Pr}from"./index-DhM1NMcw.js";import{n as _e,D as Vt,S as Tr}from"./mui-Wsw1v_RJ.js";import{a as i}from"./sentry-C0ycLLNj.js";import{g as Ce,a as ma,b as Ht,c as Ie,d as Ae,e as Re,f as Ne,A as Fr,h as Xa,P as vr,i as et,s as Qe,j as Mt,k as Me,l as zt,m as xr,n as $t,p as Lr,S as st}from"./SetupPagesScreen-CvciPhAb.js";import Oa from"./NotFoundScreen-CoCyTXNP.js";import{M as Ca}from"./MobileAppDrawer-DkH2rucX.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-DoU7lqQS.js";import{c as Yt}from"./useFetchSuggestedQuestionsWhenReady-BWXD0kZI.js";import{v as ot}from"./utils-84J_wB9-.js";import{t as Or}from"./AddressScreen-CT6TP3Z1.js";import"./recharts-_jQKodaN.js";import"./analytics-CBVce51h.js";import"./plaid-YevEbNem.js";import"./dnd-DEqqrbnG.js";import"./stripe-DMRn4zHo.js";import"./lottie-crYXxJIl.js";import"./lexical-BcUhE2s3.js";import"./pdf-BB9eCt-A.js";import"./analyticsHelper-CchhXxa7.js";import"./routePaths-DZQ5pfqe.js";import"./BusinessVerificationPageScreen-BGdNNp1F.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]="84ce2159-abfe-418f-9ddb-088c9866aa12",e._sentryDebugIdIdentifier="sentry-dbid-84ce2159-abfe-418f-9ddb-088c9866aa12")}catch{}})();function Br(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(Q=>ie(Q)),m=je(),C=Ue(m?.loggedInUserRoleMap),{useFeatureGate:p}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(Q=>ka(Q).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=p(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:U}=p(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(U,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:U,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(Q=>ze(Q,n.companyId)),j=$e(v.controllers),{creditAccount:O,creditAccountRepayment:P}=y(Q=>Ge(Q)),V=y(Q=>Q.classListState.fetchState),u=!_&&d&&f,l=y(Q=>Ma(Q,t,u,d)),[w,T]=i.useState(!1),H=l.chargeCard,B=H?.cardCreatedByUser?.userId,K=y(Q=>B!=null?ba(Q.userRoleState,B):void 0),I=K?.accountingClassIDs[0],L=y(Q=>I!=null?ya(Q.classState,{classId:I,reportId:"class_list"}):void 0),N=H?.cardHolderUser?.userId,R=y(Q=>N!=null?ba(Q.userRoleState,N):void 0),W=R?.accountingClassIDs[0],E=y(Q=>W!=null?ya(Q.classState,{classId:W,reportId:"class_list"}):void 0),G=H?.type.code==="business_physical_credit_card"||H?.type.code==="business_physical_debit_card",q=H?.type.code==="business_physical_debit_card";i.useEffect(()=>{c&&S===!1&&G&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,G,q]),i.useEffect(()=>{w||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,u,!1)))},[w,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&(G===!1||G&&H?.status?.code!=="active"||H?.cardHolderUserId!==r.userId||c===!1&&S===!1||H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card")){const Q=Ce(n.tenantEmailDomain,t,r,H,c);e(Q)}},[l.fetchState,c,G]),i.useEffect(()=>{O.fetchState!=="Completed"&&O.fetchState!=="In-Progress"&&d&&f&&C&&a(za()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&d&&f&&C&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(ut())},[O.fetchState,P.fetchState,a,d,f,C,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const Q=Ce(n.tenantEmailDomain,t,r);e(Q)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Re(d,g,D,f),ae=ma(d,f,C,O,P),ne=Ht(x,l);return l.fetchState!=="Completed"?s.jsx(Ke,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(ir,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:O,classListFetchState:V,creditAccountRepayment:P,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:L?.className,cardHolderRoles:R?.userRoles,cardHolderDepartmentName:E?.className})]})}const Ur=pe(function(e){const t=Ye(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(Wt({uiState:{sortKey:t,sortOrder:a}}))}}})(lr);function Rr(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[m,C]=i.useState(!1),p=y(o=>Ye(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??jr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{m||p.fetchState==="Completed"||p.fetchState==="In-Progress"||(C(!0),t(mt()))},[m,p,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return p.fetchState==="In-Progress"?s.jsx(dr,{onBackClick:S}):p.cashbackSummary.cashbackEarned.amount===0&&p.fetchState==="Completed"?s.jsx(Oa,{}):s.jsx(Ur,{onBackClick:S})}const jr=e=>`/${e}/cards`,Nr={containerWidth:new ua(100,58)},Vr=({appContent:e})=>{const t=la(),a=ue(),r=le(),{cardId:n}=ia(),m=ge(),{useDynamicConfig:C}=ce(),[p,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,U]=i.useState(!1),F=X.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const k=y(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=C(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>qt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:j}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:O}=v(Y.isDebitCardFeatureEnabled),P=Se(O,k),V=Ie({isDebitCardFeatureEnabled:O,isBankingOnlyTenant:P}),u=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),w=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,B=Ae({isCardsOnlyTenant:w,isChargeCardFeatureEnabled:j,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&B&&u;i.useEffect(()=>{p===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,B)))},[o,g.fetchState,p,D]);const I=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(_===!1&&(I===!1||I&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==F.userId)){const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(m.state?.pathnameStackToGoBack,m.pathname);r(E,{state:{pathnameStackToGoBack:G}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Jt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(m.state?.pathnameStackToGoBack,m.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:G}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const L=X.getZeniOtpTokenForCardHolder(n),N=y(E=>Ct(E.userState,F.userId)),R=()=>{d?.status?.code!=="active"&&a(Ga(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(R,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{U(E)};if(D!=="Completed"||d==null)return s.jsx(Ke,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(N?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(zr,{children:[s.jsx(Ca,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx(Hr,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:N.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:L,navigate:r,currentTenant:k,location:m,maxChargeCardActivationAttempts:b[n]!=null?b[n]:h.default_max_charge_card_activation_attempts!=null?h.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Mr,{windowSize:t,children:e}):null]})},Hr=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const m=Qt(e.addressState,a);if(m==null)throw Error("Can't access shippingAddress.");const C=pt(e,n),p=t.updateStatus,S=Ze(e,!1,!1,!1);let o=!1;S.fetchState==="Completed"&&S.cards.length<=1&&(o=!0);const c=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Xt())||c,showMenuIcon:o,shippingAddress:m,vgsVaultId:La.cardVaultId,twoFAView:C,activationWaitStatus:p,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:m,chargeCardDetailState:C}=t,p=C.chargeCard?.cardProviderID,{tenantEmailDomain:S}=m;return{onGetOtp:o=>{p!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(an(r,o))},onResendOtp:o=>{p!=null&&e(Pa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{p!=null&&e(wa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(en({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(ur),Mr=_e.div`
|
|
1
|
+
import{j as s}from"./liveblocks-CqGMBzbB.js";import{j as le,l as ia,h as ue,g as y,u as ge,k as pe,N as ga,q as lt,n as Kt,o as te}from"./core-DMKpdX6V.js";import{eN as ie,bs as Ue,NZ as ka,eR as be,eS as ye,eT as Se,fO as ze,cq as $e,N_ as Ge,N$ as Ma,sL as ba,jy as ya,O0 as Sa,gC as oa,zd as Xe,zf as za,zg as $a,jo as ut,O1 as Ye,z1 as mt,O2 as Wt,O3 as qt,z4 as Da,O4 as Jt,Mq as _a,qX as Ct,za as Ga,gN as Qt,O5 as pt,O6 as Ze,bq as Xt,O7 as en,fz as wa,fy as Pa,zK as an,fx as Ta,M6 as tn,O8 as ht,cj as ft,cL as nn,Mp as da,Ak as rn,O9 as tt,zW as Fa,Oa as gt,Al as sn,MQ as on,Am as cn,Bg as dn,s5 as ln,Ba as un,zv as bt,zo as mn,Ob as Cn,fQ as pn,zE as yt,zI as St,fP as hn,Oc as fn,A6 as It,Od as gn,Oe as bn,Of as yn,zG as At,zr as Et,z7 as kt,zA as Dt,zy as _t,zC as Sn,ze as nt,Og as wt,Oh as va,zT as Ia,J5 as Pt,cM as Ya,Oi as In,Oj as An,Ok as En,Ol as kn,zQ as Na,Ad as Dn,A9 as _n,zM as wn,Ab as Pn,A1 as Tn,A3 as Fn,Om as Tt,Aj as Ft,GD as vn,On as xn,Oo as Ln,Op as On,Oq as vt,Or as Bn,AG as Un,zV as xt,zP as ca,zU as Rn,Os as jn,Ot as Nn,y_ as Vn,Ou as Lt,Ov as Ot,Ow as Hn,z0 as Mn,y$ as rt,Ox as zn,Oy as $n,Oz as Gn,J1 as Yn,OA as Za,OB as Zn,vB as Bt,k6 as Kn,gD as Wn,AL as qn,OC as Ut,OD as Jn,AM as Qn,OE as Xn,dc as er,sF as ar,AB as tr,Av as Be,bv as nr,bD as rr,cv as sr,bE as or,Ik as cr}from"./zeni-epic-state-dcVRrD1h.js";import{z as X,j as je,p as ce,m as Y,B as Ke,bY as xa,c7 as ir,w as ve,c8 as dr,c9 as lr,r as la,aJ as Fe,y as fe,bf as Ka,ca as ur,F as ua,i as La,h as Wa,c as J,D as qa,cb as mr,am as Ja,br as Je,cc as Va,cd as Cr,C as Qa,a1 as pr,ce as hr,ap as Rt,U as Ha,N as jt,e as Nt,cf as fr,cg as gr,ch as br,ci as yr,cj as Sr,o as Aa,ck as Ir,cl as Ar,cm as Ua,A as Er,cn as kr,co as Dr,cp as _r,cq as wr,a5 as Pr}from"./index-B-S1sw2q.js";import{n as _e,D as Vt,S as Tr}from"./mui-C4peJOR0.js";import{a as i}from"./sentry-By_w3AbQ.js";import{g as Ce,a as ma,b as Ht,c as Ie,d as Ae,e as Re,f as Ne,A as Fr,h as Xa,P as vr,i as et,s as Qe,j as Mt,k as Me,l as zt,m as xr,n as $t,p as Lr,S as st}from"./SetupPagesScreen-tsJgjmfM.js";import Oa from"./NotFoundScreen-C_3ycSKf.js";import{M as Ca}from"./MobileAppDrawer-CQwwOR5p.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import{c as Yt}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import{v as ot}from"./utils-CSUcsfYh.js";import{t as Or}from"./AddressScreen-jTT04DFx.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./analyticsHelper-CQQBcwi_.js";import"./routePaths-DwcIzItv.js";import"./BusinessVerificationPageScreen-DS8yDRTx.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]="84ce2159-abfe-418f-9ddb-088c9866aa12",e._sentryDebugIdIdentifier="sentry-dbid-84ce2159-abfe-418f-9ddb-088c9866aa12")}catch{}})();function Br(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(Q=>ie(Q)),m=je(),C=Ue(m?.loggedInUserRoleMap),{useFeatureGate:p}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(Q=>ka(Q).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=p(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:U}=p(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(U,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:U,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(Q=>ze(Q,n.companyId)),j=$e(v.controllers),{creditAccount:O,creditAccountRepayment:P}=y(Q=>Ge(Q)),V=y(Q=>Q.classListState.fetchState),u=!_&&d&&f,l=y(Q=>Ma(Q,t,u,d)),[w,T]=i.useState(!1),H=l.chargeCard,B=H?.cardCreatedByUser?.userId,K=y(Q=>B!=null?ba(Q.userRoleState,B):void 0),I=K?.accountingClassIDs[0],L=y(Q=>I!=null?ya(Q.classState,{classId:I,reportId:"class_list"}):void 0),N=H?.cardHolderUser?.userId,R=y(Q=>N!=null?ba(Q.userRoleState,N):void 0),W=R?.accountingClassIDs[0],E=y(Q=>W!=null?ya(Q.classState,{classId:W,reportId:"class_list"}):void 0),G=H?.type.code==="business_physical_credit_card"||H?.type.code==="business_physical_debit_card",q=H?.type.code==="business_physical_debit_card";i.useEffect(()=>{c&&S===!1&&G&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,G,q]),i.useEffect(()=>{w||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,u,!1)))},[w,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&(G===!1||G&&H?.status?.code!=="active"||H?.cardHolderUserId!==r.userId||c===!1&&S===!1||H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card")){const Q=Ce(n.tenantEmailDomain,t,r,H,c);e(Q)}},[l.fetchState,c,G]),i.useEffect(()=>{O.fetchState!=="Completed"&&O.fetchState!=="In-Progress"&&d&&f&&C&&a(za()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&d&&f&&C&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(ut())},[O.fetchState,P.fetchState,a,d,f,C,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const Q=Ce(n.tenantEmailDomain,t,r);e(Q)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Re(d,g,D,f),ae=ma(d,f,C,O,P),ne=Ht(x,l);return l.fetchState!=="Completed"?s.jsx(Ke,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(ir,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:O,classListFetchState:V,creditAccountRepayment:P,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:L?.className,cardHolderRoles:R?.userRoles,cardHolderDepartmentName:E?.className})]})}const Ur=pe(function(e){const t=Ye(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(Wt({uiState:{sortKey:t,sortOrder:a}}))}}})(lr);function Rr(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[m,C]=i.useState(!1),p=y(o=>Ye(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??jr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{m||p.fetchState==="Completed"||p.fetchState==="In-Progress"||(C(!0),t(mt()))},[m,p,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return p.fetchState==="In-Progress"?s.jsx(dr,{onBackClick:S}):p.cashbackSummary.cashbackEarned.amount===0&&p.fetchState==="Completed"?s.jsx(Oa,{}):s.jsx(Ur,{onBackClick:S})}const jr=e=>`/${e}/cards`,Nr={containerWidth:new ua(100,58)},Vr=({appContent:e})=>{const t=la(),a=ue(),r=le(),{cardId:n}=ia(),m=ge(),{useDynamicConfig:C}=ce(),[p,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,U]=i.useState(!1),F=X.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const k=y(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=C(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>qt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:j}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:O}=v(Y.isDebitCardFeatureEnabled),P=Se(O,k),V=Ie({isDebitCardFeatureEnabled:O,isBankingOnlyTenant:P}),u=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),w=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,B=Ae({isCardsOnlyTenant:w,isChargeCardFeatureEnabled:j,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&B&&u;i.useEffect(()=>{p===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,B)))},[o,g.fetchState,p,D]);const I=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(_===!1&&(I===!1||I&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==F.userId)){const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(m.state?.pathnameStackToGoBack,m.pathname);r(E,{state:{pathnameStackToGoBack:G}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Jt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(m.state?.pathnameStackToGoBack,m.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:G}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const L=X.getZeniOtpTokenForCardHolder(n),N=y(E=>Ct(E.userState,F.userId)),R=()=>{d?.status?.code!=="active"&&a(Ga(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(R,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{U(E)};if(D!=="Completed"||d==null)return s.jsx(Ke,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(N?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(zr,{children:[s.jsx(Ca,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx(Hr,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:N.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:L,navigate:r,currentTenant:k,location:m,maxChargeCardActivationAttempts:b[n]!=null?b[n]:h.default_max_charge_card_activation_attempts!=null?h.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Mr,{windowSize:t,children:e}):null]})},Hr=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const m=Qt(e.addressState,a);if(m==null)throw Error("Can't access shippingAddress.");const C=pt(e,n),p=t.updateStatus,S=Ze(e,!1,!1,!1);let o=!1;S.fetchState==="Completed"&&S.cards.length<=1&&(o=!0);const c=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Xt())||c,showMenuIcon:o,shippingAddress:m,vgsVaultId:La.cardVaultId,twoFAView:C,activationWaitStatus:p,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:m,chargeCardDetailState:C}=t,p=C.chargeCard?.cardProviderID,{tenantEmailDomain:S}=m;return{onGetOtp:o=>{p!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(an(r,o))},onResendOtp:o=>{p!=null&&e(Pa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{p!=null&&e(wa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(en({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(ur),Mr=_e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: ${e=>`${Nr.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-CqGMBzbB.js";import{a as g}from"./sentry-By_w3AbQ.js";import{j as v,h as k,u as x,l as T,g as O,k as E}from"./core-DMKpdX6V.js";import{z as N,b1 as F,C as P,c as L,e as V,ab as C,b2 as j,ap as A,aq as U,y as B}from"./index-B-S1sw2q.js";import{eN as D,fB as _,rw as M,fw as R,c0 as z,Lv as G,bn as Y,pE as q,ps as H,j_ as Z,lu as S,Lw as $,bC as J,ct as b,lC as K,lF as Q}from"./zeni-epic-state-dcVRrD1h.js";import"./mui-C4peJOR0.js";import{c as W}from"./routePaths-DwcIzItv.js";import{M as X}from"./MobileAppDrawer-CQwwOR5p.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="6c71dff2-6ba7-416a-96e2-0d097ed19e58",t._sentryDebugIdIdentifier="sentry-dbid-6c71dff2-6ba7-416a-96e2-0d097ed19e58")}catch{}})();const ee=E(function(t){const a=R(t),i=N.getSignedInUser(),l=D(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(t,a){const{companyId:i,currentTenant:l,navigate:c,location:p}=a,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const n=W(f,e),o=B(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,w={companyInfo:{...n,website:u!=""&&u!=null?b(u):void 0,meetingLink:y!=""&&y!=null?b(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:U(I))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};t(S({companyDetails:w}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(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=>{t($(e))},onCompanyOfficerUpdated:e=>{t(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=>{t(Z({files:e}))},onDeleteFile:e=>{t(H(e))},onEditFileName:(e,n)=>{t(q(e,n.split(".")[0]))}}})(j);function de(){const t=v(),a=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),n=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??N.getSignedInUserTenant(l)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),a(_(d)))},[c,n,d,a]),g.useEffect(()=>{o==="Not-Started"&&a(M())},[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:L,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-CqGMBzbB.js";import{a}from"./sentry-By_w3AbQ.js";import{h as D,u as v,g as m,N as w}from"./core-DMKpdX6V.js";import{Ig as O,eN as A,fi as _,ml as U,fK as E,fh as j,eO as L,In as F}from"./zeni-epic-state-dcVRrD1h.js";import{u as $,z as u,L as g,D as k,o as H}from"./index-B-S1sw2q.js";import{n as z}from"./mui-C4peJOR0.js";import{t as R}from"./getLocaleForTenant-DIj12PGu.js";import{g as P,Q as G}from"./QBOConnectionScreen-DiY0aEcB.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";import"./empty-_gHzexXT.js";import"./pdf-lib-BMPC_qNx.js";import"./index-CapqGJKF.js";import"./url-XDFiNkBY.js";import"./index-CciFFvoQ.js";import"./decodeURIComponentSafe-kaKdrE3i.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]="f8f6cb81-5e78-403d-a489-46afc299ebc0",t._sentryDebugIdIdentifier="sentry-dbid-f8f6cb81-5e78-403d-a489-46afc299ebc0")}catch{}})();const K=z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as d}from"./liveblocks-CqGMBzbB.js";import{z as n}from"./index-B-S1sw2q.js";import{g as p}from"./QBOConnectionScreen-DiY0aEcB.js";import"./sentry-By_w3AbQ.js";import{u as a,N as i}from"./core-DMKpdX6V.js";import"./zeni-epic-state-dcVRrD1h.js";import"./recharts-DEvckcqQ.js";import"./mui-C4peJOR0.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";import"./empty-_gHzexXT.js";import"./pdf-lib-BMPC_qNx.js";import"./index-CapqGJKF.js";import"./url-XDFiNkBY.js";import"./index-CciFFvoQ.js";import"./decodeURIComponentSafe-kaKdrE3i.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]="b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd",t._sentryDebugIdIdentifier="sentry-dbid-b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd")}catch{}})();const U=()=>{const t=a(),{code:o,realmId:r,state:e}=p(t.search),s=n.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return d.jsx(i,{to:m})}return d.jsx(i,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-DyOkPrNA.js → CustomerOnboardingRoutes-BeOGrGwK.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-CqGMBzbB.js";import{t as $e,A as Ce}from"./AddressScreen-jTT04DFx.js";import ze from"./NotFoundScreen-C_3ycSKf.js";import{a as g}from"./sentry-By_w3AbQ.js";import{j as oe,u as se,h as ie,l as re,g as D,N as x,k as ce,i as Me,n as qe,o as M}from"./core-DMKpdX6V.js";import{A as de,j as le,z as B,p as ue,h as Je,m as _,y as V,C as H,c as N,B as we,e as X,al as Ke,r as Qe,am as Ie,i as te,an as Ze,ao as ke,o as He,ap as We,aq as xe,ar as Xe}from"./index-B-S1sw2q.js";import{bn as Ye,eN as ee,fa as et,eT as pe,eR as me,bv as tt,mj as at,f6 as nt,bM as ot,j2 as ae,j5 as ve,I_ as st,bR as it,c0 as ge,rK as he,rv as rt,Ja as Y,rL as _e,GH as ct,k6 as Ue,Jb as Ve,Jc as dt,Jd as lt,Je as ut,j0 as pt,j3 as mt,rx as Be,rJ as gt,bC as Ee,ct as ht,rX as Te,pE as ft,ps as yt,j_ as St,fz as bt,fy as Ct,fx as It,Jf as kt,rp as xt,rY as Et,r$ as Tt,s2 as Ot,s8 as Pt,cS as At}from"./zeni-epic-state-dcVRrD1h.js";import{n as fe}from"./mui-C4peJOR0.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-DiY0aEcB.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";import"./empty-_gHzexXT.js";import"./pdf-lib-BMPC_qNx.js";import"./index-CapqGJKF.js";import"./url-XDFiNkBY.js";import"./index-CciFFvoQ.js";import"./decodeURIComponentSafe-kaKdrE3i.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]="201bca39-e050-444c-82a9-3ea1a1ae186c",t._sentryDebugIdIdentifier="sentry-dbid-201bca39-e050-444c-82a9-3ea1a1ae186c")}catch{}})();const jt=ce(function(t,o){const s=[];o.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),o.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),o.shouldFetchZeniAccountsPromoCard===!1&&s.push("zeni_accounts_promo_card"),o.shouldFetchRewardsPlanCard===!1&&s.push("rewards_card"),o.isExpenseAutomationEnabledForUser===!1&&s.push("expense_automation_card");const u=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,o){const{themeState:s,navigate:u,location:d}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Ke),wt=()=>{const t=oe(),o=se(),s=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=Je(),{isFeatureEnabled:E}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:T}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:I}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),$=C||U&&h,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),j=c.company!=null&&et(c.company),R=L&&j,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 w=pe(F,c),P=me(c),A=[],K=b?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,z=b?.resources?.find(l=>l.resource==="/reports/task_card")==null,q=c?.userRole!=null&&tt(c?.userRole),v=b?.resources?.find(l=>l.resource==="/bills")==null&&!q,J=b?.resources?.find(l=>l.resource==="/reimbursements")==null;if(K===!1&&A.push("top_expenses"),z===!1&&A.push("task_card"),v===!1&&A.push("bill_pay_card","bill_pay_promo_card"),J===!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||w||P||(r(!0),s(at(i.userId,G,c.tenantId,!0,!1,A)))},[d,O,w,P,i,c.tenantId,s]),g.useEffect(()=>{(w||P)&&setTimeout(()=>{S(!0)},5e3)},[w,P]),O!=="Completed")return a.jsx(x,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(w)return a.jsx(x,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(x,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(H,{analytics:N,onLoad:l=>(Q=>Q.trackPageLoaded(X.Event.onboardingDashboardActivation))(l)}),a.jsx(jt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:E,isArAgingFeatureEnabled:T,shouldFetchZeniAccountsPromoCard:I,shouldFetchRewardsPlanCard:f,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:R,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(we,{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 l}from"./liveblocks-iYXuwnNJ.js";import{l as K,g as S,u as z,h as G,j as q,k as H,s as za,n as at,o as w}from"./core-BiO8az_8.js";import{eN as j,Jv as Me,bC as Yt,bq as ue,KI as qa,hS as Za,KJ as xt,KK as Ha,hV as nt,KL as Be,KM as Ja,h_ as Qa,KN as Tt,KO as Xa,i2 as ot,KP as je,KQ as Wa,cj as rt,KR as en,KS as tn,JP as an,iY as nn,KT as on,bn as Ae,KU as Nt,Jj as ee,bc as Vt,ja as Gt,mt as Kt,iV as $t,Jl as te,Jk as Z,f2 as sn,fk as rn,KV as cn,KW as ln,KX as zt,KY as be,tA as ve,tB as Ie,tY as me,tS as ae,tF as Ee,KZ as dn,K_ as un,K$ as mn,L0 as qt,L1 as Ce,L2 as pn,dB as Ue,qc as Zt,L3 as hn,L4 as fn,L5 as gn,L6 as it,IH as ct,jq as pe,u4 as lt,qk as bn,L7 as Cn,tC as wt,qf as le,qb as Ht,L8 as se,L9 as _n,La as dt,IF as ut,sc as Jt,Lb as kn,Lc as Sn,Ld as yn,Le as mt,sp as An,Lf as vn,tE as Dt,sb as Qt,Lg as re,Lh as In,bv as Xt,u8 as Wt,Li as En,Lj as xn,Lk as Tn,Ll as pt,u3 as wn,Lm as Dn,tD as Ft,u7 as ea,Ln as ie,Lo as Fn,Lp as On,Lq as ta,jf as aa,mq as na,jk as oa,mo as sa,mn as ra,mm as ia,rA as Pn,fa as Rn,cM as Bn,cN as jn,mj as Ln,f6 as Mn,mA as Un,Dc as Ot,Lr as Yn,Ls as Nn,Lt as Vn,Lu as Gn,b5 as ht,eZ as Kn,gA as $n,fB as zn,mu as qn,iO as Zn,mr as Hn,mp as Jn,eT as Qn,eR as Xn}from"./zeni-epic-state-sw_lecJS.js";import{z as B,U as J,y as D,c as I,D as $,aQ as Wn,C as xe,aR as ca,e as N,aS as eo,j as Te,aT as la,p as Ye,m as L,h as to,aU as ao,aV as no,M as da,r as oo,a as ua,$ as so,aW as ro,aJ as ma,aX as io,aY as co,R as lo,aZ as uo,a_ as mo,am as po,w as ho,N as fo,a$ as go,b0 as ke}from"./index-DhM1NMcw.js";import{n as ft}from"./mui-Wsw1v_RJ.js";import{a as b}from"./sentry-C0ycLLNj.js";import{w as pa}from"./withTransactionSidePanel-BlWzkOQ0.js";import{b as ha,t as he,e as ne,a as gt,v as bo}from"./routePaths-DZQ5pfqe.js";import{u as Q}from"./useAskAiCfoHostNavButtonProps-DoU7lqQS.js";import{c as we,b as Co}from"./useFetchSuggestedQuestionsWhenReady-BWXD0kZI.js";import ye from"./NotFoundScreen-CoCyTXNP.js";import{t as fa}from"./analyticsHelper-CchhXxa7.js";import{C as _o}from"./CompanyPassportScreen-CxsYYjMZ.js";import{F as ko}from"./FeaturePreviewScreen-Chy-C2bY.js";import{R as So}from"./ReferralListScreen-DOkwApTO.js";import"./recharts-_jQKodaN.js";import"./analytics-CBVce51h.js";import"./plaid-YevEbNem.js";import"./dnd-DEqqrbnG.js";import"./stripe-DMRn4zHo.js";import"./lottie-crYXxJIl.js";import"./lexical-BcUhE2s3.js";import"./pdf-BB9eCt-A.js";import"./utils-84J_wB9-.js";import"./TransactionDetailScreen-B5S0aVL7.js";import"./decodeURIComponentSafe-Drs0EkRs.js";import"./MobileAppDrawer-DkH2rucX.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]="1db88d91-1e54-4c1a-a4f6-37faac11206c",e._sentryDebugIdIdentifier="sentry-dbid-1db88d91-1e54-4c1a-a4f6-37faac11206c")}catch{}})();const yo=pa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=B.getSignedInUser(),i=S(x=>x.tenantState.currentTenantId),d=S(x=>j(x)),{tenantEmailDomain:p}=K(),C=z(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Me()}),[]),m=b.useMemo(()=>r!=null?Yt(r):ue(),[r]),h=G(),f=q(),k=S(x=>qa(x,m,o)),y=b.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(Za(o,m))},[m]),_=b.useCallback(()=>{f("../../",{relative:"path"})},[]),A=b.useCallback((x,P)=>{h(xt({sortKey:x,sortOrder:P}))},[]),E=b.useCallback(x=>{h(xt({downloadState:x}))},[]),M=b.useCallback(x=>{if(e)e(x.transactionId,x.transactionType);else if(p!=null){const P=ha({id:x.transactionId,type:x.transactionType},p);f(P);const fe=D(C.state?.pathnameStackToGoBack,C.pathname);f(P,{state:{pathnameStackToGoBack:fe}})}},[p,e]),F=b.useCallback(()=>{k.vendor!=null&&I.trackApAgingDetail("AP Aging",m.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,m]);return b.useEffect(()=>{y()},[]),b.useEffect(()=>{k.fetchState==="Completed"&&F()},[F,k.fetchState]),l.jsx(Wn,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:I,onTransactionClick:M,onReload:y,onBackClick:_,onColumnSortConfigChanged:A,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Ao=()=>{const e=G(),a=q(),t=S(A=>Ha(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AP Aging"});we({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>j(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},C=b.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${J}/agingReport`,timezone:Me()}),[]),g=t.apAgingUIState.selectedDate??ue(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(nt(g))},[]);b.useEffect(()=>{u()},[]);const c=b.useCallback(()=>{a("../",{relative:"path"})},[]),m=b.useCallback(A=>{e(Be({searchString:A}))},[]),h=b.useCallback((A,E)=>{e(Be({sortKey:E,sortOrder:A}))},[]),f=b.useCallback(A=>{a(`./${A}/${g.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=b.useCallback(A=>{e(Be({downloadState:A}))},[]),y=b.useCallback((A,E)=>{},[]),_=b.useCallback((A,E)=>{e(Be({selectedDate:A,agingDateSelectionType:E})),e(nt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(xe,{analytics:I,onLoad:A=>A.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,l.jsx(ca,{uiState:t.apAgingUIState,report:t,downloadParams:C,analytics:I,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:_,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},vo=pa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=B.getSignedInUser(),i=S(F=>j(F)),{tenantEmailDomain:d}=K(),p=z(),C=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:g,companyName:C,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Me()}),[]),c=b.useMemo(()=>r!=null?Yt(r):ue(),[r]),m=G(),h=q(),f=S(F=>Ja(F,c,o)),k=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Qa(o,c))},[c]),y=b.useCallback(()=>{h("../../",{relative:"path"})},[]),_=b.useCallback((F,x)=>{m(Tt({sortKey:F,sortOrder:x}))},[]),A=b.useCallback(F=>{m(Tt({downloadState:F}))},[]),E=b.useCallback(F=>{if(e)e(F.transactionId,F.transactionType);else if(d!=null){const x=ha({id:F.transactionId,type:F.transactionType},d);h(x);const P=D(p.state?.pathnameStackToGoBack,p.pathname);h(x,{state:{pathnameStackToGoBack:P}})}},[d,e]),M=b.useCallback(()=>{f.customer!=null&&I.trackArAgingDetail("AR Aging",c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,c]);return b.useEffect(()=>{k()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&M()},[f.fetchState,M]),l.jsx(eo,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:I,onTransactionClick:E,onReload:k,onBackClick:y,onColumnSortConfigChanged:_,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const e=G(),a=q(),t=S(_=>Xa(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AR Aging"});we({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(_=>j(_)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=b.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${J}/agingReport`,timezone:Me()}),[]),C=t.arAgingUIState.selectedDate??ue(),g=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ot(C))},[]);b.useEffect(()=>{g()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),c=b.useCallback(_=>{e(je({searchString:_}))},[]),m=b.useCallback((_,A)=>{e(je({sortKey:A,sortOrder:_}))},[]),h=b.useCallback(_=>{a(`./${_}/${C.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),f=b.useCallback(_=>{e(je({downloadState:_}))},[]),k=b.useCallback((_,A)=>{e(je({selectedDate:_,agingDateSelectionType:A})),e(ot(_))},[]),y=b.useCallback((_,A)=>{e(Wa({nodeId:_,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(xe,{analytics:I,onLoad:_=>_.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,l.jsx(ca,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:I,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function ba(e,a){const t=an(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=he(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(nn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?I.trackZeniAccountsCashBalancePromoClicked("Move Money"):(I.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 I.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const Eo=H(function(e){const a=en(e).accountsInOrder.map((n,o)=>ga(n,o)),t=tn(e);return{sectionTitle:$.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},ba)(la),xo=H(function(e){const a=on(e).accountsInOrder.map((o,r)=>ga(o,r)),t=B.getSignedInUser(),n=Ae(t);return{sectionTitle:$.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ba)(la);function To(){const e=q(),a=z(),{tenantEmailDomain:t}=K(),n=Te(),o=S(s=>j(s).company?.companyInfo.firstMonthOfFY??1),r=rt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ye,{}):l.jsx(Eo,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function wo(){const e=q(),a=z(),{tenantEmailDomain:t}=K(),n=Te(),o=rt(n?.loggedInUserRoleMap),r=S(s=>j(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ye,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Do=ft.div`
|
|
1
|
+
import{j as l}from"./liveblocks-CqGMBzbB.js";import{l as K,g as S,u as z,h as G,j as q,k as H,s as za,n as at,o as w}from"./core-DMKpdX6V.js";import{eN as j,Jv as Me,bC as Yt,bq as ue,KI as qa,hS as Za,KJ as xt,KK as Ha,hV as nt,KL as Be,KM as Ja,h_ as Qa,KN as Tt,KO as Xa,i2 as ot,KP as je,KQ as Wa,cj as rt,KR as en,KS as tn,JP as an,iY as nn,KT as on,bn as Ae,KU as Nt,Jj as ee,bc as Vt,ja as Gt,mt as Kt,iV as $t,Jl as te,Jk as Z,f2 as sn,fk as rn,KV as cn,KW as ln,KX as zt,KY as be,tA as ve,tB as Ie,tY as me,tS as ae,tF as Ee,KZ as dn,K_ as un,K$ as mn,L0 as qt,L1 as Ce,L2 as pn,dB as Ue,qc as Zt,L3 as hn,L4 as fn,L5 as gn,L6 as it,IH as ct,jq as pe,u4 as lt,qk as bn,L7 as Cn,tC as wt,qf as le,qb as Ht,L8 as se,L9 as _n,La as dt,IF as ut,sc as Jt,Lb as kn,Lc as Sn,Ld as yn,Le as mt,sp as An,Lf as vn,tE as Dt,sb as Qt,Lg as re,Lh as In,bv as Xt,u8 as Wt,Li as En,Lj as xn,Lk as Tn,Ll as pt,u3 as wn,Lm as Dn,tD as Ft,u7 as ea,Ln as ie,Lo as Fn,Lp as On,Lq as ta,jf as aa,mq as na,jk as oa,mo as sa,mn as ra,mm as ia,rA as Pn,fa as Rn,cM as Bn,cN as jn,mj as Ln,f6 as Mn,mA as Un,Dc as Ot,Lr as Yn,Ls as Nn,Lt as Vn,Lu as Gn,b5 as ht,eZ as Kn,gA as $n,fB as zn,mu as qn,iO as Zn,mr as Hn,mp as Jn,eT as Qn,eR as Xn}from"./zeni-epic-state-dcVRrD1h.js";import{z as B,U as J,y as D,c as I,D as $,aQ as Wn,C as xe,aR as ca,e as N,aS as eo,j as Te,aT as la,p as Ye,m as L,h as to,aU as ao,aV as no,M as da,r as oo,a as ua,$ as so,aW as ro,aJ as ma,aX as io,aY as co,R as lo,aZ as uo,a_ as mo,am as po,w as ho,N as fo,a$ as go,b0 as ke}from"./index-B-S1sw2q.js";import{n as ft}from"./mui-C4peJOR0.js";import{a as b}from"./sentry-By_w3AbQ.js";import{w as pa}from"./withTransactionSidePanel-yqBBfrLp.js";import{b as ha,t as he,e as ne,a as gt,v as bo}from"./routePaths-DwcIzItv.js";import{u as Q}from"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import{c as we,b as Co}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import ye from"./NotFoundScreen-C_3ycSKf.js";import{t as fa}from"./analyticsHelper-CQQBcwi_.js";import{C as _o}from"./CompanyPassportScreen-Dh1MJ-Ph.js";import{F as ko}from"./FeaturePreviewScreen-D6Uxvt0_.js";import{R as So}from"./ReferralListScreen-Dq2B0WMt.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";import"./TransactionDetailScreen-CuOcn9Eq.js";import"./decodeURIComponentSafe-kaKdrE3i.js";import"./MobileAppDrawer-CQwwOR5p.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]="1db88d91-1e54-4c1a-a4f6-37faac11206c",e._sentryDebugIdIdentifier="sentry-dbid-1db88d91-1e54-4c1a-a4f6-37faac11206c")}catch{}})();const yo=pa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=B.getSignedInUser(),i=S(x=>x.tenantState.currentTenantId),d=S(x=>j(x)),{tenantEmailDomain:p}=K(),C=z(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Me()}),[]),m=b.useMemo(()=>r!=null?Yt(r):ue(),[r]),h=G(),f=q(),k=S(x=>qa(x,m,o)),y=b.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(Za(o,m))},[m]),_=b.useCallback(()=>{f("../../",{relative:"path"})},[]),A=b.useCallback((x,P)=>{h(xt({sortKey:x,sortOrder:P}))},[]),E=b.useCallback(x=>{h(xt({downloadState:x}))},[]),M=b.useCallback(x=>{if(e)e(x.transactionId,x.transactionType);else if(p!=null){const P=ha({id:x.transactionId,type:x.transactionType},p);f(P);const fe=D(C.state?.pathnameStackToGoBack,C.pathname);f(P,{state:{pathnameStackToGoBack:fe}})}},[p,e]),F=b.useCallback(()=>{k.vendor!=null&&I.trackApAgingDetail("AP Aging",m.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,m]);return b.useEffect(()=>{y()},[]),b.useEffect(()=>{k.fetchState==="Completed"&&F()},[F,k.fetchState]),l.jsx(Wn,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:I,onTransactionClick:M,onReload:y,onBackClick:_,onColumnSortConfigChanged:A,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Ao=()=>{const e=G(),a=q(),t=S(A=>Ha(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AP Aging"});we({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>j(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},C=b.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${J}/agingReport`,timezone:Me()}),[]),g=t.apAgingUIState.selectedDate??ue(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(nt(g))},[]);b.useEffect(()=>{u()},[]);const c=b.useCallback(()=>{a("../",{relative:"path"})},[]),m=b.useCallback(A=>{e(Be({searchString:A}))},[]),h=b.useCallback((A,E)=>{e(Be({sortKey:E,sortOrder:A}))},[]),f=b.useCallback(A=>{a(`./${A}/${g.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=b.useCallback(A=>{e(Be({downloadState:A}))},[]),y=b.useCallback((A,E)=>{},[]),_=b.useCallback((A,E)=>{e(Be({selectedDate:A,agingDateSelectionType:E})),e(nt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(xe,{analytics:I,onLoad:A=>A.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,l.jsx(ca,{uiState:t.apAgingUIState,report:t,downloadParams:C,analytics:I,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:_,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},vo=pa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=B.getSignedInUser(),i=S(F=>j(F)),{tenantEmailDomain:d}=K(),p=z(),C=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:g,companyName:C,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Me()}),[]),c=b.useMemo(()=>r!=null?Yt(r):ue(),[r]),m=G(),h=q(),f=S(F=>Ja(F,c,o)),k=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Qa(o,c))},[c]),y=b.useCallback(()=>{h("../../",{relative:"path"})},[]),_=b.useCallback((F,x)=>{m(Tt({sortKey:F,sortOrder:x}))},[]),A=b.useCallback(F=>{m(Tt({downloadState:F}))},[]),E=b.useCallback(F=>{if(e)e(F.transactionId,F.transactionType);else if(d!=null){const x=ha({id:F.transactionId,type:F.transactionType},d);h(x);const P=D(p.state?.pathnameStackToGoBack,p.pathname);h(x,{state:{pathnameStackToGoBack:P}})}},[d,e]),M=b.useCallback(()=>{f.customer!=null&&I.trackArAgingDetail("AR Aging",c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,c]);return b.useEffect(()=>{k()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&M()},[f.fetchState,M]),l.jsx(eo,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:I,onTransactionClick:E,onReload:k,onBackClick:y,onColumnSortConfigChanged:_,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const e=G(),a=q(),t=S(_=>Xa(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AR Aging"});we({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(_=>j(_)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=b.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${J}/agingReport`,timezone:Me()}),[]),C=t.arAgingUIState.selectedDate??ue(),g=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ot(C))},[]);b.useEffect(()=>{g()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),c=b.useCallback(_=>{e(je({searchString:_}))},[]),m=b.useCallback((_,A)=>{e(je({sortKey:A,sortOrder:_}))},[]),h=b.useCallback(_=>{a(`./${_}/${C.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),f=b.useCallback(_=>{e(je({downloadState:_}))},[]),k=b.useCallback((_,A)=>{e(je({selectedDate:_,agingDateSelectionType:A})),e(ot(_))},[]),y=b.useCallback((_,A)=>{e(Wa({nodeId:_,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(xe,{analytics:I,onLoad:_=>_.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,l.jsx(ca,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:I,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function ba(e,a){const t=an(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=he(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(nn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?I.trackZeniAccountsCashBalancePromoClicked("Move Money"):(I.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 I.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const Eo=H(function(e){const a=en(e).accountsInOrder.map((n,o)=>ga(n,o)),t=tn(e);return{sectionTitle:$.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},ba)(la),xo=H(function(e){const a=on(e).accountsInOrder.map((o,r)=>ga(o,r)),t=B.getSignedInUser(),n=Ae(t);return{sectionTitle:$.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ba)(la);function To(){const e=q(),a=z(),{tenantEmailDomain:t}=K(),n=Te(),o=S(s=>j(s).company?.companyInfo.firstMonthOfFY??1),r=rt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ye,{}):l.jsx(Eo,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function wo(){const e=q(),a=z(),{tenantEmailDomain:t}=K(),n=Te(),o=rt(n?.loggedInUserRoleMap),r=S(s=>j(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ye,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Do=ft.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
min-height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-
|
|
1
|
+
import{j as v}from"./liveblocks-CqGMBzbB.js";import{a as u}from"./sentry-By_w3AbQ.js";import{h as y,g as b,k as w,u as A,N}from"./core-DMKpdX6V.js";import{Ig as k,eN as _,fi as U,Ih as L,ml as R,Ii as z}from"./zeni-epic-state-dcVRrD1h.js";import{u as O,z as f,L as T,t as S,D as $,b as j}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import{t as P}from"./getLocaleForTenant-DIj12PGu.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.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]="25aa12d1-2af3-4507-9532-9acbfc7286e2",t._sentryDebugIdIdentifier="sentry-dbid-25aa12d1-2af3-4507-9532-9acbfc7286e2")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,I=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,I=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=j(c,p);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:I}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>k(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&S.shouldFetchActiveTenant(e)&&(h.current=!0,S.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,I=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&I&&S.shouldFetchAllTenants()&&(r.current=!0,S.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||($.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],G={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-C7eUBEYW.js → DomesticWireDetailScreen-Dcgzj1nk.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-CqGMBzbB.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-DMKpdX6V.js";import{Mc as k,Mj as _,fz as J,fy as K,fx as L,im as W,Jk as q,pv as Q,eN as V,LK as D,ik as T,Md as v,Mm as F,ii as G,iG as j}from"./zeni-epic-state-dcVRrD1h.js";import{bn as X,r as N,p as R,z as U,h as z,w as p,m as S,B as M,bo as Y,o as O,bp as ee,y as te}from"./index-B-S1sw2q.js";import{n as Z}from"./mui-C4peJOR0.js";import"./sentry-By_w3AbQ.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]="0de73331-9ad8-49dc-a6d7-7586bfbc6014",e._sentryDebugIdIdentifier="sentry-dbid-0de73331-9ad8-49dc-a6d7-7586bfbc6014")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(L(n,"BillPayVendor"))},onResendOtp:n=>{e(K(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(J(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(X);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=Z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-CqGMBzbB.js";import{r as l,F as c,h as f}from"./index-B-S1sw2q.js";import{D as p}from"./mui-C4peJOR0.js";import"./sentry-By_w3AbQ.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]="c50ea600-5f91-4292-ad12-9502dc38fbde",e._sentryDebugIdIdentifier="sentry-dbid-c50ea600-5f91-4292-ad12-9502dc38fbde")}catch{}})();const u={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)??u.drawerLeftMargin.valuePx(n),d=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-CqGMBzbB.js";import{a as d}from"./sentry-By_w3AbQ.js";import{j as A,h as B,u as q,l as J,g as l,N,k as F,n as W,o as _}from"./core-DMKpdX6V.js";import{Kr as z,eN as O,JQ as K,kq as M,Gz as k,Kw as R,Jj as V,jq as Y,GA as S,JV as $,JW as Q,Jl as H,Jk as L}from"./zeni-epic-state-dcVRrD1h.js";import{aN as U,c as X,w as Z,y as tt}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import{d as b}from"./decodeURIComponentSafe-kaKdrE3i.js";import{w as et}from"./withTransactionSidePanel-yqBBfrLp.js";import{e as at,b as nt}from"./routePaths-DwcIzItv.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";import"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import"./TransactionDetailScreen-CuOcn9Eq.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]="b154e75e-7c6b-4ae3-8120-84b34d3f2fe0",a._sentryDebugIdIdentifier="sentry-dbid-b154e75e-7c6b-4ae3-8120-84b34d3f2fe0")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=R(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:V(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:Y(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a($()),a(Q()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:w,entityNameEncoded:j}=J(),r=b(w??""),p=b(j??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),G=l(n=>O(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>K(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(M(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{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(W,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-zrWAZ6A-.js → ExpenseAutomationRoutes-G2jBVNVU.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-CqGMBzbB.js";import wn from"./NotFoundScreen-C_3ycSKf.js";import{a as o,b as Tt}from"./sentry-By_w3AbQ.js";import{n as De,S as xn}from"./mui-C4peJOR0.js";import{h as se,j as wt,u as qe,g as F,k as Rn,l as rt,n as Dn,o as je}from"./core-DMKpdX6V.js";import{eN as we,OK as Un,mv as Ce,fd as Fn,q6 as On,mN as xt,n6 as Rt,OL as Dt,ng as Bn,OM as Ut,mG as _n,pE as Vn,eY as he,ON as xe,s5 as Ft,Bg as Ot,OO as Bt,OP as Mn,pj as Ge,Ks as dt,Ku as jn,jt as zn,Kv as Ln,jA as $n,cU as qn,t8 as Je,jq as Gn,mT as _t,nl as Re,OQ as Jn,Jl as ut,Jk as Ae,OR as mt,jR as Nn,OS as Yn,OT as Kn,OU as Wn,OV as Zn,m_ as Hn,mL as ce,no as Pe,OW as Qn,OX as Xn,OY as ea,nv as ta,jE as na,jv as aa,OZ as oa,jD as ht,KC as sa,O_ as ca,O$ as ia,pf as la,oW as ra,nm as pe,oV as ze,P0 as da,P1 as ua,l8 as ma,bq as ha,l3 as pt,kR as pa,P2 as ga,gC as gt,fP as Ca,l0 as Sa,v1 as Ia,P3 as fa,nW as ka,nR as Ea,nV as va,nG as ya,P4 as ba,e$ as Vt,n9 as Aa,mW as Pa,fe as Ct,nq as Ta,P5 as wa,nn as Mt,P6 as xa,P7 as Ra,P8 as Da,P9 as Ua,Pa as St,pr as Fa,oM as Oa,Jj as Ba,jC as _a,Pb as Va,FA as Ma,jB as ja,e_ as za,ol as jt,oE as La,nk as It,np as $a,bC as qa,kZ as Ga,kW as Ja,Pc as Na,nF as ft,oC as kt,oA as Ya,oq as Ka,o5 as Wa,oD as Za,Pd as Ha,Pe as Qa,o9 as Xa,Pf as eo,n$ as to,o8 as no,o6 as ao,oH as oo}from"./zeni-epic-state-dcVRrD1h.js";import{p as zt,m as ge,c as z,y as H,N as Lt,cu as so,z as Ue,cv as co,ap as Te,cw as io,aP as Et,B as $t,cx as lo,am as Le,D as ro,cy as uo,U as mo,cz as ho,M as po,cA as go,cB as Co,A as So,j as Io,aJ as fo,b1 as ko,F as Eo,cC as vo}from"./index-B-S1sw2q.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import{c as Gt}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import{c as vt,C as yo}from"./TransactionDetailScreen-CuOcn9Eq.js";import{w as bo}from"./withTransactionSidePanel-yqBBfrLp.js";import{h as Ao,v as Po}from"./routePaths-DwcIzItv.js";import{g as $e}from"./accountMappingHelper-dHb9X7tX.js";import{D as To}from"./DrawerScreen-BIAu5bA1.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";import"./decodeURIComponentSafe-kaKdrE3i.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]="06ee52e3-3732-483c-84d6-51d9f90d7770",t._sentryDebugIdIdentifier="sentry-dbid-06ee52e3-3732-483c-84d6-51d9f90d7770")}catch{}})();const wo=()=>{const t=se(),l=wt(),P=qe(),f=F(d=>we(d)),{useFeatureGate:b}=zt(),{isFeatureEnabled:S}=b(ge.isRealtimeInsightsFeatureEnabled),s=F(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),i=F(d=>Un(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=qt({mobileExploreReferrer:"Month-End Close Overview"}),E=o.useCallback((d,w,Z=!1)=>{t(Ce({tenantId:w,period:{month:d.month,year:d.year},refreshViewInBackground:Z}))},[]),v=o.useCallback(d=>{const w=P.state?.referrer;i.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(d.month,d.year,i.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",i.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,w??null),t(Fn(f.tenantId,d))},[f.tenantId,i.monthEndCloseChecks?.auditSummary,i.monthEndCloseChecks?.reportEmailSentDate]),h=s[f.tenantId],O=o.useCallback(()=>{const d=P.state?.referrer;i.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(h.month,h.year,i.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",i.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),E(h,f.tenantId,!0)},[E,h,f.tenantId,i.monthEndCloseChecks?.auditSummary,i.monthEndCloseChecks?.reportEmailSentDate]),u=H(P.state?.pathnameStackToGoBack,P.pathname),g=o.useCallback(()=>{if(i.monthEndCloseChecks!=null&&h!=null){const d=i.monthEndCloseChecks.monthEndCloseCheckList.find(w=>w.progress<100);if(d!=null)return void l(`./${d.id}/${h.month}-${h.year}`,{state:{pathnameStackToGoBack:u,message:"comingFromOverview"}});l(`./month_end_insights/${h.month}-${h.year}`,{state:{pathnameStackToGoBack:u,message:"comingFromOverview"}})}},[i.monthEndCloseChecks,h]),{areTenantIdsInSync:T}=Lt();return Gt({isDataReady:i.fetchState==="Completed"}),o.useEffect(()=>{h!=null&&i.fetchState!=="In-Progress"&&i.fetchState!=="Completed"&&T&&E(h,f.tenantId)},[E,h,i.fetchState,f.tenantId,T]),o.useEffect(()=>{h!=null&&i.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&i.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(On(h))},[h,i.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect(()=>{const d=setInterval(()=>{i.fetchState!=="In-Progress"&&i.fetchState==="Completed"&&O()},3e5);return()=>clearInterval(d)},[i.fetchState]),o.useEffect(()=>{if(i.fetchState==="Completed"&&i.monthEndCloseChecks?.auditSummary!=null){const d=P.state?.referrer;z.trackMonthCloseAuditPage(i.selectedPeriod.month,i.selectedPeriod.year,i.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",i.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[i.fetchState,i.selectedPeriod,i.monthEndCloseChecks?.auditSummary,i.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(xo,{children:C.jsx(so,{monthEndCloseChecksView:i,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${h.month}-${h.year}`,{state:{pathnameStackToGoBack:u,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:g,onBackClick:()=>{l("../../dashboard")},onReload:O,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})})},xo=De.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-CqGMBzbB.js";import{a as r}from"./sentry-By_w3AbQ.js";import{Y as l,Z as p,_ as b,w as f}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import m from"./NotFoundScreen-C_3ycSKf.js";import{j as c,u}from"./core-DMKpdX6V.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="b9a83aa7-b690-4828-8ae7-7b69f878cdb8",a._sentryDebugIdIdentifier="sentry-dbid-b9a83aa7-b690-4828-8ae7-7b69f878cdb8")}catch{}})();const j=()=>{const a=c(),e=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=f(e.state?.pathnameStackToGoBack),d=n.poppedPathname??k();a(d,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(e.pathname);return o!=null?s.jsx(p,{menuItem:b(o),onDemoClick:t,onGoBack:i}):s.jsx(m,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{j as F};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-CqGMBzbB.js";import{l as w,k as x,j,u as y,h as Z,q as ee,g as D,N as te,n as ae,o as p}from"./core-DMKpdX6V.js";import{Ix as S,Iy as k,Iz as N,yT as $,yF as L,IA as C,IB as ne,IC as oe,yJ as ie,eO as v,yQ as se,yN as le}from"./zeni-epic-state-dcVRrD1h.js";import{r as g,o as r,s as re,c as I,i as E,v as de,w as ce,x as me,y as F,p as pe,m as ue,T as he,A as xe,h as ge,B as be,C as fe,I as we,S as ye,E as Se,F as ke,G as Ie}from"./index-B-S1sw2q.js";import{n as c}from"./mui-C4peJOR0.js";import b from"./NotFoundScreen-C_3ycSKf.js";import{a as P}from"./sentry-By_w3AbQ.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.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]="0518dec6-1da0-4884-b43b-40d272abe14e",e._sentryDebugIdIdentifier="sentry-dbid-0518dec6-1da0-4884-b43b-40d272abe14e")}catch{}})();const ve=c.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-CqGMBzbB.js";import{a as g}from"./sentry-By_w3AbQ.js";import{h as O,u as _,j as w,q as M,g as l,N as T}from"./core-DMKpdX6V.js";import{z as r,h as P,D as V,d as A,c as N,e as q,k as G,I as R,g as W}from"./index-B-S1sw2q.js";import{eN as $,Ii as B,Is as H,Ij as J,eO as K,fh as Q,Io as X,fG as Y,cS as Z,It as ee,Iu as te}from"./zeni-epic-state-dcVRrD1h.js";import{n as ne}from"./mui-C4peJOR0.js";import{u as se}from"./useDeviceId-DH6-WcAx.js";import{f as ae}from"./analyticsHelper-CQQBcwi_.js";import{t as ie}from"./getLocaleForTenant-DIj12PGu.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="bc4ea456-e862-49a1-bcdb-f043476450fb",t._sentryDebugIdIdentifier="sentry-dbid-bc4ea456-e862-49a1-bcdb-f043476450fb")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=O(),a=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),b=l(e=>B(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,f)))},[n,p,t,i,f,s?.zeniSessionId]),g.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(b.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,s,o,b,v,a.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),U=g.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=g.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(G,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:U,onVerifyOtp:F,onCancelVerifyDevice:j});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return u.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!D(n,p)||f==null||h==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|