@arbidocs/react 0.5.102 → 0.5.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/annotations/freeze/index.cjs +14 -14
  2. package/dist/annotations/freeze/index.js +3 -3
  3. package/dist/artifacts/index.cjs +45 -45
  4. package/dist/artifacts/index.js +8 -8
  5. package/dist/bundle-DCWPYNGD.cjs +14 -0
  6. package/dist/{bundle-IC65W2AO.cjs.map → bundle-DCWPYNGD.cjs.map} +1 -1
  7. package/dist/bundle-JCKKGEJE.js +5 -0
  8. package/dist/{bundle-YNOX7VIL.js.map → bundle-JCKKGEJE.js.map} +1 -1
  9. package/dist/calls/livekit/index.cjs +51 -51
  10. package/dist/calls/livekit/index.d.cts +1 -1
  11. package/dist/calls/livekit/index.d.ts +1 -1
  12. package/dist/calls/livekit/index.js +6 -6
  13. package/dist/{chunk-WJME7DI4.cjs → chunk-524AFWK7.cjs} +68 -68
  14. package/dist/{chunk-WJME7DI4.cjs.map → chunk-524AFWK7.cjs.map} +1 -1
  15. package/dist/{chunk-Q65QCWNI.cjs → chunk-6TUNWGRJ.cjs} +60 -60
  16. package/dist/{chunk-Q65QCWNI.cjs.map → chunk-6TUNWGRJ.cjs.map} +1 -1
  17. package/dist/{chunk-NDIKMOBJ.cjs → chunk-7C77IBQZ.cjs} +3 -3
  18. package/dist/{chunk-NDIKMOBJ.cjs.map → chunk-7C77IBQZ.cjs.map} +1 -1
  19. package/dist/{chunk-OYPKKHXY.js → chunk-7KZS22EK.js} +4 -4
  20. package/dist/{chunk-OYPKKHXY.js.map → chunk-7KZS22EK.js.map} +1 -1
  21. package/dist/{chunk-NIKPG4PW.js → chunk-A2XSLTIP.js} +3 -3
  22. package/dist/{chunk-NIKPG4PW.js.map → chunk-A2XSLTIP.js.map} +1 -1
  23. package/dist/{chunk-ALT6ETIE.js → chunk-A6HUB6PX.js} +6 -6
  24. package/dist/{chunk-ALT6ETIE.js.map → chunk-A6HUB6PX.js.map} +1 -1
  25. package/dist/{chunk-PC4O3JDV.cjs → chunk-B6I2HRRF.cjs} +3 -3
  26. package/dist/{chunk-PC4O3JDV.cjs.map → chunk-B6I2HRRF.cjs.map} +1 -1
  27. package/dist/{chunk-UW2SGTI5.js → chunk-GR7CZEJJ.js} +3 -3
  28. package/dist/{chunk-UW2SGTI5.js.map → chunk-GR7CZEJJ.js.map} +1 -1
  29. package/dist/{chunk-VIOW22Q4.cjs → chunk-IXE7HCCA.cjs} +44 -44
  30. package/dist/{chunk-VIOW22Q4.cjs.map → chunk-IXE7HCCA.cjs.map} +1 -1
  31. package/dist/{chunk-4SH5INC3.js → chunk-LD2SJBXC.js} +5 -5
  32. package/dist/{chunk-4SH5INC3.js.map → chunk-LD2SJBXC.js.map} +1 -1
  33. package/dist/{chunk-6SG2OGDR.js → chunk-M74JCOXW.js} +7 -2
  34. package/dist/chunk-M74JCOXW.js.map +1 -0
  35. package/dist/{chunk-YIZH5RVW.js → chunk-MAUZSNQY.js} +3 -3
  36. package/dist/{chunk-YIZH5RVW.js.map → chunk-MAUZSNQY.js.map} +1 -1
  37. package/dist/{chunk-HAGC67GL.cjs → chunk-Q2GNEVG2.cjs} +7 -2
  38. package/dist/chunk-Q2GNEVG2.cjs.map +1 -0
  39. package/dist/{chunk-ZEGCZATR.js → chunk-RC42YRVA.js} +4 -4
  40. package/dist/{chunk-ZEGCZATR.js.map → chunk-RC42YRVA.js.map} +1 -1
  41. package/dist/{chunk-Z3W4XFWB.cjs → chunk-TTHJNRLY.cjs} +5 -5
  42. package/dist/{chunk-Z3W4XFWB.cjs.map → chunk-TTHJNRLY.cjs.map} +1 -1
  43. package/dist/{chunk-5X3JANHT.js → chunk-V73GLDHD.js} +4 -4
  44. package/dist/{chunk-5X3JANHT.js.map → chunk-V73GLDHD.js.map} +1 -1
  45. package/dist/{chunk-ORBUPHMV.cjs → chunk-YD25DEMR.cjs} +41 -41
  46. package/dist/{chunk-ORBUPHMV.cjs.map → chunk-YD25DEMR.cjs.map} +1 -1
  47. package/dist/{chunk-5EELSW26.cjs → chunk-YNKV4MN6.cjs} +6 -6
  48. package/dist/{chunk-5EELSW26.cjs.map → chunk-YNKV4MN6.cjs.map} +1 -1
  49. package/dist/document-tools/core.cjs +100 -100
  50. package/dist/document-tools/core.d.cts +2 -2
  51. package/dist/document-tools/core.d.ts +2 -2
  52. package/dist/document-tools/core.js +5 -5
  53. package/dist/document-tools/index.cjs +103 -103
  54. package/dist/document-tools/index.d.cts +1 -1
  55. package/dist/document-tools/index.d.ts +1 -1
  56. package/dist/document-tools/index.js +7 -7
  57. package/dist/index.cjs +2355 -2211
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.d.cts +137 -27
  60. package/dist/index.d.ts +137 -27
  61. package/dist/index.js +175 -39
  62. package/dist/index.js.map +1 -1
  63. package/dist/{query-keys.d-O3lHn6rp.d.cts → query-keys.d-Bpb7R_lB.d.cts} +5 -0
  64. package/dist/{query-keys.d-O3lHn6rp.d.ts → query-keys.d-Bpb7R_lB.d.ts} +5 -0
  65. package/dist/shell/index.cjs +39 -39
  66. package/dist/shell/index.js +4 -4
  67. package/dist/{useAudioRecorder.d-DpDeeeAZ.d.cts → useAudioRecorder.d-B9rlMI_E.d.cts} +1 -1
  68. package/dist/{useAudioRecorder.d-DpDeeeAZ.d.ts → useAudioRecorder.d-B9rlMI_E.d.ts} +1 -1
  69. package/package.json +3 -3
  70. package/dist/bundle-IC65W2AO.cjs +0 -14
  71. package/dist/bundle-YNOX7VIL.js +0 -5
  72. package/dist/chunk-6SG2OGDR.js.map +0 -1
  73. package/dist/chunk-HAGC67GL.cjs.map +0 -1
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ65QCWNI_cjs = require('./chunk-Q65QCWNI.cjs');
4
- var chunkHAGC67GL_cjs = require('./chunk-HAGC67GL.cjs');
5
- var chunkRLSBRZ6Z_cjs = require('./chunk-RLSBRZ6Z.cjs');
6
3
  var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
