@zeniai/web-app-ui 5.1.76-next → 5.1.76-prod
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-CQEm5psH.js +1 -0
- package/dist/assets/{AddressScreen-D3HAG5Pr.js → AddressScreen-DLTJPBtB.js} +1 -1
- package/dist/assets/{AiCfoScreen-CTc-VcRc.js → AiCfoScreen-CIW6Rkrd.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-gDdPXgYD.js → BillPayApprovalRoutes-BvMuz4fH.js} +1 -1
- package/dist/assets/{BillPayRoutes-CAewvRkJ.js → BillPayRoutes-DCoEJWAC.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-BbDxcN3K.js → BusinessVerificationPageScreen-BXKB7X5s.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-6QU1QBxN.js → ChargeCardRoutes-CSwlWrZ1.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CC2QSh6z.js → CompanyPassportScreen-BLsZ8Uuy.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-CUgHHwsJ.js → ConnectionAuthScreen-B13ytSR6.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-bHMRpQpq.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-1feU8VPE.js → CustomerOnboardingRoutes-Bb0R8e9B.js} +1 -1
- package/dist/assets/{DashboardRoutes-NArRDQJ-.js → DashboardRoutes-Xszs783p.js} +1 -1
- package/dist/assets/{DefaultTenantHome-BuXiJZb7.js → DefaultTenantHome-Ckgm6fYm.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BnYbmIQy.js → DomesticWireDetailScreen-R5H3Lj3F.js} +1 -1
- package/dist/assets/{DrawerScreen-DGyfdHJW.js → DrawerScreen-C1-3TQnN.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-BkBZEVBw.js → EntityDetailRoutes-BklwOWcC.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-BBY95n1E.js → ExpenseAutomationRoutes-CkJkhfFq.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-DDv7GOn2.js → FeaturePreviewScreen-DeAByMab.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-DhJqrvHU.js → HubSpotOAuthCallbackScreen-tj9Ftuv9.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-D7su7riK.js → MagicLinkRoutes-DuELPviL.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-Di_hmBzG.js → MagicLinkSignInScreen-CRn0-bwq.js} +1 -1
- package/dist/assets/{MobileAppDrawer-Df4Qimmh.js → MobileAppDrawer-C6MRZ7yW.js} +1 -1
- package/dist/assets/NotFoundScreen-BXgaohYF.js +1 -0
- package/dist/assets/{NotificationRoutes-CiWM75s-.js → NotificationRoutes-CJQORxml.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-CWFjUYEE.js → OAuthConsentScreen-BBkfTgiS.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-BxTz-s5z.js → PandLWithForecastRoutes-DC7TR9_4.js} +1 -1
- package/dist/assets/{PeopleRoutes-DVOlkZuO.js → PeopleRoutes-csHlQp5o.js} +1 -1
- package/dist/assets/{PerformanceRoutes-BEdQ7JSy.js → PerformanceRoutes-BzTXPXqo.js} +1 -1
- package/dist/assets/{Preview-CjoXDjPl.js → Preview-Cw7jL1Lj.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CHdv-UVo.js → QBOConnectionScreen-YQRuxVuF.js} +1 -1
- package/dist/assets/{ReferralListScreen-CySa3ted.js → ReferralListScreen-jCzCZDWf.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-LmykdpDG.js → ReimbursementApprovalRoutes-YTWZ_f_x.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CeUHThGh.js → ReimbursementApprovalRuleDetailScreen-DqNByTW4.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BHzQla-l.js → ReimbursementRoutes-CKT5CdX2.js} +1 -1
- package/dist/assets/{ReportsRoutes-CQmypnoq.js → ReportsRoutes-BBHE4Oo-.js} +1 -1
- package/dist/assets/{RewardsRoutes-fl2VG6Nw.js → RewardsRoutes-BuxVlZVs.js} +1 -1
- package/dist/assets/{ScreenRoutes-DjKy2K-h.js → ScreenRoutes-CGfFu7WV.js} +2 -2
- package/dist/assets/{SettingsRoutes-DAHFIT1_.js → SettingsRoutes-CZbvgGLZ.js} +1 -1
- package/dist/assets/{SetupPagesScreen-DFqkA6OC.js → SetupPagesScreen-DhoJ2EKU.js} +1 -1
- package/dist/assets/{SignInScreen-BPpnP2Dl.js → SignInScreen-C8GQD2TL.js} +1 -1
- package/dist/assets/{SignOutScreen-DG3qj3-0.js → SignOutScreen-BDPFv8fh.js} +1 -1
- package/dist/assets/{TaskListScreen-DG4Dv6A-.js → TaskListScreen-BAOvGtza.js} +1 -1
- package/dist/assets/{TaskRoutes-CcM2JaZH.js → TaskRoutes-BO5cvZoD.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-CiYZElQb.js → TransactionDetailRoutes-7L3zeSND.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-C7_imF3Y.js → TransactionDetailScreen-DY5IcfRV.js} +1 -1
- package/dist/assets/{TransactionListRoutes-n2hWV2dp.js → TransactionListRoutes-Bgj6-3fA.js} +1 -1
- package/dist/assets/{TreasuryRoutes-B-c4f7k7.js → TreasuryRoutes-BVhGqN6W.js} +1 -1
- package/dist/assets/{VendorsRoutes-BoEmibsm.js → VendorsRoutes-BnxlBevs.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-D52utSHx.js → WiseConfirmationScreen-CnaVF5HH.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-DQHAmu9e.js → ZeniAccountRoutes-DNooyVe8.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BrO9jMz2.js → ZeniAccountStatementScreen-CyycwdN8.js} +1 -1
- package/dist/assets/{accountMappingHelper-BNXnlSEh.js → accountMappingHelper-C2f8hGo7.js} +1 -1
- package/dist/assets/{analytics-7J1CNh2i.js → analytics-BYlEHy--.js} +1 -1
- package/dist/assets/{analyticsHelper-B5epc-PZ.js → analyticsHelper-Cw9lxNal.js} +1 -1
- package/dist/assets/{core-BwBLfZO1.js → core-CvVQwh-G.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-Cau4zUJU.js → decodeURIComponentSafe-C_ttRntx.js} +1 -1
- package/dist/assets/{dnd-yE3kwzv1.js → dnd-DNR-B7xM.js} +1 -1
- package/dist/assets/{empty-Cf0SP1Fa.js → empty-BINoIGGW.js} +1 -1
- package/dist/assets/{empty-CCgcIyVB.js → empty-CqdRwXT0.js} +1 -1
- package/dist/assets/{emptyVideoElement-BStn4F8t.js → emptyVideoElement-C5q-nSLE.js} +1 -1
- package/dist/assets/{epic-CYiMnVeW.js → epic-C5jlPncF.js} +1 -1
- package/dist/assets/{getLocaleForTenant-Bn0H95YD.js → getLocaleForTenant-BKpCR6Mg.js} +1 -1
- package/dist/assets/{index-DqVSCvOK.js → index-6ei8cz0C.js} +1 -1
- package/dist/assets/{index-A51o-oGI.js → index-CBYzZDpo.js} +1 -1
- package/dist/assets/{index-BerjEF27.js → index-CFH22x4t.js} +1 -1
- package/dist/assets/{index-VDS7QZz-.js → index-CyWCR990.js} +2 -2
- package/dist/assets/{index-t__Gmvon.js → index-DkXdrecr.js} +1 -1
- package/dist/assets/{index-aoY9thIU.js → index-H3w7aQmk.js} +1 -1
- package/dist/assets/{index-aRVrbNiC.js → index-LzTRB_X0.js} +7 -7
- package/dist/assets/{index-CF_NP1ls.js → index-iPhf2_13.js} +1 -1
- package/dist/assets/{lexical-CppAuKk8.js → lexical-DEMTOP18.js} +1 -1
- package/dist/assets/{liveblocks-BRoLXdu-.js → liveblocks-OUACL7Sm.js} +1 -1
- package/dist/assets/{lottie-BAjpdqbN.js → lottie-CtoJzpCG.js} +1 -1
- package/dist/assets/{mui-BBkWv1mU.js → mui-B_sWk5no.js} +1 -1
- package/dist/assets/{pathToGoBack-Bp5PBNhl.js → pathToGoBack-CJrDL_Y4.js} +1 -1
- package/dist/assets/{pdf-BQyDOTnR.js → pdf-Bd_BBdKz.js} +3 -3
- package/dist/assets/{pdf-lib-B_thHwDW.js → pdf-lib-B6zbzfIK.js} +1 -1
- package/dist/assets/{plaid-Gte2Ckk-.js → plaid-BeX18ubU.js} +1 -1
- package/dist/assets/{pusher-DvtgmJur.js → pusher-aLhruJgZ.js} +1 -1
- package/dist/assets/{react-NEHU30OY.js → react-BGSmuuzy.js} +1 -1
- package/dist/assets/{react-B7dU6M-a.js → react-BvotTNj-.js} +1 -1
- package/dist/assets/{react-CgknZZrM.js → react-CVqp8PAx.js} +1 -1
- package/dist/assets/{react-CNo23rWl.js → react-D3Ygj9wO.js} +1 -1
- package/dist/assets/{react-MOAFD_Zh.js → react-T1MP5N4W.js} +1 -1
- package/dist/assets/{react-B02axkNd.js → react-zqzsPGgA.js} +1 -1
- package/dist/assets/{recharts-CiU9jjGx.js → recharts-ScPc1hFQ.js} +1 -1
- package/dist/assets/{routePaths-hmakpH65.js → routePaths-CCOmiobh.js} +1 -1
- package/dist/assets/{sentry-B_UPXuSC.js → sentry-COtwFETz.js} +1 -1
- package/dist/assets/{url-DMkZVN82.js → url-DgoPdzhF.js} +1 -1
- package/dist/assets/{url-DUFXwvN_.js → url-sMzMgETT.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DHhcASUk.js → useAiCfoDashboardSuggestedQuestionsChips-CP6mqvu5.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DO0seTDc.js → useAskAiCfoHostNavButtonProps-CT6wQzQG.js} +1 -1
- package/dist/assets/{useDeviceId-b4A3GNY_.js → useDeviceId-FKP5CkBV.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-D_32gSqj.js → useInitialThreadRequest-BRMmNSgV.js} +1 -1
- package/dist/assets/{utils-ox49Wmvb.js → utils-B-68Nh7i.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-B6uMMn0i.js → withTransactionSidePanel-CNv0kM7W.js} +1 -1
- package/dist/assets/{zeni-epic-state-5KAN0o5k.js → zeni-epic-state-CECAZYIg.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-DS2UgHxm.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-kSr2iHC6.js +0 -1
- package/dist/assets/NotFoundScreen-DVKBuN7e.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-OUACL7Sm.js";import{A as d}from"./AddressScreen-DLTJPBtB.js";import i from"./NotFoundScreen-BXgaohYF.js";import"./sentry-COtwFETz.js";import{o as s,p as r}from"./core-CvVQwh-G.js";import"./zeni-epic-state-CECAZYIg.js";import"./recharts-ScPc1hFQ.js";import"./index-LzTRB_X0.js";import"./mui-B_sWk5no.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="4677917c-1bd8-4b00-9bd0-d308073173a3",t._sentryDebugIdIdentifier="sentry-dbid-4677917c-1bd8-4b00-9bd0-d308073173a3")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-
|
|
1
|
+
import{j as d}from"./liveblocks-OUACL7Sm.js";import{a as h}from"./sentry-COtwFETz.js";import{h as T,u as _,g as j,i as E,j as B,n as K}from"./core-CvVQwh-G.js";import{X as M,m as $,z as D,I as L,B as O,s as N,d as C,f as m,O as z,j as b,p as F}from"./index-LzTRB_X0.js";import{KN as I,h4 as R,eS as U,KO as G,c1 as V,KP as q,kp as H}from"./zeni-epic-state-CECAZYIg.js";import{n as X}from"./mui-B_sWk5no.js";import J from"./NotFoundScreen-BXgaohYF.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]="2accc2cf-61d8-47c7-b5be-87867a452343",e._sentryDebugIdIdentifier="sentry-dbid-2accc2cf-61d8-47c7-b5be-87867a452343")}catch{}})();const Q=X.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-
|
|
1
|
+
import{j as c}from"./liveblocks-OUACL7Sm.js";import{a as r}from"./sentry-COtwFETz.js";import{u as ge,h as Ce,g as Ie,j as Y,i as ke,n as be}from"./core-CvVQwh-G.js";import{U as we,z as xe,X as Pe,cU as Ee,cV as Te,b6 as K,cW as ye,b5 as J,p as B,s as L,d as I,cX as F,cY as ve,cZ as Qe,a2 as _e,f as Ae,a8 as Oe,c_ as Ue,a3 as je,q as Le,b1 as Fe,c$ as Re}from"./index-LzTRB_X0.js";import{fL as Be,eR as ee,eS as De,hK as Me,RA as Ve,eV as Ge,hU as $e,hQ as Ne,eT as R,fw as qe,fp as ze,ft as X,fx as He,fy as We,fz as Ye,fA as Ke,fB as Xe}from"./zeni-epic-state-CECAZYIg.js";import{D as Ze,n as k,S as Je,P as et}from"./mui-B_sWk5no.js";import{u as tt}from"./useAiCfoDashboardSuggestedQuestionsChips-CP6mqvu5.js";import{p as st}from"./pathToGoBack-CJrDL_Y4.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new a.Error().stack;i&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[i]="65c39ffa-4352-41f7-b728-75d4963323fd",a._sentryDebugIdIdentifier="sentry-dbid-65c39ffa-4352-41f7-b728-75d4963323fd")}catch{}})();const te="chat-response-generated",ot=be(function(a,i){const s=ee(a),m=i.isSubmitting;return{showSampleQuestions:i.sessionFromUrl==="explore"&&s.uiState.currentChatSessionId==null,aiCfoView:s,isSubmitting:m,isNewChatSession:i.sessionFromUrl==="new_chat"||i.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${je}/tableDownload`,emailLinkQuestion:i.emailLinkQuestion,autoSubmitEmailLinkQuestion:i.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:i.onEmailLinkQuestionProcessed,routedInitialQuestionSource:i.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:i.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:i.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:i.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:i.isFileUploadEnabled,isUploadPromoVisible:i.isUploadPromoVisible,onUploadPromoClose:i.onUploadPromoClose}},function(a,i){const{location:s,currentTenant:m,userId:l,navigate:h,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:d,setIsAiCfoOpen:S}=i;return{onEventReceived:(e,p)=>{if(e===te&&typeof p.text=="string"&&typeof p.metadata=="object"){const o=p,u=We(o.type),t=o.metadata.chat_session_id??null,{currentChatSession:E,currentQuestionAnswer:b,currentQuestionAnswerSummary:T}=J(d,t);u!=="answer"?I.trackAICFOChatResponseGenerated(u,b?.question.questionText??"",o.text,t,Re(T,E),o.metadata.message_id??null):I.trackAICFOChatAnswerGenerated(o.text,b?.question.questionText??"",(o.follow_up_questions?.length??0)>0,!!o.assumptions,!!o.insights,o.visualization!=null,Ye(o.visualization?.type??"")??null,t,o.summarized_title,o.metadata.message_id??null),a(Ke({chatSessionId:o.metadata.chat_session_id,responseType:u,fetchState:{fetchState:"Completed",error:void 0}})),a(Xe({chatSessionId:o.metadata.chat_session_id,answerPayload:o,userId:l}))}},onSubmit:(e,p,o,u)=>{e&&Fe(a,e,p,f,d,l,u,o)},updateCurrentInput:e=>{a(X(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{a(He(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{h(-1)},onCloseClick:()=>{const e=B(s.state?.pathnameStackToGoBack),p=e.poppedPathname??st(1);h(p,{state:{...s.state,pathnameStackToGoBack:e.newStack}}),a(X(""))},togglePageView:()=>{const e=B(s.state?.pathnameStackToGoBack),p=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;h(p,{state:{...s.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),S(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{h(-1)},onNewChatClick:()=>{f!=null&&a(ze());const e=Le(s.state?.pathnameStackToGoBack,s.pathname);h(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,p)=>{a(qe({questionAnswerId:e,isCollapsed:p}))},onMenuClick:i.onMenuClick}})(Oe(Ue)),Et=({isFileUploadEnabled:a})=>{const{setIsAiCfoOpen:i}=we(),s=ge(),m=Ce(),l=Ie(),[h,f]=r.useState(!1);r.useEffect(()=>{s(Be())},[s]);const d=Y(n=>ee(n)),S=xe.getSignedInUser(),{session_id:e}=ke(),p=Pe(),o=_e(p),u=Y(n=>De(n)),t=d.uiState.currentChatSessionId,E=u.tenantEmailDomain,{handleUploadPromoClose:b,isUploadPromoVisible:T}=Ee({isFileUploadEnabled:a,tenantEmailDomain:E}),y=Te({currentTenant:u,currentChatSessionId:t,aiCfoView:d}),{isSuggestedQuestionsLoading:se,suggestedPromptQuestions:oe}=tt(),w=l.state,x=w?.aiCfoInitialQuestion,D=!!w?.aiCfoShouldSubmit;r.useEffect(()=>{const n=l.state;if(n?.[K]!==!0)return;f(!0);const g={...n};delete g[K],m(l,{replace:!0,state:g})},[l.pathname,l.search,l.state,m]);const[ae,v]=r.useState(null),[ne,Q]=r.useState(!1),[ie,_]=r.useState(void 0),[re,A]=r.useState(void 0),M=r.useRef(!1);r.useEffect(()=>{if(!M.current&&x!=null&&x!==""){const n=l.state;v(x),Q(D),_(n?.aiCfoInitialSubmissionSource!=null?n.aiCfoInitialSubmissionSource:void 0);const g=n?.aiCfoSuggestionIndex;A(typeof g=="number"?g:void 0),M.current=!0}},[x,D,l.state]);const le=r.useCallback(()=>{v(null),Q(!1),_(void 0),A(void 0)},[]),V=r.useMemo(()=>new URLSearchParams(l.search),[l.search]),G=V.get("ref")??w?.aiCfoRef,O=V.get("emailRefId")??w?.aiCfoEmailRefId,$=r.useRef(!1);r.useEffect(()=>{$.current||G!=="month-end-email"||O==null||t!=null||S==null||(s(Me("controller",S.userId,O,"MONTH_END_EMAIL")),$.current=!0)},[G,O,t,s,S]);const P=d.uiState.lastContextMessage;r.useEffect(()=>{P!=null&&P!==""&&t!=null&&(v(P),Q(!0),_(void 0),A(void 0),s(Ve()))},[P,t,s]);const ce=u.masterTOSInfo,C=ce?.isMasterTOSAccepted??!1,{visitedSessions:N}=ye(t),U=d.fetchState,j=d.uiState.chatSessionsNextPageToken.hasMore||!d.uiState.chatSessionsFirstPageFetched,q=t!=null?d.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",z=t==null||(d.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),H=d.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:ue}=J(H,t),de=ue.length===0;r.useEffect(()=>{C||o||m("../dashboard",{state:{...l.state,message:"open_ai_cfo_drawer"}})},[C,o,m,l.state]);const me=r.useCallback(()=>{const n=B(l.state?.pathnameStackToGoBack),g=u.tenantEmailDomain;m(n.poppedPathname??(g!=null?`/${g}/dashboard`:".."),{state:{...l.state,pathnameStackToGoBack:n.newStack}})},[u.tenantEmailDomain,l.state,m]);r.useEffect(()=>{t!=null&&e!==t&&m(`../ai-cfo/${t}`,{state:{...l.state}})},[t,e]),r.useEffect(()=>{e!=null&&t==null&&e!=="new_chat"&&e!=="explore"&&s(Ge({sessionId:e,agentId:"controller"}))},[]);const pe=r.useMemo(()=>({events:N.map(n=>`private-encrypted-chat-${n}.${te}`),eventCallback:(n,g,Se)=>Se.onEventReceived(n,g)}),[N]);r.useEffect(()=>{U!=="In-Progress"&&j&&s($e())},[U,j,s]),r.useEffect(()=>{t!=null&&q!=="In-Progress"&&z&&S!=null&&U==="Completed"&&!j&&s(Ne(t,S.userId))},[q,z,t,S,s]);const W=n=>n.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(S==null||e==null)throw Error("Can't access AI Controller page without signing in...");const fe=t!=null&&d.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";if(!C&&o)return c.jsxs(nt,{children:[c.jsx(L,{analytics:I,onLoad:W}),y.drawerElement,c.jsx(it,{children:c.jsx(Z,{children:c.jsx(F,{isTOSAccepted:!1,acceptMasterTOSState:d.masterTOSAcceptanceState,onCloseClick:me,onCompleteClick:()=>{u.userRoleId!=null&&s(R(u.userRoleId))}})})})]});const he=c.jsxs(c.Fragment,{children:[h&&!C?c.jsx(L,{analytics:I,onLoad:W}):null,c.jsx(F,{isTOSAccepted:C,acceptMasterTOSState:d.masterTOSAcceptanceState,showHeader:!1,togglePageView:C?()=>f(!1):void 0,onCloseClick:()=>f(!1),onCompleteClick:()=>{C||u.userRoleId==null||s(R(u.userRoleId)),f(!1)}})]});return c.jsxs(c.Fragment,{children:[c.jsxs(at,{children:[c.jsx(L,{analytics:I,onLoad:n=>n.trackPageLoaded(Ae.Event.aiCFOPage)}),o&&y.drawerElement,c.jsx(ot,{...pe,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:H,openOnboardingPage:()=>f(!0),userId:S.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:e,location:l,isSubmitting:fe,isEmptyChatWithSession:de,currentTenant:u,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:ne,onEmailLinkQuestionProcessed:le,routedInitialQuestionSource:ie,routedInitialQuestionSuggestionIndex:re,onMenuClick:o?y.open:void 0,isFileUploadEnabled:a,isUploadPromoVisible:T,onUploadPromoClose:b,exploreSuggestedPromptQuestions:oe,exploreSuggestedPromptQuestionsLoading:se}),h&&o?c.jsx(Ze,{anchor:"right",open:h,transitionDuration:250,PaperProps:{component:rt,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:c.jsx(Z,{onClick:n=>n.stopPropagation(),children:c.jsx(F,{isTOSAccepted:C,acceptMasterTOSState:d.masterTOSAcceptanceState,onCloseClick:()=>f(!1),onCompleteClick:()=>{C||u.userRoleId==null||s(R(u.userRoleId)),f(!1)}})})}):null]}),h&&!o?c.jsx(ve,{open:h,onClose:()=>f(!1),children:c.jsx(Qe,{children:he})}):null]})},Z=k(Je)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-OUACL7Sm.js";import{a as y}from"./sentry-COtwFETz.js";import{h as B,g as U,u as j,j as v,N,n as T,i as O,o as $,p as h}from"./core-CvVQwh-G.js";import{eS as F,O4 as A,NM as b,yr as I,yl as L,yp as w,ye as W,NO as q,yh as z,yt as H,ys as C}from"./zeni-epic-state-CECAZYIg.js";import{m as P,z as k,B as V,a8 as M,bH as G,af as _,bI as J}from"./index-LzTRB_X0.js";import"./mui-B_sWk5no.js";import{i as K}from"./ReimbursementApprovalRuleDetailScreen-DqNByTW4.js";import Q from"./NotFoundScreen-BXgaohYF.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]="e6814d6f-de6e-4d18-95b0-98d858f0a8fb",e._sentryDebugIdIdentifier="sentry-dbid-e6814d6f-de6e-4d18-95b0-98d858f0a8fb")}catch{}})();const R="bill-approval-rule-update",X=T(function(e){return{approvalView:A(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(R)&&e(q(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(W(a))},onEditRuleClick:a=>{a!=null?(e(w(a)),t(`./${a}/edit`)):(e(w()),t("./new"))}}})(M(G)),Y=()=>{const e=B(),o=U(),t=j(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>F(i)),r=v(i=>A(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(I())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(L(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(w())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${R}`]:[],eventCallback:(i,x,m)=>{i.endsWith(R)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx(N,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(X,{currentTenant:c,location:o,navigate:e,...f})},Z=T(function(e,o){const t=b(e),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),x=f.actors.selectedNonUsers.map(S=>{const E=!!K(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(x);g.push({action:f.stepType.selectedOption,actors:m,operator:m.length>1?f.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}},onResetClick:()=>{e(I()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(I()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(H())},onSaveRuleSuccess:()=>{t("../")}}})(J);function D(){const e=B(),o=j(),t=U(),{approvalRuleId:p}=O(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>A(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(z(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs($,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(Q,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-BRoLXdu-.js";import{h as J,u as se,g as X,i as ae,j as v,N as te,n as Y,l as na,o as ia,p as S}from"./core-BwBLfZO1.js";import{eS as H,Nm as Ue,bs as It,Ig as oa,bq as wt,bF as pe,Nn as Ct,xL as Bt,yV as Ne,yi as la,bn as De,No as sa,Np as ra,c1 as ca,Nq as da,jJ as xt,Nr as At,Ns as Et,zu as _e,x_ as xe,Nt as ua,xz as tt,Nu as pa,CG as ma,xD as ba,xJ as Dt,Nv as ke,Nw as Ge,yW as Me,Nx as ha,Ny as ga,yZ as Oe,Nz as ya,za as Sa,NA as jt,yG as at,yL as fa,NB as ka,NC as ue,ND as Tt,NE as Pt,NF as Ft,fP as va,y3 as Le,cw as Rt,NG as Ia,gW as wa,NH as Ca,NI as Ba,f1 as Vt,e$ as Nt,NJ as ze,NK as xa,NL as Aa,L5 as Ze,NM as Ea,L6 as oe,L7 as He,NN as Da,NO as ja,NP as Ta,yN as nt,yK as Pa,NQ as Fa,NR as Ra,NS as Va,yw as Na,NT as La,NU as $a,NV as Ua,ck as Lt,cL as $t,jU as _a,bL as Ga,bo as Ut,bM as _t,wR as Ma,NW as Oa,Ct as za,Cz as Za,td as Ha,yX as Wa,zB as qa,k5 as fe,NX as Ka,NY as Gt,kz as Ja,j$ as Mt,kk as Ot,kj as it,bE as be,bK as Xa,NZ as Ya,N_ as ve,iE as Qa,N$ as ot,O0 as en,iI as tn,j1 as an,zP as nn,O1 as on,ks as ln,zF as sn,O2 as lt,zJ as rn,zO as cn,zL as dn,zD as un,O3 as zt,xU as pn,O4 as mn,O5 as bn,fH as hn,fG as gn,fF as yn,k8 as Sn,kq as st,kB as fn,qM as kn,kh as vn,zH as In,iO as wn,kG as Cn,O6 as Bn,iG as xn,qD as An,O7 as En,yC as Dn,bG as jn,bt as Tn,K0 as Pn,cO as Fn,cN as Rn,cv as Vn,cB as Nn}from"./zeni-epic-state-5KAN0o5k.js";import{m as me,z as V,I as Ie,$ as We,a as le,G as y,aN as Ae,B as re,o as A,s as je,d as D,be as Ln,p as Z,a3 as qe,q as E,X as we,bf as rt,bg as ct,bh as $n,ak as Un,x as _n,aH as Gn,w as Zt,D as Ke,y as Je,bi as Mn,at as Ht,bj as On,Y as zn,f as Wt,a8 as Zn,bk as Hn,bl as Wn,bm as qn,bn as Kn,bo as Jn,bp as Xn,bq as Yn,br as Qn,bs as ei,K as ti,bt as ai,b9 as ni,bu as ii,bv as oi,i as li}from"./index-aRVrbNiC.js";import{n as $,S as si}from"./mui-BBkWv1mU.js";import{A as dt}from"./AddressScreen-D3HAG5Pr.js";import{g as ie,a as Te,i as qt,V as Xe,b as Ye,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-BnYbmIQy.js";import{a as f}from"./sentry-B_UPXuSC.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-DO0seTDc.js";import{u as Kt}from"./useInitialThreadRequest-D_32gSqj.js";import Ee from"./NotFoundScreen-DVKBuN7e.js";import{D as ui}from"./DrawerScreen-DGyfdHJW.js";import{M as Jt}from"./MobileAppDrawer-Df4Qimmh.js";import{F as Xt}from"./FeaturePreviewScreen-DDv7GOn2.js";import{S as Pe}from"./SetupPagesScreen-DFqkA6OC.js";import{B as pi}from"./BillPayApprovalRoutes-gDdPXgYD.js";import{FallBackRoute as mi}from"./ScreenRoutes-DjKy2K-h.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.js";import"./analyticsHelper-B5epc-PZ.js";import"./routePaths-hmakpH65.js";import"./BusinessVerificationPageScreen-BbDxcN3K.js";import"./ReimbursementApprovalRuleDetailScreen-CeUHThGh.js";import"./getLocaleForTenant-Bn0H95YD.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]="3090ea79-0196-42b6-acac-d8577a8b838b",e._sentryDebugIdIdentifier="sentry-dbid-3090ea79-0196-42b6-acac-d8577a8b838b")}catch{}})();const bi=Y(function(e,t){const l=Ue(e,t.billId),i=V.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:xt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${qe}/transaction_attachment`,signedInUser:i,showBackButton:o,isAdmin:m,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:D,showMarkAsPaidButtonToCreator:h,isZeniUser:n}},function(e,t){const{billId:l,currentTenant:i,location:c,navigate:r}=t,{tenantEmailDomain:u}=i;return{redirectToBillsScreen:()=>{const o=ie(u),s=E(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(ke({}))},deleteBill:o=>{D.trackBillPayDeleteBill(l,o),e(Dt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?D.trackBillPayCancelAndDeleteBill(l,o):D.trackBillPayCancelBill(l),e(ba(l,s))},onSaveRealTimeApprovals:o=>{e(ma(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pa({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(tt(l,o.type,"")):e(tt(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(xe(l,"retry")):e(xe(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(xe(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}))}}})(Ln);function hi(){const e=J(),t=se(),l=X(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(O=>H(O)),s=v(O=>Ue(O,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Kt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Qe({mobileExploreReferrer:"Bill Details"});We({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,B]=f.useState(!1),[x,U]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:_}=le(),{isFeatureEnabled:N}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:W}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=_(Ae.zeniAssistConfig),w=oa(o),M=wt(o.userRole),q=g&&pe(u?.loggedInUserRoleMap),L=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:K}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Q}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{N&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&w===!1?U(!1):U(s.billActivities[0]?.isRealTimeApprovalEnabled&&(M||q||s.allApprovers.find(O=>O.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,M,q,o.isZeni,w,r]),f.useEffect(()=>{i!=null&&t(Ct(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",N,L,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(B(!0),t(Ne(!1,N,L,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:N,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:x,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:K,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:W,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=Ke.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Y(function(e,t){const l=V.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=V.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Oe(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Me(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function C({appContent:e}){const t=se(),l=J(),{billId:i}=ae(),c=X(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=V.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),B=v(F=>H(F)),[x,U]=f.useState(!1),[T,_]=f.useState(!1),[N,I]=f.useState(!1),[W,G]=f.useState(),w=v(F=>Ge(F,m,g,i));let M=w.fetchState,q=w.file,L=w.showAutofill;const K=v(F=>Ue(F,i??""));u===!1&&(M=K.fetchState,q=K.transactionDetails?.attachments?.[0],L=!1);const Q=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;f.useEffect(()=>{i==null&&t(Me(!0))},[i,t]),f.useEffect(()=>{M==="Not-Started"&&(u&&T?_(!1):!u&&x&&U(!1))},[i]),f.useEffect(()=>{x||i==null||u||(U(!0),t(Bt(i,h,j,!1)),T||(_(!0),t(Ne(!1,h,j,b,i)))),u&&!T&&(_(!0),t(Ne(!1,h,j,b,i)))},[x,T,u,i,t]);const O={onOkClick:()=>{if(I(!1),!W)return;const F=q!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Oe(W,m,i))},onCancelClick:()=>{if(I(!1),!W)return;const F=q!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","no"),t(ha({file:W,billId:i}))}},ee=f.useCallback(()=>{const F=Z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(B.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,B.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(M==="Error"||K.fetchState==="Error")return a.jsx(Ee,{});if(M!="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:q,showAutofill:!0,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!w.isInitialEdit,billStage:Q}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||L?null:a.jsx(pt,{children:a.jsx(Yt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx($n,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[L&&o!=="small"?a.jsx(mt,{}):null,N?a.jsx(Un,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(Ci,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:O,isEditPopup:!0}):null,o==="small"||L?null:a.jsx(pt,{children:a.jsx(yi,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:q,showAutofill:L,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,K,w),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,w),isInitialEdit:!!w.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Mn();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-OUACL7Sm.js";import{h as J,u as se,g as X,i as ae,j as v,N as te,n as Y,l as na,o as ia,p as S}from"./core-CvVQwh-G.js";import{eS as H,Nm as Ue,bs as It,Ig as oa,bq as wt,bF as pe,Nn as Ct,xL as Bt,yV as Ne,yi as la,bn as De,No as sa,Np as ra,c1 as ca,Nq as da,jJ as xt,Nr as At,Ns as Et,zu as _e,x_ as xe,Nt as ua,xz as tt,Nu as pa,CG as ma,xD as ba,xJ as Dt,Nv as ke,Nw as Ge,yW as Me,Nx as ha,Ny as ga,yZ as Oe,Nz as ya,za as Sa,NA as jt,yG as at,yL as fa,NB as ka,NC as ue,ND as Tt,NE as Pt,NF as Ft,fP as va,y3 as Le,cw as Rt,NG as Ia,gW as wa,NH as Ca,NI as Ba,f1 as Vt,e$ as Nt,NJ as ze,NK as xa,NL as Aa,L5 as Ze,NM as Ea,L6 as oe,L7 as He,NN as Da,NO as ja,NP as Ta,yN as nt,yK as Pa,NQ as Fa,NR as Ra,NS as Va,yw as Na,NT as La,NU as $a,NV as Ua,ck as Lt,cL as $t,jU as _a,bL as Ga,bo as Ut,bM as _t,wR as Ma,NW as Oa,Ct as za,Cz as Za,td as Ha,yX as Wa,zB as qa,k5 as fe,NX as Ka,NY as Gt,kz as Ja,j$ as Mt,kk as Ot,kj as it,bE as be,bK as Xa,NZ as Ya,N_ as ve,iE as Qa,N$ as ot,O0 as en,iI as tn,j1 as an,zP as nn,O1 as on,ks as ln,zF as sn,O2 as lt,zJ as rn,zO as cn,zL as dn,zD as un,O3 as zt,xU as pn,O4 as mn,O5 as bn,fH as hn,fG as gn,fF as yn,k8 as Sn,kq as st,kB as fn,qM as kn,kh as vn,zH as In,iO as wn,kG as Cn,O6 as Bn,iG as xn,qD as An,O7 as En,yC as Dn,bG as jn,bt as Tn,K0 as Pn,cO as Fn,cN as Rn,cv as Vn,cB as Nn}from"./zeni-epic-state-CECAZYIg.js";import{m as me,z as V,I as Ie,$ as We,a as le,G as y,aN as Ae,B as re,o as A,s as je,d as D,be as Ln,p as Z,a3 as qe,q as E,X as we,bf as rt,bg as ct,bh as $n,ak as Un,x as _n,aH as Gn,w as Zt,D as Ke,y as Je,bi as Mn,at as Ht,bj as On,Y as zn,f as Wt,a8 as Zn,bk as Hn,bl as Wn,bm as qn,bn as Kn,bo as Jn,bp as Xn,bq as Yn,br as Qn,bs as ei,K as ti,bt as ai,b9 as ni,bu as ii,bv as oi,i as li}from"./index-LzTRB_X0.js";import{n as $,S as si}from"./mui-B_sWk5no.js";import{A as dt}from"./AddressScreen-DLTJPBtB.js";import{g as ie,a as Te,i as qt,V as Xe,b as Ye,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-R5H3Lj3F.js";import{a as f}from"./sentry-COtwFETz.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import{u as Kt}from"./useInitialThreadRequest-BRMmNSgV.js";import Ee from"./NotFoundScreen-BXgaohYF.js";import{D as ui}from"./DrawerScreen-C1-3TQnN.js";import{M as Jt}from"./MobileAppDrawer-C6MRZ7yW.js";import{F as Xt}from"./FeaturePreviewScreen-DeAByMab.js";import{S as Pe}from"./SetupPagesScreen-DhoJ2EKU.js";import{B as pi}from"./BillPayApprovalRoutes-BvMuz4fH.js";import{FallBackRoute as mi}from"./ScreenRoutes-CGfFu7WV.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./analyticsHelper-Cw9lxNal.js";import"./routePaths-CCOmiobh.js";import"./BusinessVerificationPageScreen-BXKB7X5s.js";import"./ReimbursementApprovalRuleDetailScreen-DqNByTW4.js";import"./getLocaleForTenant-BKpCR6Mg.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]="3090ea79-0196-42b6-acac-d8577a8b838b",e._sentryDebugIdIdentifier="sentry-dbid-3090ea79-0196-42b6-acac-d8577a8b838b")}catch{}})();const bi=Y(function(e,t){const l=Ue(e,t.billId),i=V.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:xt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${qe}/transaction_attachment`,signedInUser:i,showBackButton:o,isAdmin:m,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:D,showMarkAsPaidButtonToCreator:h,isZeniUser:n}},function(e,t){const{billId:l,currentTenant:i,location:c,navigate:r}=t,{tenantEmailDomain:u}=i;return{redirectToBillsScreen:()=>{const o=ie(u),s=E(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(ke({}))},deleteBill:o=>{D.trackBillPayDeleteBill(l,o),e(Dt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?D.trackBillPayCancelAndDeleteBill(l,o):D.trackBillPayCancelBill(l),e(ba(l,s))},onSaveRealTimeApprovals:o=>{e(ma(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pa({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(tt(l,o.type,"")):e(tt(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(xe(l,"retry")):e(xe(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(xe(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}))}}})(Ln);function hi(){const e=J(),t=se(),l=X(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(O=>H(O)),s=v(O=>Ue(O,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Kt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Qe({mobileExploreReferrer:"Bill Details"});We({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,B]=f.useState(!1),[x,U]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:_}=le(),{isFeatureEnabled:N}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:W}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=_(Ae.zeniAssistConfig),w=oa(o),M=wt(o.userRole),q=g&&pe(u?.loggedInUserRoleMap),L=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:K}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Q}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{N&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&w===!1?U(!1):U(s.billActivities[0]?.isRealTimeApprovalEnabled&&(M||q||s.allApprovers.find(O=>O.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,M,q,o.isZeni,w,r]),f.useEffect(()=>{i!=null&&t(Ct(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",N,L,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(B(!0),t(Ne(!1,N,L,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:N,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:x,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:K,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:W,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=Ke.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Y(function(e,t){const l=V.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=V.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Oe(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Me(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function C({appContent:e}){const t=se(),l=J(),{billId:i}=ae(),c=X(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=V.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),B=v(F=>H(F)),[x,U]=f.useState(!1),[T,_]=f.useState(!1),[N,I]=f.useState(!1),[W,G]=f.useState(),w=v(F=>Ge(F,m,g,i));let M=w.fetchState,q=w.file,L=w.showAutofill;const K=v(F=>Ue(F,i??""));u===!1&&(M=K.fetchState,q=K.transactionDetails?.attachments?.[0],L=!1);const Q=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;f.useEffect(()=>{i==null&&t(Me(!0))},[i,t]),f.useEffect(()=>{M==="Not-Started"&&(u&&T?_(!1):!u&&x&&U(!1))},[i]),f.useEffect(()=>{x||i==null||u||(U(!0),t(Bt(i,h,j,!1)),T||(_(!0),t(Ne(!1,h,j,b,i)))),u&&!T&&(_(!0),t(Ne(!1,h,j,b,i)))},[x,T,u,i,t]);const O={onOkClick:()=>{if(I(!1),!W)return;const F=q!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Oe(W,m,i))},onCancelClick:()=>{if(I(!1),!W)return;const F=q!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","no"),t(ha({file:W,billId:i}))}},ee=f.useCallback(()=>{const F=Z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(B.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,B.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(M==="Error"||K.fetchState==="Error")return a.jsx(Ee,{});if(M!="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:q,showAutofill:!0,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!w.isInitialEdit,billStage:Q}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||L?null:a.jsx(pt,{children:a.jsx(Yt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx($n,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=w.billPayInfo!=null&&w.billPayInfo.stage.code==="pending_approval"?w.billPayInfo.billStatus.code:w.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[L&&o!=="small"?a.jsx(mt,{}):null,N?a.jsx(Un,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(Ci,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:O,isEditPopup:!0}):null,o==="small"||L?null:a.jsx(pt,{children:a.jsx(yi,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:q,showAutofill:L,uploadStatus:w.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,K,w),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,w),isInitialEdit:!!w.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Mn();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=$.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-
|
|
1
|
+
import{j as k}from"./liveblocks-OUACL7Sm.js";import{a as V}from"./sentry-COtwFETz.js";import{h as ae,g as ne,u as se,i as ie,j as C,N as oe,n as re}from"./core-CvVQwh-G.js";import{I as ce,a as ue,aN as de,z as B,s as pe,d as z,af as E,f as x,bD as le,at as me,q as M,au as P}from"./index-LzTRB_X0.js";import{NU as fe,eS as q,sE as ye,Ik as Se,yw as ge,Bd as Ie,DM as he,Ep as be,Fq as Oe,Of as De,Og as Te,Oh as ke,Oi as Ce,Oj as Ve,KO as Ne,Nh as we,K_ as Ae,kp as _e,fH as Fe,fG as ve,fF as Ee,qM as xe,qD as Be,qA as ze,kh as Me,sN as Pe,sL as R,bE as L,sZ as U,cu as Re}from"./zeni-epic-state-CECAZYIg.js";import{n as Le}from"./mui-B_sWk5no.js";import{d as j}from"./routePaths-CCOmiobh.js";import{M as Ue}from"./MobileAppDrawer-C6MRZ7yW.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]="3b570407-cc13-4985-a32f-d2963e83345e",e._sentryDebugIdIdentifier="sentry-dbid-3b570407-cc13-4985-a32f-d2963e83345e")}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-BRoLXdu-.js";import{h as me,i as Aa,u as Ce,j as y,g as Ie,n as fe,N as Sa,s as Vt,o as Un,p as se}from"./core-BwBLfZO1.js";import{eS as ie,bt as He,PO as Na,e$ as Ee,f0 as Ae,f1 as ke,fW as Je,cr as ea,PP as aa,PQ as ut,tT as Ra,jR as Ua,PR as Oa,gW as ba,Aw as da,Ay as Ve,Az as mt,jH as Ht,PS as ta,Ak as ya,PT as On,PU as jn,An as Ma,PV as Vn,Oc as $a,s3 as Nt,At as ca,h5 as Hn,PW as Mt,PX as na,bo as Nn,PY as Mn,fH as Ga,fG as za,B1 as $n,fF as Qa,NU as Gn,PZ as $t,ck as Gt,cL as zn,Ob as ka,BD as zt,P_ as Ft,Bd as Ia,P$ as Qt,BE as Qn,OD as Yn,BF as Zn,Cz as Kn,td as Wn,Ct as qn,Q0 as Xn,Ax as We,Q1 as Jn,Q2 as er,Q3 as ar,Q4 as tr,Q5 as nr,Q6 as Ct,Q7 as rr,AO as Yt,AH as sr,Q8 as cr,fY as or,AX as Zt,A$ as Kt,fX as ir,Q9 as dr,Bp as Wt,Qa as lr,Qb as ur,Qc as mr,AZ as qt,AK as Xt,Aq as Jt,AT as en,AR as an,AV as Cr,Qd as tn,Qe as Ya,Ba as Ea,KT as nn,cN as pt,Qf as pr,Qg as hr,Qh as fr,Qi as gr,B7 as ct,Bw as br,Bs as yr,B3 as Sr,Bu as Ir,Bk as Er,Bm as Ar,Qj as rn,BC as La,Ig as kr,Qk as _r,Ql as Dr,Qm as wr,Qn as sn,Qo as Pr,BZ as vr,Bc as cn,B6 as Pe,Bb as Tr,Qp as Fr,Qq as Br,Ah as xr,Qr as on,Qs as dn,Qt as Lr,Aj as Rr,Ai as Bt,Qu as Ur,Qv as Or,Qw as jr,KP as Vr,Qx as ht,Qy as Hr,wU as ln,kp as Nr,gX as Mr,C2 as $r,Qz as un,QA as Gr,C3 as zr,QB as Qr,df as Yr,tN as Zr,BU as Kr,BO as je,bs as Wr,bF as qr,cw as Xr,bG as Jr,K0 as es}from"./zeni-epic-state-5KAN0o5k.js";import{z as ae,I as Me,a as oe,G as Y,B as _a,c4 as Za,cf as as,cg as ts,ch as ns,p as Ue,ci as rs,cj as ss,X as Da,aN as Re,q as Se,bo as ft,ck as cs,w as wa,j as Ka,m as gt,d as q,D as bt,a8 as Wa,cl as os,$ as mn,aq as yt,bA as oa,cm as ot,cn as is,s as St,co as ds,at as Cn,a3 as it,Y as pn,f as hn,cp as ls,cq as us,cr as ms,cs as Cs,ct as ps,cu as hs,o as ja,cv as fs,cw as gs,cx as tt,K as bs,cy as ys,cz as Ss,cA as Is,cB as Es,cC as As,i as ks}from"./index-aRVrbNiC.js";import{n as ve,D as fn,S as _s}from"./mui-BBkWv1mU.js";import{a as d}from"./sentry-B_UPXuSC.js";import{g as he,a as Pa,b as gn,c as _e,d as De,e as Ne,f as $e,h as Ge,A as Ds,i as It,P as ws,j as Et,s as ia,k as bn,l as qe,m as yn,n as Ps,o as Sn,p as vs,S as xt}from"./SetupPagesScreen-DFqkA6OC.js";import{u as In}from"./useInitialThreadRequest-D_32gSqj.js";import qa from"./NotFoundScreen-DVKBuN7e.js";import{M as Xe}from"./MobileAppDrawer-Df4Qimmh.js";import{u as En}from"./useAskAiCfoHostNavButtonProps-DO0seTDc.js";import{v as Lt}from"./utils-ox49Wmvb.js";import{d as Ts}from"./recharts-CiU9jjGx.js";import{t as Fs}from"./AddressScreen-D3HAG5Pr.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./analyticsHelper-B5epc-PZ.js";import"./routePaths-hmakpH65.js";import"./BusinessVerificationPageScreen-BbDxcN3K.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]="826904e9-1137-49cb-b33c-5e1f24a9e1c5",e._sentryDebugIdIdentifier="sentry-dbid-826904e9-1137-49cb-b33c-5e1f24a9e1c5")}catch{}})();function Bs(){const e=me(),{cardId:a}=Aa(),t=Ce(),r=ae.getSignedInUser(),n=y(Z=>ie(Z)),f=Me(),h=He(f?.loggedInUserRoleMap),{useFeatureGate:g}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[D,c]=d.useState(!1),l=y(Z=>Na(Z).firstViewAfterActivation);if(a==null)throw Error("Empty card id is not valid...");const v=n.userRole.includes("charge_card_user"),{isFeatureEnabled:S}=g(Y.isChargeCardFeatureEnabled),m=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=g(Y.isDebitCardFeatureEnabled),B=Ee(n),F=Ae(n),u=ke(R,n),p=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,w=_e({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:u}),o=De({isCardsOnlyTenant:B,isChargeCardFeatureEnabled:S,isBookKeepingTenant:F,isDebitCardProductVisible:w,chargeCardsCreditAccountLimit:p}),P=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,E=y(Z=>Je(Z,n.companyId)),O=ea(E.controllers),{creditAccount:I,creditAccountRepayment:b}=y(Z=>aa(Z)),x=y(Z=>Z.classListState.fetchState),i=!v&&o&&m,C=y(Z=>ut(Z,a,i,o)),[j,M]=d.useState(!1),L=C.chargeCard,T=L?.cardCreatedByUser?.userId,$=y(Z=>T!=null?Ra(Z.userRoleState,T):void 0),Q=$?.accountingClassIDs[0],H=y(Z=>Q!=null?Ua(Z.classState,{classId:Q,reportId:"class_list"}):void 0),A=L?.cardHolderUser?.userId,G=y(Z=>A!=null?Ra(Z.userRoleState,A):void 0),W=G?.accountingClassIDs[0],k=y(Z=>W!=null?Ua(Z.classState,{classId:W,reportId:"class_list"}):void 0),U=L?.type.code==="business_physical_credit_card"||L?.type.code==="business_physical_debit_card",ne=L?.type.code==="business_physical_debit_card";d.useEffect(()=>{l&&D===!1&&U&&(c(!0),setTimeout(()=>{t(Oa()),ne&&t(ba({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[l,D,U,ne]),d.useEffect(()=>{j||C.fetchState==="Completed"||C.fetchState==="In-Progress"||a==null||(M(!0),t(da(a,i,!1)))},[j,C,a,t]),d.useEffect(()=>{if(C.fetchState==="Completed"&&(U===!1||U&&L?.status?.code!=="active"||L?.cardHolderUserId!==r.userId||l===!1&&D===!1||L?.type.code==="business_physical_debit_card"||L?.type.code==="business_virtual_debit_card")){const Z=he(n.tenantEmailDomain,a,r,L,l);e(Z)}},[C.fetchState,l,U]),d.useEffect(()=>{I.fetchState!=="Completed"&&I.fetchState!=="In-Progress"&&o&&m&&h&&t(Ve()),b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&o&&m&&h&&t(mt()),x!=="Completed"&&x!=="In-Progress"&&t(Ht())},[I.fetchState,b.fetchState,t,o,m,h,x]);const J=()=>{if(r!=null&&a!=null){t(Oa());const Z=he(n.tenantEmailDomain,a,r);e(Z)}},_=L?.type.code==="business_physical_debit_card"||L?.type.code==="business_virtual_debit_card",z=Ne(o,w,P,m),X=Pa(o,m,h,I,b),ee=gn(_,C);return C.fetchState!=="Completed"?s.jsx(_a,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(Za,{showConfetti:l}),s.jsx(as,{onGotItClick:J,isDebitCard:L?.type.code==="business_physical_debit_card",controllerEmails:O,isChargeCardFeatureEnabled:o,isDebitCardFeatureEnabled:w,isDebitCardSetupEnabled:P,isChargeCardSetupEnabled:m,productInformation:z,creditAccountInformation:X,debitAccountInformation:ee,chargeCardDetailView:C,creditAccount:I,classListFetchState:x,creditAccountRepayment:b,cardIssuedByRoles:$?.userRoles,cardIssuedByDepartmentName:H?.className,cardHolderRoles:G?.userRoles,cardHolderDepartmentName:k?.className})]})}const At=e=>{const{events:a,onEvent:t,onSubscribed:r}=e,n=ts(),f=d.useRef(t),h=d.useRef(r),g=d.useRef(0);d.useEffect(()=>{f.current=t},[t]),d.useEffect(()=>{h.current=r},[r]);const D=d.useMemo(()=>[...a].sort().join("|"),[a]);d.useEffect(()=>{if(n==null||a.length===0)return;const c=[],l=new Set,v=()=>{if(h.current==null)return;const S=Date.now();S-g.current<5e3||(g.current=S,h.current())};return a.forEach(S=>{const[m,R]=ns(S);if(R==="")return;const B=n.channel(m),F=p=>{f.current(R,p)};let u;if(B?.subscribed===!0)u=B,u.bind(R,F),l.has(m)||(l.add(m),v()),c.push(()=>{B.unbind(R,F)});else{if(u=B??n.subscribe(m),u.bind(R,F),!l.has(m)){l.add(m);const p=()=>{v()};u.bind("pusher:subscription_succeeded",p),c.push(()=>{u.unbind("pusher:subscription_succeeded",p)})}c.push(()=>{u.unbind(R,F)})}}),()=>{c.forEach(S=>S())}},[n,D])},An="charge-card-transaction-update",kn="charge-card-transaction-created",_n="charge-card-transaction-declined",Dn="charge-card-transaction-updated",wn="charge-card-transaction-receipt-uploaded",ra="charge-card-status-update",kt="charge-card-spending-updated",Xa="credit-account-balance-updated",Ja="charge-card-created",_t="charge-card-limit-updated",Dt="charge-card-limit-reset",wt="charge-card-renamed",xs="charge-card-department-updated",Pn="charge-card-repayment-completed",vn="charge-card-payment-date-updated",va="charge-card-cashback-redeemed",Ta="charge-card-cashback-earned",sa=(e,a)=>e==null||e===""?[]:a.map(t=>`private-encrypted-${e}.${t}`),Ls=[Ta,va],Rs=fe(function(e){const a=ta(e);return{insightsData:a.insight,cashbackByPeriod:a.cashbackByPeriod,uiState:a.uiState,cashbackSummary:a.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(a,t)=>{e(On({uiState:{sortKey:a,sortOrder:t}}))}}})(ss);function Us(){const e=me(),a=Ce(),t=Ie(),r=ae.getSignedInUser(),n=y(R=>ie(R)),{useFeatureGate:f}=oe(),{isFeatureEnabled:h}=f(Y.isCardsCommentingEnabled),[g,D]=d.useState(!1),c=y(R=>ta(R)),l=In(n.companyId,{clearParams:c.fetchState==="Completed"}),v=d.useCallback(()=>{const R=Ue(t.state?.pathnameStackToGoBack),B=R.poppedPathname??Os(n.tenantEmailDomain);e(B,{state:{pathnameStackToGoBack:R.newStack}})},[e,t,n.tenantEmailDomain]),S=$e(n);if(At({events:sa(S,Ls),onEvent:R=>{switch(R){case Ta:case va:return void a(ya(!0))}},onSubscribed:()=>{a(ya(!0))}}),d.useEffect(()=>{g||c.fetchState==="Completed"||c.fetchState==="In-Progress"||(D(!0),a(ya()))},[g,c,a]),r==null)throw Error("Can't access cashback detail page without signing in...");const m=c.cashbackSummary?.cashbackEarned?.amount!=null&&c.fetchState!=="Not-Started";return c.fetchState!=="In-Progress"||m?(c.cashbackSummary?.cashbackEarned?.amount??0)===0&&c.fetchState==="Completed"?s.jsx(qa,{}):s.jsx(Rs,{onBackClick:v,isCardsCommentingEnabled:h,initialOpenThreadRequest:l}):s.jsx(rs,{onBackClick:v})}const Os=e=>`/${e}/cards`,js={containerWidth:new wa(100,58)},Vs=({appContent:e})=>{const a=Da(),t=Ce(),r=me(),{cardId:n}=Aa(),f=Ie(),{useDynamicConfig:h}=oe(),[g,D]=d.useState(!1),[c,l]=d.useState(!1),[v,S]=d.useState(!1),[m,R]=d.useState(!1),B=ae.getSignedInUser();if(B==null)throw Error("Can't access onboarding card page without signing in...");const F=y(k=>ie(k));if(n==null)throw Error("Empty card id is not valid...");const{configValue:u}=h(Re.zeniCardsConfig),p=u.max_charge_card_activation_attempts_by_card_id,w=y(k=>jn(k,n)),o=w.chargeCard,P=y(k=>k.chargeCardConfigState.fetchState),{useFeatureGate:E}=oe(),{isFeatureEnabled:O}=E(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=E(Y.isDebitCardFeatureEnabled),b=ke(I,F),x=_e({isDebitCardFeatureEnabled:I,isBankingOnlyTenant:b}),i=!!F.companyChargeCardInfo?.info?.isChargeCardEnabled,C=F.userRole.includes("charge_card_user"),j=Ee(F),M=Ae(F),L=F.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,T=De({isCardsOnlyTenant:j,isChargeCardFeatureEnabled:O,isBookKeepingTenant:M,isDebitCardProductVisible:x,chargeCardsCreditAccountLimit:L}),$=!C&&T&&i;d.useEffect(()=>{g===!1&&P!=="In-Progress"&&P!=="Completed"&&(t(Ma()),D(!0)),c===!1&&w.fetchState==="Not-Started"&&(l(!0),t(da(n,$,T)))},[c,w.fetchState,g,P]);const Q=o?.type.code==="business_physical_credit_card"||o?.type.code==="business_physical_debit_card";d.useEffect(()=>{if(w.fetchState==="Completed"){if(v===!1&&(Q===!1||Q&&o?.status?.code!=="inactive"||o?.cardHolderUserId!==B.userId)){const k=he(F.tenantEmailDomain,n,B,o,!0),U=Se(f.state?.pathnameStackToGoBack,f.pathname);r(k,{state:{pathnameStackToGoBack:U}})}else if(v&&w.isRefreshingViewInBackground===!1&&o?.status?.code==="active"){t(Vn({chargeCardId:n}));const k=he(F.tenantEmailDomain,n,B,o,!0),U=Se(f.state?.pathnameStackToGoBack,f.pathname);t($a()),r(k,{state:{pathnameStackToGoBack:U}})}}},[w.fetchState,o?.type.code,v,w.isRefreshingViewInBackground]);const H=ae.getZeniOtpTokenForCardHolder(n),A=y(k=>Nt(k.userState,B.userId)),G=()=>{o?.status?.code!=="active"&&t(ca(n,!0))};d.useEffect(()=>{w.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&o?.cardActivationAttemptHistory.some(k=>k.statusCode==="success")===!0&&v===!1&&(setTimeout(G,3e3),S(!0))},[w.updatePhysicalChargeCardAttemptFetchState.fetchState,o?.cardActivationAttemptHistory]);const W=k=>{R(k)};if(P!=="Completed"||o==null)return s.jsx(_a,{fetchState:"In-Progress"});if(o.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(A?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Ms,{children:[s.jsx(Xe,{isAppContentDrawerOpen:m,handleDrawerToggle:W}),s.jsx(Hs,{cardId:n,card:o,shippingAddressId:o.shippingAddressId,phone:A.phone,signedInUser:B,isSandboxEnv:ft(),chargeCardDetailState:w,signedInUserToken:H,navigate:r,currentTenant:F,location:f,maxChargeCardActivationAttempts:p[n]!=null?p[n]:u.default_max_charge_card_activation_attempts!=null?u.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:u.charge_card_cashback_rate_per_transaction!=null?u.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Ns,{windowSize:a,children:e}):null]})},Hs=fe(function(e,{chargeCardDetailState:a,shippingAddressId:t,location:r,cardId:n}){const f=Hn(e.addressState,t);if(f==null)throw Error("Can't access shippingAddress.");const h=Mt(e,n),g=a.updateStatus,D=na(e,!1,!1,!1);let c=!1;D.fetchState==="Completed"&&D.cards.length<=1&&(c=!0);const l=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:a.chargeCard?.providerCardCreateTime!=null&&a.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Nn())||l,showMenuIcon:c,shippingAddress:f,vgsVaultId:Ka.cardVaultId,twoFAView:h,activationWaitStatus:g,isRefreshingViewInBackground:a.isRefreshingViewInBackground}},function(e,a){const{navigate:t,cardId:r,location:n,currentTenant:f,chargeCardDetailState:h}=a,g=h.chargeCard?.cardProviderID,{tenantEmailDomain:D}=f;return{onGetOtp:c=>{g!=null&&e(Qa(c,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:c=>{e($n(r,c))},onResendOtp:c=>{g!=null&&e(za(c,"ChargeCardHolder",r))},onVerifyOtp:(c,l)=>{g!=null&&e(Ga(c,l,"ChargeCardHolder",r))},onVerifyOtpSuccess:c=>{c!=null&&ae.saveZeniOtpTokenForCardHolder(c,r)},onCVVActivateSuccess:()=>{e(Mn({chargeCardId:r}))},onBackClick:()=>{const c=Ue(n.state?.pathnameStackToGoBack),l=c.poppedPathname==null||c.poppedPathname.includes("onboard")===!0?Ge(D):c.poppedPathname;t(l,{state:{pathnameStackToGoBack:c.newStack}})}}})(cs),Ns=ve.div`
|
|
1
|
+
import{j as s}from"./liveblocks-OUACL7Sm.js";import{h as me,i as Aa,u as Ce,j as y,g as Ie,n as fe,N as Sa,s as Vt,o as Un,p as se}from"./core-CvVQwh-G.js";import{eS as ie,bt as He,PO as Na,e$ as Ee,f0 as Ae,f1 as ke,fW as Je,cr as ea,PP as aa,PQ as ut,tT as Ra,jR as Ua,PR as Oa,gW as ba,Aw as da,Ay as Ve,Az as mt,jH as Ht,PS as ta,Ak as ya,PT as On,PU as jn,An as Ma,PV as Vn,Oc as $a,s3 as Nt,At as ca,h5 as Hn,PW as Mt,PX as na,bo as Nn,PY as Mn,fH as Ga,fG as za,B1 as $n,fF as Qa,NU as Gn,PZ as $t,ck as Gt,cL as zn,Ob as ka,BD as zt,P_ as Ft,Bd as Ia,P$ as Qt,BE as Qn,OD as Yn,BF as Zn,Cz as Kn,td as Wn,Ct as qn,Q0 as Xn,Ax as We,Q1 as Jn,Q2 as er,Q3 as ar,Q4 as tr,Q5 as nr,Q6 as Ct,Q7 as rr,AO as Yt,AH as sr,Q8 as cr,fY as or,AX as Zt,A$ as Kt,fX as ir,Q9 as dr,Bp as Wt,Qa as lr,Qb as ur,Qc as mr,AZ as qt,AK as Xt,Aq as Jt,AT as en,AR as an,AV as Cr,Qd as tn,Qe as Ya,Ba as Ea,KT as nn,cN as pt,Qf as pr,Qg as hr,Qh as fr,Qi as gr,B7 as ct,Bw as br,Bs as yr,B3 as Sr,Bu as Ir,Bk as Er,Bm as Ar,Qj as rn,BC as La,Ig as kr,Qk as _r,Ql as Dr,Qm as wr,Qn as sn,Qo as Pr,BZ as vr,Bc as cn,B6 as Pe,Bb as Tr,Qp as Fr,Qq as Br,Ah as xr,Qr as on,Qs as dn,Qt as Lr,Aj as Rr,Ai as Bt,Qu as Ur,Qv as Or,Qw as jr,KP as Vr,Qx as ht,Qy as Hr,wU as ln,kp as Nr,gX as Mr,C2 as $r,Qz as un,QA as Gr,C3 as zr,QB as Qr,df as Yr,tN as Zr,BU as Kr,BO as je,bs as Wr,bF as qr,cw as Xr,bG as Jr,K0 as es}from"./zeni-epic-state-CECAZYIg.js";import{z as ae,I as Me,a as oe,G as Y,B as _a,c4 as Za,cf as as,cg as ts,ch as ns,p as Ue,ci as rs,cj as ss,X as Da,aN as Re,q as Se,bo as ft,ck as cs,w as wa,j as Ka,m as gt,d as q,D as bt,a8 as Wa,cl as os,$ as mn,aq as yt,bA as oa,cm as ot,cn as is,s as St,co as ds,at as Cn,a3 as it,Y as pn,f as hn,cp as ls,cq as us,cr as ms,cs as Cs,ct as ps,cu as hs,o as ja,cv as fs,cw as gs,cx as tt,K as bs,cy as ys,cz as Ss,cA as Is,cB as Es,cC as As,i as ks}from"./index-LzTRB_X0.js";import{n as ve,D as fn,S as _s}from"./mui-B_sWk5no.js";import{a as d}from"./sentry-COtwFETz.js";import{g as he,a as Pa,b as gn,c as _e,d as De,e as Ne,f as $e,h as Ge,A as Ds,i as It,P as ws,j as Et,s as ia,k as bn,l as qe,m as yn,n as Ps,o as Sn,p as vs,S as xt}from"./SetupPagesScreen-DhoJ2EKU.js";import{u as In}from"./useInitialThreadRequest-BRMmNSgV.js";import qa from"./NotFoundScreen-BXgaohYF.js";import{M as Xe}from"./MobileAppDrawer-C6MRZ7yW.js";import{u as En}from"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import{v as Lt}from"./utils-B-68Nh7i.js";import{d as Ts}from"./recharts-ScPc1hFQ.js";import{t as Fs}from"./AddressScreen-DLTJPBtB.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./analyticsHelper-Cw9lxNal.js";import"./routePaths-CCOmiobh.js";import"./BusinessVerificationPageScreen-BXKB7X5s.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]="826904e9-1137-49cb-b33c-5e1f24a9e1c5",e._sentryDebugIdIdentifier="sentry-dbid-826904e9-1137-49cb-b33c-5e1f24a9e1c5")}catch{}})();function Bs(){const e=me(),{cardId:a}=Aa(),t=Ce(),r=ae.getSignedInUser(),n=y(Z=>ie(Z)),f=Me(),h=He(f?.loggedInUserRoleMap),{useFeatureGate:g}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[D,c]=d.useState(!1),l=y(Z=>Na(Z).firstViewAfterActivation);if(a==null)throw Error("Empty card id is not valid...");const v=n.userRole.includes("charge_card_user"),{isFeatureEnabled:S}=g(Y.isChargeCardFeatureEnabled),m=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=g(Y.isDebitCardFeatureEnabled),B=Ee(n),F=Ae(n),u=ke(R,n),p=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,w=_e({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:u}),o=De({isCardsOnlyTenant:B,isChargeCardFeatureEnabled:S,isBookKeepingTenant:F,isDebitCardProductVisible:w,chargeCardsCreditAccountLimit:p}),P=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,E=y(Z=>Je(Z,n.companyId)),O=ea(E.controllers),{creditAccount:I,creditAccountRepayment:b}=y(Z=>aa(Z)),x=y(Z=>Z.classListState.fetchState),i=!v&&o&&m,C=y(Z=>ut(Z,a,i,o)),[j,M]=d.useState(!1),L=C.chargeCard,T=L?.cardCreatedByUser?.userId,$=y(Z=>T!=null?Ra(Z.userRoleState,T):void 0),Q=$?.accountingClassIDs[0],H=y(Z=>Q!=null?Ua(Z.classState,{classId:Q,reportId:"class_list"}):void 0),A=L?.cardHolderUser?.userId,G=y(Z=>A!=null?Ra(Z.userRoleState,A):void 0),W=G?.accountingClassIDs[0],k=y(Z=>W!=null?Ua(Z.classState,{classId:W,reportId:"class_list"}):void 0),U=L?.type.code==="business_physical_credit_card"||L?.type.code==="business_physical_debit_card",ne=L?.type.code==="business_physical_debit_card";d.useEffect(()=>{l&&D===!1&&U&&(c(!0),setTimeout(()=>{t(Oa()),ne&&t(ba({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[l,D,U,ne]),d.useEffect(()=>{j||C.fetchState==="Completed"||C.fetchState==="In-Progress"||a==null||(M(!0),t(da(a,i,!1)))},[j,C,a,t]),d.useEffect(()=>{if(C.fetchState==="Completed"&&(U===!1||U&&L?.status?.code!=="active"||L?.cardHolderUserId!==r.userId||l===!1&&D===!1||L?.type.code==="business_physical_debit_card"||L?.type.code==="business_virtual_debit_card")){const Z=he(n.tenantEmailDomain,a,r,L,l);e(Z)}},[C.fetchState,l,U]),d.useEffect(()=>{I.fetchState!=="Completed"&&I.fetchState!=="In-Progress"&&o&&m&&h&&t(Ve()),b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&o&&m&&h&&t(mt()),x!=="Completed"&&x!=="In-Progress"&&t(Ht())},[I.fetchState,b.fetchState,t,o,m,h,x]);const J=()=>{if(r!=null&&a!=null){t(Oa());const Z=he(n.tenantEmailDomain,a,r);e(Z)}},_=L?.type.code==="business_physical_debit_card"||L?.type.code==="business_virtual_debit_card",z=Ne(o,w,P,m),X=Pa(o,m,h,I,b),ee=gn(_,C);return C.fetchState!=="Completed"?s.jsx(_a,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(Za,{showConfetti:l}),s.jsx(as,{onGotItClick:J,isDebitCard:L?.type.code==="business_physical_debit_card",controllerEmails:O,isChargeCardFeatureEnabled:o,isDebitCardFeatureEnabled:w,isDebitCardSetupEnabled:P,isChargeCardSetupEnabled:m,productInformation:z,creditAccountInformation:X,debitAccountInformation:ee,chargeCardDetailView:C,creditAccount:I,classListFetchState:x,creditAccountRepayment:b,cardIssuedByRoles:$?.userRoles,cardIssuedByDepartmentName:H?.className,cardHolderRoles:G?.userRoles,cardHolderDepartmentName:k?.className})]})}const At=e=>{const{events:a,onEvent:t,onSubscribed:r}=e,n=ts(),f=d.useRef(t),h=d.useRef(r),g=d.useRef(0);d.useEffect(()=>{f.current=t},[t]),d.useEffect(()=>{h.current=r},[r]);const D=d.useMemo(()=>[...a].sort().join("|"),[a]);d.useEffect(()=>{if(n==null||a.length===0)return;const c=[],l=new Set,v=()=>{if(h.current==null)return;const S=Date.now();S-g.current<5e3||(g.current=S,h.current())};return a.forEach(S=>{const[m,R]=ns(S);if(R==="")return;const B=n.channel(m),F=p=>{f.current(R,p)};let u;if(B?.subscribed===!0)u=B,u.bind(R,F),l.has(m)||(l.add(m),v()),c.push(()=>{B.unbind(R,F)});else{if(u=B??n.subscribe(m),u.bind(R,F),!l.has(m)){l.add(m);const p=()=>{v()};u.bind("pusher:subscription_succeeded",p),c.push(()=>{u.unbind("pusher:subscription_succeeded",p)})}c.push(()=>{u.unbind(R,F)})}}),()=>{c.forEach(S=>S())}},[n,D])},An="charge-card-transaction-update",kn="charge-card-transaction-created",_n="charge-card-transaction-declined",Dn="charge-card-transaction-updated",wn="charge-card-transaction-receipt-uploaded",ra="charge-card-status-update",kt="charge-card-spending-updated",Xa="credit-account-balance-updated",Ja="charge-card-created",_t="charge-card-limit-updated",Dt="charge-card-limit-reset",wt="charge-card-renamed",xs="charge-card-department-updated",Pn="charge-card-repayment-completed",vn="charge-card-payment-date-updated",va="charge-card-cashback-redeemed",Ta="charge-card-cashback-earned",sa=(e,a)=>e==null||e===""?[]:a.map(t=>`private-encrypted-${e}.${t}`),Ls=[Ta,va],Rs=fe(function(e){const a=ta(e);return{insightsData:a.insight,cashbackByPeriod:a.cashbackByPeriod,uiState:a.uiState,cashbackSummary:a.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(a,t)=>{e(On({uiState:{sortKey:a,sortOrder:t}}))}}})(ss);function Us(){const e=me(),a=Ce(),t=Ie(),r=ae.getSignedInUser(),n=y(R=>ie(R)),{useFeatureGate:f}=oe(),{isFeatureEnabled:h}=f(Y.isCardsCommentingEnabled),[g,D]=d.useState(!1),c=y(R=>ta(R)),l=In(n.companyId,{clearParams:c.fetchState==="Completed"}),v=d.useCallback(()=>{const R=Ue(t.state?.pathnameStackToGoBack),B=R.poppedPathname??Os(n.tenantEmailDomain);e(B,{state:{pathnameStackToGoBack:R.newStack}})},[e,t,n.tenantEmailDomain]),S=$e(n);if(At({events:sa(S,Ls),onEvent:R=>{switch(R){case Ta:case va:return void a(ya(!0))}},onSubscribed:()=>{a(ya(!0))}}),d.useEffect(()=>{g||c.fetchState==="Completed"||c.fetchState==="In-Progress"||(D(!0),a(ya()))},[g,c,a]),r==null)throw Error("Can't access cashback detail page without signing in...");const m=c.cashbackSummary?.cashbackEarned?.amount!=null&&c.fetchState!=="Not-Started";return c.fetchState!=="In-Progress"||m?(c.cashbackSummary?.cashbackEarned?.amount??0)===0&&c.fetchState==="Completed"?s.jsx(qa,{}):s.jsx(Rs,{onBackClick:v,isCardsCommentingEnabled:h,initialOpenThreadRequest:l}):s.jsx(rs,{onBackClick:v})}const Os=e=>`/${e}/cards`,js={containerWidth:new wa(100,58)},Vs=({appContent:e})=>{const a=Da(),t=Ce(),r=me(),{cardId:n}=Aa(),f=Ie(),{useDynamicConfig:h}=oe(),[g,D]=d.useState(!1),[c,l]=d.useState(!1),[v,S]=d.useState(!1),[m,R]=d.useState(!1),B=ae.getSignedInUser();if(B==null)throw Error("Can't access onboarding card page without signing in...");const F=y(k=>ie(k));if(n==null)throw Error("Empty card id is not valid...");const{configValue:u}=h(Re.zeniCardsConfig),p=u.max_charge_card_activation_attempts_by_card_id,w=y(k=>jn(k,n)),o=w.chargeCard,P=y(k=>k.chargeCardConfigState.fetchState),{useFeatureGate:E}=oe(),{isFeatureEnabled:O}=E(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=E(Y.isDebitCardFeatureEnabled),b=ke(I,F),x=_e({isDebitCardFeatureEnabled:I,isBankingOnlyTenant:b}),i=!!F.companyChargeCardInfo?.info?.isChargeCardEnabled,C=F.userRole.includes("charge_card_user"),j=Ee(F),M=Ae(F),L=F.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,T=De({isCardsOnlyTenant:j,isChargeCardFeatureEnabled:O,isBookKeepingTenant:M,isDebitCardProductVisible:x,chargeCardsCreditAccountLimit:L}),$=!C&&T&&i;d.useEffect(()=>{g===!1&&P!=="In-Progress"&&P!=="Completed"&&(t(Ma()),D(!0)),c===!1&&w.fetchState==="Not-Started"&&(l(!0),t(da(n,$,T)))},[c,w.fetchState,g,P]);const Q=o?.type.code==="business_physical_credit_card"||o?.type.code==="business_physical_debit_card";d.useEffect(()=>{if(w.fetchState==="Completed"){if(v===!1&&(Q===!1||Q&&o?.status?.code!=="inactive"||o?.cardHolderUserId!==B.userId)){const k=he(F.tenantEmailDomain,n,B,o,!0),U=Se(f.state?.pathnameStackToGoBack,f.pathname);r(k,{state:{pathnameStackToGoBack:U}})}else if(v&&w.isRefreshingViewInBackground===!1&&o?.status?.code==="active"){t(Vn({chargeCardId:n}));const k=he(F.tenantEmailDomain,n,B,o,!0),U=Se(f.state?.pathnameStackToGoBack,f.pathname);t($a()),r(k,{state:{pathnameStackToGoBack:U}})}}},[w.fetchState,o?.type.code,v,w.isRefreshingViewInBackground]);const H=ae.getZeniOtpTokenForCardHolder(n),A=y(k=>Nt(k.userState,B.userId)),G=()=>{o?.status?.code!=="active"&&t(ca(n,!0))};d.useEffect(()=>{w.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&o?.cardActivationAttemptHistory.some(k=>k.statusCode==="success")===!0&&v===!1&&(setTimeout(G,3e3),S(!0))},[w.updatePhysicalChargeCardAttemptFetchState.fetchState,o?.cardActivationAttemptHistory]);const W=k=>{R(k)};if(P!=="Completed"||o==null)return s.jsx(_a,{fetchState:"In-Progress"});if(o.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(A?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Ms,{children:[s.jsx(Xe,{isAppContentDrawerOpen:m,handleDrawerToggle:W}),s.jsx(Hs,{cardId:n,card:o,shippingAddressId:o.shippingAddressId,phone:A.phone,signedInUser:B,isSandboxEnv:ft(),chargeCardDetailState:w,signedInUserToken:H,navigate:r,currentTenant:F,location:f,maxChargeCardActivationAttempts:p[n]!=null?p[n]:u.default_max_charge_card_activation_attempts!=null?u.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:u.charge_card_cashback_rate_per_transaction!=null?u.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Ns,{windowSize:a,children:e}):null]})},Hs=fe(function(e,{chargeCardDetailState:a,shippingAddressId:t,location:r,cardId:n}){const f=Hn(e.addressState,t);if(f==null)throw Error("Can't access shippingAddress.");const h=Mt(e,n),g=a.updateStatus,D=na(e,!1,!1,!1);let c=!1;D.fetchState==="Completed"&&D.cards.length<=1&&(c=!0);const l=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:a.chargeCard?.providerCardCreateTime!=null&&a.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Nn())||l,showMenuIcon:c,shippingAddress:f,vgsVaultId:Ka.cardVaultId,twoFAView:h,activationWaitStatus:g,isRefreshingViewInBackground:a.isRefreshingViewInBackground}},function(e,a){const{navigate:t,cardId:r,location:n,currentTenant:f,chargeCardDetailState:h}=a,g=h.chargeCard?.cardProviderID,{tenantEmailDomain:D}=f;return{onGetOtp:c=>{g!=null&&e(Qa(c,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:c=>{e($n(r,c))},onResendOtp:c=>{g!=null&&e(za(c,"ChargeCardHolder",r))},onVerifyOtp:(c,l)=>{g!=null&&e(Ga(c,l,"ChargeCardHolder",r))},onVerifyOtpSuccess:c=>{c!=null&&ae.saveZeniOtpTokenForCardHolder(c,r)},onCVVActivateSuccess:()=>{e(Mn({chargeCardId:r}))},onBackClick:()=>{const c=Ue(n.state?.pathnameStackToGoBack),l=c.poppedPathname==null||c.poppedPathname.includes("onboard")===!0?Ge(D):c.poppedPathname;t(l,{state:{pathnameStackToGoBack:c.newStack}})}}})(cs),Ns=ve.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: ${e=>`${js.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-OUACL7Sm.js";import{a as g}from"./sentry-COtwFETz.js";import{h as w,u as k,g as x,i as T,j as O,n as E}from"./core-CvVQwh-G.js";import{z as b,b9 as F,s as P,d as V,f as A,af as N,ba as j,at as L,au as M,q as U}from"./index-LzTRB_X0.js";import{eS as C,fJ as B,sE as _,fE as R,c1 as q,Nh as z,bn as G,qM as Y,qA as H,kh as J,lN as S,Ni as Z,bE as $,cu as h,lV as K,lY as Q}from"./zeni-epic-state-CECAZYIg.js";import"./mui-B_sWk5no.js";import{d as W}from"./routePaths-CCOmiobh.js";import{M as X}from"./MobileAppDrawer-C6MRZ7yW.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]="0ebd02fb-e27e-4a67-980e-51ea90e03e71",t._sentryDebugIdIdentifier="sentry-dbid-0ebd02fb-e27e-4a67-980e-51ea90e03e71")}catch{}})();const ee=E(function(t){const a=R(t),i=b.getSignedInUser(),l=C(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=q(l?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:G(i)}},function(t,a){const{companyId:i,currentTenant:l,navigate:c,location:p}=a,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const n=W(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:D}=r,v={companyInfo:{...n,website:u!=""&&u!=null?h(u):void 0,meetingLink:y!=""&&y!=null?h(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:M(I))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?$(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:D.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};t(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{t(Z(e))},onCompanyOfficerUpdated:e=>{t(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{t(J({files:e}))},onDeleteFile:e=>{t(H(e))},onEditFileName:(e,n)=>{t(Y(e,n.split(".")[0]))}}})(j);function de(){const t=w(),a=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),n=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>C(s)),d=r.companyId??b.getSignedInUserTenant(l)?.companyId;if(b.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),a(B(d)))},[c,n,d,a]),g.useEffect(()=>{o==="Not-Started"&&a(_())},[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(A.Event.companyPassport,N(i)?"Settings":"Company Passport")}),N(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:N(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-OUACL7Sm.js";import{a}from"./sentry-COtwFETz.js";import{u as D,g as v,j as m,N as w}from"./core-CvVQwh-G.js";import{JY as A,eS as O,fr as _,nh as j,fS as h,fq as U,eZ as L,K3 as F}from"./zeni-epic-state-CECAZYIg.js";import{u as $,z as p,L as g,D as k,o as H}from"./index-LzTRB_X0.js";import{n as z}from"./mui-B_sWk5no.js";import{t as R}from"./getLocaleForTenant-BKpCR6Mg.js";import{g as P,Q as q}from"./QBOConnectionScreen-YQRuxVuF.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./empty-CqdRwXT0.js";import"./pdf-lib-B6zbzfIK.js";import"./index-DkXdrecr.js";import"./url-DgoPdzhF.js";import"./index-6ei8cz0C.js";import"./decodeURIComponentSafe-C_ttRntx.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="12781307-110a-4794-9625-50caba831efa",t._sentryDebugIdIdentifier="sentry-dbid-12781307-110a-4794-9625-50caba831efa")}catch{}})();const G=z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-OUACL7Sm.js";import{z as n}from"./index-LzTRB_X0.js";import{g as d}from"./QBOConnectionScreen-YQRuxVuF.js";import"./sentry-COtwFETz.js";import{g as p,N as a}from"./core-CvVQwh-G.js";import"./zeni-epic-state-CECAZYIg.js";import"./recharts-ScPc1hFQ.js";import"./mui-B_sWk5no.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./empty-CqdRwXT0.js";import"./pdf-lib-B6zbzfIK.js";import"./index-DkXdrecr.js";import"./url-DgoPdzhF.js";import"./index-6ei8cz0C.js";import"./decodeURIComponentSafe-C_ttRntx.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e53e9b9f-4e1e-4d41-afae-a46e42efc4b3",e._sentryDebugIdIdentifier="sentry-dbid-e53e9b9f-4e1e-4d41-afae-a46e42efc4b3")}catch{}})();const U=()=>{const e=p(),{code:t,realmId:o,state:r}=d(e.search),s=n.getSignedInUser()?.userId??"";if(f(t,o,r,s)===!0){const m=`../../${r}/onboarding?code=${t}&realmId=${o}&state=auth_flow`;return i.jsx(a,{to:m})}return i.jsx(a,{to:"../../"})},f=(e,t,o,r)=>e!=""&&t!=""&&o!=""&&r!=null&&r!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-1feU8VPE.js → CustomerOnboardingRoutes-Bb0R8e9B.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-OUACL7Sm.js";import{t as $e,A as Ce}from"./AddressScreen-DLTJPBtB.js";import Ke from"./NotFoundScreen-BXgaohYF.js";import{a as g}from"./sentry-COtwFETz.js";import{h as oe,g as se,u as ie,i as re,j,N as D,n as ce,l as ze,o as Me,p as K}from"./core-CvVQwh-G.js";import{K as de,I as le,z as V,a as ue,m as qe,G as _,k as Qe,q as U,s as H,d as G,B as we,f as X,ap as Ze,X as He,aq as Ie,j as te,ar as We,as as ke,o as Xe,at as Ye,au as Te,av as Je}from"./index-LzTRB_X0.js";import{eS as J,fj as et,f1 as pe,e$ as me,bs as tt,nf as at,ff as nt,bO as ot,jl as ae,jo as ve,Ks as st,bT as it,c1 as ge,sS as fe,sD as rt,KY as Y,sT as _e,Ik as ct,kp as Ue,KZ as Ve,K_ as dt,K$ as lt,L0 as ut,jj as pt,jm as mt,sF as Be,sR as gt,bE as xe,cu as ft,t3 as Ee,qM as ht,qA as yt,kh as St,fH as bt,fG as Ct,fF as It,L1 as kt,sx as Tt,t4 as xt,t7 as Et,ta as Ot,tg as Pt,cT as Dt}from"./zeni-epic-state-CECAZYIg.js";import{n as he}from"./mui-B_sWk5no.js";import{g as At,h as Ft,q as ne}from"./QBOConnectionScreen-YQRuxVuF.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./empty-CqdRwXT0.js";import"./pdf-lib-B6zbzfIK.js";import"./index-DkXdrecr.js";import"./url-DgoPdzhF.js";import"./index-6ei8cz0C.js";import"./decodeURIComponentSafe-C_ttRntx.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]="f116ee6c-fa47-4a52-91ff-dd4a353be113",t._sentryDebugIdIdentifier="sentry-dbid-f116ee6c-fa47-4a52-91ff-dd4a353be113")}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 d=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(d.reportsInOrder.map(c=>({fetchState:c.fetchState,error:c.error}))).fetchState}},function(t,o){const{themeState:s,navigate:d,location:c}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=U(c.state?.pathnameStackToGoBack,c.pathname);d("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Ze),wt=()=>{const t=oe(),o=se(),s=ie(),d=de(),[c,r]=g.useState(!1),[p,y]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=V.getSignedInUser(),{useFeatureGate:l}=ue(),C=qe(),{isFeatureEnabled:x}=l(_.isApAgingFeatureEnabled),{isFeatureEnabled:A}=l(_.isArAgingFeatureEnabled),{isFeatureEnabled:E}=l(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:k}=l(_.isReferralFeatureEnabled),{isFeatureEnabled:S}=l(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:v}=l(_.isDebitCardFeatureEnabled),I=Qe(),f=j(u=>J(u)),{isFeatureEnabled:R}=l(_.isTreasuryEnabled),m=f.company!=null&&et(f.company),B=R&&m,T=j(u=>u.onboardingCustomerViewState.fetchState),F=f.excludedResources,L=f.companyId??V.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const b=pe(v,f),O=me(f),P=[],N=F?.resources?.find(u=>u.resource==="/reports/top_expenses")==null,q=F?.resources?.find(u=>u.resource==="/reports/task_card")==null,Q=f?.userRole!=null&&tt(f?.userRole),$=F?.resources?.find(u=>u.resource==="/bills")==null&&!Q,z=F?.resources?.find(u=>u.resource==="/reimbursements")==null;if(N===!1&&P.push("top_expenses"),q===!1&&P.push("task_card"),$===!1&&P.push("bill_pay_card","bill_pay_promo_card"),z===!1&&P.push("reimbursement_card","reimbursement_promo_card"),E===!1&&P.push("zeni_accounts_promo_card"),k===!1&&P.push("rewards_card"),g.useEffect(()=>{T!=="Completed"||c||b||O||(r(!0),s(at(i.userId,L,f.tenantId,!0,!1,P)))},[c,T,b,O,i,f.tenantId,s]),g.useEffect(()=>{(b||O)&&setTimeout(()=>{y(!0)},5e3)},[b,O]),T!=="Completed")return a.jsx(D,{to:"../"});if(T==="Completed"&&p){const u=U(o.state?.pathnameStackToGoBack,o.pathname);if(b)return a.jsx(D,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:u,message:"activation"}});if(O)return a.jsx(D,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:u,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(H,{analytics:G,onLoad:u=>(M=>M.trackPageLoaded(X.Event.onboardingDashboardActivation))(u)}),a.jsx(jt,{navigate:t,location:o,themeState:d,signedInUser:i,isApAgingFeatureEnabled:x,isArAgingFeatureEnabled:A,shouldFetchZeniAccountsPromoCard:E,shouldFetchRewardsPlanCard:k,isExpenseAutomationEnabledForUser:I,isExpenseAutomationFeatureEnabledV2:S,isTreasuryEnabled:B,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(we,{fetchState:"In-Progress",style:{backgroundColor:C.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 d}from"./liveblocks-BRoLXdu-.js";import{i as K,j as _,g as H,u as z,h as W,n as ee,k as da,o as kt,p as F}from"./core-BwBLfZO1.js";import{eS as U,Lh as Xe,bE as ua,bo as De,Mv as Mn,i9 as Rn,Mw as Qt,Mx as Bn,ic as _t,My as Qe,Mz as jn,ii as Ln,MA as Ht,MB as Un,im as St,MC as He,MD as Nn,ck as vt,ME as Gn,MF as Vn,LB as Yn,jf as $n,MG as zn,bn as Je,MH as ma,L5 as ce,bc as pa,jt as ha,np as fa,jc as ga,L7 as le,L6 as J,eR as ba,eX as Kn,ft as yt,MI as qn,MJ as Zn,MK as Ca,ML as Oe,uT as Le,uU as Ue,vf as xe,v9 as de,uY as Ne,MM as Qn,MN as Hn,MO as Wn,MP as ka,MQ as Me,MR as Xn,dF as et,rk as _a,MS as Jn,MT as eo,MU as to,MV as It,Ku as Et,jJ as we,vn as Tt,rs as ao,MW as no,uV as Wt,rn as Ee,rj as Sa,MX as ge,MY as oo,MZ as Dt,Kt as xt,tk as ya,M_ as so,M$ as ro,N0 as io,N1 as wt,tx as co,N2 as lo,uX as Xt,tj as Aa,N3 as be,N4 as uo,bs as va,vr as Ia,N5 as mo,N6 as po,N7 as ho,N8 as Pt,vm as fo,N9 as go,uW as Jt,vq as Ea,Na as Ce,Nb as bo,Nc as Co,Nd as Ta,jy as Da,nm as xa,jD as wa,nk as Pa,nj as Fa,ni as Oa,sI as ko,fj as _o,cN as So,cO as yo,nf as Ao,ff as vo,nw as Io,ED as mt,Ev as Eo,Ez as To,Ne as Do,Nf as xo,Ng as wo,b5 as tt,f7 as Po,gU as Fo,fJ as Oo,nq as Mo,j5 as Ro,nn as Bo,nl as jo,f1 as Lo,e$ as Uo}from"./zeni-epic-state-5KAN0o5k.js";import{z as j,a3 as te,q as x,d as T,D as q,aV as No,$ as Ge,s as Ve,aW as Ma,f as Y,aX as Go,I as _e,aY as Ra,a as Se,G as M,m as Vo,aZ as Yo,a_ as $o,U as Ba,X as ja,c as La,Z as zo,a$ as Ko,N as qo,aN as Ua,a0 as se,b0 as Na,b1 as Ga,a2 as Va,b2 as Zo,b3 as Qo,k as Ho,aq as Wo,i as Xo,p as Jo,Y as es,b4 as ts,b5 as as,b6 as ns,b7 as os,b8 as ke}from"./index-aRVrbNiC.js";import{n as Ft}from"./mui-BBkWv1mU.js";import{a as b}from"./sentry-B_UPXuSC.js";import{w as Ya}from"./withTransactionSidePanel-B6uMMn0i.js";import{c as $a,t as Pe,f as ue,a as Ot,v as ss}from"./routePaths-hmakpH65.js";import{u as ae}from"./useAskAiCfoHostNavButtonProps-DO0seTDc.js";import je from"./NotFoundScreen-DVKBuN7e.js";import{u as Mt}from"./useInitialThreadRequest-D_32gSqj.js";import{t as za}from"./analyticsHelper-B5epc-PZ.js";import{C as rs}from"./CompanyPassportScreen-CC2QSh6z.js";import{u as is}from"./useAiCfoDashboardSuggestedQuestionsChips-DHhcASUk.js";import{F as cs}from"./FeaturePreviewScreen-DDv7GOn2.js";import{R as ls}from"./ReferralListScreen-CySa3ted.js";import"./recharts-CiU9jjGx.js";import"./analytics-7J1CNh2i.js";import"./plaid-Gte2Ckk-.js";import"./dnd-yE3kwzv1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BAjpdqbN.js";import"./lexical-CppAuKk8.js";import"./pdf-BQyDOTnR.js";import"./utils-ox49Wmvb.js";import"./TransactionDetailScreen-C7_imF3Y.js";import"./decodeURIComponentSafe-Cau4zUJU.js";import"./MobileAppDrawer-Df4Qimmh.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]="d9f1c47c-568b-43c4-a22b-50a6becfd226",e._sentryDebugIdIdentifier="sentry-dbid-d9f1c47c-568b-43c4-a22b-50a6becfd226")}catch{}})();const ds=Ya(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(I=>I.tenantState.currentTenantId),c=_(I=>U(I)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${te}/agingDetailedReport`,timezone:Xe()}),[]),h=b.useMemo(()=>r!=null?ua(r):De(),[r]),p=z(),f=W(),S=_(I=>Mn(I,h,o)),E=b.useCallback(()=>{o!=null&&S.fetchState!=="In-Progress"&&S.fetchState!=="Completed"&&p(Rn(o,h))},[h]),A=b.useCallback(()=>{f("../../",{relative:"path"})},[]),k=b.useCallback((I,L)=>{p(Qt({sortKey:I,sortOrder:L}))},[]),D=b.useCallback(I=>{p(Qt({downloadState:I}))},[]),w=b.useCallback(I=>{if(e)e(I.transactionId,I.transactionType);else if(m!=null){const L=$a({id:I.transactionId,type:I.transactionType},m);f(L);const ne=x(g.state?.pathnameStackToGoBack,g.pathname);f(L,{state:{pathnameStackToGoBack:ne}})}},[m,e]),y=b.useCallback(()=>{S.vendor!=null&&T.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),S.vendor.id,S.vendor.name)},[S.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{S.fetchState==="Completed"&&y()},[y,S.fetchState]),d.jsx(No,{apAgingDetail:S,downloadParams:l,reportDate:h,analytics:T,onTransactionClick:w,onReload:E,onBackClick:A,onColumnSortConfigChanged:k,updateDownloadStateHandler:D,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),us=()=>{const e=z(),a=W(),t=_(k=>Bn(k)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ae({mobileExploreReferrer:"AP Aging"});Ge({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(k=>k.tenantState.currentTenantId),i=_(k=>U(k)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${te}/agingReport`,timezone:Xe()}),[]),C=t.apAgingUIState.selectedDate??De(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(_t(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(k=>{e(Qe({searchString:k}))},[]),p=b.useCallback((k,D)=>{e(Qe({sortKey:D,sortOrder:k}))},[]),f=b.useCallback(k=>{a(`./${k}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),S=b.useCallback(k=>{e(Qe({downloadState:k}))},[]),E=b.useCallback((k,D)=>{},[]),A=b.useCallback((k,D)=>{e(Qe({selectedDate:k,agingDateSelectionType:D})),e(_t(k))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ve,{analytics:T,onLoad:k=>k.trackPageLoaded(Y.Event.agingReport,"AP Aging")}):null,d.jsx(Ma,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:T,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:S,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ms=Ya(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(y=>U(y)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${te}/agingDetailedReport`,timezone:Xe()}),[]),l=b.useMemo(()=>r!=null?ua(r):De(),[r]),h=z(),p=W(),f=_(y=>jn(y,l,o)),S=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(Ln(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),A=b.useCallback((y,I)=>{h(Ht({sortKey:y,sortOrder:I}))},[]),k=b.useCallback(y=>{h(Ht({downloadState:y}))},[]),D=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(c!=null){const I=$a({id:y.transactionId,type:y.transactionType},c);p(I);const L=x(m.state?.pathnameStackToGoBack,m.pathname);p(I,{state:{pathnameStackToGoBack:L}})}},[c,e]),w=b.useCallback(()=>{f.customer!=null&&T.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{S()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&w()},[f.fetchState,w]),d.jsx(Go,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:T,onTransactionClick:D,onReload:S,onBackClick:E,onColumnSortConfigChanged:A,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ps=()=>{const e=z(),a=W(),t=_(A=>Un(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ae({mobileExploreReferrer:"AR Aging"});Ge({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(A=>U(A)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${te}/agingReport`,timezone:Xe()}),[]),g=t.arAgingUIState.selectedDate??De(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(St(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(A=>{e(He({searchString:A}))},[]),h=b.useCallback((A,k)=>{e(He({sortKey:k,sortOrder:A}))},[]),p=b.useCallback(A=>{a(`./${A}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(A=>{e(He({downloadState:A}))},[]),S=b.useCallback((A,k)=>{e(He({selectedDate:A,agingDateSelectionType:k})),e(St(A))},[]),E=b.useCallback((A,k)=>{e(Nn({nodeId:A,isCollapsed:k}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ve,{analytics:T,onLoad:A=>A.trackPageLoaded(Y.Event.agingReport,"AR Aging")}):null,d.jsx(Ma,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:S,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ka=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function qa(e,a){const t=Yn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e($n(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?T.trackZeniAccountsCashBalancePromoClicked("Move Money"):(T.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else T.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const hs=ee(function(e){const a=Gn(e).accountsInOrder.map((n,o)=>Ka(n,o)),t=Vn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:T}},qa)(Ra),fs=ee(function(e){const a=zn(e).accountsInOrder.map((o,r)=>Ka(o,r)),t=j.getSignedInUser(),n=Je(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}},qa)(Ra);function gs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=vt(n?.loggedInUserRoleMap);return _(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(je,{}):d.jsx(hs,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function bs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=vt(n?.loggedInUserRoleMap),r=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return _(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(je,{}):d.jsx(fs,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Cs=Ft.div`
|
|
1
|
+
import{j as d}from"./liveblocks-OUACL7Sm.js";import{i as K,j as _,g as H,u as z,h as W,n as ee,k as da,o as kt,p as F}from"./core-CvVQwh-G.js";import{eS as U,Lh as Xe,bE as ua,bo as De,Mv as Mn,i9 as Rn,Mw as Qt,Mx as Bn,ic as _t,My as Qe,Mz as jn,ii as Ln,MA as Ht,MB as Un,im as St,MC as He,MD as Nn,ck as vt,ME as Gn,MF as Vn,LB as Yn,jf as $n,MG as zn,bn as Je,MH as ma,L5 as ce,bc as pa,jt as ha,np as fa,jc as ga,L7 as le,L6 as J,eR as ba,eX as Kn,ft as yt,MI as qn,MJ as Zn,MK as Ca,ML as Oe,uT as Le,uU as Ue,vf as xe,v9 as de,uY as Ne,MM as Qn,MN as Hn,MO as Wn,MP as ka,MQ as Me,MR as Xn,dF as et,rk as _a,MS as Jn,MT as eo,MU as to,MV as It,Ku as Et,jJ as we,vn as Tt,rs as ao,MW as no,uV as Wt,rn as Ee,rj as Sa,MX as ge,MY as oo,MZ as Dt,Kt as xt,tk as ya,M_ as so,M$ as ro,N0 as io,N1 as wt,tx as co,N2 as lo,uX as Xt,tj as Aa,N3 as be,N4 as uo,bs as va,vr as Ia,N5 as mo,N6 as po,N7 as ho,N8 as Pt,vm as fo,N9 as go,uW as Jt,vq as Ea,Na as Ce,Nb as bo,Nc as Co,Nd as Ta,jy as Da,nm as xa,jD as wa,nk as Pa,nj as Fa,ni as Oa,sI as ko,fj as _o,cN as So,cO as yo,nf as Ao,ff as vo,nw as Io,ED as mt,Ev as Eo,Ez as To,Ne as Do,Nf as xo,Ng as wo,b5 as tt,f7 as Po,gU as Fo,fJ as Oo,nq as Mo,j5 as Ro,nn as Bo,nl as jo,f1 as Lo,e$ as Uo}from"./zeni-epic-state-CECAZYIg.js";import{z as j,a3 as te,q as x,d as T,D as q,aV as No,$ as Ge,s as Ve,aW as Ma,f as Y,aX as Go,I as _e,aY as Ra,a as Se,G as M,m as Vo,aZ as Yo,a_ as $o,U as Ba,X as ja,c as La,Z as zo,a$ as Ko,N as qo,aN as Ua,a0 as se,b0 as Na,b1 as Ga,a2 as Va,b2 as Zo,b3 as Qo,k as Ho,aq as Wo,i as Xo,p as Jo,Y as es,b4 as ts,b5 as as,b6 as ns,b7 as os,b8 as ke}from"./index-LzTRB_X0.js";import{n as Ft}from"./mui-B_sWk5no.js";import{a as b}from"./sentry-COtwFETz.js";import{w as Ya}from"./withTransactionSidePanel-CNv0kM7W.js";import{c as $a,t as Pe,f as ue,a as Ot,v as ss}from"./routePaths-CCOmiobh.js";import{u as ae}from"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import je from"./NotFoundScreen-BXgaohYF.js";import{u as Mt}from"./useInitialThreadRequest-BRMmNSgV.js";import{t as za}from"./analyticsHelper-Cw9lxNal.js";import{C as rs}from"./CompanyPassportScreen-BLsZ8Uuy.js";import{u as is}from"./useAiCfoDashboardSuggestedQuestionsChips-CP6mqvu5.js";import{F as cs}from"./FeaturePreviewScreen-DeAByMab.js";import{R as ls}from"./ReferralListScreen-jCzCZDWf.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./TransactionDetailScreen-DY5IcfRV.js";import"./decodeURIComponentSafe-C_ttRntx.js";import"./MobileAppDrawer-C6MRZ7yW.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]="d9f1c47c-568b-43c4-a22b-50a6becfd226",e._sentryDebugIdIdentifier="sentry-dbid-d9f1c47c-568b-43c4-a22b-50a6becfd226")}catch{}})();const ds=Ya(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(I=>I.tenantState.currentTenantId),c=_(I=>U(I)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${te}/agingDetailedReport`,timezone:Xe()}),[]),h=b.useMemo(()=>r!=null?ua(r):De(),[r]),p=z(),f=W(),S=_(I=>Mn(I,h,o)),E=b.useCallback(()=>{o!=null&&S.fetchState!=="In-Progress"&&S.fetchState!=="Completed"&&p(Rn(o,h))},[h]),A=b.useCallback(()=>{f("../../",{relative:"path"})},[]),k=b.useCallback((I,L)=>{p(Qt({sortKey:I,sortOrder:L}))},[]),D=b.useCallback(I=>{p(Qt({downloadState:I}))},[]),w=b.useCallback(I=>{if(e)e(I.transactionId,I.transactionType);else if(m!=null){const L=$a({id:I.transactionId,type:I.transactionType},m);f(L);const ne=x(g.state?.pathnameStackToGoBack,g.pathname);f(L,{state:{pathnameStackToGoBack:ne}})}},[m,e]),y=b.useCallback(()=>{S.vendor!=null&&T.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),S.vendor.id,S.vendor.name)},[S.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{S.fetchState==="Completed"&&y()},[y,S.fetchState]),d.jsx(No,{apAgingDetail:S,downloadParams:l,reportDate:h,analytics:T,onTransactionClick:w,onReload:E,onBackClick:A,onColumnSortConfigChanged:k,updateDownloadStateHandler:D,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),us=()=>{const e=z(),a=W(),t=_(k=>Bn(k)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ae({mobileExploreReferrer:"AP Aging"});Ge({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(k=>k.tenantState.currentTenantId),i=_(k=>U(k)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${te}/agingReport`,timezone:Xe()}),[]),C=t.apAgingUIState.selectedDate??De(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(_t(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(k=>{e(Qe({searchString:k}))},[]),p=b.useCallback((k,D)=>{e(Qe({sortKey:D,sortOrder:k}))},[]),f=b.useCallback(k=>{a(`./${k}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),S=b.useCallback(k=>{e(Qe({downloadState:k}))},[]),E=b.useCallback((k,D)=>{},[]),A=b.useCallback((k,D)=>{e(Qe({selectedDate:k,agingDateSelectionType:D})),e(_t(k))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ve,{analytics:T,onLoad:k=>k.trackPageLoaded(Y.Event.agingReport,"AP Aging")}):null,d.jsx(Ma,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:T,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:S,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ms=Ya(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(y=>U(y)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${te}/agingDetailedReport`,timezone:Xe()}),[]),l=b.useMemo(()=>r!=null?ua(r):De(),[r]),h=z(),p=W(),f=_(y=>jn(y,l,o)),S=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(Ln(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),A=b.useCallback((y,I)=>{h(Ht({sortKey:y,sortOrder:I}))},[]),k=b.useCallback(y=>{h(Ht({downloadState:y}))},[]),D=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(c!=null){const I=$a({id:y.transactionId,type:y.transactionType},c);p(I);const L=x(m.state?.pathnameStackToGoBack,m.pathname);p(I,{state:{pathnameStackToGoBack:L}})}},[c,e]),w=b.useCallback(()=>{f.customer!=null&&T.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{S()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&w()},[f.fetchState,w]),d.jsx(Go,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:T,onTransactionClick:D,onReload:S,onBackClick:E,onColumnSortConfigChanged:A,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ps=()=>{const e=z(),a=W(),t=_(A=>Un(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ae({mobileExploreReferrer:"AR Aging"});Ge({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(A=>U(A)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${te}/agingReport`,timezone:Xe()}),[]),g=t.arAgingUIState.selectedDate??De(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(St(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(A=>{e(He({searchString:A}))},[]),h=b.useCallback((A,k)=>{e(He({sortKey:k,sortOrder:A}))},[]),p=b.useCallback(A=>{a(`./${A}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(A=>{e(He({downloadState:A}))},[]),S=b.useCallback((A,k)=>{e(He({selectedDate:A,agingDateSelectionType:k})),e(St(A))},[]),E=b.useCallback((A,k)=>{e(Nn({nodeId:A,isCollapsed:k}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ve,{analytics:T,onLoad:A=>A.trackPageLoaded(Y.Event.agingReport,"AR Aging")}):null,d.jsx(Ma,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:S,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ka=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function qa(e,a){const t=Yn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e($n(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?T.trackZeniAccountsCashBalancePromoClicked("Move Money"):(T.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=x(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else T.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const hs=ee(function(e){const a=Gn(e).accountsInOrder.map((n,o)=>Ka(n,o)),t=Vn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:T}},qa)(Ra),fs=ee(function(e){const a=zn(e).accountsInOrder.map((o,r)=>Ka(o,r)),t=j.getSignedInUser(),n=Je(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}},qa)(Ra);function gs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=vt(n?.loggedInUserRoleMap);return _(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(je,{}):d.jsx(hs,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function bs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=vt(n?.loggedInUserRoleMap),r=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return _(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(je,{}):d.jsx(fs,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Cs=Ft.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
min-height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-
|
|
1
|
+
import{j as v}from"./liveblocks-OUACL7Sm.js";import{a as u}from"./sentry-COtwFETz.js";import{u as y,j as b,n as w,g as A,N}from"./core-CvVQwh-G.js";import{JY as U,eS as _,fr as k,JZ as L,nh as R,J_ as z}from"./zeni-epic-state-CECAZYIg.js";import{u as j,z as f,L as T,t as I,D as O,b as $}from"./index-LzTRB_X0.js";import"./mui-B_sWk5no.js";import{t as P}from"./getLocaleForTenant-BKpCR6Mg.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.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]="d8c18027-f87f-475a-9369-f0aec64ece7c",t._sentryDebugIdIdentifier="sentry-dbid-d8c18027-f87f-475a-9369-f0aec64ece7c")}catch{}})();const J=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>U(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(J,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-BnYbmIQy.js → DomesticWireDetailScreen-R5H3Lj3F.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-OUACL7Sm.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-CvVQwh-G.js";import{N_ as k,O5 as q,fH as L,fG as W,fF as J,iG as K,L6 as M,qD as Q,eS as V,Nw as D,iE as G,N$ as S,O8 as F,iC as T,iZ as j}from"./zeni-epic-state-CECAZYIg.js";import{bw as X,X as N,a as R,z as O,m as U,p,G as v,B as Z,bx as Y,o as _,by as ee,q as te}from"./index-LzTRB_X0.js";import{n as H}from"./mui-B_sWk5no.js";import"./sentry-COtwFETz.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]="877da16c-9bd1-4604-95c2-0fa6afa15764",e._sentryDebugIdIdentifier="sentry-dbid-877da16c-9bd1-4604-95c2-0fa6afa15764")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(K(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(M("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(J(n,"BillPayVendor"))},onResendOtp:n=>{e(W(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(L(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(q(n,a,o))}}})(X);function z({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(i=>k(i,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-
|
|
1
|
+
import{j as d}from"./liveblocks-OUACL7Sm.js";import{X as f,w as l,m as c}from"./index-LzTRB_X0.js";import{D as p}from"./mui-B_sWk5no.js";import"./sentry-COtwFETz.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]="a54850f2-6a1e-4978-b1f7-5253f7b0064a",e._sentryDebugIdIdentifier="sentry-dbid-a54850f2-6a1e-4978-b1f7-5253f7b0064a")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:a,onClose:t}=e,n=f(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),i=c();return d.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:a})}export{m as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-OUACL7Sm.js";import{a as d}from"./sentry-COtwFETz.js";import{h as B,u as G,g as q,i as L,j as c,N as F,n as M,o as N,p as O}from"./core-CvVQwh-G.js";import{Me as _,eS as J,LC as R,kJ as W,Ic as k,Mj as Y,L5 as $,jJ as z,Id as S,LH as H,LI as V,L7 as K,L6 as Q}from"./zeni-epic-state-CECAZYIg.js";import{aS as U,d as X,p as Z,q as tt}from"./index-LzTRB_X0.js";import"./mui-B_sWk5no.js";import{d as I}from"./decodeURIComponentSafe-C_ttRntx.js";import{w as et}from"./withTransactionSidePanel-CNv0kM7W.js";import{f as at,c as nt}from"./routePaths-CCOmiobh.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import"./TransactionDetailScreen-DY5IcfRV.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]="a5b3981a-5692-4629-996e-ca76cc1f5019",a._sentryDebugIdIdentifier="sentry-dbid-a5b3981a-5692-4629-996e-ca76cc1f5019")}catch{}})();const ot=M(function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:z(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(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??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(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=B(),o=G(),l=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:b,entityIdEncoded:j,entityNameEncoded:x}=L(),r=I(j??""),p=I(x??""),u=rt(r,p),w=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=c(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=c(n=>J(n).company?.companyInfo.firstMonthOfFY??1),f=c(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(W(i)))},[m,u,i]);const E=c(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,A=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:b,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:C(w.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-BBY95n1E.js → ExpenseAutomationRoutes-CkJkhfFq.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-OUACL7Sm.js";import aa from"./NotFoundScreen-BXgaohYF.js";import{a as o,b as Nt}from"./sentry-COtwFETz.js";import{n as Fe,S as oa}from"./mui-B_sWk5no.js";import{u as pe,h as Jt,g as Ye,j as w,n as sa,i as wt,o as ca,p as qe}from"./core-CvVQwh-G.js";import{eS as xe,QH as ia,nr as Ee,fm as la,re as ra,nJ as Yt,o2 as Kt,QI as Ht,oc as da,QJ as Wt,nC as ua,qM as ma,f6 as Ie,QK as De,td as Xt,Cz as Zt,QL as en,QM as pa,qk as Ke,Mf as Pt,Mh as ha,jM as ga,Mi as Ca,jT as Sa,cV as fa,ur as He,nP as tn,oh as Ue,nH as re,QN as Ia,L7 as xt,L6 as Re,QO as Dt,k8 as Ea,QP as ka,QQ as ya,QR as ba,QS as Ta,nW as va,ok as we,QT as Aa,QU as Ra,QV as wa,or as Pa,jX as xa,jO as Da,QW as Ua,jW as Ut,Mp as Fa,QX as Ba,QY as Va,qg as Oa,pU as Ma,oi as me,pT as Ge,QZ as _a,Q_ as za,Q$ as ja,lr as La,bo as $a,lm as Ft,l8 as Qa,R0 as qa,gW as Bt,fX as Ga,lj as Na,wk as Ja,R1 as Ya,oS as Ka,oN as Ha,oR as Wa,oC as Xa,R2 as Za,f9 as nn,o5 as eo,nS as to,fn as Vt,om as no,R3 as ao,R4 as oo,oj as an,R5 as so,R6 as co,R7 as io,R8 as lo,R9 as Ot,qs as ro,pL as uo,L5 as mo,Ra as po,Rb as ho,jV as go,Rc as Co,Hd as So,jU as fo,jJ as Io,f8 as Eo,pi as on,pD as ko,og as Mt,ol as yo,bE as bo,lg as To,ld as vo,Rd as Ao,oB as _t,pz as zt,px as Ro,Re as wo,p3 as Po,p1 as xo,pA as Do,Rf as Uo,Rg as Fo,p7 as Bo,Rh as Vo,oX as Oo,p6 as Mo,p4 as _o,pG as zo}from"./zeni-epic-state-CECAZYIg.js";import{a as sn,G as ae,d as Q,q as ne,Y as cn,$ as ln,cG as jo,z as Be,cH as Lo,at as Pe,cI as $o,aU as jt,B as rn,cJ as Qo,aq as Ne,D as qo,a8 as Go,cK as No,a3 as Jo,cL as Yo,U as Ko,cM as Ho,cN as Wo,K as Xo,I as Zo,aN as es,cO as ts,cP as ns,b9 as as,w as os,aQ as ss}from"./index-LzTRB_X0.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-CT6wQzQG.js";import{f as Lt,a as cs,b as is,g as ls,C as rs}from"./TransactionDetailScreen-DY5IcfRV.js";import{w as ds}from"./withTransactionSidePanel-CNv0kM7W.js";import{h as us,v as ms}from"./routePaths-CCOmiobh.js";import{g as Je}from"./accountMappingHelper-C2f8hGo7.js";import{D as ps}from"./DrawerScreen-C1-3TQnN.js";import"./recharts-ScPc1hFQ.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";import"./decodeURIComponentSafe-C_ttRntx.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="e4a2671a-ddc4-4c56-bb75-5210041a4fd2",t._sentryDebugIdIdentifier="sentry-dbid-e4a2671a-ddc4-4c56-bb75-5210041a4fd2")}catch{}})();const hs=()=>{const t=pe(),l=Jt(),B=Ye(),f=w(d=>xe(d)),{useFeatureGate:T}=sn(),{isFeatureEnabled:S}=T(ae.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=T(ae.aiAuditScorePercentage),I=w(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=w(d=>ia(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),k=o.useCallback((d,q,Z=!1)=>{t(Ee({tenantId:q,period:{month:d.month,year:d.year},refreshViewInBackground:Z}))},[]),v=o.useCallback(d=>{const q=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,q??null),t(la(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(g,f.tenantId,!0)},[k,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ne(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(q=>q.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:y}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&y&&k(g,f.tenantId)},[k,g,s.fetchState,f.tenantId,y]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&y&&t(ra(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,y]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;Q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(gs,{children:h.jsx(jo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:E,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},gs=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-OUACL7Sm.js";import{a as r}from"./sentry-COtwFETz.js";import{a4 as l,a5 as p,a6 as c,p as f}from"./index-LzTRB_X0.js";import"./mui-B_sWk5no.js";import m from"./NotFoundScreen-BXgaohYF.js";import{h as b,g as u}from"./core-CvVQwh-G.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]="255b448f-3621-45de-b702-4185b08c00e3",e._sentryDebugIdIdentifier="sentry-dbid-255b448f-3621-45de-b702-4185b08c00e3")}catch{}})();const _=()=>{const e=b(),t=u(),a=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=f(t.state?.pathnameStackToGoBack),d=n.poppedPathname??k();e(d,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(t.pathname);return o!=null?s.jsx(p,{menuItem:c(o),onDemoClick:a,onGoBack:i}):s.jsx(m,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-
|
|
1
|
+
import{a as r}from"./sentry-COtwFETz.js";import{u as d,h as l,g as m}from"./core-CvVQwh-G.js";import{gD as p,Kk as g,Kl as _}from"./zeni-epic-state-CECAZYIg.js";import{u as b,L as h,z as y}from"./index-LzTRB_X0.js";import"./liveblocks-OUACL7Sm.js";import"./recharts-ScPc1hFQ.js";import"./mui-B_sWk5no.js";import"./analytics-BYlEHy--.js";import"./plaid-BeX18ubU.js";import"./dnd-DNR-B7xM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CtoJzpCG.js";import"./lexical-DEMTOP18.js";import"./pdf-Bd_BBdKz.js";import"./utils-B-68Nh7i.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9c8704a1-a2f6-455c-8889-e317a6e748ff",e._sentryDebugIdIdentifier="sentry-dbid-9c8704a1-a2f6-455c-8889-e317a6e748ff")}catch{}})();function K(){const e=d(),n=l(),o=m(),{setLoading:i,clearAllLoading:f}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}f();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{K as default};
|