@ai-matrx/meet 0.7.84 → 0.7.85

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.
package/dist/react.cjs CHANGED
@@ -33,54 +33,26 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
33
33
  var react_exports = {};
34
34
  __export(react_exports, {
35
35
  ATTENDANCE_CSV_HEADER: () => ATTENDANCE_CSV_HEADER,
36
- ActivitiesControl: () => ActivitiesControl,
37
- ActivitiesIcon: () => ActivitiesIcon,
38
- AiPanel: () => AiPanel,
39
- AttendanceNotice: () => AttendanceNotice,
40
- Avatar: () => Avatar,
41
- BreakoutBanner: () => BreakoutBanner,
42
- BreakoutIcon: () => BreakoutIcon,
43
- BreakoutsPanel: () => BreakoutsPanel,
44
36
  CALL_INVITE_KIND: () => CALL_INVITE_KIND,
45
37
  CALL_INVITE_VERSION: () => CALL_INVITE_VERSION,
46
38
  CAPTION_LANGUAGES: () => CAPTION_LANGUAGES,
47
39
  CONSENT_NOTICE_ATTRIBUTE: () => CONSENT_NOTICE_ATTRIBUTE,
48
- CallButton: () => CallButton,
49
- CameraIcon: () => CameraIcon,
50
- CameraOffIcon: () => CameraOffIcon,
51
- CaptionLanguageSettings: () => CaptionLanguageSettings,
52
- Captions: () => Captions,
53
- ChatIcon: () => ChatIcon,
54
- ChatPanel: () => ChatPanel,
55
- CheckIcon: () => CheckIcon,
56
- CloseIcon: () => CloseIcon,
57
- ConnectionDot: () => ConnectionDot,
58
- ConsentNotice: () => ConsentNotice,
59
- ControlBar: () => ControlBar,
60
- ControlButton: () => ControlButton,
61
40
  DATA_TOPICS: () => DATA_TOPICS,
62
41
  DEFAULT_EFFECTS: () => DEFAULT_EFFECTS,
63
42
  DEFAULT_PAGE_SIZE: () => DEFAULT_PAGE_SIZE,
64
43
  EMPTY_COLLAB: () => EMPTY_COLLAB,
65
44
  END_MEETING_NOT_SERVED: () => END_MEETING_NOT_SERVED,
66
45
  FILE_SESSION_PATH: () => FILE_SESSION_PATH,
67
- FlagIcon: () => FlagIcon,
68
46
  GUEST_RECORD_ACCESS_CHOICES: () => GUEST_RECORD_ACCESS_CHOICES,
69
47
  GUEST_RECORD_ACCESS_LEVELS: () => GUEST_RECORD_ACCESS_LEVELS,
70
48
  GUEST_RECORD_ACCESS_METADATA_KEY: () => GUEST_RECORD_ACCESS_METADATA_KEY,
71
49
  GUEST_RECORD_NOT_SHARED: () => GUEST_RECORD_NOT_SHARED,
72
50
  GuestRecordAccessControl: () => GuestRecordAccessControl,
73
- HandIcon: () => HandIcon,
74
- HostMenu: () => HostMenu,
75
51
  IDLE_MEDIA: () => IDLE_MEDIA,
76
52
  IDLE_TRACK: () => IDLE_TRACK,
77
53
  IncomingCallCard: () => IncomingCallCard,
78
54
  IncomingCallHost: () => IncomingCallHost,
79
- KeyboardIcon: () => KeyboardIcon,
80
55
  LISTEN_ONLY_NOTICE: () => LISTEN_ONLY_NOTICE,
81
- LayoutIcon: () => LayoutIcon,
82
- LobbyPanel: () => LobbyPanel,
83
- LockIcon: () => LockIcon,
84
56
  MEETING_INVITE_KIND: () => MEETING_INVITE_KIND,
85
57
  MEETING_INVITE_VERSION: () => MEETING_INVITE_VERSION,
86
58
  MEETING_RECORD_GRACE_MS: () => MEETING_RECORD_GRACE_MS,
@@ -95,33 +67,14 @@ __export(react_exports, {
95
67
  MeetError: () => MeetError,
96
68
  MeetProvider: () => MeetProvider,
97
69
  MeetRoot: () => MeetRoot,
98
- MeetingList: () => MeetingList,
99
- MeetingOverlays: () => MeetingOverlays,
100
70
  MeetingRecordView: () => MeetingRecordView,
101
- MeetingRoom: () => MeetingRoom,
102
- MicIcon: () => MicIcon,
103
- MicOffIcon: () => MicOffIcon,
104
- MoreIcon: () => MoreIcon,
71
+ MeetingSkinRoot: () => MeetingSkinRoot,
105
72
  NOTE_TAKER_IDENTITY_PREFIX: () => NOTE_TAKER_IDENTITY_PREFIX,
106
73
  NOTE_TAKER_METADATA_KEY: () => NOTE_TAKER_METADATA_KEY,
107
74
  NO_GRANTS: () => NO_GRANTS,
108
75
  ORGANIZATION_HEADER: () => ORGANIZATION_HEADER,
109
76
  PARTICIPANT_CAN_RECORD_ATTRIBUTE: () => PARTICIPANT_CAN_RECORD_ATTRIBUTE,
110
77
  PARTICIPANT_ROLE_ATTRIBUTE: () => PARTICIPANT_ROLE_ATTRIBUTE,
111
- ParticipantTile: () => ParticipantTile,
112
- PencilIcon: () => PencilIcon,
113
- PeopleIcon: () => PeopleIcon,
114
- PeoplePanel: () => PeoplePanel,
115
- PersonMenu: () => PersonMenu,
116
- PhoneIcon: () => PhoneIcon,
117
- PhoneOffIcon: () => PhoneOffIcon,
118
- PinIcon: () => PinIcon,
119
- PollIcon: () => PollIcon,
120
- PollsPanel: () => PollsPanel,
121
- PreJoin: () => PreJoin,
122
- QaPanel: () => QaPanel,
123
- QualityBars: () => QualityBars,
124
- QuestionIcon: () => QuestionIcon,
125
78
  REACTION_TTL_MS: () => REACTION_TTL_MS,
126
79
  REFUSED_ABSENCE: () => REFUSED_ABSENCE,
127
80
  ROLE_RANK: () => ROLE_RANK,
@@ -129,30 +82,13 @@ __export(react_exports, {
129
82
  ROOM_EVENT_PREFIX: () => ROOM_EVENT_PREFIX,
130
83
  ROOM_TOKEN_HEADER: () => ROOM_TOKEN_HEADER,
131
84
  RPCS: () => RPCS,
132
- ReactionOverlay: () => ReactionOverlay,
133
- RecordIcon: () => RecordIcon,
134
- RecordingIndicator: () => RecordingIndicator,
135
85
  RecordingPlayer: () => RecordingPlayer,
136
- ScheduleMeeting: () => ScheduleMeeting,
137
- ScreenShareIcon: () => ScreenShareIcon,
138
- SearchIcon: () => SearchIcon,
139
- SettingsIcon: () => SettingsIcon,
140
- SettingsPanel: () => SettingsPanel,
141
- ShortcutsSheet: () => ShortcutsSheet,
142
- SignalIcon: () => SignalIcon,
143
- SmileIcon: () => SmileIcon,
144
- SparklesIcon: () => SparklesIcon,
145
- SpeakerIcon: () => SpeakerIcon,
146
- SpotlightIcon: () => SpotlightIcon,
147
- Stage: () => Stage,
148
86
  TABLES: () => TABLES,
149
87
  TRANSCRIPTION_ATTRIBUTES: () => TRANSCRIPTION_ATTRIBUTES,
150
88
  TRANSCRIPTION_TOPIC: () => TRANSCRIPTION_TOPIC,
151
- WhiteboardIcon: () => WhiteboardIcon,
152
- WhiteboardPanel: () => WhiteboardPanel,
153
- WifiLowIcon: () => WifiLowIcon,
154
89
  absenceSentence: () => absenceSentence,
155
90
  activeWrapUpSummary: () => activeWrapUpSummary,
91
+ activityAttention: () => activityAttention,
156
92
  announceMeeting: () => announceMeeting,
157
93
  applyCollabPacket: () => applyCollabPacket,
158
94
  applyRoomEvent: () => applyRoomEvent,
@@ -169,6 +105,7 @@ __export(react_exports, {
169
105
  attendanceTotals: () => attendanceTotals,
170
106
  attendeeKey: () => attendeeKey,
171
107
  autoAssign: () => autoAssign,
108
+ availableActivities: () => availableActivities,
172
109
  breakoutRemainingMs: () => breakoutRemainingMs,
173
110
  callInviteAction: () => callInviteAction,
174
111
  callInviteText: () => callInviteText,
@@ -241,6 +178,8 @@ __export(react_exports, {
241
178
  mergeCaption: () => mergeCaption,
242
179
  mergeRecord: () => mergeRecord,
243
180
  microphoneNoticeCode: () => microphoneNoticeCode,
181
+ moveToRoom: () => moveToRoom,
182
+ nextTranslationBatch: () => nextTranslationBatch,
244
183
  normalizeDeviceError: () => normalizeDeviceError,
245
184
  normalizeMeetError: () => normalizeMeetError,
246
185
  normalizeSpoken: () => normalizeSpoken,
@@ -257,6 +196,7 @@ __export(react_exports, {
257
196
  parseRoomToken: () => parseRoomToken,
258
197
  participantAttributes: () => participantAttributes,
259
198
  participantSummary: () => participantSummary,
199
+ performCollab: () => performCollab,
260
200
  playableRecordingFileId: () => playableRecordingFileId,
261
201
  projectInvitee: () => projectInvitee,
262
202
  projectLibraryRecording: () => projectLibraryRecording,
@@ -279,15 +219,20 @@ __export(react_exports, {
279
219
  rootAttributes: () => rootAttributes,
280
220
  searchTranscript: () => searchTranscript,
281
221
  sendFollowUp: () => sendFollowUp,
222
+ setCaptionLanguage: () => setCaptionLanguage,
282
223
  setGuestRecordAccess: () => setGuestRecordAccess,
283
224
  settingsPatch: () => settingsPatch,
284
225
  snapshotParticipant: () => snapshotParticipant,
285
226
  snippetRuns: () => snippetRuns,
286
227
  staticObservation: () => staticObservation,
287
228
  summarizeMeetingRecordRestrictions: () => summarizeMeetingRecordRestrictions,
229
+ takeMoveRequest: () => takeMoveRequest,
230
+ takePanelRequest: () => takePanelRequest,
288
231
  transcriptDocument: () => transcriptDocument,
289
232
  unavailableFrom: () => unavailableFrom,
290
233
  uniqueAttendees: () => uniqueAttendees,
234
+ untranslatedLines: () => untranslatedLines,
235
+ useActivityAttention: () => useActivityAttention,
291
236
  useAudioLevel: () => useAudioLevel,
292
237
  useAvailableActivities: () => useAvailableActivities,
293
238
  useCalls: () => useCalls,
@@ -312,6 +257,7 @@ __export(react_exports, {
312
257
  useLocalUserId: () => useLocalUserId,
313
258
  useMediaEffects: () => useMediaEffects,
314
259
  useMeetAi: () => useMeetAi,
260
+ useMeetCore: () => useMeetCore,
315
261
  useMeetHost: () => useMeetHost,
316
262
  useMeetShortcuts: () => useMeetShortcuts,
317
263
  useMeetSnapshot: () => useMeetSnapshot,
@@ -334,6 +280,18 @@ __export(react_exports, {
334
280
  });
335
281
  module.exports = __toCommonJS(react_exports);
336
282
 
283
+ // src/core/slot.ts
284
+ var NAMESPACE = "ai-matrx.meet";
285
+ function globalSlot(name, create) {
286
+ const key = /* @__PURE__ */ Symbol.for(`${NAMESPACE}.${name}`);
287
+ const host = globalThis;
288
+ const existing = host[key];
289
+ if (existing !== void 0) return existing;
290
+ const created = create();
291
+ host[key] = created;
292
+ return created;
293
+ }
294
+
337
295
  // src/react/provider.tsx
338
296
  var import_react = require("react");
339
297
  var import_react2 = require("@ai-matrx/realtime/react");
@@ -1221,20 +1179,6 @@ function fileDownloadPath(fileId) {
1221
1179
 
1222
1180
  // src/core/channels.ts
1223
1181
  var import_realtime = require("@ai-matrx/realtime");
1224
-
1225
- // src/core/slot.ts
1226
- var NAMESPACE = "ai-matrx.meet";
1227
- function globalSlot(name, create) {
1228
- const key = /* @__PURE__ */ Symbol.for(`${NAMESPACE}.${name}`);
1229
- const host = globalThis;
1230
- const existing = host[key];
1231
- if (existing !== void 0) return existing;
1232
- const created = create();
1233
- host[key] = created;
1234
- return created;
1235
- }
1236
-
1237
- // src/core/channels.ts
1238
1182
  function namespaces() {
1239
1183
  return globalSlot("channel-namespaces", () => ({
1240
1184
  user: (0, import_realtime.defineChannelNamespace)({
@@ -5543,7 +5487,7 @@ async function createCameraPreview(deviceId2, effect) {
5543
5487
 
5544
5488
  // src/react/provider.tsx
5545
5489
  var import_jsx_runtime = require("react/jsx-runtime");
5546
- var MeetContext = (0, import_react.createContext)(null);
5490
+ var MeetContext = globalSlot("react.context", () => (0, import_react.createContext)(null));
5547
5491
  function defaultDiagnostics(event) {
5548
5492
  const line = `[@ai-matrx/meet] ${event.message}${event.remedy !== void 0 ? `
5549
5493
  \u2192 ${event.remedy}` : ""}`;
@@ -7521,10 +7465,15 @@ function useGuestRecordAccess(meeting) {
7521
7465
  };
7522
7466
  }
7523
7467
 
7524
- // src/react/components.tsx
7468
+ // src/react/skin-root.tsx
7469
+ var import_react11 = require("react");
7470
+
7471
+ // src/skins/meet/components.tsx
7472
+ var import_react9 = require("react");
7473
+
7474
+ // src/react/facade.ts
7525
7475
  var import_react7 = require("react");
7526
- var import_design_system = require("@ai-matrx/design-system");
7527
- var import_format4 = require("@ai-matrx/kit/format");
7476
+ var import_format3 = require("@ai-matrx/kit/format");
7528
7477
 
7529
7478
  // src/core/after.ts
7530
7479
  var import_delimited = require("@ai-matrx/kit/delimited");
@@ -7961,11 +7910,151 @@ function countLabel(count2, singular, plural = `${singular}s`) {
7961
7910
  return `${count2} ${count2 === 1 ? singular : plural}`;
7962
7911
  }
7963
7912
 
7964
- // src/react/collab.tsx
7913
+ // src/core/collab-state.ts
7914
+ function availableActivities(collab, isHost) {
7915
+ const settings = collab?.settings ?? null;
7916
+ if (settings === null) return [];
7917
+ const out = [];
7918
+ if (settings.whiteboardEnabled) out.push("whiteboard");
7919
+ if (settings.pollsEnabled && (isHost || (collab?.polls.length ?? 0) > 0)) out.push("polls");
7920
+ if (settings.qaEnabled) out.push("qa");
7921
+ if (settings.breakoutsEnabled && (isHost || collab?.breakout?.state === "open")) out.push("breakouts");
7922
+ return out;
7923
+ }
7924
+ function activityAttention(collab, isHost) {
7925
+ if (collab === null) return false;
7926
+ if (collab.polls.some((poll) => poll.state === "live" && poll.myVote.length === 0 && !isHost)) return true;
7927
+ if (isHost && collab.questions.some((q) => q.state === "open")) return true;
7928
+ return false;
7929
+ }
7930
+ async function performCollab(runtime, request) {
7931
+ if (runtime === null) return { ok: false, message: "This meeting is not connected." };
7932
+ try {
7933
+ const result = await runtime.inRoom.collab(request);
7934
+ return { ok: true, message: result.message, itemId: result.itemId };
7935
+ } catch (error) {
7936
+ return { ok: false, message: error.message ?? "That did not work." };
7937
+ }
7938
+ }
7939
+ async function moveToRoom(runtime, roomId) {
7940
+ if (runtime === null) return { ok: false, message: "This meeting is not connected." };
7941
+ try {
7942
+ await runtime.engine.moveToBreakout(roomId);
7943
+ return { ok: true, message: roomId === null ? "Back in the main room." : "Joined the breakout room." };
7944
+ } catch (error) {
7945
+ return { ok: false, message: error.message ?? "That room could not be joined." };
7946
+ }
7947
+ }
7948
+ function untranslatedLines(lines, translations) {
7949
+ return lines.filter((line) => line.final && translations[line.id] === void 0).map(({ id, text: text3 }) => ({ id, text: text3 }));
7950
+ }
7951
+ function nextTranslationBatch(pending, language, asked) {
7952
+ const batch = pending.filter((line) => !asked.has(`${language}:${line.id}`)).slice(-20);
7953
+ for (const line of batch) asked.add(`${language}:${line.id}`);
7954
+ return batch;
7955
+ }
7956
+ function setCaptionLanguage(store, next) {
7957
+ store.patch({
7958
+ collab: {
7959
+ ...store.snapshot().collab,
7960
+ captionLanguage: next,
7961
+ captionTranslations: {},
7962
+ captionTranslationError: null
7963
+ }
7964
+ });
7965
+ }
7966
+ function takePanelRequest(store) {
7967
+ const request = store.snapshot().collab.panelRequest;
7968
+ if (request === null) return null;
7969
+ store.patch({ collab: { ...store.snapshot().collab, panelRequest: null } });
7970
+ return request.panel;
7971
+ }
7972
+ function takeMoveRequest(store) {
7973
+ const request = store.snapshot().collab.moveRequest;
7974
+ if (request === null) return null;
7975
+ store.patch({ collab: { ...store.snapshot().collab, moveRequest: null } });
7976
+ return { roomId: request.roomId };
7977
+ }
7978
+
7979
+ // src/react/collab-hooks.ts
7965
7980
  var import_react6 = require("react");
7966
- var import_format3 = require("@ai-matrx/kit/format");
7981
+ function useCollab() {
7982
+ const host = useMeetHost();
7983
+ const snapshot = useMeetSnapshot();
7984
+ const isHost = useIsHost();
7985
+ return {
7986
+ collab: snapshot?.collab ?? null,
7987
+ isHost,
7988
+ localIdentity: snapshot?.localIdentity ?? null,
7989
+ breakoutRoomId: snapshot?.breakoutRoomId ?? null,
7990
+ act: (request) => performCollab(host, request),
7991
+ moveTo: (roomId) => moveToRoom(host, roomId)
7992
+ };
7993
+ }
7994
+ function useAvailableActivities() {
7995
+ const { collab, isHost } = useCollab();
7996
+ return availableActivities(collab, isHost);
7997
+ }
7998
+ function useActivityAttention() {
7999
+ const { collab, isHost } = useCollab();
8000
+ return activityAttention(collab, isHost);
8001
+ }
8002
+ function useCaptionTranslation(lines) {
8003
+ const host = useMeetHost();
8004
+ const snapshot = useMeetSnapshot();
8005
+ const collab = snapshot?.collab ?? null;
8006
+ const language = collab?.captionLanguage ?? null;
8007
+ const asked = (0, import_react6.useRef)(/* @__PURE__ */ new Set());
8008
+ const translations = collab?.captionTranslations ?? {};
8009
+ const missing = untranslatedLines(lines, translations);
8010
+ const key = `${language ?? ""}|${missing.map((l) => l.id).join(",")}`;
8011
+ const pending = (0, import_react6.useRef)(missing);
8012
+ pending.current = missing;
8013
+ (0, import_react6.useEffect)(() => {
8014
+ if (host === null || language === null) return;
8015
+ const batch = nextTranslationBatch(pending.current, language, asked.current);
8016
+ if (batch.length === 0) return;
8017
+ void host.inRoom.translateCaptions(language, batch).catch(() => void 0);
8018
+ }, [host, language, key]);
8019
+ return { language, translations, error: collab?.captionTranslationError ?? null };
8020
+ }
8021
+ function useCollabPanelRequest(onRequest) {
8022
+ const host = useMeetHost();
8023
+ const at = useMeetSnapshot()?.collab.panelRequest?.at ?? null;
8024
+ const callback = (0, import_react6.useRef)(onRequest);
8025
+ callback.current = onRequest;
8026
+ (0, import_react6.useEffect)(() => {
8027
+ if (host === null) return;
8028
+ const panel = takePanelRequest(host.store);
8029
+ if (panel === null) return;
8030
+ callback.current(panel);
8031
+ }, [at, host]);
8032
+ }
8033
+
8034
+ // src/core/reactions.ts
8035
+ var MEET_REACTIONS = ["\u{1F496}", "\u{1F44D}", "\u{1F389}", "\u{1F44F}", "\u{1F602}", "\u{1F62E}", "\u{1F622}", "\u{1F914}", "\u{1F44E}"];
8036
+
8037
+ // src/react/facade.ts
8038
+ function useMeetCore() {
8039
+ const host = useMeetHost();
8040
+ const snapshot = useMeetSnapshot();
8041
+ const devices = useDeviceSnapshot();
8042
+ const role = useRole();
8043
+ const isHost = useIsHost();
8044
+ const observation = useCoreObservation();
8045
+ return (0, import_react7.useMemo)(
8046
+ () => ({ host, snapshot, devices, role, isHost, observation }),
8047
+ [host, snapshot, devices, role, isHost, observation]
8048
+ );
8049
+ }
8050
+
8051
+ // src/skins/meet/components.tsx
8052
+ var import_design_system = require("@ai-matrx/design-system");
8053
+
8054
+ // src/skins/meet/collab.tsx
8055
+ var import_react8 = require("react");
7967
8056
 
7968
- // src/react/icons.tsx
8057
+ // src/skins/meet/icons.tsx
7969
8058
  var import_jsx_runtime3 = require("react/jsx-runtime");
7970
8059
  function Icon({ children, ...props }) {
7971
8060
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -8061,12 +8150,6 @@ function LockIcon(props) {
8061
8150
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })
8062
8151
  ] });
8063
8152
  }
8064
- function LayoutIcon(props) {
8065
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Icon, { ...props, children: [
8066
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
8067
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M3 9h18M9 21V9" })
8068
- ] });
8069
- }
8070
8153
  function SettingsIcon(props) {
8071
8154
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Icon, { ...props, children: [
8072
8155
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
@@ -8085,12 +8168,6 @@ function PinIcon(props) {
8085
8168
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9 2h6l-1 6 3.5 3.5V14H6.5v-2.5L10 8 9 2Z" })
8086
8169
  ] });
8087
8170
  }
8088
- function WifiLowIcon(props) {
8089
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Icon, { ...props, children: [
8090
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 20h.01" }),
8091
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M8.5 16.5a5 5 0 0 1 7 0" })
8092
- ] });
8093
- }
8094
8171
  function SmileIcon(props) {
8095
8172
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Icon, { ...props, children: [
8096
8173
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
@@ -8203,40 +8280,11 @@ function UndoIcon(props) {
8203
8280
  ] });
8204
8281
  }
8205
8282
 
8206
- // src/react/collab.tsx
8283
+ // src/skins/meet/collab.tsx
8207
8284
  var import_jsx_runtime4 = require("react/jsx-runtime");
8208
- function useCollab() {
8209
- const host = useMeetHost();
8210
- const snapshot = useMeetSnapshot();
8211
- const isHost = useIsHost();
8212
- return {
8213
- collab: snapshot?.collab ?? null,
8214
- isHost,
8215
- localIdentity: snapshot?.localIdentity ?? null,
8216
- breakoutRoomId: snapshot?.breakoutRoomId ?? null,
8217
- async act(request) {
8218
- if (host === null) return { ok: false, message: "This meeting is not connected." };
8219
- try {
8220
- const result = await host.inRoom.collab(request);
8221
- return { ok: true, message: result.message, itemId: result.itemId };
8222
- } catch (error) {
8223
- return { ok: false, message: error.message ?? "That did not work." };
8224
- }
8225
- },
8226
- async moveTo(roomId) {
8227
- if (host === null) return { ok: false, message: "This meeting is not connected." };
8228
- try {
8229
- await host.engine.moveToBreakout(roomId);
8230
- return { ok: true, message: roomId === null ? "Back in the main room." : "Joined the breakout room." };
8231
- } catch (error) {
8232
- return { ok: false, message: error.message ?? "That room could not be joined." };
8233
- }
8234
- }
8235
- };
8236
- }
8237
8285
  function useNotice() {
8238
- const [notice, setNotice] = (0, import_react6.useState)(null);
8239
- (0, import_react6.useEffect)(() => {
8286
+ const [notice, setNotice] = (0, import_react8.useState)(null);
8287
+ (0, import_react8.useEffect)(() => {
8240
8288
  if (notice === null) return void 0;
8241
8289
  const timer = setTimeout(() => setNotice(null), notice.failed ? 7e3 : 3e3);
8242
8290
  return () => clearTimeout(timer);
@@ -8260,29 +8308,11 @@ function ActivityIcon({ panel }) {
8260
8308
  if (panel === "whiteboard") return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(WhiteboardIcon, { ...props });
8261
8309
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BreakoutIcon, { ...props });
8262
8310
  }
8263
- function useAvailableActivities() {
8264
- const { collab, isHost } = useCollab();
8265
- const settings = collab?.settings ?? null;
8266
- if (settings === null) return [];
8267
- const out = [];
8268
- if (settings.whiteboardEnabled) out.push("whiteboard");
8269
- if (settings.pollsEnabled && (isHost || (collab?.polls.length ?? 0) > 0)) out.push("polls");
8270
- if (settings.qaEnabled) out.push("qa");
8271
- if (settings.breakoutsEnabled && (isHost || collab?.breakout?.state === "open")) out.push("breakouts");
8272
- return out;
8273
- }
8274
- function useActivityAttention() {
8275
- const { collab, isHost } = useCollab();
8276
- if (collab === null) return false;
8277
- if (collab.polls.some((poll) => poll.state === "live" && poll.myVote.length === 0 && !isHost)) return true;
8278
- if (isHost && collab.questions.some((q) => q.state === "open")) return true;
8279
- return false;
8280
- }
8281
8311
  function ActivitiesControl({
8282
8312
  active,
8283
8313
  onOpen
8284
8314
  }) {
8285
- const [open, setOpen] = (0, import_react6.useState)(false);
8315
+ const [open, setOpen] = (0, import_react8.useState)(false);
8286
8316
  const available = useAvailableActivities();
8287
8317
  const attention = useActivityAttention();
8288
8318
  if (available.length === 0) return null;
@@ -8310,11 +8340,11 @@ function ActivitiesControl({
8310
8340
  }
8311
8341
  function PollComposer({ maxOptions, onDone }) {
8312
8342
  const { act } = useCollab();
8313
- const [question, setQuestion] = (0, import_react6.useState)("");
8314
- const [options, setOptions] = (0, import_react6.useState)(["", ""]);
8315
- const [multiple, setMultiple] = (0, import_react6.useState)(false);
8316
- const [anonymous, setAnonymous] = (0, import_react6.useState)(false);
8317
- const [busy, setBusy] = (0, import_react6.useState)(false);
8343
+ const [question, setQuestion] = (0, import_react8.useState)("");
8344
+ const [options, setOptions] = (0, import_react8.useState)(["", ""]);
8345
+ const [multiple, setMultiple] = (0, import_react8.useState)(false);
8346
+ const [anonymous, setAnonymous] = (0, import_react8.useState)(false);
8347
+ const [busy, setBusy] = (0, import_react8.useState)(false);
8318
8348
  const [notice, show] = useNotice();
8319
8349
  const filled = options.map((o) => o.trim()).filter(Boolean);
8320
8350
  const ready = question.trim().length > 0 && filled.length >= 2;
@@ -8395,9 +8425,9 @@ function PollComposer({ maxOptions, onDone }) {
8395
8425
  }
8396
8426
  function PollCard({ poll }) {
8397
8427
  const { act, isHost } = useCollab();
8398
- const [picked, setPicked] = (0, import_react6.useState)(poll.myVote.slice());
8428
+ const [picked, setPicked] = (0, import_react8.useState)(poll.myVote.slice());
8399
8429
  const [notice, show] = useNotice();
8400
- (0, import_react6.useEffect)(() => setPicked(poll.myVote.slice()), [poll.myVote]);
8430
+ (0, import_react8.useEffect)(() => setPicked(poll.myVote.slice()), [poll.myVote]);
8401
8431
  const counts = poll.options.some((o) => o.votes !== void 0);
8402
8432
  const total = poll.options.reduce((sum, o) => sum + (o.votes ?? 0), 0);
8403
8433
  const canVote = poll.state === "live";
@@ -8466,7 +8496,7 @@ function PollCard({ poll }) {
8466
8496
  }
8467
8497
  function PollsPanel({ onClose }) {
8468
8498
  const { collab, isHost } = useCollab();
8469
- const [composing, setComposing] = (0, import_react6.useState)(false);
8499
+ const [composing, setComposing] = (0, import_react8.useState)(false);
8470
8500
  const polls = collab?.polls ?? [];
8471
8501
  const maxOptions = collab?.settings?.pollMaxOptions ?? 10;
8472
8502
  const ordered = [...polls].reverse();
@@ -8480,8 +8510,8 @@ function PollsPanel({ onClose }) {
8480
8510
  }
8481
8511
  function QuestionCard({ question }) {
8482
8512
  const { act, isHost } = useCollab();
8483
- const [answering, setAnswering] = (0, import_react6.useState)(false);
8484
- const [reply, setReply] = (0, import_react6.useState)("");
8513
+ const [answering, setAnswering] = (0, import_react8.useState)(false);
8514
+ const [reply, setReply] = (0, import_react8.useState)("");
8485
8515
  const [notice, show] = useNotice();
8486
8516
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("li", { className: `mx-meet__collab-card mx-meet__question mx-meet__question--${question.state}`, children: [
8487
8517
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "mx-meet__question-row", children: [
@@ -8559,9 +8589,9 @@ function QuestionCard({ question }) {
8559
8589
  }
8560
8590
  function QaPanel({ onClose }) {
8561
8591
  const { collab, act } = useCollab();
8562
- const [draft, setDraft] = (0, import_react6.useState)("");
8563
- const [anonymous, setAnonymous] = (0, import_react6.useState)(false);
8564
- const [order, setOrder] = (0, import_react6.useState)("popular");
8592
+ const [draft, setDraft] = (0, import_react8.useState)("");
8593
+ const [anonymous, setAnonymous] = (0, import_react8.useState)(false);
8594
+ const [order, setOrder] = (0, import_react8.useState)("popular");
8565
8595
  const [notice, show] = useNotice();
8566
8596
  const allowAnonymous = collab?.settings?.qaAnonymousAllowed === true;
8567
8597
  const questions = [...collab?.questions ?? []];
@@ -8650,12 +8680,12 @@ function StrokeView({ stroke, onPick }) {
8650
8680
  }
8651
8681
  function WhiteboardPanel({ onClose }) {
8652
8682
  const { collab, act, isHost, localIdentity } = useCollab();
8653
- const [tool, setTool] = (0, import_react6.useState)("pen");
8654
- const [color, setColor] = (0, import_react6.useState)(INK[0]);
8655
- const [drawing, setDrawing] = (0, import_react6.useState)(null);
8656
- const [pending, setPending] = (0, import_react6.useState)([]);
8683
+ const [tool, setTool] = (0, import_react8.useState)("pen");
8684
+ const [color, setColor] = (0, import_react8.useState)(INK[0]);
8685
+ const [drawing, setDrawing] = (0, import_react8.useState)(null);
8686
+ const [pending, setPending] = (0, import_react8.useState)([]);
8657
8687
  const [notice, show] = useNotice();
8658
- const svgRef = (0, import_react6.useRef)(null);
8688
+ const svgRef = (0, import_react8.useRef)(null);
8659
8689
  const strokes = collab?.strokes ?? [];
8660
8690
  const mine = strokes.filter((s) => s.by === localIdentity);
8661
8691
  const point = (event) => {
@@ -8796,8 +8826,8 @@ function clock(ms2) {
8796
8826
  }
8797
8827
  var BREAKOUT_EXPIRE_RETRY_MS = 5e3;
8798
8828
  function useNow(active) {
8799
- const [now, setNow] = (0, import_react6.useState)(() => Date.now());
8800
- (0, import_react6.useEffect)(() => {
8829
+ const [now, setNow] = (0, import_react8.useState)(() => Date.now());
8830
+ (0, import_react8.useEffect)(() => {
8801
8831
  if (!active) return void 0;
8802
8832
  const timer = setInterval(() => setNow(Date.now()), 1e3);
8803
8833
  return () => clearInterval(timer);
@@ -8811,11 +8841,11 @@ function BreakoutSetup() {
8811
8841
  const people = (snapshot?.participants ?? []).filter(
8812
8842
  (p) => !p.isAgent && p.role !== "host" && p.role !== "cohost"
8813
8843
  );
8814
- const [count2, setCount] = (0, import_react6.useState)(Math.min(Math.max(2, Math.ceil(people.length / 4)), settings?.breakoutMaxRooms ?? 20));
8815
- const [mode, setMode] = (0, import_react6.useState)("auto");
8816
- const [minutes, setMinutes] = (0, import_react6.useState)(settings?.breakoutDefaultMinutes ?? 15);
8817
- const [manual, setManual] = (0, import_react6.useState)({});
8818
- const [busy, setBusy] = (0, import_react6.useState)(false);
8844
+ const [count2, setCount] = (0, import_react8.useState)(Math.min(Math.max(2, Math.ceil(people.length / 4)), settings?.breakoutMaxRooms ?? 20));
8845
+ const [mode, setMode] = (0, import_react8.useState)("auto");
8846
+ const [minutes, setMinutes] = (0, import_react8.useState)(settings?.breakoutDefaultMinutes ?? 15);
8847
+ const [manual, setManual] = (0, import_react8.useState)({});
8848
+ const [busy, setBusy] = (0, import_react8.useState)(false);
8819
8849
  const [notice, show] = useNotice();
8820
8850
  const max = settings?.breakoutMaxRooms ?? 20;
8821
8851
  const rooms = Math.min(Math.max(1, count2), max);
@@ -8931,7 +8961,7 @@ function BreakoutRun({ plan }) {
8931
8961
  const snapshot = useMeetSnapshot();
8932
8962
  const now = useNow(plan.endsAt !== null);
8933
8963
  const remaining = breakoutRemainingMs(plan, now);
8934
- const [broadcast, setBroadcast] = (0, import_react6.useState)("");
8964
+ const [broadcast, setBroadcast] = (0, import_react8.useState)("");
8935
8965
  const [notice, show] = useNotice();
8936
8966
  const nameOf = (identity) => displayNameFor(snapshot?.names ?? {}, identity, snapshot?.participants.find((p) => p.identity === identity)?.displayName);
8937
8967
  const mine = assignedRoom(plan, localIdentity);
@@ -9041,19 +9071,19 @@ function BreakoutBanner() {
9041
9071
  const now = useNow(open?.endsAt != null);
9042
9072
  const remaining = breakoutRemainingMs(open, now);
9043
9073
  const assigned = assignedRoom(open, localIdentity);
9044
- const [dismissedBroadcast, setDismissedBroadcast] = (0, import_react6.useState)(null);
9045
- const [failure, setFailure] = (0, import_react6.useState)(null);
9046
- const expireAsked = (0, import_react6.useRef)(null);
9074
+ const [dismissedBroadcast, setDismissedBroadcast] = (0, import_react8.useState)(null);
9075
+ const [failure, setFailure] = (0, import_react8.useState)(null);
9076
+ const expireAsked = (0, import_react8.useRef)(null);
9047
9077
  const moveAt = collab?.moveRequest?.at ?? null;
9048
- (0, import_react6.useEffect)(() => {
9049
- const request = host?.store.snapshot().collab.moveRequest ?? null;
9050
- if (request === null || host === null) return;
9051
- host.store.patch({ collab: { ...host.store.snapshot().collab, moveRequest: null } });
9078
+ (0, import_react8.useEffect)(() => {
9079
+ if (host === null) return;
9080
+ const request = takeMoveRequest(host.store);
9081
+ if (request === null) return;
9052
9082
  const here = host.store.snapshot().breakoutRoomId;
9053
9083
  if ((here ?? null) === request.roomId) return;
9054
9084
  void moveTo(request.roomId).then((result) => setFailure(result.ok ? null : result.message));
9055
9085
  }, [moveAt, host, moveTo]);
9056
- (0, import_react6.useEffect)(() => {
9086
+ (0, import_react8.useEffect)(() => {
9057
9087
  if (open === null || remaining === null || remaining > 0) return;
9058
9088
  const asked = expireAsked.current;
9059
9089
  if (asked !== null && asked.id === open.id && now - asked.at < BREAKOUT_EXPIRE_RETRY_MS) return;
@@ -9098,26 +9128,6 @@ function BreakoutBanner() {
9098
9128
  ] }) : null
9099
9129
  ] });
9100
9130
  }
9101
- function useCaptionTranslation(lines) {
9102
- const host = useMeetHost();
9103
- const snapshot = useMeetSnapshot();
9104
- const collab = snapshot?.collab ?? null;
9105
- const language = collab?.captionLanguage ?? null;
9106
- const asked = (0, import_react6.useRef)(/* @__PURE__ */ new Set());
9107
- const translations = collab?.captionTranslations ?? {};
9108
- const missing = lines.filter((line) => line.final && translations[line.id] === void 0).map(({ id, text: text3 }) => ({ id, text: text3 }));
9109
- const key = `${language ?? ""}|${missing.map((l) => l.id).join(",")}`;
9110
- const pending = (0, import_react6.useRef)(missing);
9111
- pending.current = missing;
9112
- (0, import_react6.useEffect)(() => {
9113
- if (host === null || language === null) return;
9114
- const batch = pending.current.filter((line) => !asked.current.has(`${language}:${line.id}`)).slice(-20);
9115
- if (batch.length === 0) return;
9116
- for (const line of batch) asked.current.add(`${language}:${line.id}`);
9117
- void host.inRoom.translateCaptions(language, batch).catch(() => void 0);
9118
- }, [host, language, key]);
9119
- return { language, translations, error: collab?.captionTranslationError ?? null };
9120
- }
9121
9131
  function CaptionLanguageSettings() {
9122
9132
  const host = useMeetHost();
9123
9133
  const snapshot = useMeetSnapshot();
@@ -9138,14 +9148,7 @@ function CaptionLanguageSettings() {
9138
9148
  value: current,
9139
9149
  onChange: (event) => {
9140
9150
  const next = event.target.value === "" ? null : event.target.value;
9141
- host.store.patch({
9142
- collab: {
9143
- ...host.store.snapshot().collab,
9144
- captionLanguage: next,
9145
- captionTranslations: {},
9146
- captionTranslationError: null
9147
- }
9148
- });
9151
+ setCaptionLanguage(host.store, next);
9149
9152
  },
9150
9153
  children: [
9151
9154
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("option", { value: "", children: "Off \u2014 as spoken" }),
@@ -9161,20 +9164,8 @@ function CaptionLanguageSettings() {
9161
9164
  collab?.captionTranslationError != null ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "mx-meet__panel-note mx-meet__collab-error", children: collab.captionTranslationError }) : null
9162
9165
  ] });
9163
9166
  }
9164
- function useCollabPanelRequest(onRequest) {
9165
- const host = useMeetHost();
9166
- const at = useMeetSnapshot()?.collab.panelRequest?.at ?? null;
9167
- const callback = (0, import_react6.useRef)(onRequest);
9168
- callback.current = onRequest;
9169
- (0, import_react6.useEffect)(() => {
9170
- const request = host?.store.snapshot().collab.panelRequest ?? null;
9171
- if (request === null || host === null) return;
9172
- host.store.patch({ collab: { ...host.store.snapshot().collab, panelRequest: null } });
9173
- callback.current(request.panel);
9174
- }, [at, host]);
9175
- }
9176
9167
 
9177
- // src/react/components.tsx
9168
+ // src/skins/meet/components.tsx
9178
9169
  var import_jsx_runtime5 = require("react/jsx-runtime");
9179
9170
  function InertNotice({ what }) {
9180
9171
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__empty", role: "status", children: [
@@ -9190,7 +9181,7 @@ function Avatar({
9190
9181
  url,
9191
9182
  size = 40
9192
9183
  }) {
9193
- const tint = (0, import_format4.avatarPaletteIndex)(name);
9184
+ const tint = (0, import_format3.avatarPaletteIndex)(name);
9194
9185
  if (url != null && url.length > 0) {
9195
9186
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
9196
9187
  "img",
@@ -9215,7 +9206,7 @@ function Avatar({
9215
9206
  background: `var(--mx-meet-avatar-${tint})`
9216
9207
  },
9217
9208
  "aria-hidden": "true",
9218
- children: (0, import_format4.getInitials)(name)
9209
+ children: (0, import_format3.getInitials)(name)
9219
9210
  }
9220
9211
  );
9221
9212
  }
@@ -9258,10 +9249,6 @@ function RecordingIndicator() {
9258
9249
  }
9259
9250
  );
9260
9251
  }
9261
- function ConnectionDot({ quality }) {
9262
- if (quality === "excellent" || quality === "good" || quality === "unknown") return null;
9263
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: `mx-meet__quality mx-meet__quality--${quality}`, title: `Connection ${quality}`, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(WifiLowIcon, { width: 14, height: 14 }) });
9264
- }
9265
9252
  function RoleBadge({ role }) {
9266
9253
  if (role === "host") return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__badge", children: "Host" });
9267
9254
  if (role === "cohost") return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__badge", children: "Co-host" });
@@ -9275,7 +9262,7 @@ function ParticipantTile({
9275
9262
  const host = useMeetHost();
9276
9263
  const snapshot = useMeetSnapshot();
9277
9264
  const queue = useHandQueue();
9278
- const [menu, setMenu] = (0, import_react7.useState)(false);
9265
+ const [menu, setMenu] = (0, import_react9.useState)(false);
9279
9266
  const videoRef = useTrack(
9280
9267
  participant.identity,
9281
9268
  participant.screenSharing ? "screen" : "camera"
@@ -9386,21 +9373,20 @@ function Stage({ pageSize }) {
9386
9373
  ] }) : null
9387
9374
  ] });
9388
9375
  }
9389
- var MEET_REACTIONS = ["\u{1F496}", "\u{1F44D}", "\u{1F389}", "\u{1F44F}", "\u{1F602}", "\u{1F62E}", "\u{1F622}", "\u{1F914}", "\u{1F44E}"];
9390
9376
  function ControlBar({ onLeave }) {
9391
9377
  const room = useRoom();
9392
9378
  const recording = useRecording();
9393
- const [panel, setPanel] = (0, import_react7.useState)("none");
9394
- const [chatTo, setChatTo] = (0, import_react7.useState)(null);
9395
- const [popover, setPopover] = (0, import_react7.useState)("none");
9396
- const [shortcuts, setShortcuts] = (0, import_react7.useState)(false);
9379
+ const [panel, setPanel] = (0, import_react9.useState)("none");
9380
+ const [chatTo, setChatTo] = (0, import_react9.useState)(null);
9381
+ const [popover, setPopover] = (0, import_react9.useState)("none");
9382
+ const [shortcuts, setShortcuts] = (0, import_react9.useState)(false);
9397
9383
  const snapshot = useMeetSnapshot();
9398
9384
  const lobby = useLobby();
9399
9385
  const controls = useHostControls();
9400
9386
  const queue = useHandQueue();
9401
9387
  const micUnavailable = useLocalMedia().microphone.unavailable;
9402
9388
  const unread = useUnreadChat(panel === "chat");
9403
- const [whiteboard, setWhiteboard] = (0, import_react7.useState)(false);
9389
+ const [whiteboard, setWhiteboard] = (0, import_react9.useState)(false);
9404
9390
  const toggle = (next) => setPanel(panel === next ? "none" : next);
9405
9391
  const openActivity = (activity) => {
9406
9392
  if (activity === "whiteboard") setWhiteboard(true);
@@ -9411,7 +9397,7 @@ function ControlBar({ onLeave }) {
9411
9397
  });
9412
9398
  const privateChatAt = snapshot?.privateChatRequest?.at ?? null;
9413
9399
  const meetStore = useMeetHost()?.store ?? null;
9414
- (0, import_react7.useEffect)(() => {
9400
+ (0, import_react9.useEffect)(() => {
9415
9401
  const request = meetStore?.snapshot().privateChatRequest ?? null;
9416
9402
  if (request === null) return;
9417
9403
  setChatTo(request.to);
@@ -9649,13 +9635,13 @@ function useUnreadChat(open) {
9649
9635
  const snapshot = useMeetSnapshot();
9650
9636
  const chat = snapshot?.chat ?? [];
9651
9637
  const local = snapshot?.localIdentity ?? null;
9652
- const [seen, setSeen] = (0, import_react7.useState)(0);
9653
- (0, import_react7.useEffect)(() => {
9638
+ const [seen, setSeen] = (0, import_react9.useState)(0);
9639
+ (0, import_react9.useEffect)(() => {
9654
9640
  if (open) setSeen(chat.length);
9655
9641
  }, [open, chat.length]);
9656
9642
  const loaded = snapshot?.chatLoaded === true;
9657
- const [baseline, setBaseline] = (0, import_react7.useState)(null);
9658
- (0, import_react7.useEffect)(() => {
9643
+ const [baseline, setBaseline] = (0, import_react9.useState)(null);
9644
+ (0, import_react9.useEffect)(() => {
9659
9645
  if (loaded && baseline === null) setBaseline(chat.length);
9660
9646
  }, [loaded, baseline, chat.length]);
9661
9647
  if (open) return 0;
@@ -9668,14 +9654,14 @@ function Popover({
9668
9654
  children,
9669
9655
  placement = "up"
9670
9656
  }) {
9671
- const ref = (0, import_react7.useRef)(null);
9672
- const [style, setStyle] = (0, import_react7.useState)({
9657
+ const ref = (0, import_react9.useRef)(null);
9658
+ const [style, setStyle] = (0, import_react9.useState)({
9673
9659
  position: "fixed",
9674
9660
  top: 0,
9675
9661
  left: 0,
9676
9662
  visibility: "hidden"
9677
9663
  });
9678
- (0, import_react7.useLayoutEffect)(() => {
9664
+ (0, import_react9.useLayoutEffect)(() => {
9679
9665
  const element = ref.current;
9680
9666
  const anchor = element?.parentElement ?? null;
9681
9667
  if (element === null || anchor === null) return;
@@ -9720,7 +9706,7 @@ function Popover({
9720
9706
  window.removeEventListener("scroll", place, true);
9721
9707
  };
9722
9708
  }, [placement]);
9723
- (0, import_react7.useEffect)(() => {
9709
+ (0, import_react9.useEffect)(() => {
9724
9710
  const onKey = (event) => {
9725
9711
  if (event.key === "Escape") onClose();
9726
9712
  };
@@ -9754,7 +9740,7 @@ function MenuItem({
9754
9740
  );
9755
9741
  }
9756
9742
  function Toast({ text: text3, failed, onDone }) {
9757
- (0, import_react7.useEffect)(() => {
9743
+ (0, import_react9.useEffect)(() => {
9758
9744
  const timer = setTimeout(onDone, failed ? 7e3 : 4e3);
9759
9745
  return () => clearTimeout(timer);
9760
9746
  }, [text3, failed, onDone]);
@@ -9793,7 +9779,7 @@ function MeetingOverlays() {
9793
9779
  ] });
9794
9780
  }
9795
9781
  function ShortcutsSheet({ onClose }) {
9796
- (0, import_react7.useEffect)(() => {
9782
+ (0, import_react9.useEffect)(() => {
9797
9783
  const onKey = (event) => {
9798
9784
  if (event.key === "Escape") onClose();
9799
9785
  };
@@ -9831,8 +9817,8 @@ function PanelShell({
9831
9817
  onClose,
9832
9818
  children
9833
9819
  }) {
9834
- const ref = (0, import_react7.useRef)(null);
9835
- (0, import_react7.useLayoutEffect)(() => {
9820
+ const ref = (0, import_react9.useRef)(null);
9821
+ (0, import_react9.useLayoutEffect)(() => {
9836
9822
  const panel = ref.current;
9837
9823
  const root = panel?.closest(".mx-meet");
9838
9824
  const header = root?.querySelector(":scope > .mx-meet__header") ?? null;
@@ -9859,17 +9845,17 @@ function ChatPanel({
9859
9845
  }) {
9860
9846
  const snapshot = useMeetSnapshot();
9861
9847
  const room = useRoom();
9862
- const [draft, setDraft] = (0, import_react7.useState)("");
9863
- const [recipient, setRecipient] = (0, import_react7.useState)(to);
9864
- const listRef = (0, import_react7.useRef)(null);
9848
+ const [draft, setDraft] = (0, import_react9.useState)("");
9849
+ const [recipient, setRecipient] = (0, import_react9.useState)(to);
9850
+ const listRef = (0, import_react9.useRef)(null);
9865
9851
  const messages = snapshot?.chat ?? [];
9866
9852
  const local = snapshot?.localIdentity ?? null;
9867
9853
  const people = (snapshot?.participants ?? []).filter(
9868
9854
  (participant) => !participant.isLocal && !participant.isAgent
9869
9855
  );
9870
9856
  const recipientName = recipient === null ? null : people.find((p) => p.identity === recipient)?.displayName ?? null;
9871
- (0, import_react7.useEffect)(() => setRecipient(to), [to]);
9872
- (0, import_react7.useEffect)(() => {
9857
+ (0, import_react9.useEffect)(() => setRecipient(to), [to]);
9858
+ (0, import_react9.useEffect)(() => {
9873
9859
  const list = listRef.current;
9874
9860
  if (list !== null) list.scrollTop = list.scrollHeight;
9875
9861
  }, [messages.length]);
@@ -9975,8 +9961,8 @@ function PeoplePanel({
9975
9961
  const snapshot = useMeetSnapshot();
9976
9962
  const controls = useHostControls();
9977
9963
  const queue = useHandQueue();
9978
- const [query, setQuery] = (0, import_react7.useState)("");
9979
- const [menuFor, setMenuFor] = (0, import_react7.useState)(null);
9964
+ const [query, setQuery] = (0, import_react9.useState)("");
9965
+ const [menuFor, setMenuFor] = (0, import_react9.useState)(null);
9980
9966
  const myRole = useRole();
9981
9967
  const local = snapshot?.localIdentity ?? null;
9982
9968
  const everyone = snapshot?.participants ?? [];
@@ -10101,14 +10087,14 @@ function PersonMenu({
10101
10087
  const host = useMeetHost();
10102
10088
  const snapshot = useMeetSnapshot();
10103
10089
  const controls = useHostControls();
10104
- const [mode, setMode] = (0, import_react7.useState)("menu");
10105
- const [text3, setText] = (0, import_react7.useState)("");
10090
+ const [mode, setMode] = (0, import_react9.useState)("menu");
10091
+ const [text3, setText] = (0, import_react9.useState)("");
10106
10092
  const self = participant.identity === snapshot?.localIdentity;
10107
10093
  const moderate = controls.canModerate(participant);
10108
10094
  const pinned = snapshot?.pinned === participant.identity;
10109
10095
  const spotlit = snapshot?.spotlight === participant.identity;
10110
10096
  const hasAccount = participant.userId !== null;
10111
- const [refused, setRefused] = (0, import_react7.useState)(false);
10097
+ const [refused, setRefused] = (0, import_react9.useState)(false);
10112
10098
  const act = (request) => {
10113
10099
  setRefused(false);
10114
10100
  void controls.run(request).then((result) => {
@@ -10324,8 +10310,8 @@ function DeviceSettings({
10324
10310
  const speaker = devices?.selected.audiooutput ?? host.devices.resolve("audiooutput");
10325
10311
  const stream = useMicrophoneStream(microphone);
10326
10312
  const level = useAudioLevel(stream);
10327
- const [testing, setTesting] = (0, import_react7.useState)(false);
10328
- (0, import_react7.useEffect)(() => {
10313
+ const [testing, setTesting] = (0, import_react9.useState)(false);
10314
+ (0, import_react9.useEffect)(() => {
10329
10315
  void host.devices.refresh();
10330
10316
  }, [host]);
10331
10317
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__section", "aria-label": "Devices", children: [
@@ -10354,8 +10340,8 @@ function DeviceSettings({
10354
10340
  }
10355
10341
  function EffectsSettings({ preview }) {
10356
10342
  const effects = useMediaEffects();
10357
- const [error, setError] = (0, import_react7.useState)(null);
10358
- const fileRef = (0, import_react7.useRef)(null);
10343
+ const [error, setError] = (0, import_react9.useState)(null);
10344
+ const fileRef = (0, import_react9.useRef)(null);
10359
10345
  const supported = effects.backgroundsSupported || preview != null || videoEffectsSupported();
10360
10346
  const apply = (next) => {
10361
10347
  setError(null);
@@ -10477,8 +10463,8 @@ async function playTestSound(sinkId) {
10477
10463
  await context.close();
10478
10464
  }
10479
10465
  function useMicrophoneStream(deviceId2) {
10480
- const [stream, setStream] = (0, import_react7.useState)(null);
10481
- (0, import_react7.useEffect)(() => {
10466
+ const [stream, setStream] = (0, import_react9.useState)(null);
10467
+ (0, import_react9.useEffect)(() => {
10482
10468
  if (deviceId2 === "off") return void 0;
10483
10469
  let live = true;
10484
10470
  let opened = null;
@@ -10588,7 +10574,7 @@ function NoteList({
10588
10574
  }
10589
10575
  function AiPanel({ onClose }) {
10590
10576
  const ai = useMeetAi();
10591
- const [question, setQuestion] = (0, import_react7.useState)("");
10577
+ const [question, setQuestion] = (0, import_react9.useState)("");
10592
10578
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(PanelShell, { title: "Meeting assistant", onClose, children: [
10593
10579
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(NoteTakerRow, {}),
10594
10580
  ai.summary !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__note-group", "aria-label": "Summary", children: [
@@ -10753,16 +10739,16 @@ function PreJoinBody({
10753
10739
  const recording = useRecording();
10754
10740
  const effects = useMediaEffects();
10755
10741
  const { notice } = useModerationNotice();
10756
- const [mode, setMode] = (0, import_react7.useState)("video");
10757
- const [microphone, setMicrophone] = (0, import_react7.useState)(true);
10758
- const [joining, setJoining] = (0, import_react7.useState)(false);
10742
+ const [mode, setMode] = (0, import_react9.useState)("video");
10743
+ const [microphone, setMicrophone] = (0, import_react9.useState)(true);
10744
+ const [joining, setJoining] = (0, import_react9.useState)(false);
10759
10745
  const camera = devices?.selected.videoinput ?? host.devices.resolve("videoinput");
10760
10746
  const mic = devices?.selected.audioinput ?? host.devices.resolve("audioinput");
10761
10747
  const preview = useCameraPreview(mode === "video" ? camera : void 0, effects.effects);
10762
10748
  const micStream = useMicrophoneStream(microphone ? mic : "off");
10763
10749
  const level = useAudioLevel(micStream);
10764
- const [speakerTesting, setSpeakerTesting] = (0, import_react7.useState)(false);
10765
- (0, import_react7.useEffect)(() => {
10750
+ const [speakerTesting, setSpeakerTesting] = (0, import_react9.useState)(false);
10751
+ (0, import_react9.useEffect)(() => {
10766
10752
  void host.devices.refresh();
10767
10753
  }, [host]);
10768
10754
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__prejoin", children: [
@@ -10878,12 +10864,12 @@ function PreJoinBody({
10878
10864
  ] });
10879
10865
  }
10880
10866
  function useCameraPreview(deviceId2, effects) {
10881
- const [preview, setPreview] = (0, import_react7.useState)(null);
10882
- const [error, setError] = (0, import_react7.useState)(null);
10883
- const current = (0, import_react7.useRef)(null);
10884
- const initialEffect = (0, import_react7.useRef)(toVideoEffect(effects));
10867
+ const [preview, setPreview] = (0, import_react9.useState)(null);
10868
+ const [error, setError] = (0, import_react9.useState)(null);
10869
+ const current = (0, import_react9.useRef)(null);
10870
+ const initialEffect = (0, import_react9.useRef)(toVideoEffect(effects));
10885
10871
  initialEffect.current = toVideoEffect(effects);
10886
- (0, import_react7.useEffect)(() => {
10872
+ (0, import_react9.useEffect)(() => {
10887
10873
  if (deviceId2 === void 0) return void 0;
10888
10874
  let live = true;
10889
10875
  setError(null);
@@ -10949,43 +10935,17 @@ function DevicePicker({
10949
10935
  )
10950
10936
  ] });
10951
10937
  }
10952
- function MeetingRoom(props) {
10953
- const host = useMeetHost();
10954
- if (host === null) {
10955
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MeetRoot, { meeting: props.meeting, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mx-meet", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InertNotice, { what: "This meeting" }) }) });
10956
- }
10957
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MeetRoot, { meeting: props.meeting, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MeetingRoomBody, { ...props, host }) });
10958
- }
10959
- function MeetingRoomBody({
10938
+ function MeetSkinRoom({
10960
10939
  roomName,
10961
10940
  meetingId,
10962
10941
  slug,
10963
- meeting: given,
10964
10942
  onLeave,
10965
- headerControls,
10966
- host
10943
+ headerControls
10967
10944
  }) {
10968
- const snapshot = useMeetSnapshot();
10969
- const isHost = useIsHost();
10945
+ const { host, snapshot, isHost } = useMeetCore();
10970
10946
  const elapsed = useElapsed(snapshot?.meeting?.startedAt ?? null);
10971
10947
  const phase = snapshot?.phase ?? "idle";
10972
- (0, import_react7.useEffect)(() => {
10973
- host.meetings.watch(roomName);
10974
- }, [host, roomName]);
10975
- (0, import_react7.useEffect)(() => {
10976
- if (given === void 0) return;
10977
- if (host.store.snapshot().meeting !== null) return;
10978
- host.store.patch({ meeting: given, locked: given.locked });
10979
- }, [host, given]);
10980
- const watchedId = meetingId ?? snapshot?.meeting?.id ?? null;
10981
- (0, import_react7.useEffect)(() => {
10982
- if (watchedId === null) return;
10983
- host.meetings.watchMeeting(asMeetingId(watchedId));
10984
- }, [host, watchedId]);
10985
- const record = snapshot?.meeting ?? given ?? null;
10986
- if (hasEnded(record) && phase !== "connected" && phase !== "reconnecting") {
10987
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MeetingRecordView, { meeting: record });
10988
- }
10948
+ if (host === null) return null;
10989
10949
  if (phase === "idle" || phase === "failed" || phase === "left") {
10990
10950
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mx-meet", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10991
10951
  PreJoin,
@@ -11006,7 +10966,7 @@ function MeetingRoomBody({
11006
10966
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "mx-meet__title", children: snapshot?.meeting?.title ?? "Meeting" }),
11007
10967
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "mx-meet__meta", children: [
11008
10968
  participantSummary(snapshot?.participants ?? []),
11009
- elapsed > 0 ? ` \xB7 ${(0, import_format4.formatDurationMs)(elapsed)}` : ""
10969
+ elapsed > 0 ? ` \xB7 ${(0, import_format3.formatDurationMs)(elapsed)}` : ""
11010
10970
  ] }),
11011
10971
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RecordingIndicator, {}),
11012
10972
  snapshot?.locked === true ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "mx-meet__badge", children: [
@@ -11023,8 +10983,8 @@ function MeetingRoomBody({
11023
10983
  ] });
11024
10984
  }
11025
10985
  function WaitingRoom({ roomName, host }) {
11026
- const knocked = (0, import_react7.useRef)(false);
11027
- (0, import_react7.useEffect)(() => {
10986
+ const knocked = (0, import_react9.useRef)(false);
10987
+ (0, import_react9.useEffect)(() => {
11028
10988
  if (knocked.current) return;
11029
10989
  knocked.current = true;
11030
10990
  host.meetings.knock(roomName);
@@ -11043,7 +11003,7 @@ function HostMenu() {
11043
11003
  const host = useRequiredMeetHost();
11044
11004
  const snapshot = useMeetSnapshot();
11045
11005
  const end = useEndMeeting();
11046
- const [confirmingEnd, setConfirmingEnd] = (0, import_react7.useState)(false);
11006
+ const [confirmingEnd, setConfirmingEnd] = (0, import_react9.useState)(false);
11047
11007
  const locked = snapshot?.locked === true;
11048
11008
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__host-menu", children: [
11049
11009
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
@@ -11092,150 +11052,17 @@ function HostMenu() {
11092
11052
  end.notice !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__notice", role: "status", children: end.notice }) : null
11093
11053
  ] });
11094
11054
  }
11095
- function CallButton({
11096
- person,
11097
- mode = "video",
11098
- children
11099
- }) {
11100
- const calls = useCalls();
11101
- if (!calls.canCall) return null;
11102
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11103
- "button",
11104
- {
11105
- type: "button",
11106
- className: "mx-meet__call-button",
11107
- onClick: () => {
11108
- void calls.call([person.userId], mode);
11109
- },
11110
- "aria-label": `Call ${person.displayName}`,
11111
- children: children ?? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PhoneIcon, { width: 18, height: 18 })
11112
- }
11113
- );
11114
- }
11115
- function IncomingCallHost() {
11116
- const calls = useCalls();
11117
- if (calls.incoming.length === 0) return null;
11118
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mx-meet__ringing-stack", children: calls.incoming.map((invite) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IncomingCallCard, { invite }, invite.id)) });
11119
- }
11120
- function IncomingCallCard({ invite }) {
11121
- const calls = useCalls();
11122
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__ringing", role: "alertdialog", "aria-label": "Incoming call", children: [
11123
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Avatar, { name: invite.callerName, url: invite.callerAvatarUrl, size: 56 }),
11124
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__ringing-text", children: [
11125
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: invite.callerName }),
11126
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: invite.mode === "video" ? "Incoming video call" : "Incoming call" })
11127
- ] }),
11128
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__ringing-actions", children: [
11129
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ControlButton, { label: "Decline", danger: true, onClick: () => void calls.decline(invite), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PhoneOffIcon, {}) }),
11130
- invite.mode === "video" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11131
- ControlButton,
11132
- {
11133
- label: "Accept without video",
11134
- onClick: () => void calls.accept({ ...invite, mode: "audio" }),
11135
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CameraOffIcon, {})
11136
- }
11137
- ) : null,
11138
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ControlButton, { label: "Accept", onClick: () => void calls.accept(invite), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PhoneIcon, {}) })
11139
- ] })
11140
- ] });
11141
- }
11142
- function ScheduleMeeting(props) {
11143
- const host = useMeetHost();
11144
- if (host === null) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InertNotice, { what: "Scheduling a meeting" });
11145
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ScheduleMeetingBody, { ...props, host });
11146
- }
11147
- function ScheduleMeetingBody({
11148
- appBaseUrl,
11149
- onScheduled,
11150
- host
11151
- }) {
11152
- const [title, setTitle] = (0, import_react7.useState)("");
11153
- const [when2, setWhen] = (0, import_react7.useState)("");
11154
- const [kind, setKind] = (0, import_react7.useState)("scheduled");
11155
- const [busy, setBusy] = (0, import_react7.useState)(false);
11156
- const [link, setLink] = (0, import_react7.useState)(null);
11157
- const [error, setError] = (0, import_react7.useState)(null);
11158
- const disabled = (0, import_react7.useMemo)(() => title.trim().length === 0 || busy, [title, busy]);
11159
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11160
- "form",
11161
- {
11162
- className: "mx-meet__schedule",
11163
- onSubmit: (event) => {
11164
- event.preventDefault();
11165
- if (host.identity.userId === null) return;
11166
- setBusy(true);
11167
- setError(null);
11168
- void host.repository.getOrCreateMeeting({
11169
- organizationId: host.identity.organizationId,
11170
- hostUserId: host.identity.userId,
11171
- title: title.trim(),
11172
- kind,
11173
- scheduledFor: when2.length > 0 ? new Date(when2).toISOString() : null
11174
- }).then((meeting) => {
11175
- setLink(meetingLink(appBaseUrl, meeting.slug));
11176
- onScheduled?.(meeting.slug);
11177
- }).catch((thrown) => {
11178
- setError(
11179
- thrown.remedy ?? thrown.message ?? "The meeting could not be created."
11180
- );
11181
- }).finally(() => setBusy(false));
11182
- },
11183
- children: [
11184
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "mx-meet__field", children: [
11185
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__field-label", children: "Title" }),
11186
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11187
- "input",
11188
- {
11189
- className: "mx-meet__input",
11190
- value: title,
11191
- onChange: (event) => setTitle(event.target.value),
11192
- placeholder: "Weekly sync"
11193
- }
11194
- )
11195
- ] }),
11196
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "mx-meet__field", children: [
11197
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__field-label", children: "When" }),
11198
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11199
- "input",
11200
- {
11201
- className: "mx-meet__input",
11202
- type: "datetime-local",
11203
- value: when2,
11204
- onChange: (event) => setWhen(event.target.value)
11205
- }
11206
- )
11207
- ] }),
11208
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "mx-meet__field", children: [
11209
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__field-label", children: "Repeats" }),
11210
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11211
- "select",
11212
- {
11213
- className: "mx-meet__select",
11214
- value: kind,
11215
- onChange: (event) => setKind(event.target.value),
11216
- children: [
11217
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "scheduled", children: "Once" }),
11218
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "recurring", children: "Recurring \u2014 one link, every time" })
11219
- ]
11220
- }
11221
- )
11222
- ] }),
11223
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "submit", className: "mx-meet__primary", disabled, children: busy ? "Creating\u2026" : "Create meeting" }),
11224
- link !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "mx-meet__link-out", children: [
11225
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "Anyone with this link can join \u2014 no account needed." }),
11226
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("code", { children: link })
11227
- ] }) : null,
11228
- error !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__error", children: error }) : null
11229
- ]
11230
- }
11231
- );
11232
- }
11233
11055
  function ReactionOverlay({
11234
11056
  reactions
11235
11057
  }) {
11236
11058
  if (reactions.length === 0) return null;
11237
11059
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mx-meet__reactions", "aria-hidden": "true", children: reactions.map((reaction) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__reaction", children: reaction.emoji }, reaction.id)) });
11238
11060
  }
11061
+ function clockOf(iso) {
11062
+ const at = new Date(iso);
11063
+ if (Number.isNaN(at.getTime())) return "";
11064
+ return at.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit" });
11065
+ }
11239
11066
  function GuestRecordAccessControl({
11240
11067
  meeting
11241
11068
  }) {
@@ -11276,15 +11103,20 @@ function GuestRecordAccessControl({
11276
11103
  ] }) : null
11277
11104
  ] });
11278
11105
  }
11106
+
11107
+ // src/react/record.tsx
11108
+ var import_react10 = require("react");
11109
+ var import_design_system2 = require("@ai-matrx/design-system");
11110
+ var import_jsx_runtime6 = require("react/jsx-runtime");
11279
11111
  function MeetingRecordView({
11280
11112
  meeting,
11281
11113
  onRejoin
11282
11114
  }) {
11283
11115
  const host = useMeetHost();
11284
11116
  if (host === null) {
11285
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mx-meet mx-meet--record", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InertNotice, { what: "This meeting record" }) });
11117
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mx-meet mx-meet--record", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InertNotice, { what: "This meeting record" }) });
11286
11118
  }
11287
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MeetingRecordBody, { meeting, ...onRejoin !== void 0 ? { onRejoin } : {} });
11119
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MeetingRecordBody, { meeting, ...onRejoin !== void 0 ? { onRejoin } : {} });
11288
11120
  }
11289
11121
  function MeetingRecordBody({
11290
11122
  meeting,
@@ -11292,19 +11124,19 @@ function MeetingRecordBody({
11292
11124
  }) {
11293
11125
  const host = useRequiredMeetHost();
11294
11126
  const record = useMeetingRecord(meeting);
11295
- const [question, setQuestion] = (0, import_react7.useState)("");
11296
- const [tab, setTab] = (0, import_react7.useState)("summary");
11127
+ const [question, setQuestion] = (0, import_react10.useState)("");
11128
+ const [tab, setTab] = (0, import_react10.useState)("summary");
11297
11129
  if (record.failure !== null) {
11298
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mx-meet mx-meet--record", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__empty", error: record.failure, operation: "Open this meeting record", origin: "meet/components", children: [
11299
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-title", children: "This meeting record could not be opened" }),
11300
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-body", children: record.failure.message }),
11301
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-body", children: record.failure.remedy })
11130
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mx-meet mx-meet--record", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_design_system2.ErrorBox, { as: "div", className: "mx-meet__empty", error: record.failure, operation: "Open this meeting record", origin: "meet/components", children: [
11131
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__empty-title", children: "This meeting record could not be opened" }),
11132
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__empty-body", children: record.failure.message }),
11133
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__empty-body", children: record.failure.remedy })
11302
11134
  ] }) });
11303
11135
  }
11304
11136
  if (record.loading || record.record === null) {
11305
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mx-meet mx-meet--record", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__empty", role: "status", children: [
11306
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-title", children: "Opening the meeting record\u2026" }),
11307
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-body", children: "Reading the summary, the notes and the transcript this meeting left behind." })
11137
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mx-meet mx-meet--record", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet__empty", role: "status", children: [
11138
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__empty-title", children: "Opening the meeting record\u2026" }),
11139
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__empty-body", children: "Reading the summary, the notes and the transcript this meeting left behind." })
11308
11140
  ] }) });
11309
11141
  }
11310
11142
  const bundle = record.record;
@@ -11323,44 +11155,44 @@ function MeetingRecordBody({
11323
11155
  );
11324
11156
  const entirelyRestricted = everyRecordPartRefused && bundle.attendees.length === 0 && bundle.liveNotes.length === 0 && bundle.transcript.length === 0 && bundle.recording === null && bundle.summary === null && bundle.decisions.length === 0 && bundle.actionItems.length === 0;
11325
11157
  if (entirelyRestricted) {
11326
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet mx-meet--record", children: [
11327
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("header", { className: "mx-meet__record-head", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__record-head-inner", children: [
11328
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-eyebrow", children: "Meeting record" }),
11329
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "mx-meet__record-title", children: meeting.title }),
11330
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-when", children: meetingWhen(meeting) }),
11331
- onRejoin !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "mx-meet__link", onClick: onRejoin, children: "Open this link again" }) : null
11158
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet mx-meet--record", children: [
11159
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("header", { className: "mx-meet__record-head", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet__record-head-inner", children: [
11160
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-eyebrow", children: "Meeting record" }),
11161
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h1", { className: "mx-meet__record-title", children: meeting.title }),
11162
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-when", children: meetingWhen(meeting) }),
11163
+ onRejoin !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: "mx-meet__link", onClick: onRejoin, children: "Open this link again" }) : null
11332
11164
  ] }) }),
11333
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mx-meet__record-body", children: restrictionNotices.map((notice2) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__record-access", role: "status", children: [
11334
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-access-title", children: "About this record" }),
11335
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-access-message", children: notice2.message }),
11336
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-access-remedy", children: notice2.remedy })
11165
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mx-meet__record-body", children: restrictionNotices.map((notice2) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet__record-access", role: "status", children: [
11166
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-access-title", children: "About this record" }),
11167
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-access-message", children: notice2.message }),
11168
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-access-remedy", children: notice2.remedy })
11337
11169
  ] }, notice2.parts.join("-"))) })
11338
11170
  ] });
11339
11171
  }
11340
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet mx-meet--record", children: [
11341
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("header", { className: "mx-meet__record-head", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__record-head-inner", children: [
11342
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-eyebrow", children: "Meeting record" }),
11343
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "mx-meet__record-title", children: meeting.title }),
11344
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-when", children: meetingWhen(meeting) }),
11345
- onRejoin !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "mx-meet__link", onClick: onRejoin, children: "Open this link again" }) : null
11172
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet mx-meet--record", children: [
11173
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("header", { className: "mx-meet__record-head", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet__record-head-inner", children: [
11174
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-eyebrow", children: "Meeting record" }),
11175
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h1", { className: "mx-meet__record-title", children: meeting.title }),
11176
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-when", children: meetingWhen(meeting) }),
11177
+ onRejoin !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: "mx-meet__link", onClick: onRejoin, children: "Open this link again" }) : null
11346
11178
  ] }) }),
11347
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__record-body", children: [
11348
- restrictionNotices.map((notice2) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__record-access", role: "status", children: [
11349
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-access-title", children: "About this record" }),
11350
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-access-message", children: notice2.message }),
11351
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-access-remedy", children: notice2.remedy })
11179
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet__record-body", children: [
11180
+ restrictionNotices.map((notice2) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet__record-access", role: "status", children: [
11181
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-access-title", children: "About this record" }),
11182
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-access-message", children: notice2.message }),
11183
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-access-remedy", children: notice2.remedy })
11352
11184
  ] }, notice2.parts.join("-"))),
11353
11185
  attended.length === 0 ? (
11354
11186
  /* NOT SILENCE. A refused attendance read used to remove the whole
11355
11187
  section, so the reader could not tell "nobody" from "not shown". */
11356
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Who attended", children: [
11357
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "mx-meet__record-section-title", children: "Who attended" }),
11358
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__panel-note", children: absenceSentence(bundle, "attendance", "Nobody is recorded as having attended.") })
11188
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Who attended", children: [
11189
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "mx-meet__record-section-title", children: "Who attended" }),
11190
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__panel-note", children: absenceSentence(bundle, "attendance", "Nobody is recorded as having attended.") })
11359
11191
  ] })
11360
- ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Who attended", children: [
11361
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "mx-meet__record-section-title", children: "Who attended" }),
11362
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("ul", { className: "mx-meet__record-attendees", children: attended.map((person) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("li", { className: "mx-meet__record-attendee", children: [
11363
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11192
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Who attended", children: [
11193
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "mx-meet__record-section-title", children: "Who attended" }),
11194
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { className: "mx-meet__record-attendees", children: attended.map((person) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { className: "mx-meet__record-attendee", children: [
11195
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11364
11196
  Avatar,
11365
11197
  {
11366
11198
  name: displayNameFor(bundle.names, person.identity, person.displayName),
@@ -11368,26 +11200,26 @@ function MeetingRecordBody({
11368
11200
  size: 28
11369
11201
  }
11370
11202
  ),
11371
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "mx-meet__person-name", children: [
11203
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "mx-meet__person-name", children: [
11372
11204
  displayNameFor(bundle.names, person.identity, person.displayName),
11373
- person.role === "host" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__badge", children: "Host" }) : null,
11374
- person.role === "guest" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__badge", children: "Guest" }) : null,
11375
- person.isAgent ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__badge", children: "Meeting assistant" }) : null
11205
+ person.role === "host" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "mx-meet__badge", children: "Host" }) : null,
11206
+ person.role === "guest" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "mx-meet__badge", children: "Guest" }) : null,
11207
+ person.isAgent ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "mx-meet__badge", children: "Meeting assistant" }) : null
11376
11208
  ] })
11377
11209
  ] }, person.id)) })
11378
11210
  ] }),
11379
- bundle.recording !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__record-section mx-meet__recording-card", "aria-label": "Recording", children: [
11380
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "mx-meet__record-section-title", children: "Recording" }),
11381
- fileId !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
11382
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RecordingPlayer, { fileId }),
11383
- notice !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__panel-note", children: notice }) : null
11384
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__panel-note", children: notice ?? "This recording has no file." })
11385
- ] }) : wasRefused(bundle, "recording") ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Recording", children: [
11386
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "mx-meet__record-section-title", children: "Recording" }),
11387
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__panel-note", children: REFUSED_ABSENCE })
11211
+ bundle.recording !== null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "mx-meet__record-section mx-meet__recording-card", "aria-label": "Recording", children: [
11212
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "mx-meet__record-section-title", children: "Recording" }),
11213
+ fileId !== null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11214
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RecordingPlayer, { fileId }),
11215
+ notice !== null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__panel-note", children: notice }) : null
11216
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__panel-note", children: notice ?? "This recording has no file." })
11217
+ ] }) : wasRefused(bundle, "recording") ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Recording", children: [
11218
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "mx-meet__record-section-title", children: "Recording" }),
11219
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__panel-note", children: REFUSED_ABSENCE })
11388
11220
  ] }) : null,