4
+ var chunk6TUNWGRJ_cjs = require('./chunk-6TUNWGRJ.cjs');
5
+ var chunkQ2GNEVG2_cjs = require('./chunk-Q2GNEVG2.cjs');
6
+ var chunkRLSBRZ6Z_cjs = require('./chunk-RLSBRZ6Z.cjs');
7
7
  var reactQuery = require('@tanstack/react-query');
8
8
  var react = require('react');
9
9
  var browser = require('@arbidocs/sdk/browser');
10
10
  var client = require('@arbidocs/client');
11
11
 
12
12
  function useUserSettings(options) {
13
- const arbi = chunkHAGC67GL_cjs.useArbi();
13
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
14
14
  return reactQuery.useQuery({
15
- queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.userSettings(),
15
+ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.userSettings(),
16
16
  queryFn: () => arbi.settings.get(),
17
17
  // Edited about once a month, and every write here patches the cache: no refetch on each mount.
18
18
  staleTime: 30 * 60 * 1e3,
@@ -20,23 +20,23 @@ function useUserSettings(options) {
20
20
  });
21
21
  }
22
22
  function useUpdateUserSettings() {
23
- const arbi = chunkHAGC67GL_cjs.useArbi();
23
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
24
24
  const qc = reactQuery.useQueryClient();
25
25
  return reactQuery.useMutation({
26
26
  mutationFn: (patch) => arbi.settings.update(patch),
27
27
  onMutate: async (patch) => {
28
- await qc.cancelQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.userSettings() });
29
- const previous = qc.getQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.userSettings());
28
+ await qc.cancelQueries({ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.userSettings() });
29
+ const previous = qc.getQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.userSettings());
30
30
  qc.setQueryData(
31
- chunkHAGC67GL_cjs.arbiQueryKeys.userSettings(),
31
+ chunkQ2GNEVG2_cjs.arbiQueryKeys.userSettings(),
32
32
  (old) => old ? { ...old, ...patch } : old
33
33
  );
34
34
  return { previous };
35
35
  },
