@zeniai/web-app-ui 5.0.51-qa → 5.0.52-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 (113) hide show
  1. package/dist/assets/AddressRoutes-ByK34Nkv.js +1 -0
  2. package/dist/assets/{AddressScreen-BJjMs843.js → AddressScreen-DUppO0v9.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-BUwY6cv8.js → AiCfoScreen-BpyzUjuE.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-An8tCrWl.js → BillPayApprovalRoutes-BBwzt0Yv.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CYiXX33o.js → BillPayRoutes-uzwpElCr.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-DoHYxOGb.js → BusinessVerificationPageScreen-B-xYgrU6.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-DGO5zUxA.js → ChargeCardRoutes-CzHXXe2R.js} +1 -1
  8. package/dist/assets/CompanyPassportScreen-B2JEo2qd.js +1 -0
  9. package/dist/assets/{ConnectionAuthScreen-D3mAniHY.js → ConnectionAuthScreen-1pJ2T25i.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-Bz4XPpgo.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-Bx6oc87w.js → CustomerOnboardingRoutes-BwQeoVBC.js} +3 -3
  12. package/dist/assets/{DashboardRoutes-NAPserHZ.js → DashboardRoutes-BUqI4Cc0.js} +3 -3
  13. package/dist/assets/{DefaultTenantHome-B1RYAbTh.js → DefaultTenantHome-I8Od3JVH.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-CakB6fw5.js → DomesticWireDetailScreen-DsIRwxGz.js} +3 -3
  15. package/dist/assets/{DrawerScreen-DrSkDwbq.js → DrawerScreen-B9VUPvG9.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-DW8h4wgt.js → EntityDetailRoutes-Di-NARtq.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-6ohsYmfK.js → ExpenseAutomationRoutes-CmosQIFV.js} +4 -4
  18. package/dist/assets/FeaturePreviewScreen-D9loXVU6.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-C-enwTzu.js +72 -0
  20. package/dist/assets/MagicLinkSignInScreen-lg6b2bn0.js +12 -0
  21. package/dist/assets/{MobileAppDrawer-yjf5eOt5.js → MobileAppDrawer-Ch_dkO8z.js} +1 -1
  22. package/dist/assets/NotFoundScreen-DHD7hd9-.js +1 -0
  23. package/dist/assets/{NotificationRoutes-Dwp8tQ6T.js → NotificationRoutes-DKcGAYWb.js} +1 -1
  24. package/dist/assets/PandLWithForecastRoutes-BgoW8SD7.js +1 -0
  25. package/dist/assets/{PeopleRoutes-svIRyjwA.js → PeopleRoutes-CzzUDUEU.js} +5 -5
  26. package/dist/assets/PerformanceRoutes-BvIRTO8r.js +1 -0
  27. package/dist/assets/{Preview-BFnaACsK.js → Preview-C8CjsHbo.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-BnAOs72H.js → QBOConnectionScreen-Onqn0btO.js} +1 -1
  29. package/dist/assets/ReferralListScreen-DP-pmrc-.js +5 -0
  30. package/dist/assets/{ReimbursementApprovalRoutes-AaOaGl69.js → ReimbursementApprovalRoutes-6bMlKgzH.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-iRHzopBs.js → ReimbursementApprovalRuleDetailScreen-C13510At.js} +1 -1
  32. package/dist/assets/{ReimbursementRoutes-BlQTHNzR.js → ReimbursementRoutes-CeASWzxU.js} +4 -4
  33. package/dist/assets/{ReportsRoutes-ODNWlmKZ.js → ReportsRoutes-C8NoWmOj.js} +1 -1
  34. package/dist/assets/RewardsRoutes-DaQQnoJH.js +1 -0
  35. package/dist/assets/ScreenRoutes-CQlAz61c.js +2 -0
  36. package/dist/assets/{SettingsRoutes-BtTdagzD.js → SettingsRoutes-1ZlX7Q5h.js} +4 -4
  37. package/dist/assets/{SetupPagesScreen-9bJrEcO5.js → SetupPagesScreen-BJLzY18z.js} +5 -5
  38. package/dist/assets/{SignInScreen-BFVexeRF.js → SignInScreen-CmtJJCNv.js} +1 -1
  39. package/dist/assets/{SignOutScreen-CorrYS1D.js → SignOutScreen-CTAkPk9V.js} +1 -1
  40. package/dist/assets/{TaskListScreen-BM1Nr2_R.js → TaskListScreen-CoxKSDBN.js} +2 -2
  41. package/dist/assets/TaskRoutes-DIhS3vkG.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-BFba8WDw.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-FlsKwCG1.js → TransactionDetailScreen-BzuYNaM6.js} +2 -2
  44. package/dist/assets/{TransactionListRoutes-C1SKB2Q7.js → TransactionListRoutes-CZN3kVuH.js} +1 -1
  45. package/dist/assets/{TreasuryRoutes-CZ86Z7Zp.js → TreasuryRoutes-CDbHC1ud.js} +5 -5
  46. package/dist/assets/{VendorsRoutes-CgnYoNX1.js → VendorsRoutes-DVIYw3C9.js} +1 -1
  47. package/dist/assets/WiseConfirmationScreen-Chv2D10i.js +12 -0
  48. package/dist/assets/{ZeniAccountRoutes-BE6fTfzk.js → ZeniAccountRoutes-DSf9Fyu-.js} +10 -10
  49. package/dist/assets/{ZeniAccountStatementScreen-DhrE_Mh0.js → ZeniAccountStatementScreen-6fe1R3g0.js} +2 -2
  50. package/dist/assets/{accountMappingHelper-CU4aKlrU.js → accountMappingHelper-DbsU5f-I.js} +1 -1
  51. package/dist/assets/{analytics-Bd6seXWU.js → analytics-dCAT-sHe.js} +1 -1
  52. package/dist/assets/{analyticsHelper-j6zOnCou.js → analyticsHelper-cZJjlMLA.js} +1 -1
  53. package/dist/assets/{core--XU7-NnD.js → core-CFeBRNT2.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-BIzQ7uEg.js → decodeURIComponentSafe-n41T8k0p.js} +1 -1
  55. package/dist/assets/{dnd-Ds-4dyB1.js → dnd-B97JkZHN.js} +1 -1
  56. package/dist/assets/{empty-DVHYAhhD.js → empty-DLc2Fl0S.js} +1 -1
  57. package/dist/assets/{empty-BwY8PqJS.js → empty-OWRww1ZI.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-D_VEm_md.js → emptyVideoElement-BSbvcjsk.js} +1 -1
  59. package/dist/assets/{epic-1d9EeCy9.js → epic-BiCEoXIv.js} +1 -1
  60. package/dist/assets/{getLocaleForTenant-Dwo9Wb6T.js → getLocaleForTenant-3enaSwsq.js} +1 -1
  61. package/dist/assets/{index-DlCUf0M0.js → index-BgAqzVN-.js} +1 -1
  62. package/dist/assets/{index-9pAkrSLA.js → index-CChL82zp.js} +1 -1
  63. package/dist/assets/{index-DgqJNZ_S.js → index-CMh3-nxR.js} +1 -1
  64. package/dist/assets/{index-XoH0PVX5.js → index-CY1RyVhG.js} +1 -1
  65. package/dist/assets/{index-BP13r7Vp.js → index-CeOX_EPF.js} +2 -2
  66. package/dist/assets/{index-EvwkWm_D.js → index-DqjQxzff.js} +11637 -11633
  67. package/dist/assets/{index-DBemMuU5.js → index-Xbw0F7cT.js} +1 -1
  68. package/dist/assets/{lexical-DI-malFT.js → lexical-qfgvtXN9.js} +1 -1
  69. package/dist/assets/{liveblocks-BfxEdLN6.js → liveblocks-B5kNfPMX.js} +1 -1
  70. package/dist/assets/{lottie-BS2cOh43.js → lottie-DBJX4kzt.js} +1 -1
  71. package/dist/assets/{mui-9iwP9efG.js → mui-CdWoU1P3.js} +1 -1
  72. package/dist/assets/{pathToGoBack-Ep5SDbVV.js → pathToGoBack-CRbDFluC.js} +1 -1
  73. package/dist/assets/{pdf-8sT0OMy_.js → pdf-btSs-oeP.js} +4 -4
  74. package/dist/assets/{pdf-lib-izGbad5l.js → pdf-lib-DtoGaD83.js} +1 -1
  75. package/dist/assets/{plaid-Bf6E1gSx.js → plaid-BtUsVD04.js} +1 -1
  76. package/dist/assets/{pusher-C6gtUfjf.js → pusher-P-ZkAQwH.js} +1 -1
  77. package/dist/assets/{react-D6m-bs6t.js → react-B3Pd89v5.js} +1 -1
  78. package/dist/assets/{react-DGYz2spx.js → react-BKHO4frM.js} +1 -1
  79. package/dist/assets/{react-bNq_QXAw.js → react-C6tPPw2y.js} +1 -1
  80. package/dist/assets/{react-BLsAz5wN.js → react-CjYyY07F.js} +1 -1
  81. package/dist/assets/{react-DUfIqhcy.js → react-DRVFd15b.js} +1 -1
  82. package/dist/assets/{react-BzRVfIKx.js → react-DoVi3sqS.js} +1 -1
  83. package/dist/assets/{recharts-DclpYwCk.js → recharts-Blc5CD1k.js} +1 -1
  84. package/dist/assets/{routePaths-Bdx9M7os.js → routePaths-DmlKjqFK.js} +1 -1
  85. package/dist/assets/{sentry-DHDSAAI5.js → sentry-tUkEj5F1.js} +1 -1
  86. package/dist/assets/{url-BDhDJXHV.js → url-CKNm9b8o.js} +1 -1
  87. package/dist/assets/{url-DIT5hKMD.js → url-CdUOJaXS.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-XVobODAU.js +1 -0
  89. package/dist/assets/{useDeviceId-C-LPSORD.js → useDeviceId-BbnEFhNU.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-DoHZcRGr.js +1 -0
  91. package/dist/assets/{useInitialThreadRequest-DhirPii4.js → useInitialThreadRequest-DcK2Ntoj.js} +1 -1
  92. package/dist/assets/{utils-CrDImgSj.js → utils-C-s_aaYV.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-Q4vPPHyO.js → withTransactionSidePanel-C1ZCVyta.js} +2 -2
  94. package/dist/assets/{zeni-epic-state-DvI5349z.js → zeni-epic-state-BDLHO2z4.js} +3 -3
  95. package/dist/index.html +1 -1
  96. package/package.json +3 -3
  97. package/dist/assets/AddressRoutes-Cj4drMcU.js +0 -1
  98. package/dist/assets/CompanyPassportScreen-rWlxIJoT.js +0 -1
  99. package/dist/assets/CustomerOnboardingAuthScreen-Dd66-ZBI.js +0 -1
  100. package/dist/assets/FeaturePreviewScreen-CEqkd2fM.js +0 -1
  101. package/dist/assets/MagicLinkRoutes-3fUwTetO.js +0 -72
  102. package/dist/assets/MagicLinkSignInScreen-CkCNOww8.js +0 -12
  103. package/dist/assets/NotFoundScreen-CnR6KoPB.js +0 -1
  104. package/dist/assets/PandLWithForecastRoutes-D8hAgDrO.js +0 -1
  105. package/dist/assets/PerformanceRoutes-C2tNl70Z.js +0 -1
  106. package/dist/assets/ReferralListScreen-DT3k5KPL.js +0 -5
  107. package/dist/assets/RewardsRoutes-CbbDTjba.js +0 -1
  108. package/dist/assets/ScreenRoutes-BMxdpVnK.js +0 -2
  109. package/dist/assets/TaskRoutes-NsfE-pxS.js +0 -9
  110. package/dist/assets/TransactionDetailRoutes-DQnjHW-f.js +0 -1
  111. package/dist/assets/WiseConfirmationScreen-CrctVgER.js +0 -12
  112. package/dist/assets/useAskAiCfoHostNavButtonProps-CJ_MQerV.js +0 -1
  113. package/dist/assets/useFetchSuggestedQuestionsWhenReady-Io8u6IBf.js +0 -1
@@ -1,11 +1,11 @@
1
- import{j as p}from"./liveblocks-BfxEdLN6.js";import xn from"./NotFoundScreen-CnR6KoPB.js";import{a as s,b as Pt}from"./sentry-DHDSAAI5.js";import{n as De,S as Rn}from"./mui-9iwP9efG.js";import{h as se,j as wt,u as Ge,g as F,k as Dn,l as rt,n as On,o as je}from"./core--XU7-NnD.js";import{eN as we,OL as Un,f0 as Ce,fe as Fn,q7 as Bn,mN as xt,n6 as Rt,OM as Dt,ng as _n,ON as Ot,mG as Vn,pF as Mn,eY as he,OO as xe,s6 as Ut,Bh as Ft,OP as Bt,OQ as jn,pk as qe,Kt as dt,Kv as zn,ju as Ln,Kw as $n,jB as Gn,cU as qn,t9 as Je,jr as Jn,mT as _t,nl as Re,OR as Nn,Jm as ut,Jl as Ae,OS as mt,jS as Yn,OT as Kn,OU as Wn,OV as Hn,OW as Qn,m_ as Zn,mL as ce,no as Te,OX as Xn,OY as ea,OZ as ta,nv as na,jF as aa,jw as oa,O_ as sa,jE as ht,KD as ca,O$ as ia,P0 as la,pg as ra,oX as da,nm as pe,oW as ze,P1 as ua,P2 as ma,l9 as ha,bq as pa,l4 as pt,kS as ga,P3 as Ca,gD as gt,fQ as Sa,l1 as Ia,v2 as fa,P4 as ka,nW as Ea,nR as va,nV as ya,nG as ba,P5 as Aa,e$ as Vt,n9 as Ta,mW as Pa,ff as Ct,nq as wa,P6 as xa,nn as Mt,P7 as Ra,P8 as Da,P9 as Oa,Pa as Ua,Pb as St,ps as Fa,oM as Ba,Jk as _a,jD as Va,Pc as Ma,FB as ja,jC as za,e_ as La,ol as jt,oE as $a,nk as It,np as Ga,bC as qa,k_ as Ja,kX as Na,Pd as Ya,nF as ft,oC as kt,oA as Ka,oq as Wa,o5 as Ha,oD as Qa,Pe as Za,Pf as Xa,o9 as eo,Pg as to,n$ as no,o8 as ao,o6 as oo,oH as so}from"./zeni-epic-state-DvI5349z.js";import{I as zt,a as Lt,p as ge,e as L,v as Q,J as $t,ct as co,z as Oe,cu as io,ao as Pe,cv as lo,aO as Et,B as Gt,cw as ro,al as Le,D as uo,cx as mo,O as ho,cy as po,cz as go,cA as Co,x as So,A as Io,aI as fo,b0 as ko,E as Eo,cB as vo}from"./index-EvwkWm_D.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-CJ_MQerV.js";import{c as Jt}from"./useFetchSuggestedQuestionsWhenReady-Io8u6IBf.js";import{c as vt,C as yo}from"./TransactionDetailScreen-FlsKwCG1.js";import{w as bo}from"./withTransactionSidePanel-Q4vPPHyO.js";import{h as Ao,v as To}from"./routePaths-Bdx9M7os.js";import{g as $e}from"./accountMappingHelper-CU4aKlrU.js";import{D as Po}from"./DrawerScreen-DrSkDwbq.js";import"./recharts-DclpYwCk.js";import"./analytics-Bd6seXWU.js";import"./plaid-Bf6E1gSx.js";import"./dnd-Ds-4dyB1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BS2cOh43.js";import"./lexical-DI-malFT.js";import"./pdf-8sT0OMy_.js";import"./utils-CrDImgSj.js";import"./decodeURIComponentSafe-BIzQ7uEg.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="4617a491-abf8-4505-aa97-6ce05f40e65c",t._sentryDebugIdIdentifier="sentry-dbid-4617a491-abf8-4505-aa97-6ce05f40e65c")}catch{}})();const wo=()=>{const{isAiCfoOpen:t,setIsAiCfoOpen:d}=zt(),O=se(),E=wt(),S=Ge(),u=F(g=>we(g)),{useFeatureGate:c}=Lt(),{isFeatureEnabled:B}=c(ge.isRealtimeInsightsFeatureEnabled),m=F(g=>g.expenseAutomationViewState.selectedPeriodByTenantId),o=F(g=>Un(g,u.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:f}=qt({isAiCfoOpen:t,setIsAiCfoOpen:d,mobileExploreReferrer:"Month-End Close Overview"}),y=s.useCallback((g,T,_=!1)=>{O(Ce({tenantId:T,period:{month:g.month,year:g.year},refreshViewInBackground:_}))},[]),V=s.useCallback(g=>{const T=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(g.month,g.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),O(Fn(u.tenantId,g))},[u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),i=m[u.tenantId],h=s.useCallback(()=>{const g=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(i.month,i.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,g??null),y(i,u.tenantId,!0)},[y,i,u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),w=Q(S.state?.pathnameStackToGoBack,S.pathname),A=s.useCallback(()=>{if(o.monthEndCloseChecks!=null&&i!=null){const g=o.monthEndCloseChecks.monthEndCloseCheckList.find(T=>T.progress<100);if(g!=null)return void E(`./${g.id}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}});E(`./month_end_insights/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,i]),{areTenantIdsInSync:x}=$t();return Jt({isDataReady:o.fetchState==="Completed"}),s.useEffect(()=>{i!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&x&&y(i,u.tenantId)},[y,i,o.fetchState,u.tenantId,x]),s.useEffect(()=>{i!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&x&&O(Bn(i))},[i,o.monthClosePerformanceTrendFetchStatus.fetchState,x]),s.useEffect(()=>{const g=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&h()},3e5);return()=>clearInterval(g)},[o.fetchState]),s.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const g=S.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,g??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),p.jsx(xo,{children:p.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:B,onMonthEndCheckClick:g=>{E(`./${g}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:V,handleReviewButtonClick:A,onBackClick:()=>{E("../../dashboard")},onReload:h,isAiCfoAccessEnabled:v,onAskAiCfoClick:f})})},xo=De.div`
1
+ import{j as p}from"./liveblocks-B5kNfPMX.js";import xn from"./NotFoundScreen-DHD7hd9-.js";import{a as s,b as Pt}from"./sentry-tUkEj5F1.js";import{n as De,S as Rn}from"./mui-CdWoU1P3.js";import{h as se,j as wt,u as Ge,g as F,k as Dn,l as rt,n as Un,o as je}from"./core-CFeBRNT2.js";import{eN as we,OL as On,f0 as Ce,fe as Fn,q7 as Bn,mN as xt,n6 as Rt,OM as Dt,ng as _n,ON as Ut,mG as Mn,pF as Vn,eY as he,OO as xe,s6 as Ot,Bh as Ft,OP as Bt,OQ as jn,pk as qe,Kt as dt,Kv as zn,ju as Ln,Kw as $n,jB as Gn,cU as qn,t9 as Je,jr as Jn,mT as _t,nl as Re,OR as Nn,Jm as ut,Jl as Ae,OS as mt,jS as Yn,OT as Kn,OU as Wn,OV as Hn,OW as Qn,m_ as Zn,mL as ce,no as Te,OX as Xn,OY as ea,OZ as ta,nv as na,jF as aa,jw as oa,O_ as sa,jE as ht,KD as ca,O$ as ia,P0 as la,pg as ra,oX as da,nm as pe,oW as ze,P1 as ua,P2 as ma,l9 as ha,bq as pa,l4 as pt,kS as ga,P3 as Ca,gD as gt,fQ as Sa,l1 as Ia,v2 as fa,P4 as ka,nW as Ea,nR as va,nV as ya,nG as ba,P5 as Aa,e$ as Mt,n9 as Ta,mW as Pa,ff as Ct,nq as wa,P6 as xa,nn as Vt,P7 as Ra,P8 as Da,P9 as Ua,Pa as Oa,Pb as St,ps as Fa,oM as Ba,Jk as _a,jD as Ma,Pc as Va,FB as ja,jC as za,e_ as La,ol as jt,oE as $a,nk as It,np as Ga,bC as qa,k_ as Ja,kX as Na,Pd as Ya,nF as ft,oC as kt,oA as Ka,oq as Wa,o5 as Ha,oD as Qa,Pe as Za,Pf as Xa,o9 as eo,Pg as to,n$ as no,o8 as ao,o6 as oo,oH as so}from"./zeni-epic-state-BDLHO2z4.js";import{K as zt,a as Lt,p as ge,e as L,v as Q,M as $t,ct as co,z as Ue,cu as io,ao as Pe,cv as lo,aO as Et,B as Gt,cw as ro,al as Le,D as uo,cx as mo,R as ho,cy as po,cz as go,cA as Co,y as So,A as Io,aI as fo,b0 as ko,E as Eo,cB as vo}from"./index-DqjQxzff.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-XVobODAU.js";import{c as Jt}from"./useFetchSuggestedQuestionsWhenReady-DoHZcRGr.js";import{c as vt,C as yo}from"./TransactionDetailScreen-BzuYNaM6.js";import{w as bo}from"./withTransactionSidePanel-C1ZCVyta.js";import{h as Ao,v as To}from"./routePaths-DmlKjqFK.js";import{g as $e}from"./accountMappingHelper-DbsU5f-I.js";import{D as Po}from"./DrawerScreen-B9VUPvG9.js";import"./recharts-Blc5CD1k.js";import"./analytics-dCAT-sHe.js";import"./plaid-BtUsVD04.js";import"./dnd-B97JkZHN.js";import"./stripe-DMRn4zHo.js";import"./lottie-DBJX4kzt.js";import"./lexical-qfgvtXN9.js";import"./pdf-btSs-oeP.js";import"./utils-C-s_aaYV.js";import"./decodeURIComponentSafe-n41T8k0p.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="6be45953-266d-4bb4-a216-56a61b2a2a20",t._sentryDebugIdIdentifier="sentry-dbid-6be45953-266d-4bb4-a216-56a61b2a2a20")}catch{}})();const wo=()=>{const{isAiCfoOpen:t,setIsAiCfoOpen:d}=zt(),U=se(),E=wt(),S=Ge(),u=F(g=>we(g)),{useFeatureGate:c}=Lt(),{isFeatureEnabled:B}=c(ge.isRealtimeInsightsFeatureEnabled),m=F(g=>g.expenseAutomationViewState.selectedPeriodByTenantId),o=F(g=>On(g,u.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:f}=qt({isAiCfoOpen:t,setIsAiCfoOpen:d,mobileExploreReferrer:"Month-End Close Overview"}),y=s.useCallback((g,T,_=!1)=>{U(Ce({tenantId:T,period:{month:g.month,year:g.year},refreshViewInBackground:_}))},[]),M=s.useCallback(g=>{const T=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(g.month,g.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),U(Fn(u.tenantId,g))},[u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),i=m[u.tenantId],h=s.useCallback(()=>{const g=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(i.month,i.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,g??null),y(i,u.tenantId,!0)},[y,i,u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),w=Q(S.state?.pathnameStackToGoBack,S.pathname),A=s.useCallback(()=>{if(o.monthEndCloseChecks!=null&&i!=null){const g=o.monthEndCloseChecks.monthEndCloseCheckList.find(T=>T.progress<100);if(g!=null)return void E(`./${g.id}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}});E(`./month_end_insights/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,i]),{areTenantIdsInSync:x}=$t();return Jt({isDataReady:o.fetchState==="Completed"}),s.useEffect(()=>{i!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&x&&y(i,u.tenantId)},[y,i,o.fetchState,u.tenantId,x]),s.useEffect(()=>{i!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&x&&U(Bn(i))},[i,o.monthClosePerformanceTrendFetchStatus.fetchState,x]),s.useEffect(()=>{const g=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&h()},3e5);return()=>clearInterval(g)},[o.fetchState]),s.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const g=S.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,g??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),p.jsx(xo,{children:p.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:B,onMonthEndCheckClick:g=>{E(`./${g}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:M,handleReviewButtonClick:A,onBackClick:()=>{E("../../dashboard")},onReload:h,isAiCfoAccessEnabled:v,onAskAiCfoClick:f})})},xo=De.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
5
5
  flex: 1 1 auto;
6
6
  flex-direction: column;
7
7
  background-color: ${t=>t.theme.colors.grey4};
8
- `,Ro=Pt.memo(({reconciliation:t,selectedDrawerAccountId:d,onClose:O,onFetchLinkTokenClick:E,onEstablishConnectionClick:S})=>{const u=se(),c=Oe.getSignedInUser(),B=F(n=>we(n)),m=t.excludedAccountIDs,o=s.useMemo(()=>({userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:B?.tenantId??""}),[c?.userId,c?.zeniSessionId,B?.tenantId]),{accountReconciliationsByAccountID:v,monthYearPeriod:f,statementUploadChosen:y}=t,V=v[d],i=V?.accountReconEntity.statementMetaData?.statementUploadId,h=(n,a)=>{u(Mn(n,a.split(".")[0]))},w=n=>{i!=null&&u(Vn({accountId:d,selectedPeriod:f,fileId:n,statementUploadId:i}))},A=()=>{u(Dt({statementUploadChosen:!1}))},x=n=>{u(_n({accountId:d,selectedPeriod:f,payload:n}))},g=n=>{u(Ot({accountId:d,selectedPeriod:f,localData:{accountSource:n}}))},T=s.useCallback(()=>{u(xt({accountId:d}))},[u,d]),_=s.useCallback(()=>{u(Rt({accountId:d}))},[u,d]),e=m.includes(d)?t.excludedAccountReconciliationByAccountID[d]:void 0;return V!=null?p.jsx(yt,{children:p.jsx(bt,{children:p.jsx(io,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:V,monthYearPeriod:f,onDismissClick:O,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:E,onEstablishConnectionClick:S,onEditFileName:h,onDeleteFile:w,onSelectSourceType:g,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:o,openFilePicker:y,onStatementUploadSuccess:x,onUploadWindowOpenedOnce:A,onExcludeFromReconciliation:T})})}):e!=null?p.jsx(yt,{children:p.jsx(bt,{children:p.jsx(lo,{excludedAccountReconciliation:e,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:_})})}):null}),yt=De.div`
8
+ `,Ro=Pt.memo(({reconciliation:t,selectedDrawerAccountId:d,onClose:U,onFetchLinkTokenClick:E,onEstablishConnectionClick:S})=>{const u=se(),c=Ue.getSignedInUser(),B=F(n=>we(n)),m=t.excludedAccountIDs,o=s.useMemo(()=>({userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:B?.tenantId??""}),[c?.userId,c?.zeniSessionId,B?.tenantId]),{accountReconciliationsByAccountID:v,monthYearPeriod:f,statementUploadChosen:y}=t,M=v[d],i=M?.accountReconEntity.statementMetaData?.statementUploadId,h=(n,a)=>{u(Vn(n,a.split(".")[0]))},w=n=>{i!=null&&u(Mn({accountId:d,selectedPeriod:f,fileId:n,statementUploadId:i}))},A=()=>{u(Dt({statementUploadChosen:!1}))},x=n=>{u(_n({accountId:d,selectedPeriod:f,payload:n}))},g=n=>{u(Ut({accountId:d,selectedPeriod:f,localData:{accountSource:n}}))},T=s.useCallback(()=>{u(xt({accountId:d}))},[u,d]),_=s.useCallback(()=>{u(Rt({accountId:d}))},[u,d]),e=m.includes(d)?t.excludedAccountReconciliationByAccountID[d]:void 0;return M!=null?p.jsx(yt,{children:p.jsx(bt,{children:p.jsx(io,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:M,monthYearPeriod:f,onDismissClick:U,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:E,onEstablishConnectionClick:S,onEditFileName:h,onDeleteFile:w,onSelectSourceType:g,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:o,openFilePicker:y,onStatementUploadSuccess:x,onUploadWindowOpenedOnce:A,onExcludeFromReconciliation:T})})}):e!=null?p.jsx(yt,{children:p.jsx(bt,{children:p.jsx(lo,{excludedAccountReconciliation:e,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:_})})}):null}),yt=De.div`
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  height: 100%;
@@ -18,8 +18,8 @@ import{j as p}from"./liveblocks-BfxEdLN6.js";import xn from"./NotFoundScreen-CnR
18
18
  min-width: 0;
19
19
  overflow-x: hidden;
20
20
  overflow-y: auto;
21
- `;function Do({companyId:t,closeCustomerRequestDrawer:d,addCustomerRequest:O,resetCustomerRequest:E}){const S=Oe.getSignedInUser();if(S==null)throw Error("Can't access Customer Request page without signing in...");const u=F(c=>jn(c,t,S));return s.useEffect(()=>{E()},[]),p.jsx(p.Fragment,{children:u.fetchState==="In-Progress"||u.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?p.jsx(Gt,{fetchState:"In-Progress"}):p.jsx(ro,{onCloseClick:d,addCustomerRequest:O,snippets:u.companyMonthEndReportTemplatesData,bulletPoints:u.zeniRequestsData??[]})})}const Oo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Uo,comma:At,space:Fo}},dateFormat:Nt}=uo.getLocalizedStrings(),Tt=so,Bo=Dn(function(t,d){const{uncategorizedAccounts:O,vendorSearchAutoCompleteData:E,monthEndInsightsCustomerRequestData:S,monthEndInsightsPreviewMode:u,companyId:c,isMissingReceiptsBulkUploadEnabled:B,isTransactionActivityEnabled:m}=d,o=Oe.getSignedInUser(),v=t.tenantState.currentTenantId,f={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:v??""},y=he(t),{selectedTransactionCategorizationTab:V}=y;return{expenseAutomationViewSelector:y,bulkUploadSelector:B===!0?y.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:E,authParams:f,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ho}/transaction_attachments`,bulkUploadEndpoint:B===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:V,monthEndInsightsCustomerRequestData:S,monthEndInsightsPreviewMode:u,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:o,uncategorizedAccounts:O,companyId:c,isTransactionActivityEnabled:m,isAccountingClassesEnabled:Jn(t)}},function(t,d){const{themeState:O,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:u,location:c,vendorSearchAutoCompleteData:B,expenseAutomationViewSelector:m,currentTenant:o,uncategorizedAccounts:v,navigate:f,onClickCustomerRequest:y,handleEditClick:V,setActivityLogTransactionId:i}=d,{selectedPeriod:h,currentSelectedView:w,reconciliation:{selectedAccountId:A}}=m,{accountSettingsView:x}=m.jeSchedules,g=_t(h),T=Re(g.start),_=Re(g.end);return{onZeniLogoClick:()=>{O.toggle()},onUploadReceiptAttachment:e=>{L.trackMissingReceiptAttached(h.month,h.year),t(Ba(e))},onUploadTransactionReceipt:(e,n,a,r,I,C)=>{t(St(e,n,{fetchState:"In-Progress"}));const k=()=>t(St(e,n,{fetchState:"Error"}));po(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,a,r,I).then(R=>{R!=null?t(Fa(e,R)):k()}).catch(k)},onMissingReceiptsRowClick:(e,n)=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,n);const a=Q(c.state?.pathnameStackToGoBack,c.pathname);f(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Ua(e,n)),o!=null&&t(Ce({tenantId:o.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,a,r)=>{t(Oa(e,{fetchState:n,error:a})),a!=null&&t(gt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:r!=null?Fo+Uo+r+At:At}]}))},onUpdateJESchedulesUIState:e=>{t(Da(e))},onUpdateMissingReceiptsUIState:e=>{t(Ra(e))},onFetchMissingReceiptsList:()=>{_!=null&&T!=null&&t(Mt({start:T,end:_},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(oo(e))},onBulkUploadProgress:e=>{t(ao(e))},onBulkUploadSuccess:e=>{t(no({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(to(e))},onConfirmBulkUploadMatch:(e,n,a,r,I)=>{t(eo(e,n,a,r,I))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Xa())},onSetBulkUploadResultsTab:e=>{t(Za(e))},onSetBulkUploadCompletedSubTab:e=>{t(Qa(e))},onSetBulkUploadSortConfig:(e,n)=>{t(kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Ha())},onSearchTransactionsForManualMatch:(e,n)=>{t(Tt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=m.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Tt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Wa(e,n))},onFetchBulkUploadBatches:e=>{t(jt(e))},onFetchMoreBatchDetails:()=>{t(Ka())},onResetBulkUploadSort:()=>{t(kt({sortKey:"date",sortOrder:"descending"}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(xa())},onSearchTextChanged:e=>{const n=m.currentSelectedView,a=m.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(ze({selectedTab:a,uiState:{searchString:e}})),_!=null&&T!=null&&t(pe(a,{start:T,end:_},!0,!1,e,void 0,!0)))},onRefresh:()=>{d.trackExpenseAutomationTabAnalytics(!0),t(wa(S))},onClose:()=>{w==="reconciliation"&&A!=null&&t(Ct({selectedAccountId:void 0})),f("../")},onBack:()=>{w==="reconciliation"&&A!=null&&t(Ct({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Pa(e))},onSaveReconciliationReview:e=>{t(Ta(e))},onUpdateStep:e=>{const{selectedPeriod:n}=m,a=Q(c.state?.pathnameStackToGoBack,c.pathname);f(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:a,referrer:m.currentSelectedView}}),t(Vt(e))},handleLogOutClick:()=>{const e=Q(c.state?.pathnameStackToGoBack,c.pathname);f("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:a,fixedAssetsAccount:r,accruedExpensesAccount:I}=n,C=$e(x.prepaidExpensesAccountList,a.selectedOptions),k=$e(x.fixedAssetsAccountList,r.selectedOptions),R=$e(x.accruedExpensesAccountList,I.selectedOptions),G={selectedPrepaidExpensesAccountIds:C.map(b=>b.accountId),selectedFixedAssetsAccountIds:k.map(b=>b.accountId),selectedAccruedExpensesAccountIds:R.map(b=>b.accountId)};t(Aa({data:G}))},onSaveJeAccountSettingsClick:()=>{t(ba())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:a,accumulatedDepreciationCategory:r,scheduleClass:I,scheduleExpenseCategory:C,vendor:k}=n,{allAccountList:R,allClassList:G,allDepreciationAccountList:b}=m.jeSchedules,q=B.entityAutoCompleteView.vendor.length>0?B.entityAutoCompleteView.vendor.find(j=>j.id===k?.selectedOption):void 0,W={id:q?.zeniId??k?.selectedOption??"",name:q?.name??k?.defaultOptions.find(j=>j.value===k?.selectedOption)?.label??"",logo:q?.logo},Ue=C?.selectedOption!=null?R.find(j=>j.qboId===C.selectedOption):void 0,Se=I?.selectedOption!=null?G.find(j=>j.classId===I.selectedOption):void 0,Ie=r?.selectedOption!=null?b.find(j=>j.qboId===r.selectedOption):void 0;t(ya({scheduledJournalEntryID:e,localData:{jeScheduleID:a,scheduledJournalEntryID:e,updatedCategoryId:Ue?.accountId,updatedClassId:Se?.classId,updatedAccumulatedDepreciationCategoryID:Ie?.accountId,updatedVendor:{id:W.id,name:W.name}}}))},ignoreRecommendedJeSchedule(e,n){t(va(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ut({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Ae("common"))},onCancelAutoComplete:()=>{t(Ae("common"))}},onPostJESchedule(e,n){t(Ea({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(ka())},handleJeScheduleClick:(e,n,a)=>{t(fa({selectedJEScheduleKey:n}));const r=Q(c.state?.pathnameStackToGoBack,c.pathname);f(`../../vendors/schedules/${a}/details/${e}`,{state:{pathnameStackToGoBack:r,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{o!=null&&t(Ia(e,o.companyId,o.tenantId))},onClickCustomerRequest:y,setActivityLogTransactionId:i,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Sa())},onOpenFileAttachmentSnackBar:()=>{t(gt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Ca(e))},onUpdateFileAttachment:e=>{t(ga({files:e}))},previewMonthEndReport:(e,n,a,r)=>{o!=null&&t(pt(e,o.companyId,n,!0,a,r,o.tenantId))},saveMonthEndReport:(e,n,a,r)=>{o!=null&&t(pt(e,o.companyId,n,!1,a,r,o.tenantId))},onEditMonthEndInsightsClick:V,sendMonthEndReport:e=>{const n=c.state?.referrer,{selectedPeriod:a,auditSummary:r}=m;o!=null&&r?.auditScorePercentage!=null&&(t(ha(o.companyId,e,o.tenantId)),L.trackInsightsEmailPage(a.month,a.year,!1,"draft",r.auditScorePercentage,pa().format(Nt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,n);const a=Q(c.state?.pathnameStackToGoBack,c.pathname);f(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,a,r,I,C,k,R,G,b,q)=>{t(ma(e,n,a,r,v,I,C,k,R,G,b,q))},onCancelAutoComplete:()=>{t(Ae("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(mt({scrollPosition:e}))},onUpdateTab:e=>{d.closeSidePanel?.(),_!=null&&T!=null&&(t(pe(e,{start:T,end:_},!1,!1)),t(ua(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n})),_!=null&&T!=null&&t(pe(e,{start:T,end:_},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,a,r,I,C,k)=>{_!=null&&T!=null&&t(pe(e,{start:T,end:_},!0,a,n,r,I,C,k))},resetTransactionCategorizationLocalData:(e,n,a,r,I,C,k,R)=>{t(da(e,n,a,r,R??null,I,C,!1,k))},updateSelectedVendorForTransaction:(e,n,a,r,I)=>{t(ht({selectedTab:e,transactionId:n,lineId:a,selectedTransaction:r,uncategorizedAccounts:v,updatedVendor:I}))},onSaveUpdateTransactionCategorization:(e,n,a)=>{const r=c.state?.referrer;e==="autoCategorized"?L.trackTransactionsAutoCategorisedPage(h.month,h.year,m.transactionView.totalCountByTab.autoCategorized,n.length,!1,r??null):L.trackTransactionsReviewPage(h.month,h.year,m.transactionView.totalCountByTab.review,n.length,!1,r??null),t(ra(e,n,a,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(la({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,a,r,I,C,k)=>{const{transactionId:R,transaction:G,lineIds:b}=n;C!=null&&t(ca({transactionId:R,customerUpdates:C})),t(ia({selectedTab:r,transactionId:R.id,lineId:b[0],selectedTransaction:G,uncategorizedAccounts:v,updatedCustomer:C,selectedEntity:I,isUncategorizedExpenseCategoryEnabled:k})),I!=null&&t(Je(I,e,n,a,!0,E,k))},onFetchRecommendationsForEntityCategorization:(e,n,a,r,I,C,k)=>{const{transactionId:R,transaction:G,lineIds:b}=n;C!=null&&(t(aa({transactionId:R,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(oa({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(ht({selectedTab:r,transactionId:R.id,lineId:b[0],selectedTransaction:G,uncategorizedAccounts:v,updatedVendor:C,selectedEntity:I,isUncategorizedExpenseCategoryEnabled:k})),I!=null&&t(Je(I,e,n,a,!0,E,k))):t(sa({selectedTab:r,transactionId:R.id,lineId:b[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Te(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Te(h,!0,!1,null,!1,!1))},markAsReview:(e,n,a,r)=>{L.trackFluxAnalysisReviewed(a.month,a.year,r??!1,e),t(na(n,e,a,r??!1))},onUpdateFluxAnalysisUIState:e=>{t(ta(e))},updateOperatingExpensesIdsForReview:e=>{t(ea({operatingExpenseIds:e,selectedPeriod:h}))},redirectToVendorDetailPage:e=>{if(d.tenantEmailDomain!=null){const n=To(e.id,e.qboId,d.tenantEmailDomain),a=Q(d.location.state?.pathnameStackToGoBack,d.location.pathname);d.navigate(n,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Xn({sectionId:e,selectedPeriod:h}))},onFetchReimbursementView:(e,n,a)=>{t(Te(e,!0,!1,n,!0,a))},onReviewClicked:e=>{t(ce(h,e))},setOpenDrawerClicked:e=>{t(xe({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Ut("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const a=o?.companyId;a!=null&&(t(Ft(e,a,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(Bt({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(xe({selectedDrawerAccountId:e})),t(Ot({accountId:e,selectedPeriod:h,localData:{accountSource:"bank_statement"}})),t(Dt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ce(h,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Zn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Qn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Hn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{d.closeSidePanel?.(),t(Wn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,a)=>{const r=e.vendor?.id;a&&r!=null&&t(Yn(r)),t(Kn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,qe("bill"));const n=Q(c.state?.pathnameStackToGoBack,c.pathname);f(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{f(-1)},onReconListPageScroll:e=>{t(mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ut({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ae("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Nn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(xt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Rt({accountId:e}))}}},(t,d,O)=>{const{isMissingReceiptsBulkUploadEnabled:E,...S}=O;return function(u,c,B){return{...u,...c,...B,onUploadTransactionReceipt:(m,o,v,f,y)=>{c.onUploadTransactionReceipt(m,o,v,f,y,u.authParams)}}}(t,d,S)})(mo),_o=bo(function(t){const d=t.displayName??t.name??"Component",O=Pt.memo(t),E=S=>{const u=se(),c=function(){const h=se(),w=F(A=>he(A).reconciliation.selectedDrawerAccountId);return{isOpen:w!=null,selectedAccountId:w,openPanel:s.useCallback(A=>{h(xe({selectedDrawerAccountId:A}))},[h]),closePanel:s.useCallback(()=>{h(xe({selectedDrawerAccountId:void 0}))},[h])}}(),B=F(h=>he(h).reconciliation),m=F(h=>we(h)),o=s.useCallback((h,w)=>{u(Ut("expense_automation_reconcile",h,w))},[u]),v=s.useCallback((h,w)=>{const A=m?.companyId;A!=null&&(u(Ft(h,A,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",w)),u(Bt({accountId:w,connectionInProgress:!0})))},[u,m?.companyId]),f=s.useMemo(()=>{if(c.isOpen&&c.selectedAccountId!=null)return p.jsx(Ro,{reconciliation:B,selectedDrawerAccountId:c.selectedAccountId,onClose:c.closePanel,onFetchLinkTokenClick:o,onEstablishConnectionClick:v})},[c.isOpen,c.selectedAccountId,c.closePanel,B,o,v]),y=s.useMemo(()=>({reconPanelContent:f,reconSidePanelIsOpen:c.isOpen,closeReconSidePanel:c.closePanel}),[f,c.isOpen,c.closePanel]),V=s.useContext(Et),i=s.useMemo(()=>c.isOpen?{closePanel:c.closePanel,selectedItemId:c.selectedAccountId}:V,[c.isOpen,c.closePanel,c.selectedAccountId,V]);return p.jsx(Et.Provider,{value:i,children:p.jsx(O,{...S,...y})})};return E.displayName=`withReconSidePanel(${d})`,E}(({closeSidePanel:t,openTransactionPanel:d,panelContent:O,sidePanelIsFullView:E,sidePanelIsOpen:S,reconPanelContent:u,reconSidePanelIsOpen:c,closeReconSidePanel:B})=>{const{isAiCfoOpen:m,setIsAiCfoOpen:o}=zt(),v=go(),{isOpen:f}=Co(),y=wt(),V=Ge(),i=se(),{isAiCfoAccessEnabled:h,onAskAiCfoClick:w}=qt({isAiCfoOpen:m,setIsAiCfoOpen:o,mobileExploreReferrer:"Transaction categorization"}),A=s.useCallback(()=>{S===!0&&E!==!0&&t?.()},[t,S,E]),{areTenantIdsInSync:x}=$t(),g=(()=>{const l=F(J=>he(J)),z=Ge(),{currentSelectedViewFetchState:K,currentSelectedView:M,selectedPeriod:U}=l,me=Le(M),ee=Le(K.fetchState),ve=s.useCallback(J=>{const H=z.state?.referrer;M==="transaction_categorization"&&(l.selectedTransactionCategorizationTab==="review"?L.trackTransactionsReviewPage(U.month,U.year,l.transactionView.totalCountByTab.review,0,J,H??null):L.trackTransactionsAutoCategorisedPage(U.month,U.year,l.transactionView.totalCountByTab.autoCategorized,0,J,H??null)),M==="missing_receipts"&&L.trackMissingReceiptsPage(U.month,U.year,J,l.missingReceipts.transactions.length,H??null),M==="je_schedules"&&L.trackMonthCloseScheduleListPage(U.month,U.year,J,l.jeSchedules.draftSchedules.length,l.jeSchedules.resolveSchedules.length,H??null),M==="flux_analysis"&&L.trackFluxAnalysisPage(U.month,U.year,J,Oo(l.fluxAnalysis),H??null),M==="month_end_insights"&&l.auditSummary?.auditScorePercentage!=null&&L.trackInsightsEmailPage(U.month,U.year,J,"draft",l.auditSummary.auditScorePercentage,null,H??null)},[U,l]);return s.useEffect(()=>{ee===K.fetchState&&M===me||K.fetchState!=="Completed"||ve(!1)},[M,K.fetchState,me]),ve})(),T=So(),[_,e]=s.useState(!1),n=F(l=>dt(l)),a=F(l=>we(l)),[r,I]=s.useState(!1),[C,k]=s.useState(!1),[R,G]=s.useState([]),[b,q]=s.useState(void 0),W=s.useCallback(l=>{l!=null&&(m&&o(!1),v(),A()),q(l)},[A,m,v,o]),Ue=s.useCallback(()=>{v(),q(void 0),A(),w()},[A,w,v]),Se=s.useRef(m);s.useEffect(()=>{m===!0&&Se.current===!1&&(v(),q(void 0),A()),Se.current=m},[A,m,v]);const Ie=s.useRef(f);s.useEffect(()=>{f===!0&&Ie.current===!1&&(m&&o(!1),q(void 0),S===!0&&E!==!0&&t?.()),Ie.current=f},[t,f,m,o,E,S]);const j=S===!0&&E!==!0,Ne=s.useRef(j);s.useEffect(()=>{j&&!Ne.current&&(m&&o(!1),v(),q(void 0)),Ne.current=j},[m,j,v,o]);const[Ye,Yt]=s.useState(!1),Ke=s.useRef(!1),{selectedTab:We}=rt(),{tenantEmailDomain:Kt}=rt(),[Fe,He]=s.useState(V.state?.message==="comingFromTransactionDetail"),Qe=V.state?.message==="comingFromOverview",Wt=Io(),Be=Oe.getSignedInUser(),{useDynamicConfig:Ht,useFeatureGate:fe}=Lt(),{configValue:Qt}=Ht(fo.enableUncategorizedExpenseCategory),Z=Qt?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Ze}=fe(ge.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:ie}=fe(ge.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=fe(ge.isTransactionActivityEnabled),{isFeatureEnabled:Zt}=fe(ge.isExpenseAutomationCommentingEnabled),Xt=s.useCallback(l=>{const z=qe(l.view==="reconciliation"?"bill":"expense");d?.(l.entityId,z)},[d]),en=F(l=>_a(l,"common")),$=F(l=>he(l)),{monthEndCloseChecksView:Y,currentSelectedView:P,selectedPeriod:D,selectedTransactionCategorizationTab:ne,currentSelectedViewBackgroundRefreshFetchState:tn,currentSelectedViewFetchState:X,jeSchedules:_e,reconciliation:nn}=$;s.useEffect(()=>{P==="transaction_categorization"&&S!==!0||W(void 0)},[P,W,S]);const ke=s.useRef(null);s.useEffect(()=>{ke.current!==null?ke.current!==ne&&(ke.current=ne,P==="transaction_categorization"&&W(void 0)):ke.current=ne},[P,ne,W]);const an=F(l=>b==null?void 0:Va(l.transactionState,b)),ae=an?.qboId,on=F(l=>ae==null?void 0:Ma(l,ae));s.useEffect(()=>{ae!=null&&i(ja(ae))},[i,ae]);const{selectedAccountId:le}=nn,et=Le(_e.accountSettingsView.saveState.fetchState),sn=F(l=>za(l.accountState,l.accountListState,"accountList")),re=We!=null?La(We):P,cn=F(l=>l.entityAutoCompleteState.autoCompleteText.common);if(Jt({isDataReady:X.fetchState==="Completed"}),Be==null)throw Error("Can't access expense automation screen without signing in...");const tt=_t(D),de=Re(tt.start),ue=Re(tt.end);if(de==null||ue==null)throw Error(`Invalid start - ${de} and end - ${ue} period from given ${D}`);const ln=s.useCallback(()=>{I(!1)},[]),rn=s.useCallback(()=>{k(!0)},[]),dn=s.useCallback(l=>{G(l),k(!1)},[]),un=s.useCallback(()=>{G([])},[]),Ee=$.missingReceipts.bulkUpload.phase,nt=$.missingReceipts.bulkUpload.currentBatchId;s.useEffect(()=>{ie===!0&&P==="missing_receipts"&&Ee==="matching"&&nt!=null&&i(jt({cacheOverride:!0}))},[ie,P,Ee,nt,i]);const at=Be?.userId,mn=D.month,hn=D.year,ot=a?.tenantId;s.useEffect(()=>{P==="missing_receipts"&&ie!==!1&&Ee==="idle"&&at!=null&&ot!=null&&i($a())},[P,ie,Ee,at,ot,mn,hn,i]),s.useEffect(()=>{n.newVendorState?.vendorDetailLocalData?.vendorName!=null?e(!0):e(!1)},[n.newVendorState?.vendorDetailLocalData?.vendorName]),s.useEffect(()=>{re!=null&&P!==re&&i(Vt(re))},[re]),s.useEffect(()=>{Ye!==!1||X.fetchState!=="Completed"&&X.fetchState!=="Error"||!x||(Yt(!0),i(It(!1,!1,Z)))},[Ye,X,x,Z]),s.useEffect(()=>{!Qe&&x&&(i(It(!1,!1,Z)),i(ce(D,le,!1,!1)))},[D.month,D.year,x,Z]);const st=s.useCallback((l=!1,z=!1)=>{const K={start:de,end:ue};switch(P){case"transaction_categorization":i(pe(ne,K,l,!Fe,void 0,void 0,z,void 0,Z)),He(!1);break;case"flux_analysis":i(Te(D,l,z,null));break;case"month_end_insights":if(z===!1){const M=new Date(D.year,D.month,0),U=qa(M.toDateString()).format(Nt.analytics.YYYYDashMMDashDDFormat);i(Ja(!0,a.companyId,a.tenantId,U)),i(Na(a.companyId,a.tenantId))}break;case"je_schedules":i(Ga(K,z));break;case"missing_receipts":i(Mt(K,{amount:75,currencyCode:"USD",currencySymbol:"$"},l,z));break;default:i(ce(D,le,l,z))}},[P,de,ue,a.companyId,a.tenantId,ne,D,le,Fe,He,Z]);s.useEffect(()=>{P===re&&X.fetchState==="Not-Started"&&x&&st(!0)},[X,de,ue,a.companyId,a.tenantId,x]),s.useEffect(()=>{Qe||Fe||Ke.current||tn.fetchState==="In-Progress"||X.fetchState!=="Completed"||(Ke.current=!0,st(!0,!0))},[]),s.useEffect(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState!=="Completed"&&i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!1}))},[Y.fetchState,a.tenantId]),s.useEffect(()=>{$.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?I(!0):I(!1)},[$.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),s.useEffect(()=>{$.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&x&&(i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!0})),i(Ya({companyId:a.companyId})),y("../"))},[$.monthEndInsights?.sendMonthEndReportStatus?.fetchState,a.tenantId,D,a.companyId,x]),s.useEffect(()=>{const l=setInterval(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState==="Completed"&&i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(l)},[Y.fetchState,a.tenantId,D,i]),s.useEffect(()=>{const l=setInterval(()=>{P==="reconciliation"&&le==null&&$.reconciliation.fetchStatus.fetchState==="Completed"&&$.reconciliation.refreshStatus.fetchState!=="In-Progress"&&i(ce(D,void 0,!0,!0))},3e5);return()=>clearInterval(l)},[P,i,$.reconciliation.fetchStatus.fetchState,$.reconciliation.refreshStatus.fetchState,ce,le,D]);const pn=vt();s.useEffect(()=>{const l=(Y.monthEndCloseChecks?.monthEndCloseCheckList.find(z=>z.id==="month_end_insights")?.isDisabled??!1)&&!Ze;P!=="month_end_insights"||!l&&Y.monthEndCloseChecks?.reportEmailSentDate==null||y("../")},[P,Y.monthEndCloseChecks]);const gn=c===!0?u:O,Cn=c===!0||S===!0,Sn=c===!0?B:t;s.useEffect(()=>{et==="In-Progress"&&_e.accountSettingsView.saveState.fetchState==="Completed"&&i(ft())},[et,_e.accountSettingsView.saveState.fetchState,ft]);const{transactionId:ct,onSaveVendor:In,onSaveSuccess:fn,onCancel:kn,vendorViewDetails:En}=(({expenseAutomationViewSelector:l,closeDrawerHandler:z,currentSelectedView:K})=>{const M=se();let U,me,ee;const ve=vt(),J=l.transactionView;let H=()=>{};const{transactions:vn,selectedTransactionId:oe,selectedTransactionLineId:ye,transactionLocalData:yn}=J;if(K==="transaction_categorization"){const Ve=yn.find(te=>te.transactionId===oe),N=vn.find(te=>te.id===oe),it=ye!=null?Ve?.transactionReviewLocalData?.lineItemById[ye]:void 0,lt=it?.account;me=it?.class?.classId,U=["Uncategorized Income","Uncategorized Expense"].includes(lt?.accountName??"")?void 0:lt?.accountId;const An=Ao(oe,N?.typeOfTransaction);N!=null&&An&&(ee={id:oe,type:qe(N.typeOfTransaction)}),H=()=>{if(oe!=null&&ye!=null&&N!=null){const te=J.transactionLocalData.find(be=>be.transactionId===oe)?.transactionReviewLocalData;if(te!=null&&N.lines!=null&&N.lines.length>0){const be=te.lineItemById[ye];let Me=te.selectedEntity;if(qn(N)||(Me=be.selectedEntityLine),Me!=null){const Tn=Me,Pn={transactionId:{id:N.id,type:N.type},transaction:N,lineIds:N.lines.map(wn=>wn.id)??[]};M(Je(Tn,be.amount.amount,Pn,!1,!0,ve))}}}}}const bn=F(Ve=>dt(Ve,void 0,U,me));return{transactionId:ee,onSaveVendor:()=>{M(Gn(ee,void 0,!1,!0))},onSaveSuccess:H,onCancel:()=>{ee!=null&&M(zn({transactionId:ee})),M(Ln()),M($n()),z()},vendorViewDetails:bn}})({expenseAutomationViewSelector:$,closeDrawerHandler:()=>{e(!1)},currentSelectedView:P});return Wt?.loggedInUserRoleMap==null?Y.fetchState==="Error"?p.jsx(ko,{onGoHome:()=>y("../",{replace:!0}),onReload:()=>window.location.reload()}):p.jsx(Gt,{fetchState:"In-Progress"}):p.jsxs(p.Fragment,{children:[p.jsx(Po,{isOpen:C,drawerLeftMargin:new Eo(0,0,300,650),onClose:()=>{k(!1)},children:p.jsx(Vo,{onClick:l=>l.stopPropagation(),children:p.jsx(Do,{companyId:a.companyId,closeCustomerRequestDrawer:()=>k(!1),addCustomerRequest:dn,resetCustomerRequest:un})})}),ct!=null&&_&&p.jsx(yo,{isOpen:_,transactionId:ct,onSaveVendor:In,onSaveSuccess:fn,onCancel:kn,vendorViewDetails:En}),p.jsx(Bo,{navigate:y,location:V,themeState:T,vendorSearchAutoCompleteData:{autoCompleteText:cn,entityAutoCompleteView:en},expenseAutomationViewSelector:$,isMissingReceiptsBulkUploadEnabled:ie,monthEndInsightsPreviewMode:r,monthEndInsightsCustomerRequestData:R,isRealtimeInsightsFeatureEnabled:Ze,isUncategorizedExpenseCategoryEnabled:Z,isCOTEnabled:pn,currentTenant:a,companyId:a.companyId,signedInUser:Be,isTransactionActivityEnabled:Xe,activityLogTransactionId:P==="transaction_categorization"?b:void 0,activityLogPanel:P==="transaction_categorization"&&Xe===!0&&b!=null?p.jsx(vo,{activityLogView:on,qboId:ae,onClose:()=>W(void 0),selectedTransactionId:b},String(b)):null,uncategorizedAccounts:sn,onClickCustomerRequest:rn,handleEditClick:ln,tenantEmailDomain:Kt,trackExpenseAutomationTabAnalytics:g,setActivityLogTransactionId:W,closeSidePanel:Sn,openTransactionPanel:d,sidePanelIsOpen:Cn,sidePanelIsFullView:c!==!0&&E,panelContent:gn,isAiCfoAccessEnabled:h,onAskAiCfoClick:Ue,isExpenseAutomationCommentingEnabled:Zt,onExpenseAutomationCommentingThreadClick:Xt,sidePanelListPercent:c===!0?66:void 0})]})})),Vo=De(Rn)`
21
+ `;function Do({companyId:t,closeCustomerRequestDrawer:d,addCustomerRequest:U,resetCustomerRequest:E}){const S=Ue.getSignedInUser();if(S==null)throw Error("Can't access Customer Request page without signing in...");const u=F(c=>jn(c,t,S));return s.useEffect(()=>{E()},[]),p.jsx(p.Fragment,{children:u.fetchState==="In-Progress"||u.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?p.jsx(Gt,{fetchState:"In-Progress"}):p.jsx(ro,{onCloseClick:d,addCustomerRequest:U,snippets:u.companyMonthEndReportTemplatesData,bulletPoints:u.zeniRequestsData??[]})})}const Uo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Oo,comma:At,space:Fo}},dateFormat:Nt}=uo.getLocalizedStrings(),Tt=so,Bo=Dn(function(t,d){const{uncategorizedAccounts:U,vendorSearchAutoCompleteData:E,monthEndInsightsCustomerRequestData:S,monthEndInsightsPreviewMode:u,companyId:c,isMissingReceiptsBulkUploadEnabled:B,isTransactionActivityEnabled:m}=d,o=Ue.getSignedInUser(),v=t.tenantState.currentTenantId,f={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:v??""},y=he(t),{selectedTransactionCategorizationTab:M}=y;return{expenseAutomationViewSelector:y,bulkUploadSelector:B===!0?y.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:E,authParams:f,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${ho}/transaction_attachments`,bulkUploadEndpoint:B===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:M,monthEndInsightsCustomerRequestData:S,monthEndInsightsPreviewMode:u,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:o,uncategorizedAccounts:U,companyId:c,isTransactionActivityEnabled:m,isAccountingClassesEnabled:Jn(t)}},function(t,d){const{themeState:U,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:u,location:c,vendorSearchAutoCompleteData:B,expenseAutomationViewSelector:m,currentTenant:o,uncategorizedAccounts:v,navigate:f,onClickCustomerRequest:y,handleEditClick:M,setActivityLogTransactionId:i}=d,{selectedPeriod:h,currentSelectedView:w,reconciliation:{selectedAccountId:A}}=m,{accountSettingsView:x}=m.jeSchedules,g=_t(h),T=Re(g.start),_=Re(g.end);return{onZeniLogoClick:()=>{U.toggle()},onUploadReceiptAttachment:e=>{L.trackMissingReceiptAttached(h.month,h.year),t(Ba(e))},onUploadTransactionReceipt:(e,n,a,r,I,C)=>{t(St(e,n,{fetchState:"In-Progress"}));const k=()=>t(St(e,n,{fetchState:"Error"}));po(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,a,r,I).then(R=>{R!=null?t(Fa(e,R)):k()}).catch(k)},onMissingReceiptsRowClick:(e,n)=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,n);const a=Q(c.state?.pathnameStackToGoBack,c.pathname);f(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Oa(e,n)),o!=null&&t(Ce({tenantId:o.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,a,r)=>{t(Ua(e,{fetchState:n,error:a})),a!=null&&t(gt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:r!=null?Fo+Oo+r+At:At}]}))},onUpdateJESchedulesUIState:e=>{t(Da(e))},onUpdateMissingReceiptsUIState:e=>{t(Ra(e))},onFetchMissingReceiptsList:()=>{_!=null&&T!=null&&t(Vt({start:T,end:_},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(oo(e))},onBulkUploadProgress:e=>{t(ao(e))},onBulkUploadSuccess:e=>{t(no({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(to(e))},onConfirmBulkUploadMatch:(e,n,a,r,I)=>{t(eo(e,n,a,r,I))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Xa())},onSetBulkUploadResultsTab:e=>{t(Za(e))},onSetBulkUploadCompletedSubTab:e=>{t(Qa(e))},onSetBulkUploadSortConfig:(e,n)=>{t(kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Ha())},onSearchTransactionsForManualMatch:(e,n)=>{t(Tt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=m.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Tt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Wa(e,n))},onFetchBulkUploadBatches:e=>{t(jt(e))},onFetchMoreBatchDetails:()=>{t(Ka())},onResetBulkUploadSort:()=>{t(kt({sortKey:"date",sortOrder:"descending"}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(xa())},onSearchTextChanged:e=>{const n=m.currentSelectedView,a=m.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(ze({selectedTab:a,uiState:{searchString:e}})),_!=null&&T!=null&&t(pe(a,{start:T,end:_},!0,!1,e,void 0,!0)))},onRefresh:()=>{d.trackExpenseAutomationTabAnalytics(!0),t(wa(S))},onClose:()=>{w==="reconciliation"&&A!=null&&t(Ct({selectedAccountId:void 0})),f("../")},onBack:()=>{w==="reconciliation"&&A!=null&&t(Ct({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Pa(e))},onSaveReconciliationReview:e=>{t(Ta(e))},onUpdateStep:e=>{const{selectedPeriod:n}=m,a=Q(c.state?.pathnameStackToGoBack,c.pathname);f(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:a,referrer:m.currentSelectedView}}),t(Mt(e))},handleLogOutClick:()=>{const e=Q(c.state?.pathnameStackToGoBack,c.pathname);f("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:a,fixedAssetsAccount:r,accruedExpensesAccount:I}=n,C=$e(x.prepaidExpensesAccountList,a.selectedOptions),k=$e(x.fixedAssetsAccountList,r.selectedOptions),R=$e(x.accruedExpensesAccountList,I.selectedOptions),G={selectedPrepaidExpensesAccountIds:C.map(b=>b.accountId),selectedFixedAssetsAccountIds:k.map(b=>b.accountId),selectedAccruedExpensesAccountIds:R.map(b=>b.accountId)};t(Aa({data:G}))},onSaveJeAccountSettingsClick:()=>{t(ba())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:a,accumulatedDepreciationCategory:r,scheduleClass:I,scheduleExpenseCategory:C,vendor:k}=n,{allAccountList:R,allClassList:G,allDepreciationAccountList:b}=m.jeSchedules,q=B.entityAutoCompleteView.vendor.length>0?B.entityAutoCompleteView.vendor.find(j=>j.id===k?.selectedOption):void 0,W={id:q?.zeniId??k?.selectedOption??"",name:q?.name??k?.defaultOptions.find(j=>j.value===k?.selectedOption)?.label??"",logo:q?.logo},Oe=C?.selectedOption!=null?R.find(j=>j.qboId===C.selectedOption):void 0,Se=I?.selectedOption!=null?G.find(j=>j.classId===I.selectedOption):void 0,Ie=r?.selectedOption!=null?b.find(j=>j.qboId===r.selectedOption):void 0;t(ya({scheduledJournalEntryID:e,localData:{jeScheduleID:a,scheduledJournalEntryID:e,updatedCategoryId:Oe?.accountId,updatedClassId:Se?.classId,updatedAccumulatedDepreciationCategoryID:Ie?.accountId,updatedVendor:{id:W.id,name:W.name}}}))},ignoreRecommendedJeSchedule(e,n){t(va(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(ut({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Ae("common"))},onCancelAutoComplete:()=>{t(Ae("common"))}},onPostJESchedule(e,n){t(Ea({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(ka())},handleJeScheduleClick:(e,n,a)=>{t(fa({selectedJEScheduleKey:n}));const r=Q(c.state?.pathnameStackToGoBack,c.pathname);f(`../../vendors/schedules/${a}/details/${e}`,{state:{pathnameStackToGoBack:r,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{o!=null&&t(Ia(e,o.companyId,o.tenantId))},onClickCustomerRequest:y,setActivityLogTransactionId:i,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Sa())},onOpenFileAttachmentSnackBar:()=>{t(gt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Ca(e))},onUpdateFileAttachment:e=>{t(ga({files:e}))},previewMonthEndReport:(e,n,a,r)=>{o!=null&&t(pt(e,o.companyId,n,!0,a,r,o.tenantId))},saveMonthEndReport:(e,n,a,r)=>{o!=null&&t(pt(e,o.companyId,n,!1,a,r,o.tenantId))},onEditMonthEndInsightsClick:M,sendMonthEndReport:e=>{const n=c.state?.referrer,{selectedPeriod:a,auditSummary:r}=m;o!=null&&r?.auditScorePercentage!=null&&(t(ha(o.companyId,e,o.tenantId)),L.trackInsightsEmailPage(a.month,a.year,!1,"draft",r.auditScorePercentage,pa().format(Nt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,n);const a=Q(c.state?.pathnameStackToGoBack,c.pathname);f(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,a,r,I,C,k,R,G,b,q)=>{t(ma(e,n,a,r,v,I,C,k,R,G,b,q))},onCancelAutoComplete:()=>{t(Ae("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(mt({scrollPosition:e}))},onUpdateTab:e=>{d.closeSidePanel?.(),_!=null&&T!=null&&(t(pe(e,{start:T,end:_},!1,!1)),t(ua(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n})),_!=null&&T!=null&&t(pe(e,{start:T,end:_},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,a,r,I,C,k)=>{_!=null&&T!=null&&t(pe(e,{start:T,end:_},!0,a,n,r,I,C,k))},resetTransactionCategorizationLocalData:(e,n,a,r,I,C,k,R)=>{t(da(e,n,a,r,R??null,I,C,!1,k))},updateSelectedVendorForTransaction:(e,n,a,r,I)=>{t(ht({selectedTab:e,transactionId:n,lineId:a,selectedTransaction:r,uncategorizedAccounts:v,updatedVendor:I}))},onSaveUpdateTransactionCategorization:(e,n,a)=>{const r=c.state?.referrer;e==="autoCategorized"?L.trackTransactionsAutoCategorisedPage(h.month,h.year,m.transactionView.totalCountByTab.autoCategorized,n.length,!1,r??null):L.trackTransactionsReviewPage(h.month,h.year,m.transactionView.totalCountByTab.review,n.length,!1,r??null),t(ra(e,n,a,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(la({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,a,r,I,C,k)=>{const{transactionId:R,transaction:G,lineIds:b}=n;C!=null&&t(ca({transactionId:R,customerUpdates:C})),t(ia({selectedTab:r,transactionId:R.id,lineId:b[0],selectedTransaction:G,uncategorizedAccounts:v,updatedCustomer:C,selectedEntity:I,isUncategorizedExpenseCategoryEnabled:k})),I!=null&&t(Je(I,e,n,a,!0,E,k))},onFetchRecommendationsForEntityCategorization:(e,n,a,r,I,C,k)=>{const{transactionId:R,transaction:G,lineIds:b}=n;C!=null&&(t(aa({transactionId:R,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(oa({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(ht({selectedTab:r,transactionId:R.id,lineId:b[0],selectedTransaction:G,uncategorizedAccounts:v,updatedVendor:C,selectedEntity:I,isUncategorizedExpenseCategoryEnabled:k})),I!=null&&t(Je(I,e,n,a,!0,E,k))):t(sa({selectedTab:r,transactionId:R.id,lineId:b[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Te(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Te(h,!0,!1,null,!1,!1))},markAsReview:(e,n,a,r)=>{L.trackFluxAnalysisReviewed(a.month,a.year,r??!1,e),t(na(n,e,a,r??!1))},onUpdateFluxAnalysisUIState:e=>{t(ta(e))},updateOperatingExpensesIdsForReview:e=>{t(ea({operatingExpenseIds:e,selectedPeriod:h}))},redirectToVendorDetailPage:e=>{if(d.tenantEmailDomain!=null){const n=To(e.id,e.qboId,d.tenantEmailDomain),a=Q(d.location.state?.pathnameStackToGoBack,d.location.pathname);d.navigate(n,{state:{pathnameStackToGoBack:a,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Xn({sectionId:e,selectedPeriod:h}))},onFetchReimbursementView:(e,n,a)=>{t(Te(e,!0,!1,n,!0,a))},onReviewClicked:e=>{t(ce(h,e))},setOpenDrawerClicked:e=>{t(xe({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Ot("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const a=o?.companyId;a!=null&&(t(Ft(e,a,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(Bt({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(xe({selectedDrawerAccountId:e})),t(Ut({accountId:e,selectedPeriod:h,localData:{accountSource:"bank_statement"}})),t(Dt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ce(h,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Zn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Qn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Hn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{d.closeSidePanel?.(),t(Wn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,a)=>{const r=e.vendor?.id;a&&r!=null&&t(Yn(r)),t(Kn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(d.openTransactionPanel)return void d.openTransactionPanel(e,qe("bill"));const n=Q(c.state?.pathnameStackToGoBack,c.pathname);f(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{f(-1)},onReconListPageScroll:e=>{t(mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ut({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Ae("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Nn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(xt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Rt({accountId:e}))}}},(t,d,U)=>{const{isMissingReceiptsBulkUploadEnabled:E,...S}=U;return function(u,c,B){return{...u,...c,...B,onUploadTransactionReceipt:(m,o,v,f,y)=>{c.onUploadTransactionReceipt(m,o,v,f,y,u.authParams)}}}(t,d,S)})(mo),_o=bo(function(t){const d=t.displayName??t.name??"Component",U=Pt.memo(t),E=S=>{const u=se(),c=function(){const h=se(),w=F(A=>he(A).reconciliation.selectedDrawerAccountId);return{isOpen:w!=null,selectedAccountId:w,openPanel:s.useCallback(A=>{h(xe({selectedDrawerAccountId:A}))},[h]),closePanel:s.useCallback(()=>{h(xe({selectedDrawerAccountId:void 0}))},[h])}}(),B=F(h=>he(h).reconciliation),m=F(h=>we(h)),o=s.useCallback((h,w)=>{u(Ot("expense_automation_reconcile",h,w))},[u]),v=s.useCallback((h,w)=>{const A=m?.companyId;A!=null&&(u(Ft(h,A,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",w)),u(Bt({accountId:w,connectionInProgress:!0})))},[u,m?.companyId]),f=s.useMemo(()=>{if(c.isOpen&&c.selectedAccountId!=null)return p.jsx(Ro,{reconciliation:B,selectedDrawerAccountId:c.selectedAccountId,onClose:c.closePanel,onFetchLinkTokenClick:o,onEstablishConnectionClick:v})},[c.isOpen,c.selectedAccountId,c.closePanel,B,o,v]),y=s.useMemo(()=>({reconPanelContent:f,reconSidePanelIsOpen:c.isOpen,closeReconSidePanel:c.closePanel}),[f,c.isOpen,c.closePanel]),M=s.useContext(Et),i=s.useMemo(()=>c.isOpen?{closePanel:c.closePanel,selectedItemId:c.selectedAccountId}:M,[c.isOpen,c.closePanel,c.selectedAccountId,M]);return p.jsx(Et.Provider,{value:i,children:p.jsx(U,{...S,...y})})};return E.displayName=`withReconSidePanel(${d})`,E}(({closeSidePanel:t,openTransactionPanel:d,panelContent:U,sidePanelIsFullView:E,sidePanelIsOpen:S,reconPanelContent:u,reconSidePanelIsOpen:c,closeReconSidePanel:B})=>{const{isAiCfoOpen:m,setIsAiCfoOpen:o}=zt(),v=go(),{isOpen:f}=Co(),y=wt(),M=Ge(),i=se(),{isAiCfoAccessEnabled:h,onAskAiCfoClick:w}=qt({isAiCfoOpen:m,setIsAiCfoOpen:o,mobileExploreReferrer:"Transaction categorization"}),A=s.useCallback(()=>{S===!0&&E!==!0&&t?.()},[t,S,E]),{areTenantIdsInSync:x}=$t(),g=(()=>{const l=F(J=>he(J)),z=Ge(),{currentSelectedViewFetchState:K,currentSelectedView:V,selectedPeriod:O}=l,me=Le(V),ee=Le(K.fetchState),ve=s.useCallback(J=>{const H=z.state?.referrer;V==="transaction_categorization"&&(l.selectedTransactionCategorizationTab==="review"?L.trackTransactionsReviewPage(O.month,O.year,l.transactionView.totalCountByTab.review,0,J,H??null):L.trackTransactionsAutoCategorisedPage(O.month,O.year,l.transactionView.totalCountByTab.autoCategorized,0,J,H??null)),V==="missing_receipts"&&L.trackMissingReceiptsPage(O.month,O.year,J,l.missingReceipts.transactions.length,H??null),V==="je_schedules"&&L.trackMonthCloseScheduleListPage(O.month,O.year,J,l.jeSchedules.draftSchedules.length,l.jeSchedules.resolveSchedules.length,H??null),V==="flux_analysis"&&L.trackFluxAnalysisPage(O.month,O.year,J,Uo(l.fluxAnalysis),H??null),V==="month_end_insights"&&l.auditSummary?.auditScorePercentage!=null&&L.trackInsightsEmailPage(O.month,O.year,J,"draft",l.auditSummary.auditScorePercentage,null,H??null)},[O,l]);return s.useEffect(()=>{ee===K.fetchState&&V===me||K.fetchState!=="Completed"||ve(!1)},[V,K.fetchState,me]),ve})(),T=So(),[_,e]=s.useState(!1),n=F(l=>dt(l)),a=F(l=>we(l)),[r,I]=s.useState(!1),[C,k]=s.useState(!1),[R,G]=s.useState([]),[b,q]=s.useState(void 0),W=s.useCallback(l=>{l!=null&&(m&&o(!1),v(),A()),q(l)},[A,m,v,o]),Oe=s.useCallback(()=>{v(),q(void 0),A(),w()},[A,w,v]),Se=s.useRef(m);s.useEffect(()=>{m===!0&&Se.current===!1&&(v(),q(void 0),A()),Se.current=m},[A,m,v]);const Ie=s.useRef(f);s.useEffect(()=>{f===!0&&Ie.current===!1&&(m&&o(!1),q(void 0),S===!0&&E!==!0&&t?.()),Ie.current=f},[t,f,m,o,E,S]);const j=S===!0&&E!==!0,Ne=s.useRef(j);s.useEffect(()=>{j&&!Ne.current&&(m&&o(!1),v(),q(void 0)),Ne.current=j},[m,j,v,o]);const[Ye,Yt]=s.useState(!1),Ke=s.useRef(!1),{selectedTab:We}=rt(),{tenantEmailDomain:Kt}=rt(),[Fe,He]=s.useState(M.state?.message==="comingFromTransactionDetail"),Qe=M.state?.message==="comingFromOverview",Wt=Io(),Be=Ue.getSignedInUser(),{useDynamicConfig:Ht,useFeatureGate:fe}=Lt(),{configValue:Qt}=Ht(fo.enableUncategorizedExpenseCategory),Z=Qt?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:Ze}=fe(ge.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:ie}=fe(ge.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=fe(ge.isTransactionActivityEnabled),{isFeatureEnabled:Zt}=fe(ge.isExpenseAutomationCommentingEnabled),Xt=s.useCallback(l=>{const z=qe(l.view==="reconciliation"?"bill":"expense");d?.(l.entityId,z)},[d]),en=F(l=>_a(l,"common")),$=F(l=>he(l)),{monthEndCloseChecksView:Y,currentSelectedView:P,selectedPeriod:D,selectedTransactionCategorizationTab:ne,currentSelectedViewBackgroundRefreshFetchState:tn,currentSelectedViewFetchState:X,jeSchedules:_e,reconciliation:nn}=$;s.useEffect(()=>{P==="transaction_categorization"&&S!==!0||W(void 0)},[P,W,S]);const ke=s.useRef(null);s.useEffect(()=>{ke.current!==null?ke.current!==ne&&(ke.current=ne,P==="transaction_categorization"&&W(void 0)):ke.current=ne},[P,ne,W]);const an=F(l=>b==null?void 0:Ma(l.transactionState,b)),ae=an?.qboId,on=F(l=>ae==null?void 0:Va(l,ae));s.useEffect(()=>{ae!=null&&i(ja(ae))},[i,ae]);const{selectedAccountId:le}=nn,et=Le(_e.accountSettingsView.saveState.fetchState),sn=F(l=>za(l.accountState,l.accountListState,"accountList")),re=We!=null?La(We):P,cn=F(l=>l.entityAutoCompleteState.autoCompleteText.common);if(Jt({isDataReady:X.fetchState==="Completed"}),Be==null)throw Error("Can't access expense automation screen without signing in...");const tt=_t(D),de=Re(tt.start),ue=Re(tt.end);if(de==null||ue==null)throw Error(`Invalid start - ${de} and end - ${ue} period from given ${D}`);const ln=s.useCallback(()=>{I(!1)},[]),rn=s.useCallback(()=>{k(!0)},[]),dn=s.useCallback(l=>{G(l),k(!1)},[]),un=s.useCallback(()=>{G([])},[]),Ee=$.missingReceipts.bulkUpload.phase,nt=$.missingReceipts.bulkUpload.currentBatchId;s.useEffect(()=>{ie===!0&&P==="missing_receipts"&&Ee==="matching"&&nt!=null&&i(jt({cacheOverride:!0}))},[ie,P,Ee,nt,i]);const at=Be?.userId,mn=D.month,hn=D.year,ot=a?.tenantId;s.useEffect(()=>{P==="missing_receipts"&&ie!==!1&&Ee==="idle"&&at!=null&&ot!=null&&i($a())},[P,ie,Ee,at,ot,mn,hn,i]),s.useEffect(()=>{n.newVendorState?.vendorDetailLocalData?.vendorName!=null?e(!0):e(!1)},[n.newVendorState?.vendorDetailLocalData?.vendorName]),s.useEffect(()=>{re!=null&&P!==re&&i(Mt(re))},[re]),s.useEffect(()=>{Ye!==!1||X.fetchState!=="Completed"&&X.fetchState!=="Error"||!x||(Yt(!0),i(It(!1,!1,Z)))},[Ye,X,x,Z]),s.useEffect(()=>{!Qe&&x&&(i(It(!1,!1,Z)),i(ce(D,le,!1,!1)))},[D.month,D.year,x,Z]);const st=s.useCallback((l=!1,z=!1)=>{const K={start:de,end:ue};switch(P){case"transaction_categorization":i(pe(ne,K,l,!Fe,void 0,void 0,z,void 0,Z)),He(!1);break;case"flux_analysis":i(Te(D,l,z,null));break;case"month_end_insights":if(z===!1){const V=new Date(D.year,D.month,0),O=qa(V.toDateString()).format(Nt.analytics.YYYYDashMMDashDDFormat);i(Ja(!0,a.companyId,a.tenantId,O)),i(Na(a.companyId,a.tenantId))}break;case"je_schedules":i(Ga(K,z));break;case"missing_receipts":i(Vt(K,{amount:75,currencyCode:"USD",currencySymbol:"$"},l,z));break;default:i(ce(D,le,l,z))}},[P,de,ue,a.companyId,a.tenantId,ne,D,le,Fe,He,Z]);s.useEffect(()=>{P===re&&X.fetchState==="Not-Started"&&x&&st(!0)},[X,de,ue,a.companyId,a.tenantId,x]),s.useEffect(()=>{Qe||Fe||Ke.current||tn.fetchState==="In-Progress"||X.fetchState!=="Completed"||(Ke.current=!0,st(!0,!0))},[]),s.useEffect(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState!=="Completed"&&i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!1}))},[Y.fetchState,a.tenantId]),s.useEffect(()=>{$.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?I(!0):I(!1)},[$.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),s.useEffect(()=>{$.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&x&&(i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!0})),i(Ya({companyId:a.companyId})),y("../"))},[$.monthEndInsights?.sendMonthEndReportStatus?.fetchState,a.tenantId,D,a.companyId,x]),s.useEffect(()=>{const l=setInterval(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState==="Completed"&&i(Ce({tenantId:a.tenantId,period:D,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(l)},[Y.fetchState,a.tenantId,D,i]),s.useEffect(()=>{const l=setInterval(()=>{P==="reconciliation"&&le==null&&$.reconciliation.fetchStatus.fetchState==="Completed"&&$.reconciliation.refreshStatus.fetchState!=="In-Progress"&&i(ce(D,void 0,!0,!0))},3e5);return()=>clearInterval(l)},[P,i,$.reconciliation.fetchStatus.fetchState,$.reconciliation.refreshStatus.fetchState,ce,le,D]);const pn=vt();s.useEffect(()=>{const l=(Y.monthEndCloseChecks?.monthEndCloseCheckList.find(z=>z.id==="month_end_insights")?.isDisabled??!1)&&!Ze;P!=="month_end_insights"||!l&&Y.monthEndCloseChecks?.reportEmailSentDate==null||y("../")},[P,Y.monthEndCloseChecks]);const gn=c===!0?u:U,Cn=c===!0||S===!0,Sn=c===!0?B:t;s.useEffect(()=>{et==="In-Progress"&&_e.accountSettingsView.saveState.fetchState==="Completed"&&i(ft())},[et,_e.accountSettingsView.saveState.fetchState,ft]);const{transactionId:ct,onSaveVendor:In,onSaveSuccess:fn,onCancel:kn,vendorViewDetails:En}=(({expenseAutomationViewSelector:l,closeDrawerHandler:z,currentSelectedView:K})=>{const V=se();let O,me,ee;const ve=vt(),J=l.transactionView;let H=()=>{};const{transactions:vn,selectedTransactionId:oe,selectedTransactionLineId:ye,transactionLocalData:yn}=J;if(K==="transaction_categorization"){const Me=yn.find(te=>te.transactionId===oe),N=vn.find(te=>te.id===oe),it=ye!=null?Me?.transactionReviewLocalData?.lineItemById[ye]:void 0,lt=it?.account;me=it?.class?.classId,O=["Uncategorized Income","Uncategorized Expense"].includes(lt?.accountName??"")?void 0:lt?.accountId;const An=Ao(oe,N?.typeOfTransaction);N!=null&&An&&(ee={id:oe,type:qe(N.typeOfTransaction)}),H=()=>{if(oe!=null&&ye!=null&&N!=null){const te=J.transactionLocalData.find(be=>be.transactionId===oe)?.transactionReviewLocalData;if(te!=null&&N.lines!=null&&N.lines.length>0){const be=te.lineItemById[ye];let Ve=te.selectedEntity;if(qn(N)||(Ve=be.selectedEntityLine),Ve!=null){const Tn=Ve,Pn={transactionId:{id:N.id,type:N.type},transaction:N,lineIds:N.lines.map(wn=>wn.id)??[]};V(Je(Tn,be.amount.amount,Pn,!1,!0,ve))}}}}}const bn=F(Me=>dt(Me,void 0,O,me));return{transactionId:ee,onSaveVendor:()=>{V(Gn(ee,void 0,!1,!0))},onSaveSuccess:H,onCancel:()=>{ee!=null&&V(zn({transactionId:ee})),V(Ln()),V($n()),z()},vendorViewDetails:bn}})({expenseAutomationViewSelector:$,closeDrawerHandler:()=>{e(!1)},currentSelectedView:P});return Wt?.loggedInUserRoleMap==null?Y.fetchState==="Error"?p.jsx(ko,{onGoHome:()=>y("../",{replace:!0}),onReload:()=>window.location.reload()}):p.jsx(Gt,{fetchState:"In-Progress"}):p.jsxs(p.Fragment,{children:[p.jsx(Po,{isOpen:C,drawerLeftMargin:new Eo(0,0,300,650),onClose:()=>{k(!1)},children:p.jsx(Mo,{onClick:l=>l.stopPropagation(),children:p.jsx(Do,{companyId:a.companyId,closeCustomerRequestDrawer:()=>k(!1),addCustomerRequest:dn,resetCustomerRequest:un})})}),ct!=null&&_&&p.jsx(yo,{isOpen:_,transactionId:ct,onSaveVendor:In,onSaveSuccess:fn,onCancel:kn,vendorViewDetails:En}),p.jsx(Bo,{navigate:y,location:M,themeState:T,vendorSearchAutoCompleteData:{autoCompleteText:cn,entityAutoCompleteView:en},expenseAutomationViewSelector:$,isMissingReceiptsBulkUploadEnabled:ie,monthEndInsightsPreviewMode:r,monthEndInsightsCustomerRequestData:R,isRealtimeInsightsFeatureEnabled:Ze,isUncategorizedExpenseCategoryEnabled:Z,isCOTEnabled:pn,currentTenant:a,companyId:a.companyId,signedInUser:Be,isTransactionActivityEnabled:Xe,activityLogTransactionId:P==="transaction_categorization"?b:void 0,activityLogPanel:P==="transaction_categorization"&&Xe===!0&&b!=null?p.jsx(vo,{activityLogView:on,qboId:ae,onClose:()=>W(void 0),selectedTransactionId:b},String(b)):null,uncategorizedAccounts:sn,onClickCustomerRequest:rn,handleEditClick:ln,tenantEmailDomain:Kt,trackExpenseAutomationTabAnalytics:g,setActivityLogTransactionId:W,closeSidePanel:Sn,openTransactionPanel:d,sidePanelIsOpen:Cn,sidePanelIsFullView:c!==!0&&E,panelContent:gn,isAiCfoAccessEnabled:h,onAskAiCfoClick:Oe,isExpenseAutomationCommentingEnabled:Zt,onExpenseAutomationCommentingThreadClick:Xt,sidePanelListPercent:c===!0?66:void 0})]})})),Mo=De(Rn)`
22
22
  display: flex;
23
23
  min-height: 100%;
24
24
  flex-direction: column;
25
- `;function ls(){return p.jsxs(On,{children:[p.jsx(je,{path:"*",element:p.jsx(wo,{})}),p.jsx(je,{path:"/:selectedTab/:selectedPeriod/*",element:p.jsx(_o,{})}),p.jsx(je,{path:"*",element:p.jsx(xn,{})})]})}export{ls as default};
25
+ `;function ls(){return p.jsxs(Un,{children:[p.jsx(je,{path:"*",element:p.jsx(wo,{})}),p.jsx(je,{path:"/:selectedTab/:selectedPeriod/*",element:p.jsx(_o,{})}),p.jsx(je,{path:"*",element:p.jsx(xn,{})})]})}export{ls as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-B5kNfPMX.js";import{a as r}from"./sentry-tUkEj5F1.js";import{W as l,X as p,Y as d,n as m}from"./index-DqjQxzff.js";import"./mui-CdWoU1P3.js";import u from"./NotFoundScreen-DHD7hd9-.js";import{j as c,u as b}from"./core-CFeBRNT2.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]="a42a7596-8f0e-4ef5-8302-84a8ea2ef7af",e._sentryDebugIdIdentifier="sentry-dbid-a42a7596-8f0e-4ef5-8302-84a8ea2ef7af")}catch{}})();const D=()=>{const e=c(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:d(o),onDemoClick:t,onGoBack:f}):s.jsx(u,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{D as F};
@@ -0,0 +1,72 @@
1
+ import{j as t}from"./liveblocks-B5kNfPMX.js";import{l as w,k as x,j as I,u as y,h as Z,q as ee,g as A,N as te,n as ae,o as p}from"./core-CFeBRNT2.js";import{Iy as S,Iz as k,IA as L,yU as $,yG as N,IB as C,IC as ne,ID as oe,yK as ie,eO as j,yR as se,yO as le}from"./zeni-epic-state-BDLHO2z4.js";import{q as g,o as r,m as re,e as v,j as E,x as de,n as ce,w as me,v as F,a as pe,p as ue,$ as he,y as xe,h as ge,B as be,C as fe,T as we,S as ye,Q as Se,E as ke,F as ve}from"./index-DqjQxzff.js";import{n as c}from"./mui-CdWoU1P3.js";import b from"./NotFoundScreen-DHD7hd9-.js";import{a as P}from"./sentry-tUkEj5F1.js";import"./recharts-Blc5CD1k.js";import"./analytics-dCAT-sHe.js";import"./plaid-BtUsVD04.js";import"./dnd-B97JkZHN.js";import"./stripe-DMRn4zHo.js";import"./lottie-DBJX4kzt.js";import"./lexical-qfgvtXN9.js";import"./pdf-btSs-oeP.js";import"./utils-C-s_aaYV.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]="8e66d30b-52c4-4b14-b28b-6e01e2801c6c",e._sentryDebugIdIdentifier="sentry-dbid-8e66d30b-52c4-4b14-b28b-6e01e2801c6c")}catch{}})();const je=c.div`
2
+ display: flex;
3
+ height: 100%;
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
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
+ `,Ie=x(function(e){const a=S(e),n=k(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:i=>{e(N(i))},onSaveHandler:i=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(o),e($(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(L({data:l}))}}})(re);function z(){const e=g(),{vendorId:a,billId:n}=w();return a==null||n==null?t.jsx(b,{}):t.jsx(t.Fragment,{children:t.jsx(je,{windowSize:e,children:t.jsx(Ie,{vendorId:a,billId:n})})})}const $e=c.div`
11
+ display: flex;
12
+ height: 100vh;
13
+ width: 100%;
14
+ flex: 1 1 auto;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ background-color: ${e=>e.theme.colors.grey4};
18
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
+ `,Ce=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:C(e),googleAPIKey:E.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,i=()=>{const l=ce(o.state?.pathnameStackToGoBack),s=l.poppedPathname??De();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Ae(l);e(ne({addressToCreate:s})),i()},onCancel:()=>{i()}}})(de);function Be({isSubPage:e}){const a=I(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx($e,{windowSize:o,children:t.jsx(Ce,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:E.googleMapsAPIKey})})})}const De=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Ae=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Pe=c.div`
20
+ display: flex;
21
+ height: 100%;
22
+ width: 100%;
23
+ flex: 1 1 auto;
24
+ flex-direction: column;
25
+ align-items: center;
26
+ background-color: ${e=>e.theme.colors.grey4};
27
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
+ `,ze=x(function(e){const a=S(e),n=k(e),o=C(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankName:s=>{e(N(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(L({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(me);function Le(){const e=I(),a=y(),n=g(),{vendorId:o,billId:i}=w();return o==null||i==null?t.jsx(b,{}):t.jsx(t.Fragment,{children:t.jsx(Pe,{windowSize:n,children:t.jsx(ze,{location:a,navigate:e,vendorId:o,billId:i})})})}const Ne=c.div`
29
+ display: flex;
30
+ height: 100%;
31
+ width: 100%;
32
+ flex: 1 1 auto;
33
+ flex-direction: column;
34
+ align-items: center;
35
+ background-color: ${e=>e.theme.colors.grey4};
36
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
+ `,Ee=x(function(e){const a=S(e),n=k(e),o=C(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankNameBySwift:s=>{e(ie(s))},onSaveHandler:s=>{v.trackBillPayMagicLinkSubmitBankAccountDetails(l),e($(s,"international",i,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(oe({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=F(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(he);function Fe(){const e=I(),a=y(),n=g(),{vendorId:o,billId:i}=w(),{useFeatureGate:l}=pe(),{isFeatureEnabled:s}=l(ue.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?t.jsx(b,{}):t.jsx(Ne,{windowSize:n,children:t.jsx(Ee,{location:a,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Te={containerWidth:new ke(100,58)},Ge=c(ye)`
38
+ width: ${r.sp4};
39
+ height: ${r.sp4};
40
+ margin-bottom: ${r.sp3};
41
+ margin-top: ${r.sp3};
42
+ margin-left: ${r.sp8};
43
+ cursor: pointer;
44
+ position: absolute;
45
+ color: ${e=>e.theme.colors.brandColorJade};
46
+ `,He=c.div`
47
+ display: flex;
48
+ height: 100vh;
49
+ flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
+ width: 100vw;
51
+ overflow-y: scroll;
52
+ background-color: ${e=>e.theme.colors.grey4};
53
+ `,Ke=c.div`
54
+ display: flex;
55
+ flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
+ flex-direction: column;
57
+ width: ${e=>`${Te.containerWidth.value(e.windowSize)}%`};
58
+ ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
+ padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
+ `,Me=c.div`
62
+ display: flex;
63
+ flex-direction: column;
64
+ align-items: center;
65
+ justify-content: center;
66
+ padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
67
+ height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
+ overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
+ width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
+ background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
+ margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
+ `,Ve=x(function(e,a){return{file:a.file,type:a.type}})(Se);function h({appContent:e}){const a=Z(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=w(),[s]=ee(),d=s.get("token"),T=n.pathname.includes("address"),f=g(),G=xe(),B=ge(),H=()=>{G.toggle()},K=A(u=>S(u)),M=A(u=>k(u)),{authParams:V,fetchState:m,billAttachment:U,billFetchState:D,companyName:W,currencySymbol:_,amount:O}=K,{tenantId:q,userId:J,sessionId:Q}=V,{fetchState:R,internationalBankAccountCreateStatus:X}=M;return P.useEffect(()=>{j(),m==="Not-Started"&&i!=null&&o!=null&&d!=null&&a(se(i,o,d))},[]),P.useEffect(()=>{m==="Completed"&&(j(J,Q,q),l!=null&&a(le(l)))},[m]),m==="Error"?t.jsx(b,{}):R==="Completed"||X.fetchState==="Completed"?(j(),t.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):m==="In-Progress"?t.jsx(be,{fetchState:m,style:{height:"100vh",backgroundColor:B.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${B.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[m==="Completed"&&D==="Completed"&&t.jsx(fe,{analytics:v,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",i??"",W,l??"",Ue(n.pathname),_,O))(u)}),t.jsxs(He,{windowSize:f,children:[f!=="small"?t.jsx(Ge,{onClick:H}):null,t.jsx(Me,{windowSize:f,isAddressPage:T,children:D==="In-Progress"?t.jsx(we,{size:"ExtraLarge",start:!0}):t.jsx(Ve,{file:U,type:"bill"})}),t.jsx(Ke,{windowSize:f,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function We(){return t.jsx(ve,{})}function lt(){return t.jsxs(ae,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(We,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(z,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(z,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(Be,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Le,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Fe,{})})}),t.jsx(p,{path:"*",element:t.jsx(b,{})})]})}export{lt as default};
@@ -0,0 +1,12 @@
1
+ import{j as u}from"./liveblocks-B5kNfPMX.js";import{a as g}from"./sentry-tUkEj5F1.js";import{h as O,u as _,j as w,q as M,g as l,N as T}from"./core-CFeBRNT2.js";import{z as r,h as P,D as V,f as A,e as N,g as q,s as H,T as R,i as W}from"./index-DqjQxzff.js";import{eN as $,Ij as B,It as G,Ik as J,eO as K,fi as Q,Ip as X,fH as Y,cS as Z,Iu as ee,Iv as te}from"./zeni-epic-state-BDLHO2z4.js";import{n as ne}from"./mui-CdWoU1P3.js";import{u as se}from"./useDeviceId-BbnEFhNU.js";import{f as ie}from"./analyticsHelper-cZJjlMLA.js";import{t as ae}from"./getLocaleForTenant-3enaSwsq.js";import"./recharts-Blc5CD1k.js";import"./analytics-dCAT-sHe.js";import"./plaid-BtUsVD04.js";import"./dnd-B97JkZHN.js";import"./stripe-DMRn4zHo.js";import"./lottie-DBJX4kzt.js";import"./lexical-qfgvtXN9.js";import"./pdf-btSs-oeP.js";import"./utils-C-s_aaYV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="0e951082-1f49-4983-a4b4-98e6c6297e9b",t._sentryDebugIdIdentifier="sentry-dbid-0e951082-1f49-4983-a4b4-98e6c6297e9b")}catch{}})();const C=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function Ce(){const t=O(),i=_(),m=w(),[b]=M(),n=b.get("token"),p=b.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:D,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),h=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>$(e)),k=l(e=>B(e)),E=r.getSignedInUser(),v=P().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&a!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(G(n,a,f)))},[n,p,t,a,f,s?.zeniSessionId]),g.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(k.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,s,o,k,v,i.state,t]);const j=g.useCallback(()=>{m("/signin/auth")},[m]),U=g.useCallback(()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))},[a,d,t,c]),F=g.useCallback(e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))},[a,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx(H,{phoneNumber:D,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:U,onVerifyOtp:F,onCancelVerifyDevice:j});if(S==="In-Progress"&&I==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=i.state?.origin??"/";return u.jsx(T,{to:e,state:{...i.state,origin:""}})}if(!C(n,p)||f==null||h==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ z-index: 9999;
11
+ background-color: ${t=>t.theme.colors.background};
12
+ `;export{Ce as default};
@@ -1 +1 @@
1
- import{j as U}from"./liveblocks-BfxEdLN6.js";import{a as c}from"./sentry-DHDSAAI5.js";import{h as pe,g as t,l as We,u as Xe,j as qe,i as M}from"./core--XU7-NnD.js";import{eN as he,eU as Je,eV as Se,eP as Ke,bn as Qe,f3 as ea,eW as aa,eX as ta,eZ as na,f1 as sa,fb as oa,f2 as g,f5 as ia,f6 as ue,f9 as ra,f7 as da,f8 as la,fa as ca,cH as ua,fd as fa,cN as ma,bv as ba,eM as pa,fi as ha,fj as Sa,fh as ga}from"./zeni-epic-state-DvI5349z.js";import{a1 as Ea,a2 as ka,x as Ca,a as ya,z as k,a3 as Ia,u as Ta,p as r,a4 as wa,a5 as Aa,A as Fa,c as _a,a6 as Da,U as va,a7 as $a,a8 as Ba,a9 as fe,aa as me,L as Ga,ab as xa,ac as be,e as R,v as A,ad as N,ae as Ma}from"./index-EvwkWm_D.js";import{D as Ra}from"./mui-9iwP9efG.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="b99f6693-dd96-466a-a415-a931a20c59f4",f._sentryDebugIdIdentifier="sentry-dbid-b99f6693-dd96-466a-a415-a931a20c59f4")}catch{}})();const Na=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:n}=We(),a=Xe(),C=Ca(),o=qe(),V=Ke(),m=pe(),{useFeatureGate:i}=ya(),P=k.getSignedInUser(),F=Qe(P),s=t(e=>he(e)),j=t(e=>ea(e)),L=j.uiState.currentChatSessionId,y=Ia(),{setLoading:ge}=Ta(),[_,O]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:H}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ee}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Y}=i(r.isDebitCardFeatureEnabled),ke=wa(s,Ee,Y),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),Z=t(e=>aa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=t(e=>ta(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(na(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=t(e=>e.tenantState),ye=t(e=>$.fetchState==="Completed"?sa(e):[]),E=t(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ie}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:X}=i(r.isExpenseAutomationEnabledV2),q=X||W&&F,{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:De}=i(r.isTreasuryEnabled),{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=F||!F&&ve,Be=s.company!=null&&oa(s.company),w=De&&Be,Ge=t(e=>g(e).totalUnreadCount),xe=t(e=>g(e).reducedFetchCountState),J=t(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=t(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Me=t(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=t(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:Q,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Re}=Aa();c.useEffect(()=>{const e=setTimeout(()=>Re?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(s?.companyId!=null&&Q!=null){const e=`dashboard_${s.companyId}`;O(Q.filter(u=>u.roomId===e&&u.readAt==null).length)}else O(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Me.fetchState==="Not-Started"&&V.tenantId!=null&&m(ia("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:_},"comments")))},[_,B.fetchState]);const Ne={fetchStatus:xe,count:Ge},ne=n!=null?k.getSignedInUserTenant(n):null,se=t(e=>ne?.tenantId!=null?ra(e,ne.tenantId):void 0),S=[];Ie===!1&&S.push("accounts_payable_aging"),Te===!1&&S.push("accounts_receivable_aging"),H===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),q===!1&&S.push("expense_automation_card");const Ue=Fa(),oe=t(e=>da(e,S,h,X,W,w).fetchState),ie=t(e=>la(e).fetchState),Ve=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Pe=c.useMemo(()=>ca(s.userRole),[s.userRole]),je=ua(Pe),Le=s?.rewardsLastViewedTime==null,Oe=h?.userEmail!=null&&Z.fetchState==="Completed"&&fa(Z.notificationSettings,h.userEmail,Y,s),re=_a(),ze=re&&Da(a),de=ma(Ue?.loggedInUserRoleMap),le=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(n??"")&&le===!1&&va(a.pathname)!=="treasury",[w,de,le,a.pathname,n]),[He,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const Ye=t(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Ze=$a(Ye);return U.jsx(Ra,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ba,{signedInUser:P,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?ye:se!=null?[se]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:me(a),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:je,isZeniAccountEnabled:H,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:Ze,isTreasuryPopupVisible:He,isNotificationsTabVisible:Oe,notificationCountDetails:Ne,isExpenseAutomationEnabledForUser:q&&ba(s.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&K>0?"notifications/comments":"notifications/tasks";me(a)&&(e=J===0&&K>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),e.type==="ai_cfo"){const p=A(a.state?.pathnameStackToGoBack,a.pathname);return R.trackAICFOChatScreenStateChanged("viewed","left_menu",L??null,null),void o(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${n}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=Ma(e.type);be(e.type)?(L!=null&&m(ga()),o(`/${n}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${n}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${n}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${n}/rewards`)},handleBackClick:()=>{o(`/${n}/dashboard`)},handleTenantSelect:e=>{ge(Ga.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":xa(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(n??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:ze,aiCfoView:j,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${n}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:Fe,newYearAnimationEnabled:_e})})}),za=f=>{const d=pe(),n=t(C=>he(C)),a={events:n.userRoleId!=null?[`private-${n.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Je(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Na,{...f,...a})};export{za as M};
1
+ import{j as U}from"./liveblocks-B5kNfPMX.js";import{a as c}from"./sentry-tUkEj5F1.js";import{h as pe,g as t,l as Ze,u as Xe,j as qe,i as M}from"./core-CFeBRNT2.js";import{eN as he,eU as Je,eV as Se,eP as Ke,bn as Qe,f3 as ea,eW as aa,eX as ta,eZ as na,f1 as sa,fb as oa,f2 as g,f5 as ia,f6 as ue,f9 as ra,f7 as da,f8 as la,fa as ca,cH as ua,fd as fa,cN as ma,bv as ba,eM as pa,fi as ha,fj as Sa,fh as ga}from"./zeni-epic-state-BDLHO2z4.js";import{a1 as Ea,a2 as ka,y as Ca,a as ya,z as k,a3 as Ia,u as Ta,p as r,a4 as wa,a5 as Aa,A as Fa,c as _a,a6 as Da,W as va,a7 as $a,a8 as Ba,a9 as fe,aa as me,L as Ga,ab as Pa,ac as be,e as R,v as A,ad as N,ae as Ma}from"./index-DqjQxzff.js";import{D as Ra}from"./mui-CdWoU1P3.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="ffc51a3b-efaa-44e4-a38d-1e5bb21e3038",f._sentryDebugIdIdentifier="sentry-dbid-ffc51a3b-efaa-44e4-a38d-1e5bb21e3038")}catch{}})();const Na=Ea(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:n}=Ze(),a=Xe(),C=Ca(),o=qe(),V=Ke(),m=pe(),{useFeatureGate:i}=ya(),x=k.getSignedInUser(),F=Qe(x),s=t(e=>he(e)),j=t(e=>ea(e)),L=j.uiState.currentChatSessionId,y=Ia(),{setLoading:ge}=Ta(),[_,O]=c.useState(void 0),D=M("/:tenantEmailDomain/dashboard")!==null,z=M("/:tenantEmailDomain/reports")!==null,I=M("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:H}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ee}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:W}=i(r.isDebitCardFeatureEnabled),ke=wa(s,Ee,W),{isFeatureEnabled:Ce}=i(r.isSettingsFeatureEnabled),Y=t(e=>aa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=t(e=>ta(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(na(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=t(e=>e.tenantState),ye=t(e=>$.fetchState==="Completed"?sa(e):[]),E=t(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ie}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Z}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:X}=i(r.isExpenseAutomationEnabledV2),q=X||Z&&F,{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:De}=i(r.isTreasuryEnabled),{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=F||!F&&ve,Be=s.company!=null&&oa(s.company),w=De&&Be,Ge=t(e=>g(e).totalUnreadCount),Pe=t(e=>g(e).reducedFetchCountState),J=t(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=t(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Me=t(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=t(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:Q,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Re}=Aa();c.useEffect(()=>{const e=setTimeout(()=>Re?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(s?.companyId!=null&&Q!=null){const e=`dashboard_${s.companyId}`;O(Q.filter(u=>u.roomId===e&&u.readAt==null).length)}else O(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Me.fetchState==="Not-Started"&&V.tenantId!=null&&m(ia("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{_!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:_},"comments")))},[_,B.fetchState]);const Ne={fetchStatus:Pe,count:Ge},ne=n!=null?k.getSignedInUserTenant(n):null,se=t(e=>ne?.tenantId!=null?ra(e,ne.tenantId):void 0),S=[];Ie===!1&&S.push("accounts_payable_aging"),Te===!1&&S.push("accounts_receivable_aging"),H===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),q===!1&&S.push("expense_automation_card");const Ue=Fa(),oe=t(e=>da(e,S,h,X,Z,w).fetchState),ie=t(e=>la(e).fetchState),Ve=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",xe=c.useMemo(()=>ca(s.userRole),[s.userRole]),je=ua(xe),Le=s?.rewardsLastViewedTime==null,Oe=h?.userEmail!=null&&Y.fetchState==="Completed"&&fa(Y.notificationSettings,h.userEmail,W,s),re=_a(),ze=re&&Da(a),de=ma(Ue?.loggedInUserRoleMap),le=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(n??"")&&le===!1&&va(a.pathname)!=="treasury",[w,de,le,a.pathname,n]),[He,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const We=t(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Ye=$a(We);return U.jsx(Ra,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Ba,{signedInUser:x,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?ye:se!=null?[se]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:me(a),isSettingsFeatureEnabled:Ce,isVendorsTabVisible:je,isZeniAccountEnabled:H,isChargeCardEnabled:ke,isTreasuryEnabled:w,treasuryYieldPercentage:Ye,isTreasuryPopupVisible:He,isNotificationsTabVisible:Oe,notificationCountDetails:Ne,isExpenseAutomationEnabledForUser:q&&ba(s.userRole)===!1,selectedMenu:fe(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Le,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&K>0?"notifications/comments":"notifications/tasks";me(a)&&(e=J===0&&K>0?"../../notifications/comments":"../../notifications/tasks");const u=A(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=A(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),e.type==="ai_cfo"){const p=A(a.state?.pathnameStackToGoBack,a.pathname);return R.trackAICFOChatScreenStateChanged("viewed","left_menu",L??null,null),void o(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=A(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${n}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Ma(e.type);be(e.type)?(L!=null&&m(ga()),o(`/${n}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${n}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${n}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${n}/rewards`)},handleBackClick:()=>{o(`/${n}/dashboard`)},handleTenantSelect:e=>{ge(Ga.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(a);let b=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Pa(l)?b+="settings/my_profile":be(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ha(e.tenantId)),m(Sa(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(n??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:ze,aiCfoView:j,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(pa({sessionId:e,agentId:"controller"})),o(`/${n}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:Fe,newYearAnimationEnabled:_e})})}),za=f=>{const d=pe(),n=t(C=>he(C)),a={events:n.userRoleId!=null?[`private-${n.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{ka(o)&&Je(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(Na,{...f,...a})};export{za as M};
@@ -0,0 +1 @@
1
+ import{j as e}from"./liveblocks-B5kNfPMX.js";import{j as r,k as i}from"./core-CFeBRNT2.js";import{V as n}from"./index-DqjQxzff.js";import"./mui-CdWoU1P3.js";import"./sentry-tUkEj5F1.js";import"./zeni-epic-state-BDLHO2z4.js";import"./recharts-Blc5CD1k.js";import"./analytics-dCAT-sHe.js";import"./plaid-BtUsVD04.js";import"./dnd-B97JkZHN.js";import"./stripe-DMRn4zHo.js";import"./lottie-DBJX4kzt.js";import"./lexical-qfgvtXN9.js";import"./pdf-btSs-oeP.js";import"./utils-C-s_aaYV.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="a6101124-68fb-49b2-8a98-0d630e11e347",o._sentryDebugIdIdentifier="sentry-dbid-a6101124-68fb-49b2-8a98-0d630e11e347")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
@@ -1 +1 @@
1
- import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-BfxEdLN6.js";import ut from"./NotFoundScreen-CnR6KoPB.js";import{a as k}from"./sentry-DHDSAAI5.js";import{j as ht,u as pt,l as kt,h as gt,g as S,k as St,n as bt,o as J}from"./core--XU7-NnD.js";import{cp as It,eW as K,eN as X,fa as Ct,f2 as b,OG as Q,f6 as d,eV as A,qr as M,vF as Tt,OH as At,eU as yt,fd as Et,qw as _t,OI as F,bq as $,gD as x,qA as H,OJ as Nt,cA as Bt,cu as wt}from"./zeni-epic-state-DvI5349z.js";import{J as xt,z as vt,a as Dt,p as Rt,I as Ut,cq as Gt,v as N,a1 as Pt,cr as Ft,a2 as $t,r as Mt}from"./index-EvwkWm_D.js";import"./mui-9iwP9efG.js";import{u as jt}from"./useAskAiCfoHostNavButtonProps-CJ_MQerV.js";import{c as Ot}from"./useFetchSuggestedQuestionsWhenReady-Io8u6IBf.js";import"./recharts-DclpYwCk.js";import"./analytics-Bd6seXWU.js";import"./plaid-Bf6E1gSx.js";import"./dnd-Ds-4dyB1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BS2cOh43.js";import"./lexical-DI-malFT.js";import"./pdf-8sT0OMy_.js";import"./utils-CrDImgSj.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="0ec9e262-8d11-4b7f-aec1-a26b4213c832",t._sentryDebugIdIdentifier="sentry-dbid-0ec9e262-8d11-4b7f-aec1-a26b4213c832")}catch{}})();const qt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),Vt=St(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=X(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&Et(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(H("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Bt(g)&&(r="not-found"),c[1].startsWith("bill")&&!wt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(A(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Q(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(H("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(A({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),qt(s,B).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(A({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Mt(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt(Ft)),Lt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:u}=kt(),{areTenantIdsInSync:g}=xt(),i=It(u??""),s=gt(),h=vt.getSignedInUser(),[B,v]=k.useState(!1),a=S(e=>K(e)),o=S(e=>X(e)),{useFeatureGate:m}=Dt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoOpen:r,setIsAiCfoOpen:I}=Ut(),{isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z}=jt({isAiCfoOpen:r,setIsAiCfoOpen:I,mobileExploreReferrer:"Notifications"});Ot({isDataReady:!0});const tt=Ct(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),O=S(e=>b(e).currentTab),D=S(e=>b(e).currentSubTab),et=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),R=S(e=>b(e).notificationDetailsByTab.comments.fetchState),at=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),ot=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),st=Gt().allUsers,{inboxNotifications:w,isLoading:y,hasFetchedAll:C,isFetchingMore:U,fetchMore:nt}=dt(),{threads:q,isLoading:V,fetchMore:L,isFetchingMore:W,hasFetchedAll:z}=lt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(O!==i&&i!=null&&s(Q(i)),i==null){const e=`../${O}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{et.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(y===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(A({unreadCount:p},"comments"))}},[y,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>nt?.(),0);return()=>clearTimeout(e)});const G=y||U===!0||C!==!0||y||U===!0||C!==!0;k.useEffect(()=>{G&&R!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||R!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,R]),k.useEffect(()=>{s(A({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(v(!0),s(Tt()))},[a.fetchState]),k.useEffect(()=>{if(y===!1&&V===!1&&w!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),ct=p.map(f=>{const P=q.find(mt=>mt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(W||z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(A({totalCount:E.length,unreadCount:T.length},"comments")),s(At(ct))}},[y,U,W,C,z,V,w?.length]);const it={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if($t(p)){const T=yt(p.mode);if(T==="dashboard"&&s(A({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];D==="all"?E.push("read","unread"):D!=="mentions"&&E.push(D),s(M("task_manager",T,E,!0))}}}},rt=ft();return _.jsx(Vt,{tenantEmailDomain:n,loggedInUserRoleMap:tt,signedInUser:h,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:st,markInboxNotificationAsRead:rt,allUnreadCommentsNotificationIds:ot,isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z,...it})};function me(){return _.jsxs(bt,{children:[_.jsx(J,{path:"/:selectedTab",element:_.jsx(Lt,{})}),_.jsx(J,{path:"*",element:_.jsx(ut,{})})]})}export{me as default};
1
+ import{l as dt,a as lt,m as ft,j as _}from"./liveblocks-B5kNfPMX.js";import ut from"./NotFoundScreen-DHD7hd9-.js";import{a as k}from"./sentry-tUkEj5F1.js";import{j as ht,u as pt,l as kt,h as gt,g as S,k as St,n as bt,o as L}from"./core-CFeBRNT2.js";import{cp as It,eW as K,eN as Q,fa as Ct,f2 as b,OG as X,f6 as d,eV as A,qr as $,vF as Tt,OH as At,eU as yt,fd as Et,qw as _t,OI as F,bq as M,gD as x,qA as H,OJ as Nt,cA as Bt,cu as wt}from"./zeni-epic-state-BDLHO2z4.js";import{M as xt,z as vt,a as Dt,p as Rt,K as Ut,cq as Gt,v as N,a1 as Pt,cr as Ft,a2 as Mt,n as $t}from"./index-DqjQxzff.js";import"./mui-CdWoU1P3.js";import{u as jt}from"./useAskAiCfoHostNavButtonProps-XVobODAU.js";import{c as Ot}from"./useFetchSuggestedQuestionsWhenReady-DoHZcRGr.js";import"./recharts-Blc5CD1k.js";import"./analytics-dCAT-sHe.js";import"./plaid-BtUsVD04.js";import"./dnd-B97JkZHN.js";import"./stripe-DMRn4zHo.js";import"./lottie-DBJX4kzt.js";import"./lexical-qfgvtXN9.js";import"./pdf-btSs-oeP.js";import"./utils-C-s_aaYV.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="d613af34-dcfb-45f2-996a-f9cae2e44333",t._sentryDebugIdIdentifier="sentry-dbid-d613af34-dcfb-45f2-996a-f9cae2e44333")}catch{}})();const qt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),Vt=St(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Q(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&Et(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(H("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(F([a],M())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Bt(g)&&(r="not-found"),c[1].startsWith("bill")&&!wt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(A(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(X(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t($("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(H("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(F([r],M())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(A({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),qt(s,B).then(()=>{t(F(s,M())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(A({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=$t(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Pt(Ft)),Wt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:u}=kt(),{areTenantIdsInSync:g}=xt(),i=It(u??""),s=gt(),h=vt.getSignedInUser(),[B,v]=k.useState(!1),a=S(e=>K(e)),o=S(e=>Q(e)),{useFeatureGate:m}=Dt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoOpen:r,setIsAiCfoOpen:I}=Ut(),{isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z}=jt({isAiCfoOpen:r,setIsAiCfoOpen:I,mobileExploreReferrer:"Notifications"});Ot({isDataReady:!0});const tt=Ct(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),O=S(e=>b(e).currentTab),D=S(e=>b(e).currentSubTab),et=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),R=S(e=>b(e).notificationDetailsByTab.comments.fetchState),at=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),ot=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),st=Gt().allUsers,{inboxNotifications:w,isLoading:y,hasFetchedAll:C,isFetchingMore:U,fetchMore:nt}=dt(),{threads:q,isLoading:V,fetchMore:W,isFetchingMore:z,hasFetchedAll:J}=lt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(O!==i&&i!=null&&s(X(i)),i==null){const e=`../${O}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{et.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(y===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(A({unreadCount:p},"comments"))}},[y,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s($("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>nt?.(),0);return()=>clearTimeout(e)});const G=y||U===!0||C!==!0||y||U===!0||C!==!0;k.useEffect(()=>{G&&R!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||R!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,R]),k.useEffect(()=>{s(A({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(v(!0),s(Tt()))},[a.fetchState]),k.useEffect(()=>{if(y===!1&&V===!1&&w!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),ct=p.map(f=>{const P=q.find(mt=>mt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(z||J===!0||W==null||W(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(A({totalCount:E.length,unreadCount:T.length},"comments")),s(At(ct))}},[y,U,z,C,J,V,w?.length]);const it={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Mt(p)){const T=yt(p.mode);if(T==="dashboard"&&s(A({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];D==="all"?E.push("read","unread"):D!=="mentions"&&E.push(D),s($("task_manager",T,E,!0))}}}},rt=ft();return _.jsx(Vt,{tenantEmailDomain:n,loggedInUserRoleMap:tt,signedInUser:h,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:st,markInboxNotificationAsRead:rt,allUnreadCommentsNotificationIds:ot,isAiCfoAccessEnabled:Y,onAskAiCfoClick:Z,...it})};function me(){return _.jsxs(bt,{children:[_.jsx(L,{path:"/:selectedTab",element:_.jsx(Wt,{})}),_.jsx(L,{path:"*",element:_.jsx(ut,{})})]})}export{me as default};
@@ -0,0 +1 @@
1
+ import{j as n}from"./liveblocks-B5kNfPMX.js";import{j as K,h as Z,u as H,l as Q,g as d,k as X,n as ee,o as C}from"./core-CFeBRNT2.js";import{eN as M,qf as v,pP as ae,J8 as $,pK as A,bv as te,bn as se,bR as oe,pL as re,J9 as ne,IV as T,dB as ie,tC as ce,Ja as le,tZ as de,eT as fe,eR as me}from"./zeni-epic-state-BDLHO2z4.js";import{K as pe,z as ue,M as he,A as ge,a as w,p as N,C as Fe,e as B,aj as be,v as Ie}from"./index-DqjQxzff.js";import"./mui-CdWoU1P3.js";import Ce from"./NotFoundScreen-DHD7hd9-.js";import{F as Te}from"./FeaturePreviewScreen-D9loXVU6.js";import{a as h}from"./sentry-tUkEj5F1.js";import{u as Ae}from"./useAskAiCfoHostNavButtonProps-XVobODAU.js";import{c as Se}from"./useFetchSuggestedQuestionsWhenReady-DoHZcRGr.js";import{u as ye}from"./useInitialThreadRequest-DcK2Ntoj.js";import{t as ke}from"./routePaths-DmlKjqFK.js";import{M as xe}from"./MobileAppDrawer-Ch_dkO8z.js";import"./recharts-Blc5CD1k.js";import"./analytics-dCAT-sHe.js";import"./plaid-BtUsVD04.js";import"./dnd-B97JkZHN.js";import"./stripe-DMRn4zHo.js";import"./lottie-DBJX4kzt.js";import"./lexical-qfgvtXN9.js";import"./pdf-btSs-oeP.js";import"./utils-C-s_aaYV.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="e4a8281f-106a-422a-b97d-051089bff0b0",s._sentryDebugIdIdentifier="sentry-dbid-e4a8281f-106a-422a-b97d-051089bff0b0")}catch{}})();const S=(s,a,e,o)=>{if(s!=a){const r=o??"";s!=null&&s.length>0?e(`../${a}${r}`,{replace:!0}):e(`${a}${r}`,{replace:!0})}},De=X(function(s){const a=ne(s),e={},o=a.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{e[r]=o[r]===!1}),{selectedTimeframe:a.selectedTimeframe,isForecastVsActualOn:a.isForecastVsActualOn,compareMode:a.compareMode,forecastList:a.forecastList,selectedForecast:a.selectedForecast,pandLreport:a.pandLReportWithForecast,scrollPosition:a.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:e,type:"name+balances_forecast",analytics:B}},function(s,a){return{onForecastSelectionChanged:(e,o)=>{s($(e,o)),a.isPandLReportFetched(e)||s(A(e)),S(a.forecastIdFromUrlPath,e,a.navigate)},onTimeframeChanged:e=>{s(de(e))},onForecastVsActualsCompareToggle:e=>{s(le(e)),s(T({forecastId:a.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:e=>{s(ce(a.firstMonthOfFY,e,0,[]))},onAccountBalanceClick:a.hasTransactionAccess!==!0?void 0:(e,o)=>{let r,i;const g=e.accountName===""?e.accountDescription:e.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=ie(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=ke(a.tenantEmailDomain,e.accountId,e.accountType,g,r,i),p=Ie(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(m,{state:{pathnameStackToGoBack:p,referrer:"Forecast"}})}},onNodeCollapseToggled:(e,o)=>{s(T({forecastId:a.forecastIdFromUrlPath,nodeCollapseState:{nodeId:e,isCollapsed:o===!1}}))},onTableScroll:e=>{s(T({forecastId:a.forecastIdFromUrlPath,scrollPosition:e}))},onBackClick:()=>{a.navigate("../../")}}})(be);function U(){const{isAiCfoOpen:s,setIsAiCfoOpen:a}=pe(),e=K(),o=Z(),r=H(),{forecastId:i,tenantEmailDomain:g}=Q(),[m,p]=h.useState(!1),[F,y]=h.useState(!1),u=ue.getSignedInUser(),k=d(t=>M(t)),q=k.company?.companyInfo.firstMonthOfFY??1,c=d(t=>v(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),D=d(t=>t.reportUIOptionsState.selectedForecast),j=t=>x.pandLByForecastID[t]!=null&&re(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=he();Se({isDataReady:l});const{isAiCfoAccessEnabled:G,onAskAiCfoClick:_}=Ae({isAiCfoOpen:s,setIsAiCfoOpen:a,mobileExploreReferrer:"Forecast"});h.useEffect(()=>{if(!m&&b)p(!0),l||o(ae());else if(l&&!F){y(!0);const t=((f,R,P)=>R!=null?f.forecasts.findIndex(I=>I.id===R):P!=null?f.forecasts.findIndex(I=>I.id===P):f.forecasts.length>0?0:-1)(c,i,D?.id);t===-1&&i!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(o($(c.forecasts[t].id,t)),S(i,c.forecasts[t].id,e,r.search)):i==null&&t!==-1&&S(void 0,c.forecasts[t].id,e,r.search),t!==-1&&!j(c.forecasts[t].id)&&b&&o(A(c.forecasts[t].id))}},[m,p,o,l,c,F,y,v,A,b]);const E=ge(),V=E?.loggedInUserRole!=null&&te(E.loggedInUserRole),{useFeatureGate:W}=w(),{isFeatureEnabled:L}=W(N.isReportsCommentingEnabled),Y=ye(L?k?.companyId:void 0,{clearParams:l&&F}),[J,z]=h.useState(!1),O=t=>{z(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:B,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(xe,{isAppContentDrawerOpen:J,handleDrawerToggle:O}),n.jsx(De,{firstMonthOfFY:q,tenantEmailDomain:g,forecastIdFromUrlPath:i,navigate:e,location:r,isPandLReportFetched:j,meetingUrl:oe(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${u?.firstName}&lastname=${u?.lastName}&email=${u?.userEmail}`),hasTransactionAccess:V,isAiCfoAccessEnabled:G,onAskAiCfoClick:_,isReportsCommentingEnabled:L,isZeniUser:se(u),initialOpenThreadRequest:Y,onClickMenuIcon:()=>{O(!0)}})]})}function Ze(){const s=d(i=>M(i)),{useFeatureGate:a}=w(),{isFeatureEnabled:e}=a(N.isDebitCardFeatureEnabled),o=fe(e,s),r=me(s);return o===!0||r===!0?n.jsx(Te,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ze as PandLWithForecastRoutes,Ze as default};
@@ -1,22 +1,22 @@
1
- import{j as s}from"./liveblocks-BfxEdLN6.js";import{J3 as oe,eN as q,jr as z,eT as Q,eR as ie,GE as Y,IH as re,sK as ke,J4 as X,sy as Pe,sT as je,sN as le,sC as de,sR as Te,sO as Le,J5 as ce,uo as ve,J6 as Fe,fx as Ae,J7 as H,sH as pe,sF as ue,sW as Oe,c0 as Re}from"./zeni-epic-state-DvI5349z.js";import{q as me,a as ee,p as E,z as W,a4 as ge,G as he,af as fe,ag as Ve,E as Ce,o as A,Z as be,D as ye,ah as Ue,J as Ze,I as Be,y as $e,e as Se,g as Ge,v as He,ai as Je,A as _e}from"./index-EvwkWm_D.js";import{D as we,n as K,S as De}from"./mui-9iwP9efG.js";import te from"./NotFoundScreen-CnR6KoPB.js";import{a as l}from"./sentry-DHDSAAI5.js";import{h as se,l as ze,g,j as We,u as Ke,k as Me,n as ne,o as G}from"./core--XU7-NnD.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-CJ_MQerV.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-Io8u6IBf.js";import{M as qe}from"./MobileAppDrawer-yjf5eOt5.js";import"./recharts-DclpYwCk.js";import"./analytics-Bd6seXWU.js";import"./plaid-Bf6E1gSx.js";import"./dnd-Ds-4dyB1.js";import"./stripe-DMRn4zHo.js";import"./lottie-BS2cOh43.js";import"./lexical-DI-malFT.js";import"./pdf-8sT0OMy_.js";import"./utils-CrDImgSj.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]="932321c1-d9bb-469b-8420-6d3cc47398c7",e._sentryDebugIdIdentifier="sentry-dbid-932321c1-d9bb-469b-8420-6d3cc47398c7")}catch{}})();const Qe={overlayWidth:new Ce(100,100,48)},J=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,S]=l.useState(!1),{userId:w}=ze(),c=g(t=>oe(t)),m=g(t=>q(t)),D=g(t=>z(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=Q(I,m),L=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(X()),y()},F=()=>{O===!0?S(!0):b()},Z=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:B}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=C(E.isChargeCardFeatureEnabled),p=ge(m,$,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:Z,mode:h,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:B===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(h==="zeni_only"?Pe(e):je(v))},onCloseClick:F,isLoading:x||c.person==null},r={onOkClick:()=>{S(!1),b()},onCancelClick:()=>{S(!1)}};return l.useEffect(()=>{x===!1&&w!=null&&u(ke(w))},[x,w]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:J.discardTitle}),descriptionComponent:s.jsx(Ee,{children:J.discardDescription}),primaryButtonText:J.discard,secondaryButtonText:J.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=K(De)`
1
+ import{j as s}from"./liveblocks-B5kNfPMX.js";import{J3 as oe,eN as q,jr as z,eT as Q,eR as ie,GE as Y,IH as re,sK as ke,J4 as X,sy as Pe,sT as je,sN as le,sC as de,sR as Te,sO as Le,J5 as ce,uo as ve,J6 as Fe,fx as Ae,J7 as H,sH as pe,sF as ue,sW as Oe,c0 as Re}from"./zeni-epic-state-BDLHO2z4.js";import{q as me,a as ee,p as E,z as W,a4 as ge,G as fe,af as he,ag as Ve,E as Ce,o as A,I as be,D as ye,ah as Ue,M as Be,K as Ze,C as $e,e as Se,g as Ge,v as He,ai as Ke,A as _e}from"./index-DqjQxzff.js";import{D as we,n as M,S as De}from"./mui-CdWoU1P3.js";import te from"./NotFoundScreen-DHD7hd9-.js";import{a as l}from"./sentry-tUkEj5F1.js";import{h as se,l as ze,g,j as We,u as Me,k as Je,n as ne,o as G}from"./core-CFeBRNT2.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-XVobODAU.js";import{c as Xe}from"./useFetchSuggestedQuestionsWhenReady-DoHZcRGr.js";import{M as qe}from"./MobileAppDrawer-Ch_dkO8z.js";import"./recharts-Blc5CD1k.js";import"./analytics-dCAT-sHe.js";import"./plaid-BtUsVD04.js";import"./dnd-B97JkZHN.js";import"./stripe-DMRn4zHo.js";import"./lottie-DBJX4kzt.js";import"./lexical-qfgvtXN9.js";import"./pdf-btSs-oeP.js";import"./utils-C-s_aaYV.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]="d697efb4-e0b0-4b64-8da0-f89fe6f557f9",e._sentryDebugIdIdentifier="sentry-dbid-d697efb4-e0b0-4b64-8da0-f89fe6f557f9")}catch{}})();const Qe={overlayWidth:new Ce(100,100,48)},K=ye.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),u=se(),[O,R]=l.useState(!1),[k,S]=l.useState(!1),{userId:w}=ze(),c=g(t=>oe(t)),m=g(t=>q(t)),D=g(t=>z(t)),{useFeatureGate:C}=ee(),{isFeatureEnabled:I}=C(E.isDebitCardFeatureEnabled),P=Q(I,m),L=ie(m),v=Y(m),V=re(m),U=!!m.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{u(X()),y()},F=()=>{O===!0?S(!0):b()},B=d.companyView?.controllers?.map(t=>t.user),{isFeatureEnabled:Z}=C(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=C(E.isChargeCardFeatureEnabled),p=ge(m,$,I),{isFeatureEnabled:j}=C(E.isTreasuryEnabled),T={peopleDetails:c,classList:o.classes,managersList:n.users,controllersList:B,mode:f,isZeniTenant:v,isAccountingClassesEnabled:D,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:t=>{u(de(t.userId,t.userRole.userRoleId))},onPeopleLocalDataUpdated:t=>{u(le({peopleLocalData:t})),R(!0)},onSaveClick:()=>{u(f==="zeni_only"?Pe(e):je(v))},onCloseClick:F,isLoading:x||c.person==null},r={onOkClick:()=>{S(!1),b()},onCancelClick:()=>{S(!1)}};return l.useEffect(()=>{x===!1&&w!=null&&u(ke(w))},[x,w]),l.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&b()},[c.updatePersonState.fetchState]),s.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(es,{onClick:t=>t.stopPropagation(),children:[k===!0?s.jsx(he,{titleComponent:s.jsx(xe,{children:K.discardTitle}),descriptionComponent:s.jsx(Ee,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:r,isEditPopup:!0}):null,s.jsx(Ve,{...T})]})})},es=M(De)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
5
- `,xe=K(be.H6Regular)`
5
+ `,xe=M(be.H6Regular)`
6
6
  margin-top: ${A.sp7};
7
7
  padding-left: ${A.sp8};
8
8
  padding-right: ${A.sp8};
9
9
  color: ${e=>e.theme.colors.primary};
10
10
  word-break: break-word;
11
- `,Ee=K(be.LargeRegularSp)`
11
+ `,Ee=M(be.LargeRegularSp)`
12
12
  color: ${e=>e.theme.colors.hero};
13
13
  padding-left: ${A.sp8};
14
14
  padding-right: ${A.sp8};
15
15
  margin-bottom: 30px;
16
16
  margin-top: ${A.sp4};
17
17
  white-space: pre-line;
18
- `,ss={overlayWidth:new Ce(100,100,48)},_=ye.getLocalizedStrings().peoplePage.invitePage,as=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const f=me(),u=se(),[O,R]=l.useState(!1),[k,S]=l.useState(!1),w=g(r=>oe(r)),c=g(r=>q(r)),m=g(r=>z(r)),{useFeatureGate:D}=ee(),{isFeatureEnabled:C}=D(E.isDebitCardFeatureEnabled),I=Q(C,c),P=ie(c),L=Y(c),v=re(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&m&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),u(X())},b=()=>{O===!0?S(!0):x()},F={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},Z=d.companyView?.controllers.map(r=>r.user),{isFeatureEnabled:B}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=D(E.isChargeCardFeatureEnabled),p=ge(c,$,C),{isFeatureEnabled:j}=D(E.isTreasuryEnabled),T={classList:o.classes,managersList:n.users,controllersList:Z,mode:h,isZeniTenant:L,onPeopleLocalDataUpdated:r=>{u(le({peopleLocalData:r})),R(!0)},onResetClick:x,onSaveClick:()=>{u(h==="zeni_only"?Te(e):Le())},onCloseClick:b,peopleDetails:w,isAccountingClassesEnabled:m,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:B===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return l.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(y(),u(X()))},[w.invitePersonState.fetchState]),s.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:ss.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ts,{onClick:r=>r.stopPropagation(),children:[k===!0?s.jsx(fe,{titleComponent:s.jsx(xe,{children:_.discardTitle}),descriptionComponent:s.jsx(Ee,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:F}):null,s.jsx(Ue,{...T})]})})},ts=K(De)`
18
+ `,ss={overlayWidth:new Ce(100,100,48)},_=ye.getLocalizedStrings().peoplePage.invitePage,as=({companyId:e,managersListView:n,companyPassportView:d,classListView:o,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:y})=>{const h=me(),u=se(),[O,R]=l.useState(!1),[k,S]=l.useState(!1),w=g(r=>oe(r)),c=g(r=>q(r)),m=g(r=>z(r)),{useFeatureGate:D}=ee(),{isFeatureEnabled:C}=D(E.isDebitCardFeatureEnabled),I=Q(C,c),P=ie(c),L=Y(c),v=re(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&m&&o.fetchState!=="Completed"||n.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),u(X())},b=()=>{O===!0?S(!0):x()},F={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},B=d.companyView?.controllers.map(r=>r.user),{isFeatureEnabled:Z}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:$}=D(E.isChargeCardFeatureEnabled),p=ge(c,$,C),{isFeatureEnabled:j}=D(E.isTreasuryEnabled),T={classList:o.classes,managersList:n.users,controllersList:B,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:r=>{u(le({peopleLocalData:r})),R(!0)},onResetClick:x,onSaveClick:()=>{u(f==="zeni_only"?Te(e):Le())},onCloseClick:b,peopleDetails:w,isAccountingClassesEnabled:m,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:Z===!1,isChargeCardDisabled:p===!1,isTreasuryDisabled:j===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:U};return l.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(y(),u(X()))},[w.invitePersonState.fetchState]),s.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:ss.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ts,{onClick:r=>r.stopPropagation(),children:[k===!0?s.jsx(he,{titleComponent:s.jsx(xe,{children:_.discardTitle}),descriptionComponent:s.jsx(Ee,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:F}):null,s.jsx(Ue,{...T})]})})},ts=M(De)`
19
19
  display: flex;
20
20
  min-height: 100%;
21
21
  flex-direction: column;
22
- `,ns=Me(function(e,n){const d=ce(e),o=W.getSignedInUser();return{data:d,loggedinUserId:o?.userId??"",isZeniTenant:n.isZeniTenant===!0,shouldFetchClasses:n.shouldFetchClasses,isZeniAdminUser:o?.userEmailDomain==="zeni.ai"&&n.isZeni===!0,isAccountingClassesEnabled:z(e),analytics:Se}},function(e,n){const{navigate:d,companyId:o,shouldFetchClasses:h}=n;return{personAction:{onPersonDelete:(i,y)=>{e(de(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(o,h))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}})(Je);function N({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:n}){const d=We(),o=se(),h=Ke(),{areTenantIdsInSync:i}=Ze(),y=W.getSignedInUser(),f=g(a=>q(a)),{useFeatureGate:u}=ee(),{isFeatureEnabled:O}=u(E.isDebitCardFeatureEnabled),R=g(a=>z(a)),k=!Q(O,f)&&R,S=Y(f),w=f?.tenantId,{tenantEmailDomain:c}=f,[m,D]=l.useState(!1),[C,I]=l.useState(!1),[P,L]=l.useState(!1),[v,V]=l.useState("off"),[U,x]=l.useState(!1),b=a=>{x(a)},{isAiCfoOpen:F,setIsAiCfoOpen:Z}=Be(),{isAiCfoAccessEnabled:B,onAskAiCfoClick:$}=Ne({isAiCfoOpen:F,setIsAiCfoOpen:Z,mobileExploreReferrer:"People"}),p=g(a=>ce(a));Xe({isDataReady:p.fetchState==="Completed"});const j=g(a=>ve(a.classState,a.classListState)),T=g(a=>Fe(a.userState,a.userRoleState,a.userListViewState,"manager")),r=g(a=>Ae(a)),t=f?.companyId;l.useEffect(()=>{m&&v===p.uiState.mode||!i||(o(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),D(!0),o(pe()))},[m,y,w,o,p.uiState.mode,i]),l.useEffect(()=>{t!=null&&i&&o(ue(t,k))},[t,k,i]),l.useEffect(()=>{I(e!=null&&e===!0),L(n!=null&&n===!0&&n)},[e,n]),l.useEffect(()=>{o(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const ae=()=>{I(!1),L(!1),d("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx($e,{analytics:Se,onLoad:a=>a.trackPageLoaded(Ge.Event.members)}):null,C===!0?s.jsx(as,{closeDrawerHandler:ae,isInvitePeopleDrawerOpen:C,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:ae,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,s.jsx(qe,{isAppContentDrawerOpen:U,handleDrawerToggle:b}),s.jsx(ns,{navigate:d,signedInUser:y,isZeni:f.isZeni,isZeniTenant:S,peopleUIState:p.uiState,companyId:t,shouldFetchClasses:k,classList:j,managersView:T,peopleView:p,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(a,M)=>{o(H({sortKey:a,sortOrder:M}))},onRowClick:a=>{const M=`/${c}/people/${encodeURIComponent(a)}/edit`,Ie=He(h.state?.pathnameStackToGoBack,h.pathname);d(M,{state:{pathnameStackToGoBack:Ie}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:$})]})}function Es(){const e=_e();return Re(e?.loggedInUserRole??[])?s.jsxs(ne,{children:[s.jsx(G,{path:"/",element:s.jsx(N,{})}),s.jsx(G,{path:"new",element:s.jsx(N,{isInvitePeopleDrawerOpen:!0})}),s.jsx(G,{path:":userId/edit",element:s.jsx(N,{isEditPeopleDrawerOpen:!0})}),s.jsx(G,{path:"*",element:s.jsx(te,{})})]}):s.jsx(ne,{children:s.jsx(G,{path:"*",element:s.jsx(te,{})})})}export{Es as default};
22
+ `,ns=Je(function(e,n){const d=ce(e),o=W.getSignedInUser();return{data:d,loggedinUserId:o?.userId??"",isZeniTenant:n.isZeniTenant===!0,shouldFetchClasses:n.shouldFetchClasses,isZeniAdminUser:o?.userEmailDomain==="zeni.ai"&&n.isZeni===!0,isAccountingClassesEnabled:z(e),analytics:Se}},function(e,n){const{navigate:d,companyId:o,shouldFetchClasses:f}=n;return{personAction:{onPersonDelete:(i,y)=>{e(de(i,y))},onResendInvite:i=>{e(Oe(i))},onReloadPeople:()=>{e(pe()),e(ue(o,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}})(Ke);function N({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:n}){const d=We(),o=se(),f=Me(),{areTenantIdsInSync:i}=Be(),y=W.getSignedInUser(),h=g(a=>q(a)),{useFeatureGate:u}=ee(),{isFeatureEnabled:O}=u(E.isDebitCardFeatureEnabled),R=g(a=>z(a)),k=!Q(O,h)&&R,S=Y(h),w=h?.tenantId,{tenantEmailDomain:c}=h,[m,D]=l.useState(!1),[C,I]=l.useState(!1),[P,L]=l.useState(!1),[v,V]=l.useState("off"),[U,x]=l.useState(!1),b=a=>{x(a)},{isAiCfoOpen:F,setIsAiCfoOpen:B}=Ze(),{isAiCfoAccessEnabled:Z,onAskAiCfoClick:$}=Ne({isAiCfoOpen:F,setIsAiCfoOpen:B,mobileExploreReferrer:"People"}),p=g(a=>ce(a));Xe({isDataReady:p.fetchState==="Completed"});const j=g(a=>ve(a.classState,a.classListState)),T=g(a=>Fe(a.userState,a.userRoleState,a.userListViewState,"manager")),r=g(a=>Ae(a)),t=h?.companyId;l.useEffect(()=>{m&&v===p.uiState.mode||!i||(o(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),D(!0),o(pe()))},[m,y,w,o,p.uiState.mode,i]),l.useEffect(()=>{t!=null&&i&&o(ue(t,k))},[t,k,i]),l.useEffect(()=>{I(e!=null&&e===!0),L(n!=null&&n===!0&&n)},[e,n]),l.useEffect(()=>{o(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const ae=()=>{I(!1),L(!1),d("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx($e,{analytics:Se,onLoad:a=>a.trackPageLoaded(Ge.Event.members)}):null,C===!0?s.jsx(as,{closeDrawerHandler:ae,isInvitePeopleDrawerOpen:C,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:ae,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:r,classListView:j,companyId:t,mode:p.uiState.mode}):null,s.jsx(qe,{isAppContentDrawerOpen:U,handleDrawerToggle:b}),s.jsx(ns,{navigate:d,signedInUser:y,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:p.uiState,companyId:t,shouldFetchClasses:k,classList:j,managersView:T,peopleView:p,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(a,J)=>{o(H({sortKey:a,sortOrder:J}))},onRowClick:a=>{const J=`/${c}/people/${encodeURIComponent(a)}/edit`,Ie=He(f.state?.pathnameStackToGoBack,f.pathname);d(J,{state:{pathnameStackToGoBack:Ie}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:Z,onAskAiCfoClick:$})]})}function Es(){const e=_e();return Re(e?.loggedInUserRole??[])?s.jsxs(ne,{children:[s.jsx(G,{path:"/",element:s.jsx(N,{})}),s.jsx(G,{path:"new",element:s.jsx(N,{isInvitePeopleDrawerOpen:!0})}),s.jsx(G,{path:":userId/edit",element:s.jsx(N,{isEditPeopleDrawerOpen:!0})}),s.jsx(G,{path:"*",element:s.jsx(te,{})})]}):s.jsx(ne,{children:s.jsx(G,{path:"*",element:s.jsx(te,{})})})}export{Es as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-B5kNfPMX.js";import _ from"./NotFoundScreen-DHD7hd9-.js";import{a as o}from"./sentry-tUkEj5F1.js";import{j as v,u as M,g,l as U,h as P,N as z,k as K,n as N,o as h}from"./core-CFeBRNT2.js";import{eN as V,OK as b,bo as B,bn as F,h7 as H,gD as $}from"./zeni-epic-state-BDLHO2z4.js";import{y as q,z as I,K as G,cs as J}from"./index-DqjQxzff.js";import"./mui-CdWoU1P3.js";import{u as L}from"./useAskAiCfoHostNavButtonProps-XVobODAU.js";import{c as Q}from"./useFetchSuggestedQuestionsWhenReady-DoHZcRGr.js";import{M as W}from"./MobileAppDrawer-Ch_dkO8z.js";import"./recharts-Blc5CD1k.js";import"./analytics-dCAT-sHe.js";import"./plaid-BtUsVD04.js";import"./dnd-B97JkZHN.js";import"./stripe-DMRn4zHo.js";import"./lottie-DBJX4kzt.js";import"./lexical-qfgvtXN9.js";import"./pdf-btSs-oeP.js";import"./utils-C-s_aaYV.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]="9c83ccca-40cf-4ce9-afe5-d18147a1ca9f",e._sentryDebugIdIdentifier="sentry-dbid-9c83ccca-40cf-4ce9-afe5-d18147a1ca9f")}catch{}})();const X=K(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:r,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(J),Y=()=>{const e=v(),t=M(),c=q(),r=g(a=>V(a)),{aggregatedReportViewState:n}=g(a=>b(a)),{tenantEmailDomain:m}=U(),p=P(),d=I.getSignedInUser();if(d==null)throw new Error("Can't access this page without signing in...");const f=o.useRef(!1),[C,S]=o.useState(!1),k=B(r?.userRole??[]),w=r?.userRole?.includes("bookkeeping_admin")??!1,D=F(d),y=k||w||D,l=o.useCallback((a,i,O)=>{p(H({fromMonth:a,toMonth:i,cacheOverride:O}))},[]);o.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(p($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const A=o.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||l(a,i,!0),f.current=!0},[n?.fetchState,l]),x=o.useCallback((a,i)=>{l(a,i,!1)},[l]),u=a=>{S(a)},{isAiCfoOpen:j,setIsAiCfoOpen:R}=G(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:E}=L({isAiCfoOpen:j,setIsAiCfoOpen:R,mobileExploreReferrer:"Performance"});return Q({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(W,{isAppContentDrawerOpen:C,handleDrawerToggle:u}),s.jsx(X,{navigate:e,location:t,themeState:c,currentTenant:r,signedInUser:d,tenantEmailDomain:m,onReload:A,onTimeRangeSelect:x,handleDrawerToggle:u,isAiCfoAccessEnabled:T,onAskAiCfoClick:E})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function Ie(){return s.jsxs(N,{children:[s.jsx(h,{path:"*",element:s.jsx(Y,{})}),s.jsx(h,{path:"*",element:s.jsx(_,{})})]})}export{Ie as default};
@@ -1 +1 @@
1
- import{a as h,b as t}from"./sentry-DHDSAAI5.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
1
+ import{a as h,b as t}from"./sentry-tUkEj5F1.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};