11389
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("nav", { className: "mx-meet__record-tabs", "aria-label": "Meeting record sections", children: [
11390
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11221
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("nav", { className: "mx-meet__record-tabs", "aria-label": "Meeting record sections", children: [
11222
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11391
11223
  "button",
11392
11224
  {
11393
11225
  type: "button",
@@ -11397,7 +11229,7 @@ function MeetingRecordBody({
11397
11229
  children: "Summary & decisions"
11398
11230
  }
11399
11231
  ),
11400
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11232
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11401
11233
  "button",
11402
11234
  {
11403
11235
  type: "button",
@@ -11407,7 +11239,7 @@ function MeetingRecordBody({
11407
11239
  children: "Notes as it happened"
11408
11240
  }
11409
11241
  ),
11410
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11242
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11411
11243
  "button",
11412
11244
  {
11413
11245
  type: "button",
@@ -11418,15 +11250,15 @@ function MeetingRecordBody({
11418
11250
  }
11419
11251
  )
11420
11252
  ] }),
11421
- tab === "summary" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
11422
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Summary", children: [
11423
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "mx-meet__record-section-title", children: "Summary" }),
11424
- wrapUp.state === "written" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-summary", children: bundle.summary?.text }) : wrapUp.state === "in-progress" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__panel-note", role: "status", children: [
11425
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: wrapUp.message }),
11426
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "mx-meet__link", onClick: record.reload, children: "Check again" })
11427
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__panel-note", role: wrapUp.state === "failed" ? "alert" : void 0, children: wrapUp.message })
11253
+ tab === "summary" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11254
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Summary", children: [
11255
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "mx-meet__record-section-title", children: "Summary" }),
11256
+ wrapUp.state === "written" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-summary", children: bundle.summary?.text }) : wrapUp.state === "in-progress" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet__panel-note", role: "status", children: [
11257
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { children: wrapUp.message }),
11258
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: "mx-meet__link", onClick: record.reload, children: "Check again" })
11259
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__panel-note", role: wrapUp.state === "failed" ? "alert" : void 0, children: wrapUp.message })
11428
11260
  ] }),
