@zeniai/web-app-ui 5.0.71-dev → 5.0.71-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-DkpE57wD.js → AddressRoutes-5CCOxTr2.js} +1 -1
- package/dist/assets/{AddressScreen-IPMb-Lqg.js → AddressScreen-CVaBIk3t.js} +1 -1
- package/dist/assets/{AiCfoScreen-DxwryQBf.js → AiCfoScreen-D6mvZyge.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-B33P7K39.js → BillPayApprovalRoutes-CIInRn04.js} +1 -1
- package/dist/assets/{BillPayRoutes-D2OQNHTr.js → BillPayRoutes-D_jxjd1M.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BI3GYpKu.js → BusinessVerificationPageScreen-DAwDD_bm.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DZTXpkWd.js → ChargeCardRoutes-DdYME33t.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-kKTXGF13.js → CompanyPassportScreen-D_8pLYfg.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CYS4bJsi.js → ConnectionAuthScreen-CriB39Xz.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-CFcE03ug.js → CustomerOnboardingAuthScreen-CBJhqd-i.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-jk197VvK.js → CustomerOnboardingRoutes-Dcw2XPmu.js} +1 -1
- package/dist/assets/{DashboardRoutes-Ckl1eEC2.js → DashboardRoutes-BhdPr2GF.js} +1 -1
- package/dist/assets/{DefaultTenantHome-TLtEW787.js → DefaultTenantHome-CkBWCCtz.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BkEDowN8.js → DomesticWireDetailScreen-Bf9aHic4.js} +1 -1
- package/dist/assets/{DrawerScreen-B_tMe04S.js → DrawerScreen-QCmmvlF6.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-DlKVqtyC.js → EntityDetailRoutes-DdwcJW7z.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-BqK3TSEk.js → ExpenseAutomationRoutes-DES_BtrB.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-aYYY9m7f.js → FeaturePreviewScreen-CaG7JnKZ.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BLaYeloO.js → MagicLinkRoutes-CR_jNPOw.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CUegQSoi.js → MagicLinkSignInScreen-4mWYkROk.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BDT0TmvR.js → MobileAppDrawer-D4ZBwL0S.js} +1 -1
- package/dist/assets/{NotFoundScreen-C4aqnA8_.js → NotFoundScreen-C5xQLNp5.js} +1 -1
- package/dist/assets/{NotificationRoutes-BblXuLTj.js → NotificationRoutes-AjC-eiyq.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-sykQomv8.js → OAuthConsentScreen-C0-WkjRa.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CBrTW5wX.js → PandLWithForecastRoutes-CvBf2XE1.js} +1 -1
- package/dist/assets/{PeopleRoutes-B9d9GdEF.js → PeopleRoutes-nf8deapU.js} +1 -1
- package/dist/assets/{PerformanceRoutes-BFJ-jyRc.js → PerformanceRoutes-CROn65HM.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DQkFbpJH.js → QBOConnectionScreen-2glPhn1w.js} +1 -1
- package/dist/assets/{ReferralListScreen-CyoB8VnU.js → ReferralListScreen-D-N3tpSF.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-B00fD8b9.js → ReimbursementApprovalRoutes-B4fBWBNF.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DMdpETrG.js → ReimbursementApprovalRuleDetailScreen-4bFMeUHK.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-u-qnVfy0.js → ReimbursementRoutes-BLD8FL8b.js} +1 -1
- package/dist/assets/{ReportsRoutes-CqNp_xpd.js → ReportsRoutes-D5xd8TtX.js} +1 -1
- package/dist/assets/{RewardsRoutes-R2VgDdnw.js → RewardsRoutes-B15SPUkv.js} +1 -1
- package/dist/assets/{ScreenRoutes-9MMqpDv8.js → ScreenRoutes-Bn70uOp_.js} +2 -2
- package/dist/assets/{SettingsRoutes-KHzSnNUm.js → SettingsRoutes-CPIUaVtM.js} +1 -1
- package/dist/assets/{SetupPagesScreen-Cdo59_U5.js → SetupPagesScreen-CQHQEfZR.js} +1 -1
- package/dist/assets/{SignInScreen-DX4DUgMU.js → SignInScreen-CXtJQb9R.js} +1 -1
- package/dist/assets/{SignOutScreen-DOTJzbce.js → SignOutScreen-DZEhFMYQ.js} +1 -1
- package/dist/assets/{TaskListScreen-C1G-Z2qb.js → TaskListScreen-BHrgKFiB.js} +1 -1
- package/dist/assets/{TaskRoutes-DeZTJnM4.js → TaskRoutes-DW3Iqk39.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-CxGTwTQr.js → TransactionDetailRoutes-DutRhuIK.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DbXqL9Dv.js → TransactionDetailScreen-efNQkWz4.js} +1 -1
- package/dist/assets/{TransactionListRoutes-r3XEp13P.js → TransactionListRoutes-DM1ZMmIL.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Cp7F7y4J.js → TreasuryRoutes-D5tqMpU5.js} +1 -1
- package/dist/assets/{VendorsRoutes-BBf47BBb.js → VendorsRoutes-DTKMi1Pl.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-BZsn9iwu.js → WiseConfirmationScreen-NT3jIc6M.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes--fSibHTb.js → ZeniAccountRoutes-C8L4BAwp.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BKbkGQh4.js → ZeniAccountStatementScreen-Bmtq5P9-.js} +1 -1
- package/dist/assets/{analyticsHelper-DUlInMOD.js → analyticsHelper-DBYfXkXK.js} +1 -1
- package/dist/assets/{getLocaleForTenant-C-vhBCTM.js → getLocaleForTenant-BKKkwx8r.js} +1 -1
- package/dist/assets/{index-CGS6zWWp.js → index-CU-O3XlP.js} +5 -5
- package/dist/assets/{routePaths-DZkWYInw.js → routePaths-D5WTdktl.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-Nsv7MqoG.js → useAskAiCfoHostNavButtonProps-C2KX1gk_.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-C86A67zi.js → useFetchSuggestedQuestionsWhenReady-BtBjAnV1.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-AyrSL871.js → useInitialThreadRequest-BmoUHeBa.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BmH5jBz_.js → withTransactionSidePanel-D68X8m-E.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-BdePShct.js";import{A as i}from"./AddressScreen-
|
|
1
|
+
import{j as e}from"./liveblocks-BdePShct.js";import{A as i}from"./AddressScreen-CVaBIk3t.js";import s from"./NotFoundScreen-C5xQLNp5.js";import"./sentry-CX_3yQh7.js";import{n as d,o as r}from"./core-C_ZreJAw.js";import"./zeni-epic-state-H6DZSSlf.js";import"./recharts-CHr9O26_.js";import"./index-CU-O3XlP.js";import"./mui-BtnH6ELy.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="7f1b944a-9a7d-4e6b-b1ef-dc3a07ec71ea",t._sentryDebugIdIdentifier="sentry-dbid-7f1b944a-9a7d-4e6b-b1ef-dc3a07ec71ea")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-BdePShct.js";import{a as b}from"./sentry-CX_3yQh7.js";import{j as T,h as _,u as j,l as E,g as B,k as M}from"./core-C_ZreJAw.js";import{Z as $,m as D,z as L,k as K,B as O,A as N,c as C,f as S,O as z,i as h,q as F}from"./index-
|
|
1
|
+
import{j as n}from"./liveblocks-BdePShct.js";import{a as b}from"./sentry-CX_3yQh7.js";import{j as T,h as _,u as j,l as E,g as B,k as M}from"./core-C_ZreJAw.js";import{Z as $,m as D,z as L,k as K,B as O,A as N,c as C,f as S,O as z,i as h,q as F}from"./index-CU-O3XlP.js";import{Jm as k,gN as J,eO as R,Jn as U,c1 as q,Jo as G,k7 as V}from"./zeni-epic-state-H6DZSSlf.js";import{n as H}from"./mui-BtnH6ELy.js";import Z from"./NotFoundScreen-C5xQLNp5.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]="fa5e5047-e2c0-4417-929f-aebbfbe4e495",e._sentryDebugIdIdentifier="sentry-dbid-fa5e5047-e2c0-4417-929f-aebbfbe4e495")}catch{}})();const Q=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-BdePShct.js";import{a as r}from"./sentry-CX_3yQh7.js";import{h as oe,j as ne,u as ie,g as V,l as re,k as le}from"./core-C_ZreJAw.js";import{Q as ce,cK as ue,z as de,Z as me,cL as pe,cM as fe,cN as he,cO as G,A as Se,c as U,U as j,cP as ge,cQ as Ce,f as be,a3 as ke,cR as we,W as Ie,s as Ee,q as $,aZ as Pe,cS as Te}from"./index-
|
|
1
|
+
import{j as h}from"./liveblocks-BdePShct.js";import{a as r}from"./sentry-CX_3yQh7.js";import{h as oe,j as ne,u as ie,g as V,l as re,k as le}from"./core-C_ZreJAw.js";import{Q as ce,cK as ue,z as de,Z as me,cL as pe,cM as fe,cN as he,cO as G,A as Se,c as U,U as j,cP as ge,cQ as Ce,f as be,a3 as ke,cR as we,W as Ie,s as Ee,q as $,aZ as Pe,cS as Te}from"./index-CU-O3XlP.js";import{fE as ye,f3 as W,eO as _e,hr as xe,PV as Ue,eN as ve,hB as Qe,hx as Ae,fu as Oe,fo as De,fh as Fe,fl as q,fp as Be,fq as Le,fr as Me,fs as Re,ft as Ne}from"./zeni-epic-state-H6DZSSlf.js";import{D as Ve,n as v,P as je,S as $e}from"./mui-BtnH6ELy.js";import{p as qe}from"./pathToGoBack-Bg0yBLYd.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="cec80e45-ae0c-4aa1-b366-b67cdf11d82b",s._sentryDebugIdIdentifier="sentry-dbid-cec80e45-ae0c-4aa1-b366-b67cdf11d82b")}catch{}})();const z="chat-response-generated",Ge=le(function(s,i){const a=W(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===z&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,c=Le(n.type),t=n.metadata.chat_session_id??null,{currentChatSession:I,currentQuestionAnswer:g,currentQuestionAnswerSummary:E}=G(S,t);c!=="answer"?U.trackAICFOChatResponseGenerated(c,g?.question.questionText??"",n.text,t,Te(E,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,Me(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&&Pe(s,e,o,f,S,d,c,n)},updateCurrentInput:e=>{s(q(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Be(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{p(-1)},onCloseClick:()=>{const e=$(a.state?.pathnameStackToGoBack),o=e.poppedPathname??qe(1);p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack}}),s(q(""))},togglePageView:()=>{const e=$(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=Ee(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=V(u=>W(u)),e=de.getSignedInUser(),{session_id:o}=re(),n=me(),c=V(u=>_e(u)),t=l.uiState.currentChatSessionId,I=c.tenantEmailDomain,{handleUploadPromoClose:g,isUploadPromoVisible:E}=pe({isFileUploadEnabled:s,tenantEmailDomain:I}),Q=fe({currentTenant:c,currentChatSessionId:t,aiCfoView:l}),C=d.state,b=C?.aiCfoInitialQuestion,A=!!C?.aiCfoShouldSubmit,[H,P]=r.useState(null),[K,T]=r.useState(!1),O=r.useRef(!1);r.useEffect(()=>{O.current||b==null||b===""||(P(b),T(A),O.current=!0)},[b,A]);const Y=r.useCallback(()=>{P(null),T(!1)},[]),D=r.useMemo(()=>new URLSearchParams(d.search),[d.search]),F=D.get("ref")??C?.aiCfoRef,y=D.get("emailRefId")??C?.aiCfoEmailRefId,B=r.useRef(!1);r.useEffect(()=>{B.current||F!=="month-end-email"||y==null||t!=null||e==null||(a(xe("controller",e.userId,y,"MONTH_END_EMAIL")),B.current=!0)},[F,y,t,a,e]);const k=l.uiState.lastContextMessage;r.useEffect(()=>{k!=null&&k!==""&&t!=null&&(P(k),T(!0),a(Ue()))},[k,t,a]);const Z=c.masterTOSInfo,w=Z?.isMasterTOSAccepted??!1,{visitedSessions:L}=he(t),_=l.fetchState,x=l.uiState.chatSessionsNextPageToken.hasMore||!l.uiState.chatSessionsFirstPageFetched,M=t!=null?l.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",R=t==null||(l.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),N=l.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:X}=G(N,t),J=X.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:L.map(u=>`private-encrypted-chat-${u}.${z}`),eventCallback:(u,se,ae)=>ae.onEventReceived(u,se)}),[L]);if(r.useEffect(()=>{_!=="In-Progress"&&x&&a(Qe())},[_,x,a]),r.useEffect(()=>{t!=null&&M!=="In-Progress"&&R&&e!=null&&_==="Completed"&&!x&&a(Ae(t,e.userId))},[M,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(ze,{children:[h.jsx(Se,{analytics:U,onLoad:u=>u.trackPageLoaded(be.Event.aiCFOPage)}),j(n)&&Q.drawerElement,h.jsx(Ge,{...ee,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:o,location:d,isSubmitting:te,isEmptyChatWithSession:J,customPageTitle:S,currentTenant:c,emailLinkQuestion:H??void 0,autoSubmitEmailLinkQuestion:K,onEmailLinkQuestionProcessed:Y,onMenuClick:j(n)?Q.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:E,onUploadPromoClose:g}),h.jsx(Ve,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:He,style:{width:`${ge}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(We,{onClick:u=>u.stopPropagation(),children:h.jsx(Ce,{isTOSAccepted:w,acceptMasterTOSState:l.masterTOSAcceptanceState,customPageTitle:S,onCloseClick:()=>f(!1),onCompleteClick:()=>{w||c.userRoleId==null||a(Oe(c.userRoleId)),f(!1)}})})})]})},We=v($e)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-BdePShct.js";import{a as y}from"./sentry-CX_3yQh7.js";import{j as B,u as U,h as j,g as f,N as $,k as T,l as O,n as F,o as h}from"./core-C_ZreJAw.js";import{eO as N,MF as A,Ml as b,x9 as w,x3 as L,x7 as x,wY as M,Mn as z,w$ as W,xb as q,xa as C}from"./zeni-epic-state-H6DZSSlf.js";import{m as P,z as k,B as V,a3 as Y,bz as G,ac as _,bA as H}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-BdePShct.js";import{a as y}from"./sentry-CX_3yQh7.js";import{j as B,u as U,h as j,g as f,N as $,k as T,l as O,n as F,o as h}from"./core-C_ZreJAw.js";import{eO as N,MF as A,Ml as b,x9 as w,x3 as L,x7 as x,wY as M,Mn as z,w$ as W,xb as q,xa as C}from"./zeni-epic-state-H6DZSSlf.js";import{m as P,z as k,B as V,a3 as Y,bz as G,ac as _,bA as H}from"./index-CU-O3XlP.js";import"./mui-BtnH6ELy.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-4bFMeUHK.js";import K from"./NotFoundScreen-C5xQLNp5.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]="938536ab-ccac-4424-be12-7857793b062a",e._sentryDebugIdIdentifier="sentry-dbid-938536ab-ccac-4424-be12-7857793b062a")}catch{}})();const I="bill-approval-rule-update",Q=T(function(e){return{approvalView:A(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:n}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(z(!1))},onBackClick:()=>{_(n)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(M(a))},onEditRuleClick:a=>{a!=null?(e(x(a)),t(`./${a}/edit`)):(e(x()),t("./new"))}}})(Y(G)),X=()=>{const e=B(),o=U(),t=j(),[n,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),p=f(i=>i.billPaySetupApproverViewState.fetchState),c=f(i=>N(i)),r=f(i=>A(i)),g=f(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(w())},[g]),y.useEffect(()=>{n||p!=="Not-Started"||(a(!0),t(L(!0)))},[n,p,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-encrypted-${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(V,{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=b(e),n=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=n==="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:n}},function(e,o){const{navigate:t,approvalUpdateDataView:n,approverViewData:a,approvalRuleId:u}=o,s=n.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:p=>{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:p.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:p.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:p.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:p.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(p.steps),isApplicableOnPendingApprovalEntity:p.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:n}=O(),a=k.getSignedInUser(),u=P(),s=f(r=>b(r)),d=f(r=>A(r)),[p,c]=y.useState(!1);if(y.useEffect(()=>{p||(c(!0),o(W(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(n!=null?"../../":"../")},[d,n]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:n,approverViewData:d,location:t})}function se(){return l.jsxs(F,{children:[l.jsx(h,{path:"/",element:l.jsx(X,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(K,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BdePShct.js";import{j as K,h as se,u as X,l as ae,g as v,N as te,k as Y,i as na,n as ia,o as S}from"./core-C_ZreJAw.js";import{eO as Z,LX as Ue,bv as It,GS as oa,bo as wt,bE as pe,LY as xt,wt as Bt,xD as Ve,x0 as la,bn as De,LZ as sa,L_ as ra,c1 as ca,L$ as da,jr as Ct,M0 as At,M1 as Et,yc as _e,wI as Ce,M2 as ua,wh as tt,M3 as pa,Bo as ma,wl as ba,wr as Dt,M4 as ke,M5 as Ge,xE as Oe,M6 as ha,M7 as ga,xH as Ne,M8 as ya,xU as Sa,M9 as jt,xo as at,xt as fa,Ma as ka,Mb as ue,Mc as Tt,Md as Pt,Me as Ft,fI as va,wN as $e,cw as Rt,Mf as Ia,gD as wa,Mg as xa,Mh as Ba,eU as Mt,eS as Vt,Mi as ze,Mj as Ca,Mk as Aa,JG as Ze,Ml as Ea,JH as oe,JI as He,Mm as Da,Mn as ja,Mo as Ta,xv as nt,xs as Pa,Mp as Fa,Mq as Ra,Mr as Ma,xe as Va,Ms as $a,Mt as La,Mu as Ua,ck as $t,cM as Lt,jC as _a,bK as Ga,bq as Ut,bL as _t,vz as Oa,Mv as Na,Bb as za,Bh as Za,s6 as Ha,xF as Wa,yj as qa,jP as fe,Mw as Ja,Mx as Gt,kh as Ka,jJ as Ot,k2 as Nt,k1 as it,bD as be,bJ as Xa,My as Ya,Mz as ve,il as Qa,MA as ot,MB as en,iq as tn,iL as an,yx as nn,MC as on,ka as ln,yn as sn,MD as lt,yr as rn,yw as cn,yt as dn,yl as un,ME as zt,wC as pn,MF as mn,MG as bn,fA as hn,fz as gn,fy as yn,jS as Sn,k8 as st,kj as fn,pF as kn,j$ as vn,yp as In,iw as wn,ko as xn,MH as Bn,io as Cn,pw as An,MI as En,xk as Dn,bF as jn,bs as Tn,IC as Pn,cO as Fn,cN as Rn,cv as Mn,cB as Vn}from"./zeni-epic-state-H6DZSSlf.js";import{m as me,z as M,k as Ie,y as le,$ as y,aK as Ae,B as re,o as A,A as je,c as D,b6 as $n,q as z,W as We,s as E,Z as we,b7 as rt,b8 as ct,b9 as Ln,ah as Un,G as _n,aE as Gn,E as Zt,D as qe,H as Je,ba as On,aq as Ht,bb as Nn,R as zn,f as Wt,a3 as Zn,bc as Hn,bd as Wn,be as qn,bf as Jn,bg as Kn,bh as Xn,bi as Yn,bj as Qn,bk as ei,V as ti,bl as ai,b2 as ni,bm as ii,bn as oi,a6 as li}from"./index-CGS6zWWp.js";import{n as L,S as si}from"./mui-BtnH6ELy.js";import{A as dt}from"./AddressScreen-IPMb-Lqg.js";import{g as ie,a as Te,i as qt,V as Ke,b as Xe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-BkEDowN8.js";import{a as f}from"./sentry-CX_3yQh7.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-C86A67zi.js";import{u as Jt}from"./useInitialThreadRequest-AyrSL871.js";import Ee from"./NotFoundScreen-C4aqnA8_.js";import{D as ui}from"./DrawerScreen-B_tMe04S.js";import{M as Kt}from"./MobileAppDrawer-BDT0TmvR.js";import{F as Xt}from"./FeaturePreviewScreen-aYYY9m7f.js";import{S as Pe}from"./SetupPagesScreen-Cdo59_U5.js";import{B as pi}from"./BillPayApprovalRoutes-B33P7K39.js";import{FallBackRoute as mi}from"./ScreenRoutes-9MMqpDv8.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./analyticsHelper-DUlInMOD.js";import"./routePaths-DZkWYInw.js";import"./BusinessVerificationPageScreen-BI3GYpKu.js";import"./ReimbursementApprovalRuleDetailScreen-DMdpETrG.js";import"./getLocaleForTenant-C-vhBCTM.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]="c9c7a035-5df7-447e-bbf6-d38c12d656c7",e._sentryDebugIdIdentifier="sentry-dbid-c9c7a035-5df7-447e-bbf6-d38c12d656c7")}catch{}})();const bi=Y(function(e,t){const l=Ue(e,t.billId),i=M.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=X(),{billId:i}=ae(),c=me(),r=M.getSignedInUser(),u=Ie(),o=v(O=>Z(O)),s=v(O=>Ue(O,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}=Ye({mobileExploreReferrer:"Bill Details"});Qe({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:U}=le(),{isFeatureEnabled:V}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=U(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:Q}=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(O=>O.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,$,Q,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:O=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(O)}),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=Y(function(e,t){const l=M.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=M.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Ne(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Oe(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=X(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=M.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,U]=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=>Ue(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],$=!1);const Q=C.billPayInfo!=null&&C.billPayInfo.stage.code==="pending_approval"?C.billPayInfo.billStatus.code:C.billStage;f.useEffect(()=>{i==null&&t(Oe(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?U(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(U(!0),t(Ve(!1,h,j,b,i)))),u&&!T&&(U(!0),t(Ve(!1,h,j,b,i)))},[B,T,u,i,t]);const O={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Ne(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",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:Q}),a.jsx(Me,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||$?null:a.jsx(pt,{children:a.jsx(Yt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Ln,{}),a.jsx(Me,{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(Un,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:O,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(Me,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=On();return a.jsx(Yt,{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-BdePShct.js";import{j as K,h as se,u as X,l as ae,g as v,N as te,k as Y,i as na,n as ia,o as S}from"./core-C_ZreJAw.js";import{eO as Z,LX as Ue,bv as It,GS as oa,bo as wt,bE as pe,LY as xt,wt as Bt,xD as Ve,x0 as la,bn as De,LZ as sa,L_ as ra,c1 as ca,L$ as da,jr as Ct,M0 as At,M1 as Et,yc as _e,wI as Ce,M2 as ua,wh as tt,M3 as pa,Bo as ma,wl as ba,wr as Dt,M4 as ke,M5 as Ge,xE as Oe,M6 as ha,M7 as ga,xH as Ne,M8 as ya,xU as Sa,M9 as jt,xo as at,xt as fa,Ma as ka,Mb as ue,Mc as Tt,Md as Pt,Me as Ft,fI as va,wN as $e,cw as Rt,Mf as Ia,gD as wa,Mg as xa,Mh as Ba,eU as Mt,eS as Vt,Mi as ze,Mj as Ca,Mk as Aa,JG as Ze,Ml as Ea,JH as oe,JI as He,Mm as Da,Mn as ja,Mo as Ta,xv as nt,xs as Pa,Mp as Fa,Mq as Ra,Mr as Ma,xe as Va,Ms as $a,Mt as La,Mu as Ua,ck as $t,cM as Lt,jC as _a,bK as Ga,bq as Ut,bL as _t,vz as Oa,Mv as Na,Bb as za,Bh as Za,s6 as Ha,xF as Wa,yj as qa,jP as fe,Mw as Ja,Mx as Gt,kh as Ka,jJ as Ot,k2 as Nt,k1 as it,bD as be,bJ as Xa,My as Ya,Mz as ve,il as Qa,MA as ot,MB as en,iq as tn,iL as an,yx as nn,MC as on,ka as ln,yn as sn,MD as lt,yr as rn,yw as cn,yt as dn,yl as un,ME as zt,wC as pn,MF as mn,MG as bn,fA as hn,fz as gn,fy as yn,jS as Sn,k8 as st,kj as fn,pF as kn,j$ as vn,yp as In,iw as wn,ko as xn,MH as Bn,io as Cn,pw as An,MI as En,xk as Dn,bF as jn,bs as Tn,IC as Pn,cO as Fn,cN as Rn,cv as Mn,cB as Vn}from"./zeni-epic-state-H6DZSSlf.js";import{m as me,z as M,k as Ie,y as le,$ as y,aK as Ae,B as re,o as A,A as je,c as D,b6 as $n,q as z,W as We,s as E,Z as we,b7 as rt,b8 as ct,b9 as Ln,ah as Un,G as _n,aE as Gn,E as Zt,D as qe,H as Je,ba as On,aq as Ht,bb as Nn,R as zn,f as Wt,a3 as Zn,bc as Hn,bd as Wn,be as qn,bf as Jn,bg as Kn,bh as Xn,bi as Yn,bj as Qn,bk as ei,V as ti,bl as ai,b2 as ni,bm as ii,bn as oi,a6 as li}from"./index-CU-O3XlP.js";import{n as L,S as si}from"./mui-BtnH6ELy.js";import{A as dt}from"./AddressScreen-CVaBIk3t.js";import{g as ie,a as Te,i as qt,V as Ke,b as Xe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-Bf9aHic4.js";import{a as f}from"./sentry-CX_3yQh7.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-C2KX1gk_.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-BtBjAnV1.js";import{u as Jt}from"./useInitialThreadRequest-BmoUHeBa.js";import Ee from"./NotFoundScreen-C5xQLNp5.js";import{D as ui}from"./DrawerScreen-QCmmvlF6.js";import{M as Kt}from"./MobileAppDrawer-D4ZBwL0S.js";import{F as Xt}from"./FeaturePreviewScreen-CaG7JnKZ.js";import{S as Pe}from"./SetupPagesScreen-CQHQEfZR.js";import{B as pi}from"./BillPayApprovalRoutes-CIInRn04.js";import{FallBackRoute as mi}from"./ScreenRoutes-Bn70uOp_.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./analyticsHelper-DBYfXkXK.js";import"./routePaths-D5WTdktl.js";import"./BusinessVerificationPageScreen-DAwDD_bm.js";import"./ReimbursementApprovalRuleDetailScreen-4bFMeUHK.js";import"./getLocaleForTenant-BKKkwx8r.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]="c9c7a035-5df7-447e-bbf6-d38c12d656c7",e._sentryDebugIdIdentifier="sentry-dbid-c9c7a035-5df7-447e-bbf6-d38c12d656c7")}catch{}})();const bi=Y(function(e,t){const l=Ue(e,t.billId),i=M.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=X(),{billId:i}=ae(),c=me(),r=M.getSignedInUser(),u=Ie(),o=v(O=>Z(O)),s=v(O=>Ue(O,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}=Ye({mobileExploreReferrer:"Bill Details"});Qe({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:U}=le(),{isFeatureEnabled:V}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=U(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:Q}=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(O=>O.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,$,Q,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:O=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(O)}),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=Y(function(e,t){const l=M.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=M.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Ne(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Oe(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=X(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=M.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,U]=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=>Ue(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],$=!1);const Q=C.billPayInfo!=null&&C.billPayInfo.stage.code==="pending_approval"?C.billPayInfo.billStatus.code:C.billStage;f.useEffect(()=>{i==null&&t(Oe(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?U(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(U(!0),t(Ve(!1,h,j,b,i)))),u&&!T&&(U(!0),t(Ve(!1,h,j,b,i)))},[B,T,u,i,t]);const O={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Ne(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",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:Q}),a.jsx(Me,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||$?null:a.jsx(pt,{children:a.jsx(Yt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Ln,{}),a.jsx(Me,{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(Un,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:O,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(Me,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=On();return a.jsx(Yt,{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=L.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-BdePShct.js";import{a as V}from"./sentry-CX_3yQh7.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-C_ZreJAw.js";import{k as ce,y as ue,aK as de,z as E,A as pe,c as M,ac as x,f as z,bv as le,aq as me,s as B,ar as R}from"./index-
|
|
1
|
+
import{j as k}from"./liveblocks-BdePShct.js";import{a as V}from"./sentry-CX_3yQh7.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-C_ZreJAw.js";import{k as ce,y as ue,aK as de,z as E,A as pe,c as M,ac as x,f as z,bv as le,aq as me,s as B,ar as R}from"./index-CU-O3XlP.js";import{Mt as fe,eO as G,rx as ye,GW as Se,xe as ge,zX as Ie,Cu as he,D7 as be,E0 as De,MQ as Oe,MR as Te,MS as ke,MT as Ce,MU as Ve,Jn as we,LS as Ae,Jz as Ne,k7 as _e,fA as Fe,fz as ve,fy as xe,pF as ze,pw as Ee,pt as Me,j$ as Be,rG as Re,rE as P,bD as L,rS as U,cu as Pe}from"./zeni-epic-state-H6DZSSlf.js";import{n as Le}from"./mui-BtnH6ELy.js";import{c as j}from"./routePaths-D5WTdktl.js";import{M as Ue}from"./MobileAppDrawer-D4ZBwL0S.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]="9bff8de9-8922-4eba-9221-1067561c4831",e._sentryDebugIdIdentifier="sentry-dbid-9bff8de9-8922-4eba-9221-1067561c4831")}catch{}})();const je=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-BdePShct.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 ut,n as Wt,o as te}from"./core-C_ZreJAw.js";import{eO as ie,bs as Re,Ok as ka,eS as be,eT as ye,eU as Se,fP as $e,cr as Ge,Ol as Ye,Om as Ma,sM as ba,jz as ya,On as Sa,gD as oa,ze as Je,zg as za,zh as $a,jp as mt,Oo as Ze,z2 as Ct,Op as qt,Oq as Qt,z5 as Da,Or as Xt,MN as _a,qY as pt,zb as Ga,gO as Jt,Os as ht,Ot as Ke,bq as en,Ou as an,fA as wa,fz as Pa,zL as tn,fy as Ta,Mt as nn,Ov as ft,ck as gt,cM as rn,MM as da,Al as sn,Ow as tt,zX as Fa,Ox as bt,Am as on,Nb as cn,An as dn,Bh as ln,s6 as un,Bb as mn,zw as yt,zp as Cn,Oy as pn,fR as hn,zF as St,zJ as It,fQ as fn,Oz as gn,A7 as At,OA as bn,OB as yn,OC as Sn,zH as Et,zs as kt,z8 as Dt,zB as _t,zz as wt,zD as In,zf as nt,OD as Pt,OE as va,zU as Ia,Js as Tt,cN as Ya,OF as An,OG as En,OH as kn,OI as Dn,zR as Na,Ae as _n,Aa as wn,zN as Pn,Ac as Tn,A2 as Fn,A4 as vn,OJ as Ft,Ak as vt,GS as xn,OK as On,OL as Bn,OM as Ln,ON as xt,OO as Rn,AH as Un,zW as Ot,zQ as ca,zV as jn,OP as Nn,OQ as Vn,y$ as Hn,OR as Bt,OS as Lt,OT as Mn,z1 as zn,z0 as rt,OU as $n,OV as Gn,OW as Yn,Jo as Zn,OX as Za,OY as Kn,vC as Rt,k7 as Wn,gE as qn,AM as Qn,OZ as Ut,O_ as Xn,AN as Jn,O$ as er,dd as ar,sG as tr,AC as nr,Aw as Le,bv as rr,bE as sr,cw as or,bF as cr,IC as ir}from"./zeni-epic-state-H6DZSSlf.js";import{z as J,k as je,y as ce,$ as Y,B as la,bZ as xa,c8 as dr,q as ve,c9 as lr,ca as ur,Z as ua,aK as Fe,s as fe,bg as Ka,cb as mr,E as ma,i as Oa,m as Wa,c as Q,D as qa,cc as Cr,an as Qa,bs as Qe,cd as Va,ce as pr,A as Xa,a3 as hr,cf as fr,aq as jt,W as Ha,R as Nt,f as Vt,cg as gr,ch as br,ci as yr,cj as Sr,ck as Ir,cl as Ar,o as Aa,cm as Er,cn as kr,co as Ra,V as Dr,cp as _r,cq as wr,cr as Pr,cs as Tr,ct as Fr,a6 as vr}from"./index-CGS6zWWp.js";import{n as _e,D as Ht,S as xr}from"./mui-BtnH6ELy.js";import{a as i}from"./sentry-CX_3yQh7.js";import{g as Ce,a as Ca,b as Mt,c as Ie,d as Ae,e as Ue,f as Ne,A as Or,h as Ja,P as Br,i as et,s as Xe,j as zt,k as Me,l as $t,m as Lr,n as Gt,p as Rr,S as st}from"./SetupPagesScreen-Cdo59_U5.js";import Ba from"./NotFoundScreen-C4aqnA8_.js";import{M as ze}from"./MobileAppDrawer-BDT0TmvR.js";import{u as Yt}from"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import{c as Zt}from"./useFetchSuggestedQuestionsWhenReady-C86A67zi.js";import{v as ot}from"./utils-Dw8b4HCO.js";import{t as Ur}from"./AddressScreen-IPMb-Lqg.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./analyticsHelper-DUlInMOD.js";import"./routePaths-DZkWYInw.js";import"./BusinessVerificationPageScreen-BI3GYpKu.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]="d0e4b070-55f8-4726-9d87-bef632fb7f4a",e._sentryDebugIdIdentifier="sentry-dbid-d0e4b070-55f8-4726-9d87-bef632fb7f4a")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=J.getSignedInUser(),n=y(X=>ie(X)),C=je(),p=Re(C?.loggedInUserRoleMap),{useFeatureGate:u}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(X=>ka(X).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(R,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(X=>$e(X,n.companyId)),N=Ge(v.controllers),{creditAccount:B,creditAccountRepayment:P}=y(X=>Ye(X)),V=y(X=>X.classListState.fetchState),m=!_&&d&&f,l=y(X=>Ma(X,t,m,d)),[w,T]=i.useState(!1),H=l.chargeCard,L=H?.cardCreatedByUser?.userId,K=y(X=>L!=null?ba(X.userRoleState,L):void 0),I=K?.accountingClassIDs[0],O=y(X=>I!=null?ya(X.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,U=y(X=>j!=null?ba(X.userRoleState,j):void 0),W=U?.accountingClassIDs[0],E=y(X=>W!=null?ya(X.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(Je(t,m,!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 X=Ce(n.tenantEmailDomain,t,r,H,c);e(X)}},[l.fetchState,c,G]),i.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&d&&f&&p&&a(za()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&d&&f&&p&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(mt())},[B.fetchState,P.fetchState,a,d,f,p,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const X=Ce(n.tenantEmailDomain,t,r);e(X)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Ue(d,g,D,f),ae=Ca(d,f,p,B,P),ne=Mt(x,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(dr,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:N,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:B,classListFetchState:V,creditAccountRepayment:P,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:O?.className,cardHolderRoles:U?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ze(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(qt({uiState:{sortKey:t,sortOrder:a}}))}}})(ur);function Vr(){const e=le(),t=ue(),a=ge(),r=J.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ze(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??Hr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{C||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(p(!0),t(Ct()))},[C,u,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return u.fetchState==="In-Progress"?s.jsx(lr,{onBackClick:S}):u.cashbackSummary.cashbackEarned.amount===0&&u.fetchState==="Completed"?s.jsx(Ba,{}):s.jsx(Nr,{onBackClick:S})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new ma(100,58)},zr=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ia(),C=ge(),{useDynamicConfig:p}=ce(),[u,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,R]=i.useState(!1),F=J.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}=p(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:N}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:B}=v(Y.isDebitCardFeatureEnabled),P=Se(B,k),V=Ie({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:P}),m=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),w=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,L=Ae({isCardsOnlyTenant:w,isChargeCardFeatureEnabled:N,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&L&&m;i.useEffect(()=>{u===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Je(n,K,L)))},[o,g.fetchState,u,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(C.state?.pathnameStackToGoBack,C.pathname);r(E,{state:{pathnameStackToGoBack:G}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Xt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:G}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const O=J.getZeniOtpTokenForCardHolder(n),j=y(E=>pt(E.userState,F.userId)),U=()=>{d?.status?.code!=="active"&&a(Ga(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(U,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{R(E)};if(D!=="Completed"||d==null)return s.jsx(la,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Yr,{children:[s.jsx(ze,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx($r,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:O,navigate:r,currentTenant:k,location:C,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(Gr,{windowSize:t,children:e}):null]})},$r=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const C=Jt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ke(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(en())||c,showMenuIcon:o,shippingAddress:C,vgsVaultId:Oa.cardVaultId,twoFAView:p,activationWaitStatus:u,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,chargeCardDetailState:p}=t,u=p.chargeCard?.cardProviderID,{tenantEmailDomain:S}=C;return{onGetOtp:o=>{u!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(tn(r,o))},onResendOtp:o=>{u!=null&&e(Pa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{u!=null&&e(wa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&J.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(an({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}})}}})(mr),Gr=_e.div`
|
|
1
|
+
import{j as s}from"./liveblocks-BdePShct.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 ut,n as Wt,o as te}from"./core-C_ZreJAw.js";import{eO as ie,bs as Re,Ok as ka,eS as be,eT as ye,eU as Se,fP as $e,cr as Ge,Ol as Ye,Om as Ma,sM as ba,jz as ya,On as Sa,gD as oa,ze as Je,zg as za,zh as $a,jp as mt,Oo as Ze,z2 as Ct,Op as qt,Oq as Qt,z5 as Da,Or as Xt,MN as _a,qY as pt,zb as Ga,gO as Jt,Os as ht,Ot as Ke,bq as en,Ou as an,fA as wa,fz as Pa,zL as tn,fy as Ta,Mt as nn,Ov as ft,ck as gt,cM as rn,MM as da,Al as sn,Ow as tt,zX as Fa,Ox as bt,Am as on,Nb as cn,An as dn,Bh as ln,s6 as un,Bb as mn,zw as yt,zp as Cn,Oy as pn,fR as hn,zF as St,zJ as It,fQ as fn,Oz as gn,A7 as At,OA as bn,OB as yn,OC as Sn,zH as Et,zs as kt,z8 as Dt,zB as _t,zz as wt,zD as In,zf as nt,OD as Pt,OE as va,zU as Ia,Js as Tt,cN as Ya,OF as An,OG as En,OH as kn,OI as Dn,zR as Na,Ae as _n,Aa as wn,zN as Pn,Ac as Tn,A2 as Fn,A4 as vn,OJ as Ft,Ak as vt,GS as xn,OK as On,OL as Bn,OM as Ln,ON as xt,OO as Rn,AH as Un,zW as Ot,zQ as ca,zV as jn,OP as Nn,OQ as Vn,y$ as Hn,OR as Bt,OS as Lt,OT as Mn,z1 as zn,z0 as rt,OU as $n,OV as Gn,OW as Yn,Jo as Zn,OX as Za,OY as Kn,vC as Rt,k7 as Wn,gE as qn,AM as Qn,OZ as Ut,O_ as Xn,AN as Jn,O$ as er,dd as ar,sG as tr,AC as nr,Aw as Le,bv as rr,bE as sr,cw as or,bF as cr,IC as ir}from"./zeni-epic-state-H6DZSSlf.js";import{z as J,k as je,y as ce,$ as Y,B as la,bZ as xa,c8 as dr,q as ve,c9 as lr,ca as ur,Z as ua,aK as Fe,s as fe,bg as Ka,cb as mr,E as ma,i as Oa,m as Wa,c as Q,D as qa,cc as Cr,an as Qa,bs as Qe,cd as Va,ce as pr,A as Xa,a3 as hr,cf as fr,aq as jt,W as Ha,R as Nt,f as Vt,cg as gr,ch as br,ci as yr,cj as Sr,ck as Ir,cl as Ar,o as Aa,cm as Er,cn as kr,co as Ra,V as Dr,cp as _r,cq as wr,cr as Pr,cs as Tr,ct as Fr,a6 as vr}from"./index-CU-O3XlP.js";import{n as _e,D as Ht,S as xr}from"./mui-BtnH6ELy.js";import{a as i}from"./sentry-CX_3yQh7.js";import{g as Ce,a as Ca,b as Mt,c as Ie,d as Ae,e as Ue,f as Ne,A as Or,h as Ja,P as Br,i as et,s as Xe,j as zt,k as Me,l as $t,m as Lr,n as Gt,p as Rr,S as st}from"./SetupPagesScreen-CQHQEfZR.js";import Ba from"./NotFoundScreen-C5xQLNp5.js";import{M as ze}from"./MobileAppDrawer-D4ZBwL0S.js";import{u as Yt}from"./useAskAiCfoHostNavButtonProps-C2KX1gk_.js";import{c as Zt}from"./useFetchSuggestedQuestionsWhenReady-BtBjAnV1.js";import{v as ot}from"./utils-Dw8b4HCO.js";import{t as Ur}from"./AddressScreen-CVaBIk3t.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./analyticsHelper-DBYfXkXK.js";import"./routePaths-D5WTdktl.js";import"./BusinessVerificationPageScreen-DAwDD_bm.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]="d0e4b070-55f8-4726-9d87-bef632fb7f4a",e._sentryDebugIdIdentifier="sentry-dbid-d0e4b070-55f8-4726-9d87-bef632fb7f4a")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=J.getSignedInUser(),n=y(X=>ie(X)),C=je(),p=Re(C?.loggedInUserRoleMap),{useFeatureGate:u}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(X=>ka(X).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(R,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(X=>$e(X,n.companyId)),N=Ge(v.controllers),{creditAccount:B,creditAccountRepayment:P}=y(X=>Ye(X)),V=y(X=>X.classListState.fetchState),m=!_&&d&&f,l=y(X=>Ma(X,t,m,d)),[w,T]=i.useState(!1),H=l.chargeCard,L=H?.cardCreatedByUser?.userId,K=y(X=>L!=null?ba(X.userRoleState,L):void 0),I=K?.accountingClassIDs[0],O=y(X=>I!=null?ya(X.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,U=y(X=>j!=null?ba(X.userRoleState,j):void 0),W=U?.accountingClassIDs[0],E=y(X=>W!=null?ya(X.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(Je(t,m,!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 X=Ce(n.tenantEmailDomain,t,r,H,c);e(X)}},[l.fetchState,c,G]),i.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&d&&f&&p&&a(za()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&d&&f&&p&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(mt())},[B.fetchState,P.fetchState,a,d,f,p,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const X=Ce(n.tenantEmailDomain,t,r);e(X)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Ue(d,g,D,f),ae=Ca(d,f,p,B,P),ne=Mt(x,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(dr,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:N,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:B,classListFetchState:V,creditAccountRepayment:P,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:O?.className,cardHolderRoles:U?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ze(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(qt({uiState:{sortKey:t,sortOrder:a}}))}}})(ur);function Vr(){const e=le(),t=ue(),a=ge(),r=J.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ze(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??Hr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{C||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(p(!0),t(Ct()))},[C,u,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return u.fetchState==="In-Progress"?s.jsx(lr,{onBackClick:S}):u.cashbackSummary.cashbackEarned.amount===0&&u.fetchState==="Completed"?s.jsx(Ba,{}):s.jsx(Nr,{onBackClick:S})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new ma(100,58)},zr=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ia(),C=ge(),{useDynamicConfig:p}=ce(),[u,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,R]=i.useState(!1),F=J.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}=p(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:N}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:B}=v(Y.isDebitCardFeatureEnabled),P=Se(B,k),V=Ie({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:P}),m=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),w=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,L=Ae({isCardsOnlyTenant:w,isChargeCardFeatureEnabled:N,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&L&&m;i.useEffect(()=>{u===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Je(n,K,L)))},[o,g.fetchState,u,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(C.state?.pathnameStackToGoBack,C.pathname);r(E,{state:{pathnameStackToGoBack:G}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Xt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:G}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const O=J.getZeniOtpTokenForCardHolder(n),j=y(E=>pt(E.userState,F.userId)),U=()=>{d?.status?.code!=="active"&&a(Ga(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(U,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{R(E)};if(D!=="Completed"||d==null)return s.jsx(la,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Yr,{children:[s.jsx(ze,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx($r,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:O,navigate:r,currentTenant:k,location:C,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(Gr,{windowSize:t,children:e}):null]})},$r=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const C=Jt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ke(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(en())||c,showMenuIcon:o,shippingAddress:C,vgsVaultId:Oa.cardVaultId,twoFAView:p,activationWaitStatus:u,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,chargeCardDetailState:p}=t,u=p.chargeCard?.cardProviderID,{tenantEmailDomain:S}=C;return{onGetOtp:o=>{u!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(tn(r,o))},onResendOtp:o=>{u!=null&&e(Pa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{u!=null&&e(wa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&J.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(an({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}})}}})(mr),Gr=_e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: ${e=>`${Mr.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-BdePShct.js";import{a as g}from"./sentry-CX_3yQh7.js";import{j as w,h as x,u as T,l as k,g as O,k as E}from"./core-C_ZreJAw.js";import{z as D,b2 as F,A as P,c as L,f as V,ac as b,b3 as j,aq as A,ar as U,s as B}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-BdePShct.js";import{a as g}from"./sentry-CX_3yQh7.js";import{j as w,h as x,u as T,l as k,g as O,k as E}from"./core-C_ZreJAw.js";import{z as D,b2 as F,A as P,c as L,f as V,ac as b,b3 as j,aq as A,ar as U,s as B}from"./index-CU-O3XlP.js";import{eO as C,fC as M,rx as _,fx as G,c1 as R,LS as z,bn as Y,pF as $,pt as q,j$ as H,lv as S,LT as Z,bD as J,cu as N,lD as K,lG as Q}from"./zeni-epic-state-H6DZSSlf.js";import"./mui-BtnH6ELy.js";import{c as W}from"./routePaths-D5WTdktl.js";import{M as X}from"./MobileAppDrawer-D4ZBwL0S.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="3f6d10ac-23ec-4fba-9e10-05a5db85230f",n._sentryDebugIdIdentifier="sentry-dbid-3f6d10ac-23ec-4fba-9e10-05a5db85230f")}catch{}})();const ee=E(function(n){const t=G(n),i=D.getSignedInUser(),l=C(n),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(l?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(n,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(Q())},onAddressClick:e=>{const a=W(f,e),o=B(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:U(I))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?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]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(Z(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(H({files:e}))},onDeleteFile:e=>{n(q(e))},onEditFileName:(e,a)=>{n($(e,a.split(".")[0]))}}})(j);function de(){const n=w(),t=x(),i=T(),{tenantEmailDomain:l}=k(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>C(s)),d=r.companyId??D.getSignedInUserTenant(l)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||a!=="Not-Started"||d==null||(p(!0),t(M(d)))},[c,a,d,t]),g.useEffect(()=>{o==="Not-Started"&&t(_())},[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:L,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:b(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-BdePShct.js";import{a}from"./sentry-CX_3yQh7.js";import{h as D,u as v,g as u,N as w}from"./core-C_ZreJAw.js";import{Iy as O,eO as A,fj as j,mm as L,fL as h,fi as U,eP as _,IF as F}from"./zeni-epic-state-H6DZSSlf.js";import{u as $,z as f,L as g,D as k,o as H}from"./index-
|
|
1
|
+
import{j as C}from"./liveblocks-BdePShct.js";import{a}from"./sentry-CX_3yQh7.js";import{h as D,u as v,g as u,N as w}from"./core-C_ZreJAw.js";import{Iy as O,eO as A,fj as j,mm as L,fL as h,fi as U,eP as _,IF as F}from"./zeni-epic-state-H6DZSSlf.js";import{u as $,z as f,L as g,D as k,o as H}from"./index-CU-O3XlP.js";import{n as P}from"./mui-BtnH6ELy.js";import{t as z}from"./getLocaleForTenant-BKKkwx8r.js";import{g as R,Q as G}from"./QBOConnectionScreen-2glPhn1w.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./empty-wr1Sjolf.js";import"./pdf-lib-th4agIPv.js";import"./index-T4vVJHIk.js";import"./url-CcaHVDFu.js";import"./index-CUa_5F-3.js";import"./decodeURIComponentSafe-BP018w8C.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]="79f97a53-0daf-4788-80c4-2b5561c73a77",t._sentryDebugIdIdentifier="sentry-dbid-79f97a53-0daf-4788-80c4-2b5561c73a77")}catch{}})();const Q=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-BdePShct.js";import{z as m}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-BdePShct.js";import{z as m}from"./index-CU-O3XlP.js";import{g as n}from"./QBOConnectionScreen-2glPhn1w.js";import"./sentry-CX_3yQh7.js";import{u as p,N as s}from"./core-C_ZreJAw.js";import"./zeni-epic-state-H6DZSSlf.js";import"./recharts-CHr9O26_.js";import"./mui-BtnH6ELy.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./empty-wr1Sjolf.js";import"./pdf-lib-th4agIPv.js";import"./index-T4vVJHIk.js";import"./url-CcaHVDFu.js";import"./index-CUa_5F-3.js";import"./decodeURIComponentSafe-BP018w8C.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]="9b06c105-de24-4a38-a62b-e92ff6d04824",t._sentryDebugIdIdentifier="sentry-dbid-9b06c105-de24-4a38-a62b-e92ff6d04824")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),a=m.getSignedInUser()?.userId??"";if(f(o,r,e,a)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:d})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-jk197VvK.js → CustomerOnboardingRoutes-Dcw2XPmu.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BdePShct.js";import{t as $e,A as Ce}from"./AddressScreen-
|
|
1
|
+
import{j as a}from"./liveblocks-BdePShct.js";import{t as $e,A as Ce}from"./AddressScreen-CVaBIk3t.js";import ze from"./NotFoundScreen-C5xQLNp5.js";import{a as g}from"./sentry-CX_3yQh7.js";import{j as oe,u as se,h as ie,l as re,g as D,N as T,k as ce,i as Me,n as qe,o as M}from"./core-C_ZreJAw.js";import{V as de,k as le,z as B,y as ue,m as Je,$ as _,s as V,A as W,c as N,B as we,f as Y,am as Ke,Z as Qe,an as ke,i as te,ao as Ze,ap as Ie,o as We,aq as He,ar as Te,as as Ye}from"./index-CU-O3XlP.js";import{bn as Xe,eO as ee,fb as et,eU as pe,eS as me,bv as tt,mk as at,f7 as nt,bN as ot,j3 as ae,j6 as ve,J0 as st,bS as it,c1 as ge,rL as fe,rw as rt,Jx as X,rM as _e,GW as ct,k7 as Ue,Jy as Ve,Jz as dt,JA as lt,JB as ut,j1 as pt,j4 as mt,ry as Be,rK as gt,bD as xe,cu as ft,rY as Ee,pF as ht,pt as yt,j$ as St,fA as bt,fz as Ct,fy as kt,JC as It,rq as Tt,rZ as xt,s0 as Et,s3 as Ot,s9 as At,cT as Pt}from"./zeni-epic-state-H6DZSSlf.js";import{n as he}from"./mui-BtnH6ELy.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-2glPhn1w.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./empty-wr1Sjolf.js";import"./pdf-lib-th4agIPv.js";import"./index-T4vVJHIk.js";import"./url-CcaHVDFu.js";import"./index-CUa_5F-3.js";import"./decodeURIComponentSafe-BP018w8C.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]="f8c2f634-d28f-443c-808a-623815c93119",t._sentryDebugIdIdentifier="sentry-dbid-f8c2f634-d28f-443c-808a-623815c93119")}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(),f=Xe(i),{useFeatureGate:m}=ue(),I=Je(),{isFeatureEnabled:x}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:E}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:k}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:h}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),$=C||U&&f,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),j=c.company!=null&&et(c.company),G=L&&j,O=D(l=>l.onboardingCustomerViewState.fetchState),b=c.excludedResources,R=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const w=pe(F,c),A=me(c),P=[],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&&P.push("top_expenses"),z===!1&&P.push("task_card"),v===!1&&P.push("bill_pay_card","bill_pay_promo_card"),J===!1&&P.push("reimbursement_card","reimbursement_promo_card"),k===!1&&P.push("zeni_accounts_promo_card"),h===!1&&P.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||w||A||(r(!0),s(at(i.userId,R,c.tenantId,!0,!1,P)))},[d,O,w,A,i,c.tenantId,s]),g.useEffect(()=>{(w||A)&&setTimeout(()=>{S(!0)},5e3)},[w,A]),O!=="Completed")return a.jsx(T,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(w)return a.jsx(T,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(A)return a.jsx(T,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(W,{analytics:N,onLoad:l=>(Q=>Q.trackPageLoaded(Y.Event.onboardingDashboardActivation))(l)}),a.jsx(jt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:x,isArAgingFeatureEnabled:E,shouldFetchZeniAccountsPromoCard:k,shouldFetchRewardsPlanCard:h,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:G,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(we,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},Oe=he.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-BdePShct.js";import{l as $,g as S,u as K,h as V,j as q,k as H,s as Ka,n as at,o as w}from"./core-C_ZreJAw.js";import{eO as L,JS as Me,bD as Yt,bq as ue,L3 as qa,hT as Za,L4 as xt,L5 as Ha,hW as nt,L6 as Re,L7 as Ja,h$ as Qa,L8 as Tt,L9 as Wa,i3 as ot,La as Le,Lb as Xa,ck as rt,Lc as en,Ld as tn,Ka as an,iZ as nn,Le as on,bn as Ae,Lf as Gt,JG as ee,bc as Nt,jb as Vt,mu as $t,iW as zt,JI as te,JH as Z,f3 as sn,fl as rn,Lg as cn,Lh as ln,Li as Kt,Lj as be,tB as ve,tC as Ie,tZ as me,tT as ae,tG as Ee,Lk as dn,Ll as un,Lm as mn,Ln as qt,Lo as Ce,Lp as pn,dC as Ue,qd as Zt,Lq as hn,Lr as fn,Ls as gn,Lt as it,J3 as ct,jr as pe,u5 as lt,ql as bn,Lu as Cn,tD as wt,qg as le,qc as Ht,Lv as se,Lw as _n,Lx as dt,J1 as ut,sd as Jt,Ly as kn,Lz as Sn,LA as yn,LB as mt,sq as An,LC as vn,tF as Dt,sc as Qt,LD as re,LE as In,bv as Wt,u9 as Xt,LF as En,LG as xn,LH as Tn,LI as pt,u4 as wn,LJ as Dn,tE as Ft,u8 as ea,LK as ie,LL as Fn,LM as On,LN as ta,jg as aa,mr as na,jl as oa,mp as sa,mo as ra,mn as ia,rB as Pn,fb as Bn,cN as Rn,cO as Ln,mk as jn,f7 as Mn,mB as Un,Dd as Ot,LO as Yn,LP as Gn,LQ as Nn,LR as Vn,b5 as ht,e_ as $n,gB as zn,fC as Kn,mv as qn,iP as Zn,ms as Hn,mq as Jn,eU as Qn,eS as Wn}from"./zeni-epic-state-H6DZSSlf.js";import{z as R,W as J,s as D,c as I,D as z,aR as Xn,A as xe,aS as ca,f as G,aT as eo,k as Te,aU as la,y as Ye,$ as j,m as to,aV as ao,aW as no,Q as da,Z as oo,a as ua,a1 as so,aX as ro,aK as ma,aY as io,aZ as co,U as lo,a_ as uo,a$ as mo,an as po,q as ho,R as fo,b0 as go,b1 as ke}from"./index-CGS6zWWp.js";import{n as ft}from"./mui-BtnH6ELy.js";import{a as b}from"./sentry-CX_3yQh7.js";import{w as pa}from"./withTransactionSidePanel-BmH5jBz_.js";import{b as ha,t as he,e as ne,a as gt,v as bo}from"./routePaths-DZkWYInw.js";import{u as Q}from"./useAskAiCfoHostNavButtonProps-Nsv7MqoG.js";import{c as we,b as Co}from"./useFetchSuggestedQuestionsWhenReady-C86A67zi.js";import ye from"./NotFoundScreen-C4aqnA8_.js";import{t as fa}from"./analyticsHelper-DUlInMOD.js";import{C as _o}from"./CompanyPassportScreen-kKTXGF13.js";import{F as ko}from"./FeaturePreviewScreen-aYYY9m7f.js";import{R as So}from"./ReferralListScreen-CyoB8VnU.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./TransactionDetailScreen-DbXqL9Dv.js";import"./decodeURIComponentSafe-BP018w8C.js";import"./MobileAppDrawer-BDT0TmvR.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]="86e12e00-a91b-452c-9691-3130bca8355a",e._sentryDebugIdIdentifier="sentry-dbid-86e12e00-a91b-452c-9691-3130bca8355a")}catch{}})();const yo=pa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=$(),s=R.getSignedInUser(),i=S(x=>x.tenantState.currentTenantId),d=S(x=>L(x)),{tenantEmailDomain:p}=$(),C=K(),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=V(),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(z.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(Xn,{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=V(),a=q(),t=S(A=>Ha(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AP Aging"});we({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>L(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(Re({searchString:A}))},[]),h=b.useCallback((A,E)=>{e(Re({sortKey:E,sortOrder:A}))},[]),f=b.useCallback(A=>{a(`./${A}/${g.format(z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=b.useCallback(A=>{e(Re({downloadState:A}))},[]),y=b.useCallback((A,E)=>{},[]),_=b.useCallback((A,E)=>{e(Re({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(G.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}=$(),s=R.getSignedInUser(),i=S(F=>L(F)),{tenantEmailDomain:d}=$(),p=K(),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=V(),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(z.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=V(),a=q(),t=S(_=>Wa(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AR Aging"});we({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(_=>L(_)),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(Le({searchString:_}))},[]),m=b.useCallback((_,A)=>{e(Le({sortKey:A,sortOrder:_}))},[]),h=b.useCallback(_=>{a(`./${_}/${C.format(z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),f=b.useCallback(_=>{e(Le({downloadState:_}))},[]),k=b.useCallback((_,A)=>{e(Le({selectedDate:_,agingDateSelectionType:A})),e(ot(_))},[]),y=b.useCallback((_,A)=>{e(Xa({nodeId:_,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(xe,{analytics:I,onLoad:_=>_.trackPageLoaded(G.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:z.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=R.getSignedInUser(),n=Ae(t);return{sectionTitle:z.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ba)(la);function To(){const e=q(),a=K(),{tenantEmailDomain:t}=$(),n=Te(),o=S(s=>L(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=K(),{tenantEmailDomain:t}=$(),n=Te(),o=rt(n?.loggedInUserRoleMap),r=S(s=>L(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-BdePShct.js";import{l as $,g as S,u as K,h as V,j as q,k as H,s as Ka,n as at,o as w}from"./core-C_ZreJAw.js";import{eO as L,JS as Me,bD as Yt,bq as ue,L3 as qa,hT as Za,L4 as xt,L5 as Ha,hW as nt,L6 as Re,L7 as Ja,h$ as Qa,L8 as Tt,L9 as Wa,i3 as ot,La as Le,Lb as Xa,ck as rt,Lc as en,Ld as tn,Ka as an,iZ as nn,Le as on,bn as Ae,Lf as Gt,JG as ee,bc as Nt,jb as Vt,mu as $t,iW as zt,JI as te,JH as Z,f3 as sn,fl as rn,Lg as cn,Lh as ln,Li as Kt,Lj as be,tB as ve,tC as Ie,tZ as me,tT as ae,tG as Ee,Lk as dn,Ll as un,Lm as mn,Ln as qt,Lo as Ce,Lp as pn,dC as Ue,qd as Zt,Lq as hn,Lr as fn,Ls as gn,Lt as it,J3 as ct,jr as pe,u5 as lt,ql as bn,Lu as Cn,tD as wt,qg as le,qc as Ht,Lv as se,Lw as _n,Lx as dt,J1 as ut,sd as Jt,Ly as kn,Lz as Sn,LA as yn,LB as mt,sq as An,LC as vn,tF as Dt,sc as Qt,LD as re,LE as In,bv as Wt,u9 as Xt,LF as En,LG as xn,LH as Tn,LI as pt,u4 as wn,LJ as Dn,tE as Ft,u8 as ea,LK as ie,LL as Fn,LM as On,LN as ta,jg as aa,mr as na,jl as oa,mp as sa,mo as ra,mn as ia,rB as Pn,fb as Bn,cN as Rn,cO as Ln,mk as jn,f7 as Mn,mB as Un,Dd as Ot,LO as Yn,LP as Gn,LQ as Nn,LR as Vn,b5 as ht,e_ as $n,gB as zn,fC as Kn,mv as qn,iP as Zn,ms as Hn,mq as Jn,eU as Qn,eS as Wn}from"./zeni-epic-state-H6DZSSlf.js";import{z as R,W as J,s as D,c as I,D as z,aR as Xn,A as xe,aS as ca,f as G,aT as eo,k as Te,aU as la,y as Ye,$ as j,m as to,aV as ao,aW as no,Q as da,Z as oo,a as ua,a1 as so,aX as ro,aK as ma,aY as io,aZ as co,U as lo,a_ as uo,a$ as mo,an as po,q as ho,R as fo,b0 as go,b1 as ke}from"./index-CU-O3XlP.js";import{n as ft}from"./mui-BtnH6ELy.js";import{a as b}from"./sentry-CX_3yQh7.js";import{w as pa}from"./withTransactionSidePanel-D68X8m-E.js";import{b as ha,t as he,e as ne,a as gt,v as bo}from"./routePaths-D5WTdktl.js";import{u as Q}from"./useAskAiCfoHostNavButtonProps-C2KX1gk_.js";import{c as we,b as Co}from"./useFetchSuggestedQuestionsWhenReady-BtBjAnV1.js";import ye from"./NotFoundScreen-C5xQLNp5.js";import{t as fa}from"./analyticsHelper-DBYfXkXK.js";import{C as _o}from"./CompanyPassportScreen-D_8pLYfg.js";import{F as ko}from"./FeaturePreviewScreen-CaG7JnKZ.js";import{R as So}from"./ReferralListScreen-D-N3tpSF.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./TransactionDetailScreen-efNQkWz4.js";import"./decodeURIComponentSafe-BP018w8C.js";import"./MobileAppDrawer-D4ZBwL0S.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]="86e12e00-a91b-452c-9691-3130bca8355a",e._sentryDebugIdIdentifier="sentry-dbid-86e12e00-a91b-452c-9691-3130bca8355a")}catch{}})();const yo=pa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=$(),s=R.getSignedInUser(),i=S(x=>x.tenantState.currentTenantId),d=S(x=>L(x)),{tenantEmailDomain:p}=$(),C=K(),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=V(),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(z.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(Xn,{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=V(),a=q(),t=S(A=>Ha(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AP Aging"});we({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>L(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(Re({searchString:A}))},[]),h=b.useCallback((A,E)=>{e(Re({sortKey:E,sortOrder:A}))},[]),f=b.useCallback(A=>{a(`./${A}/${g.format(z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=b.useCallback(A=>{e(Re({downloadState:A}))},[]),y=b.useCallback((A,E)=>{},[]),_=b.useCallback((A,E)=>{e(Re({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(G.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}=$(),s=R.getSignedInUser(),i=S(F=>L(F)),{tenantEmailDomain:d}=$(),p=K(),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=V(),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(z.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=V(),a=q(),t=S(_=>Wa(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=Q({mobileExploreReferrer:"AR Aging"});we({isDataReady:t.fetchState==="Completed"});const r=R.getSignedInUser(),s=S(_=>L(_)),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(Le({searchString:_}))},[]),m=b.useCallback((_,A)=>{e(Le({sortKey:A,sortOrder:_}))},[]),h=b.useCallback(_=>{a(`./${_}/${C.format(z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),f=b.useCallback(_=>{e(Le({downloadState:_}))},[]),k=b.useCallback((_,A)=>{e(Le({selectedDate:_,agingDateSelectionType:A})),e(ot(_))},[]),y=b.useCallback((_,A)=>{e(Xa({nodeId:_,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(xe,{analytics:I,onLoad:_=>_.trackPageLoaded(G.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:z.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=R.getSignedInUser(),n=Ae(t);return{sectionTitle:z.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ba)(la);function To(){const e=q(),a=K(),{tenantEmailDomain:t}=$(),n=Te(),o=S(s=>L(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=K(),{tenantEmailDomain:t}=$(),n=Te(),o=rt(n?.loggedInUserRoleMap),r=S(s=>L(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-BdePShct.js";import{a as u}from"./sentry-CX_3yQh7.js";import{h as y,g as b,k as A,u as w,N as k}from"./core-C_ZreJAw.js";import{Iy as N,eO as _,fj as U,Iz as z,mm as L,IA as R}from"./zeni-epic-state-H6DZSSlf.js";import{u as O,z as f,L as T,t as S,D as j,b as $}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-BdePShct.js";import{a as u}from"./sentry-CX_3yQh7.js";import{h as y,g as b,k as A,u as w,N as k}from"./core-C_ZreJAw.js";import{Iy as N,eO as _,fj as U,Iz as z,mm as L,IA as R}from"./zeni-epic-state-H6DZSSlf.js";import{u as O,z as f,L as T,t as S,D as j,b as $}from"./index-CU-O3XlP.js";import"./mui-BtnH6ELy.js";import{t as P}from"./getLocaleForTenant-BKKkwx8r.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="7c1b996e-f0e3-428e-a01b-680e39933f04",t._sentryDebugIdIdentifier="sentry-dbid-7c1b996e-f0e3-428e-a01b-680e39933f04")}catch{}})();const Q=A(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:R(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,I=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,I=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:I}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=O(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&S.shouldFetchActiveTenant(e)&&(h.current=!0,S.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(U(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,I=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&I&&S.shouldFetchAllTenants()&&(r.current=!0,S.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!z(i))&&t(L(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.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-BkEDowN8.js → DomesticWireDetailScreen-Bf9aHic4.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-BdePShct.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-C_ZreJAw.js";import{Mz as k,MG as _,fA as q,fz as J,fy as W,io as K,JH as L,pw as Q,eO as V,M5 as D,il as T,MA as S,MJ as F,ij as G,iH as j}from"./zeni-epic-state-H6DZSSlf.js";import{bo as X,Z as R,y as N,z as U,m as z,q as p,$ as v,B as H,bp as Y,o as M,bq as ee,s as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-BdePShct.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-C_ZreJAw.js";import{Mz as k,MG as _,fA as q,fz as J,fy as W,io as K,JH as L,pw as Q,eO as V,M5 as D,il as T,MA as S,MJ as F,ij as G,iH as j}from"./zeni-epic-state-H6DZSSlf.js";import{bo as X,Z as R,y as N,z as U,m as z,q as p,$ as v,B as H,bp as Y,o as M,bq as ee,s as te}from"./index-CU-O3XlP.js";import{n as O}from"./mui-BtnH6ELy.js";import"./sentry-CX_3yQh7.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]="cf40b356-887a-4f0f-b41a-1ffaa9686aa3",e._sentryDebugIdIdentifier="sentry-dbid-cf40b356-887a-4f0f-b41a-1ffaa9686aa3")}catch{}})();const ae=A(null,function(e,t){return{onSaveVendor:a=>{e(K(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),a!=null&&e(Q(a))},onGetOtp:a=>{e(W(a,"BillPayVendor"))},onResendOtp:a=>{e(J(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(q(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(_(a,n,o))}}})(X);function Z({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h(i=>k(i,e));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-BdePShct.js";import{Z as l,E as f,m as c}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-BdePShct.js";import{Z as l,E as f,m as c}from"./index-CU-O3XlP.js";import{D as b}from"./mui-BtnH6ELy.js";import"./sentry-CX_3yQh7.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]="5f0ed12e-e902-402b-85e7-22752bbd60d8",e._sentryDebugIdIdentifier="sentry-dbid-5f0ed12e-e902-402b-85e7-22752bbd60d8")}catch{}})();const p={drawerLeftMargin:new f(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=l(),d=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),a=c();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${d})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{m as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BdePShct.js";import{a as d}from"./sentry-CX_3yQh7.js";import{j as A,h as B,u as O,l as K,g as l,N as q,k as F,n as J,o as N}from"./core-C_ZreJAw.js";import{KO as _,eO as M,Kb as R,kr as W,GO as k,KT as Y,JG as $,jr as z,GP as S,Kg as H,Kh as V,JI as L,JH as Q}from"./zeni-epic-state-H6DZSSlf.js";import{aO as U,c as X,q as Z,s as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-BdePShct.js";import{a as d}from"./sentry-CX_3yQh7.js";import{j as A,h as B,u as O,l as K,g as l,N as q,k as F,n as J,o as N}from"./core-C_ZreJAw.js";import{KO as _,eO as M,Kb as R,kr as W,GO as k,KT as Y,JG as $,jr as z,GP as S,Kg as H,Kh as V,JI as L,JH as Q}from"./zeni-epic-state-H6DZSSlf.js";import{aO as U,c as X,q as Z,s as tt}from"./index-CU-O3XlP.js";import"./mui-BtnH6ELy.js";import{d as b}from"./decodeURIComponentSafe-BP018w8C.js";import{w as et}from"./withTransactionSidePanel-D68X8m-E.js";import{e as at,b as nt}from"./routePaths-D5WTdktl.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./useAskAiCfoHostNavButtonProps-C2KX1gk_.js";import"./useFetchSuggestedQuestionsWhenReady-BtBjAnV1.js";import"./TransactionDetailScreen-efNQkWz4.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]="ef242304-287c-40a2-b077-e9debabec688",a._sentryDebugIdIdentifier="sentry-dbid-ef242304-287c-40a2-b077-e9debabec688")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:z(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??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=O(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=K(),r=b(j??""),p=b(x??""),u=rt(r,p),G=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=l(n=>M(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(W(i)))},[m,u,i]);const P=l(n=>n.trendState.fetchState),E=f?.selectedPeriod?.timePeriod??D,w=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,D);return d.useEffect(()=>{m===!0&&h===!1&&P==="Completed"&&(g(!0),E!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))},[m,h,P]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:w,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(q,{to:I(G.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(J,{children:s.jsx(N,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-BqK3TSEk.js → ExpenseAutomationRoutes-DES_BtrB.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-BdePShct.js";import xn from"./NotFoundScreen-
|
|
1
|
+
import{j as C}from"./liveblocks-BdePShct.js";import xn from"./NotFoundScreen-C5xQLNp5.js";import{a,b as Tt}from"./sentry-CX_3yQh7.js";import{n as Ue,S as Rn}from"./mui-BtnH6ELy.js";import{h as ce,j as wt,u as Ge,g as F,k as Dn,l as rt,n as Fn,o as ze}from"./core-C_ZreJAw.js";import{eO as Re,P5 as Un,mw as Se,fe as Bn,q7 as _n,mO as xt,n7 as Rt,P6 as Dt,nh as Vn,P7 as Ft,mH as Mn,pF as On,eZ as pe,P8 as De,s6 as Ut,Bh as Bt,P9 as _t,Pa as jn,pk as Je,KP as dt,KR as zn,ju as Ln,KS as $n,jB as qn,cV as Gn,t9 as Ne,mU as Vt,nm as Fe,Pb as Jn,JI as ut,JH as Te,Pc as mt,jS as Nn,Pd as Kn,Pe as Yn,Pf as Hn,Pg as Qn,m$ as Wn,mM as ie,np as we,Ph as Zn,Pi as Xn,Pj as ea,nw as ta,jF as na,jw as aa,Pk as oa,jE as ht,KZ as sa,Pl as ca,Pm as ia,pg as la,oX as ra,nn as ge,oW as Le,Pn as da,Po as ua,l9 as ma,bq as ha,l4 as pt,kS as pa,Pp as ga,gD as gt,fQ as Ca,l1 as Sa,v2 as Ia,Pq as fa,nX as ka,nS as Ea,nW as va,nH as ya,Pr as Pa,f0 as Mt,na as ba,mX as Aa,ff as Ct,nr as Ta,Ps as wa,no as Ot,Pt as xa,Pu as Ra,Pv as Da,Pw as Fa,Px as St,ps as Ua,oN as Ba,JG as _a,jD as Va,Py as Ma,FP as Oa,jC as ja,jr as za,e$ as La,om as jt,oF as $a,nl as It,nq as qa,bD as Ga,k_ as Ja,kX as Na,Pz as Ka,nG as ft,oD as kt,oB as Ya,or as Ha,o6 as Qa,oE as Wa,PA as Za,PB as Xa,oa as eo,PC as to,o0 as no,o9 as ao,o7 as oo,oI as so}from"./zeni-epic-state-H6DZSSlf.js";import{y as zt,$ as Ce,c as z,s as Q,R as Lt,cx as co,z as Be,cy as io,aq as xe,cz as lo,aQ as Et,B as $t,cA as ro,an as $e,D as uo,cB as mo,W as ho,cC as po,Q as go,cD as Co,cE as So,V as Io,k as fo,aK as ko,b2 as Eo,E as vo,cF as yo}from"./index-CU-O3XlP.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-C2KX1gk_.js";import{c as Gt}from"./useFetchSuggestedQuestionsWhenReady-BtBjAnV1.js";import{c as vt,C as Po}from"./TransactionDetailScreen-efNQkWz4.js";import{w as bo}from"./withTransactionSidePanel-D68X8m-E.js";import{h as Ao,v as To}from"./routePaths-D5WTdktl.js";import{g as qe}from"./accountMappingHelper-COFGwnKa.js";import{D as wo}from"./DrawerScreen-QCmmvlF6.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.js";import"./decodeURIComponentSafe-BP018w8C.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]="6015711e-619a-4cb2-9824-1869383d96ca",t._sentryDebugIdIdentifier="sentry-dbid-6015711e-619a-4cb2-9824-1869383d96ca")}catch{}})();const xo=()=>{const t=ce(),i=wt(),b=Ge(),f=F(d=>Re(d)),{useFeatureGate:E}=zt(),{isFeatureEnabled:g}=E(Ce.isRealtimeInsightsFeatureEnabled),u=F(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=F(d=>Un(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=qt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,Y=!1)=>{t(Se({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:Y}))},[]),y=a.useCallback(d=>{const R=b.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(Bn(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],B=a.useCallback(()=>{const d=b.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=Q(b.state?.pathnameStackToGoBack,b.pathname),A=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=Lt();return Gt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(_n(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&B()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=b.state?.referrer;z.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Ro,{children:C.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:A,onBackClick:()=>{i("../../dashboard")},onReload:B,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Ro=Ue.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-BdePShct.js";import{a as f}from"./sentry-CX_3yQh7.js";import{X as d,Y as l,a0 as p,q as m}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-BdePShct.js";import{a as f}from"./sentry-CX_3yQh7.js";import{X as d,Y as l,a0 as p,q as m}from"./index-CU-O3XlP.js";import"./mui-BtnH6ELy.js";import c from"./NotFoundScreen-C5xQLNp5.js";import{j as b,u}from"./core-C_ZreJAw.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]="b29ff12e-fa1f-4b13-9c0f-4f6da640feeb",e._sentryDebugIdIdentifier="sentry-dbid-b29ff12e-fa1f-4b13-9c0f-4f6da640feeb")}catch{}})();const D=()=>{const e=b(),a=u(),t=f.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),r=f.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=d(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:r}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{D as F};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-BdePShct.js";import{l as y,k as x,j as C,u as S,h as ee,q as te,g as E,N as ae,n as ne,o as p}from"./core-C_ZreJAw.js";import{IP as k,IQ as v,IR as T,yU as B,yG as G,IS as D,IT as oe,IU as se,yK as ie,eP as I,yR as le,yO as re}from"./zeni-epic-state-H6DZSSlf.js";import{Z as g,o as r,M as de,c as j,i as M,O as ce,q as me,r as pe,s as H,y as ue,$ as he,v as xe,V as ge,m as fe,x as we,B as be,A as ye,j as Se,S as ke,C as ve,E as je,F as Ie}from"./index-
|
|
1
|
+
import{j as t}from"./liveblocks-BdePShct.js";import{l as y,k as x,j as C,u as S,h as ee,q as te,g as E,N as ae,n as ne,o as p}from"./core-C_ZreJAw.js";import{IP as k,IQ as v,IR as T,yU as B,yG as G,IS as D,IT as oe,IU as se,yK as ie,eP as I,yR as le,yO as re}from"./zeni-epic-state-H6DZSSlf.js";import{Z as g,o as r,M as de,c as j,i as M,O as ce,q as me,r as pe,s as H,y as ue,$ as he,v as xe,V as ge,m as fe,x as we,B as be,A as ye,j as Se,S as ke,C as ve,E as je,F as Ie}from"./index-CU-O3XlP.js";import{n as m}from"./mui-BtnH6ELy.js";import f from"./NotFoundScreen-C5xQLNp5.js";import{a as $}from"./sentry-CX_3yQh7.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="c974ca31-fb17-4372-a598-f87e27fd1cdd",e._sentryDebugIdIdentifier="sentry-dbid-c974ca31-fb17-4372-a598-f87e27fd1cdd")}catch{}})();const $e=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-BdePShct.js";import{a as g}from"./sentry-CX_3yQh7.js";import{h as O,u as w,j as _,q as M,g as l,N as T}from"./core-C_ZreJAw.js";import{z as r,m as P,D as A,e as V,c as N,f as q,w as B,j as G,h as H}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-BdePShct.js";import{a as g}from"./sentry-CX_3yQh7.js";import{h as O,u as w,j as _,q as M,g as l,N as T}from"./core-C_ZreJAw.js";import{z as r,m as P,D as A,e as V,c as N,f as q,w as B,j as G,h as H}from"./index-CU-O3XlP.js";import{eO as K,IA as R,IK as W,IB as $,eP as J,fi as Q,IG as X,fH as Y,cT as Z,IL as ee,IM as te}from"./zeni-epic-state-H6DZSSlf.js";import{n as ne}from"./mui-BtnH6ELy.js";import{u as se}from"./useDeviceId-DtlEyHOn.js";import{f as ae}from"./analyticsHelper-DBYfXkXK.js";import{t as ie}from"./getLocaleForTenant-BKKkwx8r.js";import"./recharts-CHr9O26_.js";import"./analytics-CgF6EPDF.js";import"./plaid-CLHQ0yLv.js";import"./dnd-C3uQO7Bn.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUKBWgbe.js";import"./lexical-E_ubWL4u.js";import"./pdf-CH0jWS01.js";import"./utils-Dw8b4HCO.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]="e58fe2b6-67ba-408c-8296-e16c1a364969",t._sentryDebugIdIdentifier="sentry-dbid-e58fe2b6-67ba-408c-8296-e16c1a364969")}catch{}})();const D=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function De(){const t=O(),a=w(),m=_(),[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=>K(e)),b=l(e=>R(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(W(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($(b.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,b.tenantsInOrder),Y().then(()=>{const e=H();e!=null&&V(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(B,{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(G,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|