@zeniai/web-app-ui 5.4.1-qa → 5.4.2-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/assets/{AccountMappingScreen-BdtNjCBI.js → AccountMappingScreen-DfowxAc-.js} +1 -1
  2. package/dist/assets/ActualMatchingMatchDetailScreen-DpqBi3lD.js +1 -0
  3. package/dist/assets/AddressRoutes-DAUco87Q.js +1 -0
  4. package/dist/assets/AddressScreen-Diwm_C2C.js +9 -0
  5. package/dist/assets/{AiCfoScreen-CCkwAPqN.js → AiCfoScreen-k4JvYL5q.js} +1 -1
  6. package/dist/assets/{AppDrawer-CWQ1asO3.js → AppDrawer-DBMNE-tW.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-C0ruzPoZ.js → BillPayApprovalRoutes-D9G2_YOz.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-CV9mDJiA.js → BillPayRoutes-P8ok7ngf.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-CPavKmhf.js → BusinessVerificationPageScreen-B4wIaSZ_.js} +2 -2
  10. package/dist/assets/CardsAiCfoScreen-csdwe-Dr.js +14 -0
  11. package/dist/assets/{ChargeCardRoutes-DJMJStiR.js → ChargeCardRoutes-D1ZdbX_z.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-CIGUDZ1Q.js → CompanyPassportScreen-d28meAXB.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-BbmNog_4.js → ConnectionAuthScreen-CIc-7q2q.js} +1 -1
  14. package/dist/assets/CustomerOnboardingAuthScreen-BCLoKVKx.js +1 -0
  15. package/dist/assets/{CustomerOnboardingRoutes-DO2-x5Dx.js → CustomerOnboardingRoutes-DcNGx8td.js} +3 -3
  16. package/dist/assets/{DashboardRoutes-CDHfwzF8.js → DashboardRoutes-Cn2JvSx_.js} +3 -3
  17. package/dist/assets/{DefaultTenantHome-IpUFcj-v.js → DefaultTenantHome-CsXVfKlZ.js} +1 -1
  18. package/dist/assets/DomesticWireDetailScreen-Cxel_MVr.js +18 -0
  19. package/dist/assets/{DrawerScreen-CRNbz1gn.js → DrawerScreen-C2EkheMn.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-z2LJmKvw.js → EntityDetailRoutes-DYnrDK2H.js} +1 -1
  21. package/dist/assets/ExpenseAutomationRoutes-CFonPv_D.js +38 -0
  22. package/dist/assets/{FeaturePreviewScreen-Jnj2USgZ.js → FeaturePreviewScreen-DDYtwmUp.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-CvAgMLyP.js → HubSpotOAuthCallbackScreen-DrQG17NC.js} +1 -1
  24. package/dist/assets/{InboxNotificationsProvider-TM2N59sT.js → InboxNotificationsProvider-Bh2XZMjj.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-DsiW7avo.js → InvoicingRoutes-aLT5Oywn.js} +1 -1
  26. package/dist/assets/{MagicLinkRoutes-CoB6xZJH.js → MagicLinkRoutes-B98z2_te.js} +3 -3
  27. package/dist/assets/MagicLinkSignInScreen-CUSvf6DA.js +12 -0
  28. package/dist/assets/{MobileAppDrawer-DVEpwTSb.js → MobileAppDrawer-CYOS7P1p.js} +1 -1
  29. package/dist/assets/NotFoundScreen-Cg7JNFkQ.js +1 -0
  30. package/dist/assets/{NotificationRoutes-BgRe6yDH.js → NotificationRoutes-Cw3UPZ5H.js} +1 -1
  31. package/dist/assets/{OAuthConsentScreen-BlWg9xpv.js → OAuthConsentScreen-DvsId_K6.js} +1 -1
  32. package/dist/assets/{PandLWithForecastRoutes-DCylgwyr.js → PandLWithForecastRoutes-BtveWrPc.js} +1 -1
  33. package/dist/assets/{PaymentLinkScreen-zJNZOLxG.js → PaymentLinkScreen-CyUO-4Wu.js} +1 -1
  34. package/dist/assets/{PeopleRoutes-BTMtvnWM.js → PeopleRoutes-DVMl8LKW.js} +1 -1
  35. package/dist/assets/PerformanceRoutes-DDDEYaGA.js +1 -0
  36. package/dist/assets/{Preview-DdNlHcw7.js → Preview-Bk5qAysj.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-B8my3HK2.js → QBOConnectionScreen-BZaN5thA.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRoutes-DbHjrDG1.js → ReimbursementApprovalRoutes-D7E_M16q.js} +1 -1
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BOO5QQZQ.js → ReimbursementApprovalRuleDetailScreen-CXyB0PcY.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-CIvtHgV3.js → ReimbursementRoutes-CRRoqag9.js} +4 -4
  41. package/dist/assets/{ReportsRoutes-CqTVhtIe.js → ReportsRoutes-Cgg5QVAq.js} +1 -1
  42. package/dist/assets/RewardsRoutes-phMlkhIl.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DPJPIIjz.js → ScheduleDetailsPrepaidExpensesScreen-y_RWHH2C.js} +4 -4
  44. package/dist/assets/{ScreenRoutes-BW0Nfg5n.js → ScreenRoutes-BfdhNdv6.js} +2 -2
  45. package/dist/assets/{SettingsRoutes-BZ6-ok7C.js → SettingsRoutes-C030Wm5E.js} +1 -1
  46. package/dist/assets/{SetupPagesScreen-CWaKuALw.js → SetupPagesScreen-BhmiBe4o.js} +5 -5
  47. package/dist/assets/{SignInScreen-C6Coynvq.js → SignInScreen-uxgoeqdj.js} +1 -1
  48. package/dist/assets/{SignOutScreen-5ap7jROI.js → SignOutScreen-DlEh7dhK.js} +1 -1
  49. package/dist/assets/{TaskListScreen-Tr5pYH2M.js → TaskListScreen-BAeSb59G.js} +2 -2
  50. package/dist/assets/{TaskRoutes-DD87OV_2.js → TaskRoutes-B0DNH_tz.js} +2 -2
  51. package/dist/assets/TransactionDetailRoutes-CvRMjyJd.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-DGgQpMc5.js → TransactionDetailScreen-wMG_3E3j.js} +1 -1
  53. package/dist/assets/{TransactionListRoutes-BfRuV8RM.js → TransactionListRoutes-BP3KJlde.js} +1 -1
  54. package/dist/assets/{TreasuryRoutes-CCh_KTDj.js → TreasuryRoutes-18cBgc_x.js} +1 -1
  55. package/dist/assets/{VendorsRoutes-DjYMshEP.js → VendorsRoutes-DLFjUFun.js} +10 -10
  56. package/dist/assets/{WiseConfirmationScreen-DfNXRsaU.js → WiseConfirmationScreen-Tt2rFi3i.js} +1 -1
  57. package/dist/assets/{ZeniAccountRoutes-CKgCFBgo.js → ZeniAccountRoutes-wVFrAQ-3.js} +9 -9
  58. package/dist/assets/ZeniAccountStatementScreen-ku-97h_n.js +9 -0
  59. package/dist/assets/{accountMappingHelper-DpK2x2pO.js → accountMappingHelper-CHry1WVR.js} +1 -1
  60. package/dist/assets/{analytics-CvDaD8K9.js → analytics-C4h9uwWs.js} +1 -1
  61. package/dist/assets/{analyticsHelper-VdIlZC-X.js → analyticsHelper-CsTjLa_U.js} +1 -1
  62. package/dist/assets/{core-BEvMNwAD.js → core-DRRkK-nh.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-CYLAirQ0.js → decodeURIComponentSafe-DZs4O12l.js} +1 -1
  64. package/dist/assets/{dnd-B2-znEgk.js → dnd-_2sJc_42.js} +1 -1
  65. package/dist/assets/{empty-MCEjxjzc.js → empty-CTTtTEUb.js} +1 -1
  66. package/dist/assets/{empty-YxcYKzZr.js → empty-DLiHGVfw.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-B-77FBVY.js → emptyVideoElement-DVRRW-8o.js} +1 -1
  68. package/dist/assets/{epic-DBYEx4XZ.js → epic-1JvU70v2.js} +1 -1
  69. package/dist/assets/{expenseAutomationHelper-n1rnu5_l.js → expenseAutomationHelper-BC0QbU5f.js} +1 -1
  70. package/dist/assets/{getLocaleForTenant-GfQpMbrO.js → getLocaleForTenant-UyMudcKz.js} +1 -1
  71. package/dist/assets/{index-BLeLfbhZ.js → index-4rD-Inub.js} +2 -2
  72. package/dist/assets/{index-Bo2P7yfm.js → index-C4gCcAzE.js} +1 -1
  73. package/dist/assets/{index-Bfnxdwcm.js → index-C8t0n_dK.js} +6800 -6800
  74. package/dist/assets/{index-CknhGBud.js → index-C9SmCfob.js} +1 -1
  75. package/dist/assets/{index-BRtn7Fg5.js → index-DV4hjrJB.js} +1 -1
  76. package/dist/assets/{index-CHQdsKk6.js → index-DojZx2HJ.js} +1 -1
  77. package/dist/assets/{index-BNJSTOyr.js → index-DsnNO9ob.js} +1 -1
  78. package/dist/assets/{index-B8gVWGQ4.js → index-tDitJ4zF.js} +1 -1
  79. package/dist/assets/{lexical-VH-Dh1bf.js → lexical-DcIe1jg7.js} +1 -1
  80. package/dist/assets/{liveblocks-DXMWX-Ft.js → liveblocks-BMZsanry.js} +1 -1
  81. package/dist/assets/{lottie-CunmMvLM.js → lottie-C0cdlMyO.js} +1 -1
  82. package/dist/assets/{mui-Bueuo6bM.js → mui-Cs4dDAVi.js} +1 -1
  83. package/dist/assets/{pathToGoBack-Mm2jhyqa.js → pathToGoBack-CkgUjsRE.js} +1 -1
  84. package/dist/assets/{pdf-byaFE2JF.js → pdf-DTtYOrE_.js} +4 -4
  85. package/dist/assets/{pdf-lib-Dvs_Xgmp.js → pdf-lib-0L0P6hdy.js} +1 -1
  86. package/dist/assets/{plaid-QK7fwo4O.js → plaid-3Z5MZAow.js} +1 -1
  87. package/dist/assets/{pusher-C7Bm4ma8.js → pusher-CwJ3oZrv.js} +1 -1
  88. package/dist/assets/{react-Cb2nvCGx.js → react-BFbkar2S.js} +1 -1
  89. package/dist/assets/{react-D6s1bFFI.js → react-CM1VGrgK.js} +1 -1
  90. package/dist/assets/{react-DIKP2Ov_.js → react-DEFivwtJ.js} +1 -1
  91. package/dist/assets/{react-DThrm6Ze.js → react-DdN0oGm3.js} +1 -1
  92. package/dist/assets/{react-B64enUeQ.js → react-Du8d_1DW.js} +1 -1
  93. package/dist/assets/{react-DaoXpjNM.js → react-clYOjmSd.js} +1 -1
  94. package/dist/assets/{recharts-DktJiIze.js → recharts-Dv_Zobiy.js} +1 -1
  95. package/dist/assets/{reportTimeframe-oMu7u5jv.js → reportTimeframe-BZ8sifp3.js} +1 -1
  96. package/dist/assets/{routePaths-D1-5FufF.js → routePaths-CXiI4qT4.js} +1 -1
  97. package/dist/assets/{sentry-B8ZcloT9.js → sentry-w92aQEbS.js} +1 -1
  98. package/dist/assets/{stripSplatSuffix-DqLj2OQc.js → stripSplatSuffix-Dsy_ttXJ.js} +1 -1
  99. package/dist/assets/{url-BjOfzwJn.js → url--dAX0VEW.js} +1 -1
  100. package/dist/assets/{url-BhMCuX-k.js → url-CfBqFLaf.js} +1 -1
  101. package/dist/assets/{useActualMatchingMatchDetail-BOoloLk9.js → useActualMatchingMatchDetail-D7oh67gX.js} +1 -1
  102. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-C_YRnGmr.js +1 -0
  103. package/dist/assets/{useAskAiCfoHostNavButtonProps-CGDjoe-C.js → useAskAiCfoHostNavButtonProps-DYip9Dx9.js} +1 -1
  104. package/dist/assets/{useChargeCardPusherEvents-BscXbqVG.js → useChargeCardPusherEvents-DoonLDx8.js} +1 -1
  105. package/dist/assets/{useDeviceId-TkNUqREt.js → useDeviceId-BCt1yivX.js} +1 -1
  106. package/dist/assets/{useEmailConnectResultRefresh-LdJl4Ytr.js → useEmailConnectResultRefresh-Bp56oLLy.js} +1 -1
  107. package/dist/assets/{useEnsureVendorListLoaded-CbpMm19m.js → useEnsureVendorListLoaded-C9_7Q9zw.js} +1 -1
  108. package/dist/assets/{useInitialThreadRequest-U0N2vfd2.js → useInitialThreadRequest-BLzbdgeM.js} +1 -1
  109. package/dist/assets/{useTaskManagerAccess-CRuBFsxT.js → useTaskManagerAccess-D2-4N0AP.js} +1 -1
  110. package/dist/assets/{useTaskManagerPusherEvents-DQJBsAoF.js → useTaskManagerPusherEvents-DiIvQwiL.js} +1 -1
  111. package/dist/assets/{utils-BVoHYbte.js → utils-BKjdMjTj.js} +1 -1
  112. package/dist/assets/{withTransactionSidePanel-DEhOfD8m.js → withTransactionSidePanel-By5bvka9.js} +2 -2
  113. package/dist/assets/{zeni-epic-state-D1qILDrP.js → zeni-epic-state-BgQvRRQh.js} +7 -7
  114. package/dist/index.html +1 -1
  115. package/package.json +3 -3
  116. package/dist/assets/ActualMatchingMatchDetailScreen-DgD9-vsh.js +0 -1
  117. package/dist/assets/AddressRoutes-DK5Vvq-X.js +0 -1
  118. package/dist/assets/AddressScreen-C7sDNd06.js +0 -9
  119. package/dist/assets/CardsAiCfoScreen-DszL1fJa.js +0 -14
  120. package/dist/assets/CustomerOnboardingAuthScreen-C_JF03U2.js +0 -1
  121. package/dist/assets/DomesticWireDetailScreen-Citgr--D.js +0 -18
  122. package/dist/assets/ExpenseAutomationRoutes-CSdM2SYG.js +0 -38
  123. package/dist/assets/MagicLinkSignInScreen-D3x0Vkxy.js +0 -12
  124. package/dist/assets/NotFoundScreen-CgHV3hZC.js +0 -1
  125. package/dist/assets/PerformanceRoutes-DDd1pzav.js +0 -1
  126. package/dist/assets/RewardsRoutes-CdxGa5FH.js +0 -1
  127. package/dist/assets/TransactionDetailRoutes-C2tJZ49c.js +0 -1
  128. package/dist/assets/ZeniAccountStatementScreen-BhXX83Ao.js +0 -9
  129. package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-D10zF3m4.js +0 -1