11429
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11261
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11430
11262
  NoteList,
11431
11263
  {
11432
11264
  title: "Decisions",
@@ -11438,7 +11270,7 @@ function MeetingRecordBody({
11438
11270
  )
11439
11271
  }
11440
11272
  ),
11441
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11273
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11442
11274
  NoteList,
11443
11275
  {
11444
11276
  title: "Action items",
@@ -11451,42 +11283,42 @@ function MeetingRecordBody({
11451
11283
  }
11452
11284
  )
11453
11285
  ] }) : null,
11454
- tab === "notes" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Notes as it happened", children: [
11455
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "mx-meet__record-section-title", children: "Notes as it happened" }),
11456
- bundle.liveNotes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__panel-note", children: absenceSentence(
11286
+ tab === "notes" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Notes as it happened", children: [
11287
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "mx-meet__record-section-title", children: "Notes as it happened" }),
11288
+ bundle.liveNotes.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__panel-note", children: absenceSentence(
11457
11289
  bundle,
11458
11290
  "notes",
11459
11291
  "No live notes are available for this meeting."
11460
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("ul", { className: "mx-meet__notes", children: bundle.liveNotes.map((note) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("li", { className: "mx-meet__note", children: [
11461
- note.window !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "mx-meet__badge", children: [
11292
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { className: "mx-meet__notes", children: bundle.liveNotes.map((note) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { className: "mx-meet__note", children: [
11293
+ note.window !== null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "mx-meet__badge", children: [
11462
11294
  "Window ",
11463
11295
  note.window
11464
11296
  ] }) : null,
11465
11297
  note.text
11466
11298
  ] }, note.id)) })
11467
11299
  ] }) : null,