36
36
  onError: (_err, _patch, context) => {
37
- qc.setQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.userSettings(), context?.previous);
37
+ qc.setQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.userSettings(), context?.previous);
38
38
  },
39
- onSettled: () => qc.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.userSettings() })
39
+ onSettled: () => qc.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.userSettings() })
40
40
  });
41
41
  }
42
42
  var ALWAYS_ON = { on: true, set: () => {
@@ -59,7 +59,7 @@ function useLocalSwitch(source, feature) {
59
59
  return { on: saved ?? fallback, set };
60
60
  }
61
61
  function useFeatureSwitch(feature) {
62
- const source = chunkHAGC67GL_cjs.useArbiHost().features?.[feature];
62
+ const source = chunkQ2GNEVG2_cjs.useArbiHost().features?.[feature];
63
63
  const useSource = !source ? useUnlisted : "userSetting" in source ? useUserSettingSwitch : useLocalSwitch;
64
64
  return useSource(source, feature);
65
65
  }
@@ -70,7 +70,7 @@ function useNoSettings() {
70
70
  return { data: void 0 };
71
71
  }
72
72
  function useFeatureCheck() {
73
- const features = chunkHAGC67GL_cjs.useArbiHost().features;
73
+ const features = chunkQ2GNEVG2_cjs.useArbiHost().features;
74
74
  const useSettings = Object.values(features ?? {}).some(
75
75
  (source) => !!source && "userSetting" in source
76
76
  ) ? useUserSettings : useNoSettings;
@@ -182,7 +182,7 @@ var LISTS = {
182
182
  };
183
183
  function patchConversationList(queryClient, workspaceId, reducer) {
184
184
  if (!workspaceId) return;
185
- const key = chunkHAGC67GL_cjs.arbiQueryKeys.conversations(workspaceId);
185
+ const key = chunkQ2GNEVG2_cjs.arbiQueryKeys.conversations(workspaceId);
186
186
  const current = queryClient.getQueryData(key) ?? [];
187
187
  const next = reducer(current);
188
188
  if (next !== current) queryClient.setQueryData(key, next);
@@ -246,13 +246,13 @@ function byActivity(a, b) {
246
246
  return bt - at;
247
247
  }
248
248
  function cachedChats(queryClient) {
249
- return queryClient.getQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.chatList()) ?? [];
249
+ return queryClient.getQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.chatList()) ?? [];
250
250
  }
251
251
  function cachedChat(queryClient, chatExtId) {
252
252
  return cachedChats(queryClient).find((c) => c.external_id === chatExtId);
253
253
  }
254
254
  function upsertChat(queryClient, chat) {
255
- queryClient.setQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.chatList(), (old) => {
255
+ queryClient.setQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.chatList(), (old) => {
256
256
  if (!old) return old;
257
257
  const rest = old.filter((c) => c.external_id !== chat.external_id);
258
258
  return [chat, ...rest].sort(byActivity);
@@ -260,13 +260,13 @@ function upsertChat(queryClient, chat) {
260
260
  }
261
261
  function removeChat(queryClient, chatExtId) {
262
262
  queryClient.setQueryData(
263
- chunkHAGC67GL_cjs.arbiQueryKeys.chatList(),
263
+ chunkQ2GNEVG2_cjs.arbiQueryKeys.chatList(),
264
264
  (old) => old?.filter((c) => c.external_id !== chatExtId)
265
265
  );
266
- queryClient.removeQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.chatThread(chatExtId) });
266
+ queryClient.removeQueries({ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.chatThread(chatExtId) });
267
267
  }
268
268
  function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
269
- queryClient.setQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
269
+ queryClient.setQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
270
270
  if (!old) return old;
271
271
  const without = old.messages.filter(
272
272
  (m) => m.external_id !== message.external_id && m.external_id !== replaceOptimisticId
@@ -276,12 +276,12 @@ function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
276
276
  }
277
277
  function dropFromThread(queryClient, chatExtId, messageExtId) {
278
278
  queryClient.setQueryData(
279
- chunkHAGC67GL_cjs.arbiQueryKeys.chatThread(chatExtId),
279
+ chunkQ2GNEVG2_cjs.arbiQueryKeys.chatThread(chatExtId),
280
280
  (old) => old ? { ...old, messages: old.messages.filter((m) => m.external_id !== messageExtId) } : old
281
281
  );
282
282
  }
283
283
  function replaceInThread(queryClient, chatExtId, message) {
284
- queryClient.setQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
284
+ queryClient.setQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
285
285
  if (!old || !old.messages.some((m) => m.external_id === message.external_id)) return old;
286
286
  return {
287
287
  ...old,
@@ -291,14 +291,14 @@ function replaceInThread(queryClient, chatExtId, message) {
291
291
  }
292
292
  function patchLastMessage(queryClient, chatExtId, message) {
293
293
  queryClient.setQueryData(
294
- chunkHAGC67GL_cjs.arbiQueryKeys.chatList(),
294
+ chunkQ2GNEVG2_cjs.arbiQueryKeys.chatList(),
295
295
  (old) => old?.map(
296
296
  (c) => c.external_id === chatExtId && c.last_message?.external_id === message.external_id ? { ...c, last_message: message } : c
297
297
  )
298
298
  );
299
299
  }
300
300
  async function deleteChatMessage(arbi, queryClient, chatExtId, messageExtId) {
301
- const thread = queryClient.getQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.chatThread(chatExtId));
301
+ const thread = queryClient.getQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.chatThread(chatExtId));
302
302
  const before = thread?.messages.find((m) => m.external_id === messageExtId);
303
303
  const listed = cachedChat(queryClient, chatExtId);
304
304
  const wasLast = listed?.last_message?.external_id === messageExtId ? listed.last_message : null;
@@ -319,7 +319,7 @@ async function applyChangedMessage(arbi, queryClient, chatExtId, message) {
319
319
  return;
320
320
  }
321
321
  const chat = cachedChat(queryClient, chatExtId);
322
- if (!chat || !queryClient.getQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.chatThread(chatExtId))) return;
322
+ if (!chat || !queryClient.getQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.chatThread(chatExtId))) return;
323
323
  try {
324
324
  replaceInThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
325
325
  } catch (err) {
@@ -331,7 +331,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
331
331
  const me = myChatId(arbi);
332
332
  const chat = cachedChat(queryClient, chatExtId);
333
333
  if (!chat) {
334
- void queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.chatList() });
334
+ void queryClient.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.chatList() });
335
335
  return;
