@burdenoff/microfe-eventfullymanaged 2026.1123.6 → 2026.1124.2

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 (92) hide show
  1. package/dist/eventfullymanaged/EventfullyManagedRoutes.js +58 -54
  2. package/dist/eventfullymanaged/EventfullyManagedRoutes.js.map +1 -1
  3. package/dist/eventfullymanaged/components/ActionMenu.js +19 -19
  4. package/dist/eventfullymanaged/components/EntityFormShell.js +9 -9
  5. package/dist/eventfullymanaged/components/EntityTagsField.js +13 -13
  6. package/dist/eventfullymanaged/components/EntityTagsField.js.map +1 -1
  7. package/dist/eventfullymanaged/components/ImageUploadField.js +5 -5
  8. package/dist/eventfullymanaged/components/Pagination.js +7 -7
  9. package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.js +51 -51
  10. package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.js.map +1 -1
  11. package/dist/eventfullymanaged/pages/certificates/CertificateAccess.d.ts +7 -0
  12. package/dist/eventfullymanaged/pages/certificates/CertificateAccess.js +29 -0
  13. package/dist/eventfullymanaged/pages/certificates/CertificateAccess.js.map +1 -0
  14. package/dist/eventfullymanaged/pages/certificates/CertificateIssuance.d.ts +7 -0
  15. package/dist/eventfullymanaged/pages/certificates/CertificateIssuance.js +264 -0
  16. package/dist/eventfullymanaged/pages/certificates/CertificateIssuance.js.map +1 -0
  17. package/dist/eventfullymanaged/pages/certificates/CertificatePdfDownload.d.ts +4 -0
  18. package/dist/eventfullymanaged/pages/certificates/CertificatePdfDownload.js +31 -0
  19. package/dist/eventfullymanaged/pages/certificates/CertificatePdfDownload.js.map +1 -0
  20. package/dist/eventfullymanaged/pages/certificates/CertificateScheduleDialog.d.ts +6 -0
  21. package/dist/eventfullymanaged/pages/certificates/CertificateScheduleDialog.js +76 -0
  22. package/dist/eventfullymanaged/pages/certificates/CertificateScheduleDialog.js.map +1 -0
  23. package/dist/eventfullymanaged/pages/certificates/CertificateTemplates.d.ts +8 -0
  24. package/dist/eventfullymanaged/pages/certificates/CertificateTemplates.js +271 -0
  25. package/dist/eventfullymanaged/pages/certificates/CertificateTemplates.js.map +1 -0
  26. package/dist/eventfullymanaged/pages/certificates/CertificatesPage.d.ts +1 -0
  27. package/dist/eventfullymanaged/pages/certificates/CertificatesPage.js +121 -0
  28. package/dist/eventfullymanaged/pages/certificates/CertificatesPage.js.map +1 -0
  29. package/dist/eventfullymanaged/pages/dashboard/DashboardPage.js +26 -26
  30. package/dist/eventfullymanaged/pages/events/EventDetailPage.js +150 -148
  31. package/dist/eventfullymanaged/pages/events/EventDetailPage.js.map +1 -1
  32. package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js +100 -100
  33. package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js.map +1 -1
  34. package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.js +19 -19
  35. package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.js.map +1 -1
  36. package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.js +16 -16
  37. package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.js.map +1 -1
  38. package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js +103 -103
  39. package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js.map +1 -1
  40. package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js +15 -15
  41. package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.js +12 -12
  42. package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.js.map +1 -1
  43. package/dist/eventfullymanaged/pages/modules/CommunicationPage.js +80 -80
  44. package/dist/eventfullymanaged/pages/modules/CommunicationPage.js.map +1 -1
  45. package/dist/eventfullymanaged/pages/modules/EventTemplatesSection.js +14 -14
  46. package/dist/eventfullymanaged/pages/modules/EventTemplatesSection.js.map +1 -1
  47. package/dist/eventfullymanaged/pages/modules/EventsPage.js +121 -121
  48. package/dist/eventfullymanaged/pages/modules/EventsPage.js.map +1 -1
  49. package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js +57 -57
  50. package/dist/eventfullymanaged/pages/modules/IntegrationsPage.js.map +1 -1
  51. package/dist/eventfullymanaged/pages/modules/KioskPage.js +241 -241
  52. package/dist/eventfullymanaged/pages/modules/KioskPage.js.map +1 -1
  53. package/dist/eventfullymanaged/pages/modules/NetworkingPage.js +120 -120
  54. package/dist/eventfullymanaged/pages/modules/NetworkingPage.js.map +1 -1
  55. package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js +17 -17
  56. package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js.map +1 -1
  57. package/dist/eventfullymanaged/pages/modules/RegistrationPage.js +61 -61
  58. package/dist/eventfullymanaged/pages/modules/RegistrationPage.js.map +1 -1
  59. package/dist/eventfullymanaged/pages/modules/RoadmapPanel.js +23 -23
  60. package/dist/eventfullymanaged/pages/modules/RoadmapPanel.js.map +1 -1
  61. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js +17 -17
  62. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js.map +1 -1
  63. package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.js +11 -11
  64. package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.js +13 -13
  65. package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js +108 -108
  66. package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js.map +1 -1
  67. package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js +22 -22
  68. package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js.map +1 -1
  69. package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.js +45 -45
  70. package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js +24 -24
  71. package/dist/eventfullymanaged/pages/speakers/SpeakersPage.js.map +1 -1
  72. package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js +37 -37
  73. package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js +23 -23
  74. package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.js.map +1 -1
  75. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js +123 -123
  76. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js.map +1 -1
  77. package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js +37 -37
  78. package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js.map +1 -1
  79. package/dist/eventfullymanaged/pages/venues/VenueFormPage.js +25 -25
  80. package/dist/eventfullymanaged/pages/venues/VenueListPage.js +26 -26
  81. package/dist/eventfullymanaged/pages/venues/VenueListPage.js.map +1 -1
  82. package/dist/generated/wspace-operations.d.ts +468 -0
  83. package/dist/generated/wspace-operations.js +215 -11
  84. package/dist/generated/wspace-operations.js.map +1 -1
  85. package/dist/generated/wspace-types.d.ts +30060 -1503
  86. package/dist/node_modules/@apollo/client/react/hooks/internal/useRenderGuard.js +19 -0
  87. package/dist/node_modules/@apollo/client/react/hooks/internal/useRenderGuard.js.map +1 -0
  88. package/dist/node_modules/@apollo/client/react/hooks/useLazyQuery.js +110 -0
  89. package/dist/node_modules/@apollo/client/react/hooks/useLazyQuery.js.map +1 -0
  90. package/dist/utils/pageContext.js +5 -0
  91. package/dist/utils/pageContext.js.map +1 -1
  92. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { VIRTUAL_PARTICIPANTS_CHANGED_SUBSCRIPTION_SDL as e, VIRTUAL_SIGNAL_SUBSCRIPTION_SDL as t, useEndVirtualSessionMutation as n, useEventQuery as r, useHostVirtualSessionMutation as i, useJoinVirtualSessionMutation as a, useLeaveVirtualSessionMutation as o, usePromoteVirtualPresenterMutation as s, useSendVirtualSignalMutation as ee, useSetVirtualMuteMutation as te, useSetVirtualVideoMutation as c, useVirtualSessionQuery as l } from "../../api/eventApi.js";
