@zeniai/web-app-ui 5.3.31-dev → 5.3.31-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/assets/AccountMappingScreen-D5SnfpgG.js +9 -0
  2. package/dist/assets/AddressRoutes-DxNwOKyW.js +1 -0
  3. package/dist/assets/{AddressScreen-Dmypz8Cm.js → AddressScreen-lw7TKwyq.js} +2 -2
  4. package/dist/assets/{AiCfoScreen-DNghBGiO.js → AiCfoScreen-DCL1Hzq-.js} +1 -1
  5. package/dist/assets/{AppDrawer-kOTtyyGv.js → AppDrawer-BIgFOgvw.js} +3 -3
  6. package/dist/assets/{BillPayApprovalRoutes--ALQ35-1.js → BillPayApprovalRoutes-CXiRj9PG.js} +1 -1
  7. package/dist/assets/{BillPayRoutes-BcTRlRv8.js → BillPayRoutes-DOVyvcf4.js} +18 -18
  8. package/dist/assets/BusinessVerificationPageScreen-B3ZQAAhl.js +9 -0
  9. package/dist/assets/{CardsAiCfoScreen-C_lk15md.js → CardsAiCfoScreen-yIiz5h6K.js} +2 -2
  10. package/dist/assets/{ChargeCardRoutes-BjIdSbvb.js → ChargeCardRoutes-DiWZ-ZiS.js} +7 -7
  11. package/dist/assets/CompanyPassportScreen-CZzl3z9T.js +1 -0
  12. package/dist/assets/ConnectionAuthScreen-C42jakDq.js +11 -0
  13. package/dist/assets/CustomerOnboardingAuthScreen-C14qTLI_.js +1 -0
  14. package/dist/assets/CustomerOnboardingRoutes-O_YOoRN1.js +30 -0
  15. package/dist/assets/{DashboardRoutes-BruAIMYU.js → DashboardRoutes-DHewAcPg.js} +3 -3
  16. package/dist/assets/{DefaultTenantHome-BtIFl_77.js → DefaultTenantHome-BqNVIe7c.js} +1 -1
  17. package/dist/assets/DomesticWireDetailScreen-CFzZ2YyI.js +18 -0
  18. package/dist/assets/{DrawerScreen-CbY0_Vl5.js → DrawerScreen-C-8KLRJM.js} +1 -1
  19. package/dist/assets/EntityDetailRoutes-0kc30WGx.js +1 -0
  20. package/dist/assets/{ExpenseAutomationRoutes-Dll0r-g6.js → ExpenseAutomationRoutes-eoCnwcrW.js} +4 -4
  21. package/dist/assets/FeaturePreviewScreen-gRTJmh4o.js +1 -0
  22. package/dist/assets/HubSpotOAuthCallbackScreen-D8IxiMzs.js +1 -0
  23. package/dist/assets/{InboxNotificationsProvider-55rQDTXA.js → InboxNotificationsProvider-5qCqmUI8.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-B8ytNofm.js → InvoicingRoutes-CBnQHbV_.js} +2 -2
  25. package/dist/assets/{MagicLinkRoutes-DbYU9yxF.js → MagicLinkRoutes-eKUojX66.js} +7 -7
  26. package/dist/assets/MagicLinkSignInScreen-D9n4aCxk.js +12 -0
  27. package/dist/assets/MobileAppDrawer-Cwqn_b45.js +1 -0
  28. package/dist/assets/NotFoundScreen-75_Gn0cI.js +1 -0
  29. package/dist/assets/NotificationRoutes-BrErGUvj.js +1 -0
  30. package/dist/assets/OAuthConsentScreen-CicUQ_O4.js +1 -0
  31. package/dist/assets/{PandLWithForecastRoutes-Diz_Rn8O.js → PandLWithForecastRoutes-CXuH6-lq.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-BcSDg2Q0.js → PaymentLinkScreen-Cb7u9fKa.js} +4 -4
  33. package/dist/assets/PeopleRoutes-DbLiKITu.js +22 -0
  34. package/dist/assets/PerformanceRoutes-Cs1f1cGn.js +1 -0
  35. package/dist/assets/{Preview-DNAybQkC.js → Preview-CJfcRzEF.js} +1 -1
  36. package/dist/assets/QBOConnectionScreen-DMWIfg2I.js +100 -0
  37. package/dist/assets/ReimbursementApprovalRoutes-D6JXZy7H.js +1 -0
  38. package/dist/assets/ReimbursementApprovalRuleDetailScreen-DfsoUCdz.js +1 -0
  39. package/dist/assets/ReimbursementRoutes-wJV0bMxF.js +68 -0
  40. package/dist/assets/{ReportsRoutes-iapNY-Ca.js → ReportsRoutes-DiYTJu27.js} +1 -1
  41. package/dist/assets/RewardsRoutes-hsuwRKfr.js +1 -0
  42. package/dist/assets/ScreenRoutes-Dd_1LkfX.js +2 -0
  43. package/dist/assets/{SettingsRoutes-DU6XdEOY.js → SettingsRoutes-BACEcxdy.js} +7 -7
  44. package/dist/assets/{SetupPagesScreen-CPUD_j1y.js → SetupPagesScreen-BjTv-gJ-.js} +5 -5
  45. package/dist/assets/SignInScreen-uIYYM64L.js +1 -0
  46. package/dist/assets/SignOutScreen-CDaf30dp.js +9 -0
  47. package/dist/assets/TaskListScreen-J9jUMTBb.js +9 -0
  48. package/dist/assets/TaskRoutes-t8wf1y1X.js +9 -0
  49. package/dist/assets/TransactionDetailRoutes-Cfne4xm1.js +1 -0
  50. package/dist/assets/{TransactionDetailScreen-srWo_3sK.js → TransactionDetailScreen-CYqaDKU1.js} +2 -2
  51. package/dist/assets/TransactionListRoutes-CowKNLk5.js +1 -0
  52. package/dist/assets/TreasuryRoutes-Dt8Cgba2.js +37 -0
  53. package/dist/assets/{VendorsRoutes-CoiOEvIl.js → VendorsRoutes-DHhjevDF.js} +20 -20
  54. package/dist/assets/WiseConfirmationScreen-BluQRSGS.js +12 -0
  55. package/dist/assets/{ZeniAccountRoutes-BjLND6jg.js → ZeniAccountRoutes-BI1Dy1bu.js} +9 -9
  56. package/dist/assets/ZeniAccountStatementScreen-y7BZNAye.js +9 -0
  57. package/dist/assets/{accountMappingHelper-CAg2qsF3.js → accountMappingHelper-B06MQSKH.js} +1 -1
  58. package/dist/assets/{analytics-CqoRAkB1.js → analytics-DZ_IK-Kq.js} +1 -1
  59. package/dist/assets/{analyticsHelper-Cjtujqyf.js → analyticsHelper-CcegxGUw.js} +1 -1
  60. package/dist/assets/{core-CiFsHd3i.js → core-BZ1rdEBJ.js} +1 -1
  61. package/dist/assets/{decodeURIComponentSafe-FYjI-TwW.js → decodeURIComponentSafe-Bqc80Z_5.js} +1 -1
  62. package/dist/assets/{dnd-jcX4BW0a.js → dnd-DzXS-Yl8.js} +1 -1
  63. package/dist/assets/{empty-4iGv0vIv.js → empty-AsM4qApo.js} +1 -1
  64. package/dist/assets/{empty-DSab5moc.js → empty-cCNdrc28.js} +1 -1
  65. package/dist/assets/{emptyVideoElement-BSwv6rHf.js → emptyVideoElement-Rzrwu9a7.js} +1 -1
  66. package/dist/assets/epic-Bave6uHn.js +2 -0
  67. package/dist/assets/{expenseAutomationHelper-R2jHKv-Z.js → expenseAutomationHelper-L0bEaNW0.js} +1 -1
  68. package/dist/assets/{getLocaleForTenant-CRduVQsY.js → getLocaleForTenant-pNMINwIt.js} +1 -1
  69. package/dist/assets/{index-CVbu1_bp.js → index-BCqMFJBd.js} +1 -1
  70. package/dist/assets/{index-D6dzsKZ7.js → index-BtxI1s-C.js} +1 -1
  71. package/dist/assets/{index-BJOxGHxN.js → index-C2_5ePPm.js} +2 -2
  72. package/dist/assets/{index-0sENwUb_.js → index-CD2K4LCZ.js} +1 -1
  73. package/dist/assets/{index-juRht-9c.js → index-CTFYwhi_.js} +30310 -31275
  74. package/dist/assets/{index-DGRhh-da.js → index-D6ajdYmw.js} +1 -1
  75. package/dist/assets/{index-2FqIUc6q.js → index-DUwNnz-H.js} +1 -1
  76. package/dist/assets/{index-Cz99TrBA.js → index-s3SqlTSi.js} +1 -1
  77. package/dist/assets/{lexical-DBiumTDC.js → lexical-CXbrQPvX.js} +1 -1
  78. package/dist/assets/{liveblocks-CkQ2CY6T.js → liveblocks-BlM-yJIK.js} +1 -1
  79. package/dist/assets/{lottie-cUBeCDOE.js → lottie-BRnok4t-.js} +1 -1
  80. package/dist/assets/{mui-FQy08n5j.js → mui-BFHFLIBn.js} +1 -1
  81. package/dist/assets/{pathToGoBack-DWIhT07R.js → pathToGoBack-3nPRQATL.js} +1 -1
  82. package/dist/assets/{pdf-C6cPvWx8.js → pdf-CCE45QO9.js} +3 -3
  83. package/dist/assets/{pdf-lib-C9DR7g8H.js → pdf-lib-C7pdf7jS.js} +1 -1
  84. package/dist/assets/{plaid-Dw5LGskq.js → plaid-B4PUsiXy.js} +1 -1
  85. package/dist/assets/{pusher-Bs1ItrSl.js → pusher-CXiKJSqU.js} +1 -1
  86. package/dist/assets/{react-BD9-MMqW.js → react-B1sjzw5V.js} +1 -1
  87. package/dist/assets/{react-BzoedhUW.js → react-BS78iUa1.js} +1 -1
  88. package/dist/assets/{react-N2ByZQ0u.js → react-CfJUXWQ6.js} +1 -1
  89. package/dist/assets/{react-B-yGKA4G.js → react-DP4ZD9OQ.js} +1 -1
  90. package/dist/assets/{react-BK8OyR5e.js → react-DSLLCnPg.js} +1 -1
  91. package/dist/assets/{react-Rj21KKGh.js → react-DyJyDxfJ.js} +1 -1
  92. package/dist/assets/{recharts-CYbL6OhC.js → recharts-Cp8vAfrX.js} +1 -1
  93. package/dist/assets/{routePaths-DqksJ4i_.js → routePaths-B_N5gTZd.js} +1 -1
  94. package/dist/assets/{sentry-Lj2WEO6K.js → sentry-CoUvtkTT.js} +1 -1
  95. package/dist/assets/{url-Bk85P8pL.js → url-CnOwCc5F.js} +1 -1
  96. package/dist/assets/url-DpG-51AL.js +6 -0
  97. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-B3XyU0Fo.js → useAiCfoDashboardSuggestedQuestionsChips-RsZy7Pno.js} +1 -1
  98. package/dist/assets/useAskAiCfoHostNavButtonProps-fRSEHozy.js +1 -0
  99. package/dist/assets/{useChargeCardPusherEvents-YQlWLN09.js → useChargeCardPusherEvents-BUm4XlrP.js} +1 -1
  100. package/dist/assets/{useDeviceId-CWOFj37E.js → useDeviceId-Cm20XW3g.js} +1 -1
  101. package/dist/assets/useEmailConnectResultRefresh-BHeKh6Ep.js +1 -0
  102. package/dist/assets/{useInitialThreadRequest-D-SxLs4P.js → useInitialThreadRequest-DLJzdGrt.js} +1 -1
  103. package/dist/assets/useTaskManagerAccess-D9-djiWT.js +1 -0
  104. package/dist/assets/utils-BKpHrBI5.js +36 -0
  105. package/dist/assets/{withTransactionSidePanel-BjLmCRfl.js → withTransactionSidePanel-DeFt4H26.js} +2 -2
  106. package/dist/assets/{zeni-epic-state-BdFiPfcm.js → zeni-epic-state-CRmviUHA.js} +3 -3
  107. package/dist/index.html +1 -1
  108. package/package.json +1 -1
  109. package/dist/assets/AccountMappingScreen-UdzIeE_v.js +0 -9
  110. package/dist/assets/AddressRoutes-CaXv_Hc-.js +0 -1
  111. package/dist/assets/BusinessVerificationPageScreen-DzWgqXwG.js +0 -9
  112. package/dist/assets/CompanyPassportScreen-BKrZbZ6U.js +0 -1
  113. package/dist/assets/ConnectionAuthScreen-Dzixugfp.js +0 -11
  114. package/dist/assets/CustomerOnboardingAuthScreen-D31TaCjo.js +0 -1
  115. package/dist/assets/CustomerOnboardingRoutes-3cZyVkRN.js +0 -30
  116. package/dist/assets/DomesticWireDetailScreen-DhMVIfNi.js +0 -18
  117. package/dist/assets/EntityDetailRoutes-DpM6LjT5.js +0 -1
  118. package/dist/assets/FeaturePreviewScreen-DRMNz052.js +0 -1
  119. package/dist/assets/HubSpotOAuthCallbackScreen-CaSUfoGO.js +0 -1
  120. package/dist/assets/MagicLinkSignInScreen-DSGkqzLp.js +0 -12
  121. package/dist/assets/MobileAppDrawer-BAV0ejOs.js +0 -1
  122. package/dist/assets/NotFoundScreen-ButYFiTG.js +0 -1
  123. package/dist/assets/NotificationRoutes-jy7KSYzl.js +0 -1
  124. package/dist/assets/OAuthConsentScreen-4W57tKq2.js +0 -1
  125. package/dist/assets/PeopleRoutes-BsxSMUvq.js +0 -22
  126. package/dist/assets/PerformanceRoutes-DFKVpzlk.js +0 -1
  127. package/dist/assets/QBOConnectionScreen-BmXy-56M.js +0 -100
  128. package/dist/assets/ReimbursementApprovalRoutes-DW0hPEhv.js +0 -1
  129. package/dist/assets/ReimbursementApprovalRuleDetailScreen-lyJcYNIg.js +0 -1
  130. package/dist/assets/ReimbursementRoutes-BQ18gzav.js +0 -68
  131. package/dist/assets/RewardsRoutes-CO35jNo-.js +0 -1
  132. package/dist/assets/ScreenRoutes-B2fNAm1R.js +0 -2
  133. package/dist/assets/SignInScreen-DL2bXt_7.js +0 -1
  134. package/dist/assets/SignOutScreen-DSAHdKNP.js +0 -9
  135. package/dist/assets/TaskListScreen-BH2rdLa7.js +0 -9
  136. package/dist/assets/TaskRoutes-C-JJtR4s.js +0 -9
  137. package/dist/assets/TransactionDetailRoutes-CaIXvpDL.js +0 -1
  138. package/dist/assets/TransactionListRoutes-CpBDr1qT.js +0 -1
  139. package/dist/assets/TreasuryRoutes-Ja8FQwZH.js +0 -37
  140. package/dist/assets/WiseConfirmationScreen-Dj7QUTt6.js +0 -12
  141. package/dist/assets/ZeniAccountStatementScreen-BgOPM6A3.js +0 -9
  142. package/dist/assets/epic-CjiXGW6W.js +0 -2
  143. package/dist/assets/url-DhKb0GNI.js +0 -6
  144. package/dist/assets/useAskAiCfoHostNavButtonProps-Dhoa0fnv.js +0 -1
  145. package/dist/assets/useEmailConnectResultRefresh-DpIv7GW3.js +0 -1
  146. package/dist/assets/useTaskManagerAccess-BrCmQLIc.js +0 -1
  147. package/dist/assets/utils-DsJsAXTJ.js +0 -36