336
336
  }
337
337
  const mine = message.sender_ext_id === me;
@@ -345,7 +345,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
345
345
  (m) => m.user.external_id === me ? { ...m, last_read_at: message.created_at } : m
346
346
  ) : chat.members
347
347
  });
348
- if (queryClient.getQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.chatThread(chatExtId))) {
348
+ if (queryClient.getQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.chatThread(chatExtId))) {
349
349
  try {
350
350
  appendToThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
351
351
  } catch (err) {
@@ -356,7 +356,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
356
356
  function applyChatRead(arbi, queryClient, chatExtId, userExtId, lastReadAt) {
357
357
  const me = myChatId(arbi);
358
358
  queryClient.setQueryData(
359
- chunkHAGC67GL_cjs.arbiQueryKeys.chatList(),
359
+ chunkQ2GNEVG2_cjs.arbiQueryKeys.chatList(),
360
360
  (old) => old?.map(
361
361
  (c) => c.external_id !== chatExtId ? c : {
362
362
  ...c,
@@ -382,11 +382,11 @@ async function applyChatUpdated(arbi, queryClient, chatExtId, message) {
382
382
  }
383
383
  upsertChat(queryClient, chat);
384
384
  if (!message)
385
- void queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.chatThread(chatExtId) });
385
+ void queryClient.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.chatThread(chatExtId) });
386
386
  }
387
387
  function applyAgentDmStatus(queryClient, status) {
388
388
  if (!["queued", "working", "done", "failed"].includes(status.status)) return;
389
- queryClient.setQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.agentDmStatus(status.agent_ext_id), status);
389
+ queryClient.setQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.agentDmStatus(status.agent_ext_id), status);
390
390
  }