11468
- tab === "transcript" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Transcript", children: [
11469
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("h2", { className: "mx-meet__record-section-title", children: [
11300
+ tab === "transcript" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Transcript", children: [
11301
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("h2", { className: "mx-meet__record-section-title", children: [
11470
11302
  "Transcript",
11471
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__record-count", children: bundle.transcript.length === 1 ? "1 line" : `${bundle.transcript.length} lines` })
11303
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "mx-meet__record-count", children: bundle.transcript.length === 1 ? "1 line" : `${bundle.transcript.length} lines` })
11472
11304
  ] }),
11473
- blocks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__panel-note", children: absenceSentence(
11305
+ blocks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__panel-note", children: absenceSentence(
11474
11306
  bundle,
11475
11307
  "transcript",
11476
11308
  "No transcript is available for this meeting."
11477
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("ol", { className: "mx-meet__record-transcript", children: blocks.map((block) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("li", { className: "mx-meet__record-block", children: [
11478
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "mx-meet__record-speaker", children: [
11309
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ol", { className: "mx-meet__record-transcript", children: blocks.map((block) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { className: "mx-meet__record-block", children: [
11310
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "mx-meet__record-speaker", children: [
11479
11311
  block.speaker,
11480
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("time", { className: "mx-meet__record-time", dateTime: block.startedAt, children: clockOf(block.startedAt) })
11312
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("time", { className: "mx-meet__record-time", dateTime: block.startedAt, children: clockOf(block.startedAt) })
11481
11313
  ] }),
11482
- block.lines.map((line) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__record-line", children: line.text }, line.id))
11314
+ block.lines.map((line) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__record-line", children: line.text }, line.id))
11483
11315
  ] }, block.id)) })
11484
11316
  ] }) : null,