@@ -0,0 +1 @@
1
+ import{m as mt,a as lt,n as ft,j as N}from"./liveblocks-BlM-yJIK.js";import ut from"./NotFoundScreen-75_Gn0cI.js";import{a as k}from"./sentry-CoUvtkTT.js";import{h as ht,g as pt,i as kt,u as gt,j as S,l as St,n as bt,o as Z}from"./core-BZ1rdEBJ.js";import{cz as It,S_ as O,fB as X,g_ as Tt,T2 as b,$V as H,T6 as m,SZ as E,zt as j,F9 as Ct,$W as yt,SY as Et,T8 as At,zy as _t,$X as M,br as F,gd as x,zC as J,$Y as Nt,cL as Bt,cE as wt}from"./zeni-epic-state-CRmviUHA.js";import{ao as xt,e as vt,I as Rt,d as Dt,aq as Pt,dI as Gt,p as B,dJ as Ut,w as $t,dK as Mt,i as Ft,a2 as jt}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-fRSEHozy.js";import{u as zt}from"./useTaskManagerAccess-D9-djiWT.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.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]="b43d38ef-41d5-41a5-96e5-d8b7092fe39e",t._sentryDebugIdIdentifier="sentry-dbid-b43d38ef-41d5-41a5-96e5-d8b7092fe39e")}catch{}})();const Lt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),Wt=St((function(t,l){const n=O(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=X(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&At(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t(M([a],F())));let i=`/${h}/${r[1]}`;const T=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,s)=>{t(E(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(H(a,s));const d=`../${a}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(j("task_manager","dashboard",d))}else R?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(J("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t(M([i],F())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(E({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"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")),Lt(o,I).then((()=>{t(M(o,F())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(E({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=jt(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))($t(Mt)),Yt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=vt(),[I,R]=k.useState(!1),a=S((e=>O(e))),s=S((e=>X(e))),{useFeatureGate:d}=Rt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Pt({isDataReady:!0});const Q=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),z=S((e=>b(e).currentTab)),D=S((e=>b(e).currentSubTab)),tt=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),P=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),et=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Gt().allUsers,{inboxNotifications:w,isLoading:A,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=mt(),{threads:L,isLoading:W,fetchMore:Y,isFetchingMore:q,hasFetchedAll:K}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(z!==c&&c!=null&&o(H(c)),c==null){const e=`../${z}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(A===!1&&C===!0&&s?.companyId!=null&&w!=null){const e=`dashboard_${s.companyId}`,p=w.filter((y=>y.roomId===e&&y.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(E({unreadCount:p},"comments"))}}),[A,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(j("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=A||G===!0||C!==!0||A||G===!0||C!==!0;k.useEffect((()=>{U&&P!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):U||P!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[U,P]),k.useEffect((()=>{o(E({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(R(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(A===!1&&W===!1&&w!=null&&L!=null){const e=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===e)).filter((u=>Ut(u.kind))),y=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const $=L.find((dt=>{return dt.id===((v=u).kind==="thread"?v.threadId:"subjectId"in v?v.subjectId:void 0);var v}));return $!=null?{inboxNotification:{...u,threadId:$.id},thread:$}:(q||K===!0||Y==null||Y(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(E({totalCount:_.length,unreadCount:y.length},"comments")),o(yt(ct))}}),[A,G,q,C,K,W,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ft(p)){const y=Et(p.mode);if(y==="dashboard"&&o(E({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(j("task_manager",y,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=zt(f);return N.jsx(Wt,{tenantEmailDomain:n,loggedInUserRoleMap:Q,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function me(){return N.jsxs(bt,{children:[N.jsx(Z,{path:"/:selectedTab",element:N.jsx(Yt,{})}),N.jsx(Z,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
@@ -0,0 +1 @@
1
+ import{j as m}from"./liveblocks-BlM-yJIK.js";import{a as r}from"./sentry-CoUvtkTT.js";import{u as A,g as C,j as o,N as j}from"./core-BZ1rdEBJ.js";import{Ty as z,fB as P,gi as x,Tz as D,TA as M,TB as R,TC as B,pw as k,Sh as L}from"./zeni-epic-state-CRmviUHA.js";import{z as h,af as I}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.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]="cc779f62-37dc-4c1a-acfa-672e1c6f32db",n._sentryDebugIdIdentifier="sentry-dbid-cc779f62-37dc-4c1a-acfa-672e1c6f32db")}catch{}})();function ee(){const n=A(),a=C(),{params:t,error:i}=r.useMemo((()=>z(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o((e=>P(e))),l=o((e=>x(e))),c=o((e=>e.tenantState.fetchState)),y=o(D),S=o(M),d=o(R),[v,b]=r.useState(null),[T,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(B())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{f&&s!=null&&!g.current&&(c!=="Not-Started"&&c!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[f,s,c,n]),r.useEffect((()=>{d!=null&&d!==""&&(window.location.href=d)}),[d]);const _=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),u=v??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:c!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:T??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(L(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{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -1 +1 @@
1
- import{j as n}from"./liveblocks-CkQ2CY6T.js";import{h as J,u as K,g as Q,i as X,j as d,l as Z,n as ee,o as C}from"./core-CiFsHd3i.js";import{fB as M,zu as R,us as ae,UF as w,un as y,bq as te,b_ as se,uo as oe,UG as re,Un as S,e8 as ne,Dg as ce,UH as ie,DE as le,dV as de,dU as me}from"./zeni-epic-state-BdFiPfcm.js";import{ag as fe,z as pe,ao as ue,aq as he,V as ge,O as q,y as B,a6 as Fe,h as _,aB as be,p as Ie}from"./index-juRht-9c.js";import"./mui-FQy08n5j.js";import Ce from"./NotFoundScreen-ButYFiTG.js";import{F as Se}from"./FeaturePreviewScreen-DRMNz052.js";import{a as g}from"./sentry-Lj2WEO6K.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-Dhoa0fnv.js";import{u as Te}from"./useInitialThreadRequest-D-SxLs4P.js";import{t as De}from"./routePaths-DqksJ4i_.js";import{M as Ae}from"./MobileAppDrawer-BAV0ejOs.js";import"./recharts-CYbL6OhC.js";import"./analytics-CqoRAkB1.js";import"./plaid-Dw5LGskq.js";import"./dnd-jcX4BW0a.js";import"./stripe-cKAAJElX.js";import"./lottie-cUBeCDOE.js";import"./lexical-DBiumTDC.js";import"./pdf-C6cPvWx8.js";import"./utils-DsJsAXTJ.js";import"./InboxNotificationsProvider-55rQDTXA.js";import"./useTaskManagerAccess-BrCmQLIc.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]="bcab5081-9e6f-40ee-ad70-3f86b739c710",s._sentryDebugIdIdentifier="sentry-dbid-bcab5081-9e6f-40ee-ad70-3f86b739c710")}catch{}})();const T=(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})}},xe=Z((function(s){const e=re(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:_}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(y(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=ne(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=De(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=Ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(be);function v(){const s=fe(),e=J(),a=K(),o=Q(),{forecastId:r,tenantEmailDomain:c}=X(),[p,u]=g.useState(!1),[m,D]=g.useState(!1),F=pe.getSignedInUser(),A=d((t=>M(t))),G=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),j=d((t=>t.reportUIOptionsState.selectedForecast)),E=t=>x.pandLByForecastID[t]!=null&&oe(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:V}=ye({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&b)u(!0),l||a(ae());else if(l&&!m){D(!0);const t=((f,P,O)=>P!=null?f.forecasts.findIndex((I=>I.id===P)):O!=null?f.forecasts.findIndex((I=>I.id===O)):f.forecasts.length>0?0:-1)(i,r,j?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.index?(a(w(i.forecasts[t].id,t)),T(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&T(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!E(i.forecasts[t].id)&&b&&a(y(i.forecasts[t].id))}}),[p,u,a,l,i,m,D,R,y,b]);const U=ge(),$=U?.loggedInUserRole!=null&&te(U.loggedInUserRole),{useFeatureGate:W}=q(),{isFeatureEnabled:k}=W(B.isReportsCommentingEnabled),Y=Te(k?A?.companyId:void 0,{clearParams:l&&m}),[z,H]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{H(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:_,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Ae,{isAppContentDrawerOpen:z,handleDrawerToggle:L}),n.jsx(xe,{firstMonthOfFY:G,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:E,meetingUrl:se(h.toString()),hasTransactionAccess:$,isAiCfoAccessEnabled:N,onAskAiCfoClick:V,isReportsCommentingEnabled:k,initialOpenThreadRequest:Y,onClickMenuIcon:()=>{L(!0)}})]})}function Ke(){const s=d((c=>M(c))),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(B.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ke as default};
1
+ import{j as n}from"./liveblocks-BlM-yJIK.js";import{h as J,u as K,g as Q,i as X,j as d,l as Z,n as ee,o as C}from"./core-BZ1rdEBJ.js";import{fB as M,ze as O,ub as ae,Up as q,u6 as T,bq as te,b_ as se,u7 as oe,Uq as re,U7 as S,e8 as ne,D0 as ce,Ur as ie,Do as le,dV as de,dU as me}from"./zeni-epic-state-CRmviUHA.js";import{ag as fe,z as pe,ao as ue,aq as he,U as ge,I as w,d as B,a6 as Fe,k as _,aB as be,p as Ie}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import Ce from"./NotFoundScreen-75_Gn0cI.js";import{F as Se}from"./FeaturePreviewScreen-gRTJmh4o.js";import{a as g}from"./sentry-CoUvtkTT.js";import{u as Te}from"./useAskAiCfoHostNavButtonProps-fRSEHozy.js";import{u as ye}from"./useInitialThreadRequest-DLJzdGrt.js";import{t as De}from"./routePaths-B_N5gTZd.js";import{M as Ae}from"./MobileAppDrawer-Cwqn_b45.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";import"./InboxNotificationsProvider-5qCqmUI8.js";import"./useTaskManagerAccess-D9-djiWT.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]="d2fdd780-3569-47ec-90cd-a730b5e73410",s._sentryDebugIdIdentifier="sentry-dbid-d2fdd780-3569-47ec-90cd-a730b5e73410")}catch{}})();const y=(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})}},xe=Z((function(s){const e=re(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:_}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(q(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=ne(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=De(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=Ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(be);function v(){const s=fe(),e=J(),a=K(),o=Q(),{forecastId:r,tenantEmailDomain:c}=X(),[p,u]=g.useState(!1),[m,D]=g.useState(!1),F=pe.getSignedInUser(),A=d((t=>M(t))),$=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),U=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>x.pandLByForecastID[t]!=null&&oe(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:G}=Te({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&b)u(!0),l||a(ae());else if(l&&!m){D(!0);const t=((f,P,R)=>P!=null?f.forecasts.findIndex((I=>I.id===P)):R!=null?f.forecasts.findIndex((I=>I.id===R)):f.forecasts.length>0?0:-1)(i,r,U?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=U?.index?(a(q(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!k(i.forecasts[t].id)&&b&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,D,O,T,b]);const j=ge(),V=j?.loggedInUserRole!=null&&te(j.loggedInUserRole),{useFeatureGate:W}=w(),{isFeatureEnabled:E}=W(B.isReportsCommentingEnabled),Y=ye(E?A?.companyId:void 0,{clearParams:l&&m}),[z,H]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{H(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:_,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Ae,{isAppContentDrawerOpen:z,handleDrawerToggle:L}),n.jsx(xe,{firstMonthOfFY:$,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:k,meetingUrl:se(h.toString()),hasTransactionAccess:V,isAiCfoAccessEnabled:N,onAskAiCfoClick:G,isReportsCommentingEnabled:E,initialOpenThreadRequest:Y,onClickMenuIcon:()=>{L(!0)}})]})}function Ke(){const s=d((c=>M(c))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(B.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ke as default};
@@ -1,13 +1,13 @@
1
- import{j as r}from"./liveblocks-CkQ2CY6T.js";import{a as p}from"./sentry-Lj2WEO6K.js";import{D as c,F as a,a7 as m,ab as f,ac as h}from"./index-juRht-9c.js";import"./mui-FQy08n5j.js";import{i as y}from"./core-CiFsHd3i.js";import"./zeni-epic-state-BdFiPfcm.js";import"./recharts-CYbL6OhC.js";import"./analytics-CqoRAkB1.js";import"./plaid-Dw5LGskq.js";import"./dnd-jcX4BW0a.js";import"./stripe-cKAAJElX.js";import"./lottie-cUBeCDOE.js";import"./lexical-DBiumTDC.js";import"./pdf-C6cPvWx8.js";import"./utils-DsJsAXTJ.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]="9e1047ae-8849-4c6d-8923-2d42943e2912",e._sentryDebugIdIdentifier="sentry-dbid-9e1047ae-8849-4c6d-8923-2d42943e2912")}catch{}})();const g=c("div")`
1
+ import{j as r}from"./liveblocks-BlM-yJIK.js";import{a as p}from"./sentry-CoUvtkTT.js";import{J as c,K as a,a7 as m,ab as f,ac as h}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import{i as y}from"./core-BZ1rdEBJ.js";import"./zeni-epic-state-CRmviUHA.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.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]="2012cfb4-548c-4aab-9220-efd79b933e1c",e._sentryDebugIdIdentifier="sentry-dbid-2012cfb4-548c-4aab-9220-efd79b933e1c")}catch{}})();const g=c("div")`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
5
5
  min-height: 100vh;
6
6
  background-color: ${e=>e.theme.colors.grey4};
7
- `,k=c("header")`
7
+ `,b=c("header")`
8
8
  flex-shrink: 0;
9
9
  padding: ${a.sp3} ${a.sp4};
10
- `,b=c(m)`
10
+ `,k=c(m)`
11
11
  width: ${a.sp4};
12
12
  height: ${a.sp4};
13
13
  color: ${e=>e.theme.colors.brandColorJade};
@@ -18,4 +18,4 @@ import{j as r}from"./liveblocks-CkQ2CY6T.js";import{a as p}from"./sentry-Lj2WEO6
18
18
  align-items: center;
19
19
  justify-content: center;
20
20
  padding: ${a.sp4};
21
- `;function j({children:e}){return r.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(k,{children:r.jsx(b,{"aria-label":"Zeni",role:"img"})}),r.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,u){const l=await fetch(`${o}${n}`,{body:JSON.stringify(u),headers:{"Content-Type":"application/json"},method:"POST"}),d=await l.json();if(!l.ok)throw new w(d.status?.message??`Request failed (${l.status}).`,l.status);return d.data}return{checkoutSession:()=>i("/portal/payment-link/checkout-session",s),plaidLinkToken:()=>i("/portal/payment-link/plaid-link-token",s),requestAccess:()=>i("/portal/payment-link/request-access",s),savePaymentMethod:n=>i("/portal/payment-link/payment-methods",{...s,...n}),session:()=>i("/portal/payment-link/session",s),setupIntent:()=>i("/portal/payment-link/setup-intent",s)}}function B(){const{namespace:e="",token:t=""}=y();p.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]);const o=p.useMemo((()=>$(e,t)),[e,t]);return r.jsx(j,{children:r.jsx(f,{portal:o})})}export{B as default};
21
+ `;function j({children:e}){return r.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(b,{children:r.jsx(k,{"aria-label":"Zeni",role:"img"})}),r.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,u){const l=await fetch(`${o}${n}`,{body:JSON.stringify(u),headers:{"Content-Type":"application/json"},method:"POST"}),d=await l.json();if(!l.ok)throw new w(d.status?.message??`Request failed (${l.status}).`,l.status);return d.data}return{checkoutSession:()=>i("/portal/payment-link/checkout-session",s),plaidLinkToken:()=>i("/portal/payment-link/plaid-link-token",s),requestAccess:()=>i("/portal/payment-link/request-access",s),savePaymentMethod:n=>i("/portal/payment-link/payment-methods",{...s,...n}),session:()=>i("/portal/payment-link/session",s),setupIntent:()=>i("/portal/payment-link/setup-intent",s)}}function B(){const{namespace:e="",token:t=""}=y();p.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]);const o=p.useMemo((()=>$(e,t)),[e,t]);return r.jsx(j,{children:r.jsx(f,{portal:o})})}export{B as default};
@@ -0,0 +1,22 @@
1
+ import{j as a}from"./liveblocks-BlM-yJIK.js";import{Ul as re,fB as Y,lF as G,dV as N,dU as le,Rh as Q,TK as de,BZ as Pe,Um as J,BO as je,C7 as Le,C1 as ce,BS as pe,C5 as Te,C2 as ve,Un as ue,rr as Ae,g2 as Oe,gA as Re,Uo as H,BW as me,BV as ge,Ca as Ve,c7 as Fe}from"./zeni-epic-state-CRmviUHA.js";import{$ as he,I as X,d as _,z as K,h as fe,O as Ce,ad as ye,ax as be,ay as Be,a9 as Se,K as V,ae as we,G as W,az as Ue,ao as Ze,aq as $e,a6 as ze,k as xe,S as He,p as _e,aA as Ge,U as Ke}from"./index-CTFYwhi_.js";import{D as De,n as M,S as Ie}from"./mui-BFHFLIBn.js";import ae from"./NotFoundScreen-75_Gn0cI.js";import{a as d}from"./sentry-CoUvtkTT.js";import{u as ee,i as We,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-BZ1rdEBJ.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-fRSEHozy.js";import{M as Ne}from"./MobileAppDrawer-Cwqn_b45.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";import"./InboxNotificationsProvider-5qCqmUI8.js";import"./useTaskManagerAccess-D9-djiWT.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]="ca6b62d3-7dfa-41d1-b615-e6610799cd55",e._sentryDebugIdIdentifier="sentry-dbid-ca6b62d3-7dfa-41d1-b615-e6610799cd55")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=W.getLocalizedStrings().peoplePage.invitePage,ne=W.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const f=he(),m=ee(),[F,B]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=We(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>G(l))),{useFeatureGate:D}=X(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),P=N(I,p),T=le(p),v=Q(p),U=de(p),Z=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),b()},A=()=>{F===!0?S(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=D(_.isChargeCardFeatureEnabled),L=fe(p,j,I),{isCardsHidden:O}=Ce(p?.tenantId),y=!L||O,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:h,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(h==="zeni_only"?je(e):Le(v))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{x===!1&&w!=null&&m(Pe(w))}),[x,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Be,{...s})]})})},ea=M(Ie)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,ke=M(we.H6Regular)`
6
+ margin-top: ${V.sp7};
7
+ padding-left: ${V.sp8};
8
+ padding-right: ${V.sp8};
9
+ color: ${e=>e.theme.colors.primary};
10
+ word-break: break-word;
11
+ `,Ee=M(we.LargeRegularSp)`
12
+ color: ${e=>e.theme.colors.hero};
13
+ padding-left: ${V.sp8};
14
+ padding-right: ${V.sp8};
15
+ margin-bottom: 30px;
16
+ margin-top: ${V.sp4};
17
+ white-space: pre-line;
18
+ `,aa={overlayWidth:new Se(100,100,48)},oe=W.getLocalizedStrings().peoplePage.invitePage,ie=W.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const f=he(),m=ee(),[F,B]=d.useState(!1),[k,S]=d.useState(!1),w=g((o=>re(o))),r=g((o=>Y(o))),p=g((o=>G(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:D}=E(_.isDebitCardFeatureEnabled),I=N(D,r),P=le(r),T=Q(r),v=de(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(J())},C=()=>{F===!0?S(!0):x()},A={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(_.isChargeCardFeatureEnabled),L=fe(r,j,D),{isCardsHidden:O}=Ce(r?.tenantId),y=!L||O,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:h,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(ce({peopleLocalData:o})),B(!0)},onResetClick:x,onSaveClick:()=>{m(h==="zeni_only"?Te(e):ve())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:Z};return d.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(J()))}),[w.invitePersonState.fetchState]),a.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:A}):null,a.jsx(Ue,{...s})]})})},ta=M(Ie)`
19
+ display: flex;
20
+ min-height: 100%;
21
+ flex-direction: column;
22
+ `,na=Je((function(e,t){const c=ue(e),n=K.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:xe}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:h}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Ve(i))},onReloadPeople:()=>{e(me()),e(ge(n,h))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(Ge);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=Me(),n=ee(),h=qe(),{areTenantIdsInSync:i}=Ze(),b=K.getSignedInUser(),f=g((s=>Y(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),B=g((s=>G(s))),k=!N(F,f)&&B,S=Q(f),w=f?.tenantId,{tenantEmailDomain:r}=f,[p,E]=d.useState(!1),[D,I]=d.useState(!1),[P,T]=d.useState(!1),[v,U]=d.useState("off"),[Z,x]=d.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=Ye({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ae(s.classState,s.classListState))),L=g((s=>Oe(s.userState,s.userRoleState,s.userListViewState,"manager"))),O=g((s=>Re(s))),y=f?.companyId;d.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(me()))}),[p,b,w,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const R=()=>{I(!1),T(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:xe,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:D,managersListView:L,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:R,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:f.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=_e(h.state?.pathnameStackToGoBack,h.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=Ke();return Fe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-BlM-yJIK.js";import E from"./NotFoundScreen-75_Gn0cI.js";import{a as r}from"./sentry-CoUvtkTT.js";import{h as _,g as v,j as p,i as M,u as U,N as P,l as z,n as B,o as b}from"./core-BZ1rdEBJ.js";import{fB as O,$Z as h,bo as F,bn as N,iI as V,gd as $}from"./zeni-epic-state-CRmviUHA.js";import{c as q,z as I,aq as L,dL as Z}from"./index-CTFYwhi_.js";import"./mui-BFHFLIBn.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-fRSEHozy.js";import{M as H}from"./MobileAppDrawer-Cwqn_b45.js";import"./recharts-Cp8vAfrX.js";import"./analytics-DZ_IK-Kq.js";import"./plaid-B4PUsiXy.js";import"./dnd-DzXS-Yl8.js";import"./stripe-cKAAJElX.js";import"./lottie-BRnok4t-.js";import"./lexical-CXbrQPvX.js";import"./pdf-CCE45QO9.js";import"./utils-BKpHrBI5.js";import"./InboxNotificationsProvider-5qCqmUI8.js";import"./useTaskManagerAccess-D9-djiWT.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]="5b1ca5eb-8922-47a1-b48b-d0efe53e39c0",e._sentryDebugIdIdentifier="sentry-dbid-5b1ca5eb-8922-47a1-b48b-d0efe53e39c0")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(Z),K=()=>{const e=_(),t=v(),c=q(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>h(a))),{tenantEmailDomain:f}=M(),u=U(),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)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u($({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]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return L({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(B,{children:[s.jsx(b,{path:"*",element:s.jsx(K,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
@@ -1 +1 @@
1
- import{a as h,R as a}from"./sentry-Lj2WEO6K.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`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:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
1
+ import{a as h,R as a}from"./sentry-CoUvtkTT.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`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:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};