391
391
  async function applyChatEvent(arbi, queryClient, event) {
392
392
  const e = event;
@@ -401,13 +401,13 @@ async function applyChatEvent(arbi, queryClient, event) {
401
401
 
402
402
  // src/calls/keys.ts
403
403
  function serverCallsExperimental(queryClient) {
404
- return queryClient.getQueryData(chunkHAGC67GL_cjs.callQueryKeys.config())?.experimental !== false;
404
+ return queryClient.getQueryData(chunkQ2GNEVG2_cjs.callQueryKeys.config())?.experimental !== false;
405
405
  }
406
406
  function invalidateCall(queryClient, message) {
407
- void queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.callQueryKeys.call(message.call_ext_id) });
407
+ void queryClient.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.call(message.call_ext_id) });
408
408
  const thread = message.log_conversation_ext_id;
409
409
  if (thread) {
410
- void queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.conversationActivity(thread) });
410
+ void queryClient.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.conversationActivity(thread) });
411
411
  }
412
412
  }
413
413
 
@@ -658,19 +658,19 @@ function applyCallEvent(queryClient, event, options = {}) {
658
658
  }
659
659
  case "call.recording": {
660
660
  if (callExtId)
661
- void queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.callQueryKeys.recordingsOf(callExtId) });
661
+ void queryClient.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.recordingsOf(callExtId) });
662
662
  const state2 = browser.calls.recordingStateFrom(m);
663
663
  relay("call.recording", callExtId && state2 ? { ...state2, call_ext_id: callExtId } : null);
664
664
  return true;
665
665
  }
666
666
  case "call.recording_updated": {
667
667
  if (callExtId)
668
- void queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.callQueryKeys.recordingsOf(callExtId) });
668
+ void queryClient.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.recordingsOf(callExtId) });
669
669
  return true;
670
670
  }
671
671
  case "call.recording_deleted": {
672
672
  if (callExtId)
673
- void queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.callQueryKeys.recordingsOf(callExtId) });
673
+ void queryClient.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.recordingsOf(callExtId) });
674
674
  const recordingExtId = str(m.recording_ext_id);
675
675
  relay(
676
676
  "call.recording_deleted",
@@ -963,11 +963,11 @@ function useProfile(options) {
963
963
  const { client, enabled } = useAccountClient();
964
964
  const qc = reactQuery.useQueryClient();
965
965
  react.useEffect(
966
- () => client.onProfileChange(() => qc.setQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.profile(), client.profile())),
966
+ () => client.onProfileChange(() => qc.setQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.profile(), client.profile())),
967
967
  [client, qc]
968
968
  );