11485
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(GuestRecordAccessControl, { meeting }),
11486
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Ask about this meeting", children: [
11487
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "mx-meet__record-section-title", children: "Ask about this meeting" }),
11488
- guestFinishedMeeting ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__panel-note", children: "Sign in to ask the assistant about a meeting after it ends." }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
11489
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
11317
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(GuestRecordAccessControl, { meeting }),
11318
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "mx-meet__record-section", "aria-label": "Ask about this meeting", children: [
11319
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "mx-meet__record-section-title", children: "Ask about this meeting" }),
11320
+ guestFinishedMeeting ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__panel-note", children: "Sign in to ask the assistant about a meeting after it ends." }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
11321
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
11490
11322
  "form",
11491
11323
  {
11492
11324
  className: "mx-meet__composer",
@@ -11497,7 +11329,7 @@ function MeetingRecordBody({
11497
11329
  void record.ask(trimmed);
11498
11330
  },
11499
11331
  children: [
11500
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11332
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11501
11333
  "input",
11502
11334
  {
11503
11335
  className: "mx-meet__input",
@@ -11507,7 +11339,7 @@ function MeetingRecordBody({
11507
11339
  "aria-label": "Ask about this meeting"
11508
11340
  }
11509
11341
  ),
11510
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11342
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11511
11343
  "button",
11512
11344
  {
11513
11345
  type: "submit",
@@ -11519,8 +11351,8 @@ function MeetingRecordBody({
11519
11351
  ]
11520
11352
  }
11521
11353
  ),
11522
- record.answer !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__answer", children: record.answer }) : null,
11523
- record.coverage !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "mx-meet__coverage", children: [
11354
+ record.answer !== null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__answer", children: record.answer }) : null,
11355
+ record.coverage !== null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "mx-meet__coverage", children: [
11524
11356
  "Answered from ",
11525
11357
  record.coverage.segmentsUsed,
11526
11358
  " of ",
@@ -11531,9 +11363,9 @@ function MeetingRecordBody({
11531
11363
  record.coverage.truncated ? " (the oldest were left out)" : "",
11532
11364
  "."
11533
11365
  ] }) : null,
11534
- record.askError !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__refusal", error: record.askError, operation: "Ask about this meeting", origin: "meet/components", children: [
11535
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__refusal-reason", children: record.askError.message }),
11536
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__refusal-remedy", children: record.askError.remedy })
11366
+ record.askError !== null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_design_system2.ErrorBox, { as: "div", className: "mx-meet__refusal", error: record.askError, operation: "Ask about this meeting", origin: "meet/components", children: [
11367
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__refusal-reason", children: record.askError.message }),
11368
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__refusal-remedy", children: record.askError.remedy })
11537
11369
  ] }) : null
11538
11370
  ] })
11539
11371
  ] })
