@zeniai/web-app-ui 5.0.91-dev → 5.0.92-delhi

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 (119) hide show
  1. package/dist/assets/AddressRoutes-CE6qbSGk.js +1 -0
  2. package/dist/assets/AddressScreen-DkNGrVnB.js +9 -0
  3. package/dist/assets/{AiCfoScreen-oHaKO3YZ.js → AiCfoScreen-CBgoj8T3.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes--JiwbSlw.js → BillPayApprovalRoutes-C1lNadBd.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-iu-y_0bY.js → BillPayRoutes-XB7I7eUG.js} +28 -28
  6. package/dist/assets/{BusinessVerificationPageScreen-BZ6pMYtD.js → BusinessVerificationPageScreen--jb-_NEK.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-B8BvvLNn.js → ChargeCardRoutes-DOEHpyTj.js} +9 -9
  8. package/dist/assets/{CompanyPassportScreen-Crt0Wguw.js → CompanyPassportScreen-D7ikOuXi.js} +1 -1
  9. package/dist/assets/ConnectionAuthScreen-DwfBvaYz.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-CBQd1E02.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-C-eOXGDS.js → CustomerOnboardingRoutes-BWaOo9Cx.js} +4 -4
  12. package/dist/assets/{DashboardRoutes-TSlOHhjs.js → DashboardRoutes-dcyTNBEG.js} +3 -3
  13. package/dist/assets/{DefaultTenantHome-C_6PZH2v.js → DefaultTenantHome-Dhg7vrEu.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-Dgz3xvTR.js → DomesticWireDetailScreen-CWJhFUWD.js} +3 -3
  15. package/dist/assets/{DrawerScreen-DA7W7_FJ.js → DrawerScreen-si6Z3FY7.js} +1 -1
  16. package/dist/assets/EntityDetailRoutes-BWGTBran.js +1 -0
  17. package/dist/assets/ExpenseAutomationRoutes-Dx7-sEdk.js +25 -0
  18. package/dist/assets/{FeaturePreviewScreen-ZZAPjaff.js → FeaturePreviewScreen-RHOSmVgb.js} +1 -1
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-DOC4BX5c.js → HubSpotOAuthCallbackScreen-DX72NDGu.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-DvIXgxg3.js → MagicLinkRoutes-DhknIQ1P.js} +8 -8
  21. package/dist/assets/MagicLinkSignInScreen-Csd_nalm.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-3z1V-CUc.js → MobileAppDrawer-L1vMrpyU.js} +1 -1
  23. package/dist/assets/NotFoundScreen-DNyI2qP0.js +1 -0
  24. package/dist/assets/{NotificationRoutes-Bo0zZ1Kt.js → NotificationRoutes-BebZvEZ8.js} +1 -1
  25. package/dist/assets/{OAuthConsentScreen-Dbc4UpDH.js → OAuthConsentScreen-yciwdWjI.js} +1 -1
  26. package/dist/assets/PandLWithForecastRoutes-BUDeznHk.js +1 -0
  27. package/dist/assets/{PeopleRoutes-B92Pa5DO.js → PeopleRoutes-DRqZK4c2.js} +9 -9
  28. package/dist/assets/PerformanceRoutes-Cw2gpkuZ.js +1 -0
  29. package/dist/assets/{Preview-CHoySpAn.js → Preview-BcfL_4SY.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-BVyeqZrM.js → QBOConnectionScreen-Diwd8goY.js} +1 -1
  31. package/dist/assets/{ReferralListScreen-Dos23hEe.js → ReferralListScreen-FRlmT8bW.js} +2 -2
  32. package/dist/assets/{ReimbursementApprovalRoutes-DHAddbeN.js → ReimbursementApprovalRoutes-hbP66Q4T.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DBa6iD2W.js → ReimbursementApprovalRuleDetailScreen-r2EHynjx.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-BmvzogVc.js → ReimbursementRoutes-CJ0Iu1Bq.js} +4 -4
  35. package/dist/assets/{ReportsRoutes-BxWR6xqe.js → ReportsRoutes-Cmgp5c3c.js} +1 -1
  36. package/dist/assets/RewardsRoutes-CoU5gCUm.js +1 -0
  37. package/dist/assets/ScreenRoutes-jHX_ty3K.js +2 -0
  38. package/dist/assets/{SettingsRoutes-jK4Q3qxF.js → SettingsRoutes-Bc8cfpu9.js} +3 -3
  39. package/dist/assets/{SetupPagesScreen-BqUpkFrc.js → SetupPagesScreen-_y1NMEC2.js} +5 -5
  40. package/dist/assets/SignInScreen-CynYCo01.js +1 -0
  41. package/dist/assets/SignOutScreen-Ce_OJMih.js +9 -0
  42. package/dist/assets/{TaskListScreen-BKqqal1w.js → TaskListScreen-BCZoyA5m.js} +2 -2
  43. package/dist/assets/{TaskRoutes-_u7Wmqyu.js → TaskRoutes-CY23LK4j.js} +1 -1
  44. package/dist/assets/{TransactionDetailRoutes-Cw9Uc-n0.js → TransactionDetailRoutes-CK2GDeKW.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-DIVwpSfj.js → TransactionDetailScreen-Cx-HHzFa.js} +2 -2
  46. package/dist/assets/TransactionListRoutes-BE9BuMAQ.js +1 -0
  47. package/dist/assets/{TreasuryRoutes-Ch-gY5t9.js → TreasuryRoutes-Bd287a7a.js} +5 -5
  48. package/dist/assets/{VendorsRoutes-Bx7Q80V-.js → VendorsRoutes-BrpUXe7d.js} +19 -19
  49. package/dist/assets/WiseConfirmationScreen-BOCW2491.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-OuhMj1ig.js → ZeniAccountRoutes-C8WqQUrk.js} +11 -11
  51. package/dist/assets/{ZeniAccountStatementScreen-Brn3KW0y.js → ZeniAccountStatementScreen-HdIES2jY.js} +1 -1
  52. package/dist/assets/{accountMappingHelper-DZZWkdNS.js → accountMappingHelper-DWvcSK1C.js} +1 -1
  53. package/dist/assets/{analytics-BpTmj6-G.js → analytics-DYzLSwIZ.js} +1 -1
  54. package/dist/assets/{analyticsHelper-B0HqRRKS.js → analyticsHelper-DXH2vTTa.js} +1 -1
  55. package/dist/assets/{core-lbYY5woS.js → core-BeBBWfga.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-Bt7TpCfB.js → decodeURIComponentSafe-OtMMCMcE.js} +1 -1
  57. package/dist/assets/{dnd-BBkXCQMv.js → dnd-UF85x-t5.js} +1 -1
  58. package/dist/assets/{empty-BXlVh-7L.js → empty-BWGTDoK6.js} +1 -1
  59. package/dist/assets/{empty-DuvQh38L.js → empty-BaCT02t1.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-DsiEcnQV.js → emptyVideoElement-BnRvKEhd.js} +1 -1
  61. package/dist/assets/epic-n0VtNHE8.js +2 -0
  62. package/dist/assets/getLocaleForTenant-BM3MG3N6.js +1 -0
  63. package/dist/assets/{index-D5mVmx24.js → index-BHdC4ErN.js} +1 -1
  64. package/dist/assets/{index-CmU3R7ot.js → index-BXVcb2Xp.js} +2 -2
  65. package/dist/assets/{index-YSIKqInC.js → index-CjNRshif.js} +1 -1
  66. package/dist/assets/{index-BnCtlDzJ.js → index-CvWmMArW.js} +1 -1
  67. package/dist/assets/{index-DBlyACY-.js → index-DS8xe4Yw.js} +1 -1
  68. package/dist/assets/{index-CsttCRun.js → index-MRloqTru.js} +12214 -12214
  69. package/dist/assets/{index-9bPjdOkz.js → index-_ohVjyws.js} +1 -1
  70. package/dist/assets/{index-wZ-HUxAq.js → index-u46W4WpS.js} +1 -1
  71. package/dist/assets/{lexical-BoKYrzBU.js → lexical-C_ylRY16.js} +1 -1
  72. package/dist/assets/{liveblocks-BEuWW_o5.js → liveblocks-BNlilBXq.js} +1 -1
  73. package/dist/assets/{lottie-DW3oQVJC.js → lottie-DbxhFPB1.js} +1 -1
  74. package/dist/assets/{mui-hUAh7HgW.js → mui-CnlqDSRv.js} +1 -1
  75. package/dist/assets/{pathToGoBack-BTgB24PY.js → pathToGoBack-CHG8tIif.js} +1 -1
  76. package/dist/assets/{pdf-D4eIZozg.js → pdf-Dp2xnkno.js} +4 -4
  77. package/dist/assets/{pdf-lib-CQ6bcQhi.js → pdf-lib-BEgmFXIU.js} +1 -1
  78. package/dist/assets/{plaid-DtmQg7la.js → plaid-CBNEU__p.js} +1 -1
  79. package/dist/assets/{pusher-BH0WSonH.js → pusher-C2HLHaTd.js} +1 -1
  80. package/dist/assets/{react-FJ8t_fEG.js → react-7oI-YZOA.js} +1 -1
  81. package/dist/assets/{react-uiz0Bf7s.js → react-CVgRRIOa.js} +1 -1
  82. package/dist/assets/{react-I3T6BtSv.js → react-PfdOvJhF.js} +1 -1
  83. package/dist/assets/{react-u3t1vzKM.js → react-QblHkUSH.js} +1 -1
  84. package/dist/assets/{react-DPfcpAvs.js → react-V6AXUc49.js} +1 -1
  85. package/dist/assets/{react-DHaugbA3.js → react-vkffk7Xs.js} +1 -1
  86. package/dist/assets/{recharts-aApoEySM.js → recharts-C5E4pGR4.js} +1 -1
  87. package/dist/assets/{routePaths-AncZCFgJ.js → routePaths-Dmzz0h9N.js} +1 -1
  88. package/dist/assets/{sentry-DsHW_1mX.js → sentry-CH2pQ4tM.js} +1 -1
  89. package/dist/assets/{url-CPbSl3Sf.js → url-BcTKj4a2.js} +1 -1
  90. package/dist/assets/{url-rO4wjCNo.js → url-CBu622rf.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BOZLDiKO.js → useAiCfoDashboardSuggestedQuestionsChips-CNrlO2ie.js} +1 -1
  92. package/dist/assets/useAskAiCfoHostNavButtonProps-DVBsWNa4.js +1 -0
  93. package/dist/assets/{useDeviceId-CUIt81hA.js → useDeviceId-W860NCQ9.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-Ce_TAmYW.js → useInitialThreadRequest-DA9qj7yj.js} +1 -1
  95. package/dist/assets/{utils-AZPawxk4.js → utils-C2zbYn9G.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-C9nI8iAG.js → withTransactionSidePanel-B7h02ghb.js} +2 -2
  97. package/dist/assets/zeni-epic-state-5fEaVO5b.js +13 -0
  98. package/dist/index.html +1 -1
  99. package/package.json +4 -3
  100. package/dist/assets/AddressRoutes-CfEBmv0d.js +0 -1
  101. package/dist/assets/AddressScreen-Dic8fdZj.js +0 -9
  102. package/dist/assets/ConnectionAuthScreen-CMvgcToC.js +0 -11
  103. package/dist/assets/CustomerOnboardingAuthScreen-BWu3bg8J.js +0 -1
  104. package/dist/assets/EntityDetailRoutes-BC2rYBUq.js +0 -1
  105. package/dist/assets/ExpenseAutomationRoutes-BLnzE6sM.js +0 -25
  106. package/dist/assets/MagicLinkSignInScreen-Do3HpkUK.js +0 -12
  107. package/dist/assets/NotFoundScreen-CcPbqGwL.js +0 -1
  108. package/dist/assets/PandLWithForecastRoutes-CK7phZDt.js +0 -1
  109. package/dist/assets/PerformanceRoutes-zwUtk6Fa.js +0 -1
  110. package/dist/assets/RewardsRoutes-DfxqaoUk.js +0 -1
  111. package/dist/assets/ScreenRoutes-CJd27YIj.js +0 -2
  112. package/dist/assets/SignInScreen-DMKJW3-3.js +0 -1
  113. package/dist/assets/SignOutScreen-DcxoE-cS.js +0 -9
  114. package/dist/assets/TransactionListRoutes-DdeRCYAU.js +0 -1
  115. package/dist/assets/WiseConfirmationScreen-DRuEprOC.js +0 -12
  116. package/dist/assets/epic-CqNfoxZY.js +0 -2
  117. package/dist/assets/getLocaleForTenant-BJg8tROe.js +0 -1
  118. package/dist/assets/useAskAiCfoHostNavButtonProps-B6D1gPTU.js +0 -1
  119. package/dist/assets/zeni-epic-state-DsxPZxrE.js +0 -13