969
969
  return reactQuery.useQuery({
970
- queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.profile(),
970
+ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.profile(),
971
971
  queryFn: () => client.profile(),
972
972
  enabled: (options?.enabled ?? true) && enabled,
973
973
  staleTime: Infinity
@@ -982,9 +982,9 @@ function useUpdateProfile() {
982
982
  return client.profile();
983
983
  },
984
984
  onSuccess: (profile) => {
985
- qc.setQueryData(chunkHAGC67GL_cjs.arbiQueryKeys.profile(), profile);
986
- void qc.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.identity() });
987
- return qc.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.workspaces() });
985
+ qc.setQueryData(chunkQ2GNEVG2_cjs.arbiQueryKeys.profile(), profile);
986
+ void qc.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.identity() });
987
+ return qc.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.workspaces() });
988
988
  }
989
989
  });
990
990
  }
@@ -1086,7 +1086,7 @@ function arbiAccountClient(arbi, overrides = {}) {
1086
1086
  if (everywhere) await arbi.sessions.logoutAll();
1087
1087
  else await arbi.logout();
1088
1088
  } finally {
1089
- chunkQ65QCWNI_cjs.clearSealedDrafts();
1089
+ chunk6TUNWGRJ_cjs.clearSealedDrafts();
1090
1090
  chunkRLSBRZ6Z_cjs.clearChatArtifacts();
1091
1091
  await wipeOfflineMail().catch(() => {
1092
1092
  });
@@ -1133,7 +1133,7 @@ var NO_ACCOUNT = {
1133
1133
  };
1134
1134
  var ALWAYS = () => true;
1135
1135
  function useAccountClient() {
1136
- const { account, arbi } = chunkHAGC67GL_cjs.useArbiHost();
1136
+ const { account, arbi } = chunkQ2GNEVG2_cjs.useArbiHost();
1137
1137
  const fallback = react.useMemo(() => arbi ? arbiAccountClient(arbi) : null, [arbi]);
1138
1138
  const useEnabled = account?.useEnabled ?? ALWAYS;
1139
1139
  const enabled = useEnabled();
@@ -1144,9 +1144,9 @@ function useAccountClient() {
1144
1144
  return { client: fallback, enabled: arbi.isLoggedIn };
1145
1145
  }
1146
1146
  function useEntitlements() {
1147
- const { arbi } = chunkHAGC67GL_cjs.useArbiHost();
1147
+ const { arbi } = chunkQ2GNEVG2_cjs.useArbiHost();
1148
1148
  return reactQuery.useQuery({
1149
- queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.entitlements(),
1149
+ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.entitlements(),
1150
1150
  queryFn: () => arbi.account.entitlements(),
1151
1151
  enabled: !!arbi?.isLoggedIn,
1152
1152
  // A plan change shows on the next read; the API enforces it at once either way.
@@ -1155,7 +1155,7 @@ function useEntitlements() {
1155
1155
  }
1156
1156
  function useInvalidateEntitlements() {
1157
1157
  const qc = reactQuery.useQueryClient();
1158
- return () => qc.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.entitlements() });
1158
+ return () => qc.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.entitlements() });
1159
1159
  }
1160
1160
  function useIsEntitled(feature) {
1161
1161
  const { data } = useEntitlements();
@@ -1279,7 +1279,7 @@ function ensureMeetingChat(arbi, queryClient, callExtId, callKey) {
1279
1279
  });
1280
1280
  if (!ref) throw new Error("The server did not return a meeting chat");
1281
1281
  if (ref.kind === "chat")
1282
- void queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.arbiQueryKeys.chatList() });
1282
+ void queryClient.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.arbiQueryKeys.chatList() });
1283
1283
  else void invalidateConversationLists(queryClient);
1284
1284
  return ref;
1285
1285
  })();
@@ -1439,7 +1439,7 @@ function hasRecordingTranscript(lines, refOf) {
1439
1439
  return lines.some((l) => isRecordingSegmentId(refOf(l)?.segmentId));
1440
1440
  }
1441
1441
  var CALL_CHAT_TOPIC = "arbi.chat";
1442
- var READ_ONLY_MEETING_TEXT = "Read-only: workspace guests can\u2019t post";
1442
+ var READ_ONLY_MEETING_TEXT = "Read only: you can\u2019t post in this meeting chat";
1443
1443
  var CALL_CHAT_MAX_CHARS = 4e3;