@@ -1,8 +1,8 @@
1
- import{j as o}from"./liveblocks-DXMWX-Ft.js";import{a as u}from"./sentry-B8ZcloT9.js";import{h as G,u as $,i as X,j as f,l as N,g as K,n as Me,o as P,N as U}from"./core-BEvMNwAD.js";import{Wy as gt,Wz as Ze,Sj as et,WA as vt,fI as L,h2 as ge,WB as Tt,cG as xt,WC as bt,G8 as yt,WD as wt,WE as oe,WF as te,WG as ve,TV as ue,TW as ke,Go as pe,TU as he,Gb as tt,FK as Pe,WH as It,TX as z,m3 as me,WI as je,FE as Ct,WJ as Dt,WK as Et,WL as _e,WM as Ve,WN as Ae,WO as Re,Gi as Te,WP as nt,F$ as at,WQ as Ft,WR as kt,WS as Pt,WT as jt,WU as _t,WV as Vt,WW as At,WX as Rt,CM as Lt,CU as Ut,CN as Bt,S$ as we,WY as Ot,WZ as Mt,lj as Ie,br as Gt,W_ as Nt,W$ as $t,n1 as Wt,na as Xt,S_ as Ce,bG as Ge,X0 as ot,SB as st,X1 as zt,X2 as Yt,X3 as Jt,nc as Kt,X4 as Ne,X5 as $e,X6 as We,X7 as Xe,X8 as qt,n8 as Ht,X9 as Qt,nb as Zt,Xa as en,Xb as it,Tl as rt,mr as tn,Xc as nn,Xd as De,Xe as dt,Tj as lt,IS as an,Xf as on,Xg as sn,mL as ct,Xh as rn,Xi as dn,Tx as ln,vn as cn,Xj as ut,Xk as ze,Tu as Ee,Xl as Ye,Xm as un,Tz as pn,Xn as hn,Xo as mn,Xp as fn,Xq as Sn,Xr as gn,vq as vn,Xs as Tn,TY as xn,Vw as bn,Tc as Fe,ie as yn,Vy as wn,Vx as In,ic as Cn,Xt as Dn,Xu as En,IX as Fn,Xv as kn,Xw as Pn,Xx as jn,Xy as _n,mv as Vn,bn as An,e1 as Rn,e0 as Ln}from"./zeni-epic-state-D1qILDrP.js";import{$ as ne,a9 as Le,c as q,F as M,z as R,a5 as Un,aK as Bn,k as j,W as Ue,Y as xe,at as ee,aq as se,aL as On,aM as pt,ao as Mn,a6 as Se,aN as Gn,p as J,V as Nn,G as ht,aO as $n,ac as mt,a2 as Wn,j as Je,aP as Xn,J as Y,a7 as zn,ad as ft,ae as Yn,aQ as Jn,aR as Kn,R as Be,aS as qn,aT as Hn,a1 as Qn,aU as Zn,aV as ea}from"./index-Bfnxdwcm.js";import{u as ta,D as na,n as B,S as St}from"./mui-Bueuo6bM.js";import{t as aa,A as oa}from"./AddressScreen-C7sDNd06.js";import fe from"./NotFoundScreen-CgHV3hZC.js";import{F as sa}from"./FeaturePreviewScreen-Jnj2USgZ.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-DPJPIIjz.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-CGDjoe-C.js";import{M as re}from"./MobileAppDrawer-DVEpwTSb.js";import{v as Oe,c as ua,d as pa}from"./routePaths-D1-5FufF.js";import{D as ha}from"./DrawerScreen-CRNbz1gn.js";import{a as ma,m as fa}from"./accountMappingHelper-DpK2x2pO.js";import"./recharts-DktJiIze.js";import"./analytics-CvDaD8K9.js";import"./plaid-QK7fwo4O.js";import"./dnd-B2-znEgk.js";import"./stripe-cKAAJElX.js";import"./lottie-CunmMvLM.js";import"./lexical-VH-Dh1bf.js";import"./pdf-byaFE2JF.js";import"./utils-BVoHYbte.js";import"./pathToGoBack-Mm2jhyqa.js";import"./InboxNotificationsProvider-TM2N59sT.js";import"./useTaskManagerAccess-CRuBFsxT.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]="1abe0744-39a5-42c6-b51f-cb5076a41d6a",e._sentryDebugIdIdentifier="sentry-dbid-1abe0744-39a5-42c6-b51f-cb5076a41d6a")}catch{}})();const Sa={drawerLeftMargin:new Le(0,0,100,200)},ga=N((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=L(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Ue.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(Bn),va=()=>{const e=ta(),a=G(),s=$(),{scheduleDetailId:t}=X(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=X(),{useFeatureGate:p}=q(),{isFeatureEnabled:h}=p(M.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>L(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Un,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
1
+ import{j as o}from"./liveblocks-BMZsanry.js";import{a as u}from"./sentry-w92aQEbS.js";import{h as G,u as $,i as W,j as f,l as N,g as K,n as Me,o as P,N as U}from"./core-DRRkK-nh.js";import{Wy as gt,Wz as Ze,Sj as et,WA as vt,fI as L,h2 as ge,WB as Tt,cG as xt,WC as bt,G8 as yt,WD as wt,WE as oe,WF as te,WG as ve,TV as ue,TW as ke,Go as pe,TU as he,Gb as tt,FK as Pe,WH as It,TX as z,m3 as me,WI as je,FE as Ct,WJ as Dt,WK as Et,WL as _e,WM as Ve,WN as Ae,WO as Re,Gi as Te,WP as nt,F$ as at,WQ as Ft,WR as kt,WS as Pt,WT as jt,WU as _t,WV as Vt,WW as At,WX as Rt,CM as Lt,CU as Ut,CN as Bt,S$ as we,WY as Ot,WZ as Mt,lj as Ie,br as Gt,W_ as Nt,W$ as $t,n1 as Xt,na as Wt,S_ as Ce,bG as Ge,X0 as ot,SB as st,X1 as zt,X2 as Yt,X3 as Jt,nc as Kt,X4 as Ne,X5 as $e,X6 as Xe,X7 as We,X8 as qt,n8 as Ht,X9 as Qt,nb as Zt,Xa as en,Xb as it,Tl as rt,mr as tn,Xc as nn,Xd as De,Xe as dt,Tj as lt,IS as an,Xf as on,Xg as sn,mL as ct,Xh as rn,Xi as dn,Tx as ln,vn as cn,Xj as ut,Xk as ze,Tu as Ee,Xl as Ye,Xm as un,Tz as pn,Xn as hn,Xo as mn,Xp as fn,Xq as Sn,Xr as gn,vq as vn,Xs as Tn,TY as xn,Vw as bn,Tc as Fe,ie as yn,Vy as wn,Vx as In,ic as Cn,Xt as Dn,Xu as En,IX as Fn,Xv as kn,Xw as Pn,Xx as jn,Xy as _n,mv as Vn,bn as An,e1 as Rn,e0 as Ln}from"./zeni-epic-state-BgQvRRQh.js";import{$ as ne,a9 as Le,c as q,F as M,z as R,a5 as Un,aK as Bn,k as j,X as Ue,U as xe,at as ee,aq as se,aL as On,aM as pt,ao as Mn,a6 as Se,aN as Gn,p as J,V as Nn,G as ht,aO as $n,ac as mt,a2 as Xn,j as Je,aP as Wn,J as Y,a7 as zn,ad as ft,ae as Yn,aQ as Jn,aR as Kn,R as Be,aS as qn,aT as Hn,a1 as Qn,aU as Zn,aV as ea}from"./index-C8t0n_dK.js";import{u as ta,D as na,n as B,S as St}from"./mui-Cs4dDAVi.js";import{t as aa,A as oa}from"./AddressScreen-Diwm_C2C.js";import fe from"./NotFoundScreen-Cg7JNFkQ.js";import{F as sa}from"./FeaturePreviewScreen-DDYtwmUp.js";import{S as ia,a as ra,J as da,b as la,c as ca}from"./ScheduleDetailsPrepaidExpensesScreen-y_RWHH2C.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-DYip9Dx9.js";import{M as re}from"./MobileAppDrawer-CYOS7P1p.js";import{v as Oe,c as ua,d as pa}from"./routePaths-CXiI4qT4.js";import{D as ha}from"./DrawerScreen-C2EkheMn.js";import{a as ma,m as fa}from"./accountMappingHelper-CHry1WVR.js";import"./recharts-Dv_Zobiy.js";import"./analytics-C4h9uwWs.js";import"./plaid-3Z5MZAow.js";import"./dnd-_2sJc_42.js";import"./stripe-cKAAJElX.js";import"./lottie-C0cdlMyO.js";import"./lexical-DcIe1jg7.js";import"./pdf-DTtYOrE_.js";import"./utils-BKjdMjTj.js";import"./pathToGoBack-CkgUjsRE.js";import"./InboxNotificationsProvider-Bh2XZMjj.js";import"./useTaskManagerAccess-D2-4N0AP.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]="5ba5c649-7c2c-45ec-8c21-73cbf1c58f59",e._sentryDebugIdIdentifier="sentry-dbid-5ba5c649-7c2c-45ec-8c21-73cbf1c58f59")}catch{}})();const Sa={drawerLeftMargin:new Le(0,0,100,200)},ga=N((function(e,a){const{jeScheduledTransaction:s,selectedJERow:t,scheduleType:n,isVendorBulkUpdateOnTransactionEnabled:i}=a,{scheduleDetailsLocalData:l,updateStatus:p}=Ze(e,a.scheduleType),h=L(e),v=l[n].jeScheduleDetails[t].jeLink,m=v.type==="recommended"?v.recommendedTransactionID:v.transactionDetailID,r=m!=null?Tt(e,m):void 0,d=R.getSignedInUser(),c=e.tenantState.currentTenantId,T={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:h.tenantId??c},x=h?.company?.companyInfo?.firstMonthOfFY??1;return{jeScheduledTransaction:s,transactionDetail:r,localData:l[n].jeScheduleDetails[t],saveStatus:p.fetchState,authParams:T,isVendorBulkUpdateOnTransactionEnabled:i,firstMonthOfFY:x,isDisabled:p.fetchState==="In-Progress"?"readonly":void 0,analytics:j,qboAppUrl:xt(Ue.qboRedirectionUrl)}}),(function(e,a){const{selectedJERow:s,jeScheduleDetailId:t,navigate:n}=a;return{onUpdateLocalData:i=>{const l=i.linkJETransaction.qboURL;l!=null&&e(wt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,jeLink:l}))},onFetchTransactionClick:i=>{e(et(i))},onSaveClick:()=>{e(yt(a.scheduleType,t))},onBackClick:()=>{n("..",{relative:"path"})},onCancelClick:()=>{const i=a.jeScheduledTransaction.scheduledJournalEntry[s];e(bt({scheduleType:a.scheduleType,jeScheduleDetailId:t,rowId:s,originalScheduledJE:i})),n("..",{relative:"path"})}}}))(Bn),va=()=>{const e=ta(),a=G(),s=$(),{scheduleDetailId:t}=W(),n=ne(),i=Sa.drawerLeftMargin.valuePx(n),{scheduleType:l}=W(),{useFeatureGate:p}=q(),{isFeatureEnabled:h}=p(M.isVendorBulkUpdateOnTransactionEnabled),v=gt(l)??"prepaid_expenses",[m,r]=u.useState(!1);if(R.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const d=f((b=>Ze(b,v)));u.useEffect((()=>{d.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]);const c=d.selectedJELinkRowIndex,T=c!=null?d.scheduleDetailsLocalData[v].jeScheduleDetails[c]?.jeLink:null,x=T?.type==="recommended"?T.recommendedTransactionID:T?.transactionDetailID;u.useEffect((()=>{x!=null&&s(et(x))}),[]),u.useEffect((()=>{T?.type==="recommended"&&m===!1&&c!=null&&(r(!0),s(vt({scheduleType:v,jeScheduleDetailId:t,rowId:c})))}));const g=f((b=>L(b))),y=f((b=>ge(b,g.companyId)));return o.jsx(na,{anchor:"right",open:!0,PaperProps:{style:{width:`calc(100% - ${i})`,boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:e.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a("..",{relative:"path"}),children:o.jsx(Ta,{onClick:b=>b.stopPropagation(),children:d.fetchState!=="Completed"||d.selectedJEScheduleTransaction==null||c==null?o.jsx(Un,{fetchState:d.fetchState}):o.jsx(ga,{scheduleType:v,jeScheduleDetailId:t,selectedJERow:c,jeScheduledTransaction:d.selectedJEScheduleTransaction,isCOTEnabled:!1,navigate:a,scheduleTab:v,controllerUserDetails:y,isVendorBulkUpdateOnTransactionEnabled:h})})})},Ta=B(St)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
5
- `,de=e=>{switch(e){case"vendors_tab":return"../summary";case"filing_1099":return"../filing_1099";case"prepaid_expenses":return"../schedules/prepaid_expenses";case"fixed_assets":return"../schedules/fixed_assets";case"accrued_expenses":return"../schedules/accrued_expenses";default:return"../opex"}},le=e=>{switch(e){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"operating_expenses_by_vendor":return"operating_expenses";default:return"vendors_list"}},ce=()=>{const e=K(),a=$(),s=f((t=>oe(t)));return u.useEffect((()=>{const t=e.pathname.split("/").pop();if(t!=null){const n=(i=>{switch(i){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"opex":return"operating_expenses";case"filing_1099":return"filing_1099";default:return"vendors_list"}})(t);n!==s.currentTab&&a(te(n))}}),[e.pathname,s.currentTab,a]),s},H="accrued_expenses",xa=N((function(e,a){const s=L(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:H,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:H,subTab:t}))},onSearchTextChanged:t=>{e(Ve({scheduleType:H,searchText:t}))},onReloadReport:()=>{e(tt(H))},onScroll:t=>{e(_e({scheduleType:H,scrollYOffset:t}))},onClickNewButton:()=>{e(Dt()),e(Et()),j.trackScheduleAccruedDetailsNewRequested({scheduleType:"accrued_expenses"}),s("details/new")},onClickSchedule:t=>{e(Ct({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeAccruedSchedules.find((i=>i.jeAccruedScheduleKey===t));s(`details/${n?.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:H,fetchState:t}))}}}))(On),ba=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),[i,l]=u.useState(!1),p=G(),h=$(),{useFeatureGate:v}=q(),m=xe();ce();const{isFeatureEnabled:r,isFeatureGateLoading:d}=v(M.isOpexByVendorFeatureEnabled),c=R.getSignedInUser(),T=f((S=>L(S))),x={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:T.tenantId},g=u.useMemo((()=>({authParams:x,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:T.companyName})),[]),[y,b]=u.useState(!1),I=f((S=>ue(S))),E=f((S=>ke(S,"accrued_expenses"))),C=e.includes("prepaid_expenses"),w=e.includes("fixed_assets"),A=e.includes("accrued_expenses");u.useEffect((()=>{(C||w||A)&&y===!1&&I!=="Completed"&&(h(pe()),b(!0))}),[y]),u.useEffect((()=>{d===!1&&(h(he({shouldFetchAccruedExpenses:A,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:C,shouldFetchOpexByVendor:r,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[I,w,d,r]),u.useEffect((()=>{t===!1&&E==="Completed"&&h(tt("accrued_expenses",{selectedTimeframe:Pe("accrued_expenses"),selectedCategoryId:"all"},!0))}),[t,E]);const _=f((S=>It(S,H))),{isAiCfoAccessEnabled:O,onAskAiCfoClick:F}=ie({mobileExploreReferrer:"Vendors — Accrued Expenses"});se({isDataReady:_.fetchState==="Completed"});const D=f((S=>z(S).isReportGenerated));f((S=>z(S).fetchState))!=="Completed"||D!==!0||r!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),A||p("../opex");const k=f((S=>ge(S,T.companyId))),W=S=>{l(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:i,handleDrawerToggle:W}),o.jsx(xa,{navigate:p,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:_,downloadParams:g,themeState:m,vendorTabsToShow:e,analytics:j,controllerUserDetails:k,isAiCfoAccessEnabled:O,onAskAiCfoClick:F,onClickMenuIcon:()=>W(!0)})]})},Q="fixed_assets",ya=N((function(e,a){const s=L(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Q,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Q,subTab:t}))},onSearchTextChanged:t=>{e(Ve({scheduleType:Q,searchText:t}))},onReloadReport:()=>{e(Te(Q))},onScroll:t=>{e(_e({scheduleType:Q,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:Q,fetchState:t}))}}}))(pt),wa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=G(),l=$();ce();const{useFeatureGate:p}=q(),h=xe(),{isFeatureEnabled:v,isFeatureGateLoading:m}=p(M.isOpexByVendorFeatureEnabled),r=R.getSignedInUser(),d=f((S=>L(S))),c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d.tenantId},T=u.useMemo((()=>({authParams:c,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[x,g]=u.useState(!1),y=f((S=>ue(S))),b=f((S=>ke(S,"fixed_assets"))),I=e.includes("prepaid_expenses"),E=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||E||C)&&x===!1&&y!=="Completed"&&(l(pe()),g(!0))}),[x]),u.useEffect((()=>{m===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:I,shouldFetchOpexByVendor:v,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[y,E,m,v]),u.useEffect((()=>{t===!1&&b==="Completed"&&l(Te("fixed_assets",{selectedTimeframe:Pe("fixed_assets"),selectedCategoryId:"all"},!0))}),[t,b]);const w=f((S=>nt(S,Q))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:_}=ie({mobileExploreReferrer:"Vendors — Fixed Assets"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>z(S).isReportGenerated));f((S=>z(S).fetchState))!=="Completed"||O!==!0||v!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),E||i("../opex");const F=f((S=>ge(S,d.companyId))),[D,k]=u.useState(!1),W=S=>{k(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:W}),o.jsx(ya,{navigate:i,scheduleListReport:w,downloadParams:T,previousTabPosition:a,setPreviousTabPosition:s,themeState:h,vendorTabsToShow:e,analytics:j,controllerUserDetails:F,isAiCfoAccessEnabled:A,onAskAiCfoClick:_,onClickMenuIcon:()=>{W(!0)}})]})},Ia=B.div`
5
+ `,de=e=>{switch(e){case"vendors_tab":return"../summary";case"filing_1099":return"../filing_1099";case"prepaid_expenses":return"../schedules/prepaid_expenses";case"fixed_assets":return"../schedules/fixed_assets";case"accrued_expenses":return"../schedules/accrued_expenses";default:return"../opex"}},le=e=>{switch(e){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"operating_expenses_by_vendor":return"operating_expenses";default:return"vendors_list"}},ce=()=>{const e=K(),a=$(),s=f((t=>oe(t)));return u.useEffect((()=>{const t=e.pathname.split("/").pop();if(t!=null){const n=(i=>{switch(i){case"prepaid_expenses":return"prepaid_expenses";case"fixed_assets":return"fixed_assets";case"accrued_expenses":return"accrued_expenses";case"opex":return"operating_expenses";case"filing_1099":return"filing_1099";default:return"vendors_list"}})(t);n!==s.currentTab&&a(te(n))}}),[e.pathname,s.currentTab,a]),s},H="accrued_expenses",xa=N((function(e,a){const s=L(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:H,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:H,subTab:t}))},onSearchTextChanged:t=>{e(Ve({scheduleType:H,searchText:t}))},onReloadReport:()=>{e(tt(H))},onScroll:t=>{e(_e({scheduleType:H,scrollYOffset:t}))},onClickNewButton:()=>{e(Dt()),e(Et()),j.trackScheduleAccruedDetailsNewRequested({scheduleType:"accrued_expenses"}),s("details/new")},onClickSchedule:t=>{e(Ct({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeAccruedSchedules.find((i=>i.jeAccruedScheduleKey===t));s(`details/${n?.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:H,fetchState:t}))}}}))(On),ba=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),[i,l]=u.useState(!1),p=G(),h=$(),{useFeatureGate:v}=q(),m=xe();ce();const{isFeatureEnabled:r,isFeatureGateLoading:d}=v(M.isOpexByVendorFeatureEnabled),c=R.getSignedInUser(),T=f((S=>L(S))),x={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:T.tenantId},g=u.useMemo((()=>({authParams:x,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:T.companyName})),[]),[y,b]=u.useState(!1),I=f((S=>ue(S))),E=f((S=>ke(S,"accrued_expenses"))),C=e.includes("prepaid_expenses"),w=e.includes("fixed_assets"),A=e.includes("accrued_expenses");u.useEffect((()=>{(C||w||A)&&y===!1&&I!=="Completed"&&(h(pe()),b(!0))}),[y]),u.useEffect((()=>{d===!1&&(h(he({shouldFetchAccruedExpenses:A,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:C,shouldFetchOpexByVendor:r,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[I,w,d,r]),u.useEffect((()=>{t===!1&&E==="Completed"&&h(tt("accrued_expenses",{selectedTimeframe:Pe("accrued_expenses"),selectedCategoryId:"all"},!0))}),[t,E]);const _=f((S=>It(S,H))),{isAiCfoAccessEnabled:O,onAskAiCfoClick:F}=ie({mobileExploreReferrer:"Vendors — Accrued Expenses"});se({isDataReady:_.fetchState==="Completed"});const D=f((S=>z(S).isReportGenerated));f((S=>z(S).fetchState))!=="Completed"||D!==!0||r!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),A||p("../opex");const k=f((S=>ge(S,T.companyId))),X=S=>{l(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:i,handleDrawerToggle:X}),o.jsx(xa,{navigate:p,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:_,downloadParams:g,themeState:m,vendorTabsToShow:e,analytics:j,controllerUserDetails:k,isAiCfoAccessEnabled:O,onAskAiCfoClick:F,onClickMenuIcon:()=>X(!0)})]})},Q="fixed_assets",ya=N((function(e,a){const s=L(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Q,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Q,subTab:t}))},onSearchTextChanged:t=>{e(Ve({scheduleType:Q,searchText:t}))},onReloadReport:()=>{e(Te(Q))},onScroll:t=>{e(_e({scheduleType:Q,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:Q,fetchState:t}))}}}))(pt),wa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=G(),l=$();ce();const{useFeatureGate:p}=q(),h=xe(),{isFeatureEnabled:v,isFeatureGateLoading:m}=p(M.isOpexByVendorFeatureEnabled),r=R.getSignedInUser(),d=f((S=>L(S))),c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:d.tenantId},T=u.useMemo((()=>({authParams:c,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[x,g]=u.useState(!1),y=f((S=>ue(S))),b=f((S=>ke(S,"fixed_assets"))),I=e.includes("prepaid_expenses"),E=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||E||C)&&x===!1&&y!=="Completed"&&(l(pe()),g(!0))}),[x]),u.useEffect((()=>{m===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:!0,shouldFetchPrepaidExpenses:I,shouldFetchOpexByVendor:v,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[y,E,m,v]),u.useEffect((()=>{t===!1&&b==="Completed"&&l(Te("fixed_assets",{selectedTimeframe:Pe("fixed_assets"),selectedCategoryId:"all"},!0))}),[t,b]);const w=f((S=>nt(S,Q))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:_}=ie({mobileExploreReferrer:"Vendors — Fixed Assets"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>z(S).isReportGenerated));f((S=>z(S).fetchState))!=="Completed"||O!==!0||v!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),E||i("../opex");const F=f((S=>ge(S,d.companyId))),[D,k]=u.useState(!1),X=S=>{k(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:X}),o.jsx(ya,{navigate:i,scheduleListReport:w,downloadParams:T,previousTabPosition:a,setPreviousTabPosition:s,themeState:h,vendorTabsToShow:e,analytics:j,controllerUserDetails:F,isAiCfoAccessEnabled:A,onAskAiCfoClick:_,onClickMenuIcon:()=>{X(!0)}})]})},Ia=B.div`
6
6
  display: flex;
7
7
  min-height: 100%;
8
8
  width: 100%;
@@ -10,7 +10,7 @@ import{j as o}from"./liveblocks-DXMWX-Ft.js";import{a as u}from"./sentry-B8ZcloT
10
10
  flex-direction: column;
11
11
  align-items: center;
12
12
  background-color: ${e=>e.theme.colors.grey4};
13
- `,Ca=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=L(e),i=n?.companyName??"",l={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},p=z(e),h=Ft(e);return{report:p,uiState:h,isAccountingClassesEnabled:me(e),analytics:j,vendorTabsToShow:a.vendorTabsToShow,downloadParams:{downloadState:h.downloadState,currentTenantCompanyName:i,statementEndPoint:`${ee}/opexByVendor`,authParams:l,timezone:ve()}}}),(function(e,a){const{navigate:s}=a;return{onFetchOpExByVendors:(t,n,i)=>{e(Bt(t,n,i))},onVendorNameAndBalanceClicked:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t.id,t.qboId,a.tenantEmailDomain,n),l=J(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses By Vendor"}})}},onRefresh:()=>{e(Ut())},onReloadReport:()=>{e(Lt(!0))},onBackClick:()=>{s("../../dashboard")},onTimeframeSelectionChanged:t=>{e(Rt(t))},onAdditionalBalanceSelectionChanged:(t,n)=>{e(At({isCompareModeOn:t,additionalBalances:n}))},onSortOrderChanged:(t,n,i)=>{e(Vt({sortkey:n,sortOrder:t,timeframe:i}))},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrSearchStarted:t=>{e(_t(t))},onPageFetchStarted:()=>{e(jt(!0))},updateDownloadStateHandler:t=>{e(Pt(t))},onClearSearch:t=>{e(kt({timeframe:t}))}}}))(Gn);function Da({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=G(),n=$(),i=K(),{tenantEmailDomain:l}=X(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=q(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled),d=f((F=>z(F)));if(h==null)throw Error("Can't access opex by vendor page without signing in...");ce();const[c,T]=u.useState(!1),x=f((F=>ue(F))),g=e.includes("prepaid_expenses"),y=e.includes("fixed_assets"),b=e.includes("accrued_expenses"),I=f((F=>oe(F))),{isAiCfoAccessEnabled:E,onAskAiCfoClick:C}=ie({mobileExploreReferrer:"Vendors — Operating Expenses by Vendor"});se({isDataReady:d.fetchState==="Completed"&&d.isReportGenerated===!0});const{areTenantIdsInSync:w}=Mn();u.useEffect((()=>{(g||y||b)&&c===!1&&x!=="Completed"&&w&&(n(pe()),T(!0))}),[c,w]),u.useEffect((()=>{w&&n(he({shouldFetchAccruedExpenses:b,shouldFetchFixedAssets:y,shouldFetchPrepaidExpenses:g,shouldFetchOpexByVendor:m===!0&&r===!1,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1}))}),[x,y,r,m,w]),d.fetchState!=="Completed"||d.isReportGenerated!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),u.useEffect((()=>{w&&(d.isReportGenerated===!1&&d.fetchState==="Completed"||m===!1&&r===!1)&&t("../summary")}),[w,d.isReportGenerated,d.fetchState,m,r,t]);const[A,_]=u.useState(!1),O=F=>{_(F)};return o.jsxs(Ia,{windowSize:p,children:[d.fetchState==="Completed"?o.jsx(Se,{analytics:j,onLoad:F=>{I.previousTab==null?F.trackVendorOperatingExpensesPageLoaded("Side Panel"):F.trackVendorOperatingExpenses(I.currentTab,I.previousTab??null)}}):null,o.jsx(re,{isAppContentDrawerOpen:A,handleDrawerToggle:O}),o.jsx(Ca,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:E,onAskAiCfoClick:C,onClickMenuIcon:()=>{O(!0)}})]})}const Z="prepaid_expenses",Ea=N((function(e,a){const s=L(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Z,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Z,subTab:t}))},onSearchTextChanged:t=>{e(Ve({scheduleType:Z,searchText:t}))},onReloadReport:()=>{e(Te(Z))},onScroll:t=>{e(_e({scheduleType:Z,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:Z,fetchState:t}))}}}))(pt),Fa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=G(),l=$(),{useFeatureGate:p}=q(),h=xe();ce();const v=R.getSignedInUser(),{isFeatureEnabled:m,isFeatureGateLoading:r}=p(M.isOpexByVendorFeatureEnabled),d=f((S=>L(S))),c=f((S=>ke(S,"prepaid_expenses"))),T={userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:d.tenantId},x=u.useMemo((()=>({authParams:T,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[g,y]=u.useState(!1),b=f((S=>ue(S))),I=e.includes("prepaid_expenses"),E=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||E||C)&&g===!1&&b!=="Completed"&&(l(pe()),y(!0))}),[g]),u.useEffect((()=>{t===!1&&c==="Completed"&&l(Te("prepaid_expenses",{selectedTimeframe:Pe("prepaid_expenses"),selectedCategoryId:"all"},!0))}),[t,c]),u.useEffect((()=>{r===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:E,shouldFetchPrepaidExpenses:!0,shouldFetchOpexByVendor:m,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[b,E,r,m]);const w=f((S=>nt(S,Z))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:_}=ie({mobileExploreReferrer:"Vendors — Prepaid Expenses"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>z(S).isReportGenerated));f((S=>z(S).fetchState))!=="Completed"||O!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),I||i("../opex");const F=f((S=>ge(S,d.companyId))),[D,k]=u.useState(!1),W=S=>{k(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:W}),o.jsx(Ea,{navigate:i,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:w,downloadParams:x,themeState:h,vendorTabsToShow:e,analytics:j,controllerUserDetails:F,isAiCfoAccessEnabled:A,onAskAiCfoClick:_,onClickMenuIcon:()=>{W(!0)}})]})},ka=B.div`
13
+ `,Ca=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=L(e),i=n?.companyName??"",l={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},p=z(e),h=Ft(e);return{report:p,uiState:h,isAccountingClassesEnabled:me(e),analytics:j,vendorTabsToShow:a.vendorTabsToShow,downloadParams:{downloadState:h.downloadState,currentTenantCompanyName:i,statementEndPoint:`${ee}/opexByVendor`,authParams:l,timezone:ve()}}}),(function(e,a){const{navigate:s}=a;return{onFetchOpExByVendors:(t,n,i)=>{e(Bt(t,n,i))},onVendorNameAndBalanceClicked:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t.id,t.qboId,a.tenantEmailDomain,n),l=J(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Operating Expenses By Vendor"}})}},onRefresh:()=>{e(Ut())},onReloadReport:()=>{e(Lt(!0))},onBackClick:()=>{s("../../dashboard")},onTimeframeSelectionChanged:t=>{e(Rt(t))},onAdditionalBalanceSelectionChanged:(t,n)=>{e(At({isCompareModeOn:t,additionalBalances:n}))},onSortOrderChanged:(t,n,i)=>{e(Vt({sortkey:n,sortOrder:t,timeframe:i}))},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrSearchStarted:t=>{e(_t(t))},onPageFetchStarted:()=>{e(jt(!0))},updateDownloadStateHandler:t=>{e(Pt(t))},onClearSearch:t=>{e(kt({timeframe:t}))}}}))(Gn);function Da({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=G(),n=$(),i=K(),{tenantEmailDomain:l}=W(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=q(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled),d=f((F=>z(F)));if(h==null)throw Error("Can't access opex by vendor page without signing in...");ce();const[c,T]=u.useState(!1),x=f((F=>ue(F))),g=e.includes("prepaid_expenses"),y=e.includes("fixed_assets"),b=e.includes("accrued_expenses"),I=f((F=>oe(F))),{isAiCfoAccessEnabled:E,onAskAiCfoClick:C}=ie({mobileExploreReferrer:"Vendors — Operating Expenses by Vendor"});se({isDataReady:d.fetchState==="Completed"&&d.isReportGenerated===!0});const{areTenantIdsInSync:w}=Mn();u.useEffect((()=>{(g||y||b)&&c===!1&&x!=="Completed"&&w&&(n(pe()),T(!0))}),[c,w]),u.useEffect((()=>{w&&n(he({shouldFetchAccruedExpenses:b,shouldFetchFixedAssets:y,shouldFetchPrepaidExpenses:g,shouldFetchOpexByVendor:m===!0&&r===!1,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1}))}),[x,y,r,m,w]),d.fetchState!=="Completed"||d.isReportGenerated!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),u.useEffect((()=>{w&&(d.isReportGenerated===!1&&d.fetchState==="Completed"||m===!1&&r===!1)&&t("../summary")}),[w,d.isReportGenerated,d.fetchState,m,r,t]);const[A,_]=u.useState(!1),O=F=>{_(F)};return o.jsxs(Ia,{windowSize:p,children:[d.fetchState==="Completed"?o.jsx(Se,{analytics:j,onLoad:F=>{I.previousTab==null?F.trackVendorOperatingExpensesPageLoaded("Side Panel"):F.trackVendorOperatingExpenses(I.currentTab,I.previousTab??null)}}):null,o.jsx(re,{isAppContentDrawerOpen:A,handleDrawerToggle:O}),o.jsx(Ca,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:E,onAskAiCfoClick:C,onClickMenuIcon:()=>{O(!0)}})]})}const Z="prepaid_expenses",Ea=N((function(e,a){const s=L(e),t=oe(e);return{tenantName:s.companyName,vendorTabsToShow:a.vendorTabsToShow,report:a.scheduleListReport,downloadParams:a.downloadParams,companyIncorporationDate:a.companyIncDate,controllerUserDetails:a.controllerUserDetails,vendorTabView:t,isAccountingClassesEnabled:me(e)}}),(function(e,a){const{navigate:s}=a;return{onBackClick:()=>{s("../../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))},onSortOrderChanged:(t,n)=>{e(Re({scheduleType:Z,sortKey:t,sortOrder:n}))},onChangeSubTab:t=>{e(Ae({scheduleType:Z,subTab:t}))},onSearchTextChanged:t=>{e(Ve({scheduleType:Z,searchText:t}))},onReloadReport:()=>{e(Te(Z))},onScroll:t=>{e(_e({scheduleType:Z,scrollYOffset:t}))},onClickSchedule:t=>{e(at({selectedJEScheduleKey:t}));const n=a.scheduleListReport.jeScheduledTransactions.find((i=>i.jeScheduleTransactionKey===t));s(n?.jeScheduleId==null?"details/new":`details/${n.jeScheduleId}`)},updateDownloadStateHandler:t=>{e(je({scheduleType:Z,fetchState:t}))}}}))(pt),Fa=({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s})=>{const[t,n]=u.useState(!1),i=G(),l=$(),{useFeatureGate:p}=q(),h=xe();ce();const v=R.getSignedInUser(),{isFeatureEnabled:m,isFeatureGateLoading:r}=p(M.isOpexByVendorFeatureEnabled),d=f((S=>L(S))),c=f((S=>ke(S,"prepaid_expenses"))),T={userId:v?.userId??"",sessionId:v?.zeniSessionId??"",tenantId:d.tenantId},x=u.useMemo((()=>({authParams:T,jeScheduleEndPoint:`${ee}/jeScheduleReports`,timezone:ve(),companyName:d.companyName})),[]),[g,y]=u.useState(!1),b=f((S=>ue(S))),I=e.includes("prepaid_expenses"),E=e.includes("fixed_assets"),C=e.includes("accrued_expenses");u.useEffect((()=>{(I||E||C)&&g===!1&&b!=="Completed"&&(l(pe()),y(!0))}),[g]),u.useEffect((()=>{t===!1&&c==="Completed"&&l(Te("prepaid_expenses",{selectedTimeframe:Pe("prepaid_expenses"),selectedCategoryId:"all"},!0))}),[t,c]),u.useEffect((()=>{r===!1&&(l(he({shouldFetchAccruedExpenses:C,shouldFetchFixedAssets:E,shouldFetchPrepaidExpenses:!0,shouldFetchOpexByVendor:m,shouldFetchVendorsList:!1,shouldFetchFiling1099Vendor:!1})),n(!0))}),[b,E,r,m]);const w=f((S=>nt(S,Z))),{isAiCfoAccessEnabled:A,onAskAiCfoClick:_}=ie({mobileExploreReferrer:"Vendors — Prepaid Expenses"});se({isDataReady:w.fetchState==="Completed"});const O=f((S=>z(S).isReportGenerated));f((S=>z(S).fetchState))!=="Completed"||O!==!0||m!==!0||e.includes("operating_expenses_by_vendor")||e.splice(1,0,"operating_expenses_by_vendor"),I||i("../opex");const F=f((S=>ge(S,d.companyId))),[D,k]=u.useState(!1),X=S=>{k(S)};return o.jsxs(o.Fragment,{children:[o.jsx(re,{isAppContentDrawerOpen:D,handleDrawerToggle:X}),o.jsx(Ea,{navigate:i,previousTabPosition:a,setPreviousTabPosition:s,scheduleListReport:w,downloadParams:x,themeState:h,vendorTabsToShow:e,analytics:j,controllerUserDetails:F,isAiCfoAccessEnabled:A,onAskAiCfoClick:_,onClickMenuIcon:()=>{X(!0)}})]})},ka=B.div`
14
14
  display: flex;
15
15
  min-height: 100%;
16
16
  width: 100%;
@@ -18,7 +18,7 @@ import{j as o}from"./liveblocks-DXMWX-Ft.js";import{a as u}from"./sentry-B8ZcloT
18
18
  flex-direction: column;
19
19
  align-items: center;
20
20
  background-color: ${e=>e.theme.colors.grey4};
21
- `,Pa=N((function(e,a){const{isFiling1099FeatureEnabled:s,vendorDetailView:t,selectedVendor:n,firstMonthOfFY:i,currentTenant:l,currentUserRoleMap:p}=a,h=R.getSignedInUser(),v={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:l.tenantId??""};return{firstMonthOfFY:i,isFiling1099FeatureEnabled:s,vendorDetailView:t,allTransactions:t?.allVendorTransactionsView,allTransactionsTabData:t?.allTransactionsTabData!=null?{timePeriod:zt(t?.allTransactionsTabData.timePeriod),numberOfQuartersFetched:t?.allTransactionsTabData.numberOfQuartersFetched}:void 0,vendorLogo:n?.logo,readOnlyMode:p?.bookkeeping_user===!0,filesEndPoint:mt.fileMicroServiceBaseUrl,authParams:v,scrollToTrend:a.isTrendPeriodSelected}}),(function(e,a){const{navigate:s,vendorDetailView:t,vendorId:n,defaultTransactionTimePeriod:i,vendorEntity:l,tenantEmailDomain:p,location:h,firstMonthOfFY:v}=a,m=()=>{const r=Wn(h.state?.pathnameStackToGoBack),d=r.poppedPathname??((c=2)=>{let T=c;a.isTrendPeriodSelected===!0&&(T=5);let x="../";for(let g=0;g<T;g++)x=`${x}../`;return x})(1);s(d,{state:{pathnameStackToGoBack:r.newStack}})};return{onSaveVendor:()=>{t!=null&&((r,d)=>{const{vendorId:c,vendorName:T,existingCategory:x,existingClass:g,existingOwner:y,selectedCategory:b,selectedClass:I,selectedOwner:E,isRecommendedCategorySelected:C,isRecommendedClassSelected:w,categoryRecommendationTypeSelected:A,classRecommendationTypeSelected:_}=en(r,d);c!=null&&j.trackVendorDetailsSave(c,T??"",x,g,y,b,I,E,C,w,A,_)})(t?.vendorViewDetails,t?.vendorViewDetails.ownerList),n!=null&&e(Zt(n,void 0))},onVendorSpendTrendFilterTabClick:r=>{e(Qt(r))},saveVendorDetailLocalData:r=>{n!=null&&e(Ht({vendorId:n,localData:r}))},saveContactsInVendorTabDetailLocalData:(r,d)=>{e(qt({vendorId:r,localData:{contacts:d}}))},onCancelClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView.vendorBasic).id!=null&&j.trackVendorDetailsCancel(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email),e(Ne()),e($e()),e(We()),e(Xe()),m()},handleSpendTrendPercentChangeClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView?.vendorBasic,r.id!=null&&j.trackVendorDetailsSpendTrendHotlinkClicked(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email))},onSaveSuccess:()=>{n!=null&&e(Kt("Not-Started",n)),e(Ne()),e($e()),e(We()),e(Xe()),m()},onTrendSelectedPeriodChange:r=>{if(r==null)i!=null&&e(we(l,"EntityDetail",{timeframe:"quarter",timePeriod:i}));else{const d=r.currentTimePeriod==null?r.addTimePeriod:{startDate:r.addTimePeriod.startDate,endDate:r.currentTimePeriod.endDate};e(Ce(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:r.addTimePeriod},v)),e(we(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:d}))}},onVendorTabSelectionChanged:r=>{e(Jt(r))},onAddressClick:(r,d)=>{if(p==null)return;const c=pa(p,r,d),T=J(h.state?.pathnameStackToGoBack,h.pathname);s(c,{state:{pathnameStackToGoBack:T}})},onVendorDetailUIChange:r=>{e(Yt({collapsableStatus:r}))},onTransactionItemClick:r=>{const d=`${ua(r,p)}`,c=J(h.state?.pathnameStackToGoBack,h.pathname);s(d,{state:{pathnameStackToGoBack:c}})},onLoadPreviousTransactionsClick:(r,d)=>{e(ot({timePeriod:Ie(r),numberOfQuartersFetched:d})),e(st(l,Ie(r),!0,!0))}}}))($n);function Ke({referrerType:e,isFiling1099FeatureEnabled:a}){const s=$(),t=K(),n=G(),i=Nn(),[l,p]=u.useState(!1),[h,v]=u.useState(!1),[m,r]=u.useState(!1),d=X(),c=d.vendorId,T=d.qboId,{tenantEmailDomain:x,timeframe:g,startDate:y,endDate:b}=d,I={id:T??"",name:"",type:"vendor",zeniId:c??"",qboId:T??""};u.useEffect((()=>{g!=null&&y!=null&&b!=null?p(!0):(p(!1),m===!1&&(r(!0),s(we(I,"EntityDetail"))))}),[g,y,b]);const E=ne(),C=f((V=>L(V))),w=f((V=>c!=null?Ot(V,c,I):void 0)),A=f((V=>V.vendorState.vendorByID[c??""])),_=f((V=>L(V).company?.companyInfo.firstMonthOfFY??1)),O=f((()=>Mt(_,2))),F=Ie({startDate:O.startDate,endDate:Gt()}),D=Nt(_),k=f((V=>$t(V.trendWithTransactionsState,I,"EntityDetail"))),[W,S]=u.useState(!1),be=l===!1&&m===!1?void 0:k?.selectedPeriod?.timePeriod??D;return u.useEffect((()=>(e==null&&w?.fetchState!=="Not-Started"||c==null||s(Wt(c,I)),()=>{e!=null&&c!=null&&s(Xt(c))})),[c,t.state,s]),u.useEffect((()=>{w?.fetchState==="Completed"&&w?.vendorViewDetails.vendorView?.vendorBasic!=null&&((V,ae,ye)=>{V.id!=null&&j.trackVendorDetails(V.id,V.name,ye,V.account?.accountName,V.class?.className,V.owner?.email,ae.percentChange,ae.last30DaysSpend,ae.last90DaysSpend,ae.yearToDateSpend)})(w?.vendorViewDetails.vendorView?.vendorBasic,w?.vendorSpend,e),S(!1)}),[w?.fetchState]),u.useEffect((()=>{if(w?.fetchState==="Completed"&&W===!1){be!=null&&l===!1&&(s(Ce(I,"EntityDetail",{timeframe:k?.selectedPeriod?.timeframe??"quarter",timePeriod:be},_)),S(!0));const V=ht.getLocalizedStrings().dateFormat.analytics;if(l===!0&&g!=null&&y!=null&&b!=null){S(!0);const ae=g,ye={startDate:Ge(y,V.YYYYDashMMDashDDFormat),endDate:Ge(b,V.YYYYDashMMDashDDFormat)};s(Ce(I,"EntityDetail",{timeframe:ae,timePeriod:ye}))}}}),[w?.fetchState,be,k?.selectedPeriod?.timeframe,l,_]),u.useEffect((()=>{w?.fetchState==="Completed"&&h===!1&&(s(ot({timePeriod:F,numberOfQuartersFetched:3})),s(st(I,w.allTransactionsTabData?.timePeriod??F,!1,!0)),v(!0))}),[w?.fetchState,h]),c==null?o.jsx(fe,{}):o.jsx(ka,{windowSize:E,children:o.jsx(Pa,{location:t,navigate:n,isFiling1099FeatureEnabled:a,vendorDetailView:w,vendorId:c,currentTenant:C,selectedVendor:A,firstMonthOfFY:_,isTrendPeriodSelected:l,selectedPeriodTimePeriod:k?.selectedPeriod?.timePeriod,defaultTransactionTimePeriod:D,vendorEntity:I,currentUserRoleMap:i?.loggedInUserRoleMap,tenantEmailDomain:x})})}const ja=ht.getLocalizedStrings().spendManagement.billPay.vendorCreation.vendorDetails,_a={containerWidth:new Le(100,58)},Va=B(zn)`
21
+ `,Pa=N((function(e,a){const{isFiling1099FeatureEnabled:s,vendorDetailView:t,selectedVendor:n,firstMonthOfFY:i,currentTenant:l,currentUserRoleMap:p}=a,h=R.getSignedInUser(),v={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:l.tenantId??""};return{firstMonthOfFY:i,isFiling1099FeatureEnabled:s,vendorDetailView:t,allTransactions:t?.allVendorTransactionsView,allTransactionsTabData:t?.allTransactionsTabData!=null?{timePeriod:zt(t?.allTransactionsTabData.timePeriod),numberOfQuartersFetched:t?.allTransactionsTabData.numberOfQuartersFetched}:void 0,vendorLogo:n?.logo,readOnlyMode:p?.bookkeeping_user===!0,filesEndPoint:mt.fileMicroServiceBaseUrl,authParams:v,scrollToTrend:a.isTrendPeriodSelected}}),(function(e,a){const{navigate:s,vendorDetailView:t,vendorId:n,defaultTransactionTimePeriod:i,vendorEntity:l,tenantEmailDomain:p,location:h,firstMonthOfFY:v}=a,m=()=>{const r=Xn(h.state?.pathnameStackToGoBack),d=r.poppedPathname??((c=2)=>{let T=c;a.isTrendPeriodSelected===!0&&(T=5);let x="../";for(let g=0;g<T;g++)x=`${x}../`;return x})(1);s(d,{state:{pathnameStackToGoBack:r.newStack}})};return{onSaveVendor:()=>{t!=null&&((r,d)=>{const{vendorId:c,vendorName:T,existingCategory:x,existingClass:g,existingOwner:y,selectedCategory:b,selectedClass:I,selectedOwner:E,isRecommendedCategorySelected:C,isRecommendedClassSelected:w,categoryRecommendationTypeSelected:A,classRecommendationTypeSelected:_}=en(r,d);c!=null&&j.trackVendorDetailsSave(c,T??"",x,g,y,b,I,E,C,w,A,_)})(t?.vendorViewDetails,t?.vendorViewDetails.ownerList),n!=null&&e(Zt(n,void 0))},onVendorSpendTrendFilterTabClick:r=>{e(Qt(r))},saveVendorDetailLocalData:r=>{n!=null&&e(Ht({vendorId:n,localData:r}))},saveContactsInVendorTabDetailLocalData:(r,d)=>{e(qt({vendorId:r,localData:{contacts:d}}))},onCancelClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView.vendorBasic).id!=null&&j.trackVendorDetailsCancel(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email),e(Ne()),e($e()),e(Xe()),e(We()),m()},handleSpendTrendPercentChangeClick:()=>{var r;t?.vendorViewDetails.vendorView?.vendorBasic!=null&&(r=t.vendorViewDetails.vendorView?.vendorBasic,r.id!=null&&j.trackVendorDetailsSpendTrendHotlinkClicked(r.id??"",r.name,r.account?.accountName,r.class?.className,r.owner?.email))},onSaveSuccess:()=>{n!=null&&e(Kt("Not-Started",n)),e(Ne()),e($e()),e(Xe()),e(We()),m()},onTrendSelectedPeriodChange:r=>{if(r==null)i!=null&&e(we(l,"EntityDetail",{timeframe:"quarter",timePeriod:i}));else{const d=r.currentTimePeriod==null?r.addTimePeriod:{startDate:r.addTimePeriod.startDate,endDate:r.currentTimePeriod.endDate};e(Ce(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:r.addTimePeriod},v)),e(we(l,"EntityDetail",{timeframe:r.timeframe,timePeriod:d}))}},onVendorTabSelectionChanged:r=>{e(Jt(r))},onAddressClick:(r,d)=>{if(p==null)return;const c=pa(p,r,d),T=J(h.state?.pathnameStackToGoBack,h.pathname);s(c,{state:{pathnameStackToGoBack:T}})},onVendorDetailUIChange:r=>{e(Yt({collapsableStatus:r}))},onTransactionItemClick:r=>{const d=`${ua(r,p)}`,c=J(h.state?.pathnameStackToGoBack,h.pathname);s(d,{state:{pathnameStackToGoBack:c}})},onLoadPreviousTransactionsClick:(r,d)=>{e(ot({timePeriod:Ie(r),numberOfQuartersFetched:d})),e(st(l,Ie(r),!0,!0))}}}))($n);function Ke({referrerType:e,isFiling1099FeatureEnabled:a}){const s=$(),t=K(),n=G(),i=Nn(),[l,p]=u.useState(!1),[h,v]=u.useState(!1),[m,r]=u.useState(!1),d=W(),c=d.vendorId,T=d.qboId,{tenantEmailDomain:x,timeframe:g,startDate:y,endDate:b}=d,I={id:T??"",name:"",type:"vendor",zeniId:c??"",qboId:T??""};u.useEffect((()=>{g!=null&&y!=null&&b!=null?p(!0):(p(!1),m===!1&&(r(!0),s(we(I,"EntityDetail"))))}),[g,y,b]);const E=ne(),C=f((V=>L(V))),w=f((V=>c!=null?Ot(V,c,I):void 0)),A=f((V=>V.vendorState.vendorByID[c??""])),_=f((V=>L(V).company?.companyInfo.firstMonthOfFY??1)),O=f((()=>Mt(_,2))),F=Ie({startDate:O.startDate,endDate:Gt()}),D=Nt(_),k=f((V=>$t(V.trendWithTransactionsState,I,"EntityDetail"))),[X,S]=u.useState(!1),be=l===!1&&m===!1?void 0:k?.selectedPeriod?.timePeriod??D;return u.useEffect((()=>(e==null&&w?.fetchState!=="Not-Started"||c==null||s(Xt(c,I)),()=>{e!=null&&c!=null&&s(Wt(c))})),[c,t.state,s]),u.useEffect((()=>{w?.fetchState==="Completed"&&w?.vendorViewDetails.vendorView?.vendorBasic!=null&&((V,ae,ye)=>{V.id!=null&&j.trackVendorDetails(V.id,V.name,ye,V.account?.accountName,V.class?.className,V.owner?.email,ae.percentChange,ae.last30DaysSpend,ae.last90DaysSpend,ae.yearToDateSpend)})(w?.vendorViewDetails.vendorView?.vendorBasic,w?.vendorSpend,e),S(!1)}),[w?.fetchState]),u.useEffect((()=>{if(w?.fetchState==="Completed"&&X===!1){be!=null&&l===!1&&(s(Ce(I,"EntityDetail",{timeframe:k?.selectedPeriod?.timeframe??"quarter",timePeriod:be},_)),S(!0));const V=ht.getLocalizedStrings().dateFormat.analytics;if(l===!0&&g!=null&&y!=null&&b!=null){S(!0);const ae=g,ye={startDate:Ge(y,V.YYYYDashMMDashDDFormat),endDate:Ge(b,V.YYYYDashMMDashDDFormat)};s(Ce(I,"EntityDetail",{timeframe:ae,timePeriod:ye}))}}}),[w?.fetchState,be,k?.selectedPeriod?.timeframe,l,_]),u.useEffect((()=>{w?.fetchState==="Completed"&&h===!1&&(s(ot({timePeriod:F,numberOfQuartersFetched:3})),s(st(I,w.allTransactionsTabData?.timePeriod??F,!1,!0)),v(!0))}),[w?.fetchState,h]),c==null?o.jsx(fe,{}):o.jsx(ka,{windowSize:E,children:o.jsx(Pa,{location:t,navigate:n,isFiling1099FeatureEnabled:a,vendorDetailView:w,vendorId:c,currentTenant:C,selectedVendor:A,firstMonthOfFY:_,isTrendPeriodSelected:l,selectedPeriodTimePeriod:k?.selectedPeriod?.timePeriod,defaultTransactionTimePeriod:D,vendorEntity:I,currentUserRoleMap:i?.loggedInUserRoleMap,tenantEmailDomain:x})})}const ja=ht.getLocalizedStrings().spendManagement.billPay.vendorCreation.vendorDetails,_a={containerWidth:new Le(100,58)},Va=B(zn)`
22
22
  width: ${Y.sp4};
23
23
  height: ${Y.sp4};
24
24
  cursor: pointer;
@@ -35,7 +35,7 @@ import{j as o}from"./liveblocks-DXMWX-Ft.js";import{a as u}from"./sentry-B8ZcloT
35
35
  flex-direction: column;
36
36
  width: ${e=>`${_a.containerWidth.value(e.windowSize)}%`};
37
37
  ${e=>e.windowSize!=="small"?"overflow: auto;":""}
38
- `,La=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},i=e.vendorFiling1099UploadDetailsState,l=e.vendorFiling1099UploadDetailsState;let p={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(p=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{uploadInvoiceEndPoint:`${mt.documentAIMicroServiceBaseUrl}`,vendorFiling1099UploadDetailsState:i,vendorFiling1099UploadDetailsViewState:l,uploadStaus:l.w9FormUploadStatus,authParams:n,billId:a.billId,vendorId:a.vendorId,file:a.file,showAutofill:a.showAutofill,type:a.type,analytics:j,entityId:a.billId,fetchVendorFetchStatus:p,vendorLegalName:a.vendorLegalName}}),(function(e,a){const s=a.vendorId;return{onInvoiceUpload:t=>{if((function(n){return n!=null&&"w9_form"in n})(t)&&(e(on({w9FormFile:t.files[0]})),t.w9_form[0]!=null)){e(sn({ocrData:t.w9_form[0],vendorId:s}));const n=(i=>({street:[i.street.join(" ")],city:i.city,state:i.state,postalCode:i.postal_code,countryCode:i.country_code??void 0,country:i.country??""}))(t.w9_form[0].address);e(ct({addressType:"vendor_address",addressToCreate:n}))}},updateInvoiceUploadFetchState:t=>{e(De({fetchState:t,error:void 0}))},onSkipAutofill:t=>{e(an(t))},onVendorFiling1099UploadDetailsSave:t=>{e(lt(t))},onDeleteClick:()=>{e(De({fetchState:"Not-Started",error:void 0})),e(dt({vendorId:s,w9Documents:[]}))}}}))(Jn);function qe({appContent:e,showFullScreenSkeletonWhileLoading:a}){const s=$(),t=G(),{vendorId:n}=X(),i=ne(),l=xe(),p=R.getSignedInUser(),[h,v]=u.useState(!1),{useFeatureGate:m}=q(),{isFeatureEnabled:r}=m(M.isVendorRecommendationFeatureEnabled),d=f((D=>L(D))).companyName,c=new AbortController,T=c.signal;let x,g,y,b,I;if(n==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");x=f((D=>it(D,n))),g=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsSaveStatus)),y=f((D=>D.vendorViewState.editVendorStateById[n]?.fetchStatus)),I=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsLocalData.w9Documents?.[0])),b=f((D=>D.vendorFiling1099UploadDetailsState));const E=y?.fetchState==="In-Progress"||b?.w9FormUploadStatus?.fetchState==="In-Progress",C=()=>{l.toggle()};u.useEffect((()=>()=>{c.abort(),s(rt(n))}),[]),u.useEffect((()=>{h||n!=null&&(v(!0),s(tn(!1,n,T)))}),[n]);const w=Je(y?.fetchState),A=Je(g?.fetchState),_=x.vendor?.contactIds,O=_?.[_.length-1],F=f((D=>D.contactState.contactById[O]));if(u.useEffect((()=>{n!=null&&w==="In-Progress"&&y?.fetchState==="Completed"&&x?.vendor!=null&&(s(nn(n,x.vendor,F)),x?.vendor.filing1099W9Files?.[0]!=null&&s(De({fetchState:"Completed",error:void 0})))}),[n,x?.vendor]),u.useEffect((()=>{A==="In-Progress"&&g?.fetchState==="Completed"&&t("../../vendors/filing_1099")}),[g?.fetchState]),a===!0&&y?.fetchState!=="Completed"&&y?.fetchState!=="Error")return o.jsx(Ga,{children:o.jsx(Xn,{})});if(p==null)throw Error("Can't access VendorFiling1099UploadScreen without signing in...");return o.jsxs(Aa,{windowSize:i,children:[i!=="small"?o.jsxs(Ba,{children:[o.jsx(Va,{onClick:C}),o.jsxs(Ua,{showContent:p.userEmailDomain==="zeni.ai",children:[o.jsx(Oa,{showAutofill:!1}),o.jsx(Ma,{showAutofill:!1,children:d})]})]}):null,o.jsx(La,{vendorId:n,file:I,showAutofill:!1,type:"w9",isVendorRecommendationEnabled:r,pdfTitle:I?ja.w9FormTitle:void 0,showTitlebar:!0,showTitlebarIcon:!0,vendorLegalName:x?.vendor?.legalName,isLoading:E}),o.jsx(Ra,{windowSize:i,children:e})]})}const Ua=B.div`
38
+ `,La=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""},i=e.vendorFiling1099UploadDetailsState,l=e.vendorFiling1099UploadDetailsState;let p={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(p=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{uploadInvoiceEndPoint:`${mt.documentAIMicroServiceBaseUrl}`,vendorFiling1099UploadDetailsState:i,vendorFiling1099UploadDetailsViewState:l,uploadStaus:l.w9FormUploadStatus,authParams:n,billId:a.billId,vendorId:a.vendorId,file:a.file,showAutofill:a.showAutofill,type:a.type,analytics:j,entityId:a.billId,fetchVendorFetchStatus:p,vendorLegalName:a.vendorLegalName}}),(function(e,a){const s=a.vendorId;return{onInvoiceUpload:t=>{if((function(n){return n!=null&&"w9_form"in n})(t)&&(e(on({w9FormFile:t.files[0]})),t.w9_form[0]!=null)){e(sn({ocrData:t.w9_form[0],vendorId:s}));const n=(i=>({street:[i.street.join(" ")],city:i.city,state:i.state,postalCode:i.postal_code,countryCode:i.country_code??void 0,country:i.country??""}))(t.w9_form[0].address);e(ct({addressType:"vendor_address",addressToCreate:n}))}},updateInvoiceUploadFetchState:t=>{e(De({fetchState:t,error:void 0}))},onSkipAutofill:t=>{e(an(t))},onVendorFiling1099UploadDetailsSave:t=>{e(lt(t))},onDeleteClick:()=>{e(De({fetchState:"Not-Started",error:void 0})),e(dt({vendorId:s,w9Documents:[]}))}}}))(Jn);function qe({appContent:e,showFullScreenSkeletonWhileLoading:a}){const s=$(),t=G(),{vendorId:n}=W(),i=ne(),l=xe(),p=R.getSignedInUser(),[h,v]=u.useState(!1),{useFeatureGate:m}=q(),{isFeatureEnabled:r}=m(M.isVendorRecommendationFeatureEnabled),d=f((D=>L(D))).companyName,c=new AbortController,T=c.signal;let x,g,y,b,I;if(n==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");x=f((D=>it(D,n))),g=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsSaveStatus)),y=f((D=>D.vendorViewState.editVendorStateById[n]?.fetchStatus)),I=f((D=>D.vendorFiling1099UploadDetailsState.vendor1099DetailsLocalData.w9Documents?.[0])),b=f((D=>D.vendorFiling1099UploadDetailsState));const E=y?.fetchState==="In-Progress"||b?.w9FormUploadStatus?.fetchState==="In-Progress",C=()=>{l.toggle()};u.useEffect((()=>()=>{c.abort(),s(rt(n))}),[]),u.useEffect((()=>{h||n!=null&&(v(!0),s(tn(!1,n,T)))}),[n]);const w=Je(y?.fetchState),A=Je(g?.fetchState),_=x.vendor?.contactIds,O=_?.[_.length-1],F=f((D=>D.contactState.contactById[O]));if(u.useEffect((()=>{n!=null&&w==="In-Progress"&&y?.fetchState==="Completed"&&x?.vendor!=null&&(s(nn(n,x.vendor,F)),x?.vendor.filing1099W9Files?.[0]!=null&&s(De({fetchState:"Completed",error:void 0})))}),[n,x?.vendor]),u.useEffect((()=>{A==="In-Progress"&&g?.fetchState==="Completed"&&t("../../vendors/filing_1099")}),[g?.fetchState]),a===!0&&y?.fetchState!=="Completed"&&y?.fetchState!=="Error")return o.jsx(Ga,{children:o.jsx(Wn,{})});if(p==null)throw Error("Can't access VendorFiling1099UploadScreen without signing in...");return o.jsxs(Aa,{windowSize:i,children:[i!=="small"?o.jsxs(Ba,{children:[o.jsx(Va,{onClick:C}),o.jsxs(Ua,{showContent:p.userEmailDomain==="zeni.ai",children:[o.jsx(Oa,{showAutofill:!1}),o.jsx(Ma,{showAutofill:!1,children:d})]})]}):null,o.jsx(La,{vendorId:n,file:I,showAutofill:!1,type:"w9",isVendorRecommendationEnabled:r,pdfTitle:I?ja.w9FormTitle:void 0,showTitlebar:!0,showTitlebarIcon:!0,vendorLegalName:x?.vendor?.legalName,isLoading:E}),o.jsx(Ra,{windowSize:i,children:e})]})}const Ua=B.div`
39
39
  display: ${e=>e.showContent?"flex":"none"};
40
40
  align-items: center;
41
41
  `,Ba=B.div`
@@ -57,7 +57,7 @@ import{j as o}from"./liveblocks-DXMWX-Ft.js";import{a as u}from"./sentry-B8ZcloT
57
57
  height: 100vh;
58
58
  overflow: hidden;
59
59
  background-color: ${e=>e.theme.colors.grey4};
60
- `,Na=N((function(e){const a=rn(e);return{vendorDetailView:dn(e),globalMerchantView:a}}),(function(e,a){const{navigate:s}=a;return{updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t}))},fetchRecommendation:t=>{e(cn("tenant",t))},onSaveClick:()=>{e(ln())},onBackClick:()=>{s("../review")}}}))(Kn);function $a(){const e=G();return o.jsx(Na,{navigate:e})}const Wa=B.div`
60
+ `,Na=N((function(e){const a=rn(e);return{vendorDetailView:dn(e),globalMerchantView:a}}),(function(e,a){const{navigate:s}=a;return{updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t}))},fetchRecommendation:t=>{e(cn("tenant",t))},onSaveClick:()=>{e(ln())},onBackClick:()=>{s("../review")}}}))(Kn);function $a(){const e=G();return o.jsx(Na,{navigate:e})}const Xa=B.div`
61
61
  display: flex;
62
62
  min-height: 100%;
63
63
  width: 100%;
@@ -65,11 +65,11 @@ import{j as o}from"./liveblocks-DXMWX-Ft.js";import{a as u}from"./sentry-B8ZcloT
65
65
  flex-direction: column;
66
66
  align-items: center;
67
67
  background-color: ${e=>e.theme.colors.grey4};
68
- `,Xa=N((function(e,a){const{vendorFirstReviewDetails:s}=a,t=e.globalMerchantAutoCompleteState.autoCompleteText,n=R.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},p=L(e);return{vendorFirstReviewView:s,globalMerchantAutoCompleteData:{globalMerchantAutoCompleteView:s.globalMerchantAutoCompleteView,autoCompleteText:t},analytics:j,authParams:l,attachmentEndpoint:p.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ee}/vendor_attachments_accounting_provider`:`${ee}/vendor_attachments`}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorReviewView:(t,n,i)=>{e(Ee(t,n,i))},onGlobalMerchantAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?e(vn({searchString:t,globalMerchantType:n??"vendor"})):t.trim().length===0&&e(Ye())},onUpdateLocalData:(t,n,i,l)=>{if(n!=null){const p=za(n);e(gn({vendorId:t,currentSelection:p,selectedGlobalMerchantId:i,vendorRenamedText:l}))}},onResetVendorLocalData:t=>{e(Sn({vendorId:t}))},onVendorNameClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=J(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onUpdatePageToken:t=>{e(fn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(mn({sortOrder:t,sortKey:n}))},onUpdateScrollYOffset:t=>{e(hn({scrollYOffset:t}))},onClickSave:(t,n,i)=>{e(pn(t,n,i))},onClickCancelPopup:()=>{e(un())},onClearGlobalMerchantAutoCompleteResults:()=>{e(Ye())},onClickRedirectToQBO:()=>{window.open(`${Ue.qboRedirectionUrl}/vendors`,"_blank")},updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t})),s(`./vendor/${t.id}`)},onBackClick:()=>{s("../..")},onReloadList:()=>{e(Ee(null))}}}))(qn);function He(){const e=G(),a=$(),s=K(),{tenantEmailDomain:t}=X(),n=ne(),i=R.getSignedInUser(),{vendorId:l}=X(),p=f((d=>ze(d))),[h,v]=u.useState(!1),m=f((d=>ze(d).fetchState));if(u.useEffect((()=>{m==="Not-Started"&&h===!1&&(a(Ee(null)),v(!0))}),[]),i==null)throw Error("Can't access first review page without signing in...");const r=d=>d.trackPageLoaded(Be.Event.vendorTenantReviewListPage);return o.jsxs(o.Fragment,{children:[m==="Completed"?o.jsx(Se,{analytics:j,onLoad:r}):null,o.jsx(Se,{analytics:j,onLoad:r}),o.jsx(ha,{isOpen:l!=null,drawerLeftMargin:new Le(0,0,300,600),onClose:()=>{e("../review")},children:o.jsx(Ya,{onClick:d=>d.stopPropagation(),children:o.jsx($a,{})})}),o.jsx(Wa,{windowSize:n,children:o.jsx(Xa,{location:s,navigate:e,vendorFirstReviewDetails:p,tenantEmailDomain:t})})]})}const za=e=>e.recommendedFirst===!0?"recommendedFirst":e.recommendedSecond===!0?"recommendedSecond":e.retain===!0?"retain":e.rename===!0?"rename":e.customMerchant===!0?"customMerchant":null,Ya=B(St)`
68
+ `,Wa=N((function(e,a){const{vendorFirstReviewDetails:s}=a,t=e.globalMerchantAutoCompleteState.autoCompleteText,n=R.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},p=L(e);return{vendorFirstReviewView:s,globalMerchantAutoCompleteData:{globalMerchantAutoCompleteView:s.globalMerchantAutoCompleteView,autoCompleteText:t},analytics:j,authParams:l,attachmentEndpoint:p.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${ee}/vendor_attachments_accounting_provider`:`${ee}/vendor_attachments`}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorReviewView:(t,n,i)=>{e(Ee(t,n,i))},onGlobalMerchantAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?e(vn({searchString:t,globalMerchantType:n??"vendor"})):t.trim().length===0&&e(Ye())},onUpdateLocalData:(t,n,i,l)=>{if(n!=null){const p=za(n);e(gn({vendorId:t,currentSelection:p,selectedGlobalMerchantId:i,vendorRenamedText:l}))}},onResetVendorLocalData:t=>{e(Sn({vendorId:t}))},onVendorNameClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=J(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onUpdatePageToken:t=>{e(fn({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(mn({sortOrder:t,sortKey:n}))},onUpdateScrollYOffset:t=>{e(hn({scrollYOffset:t}))},onClickSave:(t,n,i)=>{e(pn(t,n,i))},onClickCancelPopup:()=>{e(un())},onClearGlobalMerchantAutoCompleteResults:()=>{e(Ye())},onClickRedirectToQBO:()=>{window.open(`${Ue.qboRedirectionUrl}/vendors`,"_blank")},updateVendorDetailLocalData:t=>{e(ut({vendorDetails:t})),s(`./vendor/${t.id}`)},onBackClick:()=>{s("../..")},onReloadList:()=>{e(Ee(null))}}}))(qn);function He(){const e=G(),a=$(),s=K(),{tenantEmailDomain:t}=W(),n=ne(),i=R.getSignedInUser(),{vendorId:l}=W(),p=f((d=>ze(d))),[h,v]=u.useState(!1),m=f((d=>ze(d).fetchState));if(u.useEffect((()=>{m==="Not-Started"&&h===!1&&(a(Ee(null)),v(!0))}),[]),i==null)throw Error("Can't access first review page without signing in...");const r=d=>d.trackPageLoaded(Be.Event.vendorTenantReviewListPage);return o.jsxs(o.Fragment,{children:[m==="Completed"?o.jsx(Se,{analytics:j,onLoad:r}):null,o.jsx(Se,{analytics:j,onLoad:r}),o.jsx(ha,{isOpen:l!=null,drawerLeftMargin:new Le(0,0,300,600),onClose:()=>{e("../review")},children:o.jsx(Ya,{onClick:d=>d.stopPropagation(),children:o.jsx($a,{})})}),o.jsx(Xa,{windowSize:n,children:o.jsx(Wa,{location:s,navigate:e,vendorFirstReviewDetails:p,tenantEmailDomain:t})})]})}const za=e=>e.recommendedFirst===!0?"recommendedFirst":e.recommendedSecond===!0?"recommendedSecond":e.retain===!0?"retain":e.rename===!0?"rename":e.customMerchant===!0?"customMerchant":null,Ya=B(St)`
69
69
  display: flex;
70
70
  min-height: 100%;
71
71
  flex-direction: column;
72
- `,Ja=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=e.vendorFiling1099UploadDetailsState,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""};let l={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(l=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{analytics:j,vendorFiling1099UploadDetailsViewState:n,authParams:i,googleAPIKey:Ue.googleMapsAPIKey,vendorId:a.vendorId,fetchVendorFetchStatus:l,vendor:a.vendorFiling1099UploadDetails?.vendor}}),(function(e,a){const{currentTenant:s,navigate:t,location:n,vendorId:i,vendorFiling1099UploadDetails:l}=a,{tenantEmailDomain:p}=s;return{onVendorFiling1099UploadDetailsSave:h=>{e(lt(h)),j.trackVendor1099DetailSave(l.vendor.legalName??"")},onSaveChangesToLocalStore:h=>{e(dt(h))},onResetVendorFiling1099FormStatus:()=>{e(Tn())},onAddressEditHandler:h=>{const v=aa((m=>({street:m.vendor1099FilingSectionId.street,suite:m.vendor1099FilingSectionId.suite,city:m.vendor1099FilingSectionId.city,state:m.vendor1099FilingSectionId.state,country:m.vendor1099FilingSectionId.country,countryCode:m.vendor1099FilingSectionId.countryCode,postalCode:m.vendor1099FilingSectionId.postalCode,secondaryInfo:m.vendor1099FilingSectionId.secondaryInfo}))(h));e(ct({addressType:"vendor_address",addressToCreate:v}))},goBackToListPage:()=>{e(rt(i));const h=`/${p}/vendors/filing_1099/`,v=J(n.state?.pathnameStackToGoBack,n.pathname);t(h,{state:{pathnameStackToGoBack:v}})},onAddressClick:h=>{const v=(function(r,d,c){let T=`/${r}/vendors/filing_1099/upload/${c}/edit`;return T=T.concat(`/new/${d}`),T})(p,h,i),m=J(n.state?.pathnameStackToGoBack,n.pathname);t(v,{state:{pathnameStackToGoBack:m}})},AddressFormPage:Qn}}))(Hn);function Ka(){const e=G(),a=K(),{vendorId:s}=X(),t=f((p=>L(p)));let n;if(s==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");n=f((p=>it(p,s)));const{tenantEmailDomain:i}=t,l=t.companyId??R.getSignedInUserTenant(i)?.companyId;if(l==null)throw new Error("Company ID not found for Vendor Filing 1099 Details Screen");return o.jsx(Ja,{location:a,navigate:e,currentTenant:t,vendorId:s,vendorFiling1099UploadDetails:n,companyId:l})}const qa=B.div`
72
+ `,Ja=N((function(e,a){const s=R.getSignedInUser(),t=e.tenantState.currentTenantId,n=e.vendorFiling1099UploadDetailsState,i={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:t??""};let l={fetchState:"Not-Started",error:void 0};return a.vendorId!=null&&(l=e.vendorViewState.editVendorStateById[a.vendorId]?.fetchStatus),{analytics:j,vendorFiling1099UploadDetailsViewState:n,authParams:i,googleAPIKey:Ue.googleMapsAPIKey,vendorId:a.vendorId,fetchVendorFetchStatus:l,vendor:a.vendorFiling1099UploadDetails?.vendor}}),(function(e,a){const{currentTenant:s,navigate:t,location:n,vendorId:i,vendorFiling1099UploadDetails:l}=a,{tenantEmailDomain:p}=s;return{onVendorFiling1099UploadDetailsSave:h=>{e(lt(h)),j.trackVendor1099DetailSave(l.vendor.legalName??"")},onSaveChangesToLocalStore:h=>{e(dt(h))},onResetVendorFiling1099FormStatus:()=>{e(Tn())},onAddressEditHandler:h=>{const v=aa((m=>({street:m.vendor1099FilingSectionId.street,suite:m.vendor1099FilingSectionId.suite,city:m.vendor1099FilingSectionId.city,state:m.vendor1099FilingSectionId.state,country:m.vendor1099FilingSectionId.country,countryCode:m.vendor1099FilingSectionId.countryCode,postalCode:m.vendor1099FilingSectionId.postalCode,secondaryInfo:m.vendor1099FilingSectionId.secondaryInfo}))(h));e(ct({addressType:"vendor_address",addressToCreate:v}))},goBackToListPage:()=>{e(rt(i));const h=`/${p}/vendors/filing_1099/`,v=J(n.state?.pathnameStackToGoBack,n.pathname);t(h,{state:{pathnameStackToGoBack:v}})},onAddressClick:h=>{const v=(function(r,d,c){let T=`/${r}/vendors/filing_1099/upload/${c}/edit`;return T=T.concat(`/new/${d}`),T})(p,h,i),m=J(n.state?.pathnameStackToGoBack,n.pathname);t(v,{state:{pathnameStackToGoBack:m}})},AddressFormPage:Qn}}))(Hn);function Ka(){const e=G(),a=K(),{vendorId:s}=W(),t=f((p=>L(p)));let n;if(s==null)throw new Error("Vendor ID not found for Vendor Filing 1099 Details Screen");n=f((p=>it(p,s)));const{tenantEmailDomain:i}=t,l=t.companyId??R.getSignedInUserTenant(i)?.companyId;if(l==null)throw new Error("Company ID not found for Vendor Filing 1099 Details Screen");return o.jsx(Ja,{location:a,navigate:e,currentTenant:t,vendorId:s,vendorFiling1099UploadDetails:n,companyId:l})}const qa=B.div`
73
73
  display: flex;
74
74
  min-height: 100%;
75
75
  width: 100%;
@@ -77,7 +77,7 @@ import{j as o}from"./liveblocks-DXMWX-Ft.js";import{a as u}from"./sentry-B8ZcloT
77
77
  flex-direction: column;
78
78
  align-items: center;
79
79
  background-color: ${e=>e.theme.colors.grey4};
80
- `,Ha=N((function(e,a){const{vendorsFiling1099ListDetails:s,accountMappingView:t,analytics:n}=a;return{analytics:n,vendorsFiling1099List:s.vendors,isVendor1099Populated:s.isVendor1099Populated,accountMappingView:t,fetchState:s.fetchState,uiState:s.uiState,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow}}),(function(e,a){const{navigate:s,analytics:t}=a;return{onUpdateSortUiState:(n,i)=>{e(En({sortOrder:n,sortKey:i}))},onUpdateSearchUiState:n=>{e(Dn({searchString:n}))},onVendorRowClick:n=>{if(a.tenantEmailDomain!=null){const i=`/${a.tenantEmailDomain}/vendors/filing_1099/upload/${encodeURIComponent(n)}/edit`,l=J(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onReloadVendors:()=>{e(Fe(!0))},onBackClick:()=>{e(In()),e(Cn())},onVendorTabSelectionChanged:n=>{const i=de(n);s(i),e(te(le(n)))},onAccountMappingChange:n=>{const{filing1099:i}=n,{bankAccount:l,expenseCategory1099:p}=i,h=ma(a.accountMappingView.bankAccounts1099FilingAccountList,l.selectedOptions),v=fa(a.accountMappingView.expenseAccounts1099FilingAccountList,p),m={selectedBankAccounts1099FilingAccountIds:h.map((r=>r.accountId)),selectedExpenseAccounts1099FilingAccountIds:v};e(wn({data:m}))},onSaveClick:()=>{e(yn()),t.track(Be.Event.vendor1099TabSettingsSave)}}}))(Zn);function Qe({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=G(),n=$(),i=K(),{tenantEmailDomain:l}=X(),p=ne(),h=R.getSignedInUser(),[v,m]=u.useState(!1),[r,d]=u.useState(!1);if(h==null)throw Error("Can't access vendor filing 1099 page without signing in...");ce();const c=f((C=>xn(C))),T=f((C=>bn(C))),{isAiCfoAccessEnabled:x,onAskAiCfoClick:g}=ie({mobileExploreReferrer:"Vendors — 1099"});se({isDataReady:c.fetchState==="Completed"}),u.useEffect((()=>{r||(d(!0),n(Fe(!1)))}),[r,d]),u.useEffect((()=>{T.saveState.fetchState==="Completed"&&n(Fe(!1))}),[T.saveState.fetchState]);const y=C=>{m(C)},b=f((C=>L(C))),I={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:b.tenantId},E=u.useMemo((()=>({authParams:I,tenantName:b.companyName,filing1099ReportEndPoint:`${ee}/filing1099Reports`})),[]);return o.jsxs(o.Fragment,{children:[c.fetchState==="Completed"?o.jsx(o.Fragment,{children:o.jsx(Se,{analytics:j,onLoad:()=>j.trackPageLoaded(Be.Event.vendor1099ListPage)})}):null,o.jsxs(qa,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:v,handleDrawerToggle:y}),o.jsx(Ha,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,analytics:j,vendorsFiling1099ListDetails:c,vendorTypeList:c.vendorTypeList,accountMappingView:T,downloadParams:E,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:x,onAskAiCfoClick:g,onClickMenuIcon:()=>{y(!0)}})]})]})}const Qa=B.div`
80
+ `,Ha=N((function(e,a){const{vendorsFiling1099ListDetails:s,accountMappingView:t,analytics:n}=a;return{analytics:n,vendorsFiling1099List:s.vendors,isVendor1099Populated:s.isVendor1099Populated,accountMappingView:t,fetchState:s.fetchState,uiState:s.uiState,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow}}),(function(e,a){const{navigate:s,analytics:t}=a;return{onUpdateSortUiState:(n,i)=>{e(En({sortOrder:n,sortKey:i}))},onUpdateSearchUiState:n=>{e(Dn({searchString:n}))},onVendorRowClick:n=>{if(a.tenantEmailDomain!=null){const i=`/${a.tenantEmailDomain}/vendors/filing_1099/upload/${encodeURIComponent(n)}/edit`,l=J(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l}})}},onReloadVendors:()=>{e(Fe(!0))},onBackClick:()=>{e(In()),e(Cn())},onVendorTabSelectionChanged:n=>{const i=de(n);s(i),e(te(le(n)))},onAccountMappingChange:n=>{const{filing1099:i}=n,{bankAccount:l,expenseCategory1099:p}=i,h=ma(a.accountMappingView.bankAccounts1099FilingAccountList,l.selectedOptions),v=fa(a.accountMappingView.expenseAccounts1099FilingAccountList,p),m={selectedBankAccounts1099FilingAccountIds:h.map((r=>r.accountId)),selectedExpenseAccounts1099FilingAccountIds:v};e(wn({data:m}))},onSaveClick:()=>{e(yn()),t.track(Be.Event.vendor1099TabSettingsSave)}}}))(Zn);function Qe({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=G(),n=$(),i=K(),{tenantEmailDomain:l}=W(),p=ne(),h=R.getSignedInUser(),[v,m]=u.useState(!1),[r,d]=u.useState(!1);if(h==null)throw Error("Can't access vendor filing 1099 page without signing in...");ce();const c=f((C=>xn(C))),T=f((C=>bn(C))),{isAiCfoAccessEnabled:x,onAskAiCfoClick:g}=ie({mobileExploreReferrer:"Vendors — 1099"});se({isDataReady:c.fetchState==="Completed"}),u.useEffect((()=>{r||(d(!0),n(Fe(!1)))}),[r,d]),u.useEffect((()=>{T.saveState.fetchState==="Completed"&&n(Fe(!1))}),[T.saveState.fetchState]);const y=C=>{m(C)},b=f((C=>L(C))),I={userId:h?.userId??"",sessionId:h?.zeniSessionId??"",tenantId:b.tenantId},E=u.useMemo((()=>({authParams:I,tenantName:b.companyName,filing1099ReportEndPoint:`${ee}/filing1099Reports`})),[]);return o.jsxs(o.Fragment,{children:[c.fetchState==="Completed"?o.jsx(o.Fragment,{children:o.jsx(Se,{analytics:j,onLoad:()=>j.trackPageLoaded(Be.Event.vendor1099ListPage)})}):null,o.jsxs(qa,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:v,handleDrawerToggle:y}),o.jsx(Ha,{location:i,navigate:t,previousTabPosition:a,setPreviousTabPosition:s,analytics:j,vendorsFiling1099ListDetails:c,vendorTypeList:c.vendorTypeList,accountMappingView:T,downloadParams:E,tenantEmailDomain:l,vendorTabsToShow:e,isAiCfoAccessEnabled:x,onAskAiCfoClick:g,onClickMenuIcon:()=>{y(!0)}})]})]})}const Qa=B.div`
81
81
  display: flex;
82
82
  min-height: 100%;
83
83
  width: 100%;
@@ -85,4 +85,4 @@ import{j as o}from"./liveblocks-DXMWX-Ft.js";import{a as u}from"./sentry-B8ZcloT
85
85
  flex-direction: column;
86
86
  align-items: center;
87
87
  background-color: ${e=>e.theme.colors.grey4};
88
- `,Za=N((function(e,a){const{vendorsListDetails:s}=a;return{vendorsList:s.vendors,totalVendorCount:s.totalVendorCount,fetchState:s.fetchState,uiState:s.uiState,searchText:s.searchString,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow,isAccountingClassesEnabled:me(e),analytics:j}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorsList:(t="",n,i)=>{e(Vn({searchString:t,keepExistingListItems:n,view:"vendorsTab",pageToken:i}))},onUpdatePageToken:t=>{e(_n({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(jn({sortOrder:t,sortkey:n}))},onUpdateCurrentYTDSelection:t=>{e(Pn({ytdSpendSelection:t}))},onVendorRowClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=J(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Vendor List"}})}},onReloadVendors:()=>{console.log("Reload vendors")},onUpdateScrollYOffset:t=>{e(kn({scrollYOffset:t}))},onBackClick:()=>{s("../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))}}}))(ea);function eo({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=G(),n=$(),i=K(),{tenantEmailDomain:l}=X(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=q(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled);ce();const d=e.includes("prepaid_expenses"),c=e.includes("fixed_assets"),T=e.includes("accrued_expenses"),x=f((k=>oe(k)));let g={};g=f((k=>Fn(k,"vendorsTab")));const[y,b]=u.useState(!1),{isAiCfoAccessEnabled:I,onAskAiCfoClick:E}=ie({mobileExploreReferrer:"Vendors Summary"});se({isDataReady:g.fetchState==="Completed"});const C=f((k=>ue(k))),w=f((k=>z(k).isReportGenerated));f((k=>z(k).fetchState))==="Completed"&&w&&m&&!e.includes("operating_expenses_by_vendor")&&e.splice(1,0,"operating_expenses_by_vendor");const[A,_]=u.useState(!1);if(u.useEffect((()=>{(d||c)&&A===!1&&C!=="Completed"&&(n(pe()),_(!0))}),[A]),u.useEffect((()=>{n(he({shouldFetchAccruedExpenses:T,shouldFetchFixedAssets:c,shouldFetchPrepaidExpenses:d,shouldFetchOpexByVendor:m&&r===!1,shouldFetchVendorsList:!0,shouldFetchFiling1099Vendor:!1}))}),[C,c,r,m]),u.useEffect((()=>{y||g.fetchState!=="Completed"||(b(!0),j.trackVendorList(x.currentTab,x.previousTab??null,g.totalVendorCount,g.uiState.sortKey,g.uiState.ytdSpendSelection))}),[g.fetchState]),h==null)throw Error("Can't access address page without signing in...");const[O,F]=u.useState(!1),D=k=>{F(k)};return o.jsxs(Qa,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:O,handleDrawerToggle:D}),o.jsx(Za,{location:i,navigate:t,vendorsListDetails:g,tenantEmailDomain:l,vendorTabsToShow:e,onClickMenuIcon:()=>{D(!0)},previousTabPosition:a,setPreviousTabPosition:s,isAiCfoAccessEnabled:I,onAskAiCfoClick:E})]})}function ko(){const{useFeatureGate:e}=q(),a=K().state?.referrer,[s,t]=u.useState(!1),[n,i]=u.useState(0),l=R.getSignedInUser(),p=An(l),{isFeatureEnabled:h}=e(M.isOpexByVendorFeatureEnabled),{isFeatureEnabled:v}=e(M.isVendorReviewFeatureEnabled),{isFeatureEnabled:m}=e(M.isScheduledJEPrepaidExpensesFeatureEnabled),{isFeatureEnabled:r}=e(M.isScheduledJEFixedAssetsFeatureEnabled),{isFeatureEnabled:d}=e(M.isScheduledJEAccruedExpensesFeatureEnabled),{isFeatureEnabled:c}=e(M.isFiling1099FeatureEnabled),T=f((E=>L(E))),x=T?.externalConnections?.accounting[0]?.connectionName,g=["vendors_tab"];x!=="netsuite"&&m===!0&&g.push("prepaid_expenses"),x!=="netsuite"&&r===!0&&g.push("fixed_assets"),x!=="netsuite"&&d===!0&&g.push("accrued_expenses"),x!=="netsuite"&&c&&p&&(g.push("filing_1099"),h&&g.splice(1,0,"operating_expenses_by_vendor"));const{isFeatureEnabled:y}=e(M.isDebitCardFeatureEnabled),b=Rn(y,T),I=Ln(T);return b===!0||I===!0?o.jsx(Me,{children:o.jsx(P,{path:"/*",element:o.jsx(sa,{})})}):o.jsxs(Me,{children:[o.jsx(P,{path:"/opex",element:h===!0?o.jsx(Da,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(U,{to:"../summary"})}),o.jsx(P,{path:"/summary",element:o.jsx(eo,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g})}),o.jsx(P,{path:"schedules/fixed_assets/details/:scheduleDetailId",element:r===!0?o.jsx(ia,{}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/accrued_expenses/details/:scheduleDetailId",element:r===!0?o.jsx(ra,{shouldNavigateBack:s,setShouldNavigateBack:t}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/one_time_accrual/details/:accrualId",element:d===!0?o.jsx(da,{}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/:scheduleType/details/:scheduleDetailId",element:m===!0?o.jsx(la,{}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/:scheduleType/details/:scheduleDetailId/edit_link",element:m===!0||r===!0?o.jsx(va,{}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/accrued_expenses/details/:scheduleDetailId/edit_link",element:d===!0?o.jsx(ca,{setShouldNavigateBack:t}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/prepaid_expenses",element:m===!0?o.jsx(Fa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"schedules/fixed_assets",element:r===!0?o.jsx(wa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"schedules/accrued_expenses",element:d===!0?o.jsx(ba,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099",element:c&&p?o.jsx(Qe,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099/:vendorId",element:c&&p?o.jsx(Qe,{vendorTabsToShow:g,previousTabPosition:n,setPreviousTabPosition:i}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099/upload/:vendorId/edit",element:c&&p?o.jsx(qe,{appContent:o.jsx(Ka,{}),showFullScreenSkeletonWhileLoading:!0}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099/upload/:vendorId/edit/new/:addressType",element:c&&p?o.jsx(qe,{appContent:o.jsx(oa,{isSubPage:!0,hideAddressBackButton:!0,hideAddressSubTitle:!0})}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"/summary/:vendorId/:qboId",element:o.jsx(Ke,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(P,{path:"/summary/:vendorId/:qboId/:timeframe/:startDate/:endDate",element:o.jsx(Ke,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(P,{path:"/review",element:v===!0?o.jsx(He,{}):o.jsx(fe,{})}),o.jsx(P,{path:"/review/vendor/:vendorId",element:v?o.jsx(He,{}):o.jsx(fe,{})}),o.jsx(P,{path:"/",element:o.jsx(U,{to:"summary"})}),o.jsx(P,{path:"*",element:o.jsx(fe,{})})]})}export{ko as default};
88
+ `,Za=N((function(e,a){const{vendorsListDetails:s}=a;return{vendorsList:s.vendors,totalVendorCount:s.totalVendorCount,fetchState:s.fetchState,uiState:s.uiState,searchText:s.searchString,lastRefreshSuccessTime:s.lastRefreshSuccessTime,vendorTabsToShow:a.vendorTabsToShow,isAccountingClassesEnabled:me(e),analytics:j}}),(function(e,a){const{navigate:s}=a;return{onFetchVendorsList:(t="",n,i)=>{e(Vn({searchString:t,keepExistingListItems:n,view:"vendorsTab",pageToken:i}))},onUpdatePageToken:t=>{e(_n({pageToken:t}))},onUpdateSortUiState:(t,n)=>{e(jn({sortOrder:t,sortkey:n}))},onUpdateCurrentYTDSelection:t=>{e(Pn({ytdSpendSelection:t}))},onVendorRowClick:(t,n)=>{if(a.tenantEmailDomain!=null){const i=Oe(t,n,a.tenantEmailDomain),l=J(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(i,{state:{pathnameStackToGoBack:l,referrer:"Vendor List"}})}},onReloadVendors:()=>{console.log("Reload vendors")},onUpdateScrollYOffset:t=>{e(kn({scrollYOffset:t}))},onBackClick:()=>{s("../..")},onVendorTabSelectionChanged:t=>{const n=de(t);s(n),e(te(le(t)))}}}))(ea);function eo({vendorTabsToShow:e,previousTabPosition:a,setPreviousTabPosition:s}){const t=G(),n=$(),i=K(),{tenantEmailDomain:l}=W(),p=ne(),h=R.getSignedInUser(),{useFeatureGate:v}=q(),{isFeatureEnabled:m,isFeatureGateLoading:r}=v(M.isOpexByVendorFeatureEnabled);ce();const d=e.includes("prepaid_expenses"),c=e.includes("fixed_assets"),T=e.includes("accrued_expenses"),x=f((k=>oe(k)));let g={};g=f((k=>Fn(k,"vendorsTab")));const[y,b]=u.useState(!1),{isAiCfoAccessEnabled:I,onAskAiCfoClick:E}=ie({mobileExploreReferrer:"Vendors Summary"});se({isDataReady:g.fetchState==="Completed"});const C=f((k=>ue(k))),w=f((k=>z(k).isReportGenerated));f((k=>z(k).fetchState))==="Completed"&&w&&m&&!e.includes("operating_expenses_by_vendor")&&e.splice(1,0,"operating_expenses_by_vendor");const[A,_]=u.useState(!1);if(u.useEffect((()=>{(d||c)&&A===!1&&C!=="Completed"&&(n(pe()),_(!0))}),[A]),u.useEffect((()=>{n(he({shouldFetchAccruedExpenses:T,shouldFetchFixedAssets:c,shouldFetchPrepaidExpenses:d,shouldFetchOpexByVendor:m&&r===!1,shouldFetchVendorsList:!0,shouldFetchFiling1099Vendor:!1}))}),[C,c,r,m]),u.useEffect((()=>{y||g.fetchState!=="Completed"||(b(!0),j.trackVendorList(x.currentTab,x.previousTab??null,g.totalVendorCount,g.uiState.sortKey,g.uiState.ytdSpendSelection))}),[g.fetchState]),h==null)throw Error("Can't access address page without signing in...");const[O,F]=u.useState(!1),D=k=>{F(k)};return o.jsxs(Qa,{windowSize:p,children:[o.jsx(re,{isAppContentDrawerOpen:O,handleDrawerToggle:D}),o.jsx(Za,{location:i,navigate:t,vendorsListDetails:g,tenantEmailDomain:l,vendorTabsToShow:e,onClickMenuIcon:()=>{D(!0)},previousTabPosition:a,setPreviousTabPosition:s,isAiCfoAccessEnabled:I,onAskAiCfoClick:E})]})}function ko(){const{useFeatureGate:e}=q(),a=K().state?.referrer,[s,t]=u.useState(!1),[n,i]=u.useState(0),l=R.getSignedInUser(),p=An(l),{isFeatureEnabled:h}=e(M.isOpexByVendorFeatureEnabled),{isFeatureEnabled:v}=e(M.isVendorReviewFeatureEnabled),{isFeatureEnabled:m}=e(M.isScheduledJEPrepaidExpensesFeatureEnabled),{isFeatureEnabled:r}=e(M.isScheduledJEFixedAssetsFeatureEnabled),{isFeatureEnabled:d}=e(M.isScheduledJEAccruedExpensesFeatureEnabled),{isFeatureEnabled:c}=e(M.isFiling1099FeatureEnabled),T=f((E=>L(E))),x=T?.externalConnections?.accounting[0]?.connectionName,g=["vendors_tab"];x!=="netsuite"&&m===!0&&g.push("prepaid_expenses"),x!=="netsuite"&&r===!0&&g.push("fixed_assets"),x!=="netsuite"&&d===!0&&g.push("accrued_expenses"),x!=="netsuite"&&c&&p&&(g.push("filing_1099"),h&&g.splice(1,0,"operating_expenses_by_vendor"));const{isFeatureEnabled:y}=e(M.isDebitCardFeatureEnabled),b=Rn(y,T),I=Ln(T);return b===!0||I===!0?o.jsx(Me,{children:o.jsx(P,{path:"/*",element:o.jsx(sa,{})})}):o.jsxs(Me,{children:[o.jsx(P,{path:"/opex",element:h===!0?o.jsx(Da,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(U,{to:"../summary"})}),o.jsx(P,{path:"/summary",element:o.jsx(eo,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g})}),o.jsx(P,{path:"schedules/fixed_assets/details/:scheduleDetailId",element:r===!0?o.jsx(ia,{}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/accrued_expenses/details/:scheduleDetailId",element:r===!0?o.jsx(ra,{shouldNavigateBack:s,setShouldNavigateBack:t}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/one_time_accrual/details/:accrualId",element:d===!0?o.jsx(da,{}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/:scheduleType/details/:scheduleDetailId",element:m===!0?o.jsx(la,{}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/:scheduleType/details/:scheduleDetailId/edit_link",element:m===!0||r===!0?o.jsx(va,{}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/accrued_expenses/details/:scheduleDetailId/edit_link",element:d===!0?o.jsx(ca,{setShouldNavigateBack:t}):o.jsx(U,{to:"../../vendors/opex"})}),o.jsx(P,{path:"schedules/prepaid_expenses",element:m===!0?o.jsx(Fa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"schedules/fixed_assets",element:r===!0?o.jsx(wa,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"schedules/accrued_expenses",element:d===!0?o.jsx(ba,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099",element:c&&p?o.jsx(Qe,{previousTabPosition:n,setPreviousTabPosition:i,vendorTabsToShow:g}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099/:vendorId",element:c&&p?o.jsx(Qe,{vendorTabsToShow:g,previousTabPosition:n,setPreviousTabPosition:i}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099/upload/:vendorId/edit",element:c&&p?o.jsx(qe,{appContent:o.jsx(Ka,{}),showFullScreenSkeletonWhileLoading:!0}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"/filing_1099/upload/:vendorId/edit/new/:addressType",element:c&&p?o.jsx(qe,{appContent:o.jsx(oa,{isSubPage:!0,hideAddressBackButton:!0,hideAddressSubTitle:!0})}):o.jsx(U,{to:"../opex"})}),o.jsx(P,{path:"/summary/:vendorId/:qboId",element:o.jsx(Ke,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(P,{path:"/summary/:vendorId/:qboId/:timeframe/:startDate/:endDate",element:o.jsx(Ke,{referrerType:a,isFiling1099FeatureEnabled:c&&p})}),o.jsx(P,{path:"/review",element:v===!0?o.jsx(He,{}):o.jsx(fe,{})}),o.jsx(P,{path:"/review/vendor/:vendorId",element:v?o.jsx(He,{}):o.jsx(fe,{})}),o.jsx(P,{path:"/",element:o.jsx(U,{to:"summary"})}),o.jsx(P,{path:"*",element:o.jsx(fe,{})})]})}export{ko as default};
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-DXMWX-Ft.js";import{a as f}from"./sentry-B8ZcloT9.js";import{t as u,u as h,j as y,N as b}from"./core-BEvMNwAD.js";import{Vk as I,gl as w,K4 as j}from"./zeni-epic-state-D1qILDrP.js";import{z as l,a5 as x,ad as S,ae as D}from"./index-Bfnxdwcm.js";import{n as c}from"./mui-Bueuo6bM.js";import"./recharts-DktJiIze.js";import"./analytics-CvDaD8K9.js";import"./plaid-QK7fwo4O.js";import"./dnd-B2-znEgk.js";import"./stripe-cKAAJElX.js";import"./lottie-CunmMvLM.js";import"./lexical-VH-Dh1bf.js";import"./pdf-byaFE2JF.js";import"./utils-BVoHYbte.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]="fa295d66-447f-4c37-8d02-033cdbb2d3f2",e._sentryDebugIdIdentifier="sentry-dbid-fa295d66-447f-4c37-8d02-033cdbb2d3f2")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y((m=>I(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(b,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
1
+ import{j as o}from"./liveblocks-BMZsanry.js";import{a as f}from"./sentry-w92aQEbS.js";import{t as u,u as h,j as y,N as b}from"./core-DRRkK-nh.js";import{Vk as I,gl as w,K4 as j}from"./zeni-epic-state-BgQvRRQh.js";import{z as l,a5 as x,ad as S,ae as D}from"./index-C8t0n_dK.js";import{n as c}from"./mui-Cs4dDAVi.js";import"./recharts-Dv_Zobiy.js";import"./analytics-C4h9uwWs.js";import"./plaid-3Z5MZAow.js";import"./dnd-_2sJc_42.js";import"./stripe-cKAAJElX.js";import"./lottie-C0cdlMyO.js";import"./lexical-DcIe1jg7.js";import"./pdf-DTtYOrE_.js";import"./utils-BKjdMjTj.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]="fa295d66-447f-4c37-8d02-033cdbb2d3f2",e._sentryDebugIdIdentifier="sentry-dbid-fa295d66-447f-4c37-8d02-033cdbb2d3f2")}catch{}})();const A=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y((m=>I(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(b,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(p(!0),a(j(t,g,s)))}),[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100vh;
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-DXMWX-Ft.js";import{u as z,h as ne,g as N,i as W,j as k,l as ae,N as Q,n as Re,o as x}from"./core-BEvMNwAD.js";import{a0g as Fe,LY as Ue,a0h as _e,fI as R,H9 as ze,a0i as wn,cw as ee,cx as Me,H3 as An,a0j as Dn,a0k as kn,H6 as In,Hd as me,H0 as Sn,GZ as bn,ZP as ce,a0l as Pn,Pw as vn,XE as jn,Py as En,mM as be,a0m as Tn,v2 as Ve,uS as $e,mD as He,mG as Pe,XF as ve,XG as Bn,a0n as On,mF as Ln,n0 as Rn,mu as Fn,kU as Un,kT as _n,a0o as zn,a0p as ge,Pd as Mn,a0q as Vn,a0r as $n,_3 as fe,a0s as je,a0t as Hn,PJ as Zn,_q as Gn,N4 as Ze,CA as Ge,a0u as Nn,PG as Wn,a0v as Ne,dc as ye,PN as We,e0 as qe,e1 as xe,PL as qn,M_ as Xn,PD as Yn,a0w as Xe,a0x as Ye,Pf as Je,Pp as Ee,a0y as Jn,_h as Kn,PO as Qn,bq as ea,bL as na,cI as aa,bM as ta,bu as oa,V2 as sa}from"./zeni-epic-state-D1qILDrP.js";import{V as te,c as H,F as $,z as P,at as Ce,a5 as le,cX as ra,$ as M,a9 as q,a2 as Ke,j as ia,q as Te,k as L,cY as ca,ac as we,cZ as la,a6 as de,c_ as da,R as Ae,bi as G,c$ as ua,ao as pa,aq as Qe,d0 as Be,d1 as ma,p as ie,d2 as ga,ag as ha,d3 as fa,d4 as ya,h as xa,J as Ca}from"./index-Bfnxdwcm.js";import{u as F,n as U,D as X,S as Y}from"./mui-Bueuo6bM.js";import K from"./NotFoundScreen-CgHV3hZC.js";import{S as Oe}from"./SetupPagesScreen-CWaKuALw.js";import{F as en}from"./FeaturePreviewScreen-Jnj2USgZ.js";import{a as g}from"./sentry-B8ZcloT9.js";import{M as ue}from"./MobileAppDrawer-DVEpwTSb.js";import{A as wa,D as Aa,V as Da}from"./DomesticWireDetailScreen-Citgr--D.js";import{A as ka}from"./AddressScreen-C7sDNd06.js";import{u as nn}from"./useAskAiCfoHostNavButtonProps-CGDjoe-C.js";import{Z as Ia}from"./ZeniAccountStatementScreen-BhXX83Ao.js";import"./recharts-DktJiIze.js";import"./analytics-CvDaD8K9.js";import"./plaid-QK7fwo4O.js";import"./dnd-B2-znEgk.js";import"./stripe-cKAAJElX.js";import"./lottie-CunmMvLM.js";import"./lexical-VH-Dh1bf.js";import"./pdf-byaFE2JF.js";import"./utils-BVoHYbte.js";import"./BusinessVerificationPageScreen-CPavKmhf.js";import"./routePaths-D1-5FufF.js";import"./analyticsHelper-VdIlZC-X.js";import"./InboxNotificationsProvider-TM2N59sT.js";import"./useTaskManagerAccess-CRuBFsxT.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="47839bc7-76aa-457f-b88a-b02b1b6abba3",n._sentryDebugIdIdentifier="sentry-dbid-47839bc7-76aa-457f-b88a-b02b1b6abba3")}catch{}})();const Sa=U.div`
1
+ import{j as e}from"./liveblocks-BMZsanry.js";import{u as z,h as ne,g as N,i as W,j as k,l as ae,N as Q,n as Re,o as x}from"./core-DRRkK-nh.js";import{a0g as Fe,LY as Ue,a0h as _e,fI as R,H9 as ze,a0i as wn,cw as ee,cx as Me,H3 as An,a0j as Dn,a0k as kn,H6 as In,Hd as me,H0 as Sn,GZ as Pn,ZP as ce,a0l as jn,Pw as vn,XE as bn,Py as En,mM as Pe,a0m as Tn,v2 as Ve,uS as $e,mD as He,mG as je,XF as ve,XG as Bn,a0n as On,mF as Ln,n0 as Rn,mu as Fn,kU as Un,kT as _n,a0o as zn,a0p as ge,Pd as Mn,a0q as Vn,a0r as $n,_3 as he,a0s as be,a0t as Hn,PJ as Zn,_q as Gn,N4 as Ze,CA as Ge,a0u as Nn,PG as Wn,a0v as Ne,dc as ye,PN as We,e0 as qe,e1 as xe,PL as qn,M_ as Yn,PD as Xn,a0w as Ye,a0x as Xe,Pf as Je,Pp as Ee,a0y as Jn,_h as Kn,PO as Qn,bq as ea,bL as na,cI as aa,bM as ta,bu as oa,V2 as sa}from"./zeni-epic-state-BgQvRRQh.js";import{V as te,c as H,F as $,z as j,at as Ce,a5 as le,cY as ra,$ as M,a9 as q,a2 as Ke,j as ia,q as Te,k as L,cZ as ca,ac as we,c_ as la,a6 as de,c$ as da,R as Ae,bj as G,d0 as ua,ao as pa,aq as Qe,d1 as Be,d2 as ma,p as ie,d3 as ga,ag as fa,d4 as ha,d5 as ya,h as xa,J as Ca}from"./index-C8t0n_dK.js";import{u as F,n as U,D as Y,S as X}from"./mui-Cs4dDAVi.js";import K from"./NotFoundScreen-Cg7JNFkQ.js";import{S as Oe}from"./SetupPagesScreen-BhmiBe4o.js";import{F as en}from"./FeaturePreviewScreen-DDYtwmUp.js";import{a as g}from"./sentry-w92aQEbS.js";import{M as ue}from"./MobileAppDrawer-CYOS7P1p.js";import{A as wa,D as Aa,V as Da}from"./DomesticWireDetailScreen-Cxel_MVr.js";import{A as ka}from"./AddressScreen-Diwm_C2C.js";import{u as nn}from"./useAskAiCfoHostNavButtonProps-DYip9Dx9.js";import{Z as Ia}from"./ZeniAccountStatementScreen-ku-97h_n.js";import"./recharts-Dv_Zobiy.js";import"./analytics-C4h9uwWs.js";import"./plaid-3Z5MZAow.js";import"./dnd-_2sJc_42.js";import"./stripe-cKAAJElX.js";import"./lottie-C0cdlMyO.js";import"./lexical-DcIe1jg7.js";import"./pdf-DTtYOrE_.js";import"./utils-BKjdMjTj.js";import"./BusinessVerificationPageScreen-B4wIaSZ_.js";import"./routePaths-CXiI4qT4.js";import"./analyticsHelper-CsTjLa_U.js";import"./InboxNotificationsProvider-Bh2XZMjj.js";import"./useTaskManagerAccess-D2-4N0AP.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="343feec5-b32c-4ae9-8da9-51fa5fd50d77",n._sentryDebugIdIdentifier="sentry-dbid-343feec5-b32c-4ae9-8da9-51fa5fd50d77")}catch{}})();const Sa=U.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,15 +6,15 @@ import{j as e}from"./liveblocks-DXMWX-Ft.js";import{u as z,h as ne,g as N,i as W
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${n=>n.theme.colors.grey4};
9
- `;function Le({isEditDrawerOpen:n}){const a=F(),[r,t]=g.useState(!1),{autoTransferRulePageProps:o,isLoading:i}=(function({isEditDrawerOpen:d=!1}={}){const c=z(),p=ne(),h=N(),{ruleId:y,tenantEmailDomain:s}=W(),l=te(),{useFeatureGate:f}=H(),m=k((u=>Fe(u))),b=k((u=>Ue(u.depositAccountState,u.depositAccountListState))),D=k((u=>_e(u))),A=k((u=>R(u))),{isFeatureEnabled:I}=f($.isTreasuryEnabled),C=m?.fetchState??"Not-Started",w=A?.companyId??(s==null?void 0:P.getSignedInUserTenant(s)?.companyId);g.useEffect((()=>{C==="Not-Started"&&w!=null&&c(ze(!0))}),[c,C,w]);const E=m?.fetchState!=="Completed";if(E)return{autoTransferRulePageProps:void 0,isLoading:E};const T=A?.company!=null&&wn(A.company),v=!!(I&&T),j=ee(l?.loggedInUserRoleMap)||Me(l?.loggedInUserRoleMap),O=P.getSignedInUser(),S={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:A?.tenantId??""},B=!!h.state?.scrollToAddRule;return{isLoading:E,autoTransferRulePageProps:{autoTransferRuleView:m,companyName:A?.companyName??"",hasAdminLevelAccess:j,includeTreasuryOption:v,transferLimit:5e5,authParams:S,currentTenant:A,depositAccountListView:b,downloadAccountDetailEndPoint:`${Ce}/account_details`,editingRuleId:y,isEditDrawerOpen:d,scrollToAddRule:B,zeniAccountsConfigDetail:D,onBackClick:()=>p(".."),onCreateRule:()=>{c(bn())},onUpdateRule:u=>{c(me(u))},onDeleteClick:u=>{c(Sn(u))},onPauseClick:u=>{c(me(u,!0,!1))},onResumeClick:u=>{c(me(u,!1,!0))},onActivityClick:(u,V)=>{c(In(u,V))},onUpdateRuleLocalData:u=>{c(kn(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(An())}}}})({isEditDrawerOpen:n});return i||o==null?e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(Sa,{children:[e.jsx(ue,{isAppContentDrawerOpen:r,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const ba={overlayWidth:new q(100,100,58)},Pa=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=z(),o=F(),i=M();if(P.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(X,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:ba.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(va,{onClick:d=>d.stopPropagation(),children:e.jsx(wa,{vendorIdParam:n,accountContext:"express-pay"})})})},va=U(Y)`
9
+ `;function Le({isEditDrawerOpen:n}){const a=F(),[r,t]=g.useState(!1),{autoTransferRulePageProps:o,isLoading:i}=(function({isEditDrawerOpen:d=!1}={}){const c=z(),p=ne(),f=N(),{ruleId:y,tenantEmailDomain:s}=W(),l=te(),{useFeatureGate:h}=H(),m=k((u=>Fe(u))),P=k((u=>Ue(u.depositAccountState,u.depositAccountListState))),D=k((u=>_e(u))),A=k((u=>R(u))),{isFeatureEnabled:I}=h($.isTreasuryEnabled),C=m?.fetchState??"Not-Started",w=A?.companyId??(s==null?void 0:j.getSignedInUserTenant(s)?.companyId);g.useEffect((()=>{C==="Not-Started"&&w!=null&&c(ze(!0))}),[c,C,w]);const E=m?.fetchState!=="Completed";if(E)return{autoTransferRulePageProps:void 0,isLoading:E};const T=A?.company!=null&&wn(A.company),v=!!(I&&T),b=ee(l?.loggedInUserRoleMap)||Me(l?.loggedInUserRoleMap),O=j.getSignedInUser(),S={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:A?.tenantId??""},B=!!f.state?.scrollToAddRule;return{isLoading:E,autoTransferRulePageProps:{autoTransferRuleView:m,companyName:A?.companyName??"",hasAdminLevelAccess:b,includeTreasuryOption:v,transferLimit:5e5,authParams:S,currentTenant:A,depositAccountListView:P,downloadAccountDetailEndPoint:`${Ce}/account_details`,editingRuleId:y,isEditDrawerOpen:d,scrollToAddRule:B,zeniAccountsConfigDetail:D,onBackClick:()=>p(".."),onCreateRule:()=>{c(Pn())},onUpdateRule:u=>{c(me(u))},onDeleteClick:u=>{c(Sn(u))},onPauseClick:u=>{c(me(u,!0,!1))},onResumeClick:u=>{c(me(u,!1,!0))},onActivityClick:(u,V)=>{c(In(u,V))},onUpdateRuleLocalData:u=>{c(kn(u))},clearRuleLocalData:()=>{c(Dn())},onEditClick:u=>{p(`./${u}/edit`)},onEditDrawerClose:()=>{p("../../",{relative:"path"})},onReviewClick:()=>{c(An())}}}})({isEditDrawerOpen:n});return i||o==null?e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(Sa,{children:[e.jsx(ue,{isAppContentDrawerOpen:r,handleDrawerToggle:d=>{t(d)}}),e.jsx(ra,{...o})]})}const Pa={overlayWidth:new q(100,100,58)},ja=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=z(),o=F(),i=M();if(j.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(va,{onClick:d=>d.stopPropagation(),children:e.jsx(wa,{vendorIdParam:n,accountContext:"express-pay"})})})},va=U(X)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,ja={overlayWidth:new q(100,100,58)},Ea=({isDrawerOpen:n,closeDrawerHandler:a})=>{const r=z(),t=F(),o=M();if(P.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(X,{onClose:()=>{a(!0),r(ce())},anchor:"right",open:n,PaperProps:{style:{width:ja.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ta,{onClick:i=>i.stopPropagation(),children:e.jsx(ka,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Ta=U(Y)`
13
+ `,ba={overlayWidth:new q(100,100,58)},Ea=({isDrawerOpen:n,closeDrawerHandler:a})=>{const r=z(),t=F(),o=M();if(j.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(Y,{onClose:()=>{a(!0),r(ce())},anchor:"right",open:n,PaperProps:{style:{width:ba.overlayWidth.valuePercentage(o),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Ta,{onClick:i=>i.stopPropagation(),children:e.jsx(ka,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Ta=U(X)`
14
14
  display: flex;
15
15
  min-height: 100%;
16
16
  flex-direction: column;
17
- `,Ba={overlayWidth:new q(100,100,58)},Oa=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=z(),o=F(),i=M();if(P.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(X,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(La,{onClick:d=>d.stopPropagation(),children:e.jsx(Aa,{vendorIdParam:n,accountContext:"express-pay"})})})},La=U(Y)`
17
+ `,Ba={overlayWidth:new q(100,100,58)},Oa=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:r})=>{const t=z(),o=F(),i=M();if(j.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(Y,{onClose:()=>{r(!0),t(ce())},anchor:"right",open:a,PaperProps:{style:{width:Ba.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(La,{onClick:d=>d.stopPropagation(),children:e.jsx(Aa,{vendorIdParam:n,accountContext:"express-pay"})})})},La=U(X)`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  flex-direction: column;
@@ -26,15 +26,15 @@ import{j as e}from"./liveblocks-DXMWX-Ft.js";import{u as z,h as ne,g as N,i as W
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${n=>n.theme.colors.grey4};
29
- `,Fa=ae((function(n,a){const r=R(n),t=P.getSignedInUser(),o=r.tenantId,i={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=jn(n,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${we.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:r}=a;return{onSaveVendor:t=>{n(_n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(Pe({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Un({localData:t}))},onVendorSelected:t=>{t!=null&&n(Fn(t,!1))},updateSelectedVendorForCreate:t=>{n(Rn(t))},initializeVendorAddress:()=>{n(Ln())},resetVendorSaveStatus:t=>{n(On({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(ve("common"))},onCancelAutoComplete:()=>{n(ve("common"))}},chooseNewVendor:t=>{n(Pe({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?r("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&r("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(He({files:t}))},onDeleteFile:t=>{n($e(t))},onEditFileName:(t,o)=>{n(Ve(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(be(t)),n(be()),n(Tn()),n(ce()),r("../",{relative:"path"})},onSchedulePayment:()=>{n(En())}}}))(ca);function se({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:r}){const t=ne(),o=N(),i=z(),[d,c]=g.useState(!1),{tenantEmailDomain:p}=W(),h=te(),y=k((u=>u.expressPayState.fetchState)),s=k((u=>R(u))),l=k((u=>Pn(u))),f=l.expressPayLocalData?.vendorId,m=s.companyId??P.getSignedInUserTenant(p)?.companyId,[b,D]=g.useState(!1),[A,I]=g.useState(!1),[C,w]=g.useState(!1),E=Ke(o.state?.pathnameStackToGoBack),{poppedPathname:T}=E,v=T?.split("/"),j=v?.[v.length-1];g.useEffect((()=>{n===!0?D(!0):(D(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{a===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[a]),g.useEffect((()=>{r===!0?w(!0):(w(!1),document.body.style.overflow="auto")}),[r]),g.useEffect((()=>{y==="Not-Started"&&i(vn(!0,!0))}),[y,i]);const O=ia(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(g.useEffect((()=>{O==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&B()}),[O,l.vendorViewDetails.bankAccountCreationState?.fetchState]),P.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=u=>{c(u)},B=()=>{D(!1),I(!1),t("../",{relative:"path"})};return e.jsxs(Ra,{children:[Te(o)?e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:S}):null,b===!0?e.jsx(Pa,{vendorId:f,closeDrawerHandler:B,isDrawerOpen:b}):null,A===!0?e.jsx(Oa,{vendorId:f,closeDrawerHandler:B,isDrawerOpen:A}):null,C===!0?e.jsx(Ea,{closeDrawerHandler:B,isDrawerOpen:C}):null,e.jsx(Da,{vendorId:f,isExpressPayPage:!0}),e.jsx(Fa,{navigate:t,location:o,companyId:m,accountId:j,analytics:L,currentTenant:s,vendorId:f,roleMap:h?.loggedInUserRoleMap,isSettings:Te(o),expressPayDetails:l,onClickMenuIcon:()=>{S(!0)}})]})}const Ua={overlayWidth:new q(100,100,58)},_a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:r,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const i=F(),d=M(),c=k((s=>_e(s))),p=k((s=>R(s)));if(P.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{o(!0)},y={depositAccount:t,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(X,{anchor:"right",open:r,PaperProps:{style:{width:Ua.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:e.jsx(za,{onClick:s=>s.stopPropagation(),children:e.jsx(la,{...y})})})},za=U(Y)`
29
+ `,Fa=ae((function(n,a){const r=R(n),t=j.getSignedInUser(),o=r.tenantId,i={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:o??""},d=a.expressPayDetails,c=n.entityAutoCompleteState.autoCompleteText.common,p=bn(n,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${we.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:a.analytics}}),(function(n,a){const{navigate:r}=a;return{onSaveVendor:t=>{n(_n(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,o)=>{n(je({vendorId:o,localData:t}))},saveExpressPayLocalData:t=>{n(Un({localData:t}))},onVendorSelected:t=>{t!=null&&n(Fn(t,!1))},updateSelectedVendorForCreate:t=>{n(Rn(t))},initializeVendorAddress:()=>{n(Ln())},resetVendorSaveStatus:t=>{n(On({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,o)=>{t.trim().length>=2?n(Bn({searchString:t,entityType:o,searchOrigin:"common"})):t.trim().length===0&&n(ve("common"))},onCancelAutoComplete:()=>{n(ve("common"))}},chooseNewVendor:t=>{n(je({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?r("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&r("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(He({files:t}))},onDeleteFile:t=>{n($e(t))},onEditFileName:(t,o)=>{n(Ve(t,o.split(".")[0]))},onBackClick:t=>{t!=null&&n(Pe(t)),n(Pe()),n(Tn()),n(ce()),r("../",{relative:"path"})},onSchedulePayment:()=>{n(En())}}}))(ca);function se({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:r}){const t=ne(),o=N(),i=z(),[d,c]=g.useState(!1),{tenantEmailDomain:p}=W(),f=te(),y=k((u=>u.expressPayState.fetchState)),s=k((u=>R(u))),l=k((u=>jn(u))),h=l.expressPayLocalData?.vendorId,m=s.companyId??j.getSignedInUserTenant(p)?.companyId,[P,D]=g.useState(!1),[A,I]=g.useState(!1),[C,w]=g.useState(!1),E=Ke(o.state?.pathnameStackToGoBack),{poppedPathname:T}=E,v=T?.split("/"),b=v?.[v.length-1];g.useEffect((()=>{n===!0?D(!0):(D(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{a===!0?I(!0):(I(!1),document.body.style.overflow="auto")}),[a]),g.useEffect((()=>{r===!0?w(!0):(w(!1),document.body.style.overflow="auto")}),[r]),g.useEffect((()=>{y==="Not-Started"&&i(vn(!0,!0))}),[y,i]);const O=ia(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(g.useEffect((()=>{O==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&B()}),[O,l.vendorViewDetails.bankAccountCreationState?.fetchState]),j.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=u=>{c(u)},B=()=>{D(!1),I(!1),t("../",{relative:"path"})};return e.jsxs(Ra,{children:[Te(o)?e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:S}):null,P===!0?e.jsx(ja,{vendorId:h,closeDrawerHandler:B,isDrawerOpen:P}):null,A===!0?e.jsx(Oa,{vendorId:h,closeDrawerHandler:B,isDrawerOpen:A}):null,C===!0?e.jsx(Ea,{closeDrawerHandler:B,isDrawerOpen:C}):null,e.jsx(Da,{vendorId:h,isExpressPayPage:!0}),e.jsx(Fa,{navigate:t,location:o,companyId:m,accountId:b,analytics:L,currentTenant:s,vendorId:h,roleMap:f?.loggedInUserRoleMap,isSettings:Te(o),expressPayDetails:l,onClickMenuIcon:()=>{S(!0)}})]})}const Ua={overlayWidth:new q(100,100,58)},_a=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:r,zeniBankAccountDetail:t,closeDrawerHandler:o})=>{const i=F(),d=M(),c=k((s=>_e(s))),p=k((s=>R(s)));if(j.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const f=()=>{o(!0)},y={depositAccount:t,onDismissClick:f,zeniAccountsConfigDetail:c,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:p};return e.jsx(Y,{anchor:"right",open:r,PaperProps:{style:{width:Ua.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>f(),children:e.jsx(za,{onClick:s=>s.stopPropagation(),children:e.jsx(la,{...y})})})},za=U(X)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
33
- `,Ma={overlayWidth:new q(100,100,58)},an=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const r=F(),t=M(),o=z(),i=k((s=>R(s))),d=P.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const h=k((s=>zn(s))),y={analytics:L,checkDeposit:h,filesEndPoint:`${we.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Vn(s))},updateFilesEntity:s=>{o(He({files:s}))},onAnotherTransferClick:()=>{o(ge())},onDeleteFile:s=>{o($e(s))},onEditFileName:(s,l)=>{o(Ve(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(Mn())},onDismissClick:()=>{a(!0),o(ge())}};return e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:L,onLoad:s=>(l=>l.trackPageLoaded(Ae.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(X,{anchor:"right",open:n,PaperProps:{style:{width:Ma.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(ge())),children:e.jsx(Va,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...y})})})]})},Va=U(Y)`
33
+ `,Ma={overlayWidth:new q(100,100,58)},an=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const r=F(),t=M(),o=z(),i=k((s=>R(s))),d=j.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const f=k((s=>zn(s))),y={analytics:L,checkDeposit:f,filesEndPoint:`${we.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:s=>{o(Vn(s))},updateFilesEntity:s=>{o(He({files:s}))},onAnotherTransferClick:()=>{o(ge())},onDeleteFile:s=>{o($e(s))},onEditFileName:(s,l)=>{o(Ve(s,l.split(".")[0]))},onCheckDpositClick:()=>{o(Mn())},onDismissClick:()=>{a(!0),o(ge())}};return e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:L,onLoad:s=>(l=>l.trackPageLoaded(Ae.Event.accountsDepositCheckFormViewed))(s)}),e.jsx(Y,{anchor:"right",open:n,PaperProps:{style:{width:Ma.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(s,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void o(ge())),children:e.jsx(Va,{onClick:s=>s.stopPropagation(),children:e.jsx(da,{...y})})})]})},Va=U(X)`
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
37
- `,$a={overlayWidth:new q(100,100,58)},Ha=ae((function(n,a){const r=a.currentTenant?.companyId;return{plaidConnectionDetails:Gn(n,r,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ue(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Wn()),clearReviewTransferDetail:()=>n(Nn()),onFetchLinkTokenClick:r=>{n(Ge("external_account",r))},onEstablishConnectionClick:r=>{n(Ze(r,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(ua),tn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:r,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const i=k((C=>$n(C))),d=k((C=>R(C))),c=F(),p=M(),h=z(),{accountId:y}=W(),[s,l]=g.useState("achTransfer"),[f,m]=g.useState(!1);if(P.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=H(),{configValue:D}=b(G.zeniAccountsConfig),A=fe(D),I=()=>{t(!0),h(je())};return g.useEffect((()=>{i.reviewTransferDetail.fetchState==="Completed"&&m(!0)}),[m,i.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:L,onLoad:C=>(w=>w.trackPageLoaded(Ae.Event.zeniAccountsTransferFormViewed))(C)}),e.jsx(X,{onClose:()=>{(s==="achTransfer"&&f===!1||s==="achTransfer"&&f&&i.fetchState==="Completed")&&I()},anchor:"right",open:n,PaperProps:{style:{width:$a.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Za,{onClick:C=>C.stopPropagation(),children:e.jsx(Ha,{analytics:L,transferDetails:i,authParams:a,downloadAccountDetailEndPoint:r,onTransferClick:()=>{L.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(Zn(y))},onDismissClick:I,onSaveChangesToLocalStore:C=>{h(Hn(C))},onAnotherTransferClick:()=>{m(!1),h(je())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:f,setShowReviewContent:m,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},Za=U(Y)`
37
+ `,$a={overlayWidth:new q(100,100,58)},Ha=ae((function(n,a){const r=a.currentTenant?.companyId;return{plaidConnectionDetails:Gn(n,r,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ue(n.depositAccountState,n.depositAccountListState)}}),(function(n,a){return{onReviewClick:()=>n(Wn()),clearReviewTransferDetail:()=>n(Nn()),onFetchLinkTokenClick:r=>{n(Ge("external_account",r))},onEstablishConnectionClick:r=>{n(Ze(r,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}}))(ua),tn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:r,closeDrawerHandler:t,zeniAccountsConfig:o})=>{const i=k((C=>$n(C))),d=k((C=>R(C))),c=F(),p=M(),f=z(),{accountId:y}=W(),[s,l]=g.useState("achTransfer"),[h,m]=g.useState(!1);if(j.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:P}=H(),{configValue:D}=P(G.zeniAccountsConfig),A=he(D),I=()=>{t(!0),f(be())};return g.useEffect((()=>{i.reviewTransferDetail.fetchState==="Completed"&&m(!0)}),[m,i.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(de,{analytics:L,onLoad:C=>(w=>w.trackPageLoaded(Ae.Event.zeniAccountsTransferFormViewed))(C)}),e.jsx(Y,{onClose:()=>{(s==="achTransfer"&&h===!1||s==="achTransfer"&&h&&i.fetchState==="Completed")&&I()},anchor:"right",open:n,PaperProps:{style:{width:$a.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(Za,{onClick:C=>C.stopPropagation(),children:e.jsx(Ha,{analytics:L,transferDetails:i,authParams:a,downloadAccountDetailEndPoint:r,onTransferClick:()=>{L.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),f(Zn(y))},onDismissClick:I,onSaveChangesToLocalStore:C=>{f(Hn(C))},onAnotherTransferClick:()=>{m(!1),f(be())},currentTenant:d,zeniAccountsConfigDetail:o,currentDrawerContent:s,setCurrentDrawerContent:l,showReviewContent:h,setShowReviewContent:m,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},Za=U(X)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
@@ -46,7 +46,7 @@ import{j as e}from"./liveblocks-DXMWX-Ft.js";import{u as z,h as ne,g as N,i as W
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${n=>n.theme.colors.grey4};
49
- `,Na=ae((function(n,a){return{zeniAccountListView:Ne(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:h}=a,{tenantEmailDomain:y}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const f=Wa(y,s),m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:m}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),r("setup")},onReloadTransactions:()=>{n(We(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let f="page-not-found";s==="sendMoney"&&(f=cn(y)),s==="payBill"?f=on(t,p,h):s==="transfer"?(f=sn(y),l!=null&&n(Xe(l))):s==="checkDeposit"&&(f=rn(y));const m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:m}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(Yn(s))},onFetchLinkTokenClick:(s,l)=>{n(Ge("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,f)=>{n(Xn(s,l,"zeni_accounts","external_account",f))},onEstablishConnectionClick:s=>{n(Ze(s,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(qn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?r(l,{state:{...o.state,scrollToAddRule:!0}}):r(l)}}}))(ma);function he({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const r=N(),t=ne(),o=z(),i=M(),{tenantEmailDomain:d}=W(),{useDynamicConfig:c,useFeatureGate:p}=H(),h=F(),{configValue:y}=c(G.zeniAccountsConfig),{isFeatureEnabled:s}=p($.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p($.isAutoTransferRuleEnabled),f=fe(y),m=k((_=>R(_))),b=m.companyId??P.getSignedInUserTenant(d)?.companyId,{configValue:D}=c(G.expressPayConfig),A=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(m.tenantId),[I,C]=g.useState(!1),[w,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),S=k((_=>Ne(_))),B=S.fetchState,u=k((_=>Fe(_))),V=u?.fetchState??"Not-Started",pe=!!m.companyZeniAccountInfo?.info?.isZeniAccountEnabled,oe=te(),Z=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,J=ee(oe?.loggedInUserRoleMap),ln=ye(oe?.loggedInUserRoleMap),dn=!!m.companyBillPayInfo?.info?.isBillPayEnabled,De=P.getSignedInUser(),un={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:m.tenantId??""},pn=`${Ce}/account_details`,{areTenantIdsInSync:ke}=pa();g.useEffect((()=>{!I&&ke&&(C(!0),o(We(!1)))}),[I,o,B,ke]),g.useEffect((()=>{!w&&V==="Not-Started"&&b&&(E(!0),o(ze(!0)))}),[w,V,b,o]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Ie=()=>{v(!1),t("..")},[mn,gn]=g.useState(!1),Se=_=>{gn(_)},{isAiCfoAccessEnabled:hn,onAskAiCfoClick:fn}=nn({mobileExploreReferrer:"Checking Accounts"});Qe({isDataReady:B==="Completed"});const yn=qe(m),xn=xe(s,m);return yn===!0&&xn!==!0?e.jsx(en,{}):pe?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&T===!1&&j===!1?e.jsx(de,{analytics:L,onLoad:_=>(Cn=>{Cn.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})(_)}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Ie,isTransferDrawerOpen:T,zeniAccountsConfig:S.zeniAccountsConfig,authParams:un,downloadAccountDetailEndPoint:pn}):null,j===!0?e.jsx(an,{closeDrawerHandler:Ie,isCheckDepositDrawerOpen:j}):null,e.jsxs(Ga,{windowSize:i,children:[e.jsx(ue,{isAppContentDrawerOpen:mn,handleDrawerToggle:Se}),e.jsx(Na,{zeniBankListView:S,navigate:t,currentTenant:m,location:r,companyId:b,analytics:L,maxInsuredAmount:f.maxInsuredAmount,isExpressPayEnabled:A,isBillPayEnabled:dn,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:Se,isAiCfoAccessEnabled:hn,onAskAiCfoClick:fn})]})]}):Z&&J?e.jsx(Q,{to:"../setup"}):m.companyZeniAccountInfo?.info&&!Z&&ln?e.jsx(Q,{to:"../promo",state:r.state}):e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const on=(n,a,r)=>{const t=xe(r,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Wa=(n,a)=>`/${n}/checking/${a}`,sn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,rn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,cn=n=>`/${n}/checking/express-pay`,qa=U.div`
49
+ `,Na=ae((function(n,a){return{zeniAccountListView:Ne(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:f}=a,{tenantEmailDomain:y}=t;return{onZeniAccountClick:(s,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const h=Wa(y,s),m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:m}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),r("setup")},onReloadTransactions:()=>{n(We(!1))},handleMoveMoneyOptionSelection:(s,l)=>{let h="page-not-found";s==="sendMoney"&&(h=cn(y)),s==="payBill"?h=on(t,p,f):s==="transfer"?(h=sn(y),l!=null&&n(Ye(l))):s==="checkDeposit"&&(h=rn(y));const m=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:m}})},unlinkPaymentAccount:(s,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),n(Xn(s))},onFetchLinkTokenClick:(s,l)=>{n(Ge("external_account",s,l))},onUpdatePaymentAccountStatus:(s,l,h)=>{n(Yn(s,l,"zeni_accounts","external_account",h))},onEstablishConnectionClick:s=>{n(Ze(s,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:s=>{n(qn(s))},onClickMenuIcon:()=>{d(!0)},onAutoTransferClick:s=>{const l="./auto-transfer";s?r(l,{state:{...o.state,scrollToAddRule:!0}}):r(l)}}}))(ma);function fe({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const r=N(),t=ne(),o=z(),i=M(),{tenantEmailDomain:d}=W(),{useDynamicConfig:c,useFeatureGate:p}=H(),f=F(),{configValue:y}=c(G.zeniAccountsConfig),{isFeatureEnabled:s}=p($.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=p($.isAutoTransferRuleEnabled),h=he(y),m=k((_=>R(_))),P=m.companyId??j.getSignedInUserTenant(d)?.companyId,{configValue:D}=c(G.expressPayConfig),A=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(m.tenantId),[I,C]=g.useState(!1),[w,E]=g.useState(!1),[T,v]=g.useState(!1),[b,O]=g.useState(!1),S=k((_=>Ne(_))),B=S.fetchState,u=k((_=>Fe(_))),V=u?.fetchState??"Not-Started",pe=!!m.companyZeniAccountInfo?.info?.isZeniAccountEnabled,oe=te(),Z=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,J=ee(oe?.loggedInUserRoleMap),ln=ye(oe?.loggedInUserRoleMap),dn=!!m.companyBillPayInfo?.info?.isBillPayEnabled,De=j.getSignedInUser(),un={userId:De?.userId??"",sessionId:De?.zeniSessionId??"",tenantId:m.tenantId??""},pn=`${Ce}/account_details`,{areTenantIdsInSync:ke}=pa();g.useEffect((()=>{!I&&ke&&(C(!0),o(We(!1)))}),[I,o,B,ke]),g.useEffect((()=>{!w&&V==="Not-Started"&&P&&(E(!0),o(ze(!0)))}),[w,V,P,o]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Ie=()=>{v(!1),t("..")},[mn,gn]=g.useState(!1),Se=_=>{gn(_)},{isAiCfoAccessEnabled:fn,onAskAiCfoClick:hn}=nn({mobileExploreReferrer:"Checking Accounts"});Qe({isDataReady:B==="Completed"});const yn=qe(m),xn=xe(s,m);return yn===!0&&xn!==!0?e.jsx(en,{}):pe?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&T===!1&&b===!1?e.jsx(de,{analytics:L,onLoad:_=>(Cn=>{Cn.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Be(S.summary?.totalBalance.available.amount??0),Be(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield)})(_)}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Ie,isTransferDrawerOpen:T,zeniAccountsConfig:S.zeniAccountsConfig,authParams:un,downloadAccountDetailEndPoint:pn}):null,b===!0?e.jsx(an,{closeDrawerHandler:Ie,isCheckDepositDrawerOpen:b}):null,e.jsxs(Ga,{windowSize:i,children:[e.jsx(ue,{isAppContentDrawerOpen:mn,handleDrawerToggle:Se}),e.jsx(Na,{zeniBankListView:S,navigate:t,currentTenant:m,location:r,companyId:P,analytics:L,maxInsuredAmount:h.maxInsuredAmount,isExpressPayEnabled:A,isBillPayEnabled:dn,isDebitCardFeatureEnabled:s,isAutoTransferRuleEnabled:l,handleDrawerToggle:Se,isAiCfoAccessEnabled:fn,onAskAiCfoClick:hn})]})]}):Z&&J?e.jsx(Q,{to:"../setup"}):m.companyZeniAccountInfo?.info&&!Z&&ln?e.jsx(Q,{to:"../promo",state:r.state}):e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const on=(n,a,r)=>{const t=xe(r,n),{tenantEmailDomain:o}=n;return t===!0||a===!1?`/${o}/bills`:`/${o}/bill/new`},Wa=(n,a)=>`/${n}/checking/${a}`,sn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,rn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,cn=n=>`/${n}/checking/express-pay`,qa=U.div`
50
50
  display: flex;
51
51
  width: 100%;
52
52
  flex: 1 1 auto;
@@ -54,4 +54,4 @@ import{j as e}from"./liveblocks-DXMWX-Ft.js";import{u as z,h as ne,g as N,i as W
54
54
  align-items: center;
55
55
  min-height: 100vh;
56
56
  background-color: ${n=>n.theme.colors.grey4};
57
- `,Xa=ae((function(n,a){const{currentTenant:r}=a,t=Ye(n,a.accountId),o=P.getSignedInUser(),i=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:r.companyName??"",authParams:d,downloadEndPoint:`${we.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,accountId:i}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let h="page-not-found";c==="sendMoney"?h=cn(d):c==="payBill"?h=on(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(h=sn(d,i),p!=null&&n(Xe(p))):c==="checkDeposit"?(h=rn(d,i),p!=null&&n(Jn(p))):c==="accountStatement"&&(h=Ja(d,i));const y=ie(o.state?.pathnameStackToGoBack,o.pathname);r(h,{state:{pathnameStackToGoBack:y}})},onAccountDetailClick:()=>{const c=Ya(d,i),p=ie(o.state?.pathnameStackToGoBack,o.pathname);r(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Ee(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(Je(i,!1))},onCloseAccountClick:()=>{n(Ee(i,"closeAccount",""))},onBackClick:()=>{r("../",{relative:"path"})}}}))(ga);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:r}){const t=N(),o=ne(),i=z(),d=M(),{tenantEmailDomain:c,accountId:p}=W(),{useDynamicConfig:h}=H(),{useFeatureGate:y}=H(),{isFeatureEnabled:s}=y($.isDebitCardFeatureEnabled),l=k((J=>R(J))),{configValue:f}=h(G.expressPayConfig),m=f.is_enable_all_tenants===!0||f.tenant_ids!=null&&f.tenant_ids.includes(l.tenantId),b=!!l.companyBillPayInfo?.info?.isBillPayEnabled,D=P.getSignedInUser(),A=l.companyId??P.getSignedInUserTenant(c)?.companyId,I={userId:D?.userId??"",sessionId:D?.zeniSessionId??"",tenantId:l.tenantId??""},C=`${Ce}/account_details`,[w,E]=g.useState(!1),[T,v]=g.useState(!1),[j,O]=g.useState(!1),[S,B]=g.useState(!1),u=k((J=>Ye(J,p??""))),V=u.fetchState,{isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe}=nn({mobileExploreReferrer:"Checking Account Detail"});Qe({isDataReady:V==="Completed"}),g.useEffect((()=>{w||(i(Je(p??"",!1)),E(!0))}),[w,i,V]),g.useEffect((()=>{B(r!=null&&r===!0)}),[r]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Z=()=>{B(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&u.accountDetail!=null?e.jsx(_a,{authParams:I,downloadAccountDetailEndPoint:C,closeDrawerHandler:Z,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:u.accountDetail}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Z,isTransferDrawerOpen:T,zeniAccountsConfig:u.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:C}):null,j===!0?e.jsx(an,{closeDrawerHandler:Z,isCheckDepositDrawerOpen:j}):null,e.jsx(qa,{windowSize:d,children:e.jsx(Xa,{navigate:o,currentTenant:l,location:t,companyId:A,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:b,isExpressPayEnabled:m,isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe})})]})}const Ya=(n,a)=>`/${n}/checking/${a}/account-info`,Ja=(n,a)=>`/${n}/checking/${a}/statements`,Ka=ae((function(n,a){const{companyId:r}=a;return{zeniAccountSetupView:Kn(n,r)}}),(function(n,a){const{navigate:r,companyId:t}=a;return{onSetupButtonClick:()=>{L.trackAccountsPromoPageClicked("Setup Accounts"),n(Qn(t))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{r("../setup",{relative:"path"})}}}))(ya),Qa=()=>{const n=ne(),a=N(),{tenantEmailDomain:r}=W(),{useDynamicConfig:t}=H(),o=ha(),i=F(),[d,c]=g.useState(!1),[p,h]=g.useState(!1),y=k((w=>R(w))),{configValue:s}=t(G.zeniAccountsConfig),l=fe(s);g.useEffect((()=>{p===!1&&a.state?.message==="activation"&&h(!0)}),[a.state]);const f=P.getSignedInUserTenant(r)?.companyId??y.companyId,m=P.getSignedInUser(),b=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,D=w=>{c(w)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const A=te(),I=ee(A?.loggedInUserRoleMap),C=ye(A?.loggedInUserRoleMap);if(b&&I)return e.jsx(Q,{to:"../../checking/setup"});if(y.company?.companyZeniAccountInfo&&(!b&&I||C)){if(a.state?.message==="activation"){const w=Ke(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:w.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(fa,{showConfetti:p}),e.jsx(de,{analytics:L,onLoad:w=>(E=>E.trackPageLoaded(Ae.Event.accountsPromoPageViewed))(w)}),e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),e.jsx(Ka,{analytics:L,navigate:n,companyId:f,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{D(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})};function jt(){const n=N(),a=k((S=>R(S))),r=F(),{useFeatureGate:t,useDynamicConfig:o}=H(),i=te(),d=ee(i?.loggedInUserRoleMap),c=ye(i?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:y}=t($.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t($.isDebitCardFeatureEnabled),l=qe(a),f=xe(s,a),m=a?.userRole!=null&&ea(a?.userRole),b=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!m)&&na(i?.loggedInUserRoleMap),D=aa(i?.loggedInUserRoleMap),A=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!m)&&ta(i?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!m,{configValue:C}=o(G.expressPayConfig),w=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(a.tenantId),{isFeatureEnabled:E}=t($.isAutoTransferRuleEnabled),T=xa(a,y,s)&&!m&&oa(i?.loggedInUserRoleMap),v=sa(i?.loggedInUserRoleMap),j=I&&ee(i?.loggedInUserRoleMap),O=j||Me(i?.loggedInUserRoleMap);return e.jsxs(Re,{children:[e.jsx(x,{path:"setup",element:e.jsx(Oe,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),e.jsx(x,{path:"verification",element:e.jsx(Oe,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:j,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),E?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"auto-transfer",element:e.jsx(Le,{})}),O?e.jsx(x,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Le,{isEditDrawerOpen:!0})}):null]}):e.jsx(x,{path:"auto-transfer",element:e.jsx(K,{})}),w&&d?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"express-pay",element:e.jsx(se,{})}),e.jsx(x,{path:"express-pay/add-ach",element:e.jsx(se,{isAddACHDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire/add-address",element:e.jsx(se,{isAddAddressDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire",element:e.jsx(se,{isAddWireDrawerOpen:!0})})]}):e.jsx(x,{path:"express-pay",element:e.jsx(K,{})}),e.jsx(x,{path:"promo",element:e.jsx(Qa,{})}),l&&!f?e.jsx(x,{path:"/*",element:e.jsx(en,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/",element:e.jsx(he,{})}),e.jsx(x,{path:"transfer",element:e.jsx(he,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(he,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"cash_management/*",element:e.jsx(K,{})}),e.jsx(x,{path:":accountId/*",element:e.jsx(et,{})}),e.jsx(x,{path:"*",element:e.jsx(K,{})})]}):h&&d?e.jsx(x,{path:"*",element:e.jsx(Q,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(x,{path:"*",element:e.jsx(Q,{to:"../promo",state:n.state})}):e.jsx(x,{path:"*",element:e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${Ca.sp1} ${r.colors.dropShadowNormal}`}})})]})}function et(){return e.jsxs(Re,{children:[e.jsx(x,{path:"/",element:e.jsx(re,{})}),e.jsx(x,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(x,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"statements",element:e.jsx(Ia,{})}),e.jsx(x,{path:"*",element:e.jsx(K,{})})]})}export{jt as default};
57
+ `,Ya=ae((function(n,a){const{currentTenant:r}=a,t=Xe(n,a.accountId),o=j.getSignedInUser(),i=n.tenantState.currentTenantId,d={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=t.accountDetail?.id??"";return{currentTenantCompanyName:r.companyName??"",authParams:d,downloadEndPoint:`${we.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}}),(function(n,a){const{navigate:r,currentTenant:t,location:o,accountId:i}=a,{tenantEmailDomain:d}=t;return{handleMoveMoneyOptionSelection:(c,p)=>{let f="page-not-found";c==="sendMoney"?f=cn(d):c==="payBill"?f=on(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):c==="transfer"?(f=sn(d,i),p!=null&&n(Ye(p))):c==="checkDeposit"?(f=rn(d,i),p!=null&&n(Jn(p))):c==="accountStatement"&&(f=Ja(d,i));const y=ie(o.state?.pathnameStackToGoBack,o.pathname);r(f,{state:{pathnameStackToGoBack:y}})},onAccountDetailClick:()=>{const c=Xa(d,i),p=ie(o.state?.pathnameStackToGoBack,o.pathname);r(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{n(Ee(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{n(Je(i,!1))},onCloseAccountClick:()=>{n(Ee(i,"closeAccount",""))},onBackClick:()=>{r("../",{relative:"path"})}}}))(ga);function re({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:r}){const t=N(),o=ne(),i=z(),d=M(),{tenantEmailDomain:c,accountId:p}=W(),{useDynamicConfig:f}=H(),{useFeatureGate:y}=H(),{isFeatureEnabled:s}=y($.isDebitCardFeatureEnabled),l=k((J=>R(J))),{configValue:h}=f(G.expressPayConfig),m=h.is_enable_all_tenants===!0||h.tenant_ids!=null&&h.tenant_ids.includes(l.tenantId),P=!!l.companyBillPayInfo?.info?.isBillPayEnabled,D=j.getSignedInUser(),A=l.companyId??j.getSignedInUserTenant(c)?.companyId,I={userId:D?.userId??"",sessionId:D?.zeniSessionId??"",tenantId:l.tenantId??""},C=`${Ce}/account_details`,[w,E]=g.useState(!1),[T,v]=g.useState(!1),[b,O]=g.useState(!1),[S,B]=g.useState(!1),u=k((J=>Xe(J,p??""))),V=u.fetchState,{isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe}=nn({mobileExploreReferrer:"Checking Account Detail"});Qe({isDataReady:V==="Completed"}),g.useEffect((()=>{w||(i(Je(p??"",!1)),E(!0))}),[w,i,V]),g.useEffect((()=>{B(r!=null&&r===!0)}),[r]),g.useEffect((()=>{n!=null&&n===!0?v(!0):(v(!1),document.body.style.overflow="auto")}),[n]),g.useEffect((()=>{O(a!=null&&a===!0)}),[a]);const Z=()=>{B(!1),o("..")};return e.jsxs(e.Fragment,{children:[S===!0&&u.accountDetail!=null?e.jsx(_a,{authParams:I,downloadAccountDetailEndPoint:C,closeDrawerHandler:Z,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:u.accountDetail}):null,T===!0?e.jsx(tn,{closeDrawerHandler:Z,isTransferDrawerOpen:T,zeniAccountsConfig:u.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:C}):null,b===!0?e.jsx(an,{closeDrawerHandler:Z,isCheckDepositDrawerOpen:b}):null,e.jsx(qa,{windowSize:d,children:e.jsx(Ya,{navigate:o,currentTenant:l,location:t,companyId:A,isDebitCardFeatureEnabled:s,accountId:p??"",isBillPayEnabled:P,isExpressPayEnabled:m,isAiCfoAccessEnabled:pe,onAskAiCfoClick:oe})})]})}const Xa=(n,a)=>`/${n}/checking/${a}/account-info`,Ja=(n,a)=>`/${n}/checking/${a}/statements`,Ka=ae((function(n,a){const{companyId:r}=a;return{zeniAccountSetupView:Kn(n,r)}}),(function(n,a){const{navigate:r,companyId:t}=a;return{onSetupButtonClick:()=>{L.trackAccountsPromoPageClicked("Setup Accounts"),n(Qn(t))},onBackClick:()=>{r("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{r("../setup",{relative:"path"})}}}))(ya),Qa=()=>{const n=ne(),a=N(),{tenantEmailDomain:r}=W(),{useDynamicConfig:t}=H(),o=fa(),i=F(),[d,c]=g.useState(!1),[p,f]=g.useState(!1),y=k((w=>R(w))),{configValue:s}=t(G.zeniAccountsConfig),l=he(s);g.useEffect((()=>{p===!1&&a.state?.message==="activation"&&f(!0)}),[a.state]);const h=j.getSignedInUserTenant(r)?.companyId??y.companyId,m=j.getSignedInUser(),P=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,D=w=>{c(w)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const A=te(),I=ee(A?.loggedInUserRoleMap),C=ye(A?.loggedInUserRoleMap);if(P&&I)return e.jsx(Q,{to:"../../checking/setup"});if(y.company?.companyZeniAccountInfo&&(!P&&I||C)){if(a.state?.message==="activation"){const w=Ke(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:w.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(ha,{showConfetti:p}),e.jsx(de,{analytics:L,onLoad:w=>(E=>E.trackPageLoaded(Ae.Event.accountsPromoPageViewed))(w)}),e.jsx(ue,{isAppContentDrawerOpen:d,handleDrawerToggle:D}),e.jsx(Ka,{analytics:L,navigate:n,companyId:h,meetingUrl:o("zeni_accounts_promo"),onClickMenuIcon:()=>{D(!0)},maxAnnualPercentageYield:l.maxAnnualPercentageYield,maxInsuredAmount:l.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})};function bt(){const n=N(),a=k((S=>R(S))),r=F(),{useFeatureGate:t,useDynamicConfig:o}=H(),i=te(),d=ee(i?.loggedInUserRoleMap),c=ye(i?.loggedInUserRoleMap),p=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled,f=!!a.company?.companyZeniAccountInfo?.isZeniAccountTOSAccepted,{isFeatureEnabled:y}=t($.isChargeCardFeatureEnabled),{isFeatureEnabled:s}=t($.isDebitCardFeatureEnabled),l=qe(a),h=xe(s,a),m=a?.userRole!=null&&ea(a?.userRole),P=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!m)&&na(i?.loggedInUserRoleMap),D=aa(i?.loggedInUserRoleMap),A=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!m)&&ta(i?.loggedInUserRoleMap),I=!!a.company?.companyZeniAccountInfo?.isZeniAccountEnabled&&!m,{configValue:C}=o(G.expressPayConfig),w=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(a.tenantId),{isFeatureEnabled:E}=t($.isAutoTransferRuleEnabled),T=xa(a,y,s)&&!m&&oa(i?.loggedInUserRoleMap),v=sa(i?.loggedInUserRoleMap),b=I&&ee(i?.loggedInUserRoleMap),O=b||Me(i?.loggedInUserRoleMap);return e.jsxs(Re,{children:[e.jsx(x,{path:"setup",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:b,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),e.jsx(x,{path:"verification",element:e.jsx(Oe,{isBillPayAdminLevelAccess:P,isUserHasOnlyBillPayAccess:D,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:b,isChargeCardAdminLevelAccess:T,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),E?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"auto-transfer",element:e.jsx(Le,{})}),O?e.jsx(x,{path:"auto-transfer/:ruleId/edit",element:e.jsx(Le,{isEditDrawerOpen:!0})}):null]}):e.jsx(x,{path:"auto-transfer",element:e.jsx(K,{})}),w&&d?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"express-pay",element:e.jsx(se,{})}),e.jsx(x,{path:"express-pay/add-ach",element:e.jsx(se,{isAddACHDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire/add-address",element:e.jsx(se,{isAddAddressDrawerOpen:!0})}),e.jsx(x,{path:"express-pay/add-wire",element:e.jsx(se,{isAddWireDrawerOpen:!0})})]}):e.jsx(x,{path:"express-pay",element:e.jsx(K,{})}),e.jsx(x,{path:"promo",element:e.jsx(Qa,{})}),l&&!h?e.jsx(x,{path:"/*",element:e.jsx(en,{})}):p?e.jsxs(e.Fragment,{children:[e.jsx(x,{path:"/",element:e.jsx(fe,{})}),e.jsx(x,{path:"transfer",element:e.jsx(fe,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(fe,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"cash_management/*",element:e.jsx(K,{})}),e.jsx(x,{path:":accountId/*",element:e.jsx(et,{})}),e.jsx(x,{path:"*",element:e.jsx(K,{})})]}):f&&d?e.jsx(x,{path:"*",element:e.jsx(Q,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&c?e.jsx(x,{path:"*",element:e.jsx(Q,{to:"../promo",state:n.state})}):e.jsx(x,{path:"*",element:e.jsx(le,{fetchState:"In-Progress",style:{backgroundColor:r.colors.grey5,boxShadow:`0px 2px ${Ca.sp1} ${r.colors.dropShadowNormal}`}})})]})}function et(){return e.jsxs(Re,{children:[e.jsx(x,{path:"/",element:e.jsx(re,{})}),e.jsx(x,{path:"account-info",element:e.jsx(re,{isAccountInfoDrawerOpen:!0})}),e.jsx(x,{path:"transfer",element:e.jsx(re,{isTransferDrawerOpen:!0})}),e.jsx(x,{path:"check-deposit",element:e.jsx(re,{isCheckDepositDrawerOpen:!0})}),e.jsx(x,{path:"statements",element:e.jsx(Ia,{})}),e.jsx(x,{path:"*",element:e.jsx(K,{})})]})}export{bt as default};
@@ -0,0 +1,9 @@
1
+ import{j as i}from"./liveblocks-BMZsanry.js";import{a as m}from"./sentry-w92aQEbS.js";import{h as x,u as $,g as j,i as v,j as p}from"./core-DRRkK-nh.js";import{U2 as s,U1 as z,a0z as B,fI as C,a0A as T}from"./zeni-epic-state-BgQvRRQh.js";import{$ as U,ac as g,z as D,a5 as E,d6 as L,a2 as P}from"./index-C8t0n_dK.js";import{u as N,n as _}from"./mui-Cs4dDAVi.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]="1e320fe9-9c53-4fbe-8cd4-a64a2e1dc2cf",e._sentryDebugIdIdentifier="sentry-dbid-1e320fe9-9c53-4fbe-8cd4-a64a2e1dc2cf")}catch{}})();const A=_.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `;function H(){const e=x(),n=$(),d=U(),f=j();let{accountId:a}=v(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,y]=m.useState(!1),h=N();m.useEffect((()=>{u||(y(!0),n(z(a??"",!1)))}),[u,n]);const o=p((t=>B(t,a??""))),I=()=>{const t=P(f.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=D.getSignedInUser(),r=p((t=>C(t))),b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(E,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(A,{windowSize:d,children:i.jsx(L,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:l})})}export{H as Z};
@@ -1 +1 @@
1
- import"./sentry-B8ZcloT9.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]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};
1
+ import"./sentry-w92aQEbS.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]="459d6150-40e4-4fe0-88f2-7336312ca00a",e._sentryDebugIdIdentifier="sentry-dbid-459d6150-40e4-4fe0-88f2-7336312ca00a")}catch{}})();function d(e,t){if(t!=null)return e.find((n=>n.qboId===t))}function i(e,t){return e.filter((n=>n.qboId!=null&&t.includes(n.qboId)))}function s(e,t){return t.map((n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""})))}export{i as a,d as g,s as m};