@@ -0,0 +1,25 @@
1
+ import{j as C}from"./liveblocks-BNlilBXq.js";import Rn from"./NotFoundScreen-DNyI2qP0.js";import{a,b as Pt}from"./sentry-CH2pQ4tM.js";import{n as Fe,S as Dn}from"./mui-CnlqDSRv.js";import{h as re,l as wt,u as Ge,g as U,n as Un,i as rt,o as Fn,p as Le}from"./core-BeBBWfga.js";import{eQ as Re,PX as Bn,n1 as ke,fi as _n,qG as Vn,nj as xt,nE as Rt,PY as Dt,nO as On,PZ as Ut,nc as Mn,qc as jn,f1 as Ie,P_ as De,sM as Ft,BZ as Bt,P$ as _t,Q0 as Ln,pT as qe,LB as dt,LD as zn,jG as Qn,LE as $n,jN as Gn,cW as qn,tR as Ye,np as Vt,nT as Ue,Q1 as Yn,Ku as ut,Kt as Pe,Q2 as mt,k2 as Jn,Q3 as Nn,Q4 as Kn,Q5 as Hn,Q6 as Zn,nw as Wn,nh as de,nW as we,Q7 as Xn,Q8 as ea,Q9 as ta,o1 as na,jR as aa,jI as oa,Qa as sa,jQ as ht,LL as ca,Qb as ia,Qc as la,pP as ra,ps as da,nU as fe,pr as ze,Qd as ua,Qe as ma,ll as ha,bq as pa,lg as pt,l2 as ga,Qf as Ca,gQ as gt,fU as Sa,ld as Ia,vK as fa,Qg as ka,os as Ea,on as va,or as ya,oc as ba,Qh as Aa,f4 as Ot,nH as Ta,ns as Pa,fj as Ct,nY as wa,Qi as xa,nV as Mt,Qj as Ra,Qk as Da,Ql as Ua,Qm as Fa,Qn as St,p$ as Ba,pi as _a,Ks as Va,jP as Oa,Qo as Ma,Gv as ja,jO as La,jD as za,f3 as Qa,oT as jt,pa as $a,nS as It,nX as Ga,bE as qa,la as Ya,l7 as Ja,Qp as Na,ob as ft,p8 as kt,p6 as Ka,oY as Ha,oD as Za,p9 as Wa,Qq as Xa,Qr as eo,oH as to,Qs as no,ox as ao,oG as oo,oE as so,pd as co}from"./zeni-epic-state-5fEaVO5b.js";import{a as Lt,I as le,f as L,q as H,V as zt,Z as Qt,cB as io,z as Be,cC as lo,at as xe,cD as ro,aT as Et,B as $t,cE as uo,aq as Qe,O as mo,cF as ho,a1 as po,cG as go,Q as Co,cH as So,cI as Io,R as fo,d as ko,aN as Eo,b5 as vo,w as yo,cJ as bo}from"./index-MRloqTru.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-DVBsWNa4.js";import{c as vt,C as Ao}from"./TransactionDetailScreen-Cx-HHzFa.js";import{w as To}from"./withTransactionSidePanel-B7h02ghb.js";import{h as Po,v as wo}from"./routePaths-Dmzz0h9N.js";import{g as $e}from"./accountMappingHelper-DWvcSK1C.js";import{D as xo}from"./DrawerScreen-si6Z3FY7.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.js";import"./decodeURIComponentSafe-OtMMCMcE.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]="533475d0-7ccc-4b78-a68c-2ccdcccc2863",t._sentryDebugIdIdentifier="sentry-dbid-533475d0-7ccc-4b78-a68c-2ccdcccc2863")}catch{}})();const Ro=()=>{const t=re(),i=wt(),A=Ge(),f=U(d=>Re(d)),{useFeatureGate:E}=Lt(),{isFeatureEnabled:g}=E(le.isRealtimeInsightsFeatureEnabled),u=U(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=U(d=>Bn(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=Gt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,N=!1)=>{t(ke({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:N}))},[]),y=a.useCallback(d=>{const R=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(_n(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],B=a.useCallback(()=>{const d=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=H(A.state?.pathnameStackToGoBack,A.pathname),T=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=zt();return Qt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Vn(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&B()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=A.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Do,{children:C.jsx(io,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:T,onBackClick:()=>{i("../../dashboard")},onReload:B,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Do=Fe.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ background-color: ${t=>t.theme.colors.grey4};
8
+ `,Uo=Pt.memo(({reconciliation:t,selectedDrawerAccountId:i,onClose:A,onFetchLinkTokenClick:f,onEstablishConnectionClick:E})=>{const g=re(),u=Be.getSignedInUser(),o=U(e=>Re(e)),v=t.excludedAccountIDs,S=a.useMemo(()=>({userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:o?.tenantId??""}),[u?.userId,u?.zeniSessionId,o?.tenantId]),{accountReconciliationsByAccountID:m,monthYearPeriod:y,statementUploadChosen:r}=t,B=m[i],h=B?.accountReconEntity.statementMetaData?.statementUploadId,T=(e,n)=>{g(jn(e,n.split(".")[0]))},I=e=>{h!=null&&g(Mn({accountId:i,selectedPeriod:y,fileId:e,statementUploadId:h}))},d=()=>{g(Dt({statementUploadChosen:!1}))},R=e=>{g(On({accountId:i,selectedPeriod:y,payload:e}))},N=e=>{g(Ut({accountId:i,selectedPeriod:y,localData:{accountSource:e}}))},te=a.useCallback(()=>{g(xt({accountId:i}))},[g,i]),M=a.useCallback(()=>{g(Rt({accountId:i}))},[g,i]),_=v.includes(i)?t.excludedAccountReconciliationByAccountID[i]:void 0;return B!=null?C.jsx(yt,{children:C.jsx(bt,{children:C.jsx(lo,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:B,monthYearPeriod:y,onDismissClick:A,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:E,onEditFileName:T,onDeleteFile:I,onSelectSourceType:N,filesEndPoint:xe.fileMicroServiceBaseUrl,authParams:S,openFilePicker:r,onStatementUploadSuccess:R,onUploadWindowOpenedOnce:d,onExcludeFromReconciliation:te})})}):_!=null?C.jsx(yt,{children:C.jsx(bt,{children:C.jsx(ro,{excludedAccountReconciliation:_,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:M})})}):null}),yt=Fe.div`
9
+ display: flex;
10
+ flex-direction: column;
11
+ height: 100%;
12
+ `,bt=Fe.div`
13
+ flex: 1;
14
+ min-height: 0;
15
+ display: flex;
16
+ flex-direction: column;
17
+ box-sizing: border-box;
18
+ min-width: 0;
19
+ overflow-x: hidden;
20
+ overflow-y: auto;
21
+ `;function Fo({companyId:t,closeCustomerRequestDrawer:i,addCustomerRequest:A,resetCustomerRequest:f}){const E=Be.getSignedInUser();if(E==null)throw Error("Can't access Customer Request page without signing in...");const g=U(u=>Ln(u,t,E));return a.useEffect(()=>{f()},[]),C.jsx(C.Fragment,{children:g.fetchState==="In-Progress"||g.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?C.jsx($t,{fetchState:"In-Progress"}):C.jsx(uo,{onCloseClick:i,addCustomerRequest:A,snippets:g.companyMonthEndReportTemplatesData,bulletPoints:g.zeniRequestsData??[]})})}const Bo=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:_o,comma:At,space:Vo}},dateFormat:qt}=mo.getLocalizedStrings(),Tt=co,Oo=Un(function(t,i){const{uncategorizedAccounts:A,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,companyId:u,isMissingReceiptsBulkUploadEnabled:o,isTransactionActivityEnabled:v}=i,S=Be.getSignedInUser(),m=t.tenantState.currentTenantId,y={userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:m??""},r=Ie(t),{selectedTransactionCategorizationTab:B}=r;return{expenseAutomationViewSelector:r,bulkUploadSelector:o===!0?r.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:y,receiptUploadEndpoint:`${xe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${po}/transaction_attachments`,bulkUploadEndpoint:o===!0?`${xe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:B,monthEndInsightsCustomerRequestData:E,monthEndInsightsPreviewMode:g,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:S,uncategorizedAccounts:A,companyId:u,isTransactionActivityEnabled:v}},function(t,i){const{themeState:A,isAccountingClassesEnabled:f,isCOTEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isMissingReceiptsBulkUploadEnabled:u,location:o,vendorSearchAutoCompleteData:v,expenseAutomationViewSelector:S,currentTenant:m,uncategorizedAccounts:y,navigate:r,onClickCustomerRequest:B,handleEditClick:h,setActivityLogTransactionId:T}=i,{selectedPeriod:I,currentSelectedView:d,reconciliation:{selectedAccountId:R}}=S,{accountSettingsView:N}=S.jeSchedules,te=Vt(I),M=Ue(te.start),_=Ue(te.end);return{onZeniLogoClick:()=>{A.toggle()},onUploadReceiptAttachment:e=>{L.trackMissingReceiptAttached(I.month,I.year),t(_a(e))},onUploadTransactionReceipt:(e,n,s,l,k,p)=>{t(St(e,n,{fetchState:"In-Progress"}));const b=()=>t(St(e,n,{fetchState:"Error"}));go(`${xe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,p,n,s,l,k).then(P=>{P!=null?t(Ba(e,P)):b()}).catch(b)},onMissingReceiptsRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(Fa(e,n)),m!=null&&t(ke({tenantId:m.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,s,l)=>{t(Ua(e,{fetchState:n,error:s})),s!=null&&t(gt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:l!=null?Vo+_o+l+At:At}]}))},onUpdateJESchedulesUIState:e=>{t(Da(e))},onUpdateMissingReceiptsUIState:e=>{t(Ra(e))},onFetchMissingReceiptsList:()=>{_!=null&&M!=null&&t(Mt({start:M,end:_},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...u===!0?{onBulkUploadFiles:e=>{t(so(e))},onBulkUploadProgress:e=>{t(oo(e))},onBulkUploadSuccess:e=>{t(ao({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(no(e))},onConfirmBulkUploadMatch:(e,n,s,l,k)=>{t(to(e,n,s,l,k))},onBulkUploadConfirmMatchAcknowledged:()=>{t(eo())},onSetBulkUploadResultsTab:e=>{t(Xa(e))},onSetBulkUploadCompletedSubTab:e=>{t(Wa(e))},onSetBulkUploadSortConfig:(e,n)=>{t(kt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Za())},onSearchTransactionsForManualMatch:(e,n)=>{t(Tt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=S.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Tt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Ha(e,n))},onFetchBulkUploadBatches:e=>{t(jt(e))},onFetchMoreBatchDetails:()=>{t(Ka())},onResetBulkUploadSort:()=>{t(kt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(xa())},onSearchTextChanged:e=>{const n=S.currentSelectedView,s=S.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(ze({selectedTab:s,uiState:{searchString:e}})),_!=null&&M!=null&&t(fe(s,{start:M,end:_},!0,!1,e,void 0,!0)))},onRefresh:()=>{i.trackExpenseAutomationTabAnalytics(!0),t(wa(g))},onClose:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0})),r("../")},onBack:()=>{d==="reconciliation"&&R!=null&&t(Ct({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(Pa(e))},onSaveReconciliationReview:e=>{t(Ta(e))},onUpdateStep:e=>{const{selectedPeriod:n}=S,s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:s,referrer:S.currentSelectedView}}),t(Ot(e))},handleLogOutClick:()=>{const e=H(o.state?.pathnameStackToGoBack,o.pathname);r("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:s,fixedAssetsAccount:l,accruedExpensesAccount:k}=n,p=$e(N.prepaidExpensesAccountList,s.selectedOptions),b=$e(N.fixedAssetsAccountList,l.selectedOptions),P=$e(N.accruedExpensesAccountList,k.selectedOptions),V={selectedPrepaidExpensesAccountIds:p.map(w=>w.accountId),selectedFixedAssetsAccountIds:b.map(w=>w.accountId),selectedAccruedExpensesAccountIds:P.map(w=>w.accountId)};t(Aa({data:V}))},onSaveJeAccountSettingsClick:()=>{t(ba())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:s,accumulatedDepreciationCategory:l,scheduleClass:k,scheduleExpenseCategory:p,vendor:b}=n,{allAccountList:P,allClassList:V,allDepreciationAccountList:w}=S.jeSchedules,Q=v.entityAutoCompleteView.vendor.length>0?v.entityAutoCompleteView.vendor.find($=>$.id===b?.selectedOption):void 0,ne={id:Q?.zeniId??b?.selectedOption??"",name:Q?.name??b?.defaultOptions.find($=>$.value===b?.selectedOption)?.label??"",logo:Q?.logo},ae=p?.selectedOption!=null?P.find($=>$.qboId===p.selectedOption):void 0,Ee=k?.selectedOption!=null?V.find($=>$.classId===k.selectedOption):void 0,oe=l?.selectedOption!=null?w.find($=>$.qboId===l.selectedOption):void 0;t(ya({scheduledJournalEntryID:e,localData:{jeScheduleID:s,scheduledJournalEntryID:e,updatedCategoryId:ae?.accountId,updatedClassId:Ee?.classId,updatedAccumulatedDepreciationCategoryID:oe?.accountId,updatedVendor:{id:ne.id,name:ne.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(Pe("common"))},onCancelAutoComplete:()=>{t(Pe("common"))}},onPostJESchedule(e,n){t(Ea({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(ka())},handleJeScheduleClick:(e,n,s)=>{t(fa({selectedJEScheduleKey:n}));const l=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../vendors/schedules/${s}/details/${e}`,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{m!=null&&t(Ia(e,m.companyId,m.tenantId))},onClickCustomerRequest:B,setActivityLogTransactionId:T,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,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!0,s,l,m.tenantId))},saveMonthEndReport:(e,n,s,l)=>{m!=null&&t(pt(e,m.companyId,n,!1,s,l,m.tenantId))},onEditMonthEndInsightsClick:h,sendMonthEndReport:e=>{const n=o.state?.referrer,{selectedPeriod:s,auditSummary:l}=S;m!=null&&l?.auditScorePercentage!=null&&(t(ha(m.companyId,e,m.tenantId)),L.trackInsightsEmailPage(s.month,s.year,!1,"draft",l.auditScorePercentage,pa().format(qt.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,n);const s=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,s,l,k,p,b,P,V,w,Q,ne,ae)=>{t(ma(e,n,s,l,y,k,p,b,P,V,w,Q,ne,ae))},onCancelAutoComplete:()=>{t(Pe("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(mt({scrollPosition:e}))},onUpdateTab:e=>{i.closeSidePanel?.(),_!=null&&M!=null&&(t(fe(e,{start:M,end:_},!1,!1)),t(ua(e)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n})),_!=null&&M!=null&&t(fe(e,{start:M,end:_},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(ze({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,s,l,k,p,b)=>{_!=null&&M!=null&&t(fe(e,{start:M,end:_},!0,s,n,l,k,p,b))},resetTransactionCategorizationLocalData:(e,n,s,l,k,p,b,P)=>{t(da(e,n,s,l,P??null,k,p,!1,b))},updateSelectedVendorForTransaction:(e,n,s,l,k)=>{t(ht({selectedTab:e,transactionId:n,lineId:s,selectedTransaction:l,uncategorizedAccounts:y,updatedVendor:k,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,s)=>{const l=o.state?.referrer;e==="autoCategorized"?L.trackTransactionsAutoCategorisedPage(I.month,I.year,S.transactionView.totalCountByTab.autoCategorized,n.length,!1,l??null):L.trackTransactionsReviewPage(I.month,I.year,S.transactionView.totalCountByTab.review,n.length,!1,l??null),t(ra(e,n,s,g))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(la({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,s,l,k,p,b)=>{const{transactionId:P,transaction:V,lineIds:w}=n;p!=null&&t(ca({transactionId:P,customerUpdates:p})),t(ia({selectedTab:l,transactionId:P.id,lineId:w[0],selectedTransaction:V,uncategorizedAccounts:y,updatedCustomer:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:b})),k!=null&&t(Ye(k,e,n,s,!0,E,b))},onFetchRecommendationsForEntityCategorization:(e,n,s,l,k,p,b)=>{const{transactionId:P,transaction:V,lineIds:w}=n;p!=null&&(t(aa({transactionId:P,vendorUpdates:{name:p.name,id:p.id?p.id:void 0}})),t(oa({vendorId:p.id?p.id:void 0,localData:{vendorName:p.name,vendorId:p.id?p.id:void 0}}))),p?.id?(t(ht({selectedTab:l,transactionId:P.id,lineId:w[0],selectedTransaction:V,uncategorizedAccounts:y,updatedVendor:p,selectedEntity:k,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:b})),k!=null&&t(Ye(k,e,n,s,!0,E,b))):t(sa({selectedTab:l,transactionId:P.id,lineId:w[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(we(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(we(I,!0,!1,null,!1,!1))},markAsReview:(e,n,s,l)=>{L.trackFluxAnalysisReviewed(s.month,s.year,l??!1,e),t(na(n,e,s,l??!1))},onUpdateFluxAnalysisUIState:e=>{t(ta(e))},updateOperatingExpensesIdsForReview:e=>{t(ea({operatingExpenseIds:e,selectedPeriod:I}))},redirectToVendorDetailPage:e=>{if(i.tenantEmailDomain!=null){const n=wo(e.id,e.qboId,i.tenantEmailDomain),s=H(i.location.state?.pathnameStackToGoBack,i.location.pathname);i.navigate(n,{state:{pathnameStackToGoBack:s,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(Xn({sectionId:e,selectedPeriod:I}))},onFetchReimbursementView:(e,n,s)=>{t(we(e,!0,!1,n,!0,s))},onReviewClicked:e=>{t(de(I,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Ft("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const s=m?.companyId;s!=null&&(t(Bt(e,s,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(_t({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Ut({accountId:e,selectedPeriod:I,localData:{accountSource:"bank_statement"}})),t(Dt({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(de(I,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Wn({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Zn({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Hn({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{i.closeSidePanel?.(),t(Kn({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,s)=>{const l=e.vendor?.id;s&&l!=null&&t(Jn(l)),t(Nn({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(i.openTransactionPanel)return void i.openTransactionPanel(e,qe("bill"));const n=H(o.state?.pathnameStackToGoBack,o.pathname);r(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{r(-1)},onReconListPageScroll:e=>{t(mt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(ut({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Pe("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Yn({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(xt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Rt({accountId:e}))}}},(t,i,A)=>{const{isMissingReceiptsBulkUploadEnabled:f,...E}=A;return function(g,u,o){return{...g,...u,...o,onUploadTransactionReceipt:(v,S,m,y,r)=>{u.onUploadTransactionReceipt(v,S,m,y,r,g.authParams)}}}(t,i,E)})(ho),Mo=To(function(t){const i=t.displayName??t.name??"Component",A=Pt.memo(t),f=E=>{const g=re(),u=function(){const T=re(),I=U(d=>Ie(d).reconciliation.selectedDrawerAccountId);return{isOpen:I!=null,selectedAccountId:I,openPanel:a.useCallback(d=>{T(De({selectedDrawerAccountId:d}))},[T]),closePanel:a.useCallback(()=>{T(De({selectedDrawerAccountId:void 0}))},[T])}}(),o=U(T=>Ie(T).reconciliation),v=U(T=>Re(T)),S=a.useCallback((T,I)=>{g(Ft("expense_automation_reconcile",T,I))},[g]),m=a.useCallback((T,I)=>{const d=v?.companyId;d!=null&&(g(Bt(T,d,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",I)),g(_t({accountId:I,connectionInProgress:!0})))},[g,v?.companyId]),y=a.useMemo(()=>{if(u.isOpen&&u.selectedAccountId!=null)return C.jsx(Uo,{reconciliation:o,selectedDrawerAccountId:u.selectedAccountId,onClose:u.closePanel,onFetchLinkTokenClick:S,onEstablishConnectionClick:m})},[u.isOpen,u.selectedAccountId,u.closePanel,o,S,m]),r=a.useMemo(()=>({reconPanelContent:y,reconSidePanelIsOpen:u.isOpen,closeReconSidePanel:u.closePanel}),[y,u.isOpen,u.closePanel]),B=a.useContext(Et),h=a.useMemo(()=>u.isOpen?{closePanel:u.closePanel,selectedItemId:u.selectedAccountId}:B,[u.isOpen,u.closePanel,u.selectedAccountId,B]);return C.jsx(Et.Provider,{value:h,children:C.jsx(A,{...E,...r})})};return f.displayName=`withReconSidePanel(${i})`,f}(({closeSidePanel:t,openTransactionPanel:i,panelContent:A,sidePanelIsFullView:f,sidePanelIsOpen:E,reconPanelContent:g,reconSidePanelIsOpen:u,closeReconSidePanel:o})=>{const{isAiCfoOpen:v,setIsAiCfoOpen:S}=Co(),m=So(),{isOpen:y}=Io(),r=wt(),B=Ge(),h=re(),{isAiCfoAccessEnabled:T,onAskAiCfoClick:I}=Gt({mobileExploreReferrer:"Transaction categorization"}),d=a.useCallback(()=>{E===!0&&f!==!0&&t?.()},[t,E,f]),{areTenantIdsInSync:R}=zt(),N=(()=>{const c=U(G=>Ie(G)),j=Ge(),{currentSelectedViewFetchState:J,currentSelectedView:O,selectedPeriod:F}=c,Se=Qe(O),X=Qe(J.fetchState),be=a.useCallback(G=>{const K=j.state?.referrer;O==="transaction_categorization"&&(c.selectedTransactionCategorizationTab==="review"?L.trackTransactionsReviewPage(F.month,F.year,c.transactionView.totalCountByTab.review,0,G,K??null):L.trackTransactionsAutoCategorisedPage(F.month,F.year,c.transactionView.totalCountByTab.autoCategorized,0,G,K??null)),O==="missing_receipts"&&L.trackMissingReceiptsPage(F.month,F.year,G,c.missingReceipts.transactions.length,K??null),O==="je_schedules"&&L.trackMonthCloseScheduleListPage(F.month,F.year,G,c.jeSchedules.draftSchedules.length,c.jeSchedules.resolveSchedules.length,K??null),O==="flux_analysis"&&L.trackFluxAnalysisPage(F.month,F.year,G,Bo(c.fluxAnalysis),K??null),O==="month_end_insights"&&c.auditSummary?.auditScorePercentage!=null&&L.trackInsightsEmailPage(F.month,F.year,G,"draft",c.auditSummary.auditScorePercentage,null,K??null)},[F,c]);return a.useEffect(()=>{X===J.fetchState&&O===Se||J.fetchState!=="Completed"||be(!1)},[O,J.fetchState,Se]),be})(),te=fo(),[M,_]=a.useState(!1),e=U(c=>dt(c)),n=U(c=>Re(c)),[s,l]=a.useState(!1),[k,p]=a.useState(!1),[b,P]=a.useState([]),[V,w]=a.useState(void 0),Q=a.useCallback(c=>{c!=null&&(v&&S(!1),m(),d()),w(c)},[d,v,m,S]),ne=a.useCallback(()=>{m(),w(void 0),d(),I()},[d,I,m]),ae=a.useRef(v);a.useEffect(()=>{v===!0&&ae.current===!1&&(m(),w(void 0),d()),ae.current=v},[d,v,m]);const Ee=a.useRef(y);a.useEffect(()=>{y===!0&&Ee.current===!1&&(v&&S(!1),w(void 0),E===!0&&f!==!0&&t?.()),Ee.current=y},[t,y,v,S,f,E]);const oe=E===!0&&f!==!0,$=a.useRef(oe);a.useEffect(()=>{oe&&!$.current&&(v&&S(!1),m(),w(void 0)),$.current=oe},[v,oe,m,S]);const[Je,Yt]=a.useState(!1),Ne=a.useRef(!1),{selectedTab:Ke}=rt(),{tenantEmailDomain:Jt}=rt(),[_e,He]=a.useState(B.state?.message==="comingFromTransactionDetail"),Ze=B.state?.message==="comingFromOverview",Nt=ko(),Ve=Be.getSignedInUser(),{useDynamicConfig:Kt,useFeatureGate:ue}=Lt(),{configValue:Ht}=Kt(Eo.enableUncategorizedExpenseCategory),Z=Ht?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:We}=ue(le.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:me}=ue(le.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Xe}=ue(le.isTransactionActivityEnabled),{isFeatureEnabled:Zt}=ue(le.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:Wt}=ue(le.isProjectsTransactionsEnabled),Xt=a.useCallback(c=>{const j=qe(c.view==="reconciliation"?"bill":"expense");i?.(c.entityId,j)},[i]),en=U(c=>Va(c,"common")),z=U(c=>Ie(c)),{monthEndCloseChecksView:Y,currentSelectedView:x,selectedPeriod:D,selectedTransactionCategorizationTab:se,currentSelectedViewBackgroundRefreshFetchState:tn,currentSelectedViewFetchState:W,jeSchedules:Oe,reconciliation:nn}=z;a.useEffect(()=>{x==="transaction_categorization"&&E!==!0||Q(void 0)},[x,Q,E]);const ve=a.useRef(null);a.useEffect(()=>{ve.current!==null?ve.current!==se&&(ve.current=se,x==="transaction_categorization"&&Q(void 0)):ve.current=se},[x,se,Q]);const an=U(c=>V==null?void 0:Oa(c.transactionState,V)),ce=an?.qboId,on=U(c=>ce==null?void 0:Ma(c,ce));a.useEffect(()=>{ce!=null&&h(ja(ce))},[h,ce]);const{selectedAccountId:he}=nn,et=Qe(Oe.accountSettingsView.saveState.fetchState),sn=U(c=>La(c.accountState,c.accountListState,"accountList")),cn=U(c=>za(c)),pe=Ke!=null?Qa(Ke):x,ln=U(c=>c.entityAutoCompleteState.autoCompleteText.common);if(Qt({isDataReady:W.fetchState==="Completed"}),Ve==null)throw Error("Can't access expense automation screen without signing in...");const tt=Vt(D),ge=Ue(tt.start),Ce=Ue(tt.end);if(ge==null||Ce==null)throw Error(`Invalid start - ${ge} and end - ${Ce} period from given ${D}`);const rn=a.useCallback(()=>{l(!1)},[]),dn=a.useCallback(()=>{p(!0)},[]),un=a.useCallback(c=>{P(c),p(!1)},[]),mn=a.useCallback(()=>{P([])},[]),ye=z.missingReceipts.bulkUpload.phase,nt=z.missingReceipts.bulkUpload.currentBatchId;a.useEffect(()=>{me===!0&&x==="missing_receipts"&&ye==="matching"&&nt!=null&&h(jt({cacheOverride:!0}))},[me,x,ye,nt,h]);const at=Ve?.userId,hn=D.month,pn=D.year,ot=n?.tenantId;a.useEffect(()=>{x==="missing_receipts"&&me!==!1&&ye==="idle"&&at!=null&&ot!=null&&h($a())},[x,me,ye,at,ot,hn,pn,h]),a.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?_(!0):_(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect(()=>{pe!=null&&x!==pe&&h(Ot(pe))},[pe]),a.useEffect(()=>{Je!==!1||W.fetchState!=="Completed"&&W.fetchState!=="Error"||!R||(Yt(!0),h(It(!1,!1,Z)))},[Je,W,R,Z]),a.useEffect(()=>{!Ze&&R&&(h(It(!1,!1,Z)),h(de(D,he,!1,!1)))},[D.month,D.year,R,Z]);const st=a.useCallback((c=!1,j=!1)=>{const J={start:ge,end:Ce};switch(x){case"transaction_categorization":h(fe(se,J,c,!_e,void 0,void 0,j,void 0,Z)),He(!1);break;case"flux_analysis":h(we(D,c,j,null));break;case"month_end_insights":if(j===!1){const O=new Date(D.year,D.month,0),F=qa(O.toDateString()).format(qt.analytics.YYYYDashMMDashDDFormat);h(Ya(!0,n.companyId,n.tenantId,F)),h(Ja(n.companyId,n.tenantId))}break;case"je_schedules":h(Ga(J,j));break;case"missing_receipts":h(Mt(J,{amount:75,currencyCode:"USD",currencySymbol:"$"},c,j));break;default:h(de(D,he,c,j))}},[x,ge,Ce,n.companyId,n.tenantId,se,D,he,_e,He,Z]);a.useEffect(()=>{x===pe&&W.fetchState==="Not-Started"&&R&&st(!0)},[W,ge,Ce,n.companyId,n.tenantId,R]),a.useEffect(()=>{Ze||_e||Ne.current||tn.fetchState==="In-Progress"||W.fetchState!=="Completed"||(Ne.current=!0,st(!0,!0))},[]),a.useEffect(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState!=="Completed"&&h(ke({tenantId:n.tenantId,period:D,refreshViewInBackground:!1}))},[Y.fetchState,n.tenantId]),a.useEffect(()=>{z.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?l(!0):l(!1)},[z.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect(()=>{z.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&R&&(h(ke({tenantId:n.tenantId,period:D,refreshViewInBackground:!0})),h(Na({companyId:n.companyId})),r("../"))},[z.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,D,n.companyId,R]),a.useEffect(()=>{const c=setInterval(()=>{Y.fetchState!=="In-Progress"&&Y.fetchState==="Completed"&&h(ke({tenantId:n.tenantId,period:D,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(c)},[Y.fetchState,n.tenantId,D,h]),a.useEffect(()=>{const c=setInterval(()=>{x==="reconciliation"&&he==null&&z.reconciliation.fetchStatus.fetchState==="Completed"&&z.reconciliation.refreshStatus.fetchState!=="In-Progress"&&h(de(D,void 0,!0,!0))},3e5);return()=>clearInterval(c)},[x,h,z.reconciliation.fetchStatus.fetchState,z.reconciliation.refreshStatus.fetchState,de,he,D]);const gn=vt();a.useEffect(()=>{const c=(Y.monthEndCloseChecks?.monthEndCloseCheckList.find(j=>j.id==="month_end_insights")?.isDisabled??!1)&&!We;x!=="month_end_insights"||!c&&Y.monthEndCloseChecks?.reportEmailSentDate==null||r("../")},[x,Y.monthEndCloseChecks]);const Cn=u===!0?g:A,Sn=u===!0||E===!0,In=u===!0?o:t;a.useEffect(()=>{et==="In-Progress"&&Oe.accountSettingsView.saveState.fetchState==="Completed"&&h(ft())},[et,Oe.accountSettingsView.saveState.fetchState,ft]);const{transactionId:ct,onSaveVendor:fn,onSaveSuccess:kn,onCancel:En,vendorViewDetails:vn}=(({expenseAutomationViewSelector:c,closeDrawerHandler:j,currentSelectedView:J})=>{const O=re();let F,Se,X;const be=vt(),G=c.transactionView;let K=()=>{};const{transactions:yn,selectedTransactionId:ie,selectedTransactionLineId:Ae,transactionLocalData:bn}=G;if(J==="transaction_categorization"){const Me=bn.find(ee=>ee.transactionId===ie),q=yn.find(ee=>ee.id===ie),it=Ae!=null?Me?.transactionReviewLocalData?.lineItemById[Ae]:void 0,lt=it?.account;Se=it?.class?.classId,F=["Uncategorized Income","Uncategorized Expense"].includes(lt?.accountName??"")?void 0:lt?.accountId;const Tn=Po(ie,q?.typeOfTransaction);q!=null&&Tn&&(X={id:ie,type:qe(q.typeOfTransaction)}),K=()=>{if(ie!=null&&Ae!=null&&q!=null){const ee=G.transactionLocalData.find(Te=>Te.transactionId===ie)?.transactionReviewLocalData;if(ee!=null&&q.lines!=null&&q.lines.length>0){const Te=ee.lineItemById[Ae];let je=ee.selectedEntity;if(qn(q)||(je=Te.selectedEntityLine),je!=null){const Pn=je,wn={transactionId:{id:q.id,type:q.type},transaction:q,lineIds:q.lines.map(xn=>xn.id)??[]};O(Ye(Pn,Te.amount.amount,wn,!1,!0,be))}}}}}const An=U(Me=>dt(Me,void 0,F,Se));return{transactionId:X,onSaveVendor:()=>{O(Gn(X,void 0,!1,!0))},onSaveSuccess:K,onCancel:()=>{X!=null&&O(zn({transactionId:X})),O(Qn()),O($n()),j()},vendorViewDetails:An}})({expenseAutomationViewSelector:z,closeDrawerHandler:()=>{_(!1)},currentSelectedView:x});return Nt?.loggedInUserRoleMap==null?Y.fetchState==="Error"?C.jsx(vo,{onGoHome:()=>r("../",{replace:!0}),onReload:()=>window.location.reload()}):C.jsx($t,{fetchState:"In-Progress"}):C.jsxs(C.Fragment,{children:[C.jsx(xo,{isOpen:k,drawerLeftMargin:new yo(0,0,300,650),onClose:()=>{p(!1)},children:C.jsx(jo,{onClick:c=>c.stopPropagation(),children:C.jsx(Fo,{companyId:n.companyId,closeCustomerRequestDrawer:()=>p(!1),addCustomerRequest:un,resetCustomerRequest:mn})})}),ct!=null&&M&&C.jsx(Ao,{isOpen:M,transactionId:ct,onSaveVendor:fn,onSaveSuccess:kn,onCancel:En,vendorViewDetails:vn}),C.jsx(Oo,{navigate:r,location:B,themeState:te,vendorSearchAutoCompleteData:{autoCompleteText:ln,entityAutoCompleteView:en},expenseAutomationViewSelector:z,isMissingReceiptsBulkUploadEnabled:me,monthEndInsightsPreviewMode:s,monthEndInsightsCustomerRequestData:b,isRealtimeInsightsFeatureEnabled:We,isUncategorizedExpenseCategoryEnabled:Z,isAccountingClassesEnabled:cn,isProjectsTransactionsEnabled:Wt,isCOTEnabled:gn,currentTenant:n,companyId:n.companyId,signedInUser:Ve,isTransactionActivityEnabled:Xe,activityLogTransactionId:x==="transaction_categorization"?V:void 0,activityLogPanel:x==="transaction_categorization"&&Xe===!0&&V!=null?C.jsx(bo,{activityLogView:on,qboId:ce,onClose:()=>Q(void 0),selectedTransactionId:V},String(V)):null,uncategorizedAccounts:sn,onClickCustomerRequest:dn,handleEditClick:rn,tenantEmailDomain:Jt,trackExpenseAutomationTabAnalytics:N,setActivityLogTransactionId:Q,closeSidePanel:In,openTransactionPanel:i,sidePanelIsOpen:Sn,sidePanelIsFullView:u!==!0&&f,panelContent:Cn,isAiCfoAccessEnabled:T,onAskAiCfoClick:ne,isExpenseAutomationCommentingEnabled:Zt,onExpenseAutomationCommentingThreadClick:Xt,sidePanelListPercent:u===!0?66:void 0})]})})),jo=Fe(Dn)`
22
+ display: flex;
23
+ min-height: 100%;
24
+ flex-direction: column;
25
+ `;function rs(){return C.jsxs(Fn,{children:[C.jsx(Le,{path:"*",element:C.jsx(Ro,{})}),C.jsx(Le,{path:"/:selectedTab/:selectedPeriod/*",element:C.jsx(Mo,{})}),C.jsx(Le,{path:"*",element:C.jsx(Rn,{})})]})}export{rs as default};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-BEuWW_o5.js";import{a as r}from"./sentry-DsHW_1mX.js";import{a2 as i,a3 as l,a4 as p,p as b}from"./index-CsttCRun.js";import"./mui-hUAh7HgW.js";import m from"./NotFoundScreen-CcPbqGwL.js";import{l as c,u}from"./core-lbYY5woS.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]="962e43b2-96f5-4d4d-bf4b-69fb382a754a",e._sentryDebugIdIdentifier="sentry-dbid-962e43b2-96f5-4d4d-bf4b-69fb382a754a")}catch{}})();const _=()=>{const e=c(),a=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=b(a.state?.pathnameStackToGoBack),f=n.poppedPathname??k();e(f,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=i(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
1
+ import{j as s}from"./liveblocks-BNlilBXq.js";import{a as r}from"./sentry-CH2pQ4tM.js";import{a2 as i,a3 as l,a4 as p,p as b}from"./index-MRloqTru.js";import"./mui-CnlqDSRv.js";import m from"./NotFoundScreen-DNyI2qP0.js";import{l as c,u}from"./core-BeBBWfga.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]="962e43b2-96f5-4d4d-bf4b-69fb382a754a",e._sentryDebugIdIdentifier="sentry-dbid-962e43b2-96f5-4d4d-bf4b-69fb382a754a")}catch{}})();const _=()=>{const e=c(),a=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=b(a.state?.pathnameStackToGoBack),f=n.poppedPathname??k();e(f,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=i(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1 +1 @@
1
- import{a as r}from"./sentry-DsHW_1mX.js";import{h as l,l as f,u as m}from"./core-lbYY5woS.js";import{gx as p,JH as g,JI as _}from"./zeni-epic-state-DsxPZxrE.js";import{u as b,L as h,z as y}from"./index-CsttCRun.js";import"./liveblocks-BEuWW_o5.js";import"./recharts-aApoEySM.js";import"./mui-hUAh7HgW.js";import"./analytics-BpTmj6-G.js";import"./plaid-DtmQg7la.js";import"./dnd-BBkXCQMv.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW3oQVJC.js";import"./lexical-BoKYrzBU.js";import"./pdf-D4eIZozg.js";import"./utils-AZPawxk4.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]="c79c3850-dde0-4ee5-927c-1b14a6cf997f",e._sentryDebugIdIdentifier="sentry-dbid-c79c3850-dde0-4ee5-927c-1b14a6cf997f")}catch{}})();function C(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:u}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const d=y.getActiveTenantForUser();n(d?.tenantEmailDomain!=null?`/${d.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{C as default};
1
+ import{a as r}from"./sentry-CH2pQ4tM.js";import{h as l,l as f,u as m}from"./core-BeBBWfga.js";import{gx as p,JH as g,JI as _}from"./zeni-epic-state-5fEaVO5b.js";import{u as b,L as h,z as y}from"./index-MRloqTru.js";import"./liveblocks-BNlilBXq.js";import"./recharts-C5E4pGR4.js";import"./mui-CnlqDSRv.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.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]="c79c3850-dde0-4ee5-927c-1b14a6cf997f",e._sentryDebugIdIdentifier="sentry-dbid-c79c3850-dde0-4ee5-927c-1b14a6cf997f")}catch{}})();function C(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:u}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const d=y.getActiveTenantForUser();n(d?.tenantEmailDomain!=null?`/${d.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{C as default};
@@ -1,4 +1,4 @@
1
- import{j as t}from"./liveblocks-BEuWW_o5.js";import{i as S,n as f,l as C,u as y,h as ee,s as te,g as E,N as ae,o as ne,p}from"./core-lbYY5woS.js";import{JA as k,JB as v,JC as T,zA as B,zm as G,JD as D,JE as oe,JF as ie,zq as se,eU as $,zx as le,zu as re}from"./zeni-epic-state-DsxPZxrE.js";import{K as x,o as r,i as de,c as j,h as J,M as ce,p as me,k as pe,n as M,C as ue,j as he,r as fe,s as xe,m as ge,v as be,B as we,R as Se,T as ye,S as ke,U as ve,w as je,x as $e}from"./index-CsttCRun.js";import{n as m}from"./mui-hUAh7HgW.js";import g from"./NotFoundScreen-CcPbqGwL.js";import{a as I}from"./sentry-DsHW_1mX.js";import"./recharts-aApoEySM.js";import"./analytics-BpTmj6-G.js";import"./plaid-DtmQg7la.js";import"./dnd-BBkXCQMv.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW3oQVJC.js";import"./lexical-BoKYrzBU.js";import"./pdf-D4eIZozg.js";import"./utils-AZPawxk4.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]="6f23f1bb-bff3-4985-961d-764ba4af2ff1",e._sentryDebugIdIdentifier="sentry-dbid-6f23f1bb-bff3-4985-961d-764ba4af2ff1")}catch{}})();const Ie=m.div`
1
+ import{j as t}from"./liveblocks-BNlilBXq.js";import{i as S,n as x,l as C,u as y,h as ee,s as te,g as E,N as ae,o as ne,p}from"./core-BeBBWfga.js";import{JA as k,JB as v,JC as T,zA as B,zm as G,JD as D,JE as oe,JF as se,zq as ie,eU as $,zx as le,zu as re}from"./zeni-epic-state-5fEaVO5b.js";import{K as g,o as r,k as de,f as j,j as J,_ as ce,p as me,n as pe,q as H,a as ue,I as he,r as xe,R as ge,m as fe,s as we,B as be,v as Se,T as ye,S as ke,G as ve,w as je,x as $e}from"./index-MRloqTru.js";import{n as m}from"./mui-CnlqDSRv.js";import f from"./NotFoundScreen-DNyI2qP0.js";import{a as I}from"./sentry-CH2pQ4tM.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.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]="77d95c34-a05f-46c2-bec4-c06808d3f1b3",e._sentryDebugIdIdentifier="sentry-dbid-77d95c34-a05f-46c2-bec4-c06808d3f1b3")}catch{}})();const Ie=m.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -7,7 +7,7 @@ import{j as t}from"./liveblocks-BEuWW_o5.js";import{i as S,n as f,l as C,u as y,
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
9
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=f(function(e){const a=k(e),n=v(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(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(T({data:l}))}}})(de);function F(){const e=x(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(g,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Be=m.div`
10
+ `,Ce=x(function(e){const a=k(e),n=v(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:s=>{e(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const Be=m.div`
11
11
  display: flex;
12
12
  height: 100vh;
13
13
  width: 100%;
@@ -16,7 +16,7 @@ import{j as t}from"./liveblocks-BEuWW_o5.js";import{i as S,n as f,l as C,u as y,
16
16
  align-items: center;
17
17
  background-color: ${e=>e.theme.colors.grey4};
18
18
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,De=f(function(e,a){const{isSubPage:n}=a;return{addressToEdit:D(e),googleAPIKey:J.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Ae();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Pe(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}})(ce);function ze({isSubPage:e}){const a=C(),n=y(),o=x();return t.jsx(t.Fragment,{children:t.jsx(Be,{windowSize:o,children:t.jsx(De,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:J.googleMapsAPIKey})})})}const Ae=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Pe=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}),Le=m.div`
19
+ `,De=x(function(e,a){const{isSubPage:n}=a;return{addressToEdit:D(e),googleAPIKey:J.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Ae();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function ze({isSubPage:e}){const a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(Be,{windowSize:o,children:t.jsx(De,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:J.googleMapsAPIKey})})})}const Ae=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Pe=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}),Le=m.div`
20
20
  display: flex;
21
21
  height: 100%;
22
22
  width: 100%;
@@ -25,7 +25,7 @@ import{j as t}from"./liveblocks-BEuWW_o5.js";import{i as S,n as f,l as C,u as y,
25
25
  align-items: center;
26
26
  background-color: ${e=>e.theme.colors.grey4};
27
27
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Ne=f(function(e){const a=k(e),n=v(e),o=D(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(G(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(T({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=y(),n=x(),{vendorId:o,billId:i}=S();return o==null||i==null?t.jsx(g,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:i})})})}const Fe=m.div`
28
+ `,Ne=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(G(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(T({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ne,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
29
  display: flex;
30
30
  height: 100%;
31
31
  width: 100%;
@@ -34,7 +34,7 @@ import{j as t}from"./liveblocks-BEuWW_o5.js";import{i as S,n as f,l as C,u as y,
34
34
  align-items: center;
35
35
  background-color: ${e=>e.theme.colors.grey4};
36
36
  box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Te=f(function(e){const a=k(e),n=v(e),o=D(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(se(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"international",i,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=M(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(fe);function Ge(){const e=C(),a=y(),n=x(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?t.jsx(g,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Te,{location:a,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Je={containerWidth:new je(100,58)},Me=m(ke)`
37
+ `,Te=x(function(e){const a=k(e),n=v(e),o=D(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(xe);function Ge(){const e=C(),a=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Te,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Je={containerWidth:new je(100,58)},He=m(ke)`
38
38
  width: ${r.sp4};
39
39
  height: ${r.sp4};
40
40
  margin-bottom: ${r.sp3};
@@ -43,14 +43,14 @@ import{j as t}from"./liveblocks-BEuWW_o5.js";import{i as S,n as f,l as C,u as y,
43
43
  cursor: pointer;
44
44
  position: absolute;
45
45
  color: ${e=>e.theme.colors.brandColorJade};
46
- `,He=m.div`
46
+ `,Ke=m.div`
47
47
  display: flex;
48
48
  height: 100vh;
49
49
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
50
  width: 100vw;
51
51
  overflow-y: scroll;
52
52
  background-color: ${e=>e.theme.colors.grey4};
53
- `,Ke=m.div`
53
+ `,Me=m.div`
54
54
  display: flex;
55
55
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
56
  flex-direction: column;
@@ -69,4 +69,4 @@ import{j as t}from"./liveblocks-BEuWW_o5.js";import{i as S,n as f,l as C,u as y,
69
69
  width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
70
  background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
71
  margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,_e=f(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=te(),d=s.get("token"),H=n.pathname.includes("address"),b=x(),K=xe(),z=ge(),w=be(),V=()=>{K.toggle()},_=E(u=>k(u)),U=E(u=>v(u)),{authParams:W,fetchState:c,billAttachment:R,billFetchState:A,companyName:q,currencySymbol:O,amount:Q}=_,{tenantId:P,userId:L,sessionId:N}=W,{fetchState:X,internationalBankAccountCreateStatus:Y}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{w&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&a(le(i,o,d))},[w,c,i,o,d,a]),I.useEffect(()=>{w&&c==="Completed"&&($(L,N,P),l!=null&&a(re(l)))},[c,w,L,N,P,l,a]),c==="Error"?t.jsx(g,{}):X==="Completed"||Y.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:z.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${z.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&A==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",q,l??"",Ue(n.pathname),O,Q))(u)}),t.jsxs(He,{windowSize:b,children:[b!=="small"?t.jsx(Me,{onClick:V}):null,t.jsx(Ve,{windowSize:b,isAddressPage:H,children:A==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(_e,{file:R,type:"bill"})}),t.jsx(Ke,{windowSize:b,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function We(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{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(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(ze,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Ge,{})})}),t.jsx(p,{path:"*",element:t.jsx(g,{})})]})}export{dt as default};
72
+ `,_e=x(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),d=i.get("token"),K=n.pathname.includes("address"),w=g(),M=ge(),z=fe(),b=we(),V=()=>{M.toggle()},_=E(u=>k(u)),U=E(u=>v(u)),{authParams:W,fetchState:c,billAttachment:q,billFetchState:A,companyName:O,currencySymbol:R,amount:Q}=_,{tenantId:P,userId:L,sessionId:N}=W,{fetchState:X,internationalBankAccountCreateStatus:Y}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[b,c,s,o,d,a]),I.useEffect(()=>{b&&c==="Completed"&&($(L,N,P),l!=null&&a(re(l)))},[c,b,L,N,P,l,a]),c==="Error"?t.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:z.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${z.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&A==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",O,l??"",Ue(n.pathname),R,Q))(u)}),t.jsxs(Ke,{windowSize:w,children:[w!=="small"?t.jsx(He,{onClick:V}):null,t.jsx(Ve,{windowSize:w,isAddressPage:K,children:A==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(_e,{file:q,type:"bill"})}),t.jsx(Me,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function We(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{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(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(ze,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Ge,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
@@ -0,0 +1,12 @@
1
+ import{j as f}from"./liveblocks-BNlilBXq.js";import{a as u}from"./sentry-CH2pQ4tM.js";import{h as j,u as w,l as _,s as J,g as l,N as T}from"./core-BeBBWfga.js";import{z as r,m as M,O as P,g as V,f as A,h as N,X as Q,T as R,i as W}from"./index-MRloqTru.js";import{eQ as X,Jl as $,Jv as q,Jm as B,eU as G,fm as H,Jr as K,fL as Y,cU as Z,Jw as ee,Jx as te}from"./zeni-epic-state-5fEaVO5b.js";import{n as ne}from"./mui-CnlqDSRv.js";import{u as se}from"./useDeviceId-W860NCQ9.js";import{f as ae}from"./analyticsHelper-DXH2vTTa.js";import{t as ie}from"./getLocaleForTenant-BM3MG3N6.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="4ae2f1f4-7f48-47f3-b88a-30591d5c64cc",t._sentryDebugIdIdentifier="sentry-dbid-4ae2f1f4-7f48-47f3-b88a-30591d5c64cc")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=j(),a=w(),m=_(),[y]=J(),n=y.get("token"),p=y.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>X(e)),k=l(e=>$(e)),E=r.getSignedInUser(),v=M().mode;u.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(q(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),u.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(k.tenantsInOrder),s.zeniSessionId),G(s.userId,s.zeniSessionId,o.tenantId),t(H(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),P.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=W();e!=null&&V(e)}),setTimeout(()=>{A.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,b,s,o,k,v,a.state,t]);const U=u.useCallback(()=>{m("/signin/auth")},[m]),O=u.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=u.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return f.jsx(Q,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:O,onVerifyOtp:F,onCancelVerifyDevice:U});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return f.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||g==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return f.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return f.jsx(oe,{"data-testid":"smooth-loader",children:f.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{xe as default};
@@ -1 +1 @@
1
- import{j as P}from"./liveblocks-BEuWW_o5.js";import{a as c}from"./sentry-DsHW_1mX.js";import{h as be,g as s,i as qe,u as Xe,l as ea,k as R}from"./core-lbYY5woS.js";import{eQ as he,eZ as aa,e_ as Se,eR as ta,bn as na,f7 as sa,e$ as oa,f0 as ia,f2 as ra,f5 as da,ff as la,f6 as g,f9 as ca,fa as ue,fd as ua,fb as fa,fc as ma,fe as pa,cJ as ba,fh as ha,cP as Sa,bv as ga,eP as Ea,fm as ka,fn as Ca,fl as ya}from"./zeni-epic-state-DsxPZxrE.js";import{a6 as Ia,a7 as Ta,s as _a,C as wa,z as k,K as Aa,a8 as Fa,O as Da,v as va,u as $a,j as r,a9 as Ba,aa as Ga,I as xa,a as Ra,ab as Ma,a2 as Na,ac as Pa,ad as Ua,ae as fe,af as me,L as Va,ag as Oa,ah as pe,c as M,n as w,a0 as ja,ai as N,aj as La}from"./index-CsttCRun.js";import{D as za}from"./mui-hUAh7HgW.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new m.Error().stack;d&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[d]="00a32e8a-619c-45f8-951f-cf1727a52a4e",m._sentryDebugIdIdentifier="sentry-dbid-00a32e8a-619c-45f8-951f-cf1727a52a4e")}catch{}})();const Ya=Ia(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=qe(),t=Xe(),C=_a(),o=ea(),U=ta(),p=be(),{useFeatureGate:i}=wa(),V=k.getSignedInUser(),A=na(V),ge=Aa(),n=s(e=>he(e)),Ee=Fa(),ke=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:Ce}=Da(),O=s(e=>sa(e)),j=O.uiState.currentChatSessionId,y=va(),{setLoading:ye}=$a(),[F,L]=c.useState(void 0),D=R("/:tenantEmailDomain/dashboard")!==null,z=R("/:tenantEmailDomain/reports")!==null,I=R("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Te=Ba(n,Ie,Z),{isFeatureEnabled:_e}=i(r.isSettingsFeatureEnabled),H=s(e=>oa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>ia(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&p(ra(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),we=s(e=>$.fetchState==="Completed"?da(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ae}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Fe}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:J}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:K}=i(r.isExpenseAutomationEnabledV2),Q=K||J&&A,{isFeatureEnabled:De}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Be}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Ge}=i(r.isTreasuryEnabled),{isFeatureEnabled:xe}=i(r.isTaskManagerCustomerUserAccessEnabled),Re=A||!A&&xe,Me=n.company!=null&&la(n.company),_=Ge&&Me,Ne=s(e=>g(e).totalUnreadCount),Pe=s(e=>g(e).reducedFetchCountState),W=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),q=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ue=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ve}=Ga();c.useEffect(()=>{const e=setTimeout(()=>Ve?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Ue.fetchState==="Not-Started"&&U.tenantId!=null&&p(ca("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||p(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(p(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),p(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Oe={fetchStatus:Pe,count:Ne},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ua(e,ne.tenantId):void 0),S=[];Ae===!1&&S.push("accounts_payable_aging"),Fe===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),Q===!1&&S.push("expense_automation_card");const je=xa(),oe=s(e=>fa(e,S,h,K,J,_).fetchState),ie=s(e=>ma(e).fetchState),Le=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",ze=c.useMemo(()=>pa(n.userRole),[n.userRole]),Ye=ba(ze),Ze=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&H.fetchState==="Completed"&&ha(H.notificationSettings,h.userEmail,Z,n),re=Ra(),Je=re&&Ma(t),de=Sa(je?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>_&&de&&!k.getTreasuryPopupSeen(a??"")&&le===!1&&Na(t.pathname)!=="treasury",[_,de,le,t.pathname,a]),[Ke,ce]=c.useState(G);c.useEffect(()=>{ce(G())},[G]);const Qe=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,We=Pa(Qe);return P.jsx(za,{container:window.document.body,variant:"temporary",open:m,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:P.jsx(Ua,{signedInUser:V,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?we:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:Le,isSettings:me(t),isSettingsFeatureEnabled:_e,isVendorsTabVisible:Ye,isZeniAccountEnabled:Y,isChargeCardEnabled:Te,isTreasuryEnabled:_,treasuryYieldPercentage:We,isTreasuryPopupVisible:Ke,isNotificationsTabVisible:He,notificationCountDetails:Oe,isExpenseAutomationEnabledForUser:Q&&ga(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ze,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=W===0&&q>0?"notifications/comments":"notifications/tasks";me(t)&&(e=W===0&&q>0?"../../notifications/comments":"../../notifications/tasks");const u=w(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(t.state?.pathnameStackToGoBack,t.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),a==null)return;if(e.type==="ai_cfo"){const f=w(t.state?.pathnameStackToGoBack,t.pathname);return M.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),ke?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):void(ja(ge)?o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):Ee?Ce(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=w(t.state?.pathnameStackToGoBack,t.pathname),l=e.type,b=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&M.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),b&&E[n.tenantId]!=null){const f=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const x=La(e.type);pe(e.type)?(j!=null&&p(ya()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${x}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{ye(Va.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let b=`/${encodeURIComponent(u)}/`;const x=N(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Oa(l)?b+="settings/my_profile":pe(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":x?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(p(ka(e.tenantId)),p(Ca(h.userId,e.tenantId,h.zeniSessionId)));const f=e;M.trackCompanySwitch(f.companyId,f.companyName,f.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Je,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{p(Ea({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:De,isTaskManagerAccessEnabled:Re,thanksGivingAnimationEnabled:ve,christmasAnimationEnabled:$e,newYearAnimationEnabled:Be})})}),qa=m=>{const d=be(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-encrypted-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ta(o)&&aa(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return P.jsx(Ya,{...m,...t})};export{qa as M};
1
+ import{j as P}from"./liveblocks-BNlilBXq.js";import{a as c}from"./sentry-CH2pQ4tM.js";import{h as pe,g as s,i as We,u as Xe,l as ea,k as x}from"./core-BeBBWfga.js";import{eQ as he,eZ as aa,e_ as Se,eR as ta,bn as na,f7 as sa,e$ as oa,f0 as ia,f2 as ra,f5 as da,ff as la,f6 as g,f9 as ca,fa as ue,fd as ua,fb as fa,fc as ma,fe as ba,cJ as pa,fh as ha,cP as Sa,bv as ga,eP as Ea,fm as ka,fn as Ca,fl as ya}from"./zeni-epic-state-5fEaVO5b.js";import{a6 as Ia,a7 as Ta,R as _a,a as wa,z as k,K as Aa,a8 as Fa,Q as Da,s as va,u as $a,I as r,a9 as Ba,aa as Ra,d as Ga,c as xa,ab as Ma,a2 as Na,ac as Pa,ad as Ua,ae as fe,af as me,L as Va,ag as Oa,ah as be,f as M,q as w,a0 as La,ai as N,aj as ja}from"./index-MRloqTru.js";import{D as za}from"./mui-CnlqDSRv.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new m.Error().stack;d&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[d]="461bd979-3b8d-4568-bfd2-8abc4f0ba3ef",m._sentryDebugIdIdentifier="sentry-dbid-461bd979-3b8d-4568-bfd2-8abc4f0ba3ef")}catch{}})();const Ya=Ia(({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=We(),t=Xe(),C=_a(),o=ea(),U=ta(),b=pe(),{useFeatureGate:i}=wa(),V=k.getSignedInUser(),A=na(V),ge=Aa(),n=s(e=>he(e)),Ee=Fa(),ke=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:Ce}=Da(),O=s(e=>sa(e)),L=O.uiState.currentChatSessionId,y=va(),{setLoading:ye}=$a(),[F,j]=c.useState(void 0),D=x("/:tenantEmailDomain/dashboard")!==null,z=x("/:tenantEmailDomain/reports")!==null,I=x("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Te=Ba(n,Ie,Z),{isFeatureEnabled:_e}=i(r.isSettingsFeatureEnabled),H=s(e=>oa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>ia(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&b(ra(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),we=s(e=>$.fetchState==="Completed"?da(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:Ae}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Fe}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Q}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:q}=i(r.isExpenseAutomationEnabledV2),J=q||Q&&A,{isFeatureEnabled:De}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Be}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Re}=i(r.isTreasuryEnabled),{isFeatureEnabled:Ge}=i(r.isTaskManagerCustomerUserAccessEnabled),xe=A||!A&&Ge,Me=n.company!=null&&la(n.company),_=Re&&Me,Ne=s(e=>g(e).totalUnreadCount),Pe=s(e=>g(e).reducedFetchCountState),K=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),W=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ue=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ve}=Ra();c.useEffect(()=>{const e=setTimeout(()=>Ve?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&X!=null){const e=`dashboard_${n.companyId}`;j(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else j(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Ue.fetchState==="Not-Started"&&U.tenantId!=null&&b(ca("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||b(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(b(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),b(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Oe={fetchStatus:Pe,count:Ne},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ua(e,ne.tenantId):void 0),S=[];Ae===!1&&S.push("accounts_payable_aging"),Fe===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),J===!1&&S.push("expense_automation_card");const Le=Ga(),oe=s(e=>fa(e,S,h,q,Q,_).fetchState),ie=s(e=>ma(e).fetchState),je=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",ze=c.useMemo(()=>ba(n.userRole),[n.userRole]),Ye=pa(ze),Ze=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&H.fetchState==="Completed"&&ha(H.notificationSettings,h.userEmail,Z,n),re=xa(),Qe=re&&Ma(t),de=Sa(Le?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,R=c.useCallback(()=>_&&de&&!k.getTreasuryPopupSeen(a??"")&&le===!1&&Na(t.pathname)!=="treasury",[_,de,le,t.pathname,a]),[qe,ce]=c.useState(R);c.useEffect(()=>{ce(R())},[R]);const Je=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,Ke=Pa(Je);return P.jsx(za,{container:window.document.body,variant:"temporary",open:m,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:P.jsx(Ua,{signedInUser:V,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?we:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:je,isSettings:me(t),isSettingsFeatureEnabled:_e,isVendorsTabVisible:Ye,isZeniAccountEnabled:Y,isChargeCardEnabled:Te,isTreasuryEnabled:_,treasuryYieldPercentage:Ke,isTreasuryPopupVisible:qe,isNotificationsTabVisible:He,notificationCountDetails:Oe,isExpenseAutomationEnabledForUser:J&&ga(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ze,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=K===0&&W>0?"notifications/comments":"notifications/tasks";me(t)&&(e=K===0&&W>0?"../../notifications/comments":"../../notifications/tasks");const u=w(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(t.state?.pathnameStackToGoBack,t.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),a==null)return;if(e.type==="ai_cfo"){const f=w(t.state?.pathnameStackToGoBack,t.pathname);return M.trackAICFOChatScreenStateChanged("viewed","left_menu",L??null,null),ke?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):void(La(ge)?o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}}):Ee?Ce(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=w(t.state?.pathnameStackToGoBack,t.pathname),l=e.type,p=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&M.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),p&&E[n.tenantId]!=null){const f=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const G=ja(e.type);be(e.type)?(L!=null&&b(ya()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${G}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{ye(Va.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let p=`/${encodeURIComponent(u)}/`;const G=N(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Oa(l)?p+="settings/my_profile":be(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":G?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(b(ka(e.tenantId)),b(Ca(h.userId,e.tenantId,h.zeniSessionId)));const f=e;M.trackCompanySwitch(f.companyId,f.companyName,f.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Qe,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{b(Ea({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:De,isTaskManagerAccessEnabled:xe,thanksGivingAnimationEnabled:ve,christmasAnimationEnabled:$e,newYearAnimationEnabled:Be})})}),Wa=m=>{const d=pe(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-encrypted-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ta(o)&&aa(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return P.jsx(Ya,{...m,...t})};export{Wa as M};
@@ -0,0 +1 @@
1
+ import{j as e}from"./liveblocks-BNlilBXq.js";import{l as r,n}from"./core-BeBBWfga.js";import{E as i}from"./index-MRloqTru.js";import"./mui-CnlqDSRv.js";import"./sentry-CH2pQ4tM.js";import"./zeni-epic-state-5fEaVO5b.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.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]="e4d34e1e-5354-4717-bd0a-1420a4a7a4f5",o._sentryDebugIdIdentifier="sentry-dbid-e4d34e1e-5354-4717-bd0a-1420a4a7a4f5")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
@@ -1 +1 @@
1
- import{l as ct,a as dt,m as mt,j as E}from"./liveblocks-BEuWW_o5.js";import lt from"./NotFoundScreen-CcPbqGwL.js";import{a as k}from"./sentry-DsHW_1mX.js";import{l as ft,u as ut,i as ht,h as pt,g as S,n as kt,o as gt,p as Z}from"./core-lbYY5woS.js";import{cr as St,e$ as J,eQ as Y,fe as bt,f6 as b,PS as K,fa as m,e_ as y,qY as M,wl as It,PT as Ct,eZ as Tt,fh as yt,r1 as _t,PU as $,bq as F,gQ as x,r5 as H,PV as At,cC as Et,cw as Nt}from"./zeni-epic-state-DsxPZxrE.js";import{V as wt,z as Bt,C as xt,j as Pt,_ as Rt,cy as Ut,n as N,a6 as Dt,cz as vt,a7 as Gt,p as $t}from"./index-CsttCRun.js";import"./mui-hUAh7HgW.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-B6D1gPTU.js";import"./recharts-aApoEySM.js";import"./analytics-BpTmj6-G.js";import"./plaid-DtmQg7la.js";import"./dnd-BBkXCQMv.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW3oQVJC.js";import"./lexical-BoKYrzBU.js";import"./pdf-D4eIZozg.js";import"./utils-AZPawxk4.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]="bdcd35c0-37ce-4c47-b71c-3da1443d6345",t._sentryDebugIdIdentifier="sentry-dbid-bdcd35c0-37ce-4c47-b71c-3da1443d6345")}catch{}})();const Mt=(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)})}),jt=kt(function(t,l){const n=J(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Y(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(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:w,fetchMoreCommentsNotifications:P}=l;return{onNotificationClick:(a,o,d,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"}})}d==="unread"&&t(H("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,d)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){d==="unread"&&(w(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(m(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(K(a,o));const d=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(d,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const d=[];o==="all"?d.push("read","unread"):o!=="mentions"&&d.push(o),t(M("task_manager","dashboard",d))}else P?.()},onUpdateNotificationStatus:(a,o,d,c)=>{a==="tasks"?t(H("task_manager",d,c)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{d==="read"&&(w(r),t($([r],F())))})).then(()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({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(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(m({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(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,w).then(()=>{t($(s,F())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(m({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}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=wt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[w,P]=k.useState(!1),a=S(e=>J(e)),o=S(e=>Y(e)),{useFeatureGate:d}=xt(),{isFeatureEnabled:c}=d(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const O=bt(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),V=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),X=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:q,isLoading:z,fetchMore:Q,isFetchingMore:L,hasFetchedAll:W}=dt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(K(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{X.fetchState==="Not-Started"&&s(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const v=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{v&&U!=="In-Progress"?s(m({fetchState:"In-Progress",error:void 0},"comments")):v||U!=="In-Progress"||s(m({fetchState:"Completed",error:void 0},"comments"))},[v,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&w===!1&&(P(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&z===!1&&B!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const G=q.find(rt=>rt.id===f.threadId);return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(L||W===!0||Q==null||Q(),null)}).filter(f=>f!=null);s(m({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,L,C,W,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];R==="all"?A.push("read","unread"):R!=="mentions"&&A.push(R),s(M("task_manager",T,A,!0))}}}},nt=mt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:O,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(Z,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(Z,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
1
+ import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-BNlilBXq.js";import lt from"./NotFoundScreen-DNyI2qP0.js";import{a as k}from"./sentry-CH2pQ4tM.js";import{l as ft,u as ut,i as ht,h as pt,g as S,n as kt,o as gt,p as W}from"./core-BeBBWfga.js";import{cr as St,e$ as K,eQ as H,fe as bt,f6 as b,PS as O,fa as d,e_ as y,q_ as M,wl as It,PT as Ct,eZ as Tt,fh as yt,r3 as _t,PU as $,bq as F,gQ as x,r7 as J,PV as At,cC as Et,cw as Nt}from"./zeni-epic-state-5fEaVO5b.js";import{V as wt,z as Bt,a as xt,I as Pt,Z as Rt,cy as Ut,q as N,a6 as Dt,cz as vt,a7 as Gt,p as $t}from"./index-MRloqTru.js";import"./mui-CnlqDSRv.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-DVBsWNa4.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.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]="9094f1d5-d4c0-4870-a3c6-5abb548b74b0",t._sentryDebugIdIdentifier="sentry-dbid-9094f1d5-d4c0-4870-a3c6-5abb548b74b0")}catch{}})();const Mt=(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)})}),jt=kt(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(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:w,fetchMoreCommentsNotifications:P}=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(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(w(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(O(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(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 P?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(w(r),t($([r],F())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({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")),Mt(s,w).then(()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({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}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=wt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[w,P]=k.useState(!1),a=S(e=>K(e)),o=S(e=>H(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Pt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Rt({isDataReady:!0});const X=bt(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),V=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),Y=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:q,isLoading:z,fetchMore:Q,isFetchingMore:Z,hasFetchedAll:L}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(O(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Y.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const v=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{v&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):v||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[v,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&w===!1&&(P(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&z===!1&&B!=null&&q!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const G=q.find(rt=>rt.id===f.threadId);return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(Z||L===!0||Q==null||Q(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,Z,C,L,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];R==="all"?A.push("read","unread"):R!=="mentions"&&A.push(R),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:X,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(W,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(W,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-BEuWW_o5.js";import{a as r}from"./sentry-DsHW_1mX.js";import{h as A,u as C,g as o,N as J}from"./core-lbYY5woS.js";import{JK as M,eQ as P,f5 as j,JL as x,JM as z,JN as D,JO as L,mT as N,IG as R}from"./zeni-epic-state-DsxPZxrE.js";import{z as h,A as I}from"./index-CsttCRun.js";import"./mui-hUAh7HgW.js";import"./recharts-aApoEySM.js";import"./analytics-BpTmj6-G.js";import"./plaid-DtmQg7la.js";import"./dnd-BBkXCQMv.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW3oQVJC.js";import"./lexical-BoKYrzBU.js";import"./pdf-D4eIZozg.js";import"./utils-AZPawxk4.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="b9df0c40-a6ca-4e75-90d4-aae6344c1104",n._sentryDebugIdIdentifier="sentry-dbid-b9df0c40-a6ca-4e75-90d4-aae6344c1104")}catch{}})();function ee(){const n=A(),a=C(),{params:t,error:i}=r.useMemo(()=>M(a.search),[a.search]),w=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),m=o(e=>P(e)),l=o(e=>j(e)),d=o(e=>e.tenantState.fetchState),y=o(x),v=o(z),c=o(D),[S,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(N(s.userId,s.zeniSessionId??void 0))))},[p,s,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),u=S??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(R(s.userId,s.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(J,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
1
+ import{j as f}from"./liveblocks-BNlilBXq.js";import{a as r}from"./sentry-CH2pQ4tM.js";import{h as A,u as C,g as o,N as J}from"./core-BeBBWfga.js";import{JK as M,eQ as P,f5 as j,JL as x,JM as z,JN as D,JO as L,mT as N,IG as R}from"./zeni-epic-state-5fEaVO5b.js";import{z as h,A as I}from"./index-MRloqTru.js";import"./mui-CnlqDSRv.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="b9df0c40-a6ca-4e75-90d4-aae6344c1104",n._sentryDebugIdIdentifier="sentry-dbid-b9df0c40-a6ca-4e75-90d4-aae6344c1104")}catch{}})();function ee(){const n=A(),a=C(),{params:t,error:i}=r.useMemo(()=>M(a.search),[a.search]),w=r.useMemo(()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application",[a.search,t]),p=h.isSignedIn(),s=h.getSignedInUser(),m=o(e=>P(e)),l=o(e=>j(e)),d=o(e=>e.tenantState.fetchState),y=o(x),v=o(z),c=o(D),[S,b]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,a.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{p&&s!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(N(s.userId,s.zeniSessionId??void 0))))},[p,s,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const U=r.useMemo(()=>{if(m?.tenantId!=null)return m.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[m?.tenantId,l]),u=S??U;return i!=null?f.jsx(I,{variant:"invalid_params",paramsError:i}):p?f.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:E??v,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(R(s.userId,s.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):f.jsx(J,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -0,0 +1 @@
1
+ import{j as n}from"./liveblocks-BNlilBXq.js";import{l as V,h as Z,u as z,i as Q,g as d,n as H,o as J,p as I}from"./core-BeBBWfga.js";import{eQ as v,qO as P,qm as X,Kg as U,qh as T,bv as ee,bn as ae,bT as te,qi as se,Kh as oe,K2 as C,dE as re,ui as ne,Ki as ie,uF as ce,eY as le,eW as de}from"./zeni-epic-state-5fEaVO5b.js";import{z as me,V as fe,Z as pe,d as ue,a as q,I as M,v as he,f as w,ao as ge,q as Fe}from"./index-MRloqTru.js";import"./mui-CnlqDSRv.js";import be from"./NotFoundScreen-DNyI2qP0.js";import{F as Ie}from"./FeaturePreviewScreen-RHOSmVgb.js";import{a as g}from"./sentry-CH2pQ4tM.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-DVBsWNa4.js";import{u as Te}from"./useInitialThreadRequest-DA9qj7yj.js";import{t as Se}from"./routePaths-Dmzz0h9N.js";import{M as ye}from"./MobileAppDrawer-L1vMrpyU.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="e56dfbea-90fb-451c-a57a-502ec46124b2",s._sentryDebugIdIdentifier="sentry-dbid-e56dfbea-90fb-451c-a57a-502ec46124b2")}catch{}})();const S=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=H(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(U(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(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=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function R(){const s=V(),e=Z(),a=z(),{forecastId:o,tenantEmailDomain:r}=Q(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),$=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:W,onAskAiCfoClick:B}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,j,O)=>j!=null?f.forecasts.findIndex(b=>b.id===j):O!=null?f.forecasts.findIndex(b=>b.id===O):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(U(c.forecasts[t].id,t)),S(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(T(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,T,F]);const D=ue(),N=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:Y}=q(),{isFeatureEnabled:E}=Y(M.isReportsCommentingEnabled),_=Te(E?y?.companyId:void 0,{clearParams:l&&m}),[G,K]=g.useState(!1),L=t=>{K(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:L}),n.jsx(ke,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:N,isAiCfoAccessEnabled:W,onAskAiCfoClick:B,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:_,onClickMenuIcon:()=>{L(!0)}})]})}function Ke(){const s=d(i=>v(i)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(J,{children:[n.jsx(I,{path:"/",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(R,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ke as PandLWithForecastRoutes,Ke as default};
@@ -1,22 +1,22 @@
1
- import{j as s}from"./liveblocks-BEuWW_o5.js";import{Kb as te,eQ as Y,jD as G,eY as q,eW as ne,HD as J,JR as oe,tm as Ee,Kc as N,ta as ke,tv as Ie,tp as ie,te as re,tt as Pe,tq as je,Kd as le,v4 as ve,Ke as Le,fB as Te,Kf as $,tj as de,th as ce,ty as Fe,c2 as Re}from"./zeni-epic-state-DsxPZxrE.js";import{K as pe,C as X,j as E,z as H,a9 as ue,y as me,ak as ge,al as Ae,w as he,o as A,Q as fe,D as Ce,am as Oe,V as Ve,_ as Ue,R as Be,c as be,e as Ze,n as Ke,an as $e,I as _e}from"./index-CsttCRun.js";import{D as ye,n as W,S as we}from"./mui-hUAh7HgW.js";import ae from"./NotFoundScreen-CcPbqGwL.js";import{a as r}from"./sentry-DsHW_1mX.js";import{h as ee,i as ze,g as m,l as Ge,u as He,n as We,o as se,p as K}from"./core-lbYY5woS.js";import{u as Qe}from"./useAskAiCfoHostNavButtonProps-B6D1gPTU.js";import{M as Me}from"./MobileAppDrawer-3z1V-CUc.js";import"./recharts-aApoEySM.js";import"./analytics-BpTmj6-G.js";import"./plaid-DtmQg7la.js";import"./dnd-BBkXCQMv.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW3oQVJC.js";import"./lexical-BoKYrzBU.js";import"./pdf-D4eIZozg.js";import"./utils-AZPawxk4.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="aa73f61c-8acc-41b5-8fb1-b4e61d74bb42",a._sentryDebugIdIdentifier="sentry-dbid-aa73f61c-8acc-41b5-8fb1-b4e61d74bb42")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Ye=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>Y(e)),D=m(e=>G(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),L=ne(u),T=J(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),v=ue(u,j,k),{isFeatureEnabled:R}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:T,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(T))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Ae,{...b})]})})},qe=W(we)`
1
+ import{j as s}from"./liveblocks-BNlilBXq.js";import{Kb as te,eQ as Q,jD as G,eY as q,eW as ne,HD as J,JR as oe,to as Ee,Kc as N,tc as ke,tx as Ie,tr as ie,tg as re,tv as Pe,ts as je,Kd as le,v4 as ve,Ke as Le,fB as Te,Kf as $,tl as de,tj as ce,tA as Fe,c2 as Ae}from"./zeni-epic-state-5fEaVO5b.js";import{K as pe,a as X,I as E,z as H,a9 as ue,y as me,ak as ge,al as Re,w as he,o as R,Y as fe,O as be,am as Oe,V as Ve,Z as Ue,v as Be,f as Ce,h as Ze,q as Ke,an as $e,d as _e}from"./index-MRloqTru.js";import{D as ye,n as W,S as we}from"./mui-CnlqDSRv.js";import ae from"./NotFoundScreen-DNyI2qP0.js";import{a as r}from"./sentry-CH2pQ4tM.js";import{h as ee,i as ze,g as m,l as Ge,u as He,n as We,o as se,p as K}from"./core-BeBBWfga.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-DVBsWNa4.js";import{M as Me}from"./MobileAppDrawer-L1vMrpyU.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="8b73fc4f-1eab-42d4-abac-34bd114dcb5f",a._sentryDebugIdIdentifier="sentry-dbid-8b73fc4f-1eab-42d4-abac-34bd114dcb5f")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=be.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=ze(),d=m(e=>te(e)),u=m(e=>Q(e)),D=m(e=>G(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=q(k,u),L=ne(u),T=J(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const b=()=>{p(N()),y()},F=()=>{O===!0?w(!0):b()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),v=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),C={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:T,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:b,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(T))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),b()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&b()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...C})]})})},qe=W(we)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
5
5
  `,Se=W(fe.H6Regular)`
6
- margin-top: ${A.sp7};
7
- padding-left: ${A.sp8};
8
- padding-right: ${A.sp8};
6
+ margin-top: ${R.sp7};
7
+ padding-left: ${R.sp8};
8
+ padding-right: ${R.sp8};
9
9
  color: ${a=>a.theme.colors.primary};
10
10
  word-break: break-word;
11
11
  `,De=W(fe.LargeRegularSp)`
12
12
  color: ${a=>a.theme.colors.hero};
13
- padding-left: ${A.sp8};
14
- padding-right: ${A.sp8};
13
+ padding-left: ${R.sp8};
14
+ padding-right: ${R.sp8};
15
15
  margin-bottom: 30px;
16
- margin-top: ${A.sp4};
16
+ margin-top: ${R.sp4};
17
17
  white-space: pre-line;
18
- `,Je={overlayWidth:new he(100,100,48)},z=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>Y(i)),u=m(i=>G(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=q(f,d),P=ne(d),L=J(d),T=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),v=ue(d,j,f),{isFeatureEnabled:R}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:R===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:z.discardTitle}),descriptionComponent:s.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(we)`
18
+ `,Je={overlayWidth:new he(100,100,48)},z=be.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>Q(i)),u=m(i=>G(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=q(f,d),P=ne(d),L=J(d),T=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},b=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),v=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),C={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:b,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:v===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Je.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:b,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:z.discardTitle}),descriptionComponent:s.jsx(De,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:F}):null,s.jsx(Oe,{...C})]})})},ea=W(we)`
19
19
  display: flex;
20
20
  min-height: 100%;
21
21
  flex-direction: column;
22
- `,aa=We(function(a,t){const l=le(a),n=H.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a($({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a($({searchText:o}))}}}})($e);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),h=m(e=>Y(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>G(e)),I=!q(O,h)&&V,w=J(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[T,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=Qe({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>ve(e.classState,e.classListState)),v=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),R=m(e=>Te(e)),b=h?.companyId;r.useEffect(()=>{u&&T===c.uiState.mode||!o||(n($({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n($({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:v,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Ye,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:v,companyPassportView:R,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:v,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,Q)=>{n($({sortKey:e,sortOrder:Q}))},onRowClick:e=>{const Q=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Ke(g.state?.pathnameStackToGoBack,g.pathname);l(Q,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Re(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(K,{path:"/",element:s.jsx(M,{})}),s.jsx(K,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx(K,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx(K,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(K,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
22
+ `,aa=We(function(a,t){const l=le(a),n=H.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(a),analytics:Ce}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a($({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a($({searchText:o}))}}}})($e);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=Ge(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),h=m(e=>Q(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>G(e)),I=!q(O,h)&&V,w=J(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,L]=r.useState(!1),[T,U]=r.useState("off"),[B,x]=r.useState(!1),b=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=Ye({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>ve(e.classState,e.classListState)),v=m(e=>Le(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Te(e)),C=h?.companyId;r.useEffect(()=>{u&&T===c.uiState.mode||!o||(n($({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{C!=null&&o&&n(ce(C,I))},[C,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n($({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:Ce,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:v,companyPassportView:A,classListView:j,companyId:C,mode:c.uiState.mode}):null,P===!0?s.jsx(Qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:v,companyPassportView:A,classListView:j,companyId:C,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:B,handleDrawerToggle:b}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:C,shouldFetchClasses:I,classList:j,managersView:v,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,Y)=>{n($({sortKey:e,sortOrder:Y}))},onRowClick:e=>{const Y=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=Ke(g.state?.pathnameStackToGoBack,g.pathname);l(Y,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{b(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(K,{path:"/",element:s.jsx(M,{})}),s.jsx(K,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx(K,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx(K,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(K,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-BNlilBXq.js";import E from"./NotFoundScreen-DNyI2qP0.js";import{a as r}from"./sentry-CH2pQ4tM.js";import{l as _,u as v,g as p,i as M,h as P,N as U,n as z,o as O,p as h}from"./core-BeBBWfga.js";import{eQ as B,PW as b,bo as F,bn as N,hk as Q,gQ as V}from"./zeni-epic-state-5fEaVO5b.js";import{R as W,z as I,Z,cA as $}from"./index-MRloqTru.js";import"./mui-CnlqDSRv.js";import{u as q}from"./useAskAiCfoHostNavButtonProps-DVBsWNa4.js";import{M as G}from"./MobileAppDrawer-L1vMrpyU.js";import"./recharts-C5E4pGR4.js";import"./analytics-DYzLSwIZ.js";import"./plaid-CBNEU__p.js";import"./dnd-UF85x-t5.js";import"./stripe-DMRn4zHo.js";import"./lottie-DbxhFPB1.js";import"./lexical-C_ylRY16.js";import"./pdf-Dp2xnkno.js";import"./utils-C2zbYn9G.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]="3fd9517e-a697-4d04-8c5c-20723c0136c3",e._sentryDebugIdIdentifier="sentry-dbid-3fd9517e-a697-4d04-8c5c-20723c0136c3")}catch{}})();const H=z(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})($),J=()=>{const e=_(),t=v(),c=W(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:u}=M(),f=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback((a,i,T)=>{f(Q({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(f(V({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),R=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:j,onAskAiCfoClick:A}=q({mobileExploreReferrer:"Performance"});return Z({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(G,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(H,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:u,onReload:D,onTimeRangeSelect:R,handleDrawerToggle:g,isAiCfoAccessEnabled:j,onAskAiCfoClick:A})]}):s.jsx(U,{to:`/${u}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(J,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1 +1 @@
1
- import{a as h,b as t}from"./sentry-DsHW_1mX.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-CH2pQ4tM.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,4 +1,4 @@
1
- import{j as Ol}from"./liveblocks-BEuWW_o5.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-DsHW_1mX.js";import{L as dt,bT as Tc,eQ as Ac,Jl as Rc,JP as kl,c2 as Tl,fm as Al,fn as Rl}from"./zeni-epic-state-DsxPZxrE.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,n as Yt,o as ue,p as Dl}from"./utils-AZPawxk4.js";import{r as un}from"./empty-DuvQh38L.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CQ6bcQhi.js";import{r as Gl}from"./index-DBlyACY-.js";import{r as zl}from"./index-9bPjdOkz.js";import{l as Zl,u as Hl,h as Vl,g as En,n as Yl}from"./core-lbYY5woS.js";import{u as Kl,z as Pc,L as Wl,F as Jl,G as Xl,h as Ql,c as tf}from"./index-CsttCRun.js";import"./mui-hUAh7HgW.js";import{d as Pe}from"./decodeURIComponentSafe-Bt7TpCfB.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="fd81b6b2-75f9-4c83-9d87-4ce3169a1db9",t._sentryDebugIdIdentifier="sentry-dbid-fd81b6b2-75f9-4c83-9d87-4ce3169a1db9")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
1
+ import{j as Ol}from"./liveblocks-BNlilBXq.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CH2pQ4tM.js";import{L as dt,bT as Tc,eQ as Ac,Jl as Rc,JP as kl,c2 as Tl,fm as Al,fn as Rl}from"./zeni-epic-state-5fEaVO5b.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,n as Yt,o as ue,p as Dl}from"./utils-C2zbYn9G.js";import{r as un}from"./empty-BaCT02t1.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-BEgmFXIU.js";import{r as Gl}from"./index-DS8xe4Yw.js";import{r as zl}from"./index-_ohVjyws.js";import{l as Zl,u as Hl,h as Vl,g as En,n as Yl}from"./core-BeBBWfga.js";import{u as Kl,z as Pc,L as Wl,C as Jl,D as Xl,j as Ql,f as tf}from"./index-MRloqTru.js";import"./mui-CnlqDSRv.js";import{d as Pe}from"./decodeURIComponentSafe-OtMMCMcE.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="55364a37-c411-4e87-9c8a-5872769619d1",t._sentryDebugIdIdentifier="sentry-dbid-55364a37-c411-4e87-9c8a-5872769619d1")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
2
2
  `),I=_(E).split(`
3
3
  `),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
4
4