1444
1444
  var encoder = new TextEncoder();
1445
1445
  var decoder = new TextDecoder();
@@ -2285,9 +2285,9 @@ async function transcribeRecording(params) {
2285
2285
  return { stored, failed };
2286
2286
  }
2287
2287
  function useCallsConfig() {
2288
- const arbi = chunkHAGC67GL_cjs.useArbi();
2288
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
2289
2289
  const { data } = reactQuery.useQuery({
2290
- queryKey: chunkHAGC67GL_cjs.callQueryKeys.config(),
2290
+ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.config(),
2291
2291
  queryFn: () => arbi.calls.config(),
2292
2292
  enabled: arbi.isLoggedIn,
2293
2293
  staleTime: 5 * 6e4,
@@ -2305,9 +2305,9 @@ function useCallTranscriptionAvailable() {
2305
2305
  return useCallsConfig()?.transcription_available === true;
2306
2306
  }
2307
2307
  function useCall(callExtId) {
2308
- const arbi = chunkHAGC67GL_cjs.useArbi();
2308
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
2309
2309
  return reactQuery.useQuery({
2310
- queryKey: chunkHAGC67GL_cjs.callQueryKeys.call(callExtId ?? ""),
2310
+ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.call(callExtId ?? ""),
2311
2311
  queryFn: () => arbi.calls.get(callExtId),
2312
2312
  enabled: !!callExtId && arbi.isLoggedIn,
2313
2313
  staleTime: 6e4,
@@ -2315,18 +2315,18 @@ function useCall(callExtId) {
2315
2315
  });
2316
2316
  }
2317
2317
  function useCallRecordings(callExtId, enabled = true) {
2318
- const arbi = chunkHAGC67GL_cjs.useArbi();
2318
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
2319
2319
  return reactQuery.useQuery({
2320
- queryKey: chunkHAGC67GL_cjs.callQueryKeys.recordings(callExtId ?? ""),
2320
+ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.recordings(callExtId ?? ""),
2321
2321
  queryFn: () => arbi.calls.recording.list(callExtId),
2322
2322
  enabled: !!callExtId && enabled && arbi.isLoggedIn,
2323
2323
  retry: false
2324
2324
  });
2325
2325
  }
2326
2326
  function useCallRecording(callExtId, recordingExtId) {
2327
- const arbi = chunkHAGC67GL_cjs.useArbi();
2327
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
2328
2328
  return reactQuery.useQuery({
2329
- queryKey: chunkHAGC67GL_cjs.callQueryKeys.recording(callExtId ?? "", recordingExtId ?? ""),
2329
+ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.recording(callExtId ?? "", recordingExtId ?? ""),
2330
2330
  queryFn: () => arbi.calls.recording.get(callExtId, recordingExtId),
2331
2331
  enabled: !!callExtId && !!recordingExtId && arbi.isLoggedIn,
2332
2332
  retry: false
@@ -2338,21 +2338,21 @@ function useRecordingWindows(callExtId, enabled) {
2338
2338
  return react.useMemo(() => data ? recordingWindowsOf(data) : NO_WINDOWS, [data]);
2339
2339
  }
2340
2340
  function useCallInviteLinks(callExtId) {
2341
- const arbi = chunkHAGC67GL_cjs.useArbi();
2341
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
2342
2342
  return reactQuery.useQuery({
2343
- queryKey: chunkHAGC67GL_cjs.callQueryKeys.inviteLinks(callExtId ?? ""),
2343
+ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.inviteLinks(callExtId ?? ""),
2344
2344
  queryFn: () => arbi.calls.inviteLinks.list(callExtId),
2345
2345
  enabled: !!callExtId && arbi.isLoggedIn,
2346
2346
  retry: false
2347
2347
  });
2348
2348
  }
2349
2349
  function useRecordingActions(call) {
2350
- const arbi = chunkHAGC67GL_cjs.useArbi();
2350
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
2351
2351
  const queryClient = reactQuery.useQueryClient();
2352
2352
  return react.useMemo(
2353
2353
  () => ({
2354
2354
  refresh: () => void queryClient.invalidateQueries({
2355
- queryKey: chunkHAGC67GL_cjs.callQueryKeys.recordingsOf(call.external_id)
2355
+ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.recordingsOf(call.external_id)
2356
2356
  }),
2357
2357
  open: (recording) => openRecording(arbi, queryClient, call, recording.external_id, recording),
2358
2358
  transcribe: async (opened, onProgress) => transcribeRecording({
@@ -2368,12 +2368,12 @@ function useRecordingActions(call) {
2368
2368
  );
2369
2369
  }
2370
2370
  function useRevokeCallInviteLink(callExtId) {
2371
- const arbi = chunkHAGC67GL_cjs.useArbi();
2371
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
2372
2372
  const queryClient = reactQuery.useQueryClient();
2373
2373
  return react.useCallback(
2374
2374
  async (inviteExtId) => {
2375
2375
  await arbi.calls.inviteLinks.revoke(callExtId, inviteExtId);
2376
- void queryClient.invalidateQueries({ queryKey: chunkHAGC67GL_cjs.callQueryKeys.inviteLinks(callExtId) });
2376
+ void queryClient.invalidateQueries({ queryKey: chunkQ2GNEVG2_cjs.callQueryKeys.inviteLinks(callExtId) });
2377
2377
  },
2378
2378
  [arbi, queryClient, callExtId]
2379
2379
  );
@@ -2431,7 +2431,7 @@ async function saveRecordingFilesToThread(arbi, params) {
2431
2431
  });
2432
2432
  }
2433
2433
  function useSaveToThread() {
2434
- const arbi = chunkHAGC67GL_cjs.useArbi();
2434
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
2435
2435
  const queryClient = reactQuery.useQueryClient();
2436
2436
  return react.useMemo(() => {
2437
2437
  const thenRefresh = async (run) => {
@@ -2718,9 +2718,9 @@ function isWorkspaceGuestOf(workspaces, workspaceExtId, me) {
2718
2718
  return workspace?.users?.find((wu) => wu.user.external_id === me)?.role === "guest";
2719
2719
  }
2720
2720
  function useMeetingReadOnly(lockedWorkspaceExtId) {
2721
- const arbi = chunkHAGC67GL_cjs.useArbi();
2721
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
2722
2722
  const me = arbi.isLoggedIn ? arbi.user.identity()?.externalId ?? null : null;
2723
- const { data: workspaces } = chunkQ65QCWNI_cjs.useWorkspaces({
2723
+ const { data: workspaces } = chunk6TUNWGRJ_cjs.useWorkspaces({
2724
2724
  enabled: !!lockedWorkspaceExtId && arbi.isLoggedIn
2725
2725
  });
2726
2726
  return isWorkspaceGuestOf(
@@ -2743,9 +2743,9 @@ function useCanHostCalls() {
2743
2743
  return callsEnabled && entitled;
2744
2744
  }
2745
2745
  function useOpenCallMeetingChat() {
2746
- const arbi = chunkHAGC67GL_cjs.useArbi();
2746
+ const arbi = chunkQ2GNEVG2_cjs.useArbi();
2747
2747
  const queryClient = reactQuery.useQueryClient();
2748
- const open = chunkHAGC67GL_cjs.useArbiHost().calls?.openMeetingChat;
2748
+ const open = chunkQ2GNEVG2_cjs.useArbiHost().calls?.openMeetingChat;
2749
2749
  return react.useCallback(
2750
2750
  async (target) => {
2751
2751
  try {
@@ -2982,5 +2982,5 @@ exports.useUserSettings = useUserSettings;
2982
2982
  exports.wipeOfflineMail = wipeOfflineMail;
2983
2983
  exports.wrapTrackKey = wrapTrackKey;
2984
2984
  exports.writeSamples = writeSamples;
2985
- //# sourceMappingURL=chunk-WJME7DI4.cjs.map
2986
- //# sourceMappingURL=chunk-WJME7DI4.cjs.map
2985
+ //# sourceMappingURL=chunk-524AFWK7.cjs.map
2986
+ //# sourceMappingURL=chunk-524AFWK7.cjs.map