2
- import { useEventfullyManaged as ne } from "../../context/EventfullyManagedContext.js";
3
- import { useEvmSubscription as u } from "../../hooks/useEvmSubscription.js";
4
- import { useVirtualCall as re } from "../../hooks/useVirtualCall.js";
5
- import { describeError as d, mutationSucceeded as f } from "../../lib/mutationResult.js";
6
- import { notify as p } from "../../lib/toast.js";
7
- import { VirtualEngagementPanel as m } from "./VirtualEngagementPanel.js";
8
- import { useCallback as ie, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
9
- import { useParams as ae } from "react-router";
10
- import { Fragment as oe, jsx as y, jsxs as b } from "react/jsx-runtime";
11
- import { ArrowLeft as x, Mic as S, MicOff as C, PhoneOff as se, Radio as ce, ScreenShare as le, Users as ue, Video as w, VideoOff as de } from "lucide-react";
12
- import { Badge as T, Button as E, EmphasisPanel as fe, GlassCard as D, GradientText as pe, IllustratedEmptyState as O, PagePurpose as me, Select as he, SelectContent as ge, SelectItem as k, SelectTrigger as _e, SelectValue as ve, Skeleton as A } from "@burdenoff/fe-libs/ui";
1
+ import { VIRTUAL_PARTICIPANTS_CHANGED_SUBSCRIPTION_SDL as e, VIRTUAL_SIGNAL_SUBSCRIPTION_SDL as t, useEndVirtualSessionMutation as n, useEventQuery as r, useHostVirtualSessionMutation as i, useJoinVirtualSessionMutation as a, useLeaveVirtualSessionMutation as o, usePromoteVirtualPresenterMutation as s, useSendVirtualSignalMutation as ee, useSetVirtualMuteMutation as te, useSetVirtualVideoMutation as ne, useVirtualSessionQuery as re } from "../../api/eventApi.js";
2
+ import { useEventfullyManaged as c } from "../../context/EventfullyManagedContext.js";
3
+ import { useEvmSubscription as l } from "../../hooks/useEvmSubscription.js";
4
+ import { useVirtualCall as ie } from "../../hooks/useVirtualCall.js";
5
+ import { describeError as u, mutationSucceeded as d } from "../../lib/mutationResult.js";
6
+ import { notify as f } from "../../lib/toast.js";
7
+ import { VirtualEngagementPanel as ae } from "./VirtualEngagementPanel.js";
8
+ import { useCallback as oe, useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
9
+ import { useParams as se } from "react-router";
10
+ import { Fragment as ce, jsx as _, jsxs as v } from "react/jsx-runtime";
11
+ import { Badge as y, Button as b, EmphasisPanel as le, GlassCard as x, GradientText as ue, IllustratedEmptyState as S, PagePurpose as C, Select as w, SelectContent as T, SelectItem as E, SelectTrigger as D, SelectValue as de, Skeleton as O } from "@burdenoff/fe-libs/ui";
12
+ import { ArrowLeft as fe, Mic as pe, MicOff as k, PhoneOff as me, Radio as he, ScreenShare as ge, Users as _e, Video as A, VideoOff as ve } from "lucide-react";
13
13
  // src/eventfullymanaged/pages/events/VirtualSessionPage.tsx
14
14
  function j(e) {
15
15
  return e.slice(0, 2).toUpperCase();
@@ -18,32 +18,32 @@ function M(e) {
18
18
  return e === "connected" ? "bg-status-success" : e === "connecting" || e === "new" ? "bg-status-warning" : e === "failed" || e === "disconnected" || e === "closed" ? "bg-status-danger" : "bg-text-muted";
19
19
  }
20
20
  function N({ actorId: e, role: t, isLocal: n, stream: r, muted: i, videoEnabled: a, connectionState: o }) {
21
- let s = _(null);
22
- return h(() => {
21
+ let s = h(null);
22
+ return p(() => {
23
23
  s.current && (s.current.srcObject = r);
24
- }, [r]), /* @__PURE__ */ b("div", {
24
+ }, [r]), /* @__PURE__ */ v("div", {
25
25
  className: "relative aspect-video overflow-hidden rounded-card border border-border-seam bg-bg-sunken",
26
- children: [r && a ? /* @__PURE__ */ y("video", {
26
+ children: [r && a ? /* @__PURE__ */ _("video", {
27
27
  ref: s,
28
28
  autoPlay: !0,
29
29
  playsInline: !0,
30
30
  muted: n,
31
31
  className: "h-full w-full object-cover",
32
32
  style: n ? { transform: "scaleX(-1)" } : void 0
33
- }) : /* @__PURE__ */ y("div", {
33
+ }) : /* @__PURE__ */ _("div", {
34
34
  className: "flex h-full w-full items-center justify-center",
35
- children: /* @__PURE__ */ y("span", {
35
+ children: /* @__PURE__ */ _("span", {
36
36
  className: "flex h-12 w-12 items-center justify-center rounded-full bg-accent-primary/10 text-sm font-semibold text-accent-primary",
37
37
  children: j(e)
38
38
  })
39
- }), /* @__PURE__ */ b("div", {
39
+ }), /* @__PURE__ */ v("div", {
40
40
  className: "absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-bg-overlay to-transparent p-2",
41
- children: [/* @__PURE__ */ b("span", {
41
+ children: [/* @__PURE__ */ v("span", {
42
42
  className: "truncate text-xs font-medium text-action-primary-text",
43
43
  children: [n ? "You" : `Participant ${e.slice(0, 6)}`, t === "HOST" ? " · Host" : t === "PRESENTER" ? " · Presenter" : ""]
44
- }), /* @__PURE__ */ b("span", {
44
+ }), /* @__PURE__ */ v("span", {
45
45
  className: "flex items-center gap-1.5",
46
- children: [i ? /* @__PURE__ */ y(C, { className: "h-3.5 w-3.5 text-action-primary-text" }) : null, n ? null : /* @__PURE__ */ y("span", {
46
+ children: [i ? /* @__PURE__ */ _(k, { className: "h-3.5 w-3.5 text-action-primary-text" }) : null, n ? null : /* @__PURE__ */ _("span", {
47
47
  className: `h-2 w-2 rounded-full ${M(o)}`,
48
48
  title: o ?? "connecting"
49
49
  })]
@@ -52,18 +52,18 @@ function N({ actorId: e, role: t, isLocal: n, stream: r, muted: i, videoEnabled:
52
52
  });
53
53
  }
54
54
  function P() {
55
- let { id: _ = "" } = ae(), { navigate: j, currentUser: P } = ne(), F = P?.id ?? "", { data: ye, loading: be } = r(_), I = l({ eventId: _ }), L = I.data?.virtualSession ?? null, [R, xe] = v("MEETING"), [Se, { loading: z }] = i(), [Ce, { loading: B }] = a(), [we, { loading: V }] = o(), [Te, { loading: H }] = n(), [Ee] = te(), [De] = c(), [Oe] = s(), [U] = ee(), W = g(() => L?.participants.find((e) => e.actorId === F && !e.leftAt) ?? null, [L, F]), G = g(() => (L?.participants ?? []).filter((e) => !e.leftAt), [L]), [K, q] = v(!1), [J, Y] = v(!1);
56
- h(() => {
55
+ let { id: h = "" } = se(), { navigate: j, currentUser: P } = c(), F = P?.id ?? "", { data: ye, loading: be } = r(h), I = re({ eventId: h }), L = I.data?.virtualSession ?? null, [R, xe] = g("MEETING"), [Se, { loading: z }] = i(), [Ce, { loading: B }] = a(), [we, { loading: V }] = o(), [Te, { loading: H }] = n(), [Ee] = te(), [De] = ne(), [Oe] = s(), [U] = ee(), W = m(() => L?.participants.find((e) => e.actorId === F && !e.leftAt) ?? null, [L, F]), G = m(() => (L?.participants ?? []).filter((e) => !e.leftAt), [L]), [K, q] = g(!1), [J, Y] = g(!1);
56
+ p(() => {
57
57
  W && (q(W.muted), Y(!W.videoEnabled));
58
58
  }, [W?.muted, W?.videoEnabled]);
59
- let ke = ie(async (e) => {
59
+ let ke = oe(async (e) => {
60
60
  L && await U({ variables: {
61
61
  sessionId: L.id,
62
62
  toActorId: e.toActorId,
63
63
  signalType: e.signalType,
64
64
  payload: e.payload
65
65
  } });
66
- }, [L, U]), X = re({
66
+ }, [L, U]), X = ie({
67
67
  sessionId: W ? L?.id : null,
68
68
  selfActorId: F,
69
69
  mode: L?.mode ?? "MEETING",
@@ -76,7 +76,7 @@ function P() {
76
76
  muted: K,
77
77
  videoEnabled: !J
78
78
  });
79
- u({
79
+ l({
80
80
  query: t,
81
81
  variables: { sessionId: L?.id },
82
82
  operationName: "EventfullymanagedVirtualSignal",
@@ -87,7 +87,7 @@ function P() {
87
87
  },
88
88
  pollFn: () => {},
89
89
  pollIntervalMs: 15e3
90
- }), u({
90
+ }), l({
91
91
  query: e,
92
92
  variables: { sessionId: L?.id },
93
93
  operationName: "EventfullymanagedVirtualParticipantsChanged",
@@ -103,35 +103,35 @@ function P() {
103
103
  let Ae = async (e) => {
104
104
  try {
105
105
  let t = await Se({ variables: {
106
- eventId: _,
106
+ eventId: h,
107
107
  mode: e
108
108
  } });
109
- if (!f(t, t.data?.hostVirtualSession?.id, "Could not start session")) return;
110
- p.success("Session started", e === "WEBINAR" ? "Hosting as a webinar." : "Hosting a meeting."), await I.refetch();
109
+ if (!d(t, t.data?.hostVirtualSession?.id, "Could not start session")) return;
110
+ f.success("Session started", e === "WEBINAR" ? "Hosting as a webinar." : "Hosting a meeting."), await I.refetch();
111
111
  } catch (e) {
112
- p.error("Could not start session", d(e));
112
+ f.error("Could not start session", u(e));
113
113
  }
114
114
  }, je = async () => {
115
115
  try {
116
- let e = await Ce({ variables: { eventId: _ } });
117
- if (!f(e, e.data?.joinVirtualSession?.id, "Could not join session")) return;
116
+ let e = await Ce({ variables: { eventId: h } });
117
+ if (!d(e, e.data?.joinVirtualSession?.id, "Could not join session")) return;
118
118
  await I.refetch();
119
119
  } catch (e) {
120
- p.error("Could not join session", d(e));
120
+ f.error("Could not join session", u(e));
121
121
  }
122
122
  }, Me = async () => {
123
123
  if (L) try {
124
- await we({ variables: { sessionId: L.id } }), p.success("Left session", "You are no longer in the virtual session."), await I.refetch();
124
+ await we({ variables: { sessionId: L.id } }), f.success("Left session", "You are no longer in the virtual session."), await I.refetch();
125
125
  } catch (e) {
126
- p.error("Could not leave session", d(e));
126
+ f.error("Could not leave session", u(e));
127
127
  }
128
- }, Z = async () => {
128
+ }, Ne = async () => {
129
129
  if (L) try {
130
- await Te({ variables: { sessionId: L.id } }), p.success("Session ended", "The virtual session has been ended for everyone."), await I.refetch();
130
+ await Te({ variables: { sessionId: L.id } }), f.success("Session ended", "The virtual session has been ended for everyone."), await I.refetch();
131
131
  } catch (e) {
132
- p.error("Could not end session", d(e));
132
+ f.error("Could not end session", u(e));
133
133
  }
134
- }, Ne = async () => {
134
+ }, Pe = async () => {
135
135
  if (!L) return;
136
136
  let e = !K;
137
137
  q(e);
@@ -141,9 +141,9 @@ function P() {
141
141
  muted: e
142
142
  } });
143
143
  } catch (t) {
144
- q(!e), p.error("Could not update mute state", d(t));
144
+ q(!e), f.error("Could not update mute state", u(t));
145
145
  }
146
- }, Pe = async () => {
146
+ }, Z = async () => {
147
147
  if (!L) return;
148
148
  let e = !J;
149
149
  Y(e);
@@ -153,41 +153,41 @@ function P() {
153
153
  videoEnabled: !e
154
154
  } });
155
155
  } catch (t) {
156
- Y(!e), p.error("Could not update camera state", d(t));
156
+ Y(!e), f.error("Could not update camera state", u(t));
157
157
  }
158
158
  }, Fe = async (e) => {
159
159
  if (L) try {
160
160
  await Oe({ variables: {
161
161
  sessionId: L.id,
162
162
  actorId: e.actorId
163
- } }), p.success("Promoted to presenter", `Participant ${e.actorId.slice(0, 6)} can now broadcast.`), await I.refetch();
163
+ } }), f.success("Promoted to presenter", `Participant ${e.actorId.slice(0, 6)} can now broadcast.`), await I.refetch();
164
164
  } catch (e) {
165
- p.error("Could not promote participant", d(e));
165
+ f.error("Could not promote participant", u(e));
166
166
  }
167
167
  }, Q = W?.role === "HOST", $ = z || B || V || H;
168
- return be || I.loading ? /* @__PURE__ */ b("div", {
168
+ return be || I.loading ? /* @__PURE__ */ v("div", {
169
169
  className: "space-y-4 p-6",
170
- children: [/* @__PURE__ */ y(A, { className: "h-8 w-64" }), /* @__PURE__ */ y(A, { className: "h-64 w-full" })]
171
- }) : /* @__PURE__ */ b("div", {
170
+ children: [/* @__PURE__ */ _(O, { className: "h-8 w-64" }), /* @__PURE__ */ _(O, { className: "h-64 w-full" })]
171
+ }) : /* @__PURE__ */ v("div", {
172
172
  className: "space-y-6 p-6",
173
173
  children: [
174
- /* @__PURE__ */ b(E, {
174
+ /* @__PURE__ */ v(b, {
175
175
  type: "button",
176
176
  variant: "ghost",
177
177
  size: "sm",
178
- onClick: () => j(`/events/${_}`),
179
- children: [/* @__PURE__ */ y(x, { className: "h-4 w-4" }), "Back to Event"]
178
+ onClick: () => j(`/events/${h}`),
179
+ children: [/* @__PURE__ */ _(fe, { className: "h-4 w-4" }), "Back to Event"]
180
180
  }),
181
- /* @__PURE__ */ y(me, { children: "A virtual session is a real, browser-native WebRTC room for this event — no external meeting link. Hosts start a Meeting (small mesh, up to 8 people all connected directly) or a Webinar (up to 30 attendees who see and hear only the host/presenters). Signaling is relayed through EventfullyManaged; media never touches our servers." }),
182
- /* @__PURE__ */ b(fe, {
181
+ /* @__PURE__ */ _(C, { children: "A virtual session is a real, browser-native WebRTC room for this event — no external meeting link. Hosts start a Meeting (small mesh, up to 8 people all connected directly) or a Webinar (up to 30 attendees who see and hear only the host/presenters). Signaling is relayed through EventfullyManaged; media never touches our servers." }),
182
+ /* @__PURE__ */ v(le, {
183
183
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
184
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
184
+ children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
185
185
  className: "text-2xl font-bold text-text-primary",
186
- children: /* @__PURE__ */ y(pe, { children: "Virtual Session" })
187
- }), /* @__PURE__ */ y("p", {
186
+ children: /* @__PURE__ */ _(ue, { children: "Virtual Session" })
187
+ }), /* @__PURE__ */ _("p", {
188
188
  className: "mt-1 text-sm text-text-secondary",
189
189
  children: ye?.event?.name ?? "Event"
190
- })] }), L ? /* @__PURE__ */ b(T, {
190
+ })] }), L ? /* @__PURE__ */ v(y, {
191
191
  variant: L.status === "ACTIVE" ? "success" : "secondary",
192
192
  className: "uppercase",
193
193
  children: [
@@ -197,39 +197,39 @@ function P() {
197
197
  ]
198
198
  }) : null]
199
199
  }),
200
- !L || L.status !== "ACTIVE" ? /* @__PURE__ */ b(D, {
200
+ !L || L.status !== "ACTIVE" ? /* @__PURE__ */ v(x, {
201
201
  treatment: "plain",
202
202
  className: "border-border-seam p-8",
203
- children: [/* @__PURE__ */ y(O, {
203
+ children: [/* @__PURE__ */ _(S, {
204
204
  illustration: "empty-data",
205
205
  title: "No live virtual session",
206
206
  description: "Start a session to host attendees over WebRTC, or join once someone else has started one.",
207
207
  className: "py-6"
208
- }), /* @__PURE__ */ b("div", {
208
+ }), /* @__PURE__ */ v("div", {
209
209
  className: "mt-4 flex flex-wrap items-center justify-center gap-2",
210
- children: [/* @__PURE__ */ b(he, {
210
+ children: [/* @__PURE__ */ v(w, {
211
211
  value: R,
212
212
  onValueChange: (e) => xe(e),
213
- children: [/* @__PURE__ */ y(_e, {
213
+ children: [/* @__PURE__ */ _(D, {
214
214
  "aria-label": "Session mode",
215
215
  className: "w-48",
216
- children: /* @__PURE__ */ y(ve, {})
217
- }), /* @__PURE__ */ b(ge, { children: [/* @__PURE__ */ y(k, {
216
+ children: /* @__PURE__ */ _(de, {})
217
+ }), /* @__PURE__ */ v(T, { children: [/* @__PURE__ */ _(E, {
218
218
  value: "MEETING",
219
219
  children: "Meeting (up to 8)"
220
- }), /* @__PURE__ */ y(k, {
220
+ }), /* @__PURE__ */ _(E, {
221
221
  value: "WEBINAR",
222
222
  children: "Webinar (up to 30)"
223
223
  })] })]
224
- }), /* @__PURE__ */ b(E, {
224
+ }), /* @__PURE__ */ v(b, {
225
225
  type: "button",
226
226
  onClick: () => Ae(R),
227
227
  disabled: $,
228
- children: [/* @__PURE__ */ y(ce, { className: "h-4 w-4" }), z ? "Starting…" : "Start session"]
228
+ children: [/* @__PURE__ */ _(he, { className: "h-4 w-4" }), z ? "Starting…" : "Start session"]
229
229
  })]
230
230
  })]
231
- }) : W ? /* @__PURE__ */ b(oe, { children: [
232
- X.mediaError ? /* @__PURE__ */ b(D, {
231
+ }) : W ? /* @__PURE__ */ v(ce, { children: [
232
+ X.mediaError ? /* @__PURE__ */ v(x, {
233
233
  treatment: "plain",
234
234
  className: "border-status-danger/40 bg-status-danger/5 p-4 text-sm text-status-danger",
235
235
  children: [
@@ -238,16 +238,16 @@ function P() {
238
238
  ". You are still connected to the session and can see other participants, but others will not see or hear you."
239
239
  ]
240
240
  }) : null,
241
- /* @__PURE__ */ b("div", {
241
+ /* @__PURE__ */ v("div", {
242
242
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
243
- children: [/* @__PURE__ */ y(N, {
243
+ children: [/* @__PURE__ */ _(N, {
244
244
  actorId: F,
245
245
  role: W.role,
246
246
  isLocal: !0,
247
247
  stream: X.localStream,
248
248
  muted: K,
249
249
  videoEnabled: !J
250
- }), G.filter((e) => e.actorId !== F).map((e) => /* @__PURE__ */ y(N, {
250
+ }), G.filter((e) => e.actorId !== F).map((e) => /* @__PURE__ */ _(N, {
251
251
  actorId: e.actorId,
252
252
  role: e.role,
253
253
  isLocal: !1,
@@ -257,71 +257,71 @@ function P() {
257
257
  connectionState: X.connectionStates.get(e.actorId)
258
258
  }, e.actorId))]
259
259
  }),
260
- /* @__PURE__ */ b(D, {
260
+ /* @__PURE__ */ v(x, {
261
261
  treatment: "plain",
262
262
  className: "flex flex-wrap items-center justify-center gap-2 border-border-seam p-4",
263
263
  children: [
264
- /* @__PURE__ */ b(E, {
264
+ /* @__PURE__ */ v(b, {
265
265
  type: "button",
266
266
  variant: K ? "outline" : "secondary",
267
- onClick: Ne,
268
- children: [y(K ? C : S, { className: "h-4 w-4" }), K ? "Unmute" : "Mute"]
267
+ onClick: Pe,
268
+ children: [_(K ? k : pe, { className: "h-4 w-4" }), K ? "Unmute" : "Mute"]
269
269
  }),
270
- /* @__PURE__ */ b(E, {
270
+ /* @__PURE__ */ v(b, {
271
271
  type: "button",
272
272
  variant: J ? "outline" : "secondary",
273
- onClick: Pe,
274
- children: [y(J ? de : w, { className: "h-4 w-4" }), J ? "Start Video" : "Stop Video"]
273
+ onClick: Z,
274
+ children: [_(J ? ve : A, { className: "h-4 w-4" }), J ? "Start Video" : "Stop Video"]
275
275
  }),
276
- /* @__PURE__ */ b(E, {
276
+ /* @__PURE__ */ v(b, {
277
277
  type: "button",
278
278
  variant: "outline",
279
279
  onClick: Me,
280
280
  disabled: $,
281
- children: [/* @__PURE__ */ y(se, { className: "h-4 w-4" }), V ? "Leaving…" : "Leave"]
281
+ children: [/* @__PURE__ */ _(me, { className: "h-4 w-4" }), V ? "Leaving…" : "Leave"]
282
282
  }),
283
- Q ? /* @__PURE__ */ b(E, {
283
+ Q ? /* @__PURE__ */ v(b, {
284
284
  type: "button",
285
285
  variant: "destructive",
286
- onClick: Z,
286
+ onClick: Ne,
287
287
  disabled: $,
288
- children: [/* @__PURE__ */ y(le, { className: "h-4 w-4" }), H ? "Ending…" : "End for everyone"]
288
+ children: [/* @__PURE__ */ _(ge, { className: "h-4 w-4" }), H ? "Ending…" : "End for everyone"]
289
289
  }) : null
290
290
  ]
291
291
  }),
292
- /* @__PURE__ */ y(m, {
292
+ /* @__PURE__ */ _(ae, {
293
293
  sessionId: L.id,
294
294
  canModerate: !!W && L.hostId === F
295
295
  }, L.id),
296
- /* @__PURE__ */ b(D, {
296
+ /* @__PURE__ */ v(x, {
297
297
  treatment: "plain",
298
298
  className: "border-border-seam p-4",
299
- children: [/* @__PURE__ */ b("h2", {
299
+ children: [/* @__PURE__ */ v("h2", {
300
300
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
301
301
  children: [
302
- /* @__PURE__ */ y(ue, { className: "h-4 w-4 text-accent-primary" }),
302
+ /* @__PURE__ */ _(_e, { className: "h-4 w-4 text-accent-primary" }),
303
303
  "Participants (",
304
304
  G.length,
305
305
  "/",
306
306
  L.maxParticipants,
307
307
  ")"
308
308
  ]
309
- }), /* @__PURE__ */ y("div", {
309
+ }), /* @__PURE__ */ _("div", {
310
310
  className: "mt-3 space-y-2",
311
- children: G.map((e) => /* @__PURE__ */ b("div", {
311
+ children: G.map((e) => /* @__PURE__ */ v("div", {
312
312
  className: "flex items-center justify-between gap-2 text-sm",
313
- children: [/* @__PURE__ */ b("span", {
313
+ children: [/* @__PURE__ */ v("span", {
314
314
  className: "flex items-center gap-2 text-text-secondary",
315
315
  children: [
316
- /* @__PURE__ */ y("span", { className: `h-2 w-2 rounded-full ${e.actorId === F ? "bg-status-success" : M(X.connectionStates.get(e.actorId))}` }),
316
+ /* @__PURE__ */ _("span", { className: `h-2 w-2 rounded-full ${e.actorId === F ? "bg-status-success" : M(X.connectionStates.get(e.actorId))}` }),
317
317
  e.actorId === F ? "You" : `Participant ${e.actorId.slice(0, 6)}`,
318
- /* @__PURE__ */ y(T, {
318
+ /* @__PURE__ */ _(y, {
319
319
  variant: "secondary",
320
320
  className: "uppercase",
321
321
  children: e.role
322
322
  })
323
323
  ]
324
- }), Q && L.mode === "WEBINAR" && e.role === "ATTENDEE" ? /* @__PURE__ */ y(E, {
324
+ }), Q && L.mode === "WEBINAR" && e.role === "ATTENDEE" ? /* @__PURE__ */ _(b, {
325
325
  type: "button",
326
326
  variant: "ghost",
327
327
  size: "sm",
@@ -331,21 +331,21 @@ function P() {
331
331
  }, e.id))
332
332
  })]
333
333
  })
334
- ] }) : /* @__PURE__ */ b(D, {
334
+ ] }) : /* @__PURE__ */ v(x, {
335
335
  treatment: "plain",
336
336
  className: "border-border-seam p-8",
337
- children: [/* @__PURE__ */ y(O, {
337
+ children: [/* @__PURE__ */ _(S, {
338
338
  illustration: "empty-people",
339
339
  title: "A session is live",
340
340
  description: `${L.participantCount} of ${L.maxParticipants} seats in use. Join to turn on your camera and mic.`,
341
341
  className: "py-6"
342
- }), /* @__PURE__ */ y("div", {
342
+ }), /* @__PURE__ */ _("div", {
343
343
  className: "mt-4 flex justify-center",
344
- children: /* @__PURE__ */ b(E, {
344
+ children: /* @__PURE__ */ v(b, {
345
345
  type: "button",
346
346
  onClick: je,
347
347
  disabled: $,
348
- children: [/* @__PURE__ */ y(w, { className: "h-4 w-4" }), B ? "Joining…" : "Join session"]
348
+ children: [/* @__PURE__ */ _(A, { className: "h-4 w-4" }), B ? "Joining…" : "Join session"]
349
349
  })
350
350
  })]
351
351
  })
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualSessionPage.js","names":["Badge","_Fragment","Badge$1","initials","id","connectionDotClass","state","VideoTile","videoRef","useRef","useEffect","stream","videoEnabled","isLocal","actorId","role","muted","MicOff","connectionState","VirtualSessionPage","eventId","useParams","useEventfullyManaged","selfActorId","currentUser","eventData","eventLoading","useEventQuery","sessionQuery","useVirtualSessionQuery","session","mode","setMode","useState","hostSession","hosting","useHostVirtualSessionMutation","joinSession","joining","useJoinVirtualSessionMutation","leaveSession","leaving","useLeaveVirtualSessionMutation","endSession","ending","useEndVirtualSessionMutation","setMuteMutation","useSetVirtualMuteMutation","setVideoMutation","useSetVirtualVideoMutation","promotePresenter","usePromoteVirtualPresenterMutation","sendSignalMutation","useSendVirtualSignalMutation","selfParticipant","useMemo","p","activeParticipants","localMuted","setLocalMuted","localVideoOff","setLocalVideoOff","sendSignal","useCallback","args","call","useVirtualCall","useEvmSubscription","VIRTUAL_SIGNAL_SUBSCRIPTION_SDL","signal","data","VIRTUAL_PARTICIPANTS_CHANGED_SUBSCRIPTION_SDL","onHost","response","chosenMode","mutationSucceeded","notify","error","describeError","onJoin","onLeave","onEnd","toggleMute","next","toggleVideo","onPromote","participant","isHost","busy","Skeleton","Button","navigate","ArrowLeft","PagePurpose","EmphasisPanel","GradientText","GlassCard","IllustratedEmptyState","Select","value","SelectTrigger","SelectValue","SelectContent","SelectItem","Radio","Fragment","jsx","Mic","VideoOff","Video","PhoneOff","ScreenShare","VirtualEngagementPanel","Users"],"sources":["../../../../src/eventfullymanaged/pages/events/VirtualSessionPage.tsx"],"sourcesContent":["/* eslint-disable react-hooks/set-state-in-effect -- mirrors server-confirmed mute/video state into local toggle state, same established pattern as the fleet's *FormPage.tsx entity-hydration effects */\n/**\n * VirtualSessionPage (BOFF-4318)\n *\n * Real join/host flow for an event's virtual/hybrid session, backed by\n * `wspace-eventfullymanaged-svc`'s bounded browser-native WebRTC core\n * (`VirtualSessionService`). MEETING mode is a full mesh (cap 8);\n * WEBINAR mode is a host/presenter-broadcast star (cap 30) — attendees\n * only peer with the host/presenters, never each other. See\n * `useVirtualCall` for the exact topology and signaling logic.\n *\n * Large-audience broadcast (hundreds+ viewers) needs a real SFU/media\n * server and is explicit deferred follow-up — not built here.\n */\nimport {\n Badge,\n Button,\n EmphasisPanel,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n Skeleton,\n} from '@burdenoff/fe-libs/ui';\nimport { ArrowLeft, Mic, MicOff, PhoneOff, Radio, ScreenShare, Users, Video, VideoOff } from 'lucide-react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useParams } from 'react-router';\n\nimport {\n useEndVirtualSessionMutation,\n useEventQuery,\n useHostVirtualSessionMutation,\n useJoinVirtualSessionMutation,\n useLeaveVirtualSessionMutation,\n usePromoteVirtualPresenterMutation,\n useSendVirtualSignalMutation,\n useSetVirtualMuteMutation,\n useSetVirtualVideoMutation,\n useVirtualSessionQuery,\n VIRTUAL_PARTICIPANTS_CHANGED_SUBSCRIPTION_SDL,\n VIRTUAL_SIGNAL_SUBSCRIPTION_SDL,\n type VirtualParticipantGql,\n} from '../../api/eventApi';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\nimport { useEvmSubscription } from '../../hooks/useEvmSubscription';\nimport { type IncomingVirtualSignal, type VirtualCallRole, useVirtualCall } from '../../hooks/useVirtualCall';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\nimport { VirtualEngagementPanel } from './VirtualEngagementPanel';\n\nfunction initials(id: string): string {\n return id.slice(0, 2).toUpperCase();\n}\n\nfunction connectionDotClass(state: RTCPeerConnectionState | undefined): string {\n if (state === 'connected') return 'bg-status-success';\n if (state === 'connecting' || state === 'new') return 'bg-status-warning';\n if (state === 'failed' || state === 'disconnected' || state === 'closed') return 'bg-status-danger';\n return 'bg-text-muted';\n}\n\ninterface VideoTileProps {\n actorId: string;\n role: VirtualCallRole;\n isLocal: boolean;\n stream: MediaStream | null;\n /** Muted/videoEnabled reflect the persisted participant state (server-confirmed for remotes, local toggle for self). */\n muted: boolean;\n videoEnabled: boolean;\n connectionState?: RTCPeerConnectionState;\n}\n\nfunction VideoTile({ actorId, role, isLocal, stream, muted, videoEnabled, connectionState }: VideoTileProps) {\n const videoRef = useRef<HTMLVideoElement>(null);\n useEffect(() => {\n if (videoRef.current) videoRef.current.srcObject = stream;\n }, [stream]);\n\n const showVideo = Boolean(stream) && videoEnabled;\n\n return (\n <div className=\"relative aspect-video overflow-hidden rounded-card border border-border-seam bg-bg-sunken\">\n {showVideo ? (\n <video\n ref={videoRef}\n autoPlay\n playsInline\n muted={isLocal}\n className=\"h-full w-full object-cover\"\n style={isLocal ? { transform: 'scaleX(-1)' } : undefined}\n />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center\">\n <span className=\"flex h-12 w-12 items-center justify-center rounded-full bg-accent-primary/10 text-sm font-semibold text-accent-primary\">\n {initials(actorId)}\n </span>\n </div>\n )}\n <div className=\"absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-bg-overlay to-transparent p-2\">\n <span className=\"truncate text-xs font-medium text-action-primary-text\">\n {isLocal ? 'You' : `Participant ${actorId.slice(0, 6)}`}\n {role === 'HOST' ? ' · Host' : role === 'PRESENTER' ? ' · Presenter' : ''}\n </span>\n <span className=\"flex items-center gap-1.5\">\n {muted ? <MicOff className=\"h-3.5 w-3.5 text-action-primary-text\" /> : null}\n {!isLocal ? (\n <span\n className={`h-2 w-2 rounded-full ${connectionDotClass(connectionState)}`}\n title={connectionState ?? 'connecting'}\n />\n ) : null}\n </span>\n </div>\n </div>\n );\n}\n\nexport default function VirtualSessionPage() {\n const { id: eventId = '' } = useParams<{ id: string }>();\n const { navigate, currentUser } = useEventfullyManaged();\n const selfActorId = currentUser?.id ?? '';\n\n const { data: eventData, loading: eventLoading } = useEventQuery(eventId);\n const sessionQuery = useVirtualSessionQuery({ eventId });\n const session = sessionQuery.data?.virtualSession ?? null;\n\n const [mode, setMode] = useState<'MEETING' | 'WEBINAR'>('MEETING');\n const [hostSession, { loading: hosting }] = useHostVirtualSessionMutation();\n const [joinSession, { loading: joining }] = useJoinVirtualSessionMutation();\n const [leaveSession, { loading: leaving }] = useLeaveVirtualSessionMutation();\n const [endSession, { loading: ending }] = useEndVirtualSessionMutation();\n const [setMuteMutation] = useSetVirtualMuteMutation();\n const [setVideoMutation] = useSetVirtualVideoMutation();\n const [promotePresenter] = usePromoteVirtualPresenterMutation();\n const [sendSignalMutation] = useSendVirtualSignalMutation();\n\n const selfParticipant = useMemo(\n () => session?.participants.find((p) => p.actorId === selfActorId && !p.leftAt) ?? null,\n [session, selfActorId]\n );\n const activeParticipants = useMemo(() => (session?.participants ?? []).filter((p) => !p.leftAt), [session]);\n\n const [localMuted, setLocalMuted] = useState(false);\n const [localVideoOff, setLocalVideoOff] = useState(false);\n useEffect(() => {\n if (selfParticipant) {\n setLocalMuted(selfParticipant.muted);\n setLocalVideoOff(!selfParticipant.videoEnabled);\n }\n }, [selfParticipant?.muted, selfParticipant?.videoEnabled]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const sendSignal = useCallback(\n async (args: { toActorId: string; signalType: 'OFFER' | 'ANSWER' | 'ICE_CANDIDATE'; payload: unknown }) => {\n if (!session) return;\n await sendSignalMutation({\n variables: {\n sessionId: session.id,\n toActorId: args.toActorId,\n signalType: args.signalType,\n payload: args.payload,\n },\n });\n },\n [session, sendSignalMutation]\n );\n\n const call = useVirtualCall({\n sessionId: selfParticipant ? session?.id : null,\n selfActorId,\n mode: session?.mode ?? 'MEETING',\n selfRole: selfParticipant?.role ?? null,\n participants: activeParticipants.map((p) => ({ actorId: p.actorId, role: p.role })),\n sendSignal,\n muted: localMuted,\n videoEnabled: !localVideoOff,\n });\n\n useEvmSubscription<{ eventfullyManagedVirtualSignal: IncomingVirtualSignal }>({\n query: VIRTUAL_SIGNAL_SUBSCRIPTION_SDL,\n variables: { sessionId: session?.id },\n operationName: 'EventfullymanagedVirtualSignal',\n enabled: Boolean(selfParticipant && session),\n onData: (data) => {\n const signal = data.eventfullyManagedVirtualSignal;\n if (signal) call.handleIncomingSignal(signal);\n },\n // No real polling substitute exists for signaling — a missed signal is\n // simply a missed negotiation step. The fallback here just retries the\n // subscription's own reconnect path via re-render, kept as a no-op.\n pollFn: () => {},\n pollIntervalMs: 15_000,\n });\n\n useEvmSubscription<{ eventfullyManagedVirtualParticipantsChanged: unknown }>({\n query: VIRTUAL_PARTICIPANTS_CHANGED_SUBSCRIPTION_SDL,\n variables: { sessionId: session?.id },\n operationName: 'EventfullymanagedVirtualParticipantsChanged',\n enabled: Boolean(session),\n onData: () => {\n void sessionQuery.refetch();\n },\n pollFn: () => {\n void sessionQuery.refetch();\n },\n pollIntervalMs: 5_000,\n });\n\n const onHost = async (chosenMode: 'MEETING' | 'WEBINAR') => {\n try {\n const response = await hostSession({ variables: { eventId, mode: chosenMode } });\n if (!mutationSucceeded(response, response.data?.hostVirtualSession?.id, 'Could not start session')) {\n return;\n }\n notify.success('Session started', chosenMode === 'WEBINAR' ? 'Hosting as a webinar.' : 'Hosting a meeting.');\n await sessionQuery.refetch();\n } catch (error) {\n notify.error('Could not start session', describeError(error));\n }\n };\n\n const onJoin = async () => {\n try {\n const response = await joinSession({ variables: { eventId } });\n if (!mutationSucceeded(response, response.data?.joinVirtualSession?.id, 'Could not join session')) {\n return;\n }\n await sessionQuery.refetch();\n } catch (error) {\n notify.error('Could not join session', describeError(error));\n }\n };\n\n const onLeave = async () => {\n if (!session) return;\n try {\n await leaveSession({ variables: { sessionId: session.id } });\n notify.success('Left session', 'You are no longer in the virtual session.');\n await sessionQuery.refetch();\n } catch (error) {\n notify.error('Could not leave session', describeError(error));\n }\n };\n\n const onEnd = async () => {\n if (!session) return;\n try {\n await endSession({ variables: { sessionId: session.id } });\n notify.success('Session ended', 'The virtual session has been ended for everyone.');\n await sessionQuery.refetch();\n } catch (error) {\n notify.error('Could not end session', describeError(error));\n }\n };\n\n const toggleMute = async () => {\n if (!session) return;\n const next = !localMuted;\n setLocalMuted(next);\n try {\n await setMuteMutation({ variables: { sessionId: session.id, muted: next } });\n } catch (error) {\n setLocalMuted(!next);\n notify.error('Could not update mute state', describeError(error));\n }\n };\n\n const toggleVideo = async () => {\n if (!session) return;\n const next = !localVideoOff;\n setLocalVideoOff(next);\n try {\n await setVideoMutation({ variables: { sessionId: session.id, videoEnabled: !next } });\n } catch (error) {\n setLocalVideoOff(!next);\n notify.error('Could not update camera state', describeError(error));\n }\n };\n\n const onPromote = async (participant: VirtualParticipantGql) => {\n if (!session) return;\n try {\n await promotePresenter({ variables: { sessionId: session.id, actorId: participant.actorId } });\n notify.success('Promoted to presenter', `Participant ${participant.actorId.slice(0, 6)} can now broadcast.`);\n await sessionQuery.refetch();\n } catch (error) {\n notify.error('Could not promote participant', describeError(error));\n }\n };\n\n const isHost = selfParticipant?.role === 'HOST';\n const busy = hosting || joining || leaving || ending;\n\n if (eventLoading || sessionQuery.loading) {\n return (\n <div className=\"space-y-4 p-6\">\n <Skeleton className=\"h-8 w-64\" />\n <Skeleton className=\"h-64 w-full\" />\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6\">\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => navigate(`/events/${eventId}`)}>\n <ArrowLeft className=\"h-4 w-4\" />\n Back to Event\n </Button>\n\n <PagePurpose>\n A virtual session is a real, browser-native WebRTC room for this event — no external meeting link. Hosts start a\n Meeting (small mesh, up to 8 people all connected directly) or a Webinar (up to 30 attendees who see and hear\n only the host/presenters). Signaling is relayed through EventfullyManaged; media never touches our servers.\n </PagePurpose>\n\n <EmphasisPanel className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>Virtual Session</GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">{eventData?.event?.name ?? 'Event'}</p>\n </div>\n {session ? (\n <Badge variant={session.status === 'ACTIVE' ? 'success' : 'secondary'} className=\"uppercase\">\n {session.mode} · {session.status}\n </Badge>\n ) : null}\n </EmphasisPanel>\n\n {!session || session.status !== 'ACTIVE' ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-8\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No live virtual session\"\n description=\"Start a session to host attendees over WebRTC, or join once someone else has started one.\"\n className=\"py-6\"\n />\n <div className=\"mt-4 flex flex-wrap items-center justify-center gap-2\">\n <Select value={mode} onValueChange={(value) => setMode(value as 'MEETING' | 'WEBINAR')}>\n <SelectTrigger aria-label=\"Session mode\" className=\"w-48\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"MEETING\">Meeting (up to 8)</SelectItem>\n <SelectItem value=\"WEBINAR\">Webinar (up to 30)</SelectItem>\n </SelectContent>\n </Select>\n <Button type=\"button\" onClick={() => onHost(mode)} disabled={busy}>\n <Radio className=\"h-4 w-4\" />\n {hosting ? 'Starting…' : 'Start session'}\n </Button>\n </div>\n </GlassCard>\n ) : !selfParticipant ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-8\">\n <IllustratedEmptyState\n illustration=\"empty-people\"\n title=\"A session is live\"\n description={`${session.participantCount} of ${session.maxParticipants} seats in use. Join to turn on your camera and mic.`}\n className=\"py-6\"\n />\n <div className=\"mt-4 flex justify-center\">\n <Button type=\"button\" onClick={onJoin} disabled={busy}>\n <Video className=\"h-4 w-4\" />\n {joining ? 'Joining…' : 'Join session'}\n </Button>\n </div>\n </GlassCard>\n ) : (\n <>\n {call.mediaError ? (\n <GlassCard\n treatment=\"plain\"\n className=\"border-status-danger/40 bg-status-danger/5 p-4 text-sm text-status-danger\"\n >\n Camera/microphone unavailable: {call.mediaError}. You are still connected to the session and can see other\n participants, but others will not see or hear you.\n </GlassCard>\n ) : null}\n\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3\">\n <VideoTile\n actorId={selfActorId}\n role={selfParticipant.role}\n isLocal\n stream={call.localStream}\n muted={localMuted}\n videoEnabled={!localVideoOff}\n />\n {activeParticipants\n .filter((p) => p.actorId !== selfActorId)\n .map((participant) => (\n <VideoTile\n key={participant.actorId}\n actorId={participant.actorId}\n role={participant.role}\n isLocal={false}\n stream={call.remoteStreams.get(participant.actorId) ?? null}\n muted={participant.muted}\n videoEnabled={participant.videoEnabled}\n connectionState={call.connectionStates.get(participant.actorId)}\n />\n ))}\n </div>\n\n <GlassCard\n treatment=\"plain\"\n className=\"flex flex-wrap items-center justify-center gap-2 border-border-seam p-4\"\n >\n <Button type=\"button\" variant={localMuted ? 'outline' : 'secondary'} onClick={toggleMute}>\n {localMuted ? <MicOff className=\"h-4 w-4\" /> : <Mic className=\"h-4 w-4\" />}\n {localMuted ? 'Unmute' : 'Mute'}\n </Button>\n <Button type=\"button\" variant={localVideoOff ? 'outline' : 'secondary'} onClick={toggleVideo}>\n {localVideoOff ? <VideoOff className=\"h-4 w-4\" /> : <Video className=\"h-4 w-4\" />}\n {localVideoOff ? 'Start Video' : 'Stop Video'}\n </Button>\n <Button type=\"button\" variant=\"outline\" onClick={onLeave} disabled={busy}>\n <PhoneOff className=\"h-4 w-4\" />\n {leaving ? 'Leaving…' : 'Leave'}\n </Button>\n {isHost ? (\n <Button type=\"button\" variant=\"destructive\" onClick={onEnd} disabled={busy}>\n <ScreenShare className=\"h-4 w-4\" />\n {ending ? 'Ending…' : 'End for everyone'}\n </Button>\n ) : null}\n </GlassCard>\n\n <VirtualEngagementPanel\n key={session.id}\n sessionId={session.id}\n canModerate={Boolean(selfParticipant) && session.hostId === selfActorId}\n />\n\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-4\">\n <h2 className=\"flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <Users className=\"h-4 w-4 text-accent-primary\" />\n Participants ({activeParticipants.length}/{session.maxParticipants})\n </h2>\n <div className=\"mt-3 space-y-2\">\n {activeParticipants.map((participant) => (\n <div key={participant.id} className=\"flex items-center justify-between gap-2 text-sm\">\n <span className=\"flex items-center gap-2 text-text-secondary\">\n <span\n className={`h-2 w-2 rounded-full ${\n participant.actorId === selfActorId\n ? 'bg-status-success'\n : connectionDotClass(call.connectionStates.get(participant.actorId))\n }`}\n />\n {participant.actorId === selfActorId ? 'You' : `Participant ${participant.actorId.slice(0, 6)}`}\n <Badge variant=\"secondary\" className=\"uppercase\">\n {participant.role}\n </Badge>\n </span>\n {isHost && session.mode === 'WEBINAR' && participant.role === 'ATTENDEE' ? (\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => onPromote(participant)}>\n Promote to presenter\n </Button>\n ) : null}\n </div>\n ))}\n </div>\n </GlassCard>\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;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VirtualSessionPage.js","names":["_Fragment","initials","id","connectionDotClass","state","VideoTile","videoRef","useRef","useEffect","stream","videoEnabled","isLocal","actorId","role","muted","MicOff","connectionState","VirtualSessionPage","eventId","useParams","useEventfullyManaged","selfActorId","currentUser","eventData","eventLoading","useEventQuery","sessionQuery","useVirtualSessionQuery","session","mode","setMode","useState","hostSession","hosting","useHostVirtualSessionMutation","joinSession","joining","useJoinVirtualSessionMutation","leaveSession","leaving","useLeaveVirtualSessionMutation","endSession","ending","useEndVirtualSessionMutation","setMuteMutation","useSetVirtualMuteMutation","setVideoMutation","useSetVirtualVideoMutation","promotePresenter","usePromoteVirtualPresenterMutation","sendSignalMutation","useSendVirtualSignalMutation","selfParticipant","useMemo","p","activeParticipants","localMuted","setLocalMuted","localVideoOff","setLocalVideoOff","sendSignal","useCallback","args","call","useVirtualCall","useEvmSubscription","VIRTUAL_SIGNAL_SUBSCRIPTION_SDL","signal","data","VIRTUAL_PARTICIPANTS_CHANGED_SUBSCRIPTION_SDL","onHost","response","chosenMode","mutationSucceeded","notify","error","describeError","onJoin","onLeave","onEnd","toggleMute","next","toggleVideo","onPromote","participant","isHost","busy","Skeleton","Button","navigate","ArrowLeft","PagePurpose","EmphasisPanel","GradientText","Badge","GlassCard","IllustratedEmptyState","Select","value","SelectTrigger","SelectValue","SelectContent","SelectItem","Radio","Fragment","jsx","Mic","VideoOff","Video","PhoneOff","ScreenShare","VirtualEngagementPanel","Users"],"sources":["../../../../src/eventfullymanaged/pages/events/VirtualSessionPage.tsx"],"sourcesContent":["/* eslint-disable react-hooks/set-state-in-effect -- mirrors server-confirmed mute/video state into local toggle state, same established pattern as the fleet's *FormPage.tsx entity-hydration effects */\n/**\n * VirtualSessionPage (BOFF-4318)\n *\n * Real join/host flow for an event's virtual/hybrid session, backed by\n * `wspace-eventfullymanaged-svc`'s bounded browser-native WebRTC core\n * (`VirtualSessionService`). MEETING mode is a full mesh (cap 8);\n * WEBINAR mode is a host/presenter-broadcast star (cap 30) — attendees\n * only peer with the host/presenters, never each other. See\n * `useVirtualCall` for the exact topology and signaling logic.\n *\n * Large-audience broadcast (hundreds+ viewers) needs a real SFU/media\n * server and is explicit deferred follow-up — not built here.\n */\nimport {\n Badge,\n Button,\n EmphasisPanel,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n Skeleton,\n} from '@burdenoff/fe-libs/ui';\nimport { ArrowLeft, Mic, MicOff, PhoneOff, Radio, ScreenShare, Users, Video, VideoOff } from 'lucide-react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useParams } from 'react-router';\n\nimport {\n useEndVirtualSessionMutation,\n useEventQuery,\n useHostVirtualSessionMutation,\n useJoinVirtualSessionMutation,\n useLeaveVirtualSessionMutation,\n usePromoteVirtualPresenterMutation,\n useSendVirtualSignalMutation,\n useSetVirtualMuteMutation,\n useSetVirtualVideoMutation,\n useVirtualSessionQuery,\n VIRTUAL_PARTICIPANTS_CHANGED_SUBSCRIPTION_SDL,\n VIRTUAL_SIGNAL_SUBSCRIPTION_SDL,\n type VirtualParticipantGql,\n} from '../../api/eventApi';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\nimport { useEvmSubscription } from '../../hooks/useEvmSubscription';\nimport { type IncomingVirtualSignal, type VirtualCallRole, useVirtualCall } from '../../hooks/useVirtualCall';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\nimport { VirtualEngagementPanel } from './VirtualEngagementPanel';\n\nfunction initials(id: string): string {\n return id.slice(0, 2).toUpperCase();\n}\n\nfunction connectionDotClass(state: RTCPeerConnectionState | undefined): string {\n if (state === 'connected') return 'bg-status-success';\n if (state === 'connecting' || state === 'new') return 'bg-status-warning';\n if (state === 'failed' || state === 'disconnected' || state === 'closed') return 'bg-status-danger';\n return 'bg-text-muted';\n}\n\ninterface VideoTileProps {\n actorId: string;\n role: VirtualCallRole;\n isLocal: boolean;\n stream: MediaStream | null;\n /** Muted/videoEnabled reflect the persisted participant state (server-confirmed for remotes, local toggle for self). */\n muted: boolean;\n videoEnabled: boolean;\n connectionState?: RTCPeerConnectionState;\n}\n\nfunction VideoTile({ actorId, role, isLocal, stream, muted, videoEnabled, connectionState }: VideoTileProps) {\n const videoRef = useRef<HTMLVideoElement>(null);\n useEffect(() => {\n if (videoRef.current) videoRef.current.srcObject = stream;\n }, [stream]);\n\n const showVideo = Boolean(stream) && videoEnabled;\n\n return (\n <div className=\"relative aspect-video overflow-hidden rounded-card border border-border-seam bg-bg-sunken\">\n {showVideo ? (\n <video\n ref={videoRef}\n autoPlay\n playsInline\n muted={isLocal}\n className=\"h-full w-full object-cover\"\n style={isLocal ? { transform: 'scaleX(-1)' } : undefined}\n />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center\">\n <span className=\"flex h-12 w-12 items-center justify-center rounded-full bg-accent-primary/10 text-sm font-semibold text-accent-primary\">\n {initials(actorId)}\n </span>\n </div>\n )}\n <div className=\"absolute inset-x-0 bottom-0 flex items-center justify-between gap-2 bg-gradient-to-t from-bg-overlay to-transparent p-2\">\n <span className=\"truncate text-xs font-medium text-action-primary-text\">\n {isLocal ? 'You' : `Participant ${actorId.slice(0, 6)}`}\n {role === 'HOST' ? ' · Host' : role === 'PRESENTER' ? ' · Presenter' : ''}\n </span>\n <span className=\"flex items-center gap-1.5\">\n {muted ? <MicOff className=\"h-3.5 w-3.5 text-action-primary-text\" /> : null}\n {!isLocal ? (\n <span\n className={`h-2 w-2 rounded-full ${connectionDotClass(connectionState)}`}\n title={connectionState ?? 'connecting'}\n />\n ) : null}\n </span>\n </div>\n </div>\n );\n}\n\nexport default function VirtualSessionPage() {\n const { id: eventId = '' } = useParams<{ id: string }>();\n const { navigate, currentUser } = useEventfullyManaged();\n const selfActorId = currentUser?.id ?? '';\n\n const { data: eventData, loading: eventLoading } = useEventQuery(eventId);\n const sessionQuery = useVirtualSessionQuery({ eventId });\n const session = sessionQuery.data?.virtualSession ?? null;\n\n const [mode, setMode] = useState<'MEETING' | 'WEBINAR'>('MEETING');\n const [hostSession, { loading: hosting }] = useHostVirtualSessionMutation();\n const [joinSession, { loading: joining }] = useJoinVirtualSessionMutation();\n const [leaveSession, { loading: leaving }] = useLeaveVirtualSessionMutation();\n const [endSession, { loading: ending }] = useEndVirtualSessionMutation();\n const [setMuteMutation] = useSetVirtualMuteMutation();\n const [setVideoMutation] = useSetVirtualVideoMutation();\n const [promotePresenter] = usePromoteVirtualPresenterMutation();\n const [sendSignalMutation] = useSendVirtualSignalMutation();\n\n const selfParticipant = useMemo(\n () => session?.participants.find((p) => p.actorId === selfActorId && !p.leftAt) ?? null,\n [session, selfActorId]\n );\n const activeParticipants = useMemo(() => (session?.participants ?? []).filter((p) => !p.leftAt), [session]);\n\n const [localMuted, setLocalMuted] = useState(false);\n const [localVideoOff, setLocalVideoOff] = useState(false);\n useEffect(() => {\n if (selfParticipant) {\n setLocalMuted(selfParticipant.muted);\n setLocalVideoOff(!selfParticipant.videoEnabled);\n }\n }, [selfParticipant?.muted, selfParticipant?.videoEnabled]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const sendSignal = useCallback(\n async (args: { toActorId: string; signalType: 'OFFER' | 'ANSWER' | 'ICE_CANDIDATE'; payload: unknown }) => {\n if (!session) return;\n await sendSignalMutation({\n variables: {\n sessionId: session.id,\n toActorId: args.toActorId,\n signalType: args.signalType,\n payload: args.payload,\n },\n });\n },\n [session, sendSignalMutation]\n );\n\n const call = useVirtualCall({\n sessionId: selfParticipant ? session?.id : null,\n selfActorId,\n mode: session?.mode ?? 'MEETING',\n selfRole: selfParticipant?.role ?? null,\n participants: activeParticipants.map((p) => ({ actorId: p.actorId, role: p.role })),\n sendSignal,\n muted: localMuted,\n videoEnabled: !localVideoOff,\n });\n\n useEvmSubscription<{ eventfullyManagedVirtualSignal: IncomingVirtualSignal }>({\n query: VIRTUAL_SIGNAL_SUBSCRIPTION_SDL,\n variables: { sessionId: session?.id },\n operationName: 'EventfullymanagedVirtualSignal',\n enabled: Boolean(selfParticipant && session),\n onData: (data) => {\n const signal = data.eventfullyManagedVirtualSignal;\n if (signal) call.handleIncomingSignal(signal);\n },\n // No real polling substitute exists for signaling — a missed signal is\n // simply a missed negotiation step. The fallback here just retries the\n // subscription's own reconnect path via re-render, kept as a no-op.\n pollFn: () => {},\n pollIntervalMs: 15_000,\n });\n\n useEvmSubscription<{ eventfullyManagedVirtualParticipantsChanged: unknown }>({\n query: VIRTUAL_PARTICIPANTS_CHANGED_SUBSCRIPTION_SDL,\n variables: { sessionId: session?.id },\n operationName: 'EventfullymanagedVirtualParticipantsChanged',\n enabled: Boolean(session),\n onData: () => {\n void sessionQuery.refetch();\n },\n pollFn: () => {\n void sessionQuery.refetch();\n },\n pollIntervalMs: 5_000,\n });\n\n const onHost = async (chosenMode: 'MEETING' | 'WEBINAR') => {\n try {\n const response = await hostSession({ variables: { eventId, mode: chosenMode } });\n if (!mutationSucceeded(response, response.data?.hostVirtualSession?.id, 'Could not start session')) {\n return;\n }\n notify.success('Session started', chosenMode === 'WEBINAR' ? 'Hosting as a webinar.' : 'Hosting a meeting.');\n await sessionQuery.refetch();\n } catch (error) {\n notify.error('Could not start session', describeError(error));\n }\n };\n\n const onJoin = async () => {\n try {\n const response = await joinSession({ variables: { eventId } });\n if (!mutationSucceeded(response, response.data?.joinVirtualSession?.id, 'Could not join session')) {\n return;\n }\n await sessionQuery.refetch();\n } catch (error) {\n notify.error('Could not join session', describeError(error));\n }\n };\n\n const onLeave = async () => {\n if (!session) return;\n try {\n await leaveSession({ variables: { sessionId: session.id } });\n notify.success('Left session', 'You are no longer in the virtual session.');\n await sessionQuery.refetch();\n } catch (error) {\n notify.error('Could not leave session', describeError(error));\n }\n };\n\n const onEnd = async () => {\n if (!session) return;\n try {\n await endSession({ variables: { sessionId: session.id } });\n notify.success('Session ended', 'The virtual session has been ended for everyone.');\n await sessionQuery.refetch();\n } catch (error) {\n notify.error('Could not end session', describeError(error));\n }\n };\n\n const toggleMute = async () => {\n if (!session) return;\n const next = !localMuted;\n setLocalMuted(next);\n try {\n await setMuteMutation({ variables: { sessionId: session.id, muted: next } });\n } catch (error) {\n setLocalMuted(!next);\n notify.error('Could not update mute state', describeError(error));\n }\n };\n\n const toggleVideo = async () => {\n if (!session) return;\n const next = !localVideoOff;\n setLocalVideoOff(next);\n try {\n await setVideoMutation({ variables: { sessionId: session.id, videoEnabled: !next } });\n } catch (error) {\n setLocalVideoOff(!next);\n notify.error('Could not update camera state', describeError(error));\n }\n };\n\n const onPromote = async (participant: VirtualParticipantGql) => {\n if (!session) return;\n try {\n await promotePresenter({ variables: { sessionId: session.id, actorId: participant.actorId } });\n notify.success('Promoted to presenter', `Participant ${participant.actorId.slice(0, 6)} can now broadcast.`);\n await sessionQuery.refetch();\n } catch (error) {\n notify.error('Could not promote participant', describeError(error));\n }\n };\n\n const isHost = selfParticipant?.role === 'HOST';\n const busy = hosting || joining || leaving || ending;\n\n if (eventLoading || sessionQuery.loading) {\n return (\n <div className=\"space-y-4 p-6\">\n <Skeleton className=\"h-8 w-64\" />\n <Skeleton className=\"h-64 w-full\" />\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6\">\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => navigate(`/events/${eventId}`)}>\n <ArrowLeft className=\"h-4 w-4\" />\n Back to Event\n </Button>\n\n <PagePurpose>\n A virtual session is a real, browser-native WebRTC room for this event — no external meeting link. Hosts start a\n Meeting (small mesh, up to 8 people all connected directly) or a Webinar (up to 30 attendees who see and hear\n only the host/presenters). Signaling is relayed through EventfullyManaged; media never touches our servers.\n </PagePurpose>\n\n <EmphasisPanel className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>Virtual Session</GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">{eventData?.event?.name ?? 'Event'}</p>\n </div>\n {session ? (\n <Badge variant={session.status === 'ACTIVE' ? 'success' : 'secondary'} className=\"uppercase\">\n {session.mode} · {session.status}\n </Badge>\n ) : null}\n </EmphasisPanel>\n\n {!session || session.status !== 'ACTIVE' ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-8\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No live virtual session\"\n description=\"Start a session to host attendees over WebRTC, or join once someone else has started one.\"\n className=\"py-6\"\n />\n <div className=\"mt-4 flex flex-wrap items-center justify-center gap-2\">\n <Select value={mode} onValueChange={(value) => setMode(value as 'MEETING' | 'WEBINAR')}>\n <SelectTrigger aria-label=\"Session mode\" className=\"w-48\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"MEETING\">Meeting (up to 8)</SelectItem>\n <SelectItem value=\"WEBINAR\">Webinar (up to 30)</SelectItem>\n </SelectContent>\n </Select>\n <Button type=\"button\" onClick={() => onHost(mode)} disabled={busy}>\n <Radio className=\"h-4 w-4\" />\n {hosting ? 'Starting…' : 'Start session'}\n </Button>\n </div>\n </GlassCard>\n ) : !selfParticipant ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-8\">\n <IllustratedEmptyState\n illustration=\"empty-people\"\n title=\"A session is live\"\n description={`${session.participantCount} of ${session.maxParticipants} seats in use. Join to turn on your camera and mic.`}\n className=\"py-6\"\n />\n <div className=\"mt-4 flex justify-center\">\n <Button type=\"button\" onClick={onJoin} disabled={busy}>\n <Video className=\"h-4 w-4\" />\n {joining ? 'Joining…' : 'Join session'}\n </Button>\n </div>\n </GlassCard>\n ) : (\n <>\n {call.mediaError ? (\n <GlassCard\n treatment=\"plain\"\n className=\"border-status-danger/40 bg-status-danger/5 p-4 text-sm text-status-danger\"\n >\n Camera/microphone unavailable: {call.mediaError}. You are still connected to the session and can see other\n participants, but others will not see or hear you.\n </GlassCard>\n ) : null}\n\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3\">\n <VideoTile\n actorId={selfActorId}\n role={selfParticipant.role}\n isLocal\n stream={call.localStream}\n muted={localMuted}\n videoEnabled={!localVideoOff}\n />\n {activeParticipants\n .filter((p) => p.actorId !== selfActorId)\n .map((participant) => (\n <VideoTile\n key={participant.actorId}\n actorId={participant.actorId}\n role={participant.role}\n isLocal={false}\n stream={call.remoteStreams.get(participant.actorId) ?? null}\n muted={participant.muted}\n videoEnabled={participant.videoEnabled}\n connectionState={call.connectionStates.get(participant.actorId)}\n />\n ))}\n </div>\n\n <GlassCard\n treatment=\"plain\"\n className=\"flex flex-wrap items-center justify-center gap-2 border-border-seam p-4\"\n >\n <Button type=\"button\" variant={localMuted ? 'outline' : 'secondary'} onClick={toggleMute}>\n {localMuted ? <MicOff className=\"h-4 w-4\" /> : <Mic className=\"h-4 w-4\" />}\n {localMuted ? 'Unmute' : 'Mute'}\n </Button>\n <Button type=\"button\" variant={localVideoOff ? 'outline' : 'secondary'} onClick={toggleVideo}>\n {localVideoOff ? <VideoOff className=\"h-4 w-4\" /> : <Video className=\"h-4 w-4\" />}\n {localVideoOff ? 'Start Video' : 'Stop Video'}\n </Button>\n <Button type=\"button\" variant=\"outline\" onClick={onLeave} disabled={busy}>\n <PhoneOff className=\"h-4 w-4\" />\n {leaving ? 'Leaving…' : 'Leave'}\n </Button>\n {isHost ? (\n <Button type=\"button\" variant=\"destructive\" onClick={onEnd} disabled={busy}>\n <ScreenShare className=\"h-4 w-4\" />\n {ending ? 'Ending…' : 'End for everyone'}\n </Button>\n ) : null}\n </GlassCard>\n\n <VirtualEngagementPanel\n key={session.id}\n sessionId={session.id}\n canModerate={Boolean(selfParticipant) && session.hostId === selfActorId}\n />\n\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-4\">\n <h2 className=\"flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <Users className=\"h-4 w-4 text-accent-primary\" />\n Participants ({activeParticipants.length}/{session.maxParticipants})\n </h2>\n <div className=\"mt-3 space-y-2\">\n {activeParticipants.map((participant) => (\n <div key={participant.id} className=\"flex items-center justify-between gap-2 text-sm\">\n <span className=\"flex items-center gap-2 text-text-secondary\">\n <span\n className={`h-2 w-2 rounded-full ${\n participant.actorId === selfActorId\n ? 'bg-status-success'\n : connectionDotClass(call.connectionStates.get(participant.actorId))\n }`}\n />\n {participant.actorId === selfActorId ? 'You' : `Participant ${participant.actorId.slice(0, 6)}`}\n <Badge variant=\"secondary\" className=\"uppercase\">\n {participant.role}\n </Badge>\n </span>\n {isHost && session.mode === 'WEBINAR' && participant.role === 'ATTENDEE' ? (\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => onPromote(participant)}>\n Promote to presenter\n </Button>\n ) : null}\n </div>\n ))}\n </div>\n </GlassCard>\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAuDA,SAASC,EAAS,GAAoB;CACpC,OAAOC,EAAG,MAAM,GAAG,CAAC,CAAC,CAAC,YAAY;AACpC;AAEA,SAASC,EAAmB,GAAmD;CAI7E,OAHIC,MAAU,cAAoB,sBAC9BA,MAAU,gBAAgBA,MAAU,QAAc,sBAClDA,MAAU,YAAYA,MAAU,kBAAkBA,MAAU,WAAiB,qBAC1E;AACT;AAaA,SAASC,EAAU,EAAE,YAAS,SAAM,YAAS,WAAQ,UAAO,iBAAc,sBAAmC;CAC3G,IAAMC,IAAWC,EAAyB,IAAI;CAO9C,OANAC,QAAgB;EACd,AAAIF,EAAS,YAAS,EAAS,QAAQ,YAAYG;CACrD,GAAG,CAACA,CAAM,CAAC,GAKT,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAHwBA,KAAWC,IAK/B,kBAAC,SAAD;GACE,KAAKJ;GACL,UAAA;GACA,aAAA;GACA,OAAOK;GACP,WAAU;GACV,OAAOA,IAAU,EAAE,WAAW,aAAa,IAAI,KAAA;EAChD,CAAA,IAED,kBAAC,OAAD;GAAK,WAAU;GACb,UAAA,kBAAC,QAAD;IAAM,WAAU;IACb,UAAAV,EAASW,CA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