@@ -11544,21 +11376,21 @@ var STREAM_REFUSED = "Streaming playback did not start, so this recording was do
11544
11376
  var PLAYBACK_RETRY_REMEDY = "Reload the page and try again. If it still will not play, ask a meeting host to check the recording.";
11545
11377
  function RecordingPlayer(props) {
11546
11378
  const host = useMeetHost();
11547
- if (host === null) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InertNotice, { what: "This recording" });
11548
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RecordingPlayerBody, { ...props, host });
11379
+ if (host === null) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InertNotice, { what: "This recording" });
11380
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RecordingPlayerBody, { ...props, host });
11549
11381
  }
11550
11382
  function RecordingPlayerBody({ fileId, host }) {
11551
- const [media, setMedia] = (0, import_react7.useState)(null);
11552
- const [loading, setLoading] = (0, import_react7.useState)(false);
11553
- const [error, setError] = (0, import_react7.useState)(null);
11554
- (0, import_react7.useEffect)(() => {
11383
+ const [media, setMedia] = (0, import_react10.useState)(null);
11384
+ const [loading, setLoading] = (0, import_react10.useState)(false);
11385
+ const [error, setError] = (0, import_react10.useState)(null);
11386
+ (0, import_react10.useEffect)(() => {
11555
11387
  if (media === null || media.kind !== "bytes") return void 0;
11556
11388
  const url = media.url;
11557
11389
  return () => URL.revokeObjectURL(url);
11558
11390
  }, [media]);
11559
11391
  if (media !== null) {
11560
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__record-section", children: [
11561
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11392
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet__record-section", children: [
11393
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11562
11394
  "video",
11563
11395
  {
11564
11396
  className: "mx-meet__record-player",
@@ -11600,15 +11432,15 @@ function RecordingPlayerBody({ fileId, host }) {
11600
11432
  }
11601
11433
  }
11602
11434
  ),
11603
- media.fallbackReason !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__panel-note", children: media.fallbackReason }) : null
11435
+ media.fallbackReason !== null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__panel-note", children: media.fallbackReason }) : null
11604
11436
  ] });
11605
11437
  }
11606
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__record-section", children: [
11607
- error !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__refusal", error, operation: "Complete this meeting action", origin: "meet/components", children: [
11608
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__refusal-reason", children: error.message }),
11609
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__refusal-remedy", children: error.remedy })
11438
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "mx-meet__record-section", children: [
11439
+ error !== null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_design_system2.ErrorBox, { as: "div", className: "mx-meet__refusal", error, operation: "Complete this meeting action", origin: "meet/components", children: [
11440
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__refusal-reason", children: error.message }),
11441
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mx-meet__refusal-remedy", children: error.remedy })
11610
11442
  ] }) : null,
11611
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
11443
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11612
11444
  "button",
11613
11445
  {
11614
11446
  type: "button",
@@ -11636,45 +11468,84 @@ function RecordingPlayerBody({ fileId, host }) {
11636
11468
  )
11637
11469
  ] });
11638
11470
  }
11639
- function clockOf(iso) {
11640
- const at = new Date(iso);
11641
- if (Number.isNaN(at.getTime())) return "";
11642
- return at.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit" });
11643
- }
11644
- function MeetingList({ baseUrl }) {
11471
+
11472
+ // src/react/skin-root.tsx
11473
+ var import_jsx_runtime7 = require("react/jsx-runtime");
11474
+ function MeetingSkinRoot(props) {
11645
11475
  const host = useMeetHost();
11646
- const list = useMeetings();
11647
- if (host === null) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InertNotice, { what: "Your meetings" });
11648
- if (list.failure !== null) {
11649
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_design_system.ErrorBox, { as: "div", className: "mx-meet__empty", error: list.failure, operation: "List your meetings", origin: "meet/components", children: [
11650
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-title", children: "Your meetings could not be listed" }),
11651
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-body", children: list.failure.message }),
11652
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-body", children: list.failure.remedy })
11653
- ] });
11654
- }
11655
- if (list.loading) {
11656
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mx-meet__empty", role: "status", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-title", children: "Loading your meetings\u2026" }) });
11476
+ if (host === null) {
11477
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MeetRoot, { meeting: props.meeting, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "mx-meet", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InertNotice, { what: "This meeting" }) }) });
11657
11478
  }
11658
- if (list.meetings.length === 0) {
11659
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet__empty", role: "status", children: [
11660
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-title", children: "No meetings yet" }),
11661
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "mx-meet__empty-body", children: "Create one above. Its link works before, during and after the meeting \u2014 afterwards it opens the record." })
11662
- ] });
11479
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MeetRoot, { meeting: props.meeting, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MeetingSkinRootBody, { ...props, host }) });
11480
+ }
11481
+ function MeetingSkinRootBody({
11482
+ roomName,
11483
+ meetingId,
11484
+ slug,
11485
+ meeting: given,
11486
+ onLeave,
11487
+ headerControls,
11488
+ host
11489
+ }) {
11490
+ const snapshot = useMeetSnapshot();
11491
+ const phase = snapshot?.phase ?? "idle";
11492
+ (0, import_react11.useEffect)(() => {
11493
+ host.meetings.watch(roomName);
11494
+ }, [host, roomName]);
11495
+ (0, import_react11.useEffect)(() => {
11496
+ if (given === void 0) return;
11497
+ if (host.store.snapshot().meeting !== null) return;
11498
+ host.store.patch({ meeting: given, locked: given.locked });
11499
+ }, [host, given]);
11500
+ const watchedId = meetingId ?? snapshot?.meeting?.id ?? null;
11501
+ (0, import_react11.useEffect)(() => {
11502
+ if (watchedId === null) return;
11503
+ host.meetings.watchMeeting(asMeetingId(watchedId));
11504
+ }, [host, watchedId]);
11505
+ const record = snapshot?.meeting ?? given ?? null;
11506
+ if (hasEnded(record) && phase !== "connected" && phase !== "reconnecting") {
11507
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MeetingRecordView, { meeting: record });
11663
11508
  }
11664
- const origin = baseUrl ?? (typeof window === "undefined" ? "" : window.location.origin);
11665
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("ul", { className: "mx-meet-list", children: list.meetings.map((meeting) => {
11666
- const ended = meeting.endedAt !== null;
11667
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("li", { className: "mx-meet-list__row", children: [
11668
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mx-meet-list__main", children: [
11669
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "mx-meet-list__title", children: [
11670
- meeting.title,
11671
- ended ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet__badge", children: "Ended" }) : null
11672
- ] }),
11673
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "mx-meet-list__when", children: meetingWhen(meeting) })
11674
- ] }),
11675
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("a", { className: "mx-meet-list__action", href: meetingLink(origin, meeting.slug), children: ended ? "Open the record" : "Join" })
11676
- ] }, meeting.id);
11677
- }) });
11509
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
11510
+ MeetSkinRoom,
11511
+ {
11512
+ roomName,
11513
+ ...meetingId !== void 0 ? { meetingId } : {},
11514
+ ...slug !== void 0 ? { slug } : {},
11515
+ ...onLeave !== void 0 ? { onLeave } : {},
11516
+ ...headerControls !== void 0 ? { headerControls } : {}
11517
+ }
11518
+ );
11519
+ }
11520
+
11521
+ // src/react/calls-ui.tsx
11522
+ var import_jsx_runtime8 = require("react/jsx-runtime");
11523
+ function IncomingCallHost() {
11524
+ const calls = useCalls();
11525
+ if (calls.incoming.length === 0) return null;
11526
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "mx-meet__ringing-stack", children: calls.incoming.map((invite) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IncomingCallCard, { invite }, invite.id)) });
11527
+ }
11528
+ function IncomingCallCard({ invite }) {
11529
+ const calls = useCalls();
11530
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("section", { className: "mx-meet__ringing", role: "alertdialog", "aria-label": "Incoming call", children: [
11531
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Avatar, { name: invite.callerName, url: invite.callerAvatarUrl, size: 56 }),
11532
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "mx-meet__ringing-text", children: [
11533
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("strong", { children: invite.callerName }),
11534
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: invite.mode === "video" ? "Incoming video call" : "Incoming call" })
11535
+ ] }),
11536
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "mx-meet__ringing-actions", children: [
11537
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ControlButton, { label: "Decline", danger: true, onClick: () => void calls.decline(invite), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PhoneOffIcon, {}) }),
11538
+ invite.mode === "video" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
11539
+ ControlButton,
11540
+ {
11541
+ label: "Accept without video",
11542
+ onClick: () => void calls.accept({ ...invite, mode: "audio" }),
11543
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CameraOffIcon, {})
11544
+ }
11545
+ ) : null,
11546
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ControlButton, { label: "Accept", onClick: () => void calls.accept(invite), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PhoneIcon, {}) })
11547
+ ] })
11548
+ ] });
11678
11549
  }
11679
11550
 
11680
11551
  // src/core/invitations.ts