@arbidocs/react 0.5.103 → 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 (55) 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 +34 -34
  4. package/dist/artifacts/index.js +6 -6
  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 +44 -44
  10. package/dist/calls/livekit/index.js +5 -5
  11. package/dist/{chunk-TV4QQVZM.cjs → chunk-524AFWK7.cjs} +6 -6
  12. package/dist/{chunk-TV4QQVZM.cjs.map → chunk-524AFWK7.cjs.map} +1 -1
  13. package/dist/{chunk-XOS7ISIR.cjs → chunk-6TUNWGRJ.cjs} +5 -5
  14. package/dist/{chunk-XOS7ISIR.cjs.map → chunk-6TUNWGRJ.cjs.map} +1 -1
  15. package/dist/{chunk-NDIKMOBJ.cjs → chunk-7C77IBQZ.cjs} +3 -3
  16. package/dist/{chunk-NDIKMOBJ.cjs.map → chunk-7C77IBQZ.cjs.map} +1 -1
  17. package/dist/{chunk-OSFKAJT2.js → chunk-7KZS22EK.js} +5 -5
  18. package/dist/{chunk-OSFKAJT2.js.map → chunk-7KZS22EK.js.map} +1 -1
  19. package/dist/{chunk-NIKPG4PW.js → chunk-A2XSLTIP.js} +3 -3
  20. package/dist/{chunk-NIKPG4PW.js.map → chunk-A2XSLTIP.js.map} +1 -1
  21. package/dist/{chunk-PJMCBB6E.js → chunk-A6HUB6PX.js} +4 -4
  22. package/dist/{chunk-PJMCBB6E.js.map → chunk-A6HUB6PX.js.map} +1 -1
  23. package/dist/{chunk-PC4O3JDV.cjs → chunk-B6I2HRRF.cjs} +3 -3
  24. package/dist/{chunk-PC4O3JDV.cjs.map → chunk-B6I2HRRF.cjs.map} +1 -1
  25. package/dist/{chunk-UW2SGTI5.js → chunk-GR7CZEJJ.js} +3 -3
  26. package/dist/{chunk-UW2SGTI5.js.map → chunk-GR7CZEJJ.js.map} +1 -1
  27. package/dist/{chunk-FQVNZCTD.cjs → chunk-LBAG7KL7.cjs} +3 -3
  28. package/dist/{chunk-FQVNZCTD.cjs.map → chunk-LBAG7KL7.cjs.map} +1 -1
  29. package/dist/{chunk-NJEXFOA2.js → chunk-LD2SJBXC.js} +5 -5
  30. package/dist/{chunk-NJEXFOA2.js.map → chunk-LD2SJBXC.js.map} +1 -1
  31. package/dist/{chunk-DPR7LVZO.js → chunk-NNAJLY6B.js} +3 -3
  32. package/dist/{chunk-DPR7LVZO.js.map → chunk-NNAJLY6B.js.map} +1 -1
  33. package/dist/{chunk-AXKIOI2U.js → chunk-RC42YRVA.js} +3 -3
  34. package/dist/{chunk-AXKIOI2U.js.map → chunk-RC42YRVA.js.map} +1 -1
  35. package/dist/{chunk-C72FSQUE.cjs → chunk-TTHJNRLY.cjs} +6 -6
  36. package/dist/{chunk-C72FSQUE.cjs.map → chunk-TTHJNRLY.cjs.map} +1 -1
  37. package/dist/{chunk-4UUZ67JL.js → chunk-V73GLDHD.js} +3 -3
  38. package/dist/{chunk-4UUZ67JL.js.map → chunk-V73GLDHD.js.map} +1 -1
  39. package/dist/{chunk-KKRDM5RZ.cjs → chunk-YD25DEMR.cjs} +25 -25
  40. package/dist/{chunk-KKRDM5RZ.cjs.map → chunk-YD25DEMR.cjs.map} +1 -1
  41. package/dist/{chunk-XBYVYPU5.cjs → chunk-YNKV4MN6.cjs} +4 -4
  42. package/dist/{chunk-XBYVYPU5.cjs.map → chunk-YNKV4MN6.cjs.map} +1 -1
  43. package/dist/document-tools/core.cjs +100 -100
  44. package/dist/document-tools/core.js +6 -6
  45. package/dist/document-tools/index.cjs +103 -103
  46. package/dist/document-tools/index.js +8 -8
  47. package/dist/index.cjs +1575 -1575
  48. package/dist/index.js +20 -20
  49. package/dist/shell/index.cjs +40 -40
  50. package/dist/shell/index.js +5 -5
  51. package/dist/ui/index.cjs +154 -154
  52. package/dist/ui/index.js +2 -2
  53. package/package.json +3 -3
  54. package/dist/bundle-IC65W2AO.cjs +0 -14
  55. package/dist/bundle-YNOX7VIL.js +0 -5
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkPC4O3JDV_cjs = require('../../chunk-PC4O3JDV.cjs');
4
- require('../../chunk-IU2CJNTB.cjs');
3
+ var chunkB6I2HRRF_cjs = require('../../chunk-B6I2HRRF.cjs');
5
4
  var chunk2IJP73ZG_cjs = require('../../chunk-2IJP73ZG.cjs');
5
+ require('../../chunk-IU2CJNTB.cjs');
6
6
  var reactPdf = require('react-pdf');
7
7
 
8
8
  async function freezePdfInBrowser(bytes, layer, { assets, password, ...options }) {
9
9
  const needsRaster = options.mode === "image" || layer.annotations.some(chunk2IJP73ZG_cjs.isEffectiveRedaction);
10
- const rasterizer = needsRaster ? await chunkPC4O3JDV_cjs.createPdfJsRasterizer(reactPdf.pdfjs, bytes, chunkPC4O3JDV_cjs.browserCanvasFactory(), {
10
+ const rasterizer = needsRaster ? await chunkB6I2HRRF_cjs.createPdfJsRasterizer(reactPdf.pdfjs, bytes, chunkB6I2HRRF_cjs.browserCanvasFactory(), {
11
11
  password,
12
12
  documentOptions: {
13
13
  cMapUrl: assets?.cMapUrl ?? "/cmaps/",
@@ -16,48 +16,48 @@ async function freezePdfInBrowser(bytes, layer, { assets, password, ...options }
16
16
  wasmUrl: assets?.wasmUrl ?? "/wasm/"
17
17
  }
18
18
  }) : void 0;
19
- return chunkPC4O3JDV_cjs.freezePdf(bytes, layer, { ...options, rasterizer });
19
+ return chunkB6I2HRRF_cjs.freezePdf(bytes, layer, { ...options, rasterizer });
20
20
  }
21
21
 
22
22
  Object.defineProperty(exports, "DEFAULT_DPI", {
23
23
  enumerable: true,
24
- get: function () { return chunkPC4O3JDV_cjs.DEFAULT_DPI; }
24
+ get: function () { return chunkB6I2HRRF_cjs.DEFAULT_DPI; }
25
25
  });
26
26
  Object.defineProperty(exports, "FreezeError", {
27
27
  enumerable: true,
28
- get: function () { return chunkPC4O3JDV_cjs.FreezeError; }
28
+ get: function () { return chunkB6I2HRRF_cjs.FreezeError; }
29
29
  });
30
30
  Object.defineProperty(exports, "MAX_PAGE_PIXELS", {
31
31
  enumerable: true,
32
- get: function () { return chunkPC4O3JDV_cjs.MAX_PAGE_PIXELS; }
32
+ get: function () { return chunkB6I2HRRF_cjs.MAX_PAGE_PIXELS; }
33
33
  });
34
34
  Object.defineProperty(exports, "batesLabel", {
35
35
  enumerable: true,
36
- get: function () { return chunkPC4O3JDV_cjs.batesLabel; }
36
+ get: function () { return chunkB6I2HRRF_cjs.batesLabel; }
37
37
  });
38
38
  Object.defineProperty(exports, "browserCanvasFactory", {
39
39
  enumerable: true,
40
- get: function () { return chunkPC4O3JDV_cjs.browserCanvasFactory; }
40
+ get: function () { return chunkB6I2HRRF_cjs.browserCanvasFactory; }
41
41
  });
42
42
  Object.defineProperty(exports, "buildBundle", {
43
43
  enumerable: true,
44
- get: function () { return chunkPC4O3JDV_cjs.buildBundle; }
44
+ get: function () { return chunkB6I2HRRF_cjs.buildBundle; }
45
45
  });
46
46
  Object.defineProperty(exports, "burnMarks", {
47
47
  enumerable: true,
48
- get: function () { return chunkPC4O3JDV_cjs.burnMarks; }
48
+ get: function () { return chunkB6I2HRRF_cjs.burnMarks; }
49
49
  });
50
50
  Object.defineProperty(exports, "createPdfJsRasterizer", {
51
51
  enumerable: true,
52
- get: function () { return chunkPC4O3JDV_cjs.createPdfJsRasterizer; }
52
+ get: function () { return chunkB6I2HRRF_cjs.createPdfJsRasterizer; }
53
53
  });
54
54
  Object.defineProperty(exports, "freezePdf", {
55
55
  enumerable: true,
56
- get: function () { return chunkPC4O3JDV_cjs.freezePdf; }
56
+ get: function () { return chunkB6I2HRRF_cjs.freezePdf; }
57
57
  });
58
58
  Object.defineProperty(exports, "readProvenance", {
59
59
  enumerable: true,
60
- get: function () { return chunkPC4O3JDV_cjs.readProvenance; }
60
+ get: function () { return chunkB6I2HRRF_cjs.readProvenance; }
61
61
  });
62
62
  exports.freezePdfInBrowser = freezePdfInBrowser;
63
63
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
- import { createPdfJsRasterizer, browserCanvasFactory, freezePdf } from '../../chunk-NIKPG4PW.js';
2
- export { DEFAULT_DPI, FreezeError, MAX_PAGE_PIXELS, batesLabel, browserCanvasFactory, buildBundle, burnMarks, createPdfJsRasterizer, freezePdf, readProvenance } from '../../chunk-NIKPG4PW.js';
3
- import '../../chunk-PTOP7OHG.js';
1
+ import { createPdfJsRasterizer, browserCanvasFactory, freezePdf } from '../../chunk-A2XSLTIP.js';
2
+ export { DEFAULT_DPI, FreezeError, MAX_PAGE_PIXELS, batesLabel, browserCanvasFactory, buildBundle, burnMarks, createPdfJsRasterizer, freezePdf, readProvenance } from '../../chunk-A2XSLTIP.js';
4
3
  import { isEffectiveRedaction } from '../../chunk-T3USOSVN.js';
4
+ import '../../chunk-PTOP7OHG.js';
5
5
  import { pdfjs } from 'react-pdf';
6
6
 
7
7
  async function freezePdfInBrowser(bytes, layer, { assets, password, ...options }) {
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkIXE7HCCA_cjs = require('../chunk-IXE7HCCA.cjs');
4
- var chunkXOS7ISIR_cjs = require('../chunk-XOS7ISIR.cjs');
4
+ var chunkMXP4O4DI_cjs = require('../chunk-MXP4O4DI.cjs');
5
+ var chunk6TUNWGRJ_cjs = require('../chunk-6TUNWGRJ.cjs');
5
6
  var chunk3AADNIOK_cjs = require('../chunk-3AADNIOK.cjs');
6
7
  var chunkQ2GNEVG2_cjs = require('../chunk-Q2GNEVG2.cjs');
7
8
  require('../chunk-N73IMVFF.cjs');
8
- var chunkNDIKMOBJ_cjs = require('../chunk-NDIKMOBJ.cjs');
9
- var chunkVOFNX4P6_cjs = require('../chunk-VOFNX4P6.cjs');
10
- var chunkMXP4O4DI_cjs = require('../chunk-MXP4O4DI.cjs');
9
+ var chunk7C77IBQZ_cjs = require('../chunk-7C77IBQZ.cjs');
11
10
  require('../chunk-5NOZDH3F.cjs');
12
11
  require('../chunk-S6A6FSG7.cjs');
12
+ var chunkVOFNX4P6_cjs = require('../chunk-VOFNX4P6.cjs');
13
13
  var react = require('react');
14
14
  var reactQuery = require('@tanstack/react-query');
15
15
  var jsxRuntime = require('react/jsx-runtime');
@@ -275,19 +275,19 @@ function useArtifactText(docId, options) {
275
275
  ...DEFAULT_ARTIFACT_TEXT_RETRY,
276
276
  ...options?.retry
277
277
  };
278
- const enabled = (options?.enabled ?? true) && chunkNDIKMOBJ_cjs.isDocumentId(docId) && arbi.hasWorkspace;
278
+ const enabled = (options?.enabled ?? true) && chunk7C77IBQZ_cjs.isDocumentId(docId) && arbi.hasWorkspace;
279
279
  const query = reactQuery.useQuery({
280
280
  // Under the shared `parsedDoc` key, so a document's invalidation reaches it too.
281
281
  queryKey: [...chunkQ2GNEVG2_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
282
282
  queryFn: async () => {
283
- const { docId: plainId, version } = chunkNDIKMOBJ_cjs.parseVersionRef(docId);
283
+ const { docId: plainId, version } = chunk7C77IBQZ_cjs.parseVersionRef(docId);
284
284
  const parsed = await arbi.documents.getParsedContent(
285
285
  plainId,
286
286
  "marker",
287
287
  version ?? void 0
288
288
  );
289
289
  if (!parsed.chunks?.some((c) => c.content?.trim())) throw new NotParsedYetError();
290
- return chunkNDIKMOBJ_cjs.flattenChunks(parsed.chunks, { unescape: true });
290
+ return chunk7C77IBQZ_cjs.flattenChunks(parsed.chunks, { unescape: true });
291
291
  },
292
292
  enabled,
293
293
  retry: (failureCount, error) => !isRefusal(error) && failureCount < attempts,
@@ -325,17 +325,17 @@ function useArtifactText(docId, options) {
325
325
 
326
326
  // src/artifacts/useArtifactSession.ts
327
327
  function useArtifactVersions(workspaceId, docId) {
328
- const plainId = docId ? chunkNDIKMOBJ_cjs.parseVersionRef(docId).docId : null;
328
+ const plainId = docId ? chunk7C77IBQZ_cjs.parseVersionRef(docId).docId : null;
329
329
  const { data: documents } = chunkIXE7HCCA_cjs.useDocuments(workspaceId);
330
330
  const listed = react.useMemo(
331
331
  () => (documents ?? []).find((d) => d.external_id === plainId),
332
332
  [documents, plainId]
333
333
  );
334
- const { data: history } = chunkXOS7ISIR_cjs.useDocumentVersionList(plainId, {
334
+ const { data: history } = chunk6TUNWGRJ_cjs.useDocumentVersionList(plainId, {
335
335
  enabled: !!plainId && documents !== void 0 && !listed
336
336
  });
337
337
  return react.useMemo(
338
- () => listed ? chunkNDIKMOBJ_cjs.documentVersions(listed) : chunkNDIKMOBJ_cjs.toArtifactVersions(plainId, history),
338
+ () => listed ? chunk7C77IBQZ_cjs.documentVersions(listed) : chunk7C77IBQZ_cjs.toArtifactVersions(plainId, history),
339
339
  [listed, history, plainId]
340
340
  );
341
341
  }
@@ -350,7 +350,7 @@ function useSaveArtifactVersion() {
350
350
  fileName,
351
351
  {
352
352
  wpType: wpType ?? "artifact",
353
- versionOf: versionOf ? chunkNDIKMOBJ_cjs.parseVersionRef(versionOf).docId : void 0,
353
+ versionOf: versionOf ? chunk7C77IBQZ_cjs.parseVersionRef(versionOf).docId : void 0,
354
354
  configExtId: configId ?? void 0
355
355
  }
356
356
  );
@@ -378,7 +378,7 @@ function useArtifactSession(options) {
378
378
  const [saved, setSaved] = react.useState(null);
379
379
  const adopted = saved && saved.forId === hostDocId ? saved : null;
380
380
  const docId = adopted?.id ?? hostDocId;
381
- const isLocal = !chunkNDIKMOBJ_cjs.isDocumentId(docId);
381
+ const isLocal = !chunk7C77IBQZ_cjs.isDocumentId(docId);
382
382
  const [ownCompareId, setOwnCompareId] = react.useState(null);
383
383
  const activeCompareId = compareId === void 0 ? ownCompareId : compareId;
384
384
  const changeCompare = react.useCallback(
@@ -394,7 +394,7 @@ function useArtifactSession(options) {
394
394
  enabled: !!activeCompareId
395
395
  });
396
396
  const saveVersion = useSaveArtifactVersion();
397
- const current = chunkNDIKMOBJ_cjs.findVersion(versions, docId);
397
+ const current = chunk7C77IBQZ_cjs.findVersion(versions, docId);
398
398
  const save = react.useCallback(
399
399
  async (content) => {
400
400
  const result = await saveVersion.mutateAsync({
@@ -410,7 +410,7 @@ function useArtifactSession(options) {
410
410
  );
411
411
  const handleSaved = react.useCallback(
412
412
  (result, content) => {
413
- if (!chunkNDIKMOBJ_cjs.isDocumentId(hostDocId) && result.docId)
413
+ if (!chunk7C77IBQZ_cjs.isDocumentId(hostDocId) && result.docId)
414
414
  setSaved({ forId: hostDocId, id: result.docId, text: content });
415
415
  onSaved?.(result, content);
416
416
  },
@@ -439,7 +439,7 @@ function useArtifactSession(options) {
439
439
  isLoading,
440
440
  status,
441
441
  versions,
442
- labelOf: (id) => chunkNDIKMOBJ_cjs.versionLabel(versions, id),
442
+ labelOf: (id) => chunk7C77IBQZ_cjs.versionLabel(versions, id),
443
443
  view: {
444
444
  content: session.baseline,
445
445
  isEditing: session.isEditing,
@@ -504,7 +504,7 @@ function useStreamedArtifact({
504
504
  const started = react.useRef(null);
505
505
  const content = artifact?.content ?? "";
506
506
  const title = artifact?.title ?? "Draft";
507
- const passThrough = !!artifact && chunkNDIKMOBJ_cjs.isDocumentId(artifact.doc_ext_id);
507
+ const passThrough = !!artifact && chunk7C77IBQZ_cjs.isDocumentId(artifact.doc_ext_id);
508
508
  const needsSave = settled && !!artifact && !passThrough && !!content.trim() && !!workspaceId;
509
509
  react.useEffect(() => {
510
510
  const key = `${attempt}:${content}`;
@@ -514,7 +514,7 @@ function useStreamedArtifact({
514
514
  let stored;
515
515
  if (clean) stored = clean(content);
516
516
  else {
517
- const report = chunkNDIKMOBJ_cjs.cleanDraftWithReport(content);
517
+ const report = chunk7C77IBQZ_cjs.cleanDraftWithReport(content);
518
518
  stored = report.text;
519
519
  setCleaned(report);
520
520
  onCleaned?.(report);
@@ -581,71 +581,71 @@ Object.defineProperty(exports, "revertRedlineRegion", {
581
581
  });
582
582
  Object.defineProperty(exports, "cleanDraftMarkdown", {
583
583
  enumerable: true,
584
- get: function () { return chunkNDIKMOBJ_cjs.cleanDraftMarkdown; }
584
+ get: function () { return chunk7C77IBQZ_cjs.cleanDraftMarkdown; }
585
585
  });
586
586
  Object.defineProperty(exports, "cleanDraftWithReport", {
587
587
  enumerable: true,
588
- get: function () { return chunkNDIKMOBJ_cjs.cleanDraftWithReport; }
588
+ get: function () { return chunk7C77IBQZ_cjs.cleanDraftWithReport; }
589
589
  });
590
590
  Object.defineProperty(exports, "documentVersions", {
591
591
  enumerable: true,
592
- get: function () { return chunkNDIKMOBJ_cjs.documentVersions; }
592
+ get: function () { return chunk7C77IBQZ_cjs.documentVersions; }
593
593
  });
594
594
  Object.defineProperty(exports, "findVersion", {
595
595
  enumerable: true,
596
- get: function () { return chunkNDIKMOBJ_cjs.findVersion; }
596
+ get: function () { return chunk7C77IBQZ_cjs.findVersion; }
597
597
  });
598
598
  Object.defineProperty(exports, "flattenChunks", {
599
599
  enumerable: true,
600
- get: function () { return chunkNDIKMOBJ_cjs.flattenChunks; }
600
+ get: function () { return chunk7C77IBQZ_cjs.flattenChunks; }
601
601
  });
602
602
  Object.defineProperty(exports, "isDocumentId", {
603
603
  enumerable: true,
604
- get: function () { return chunkNDIKMOBJ_cjs.isDocumentId; }
604
+ get: function () { return chunk7C77IBQZ_cjs.isDocumentId; }
605
605
  });
606
606
  Object.defineProperty(exports, "parseVersionRef", {
607
607
  enumerable: true,
608
- get: function () { return chunkNDIKMOBJ_cjs.parseVersionRef; }
608
+ get: function () { return chunk7C77IBQZ_cjs.parseVersionRef; }
609
609
  });
610
610
  Object.defineProperty(exports, "promoteBoldTitle", {
611
611
  enumerable: true,
612
- get: function () { return chunkNDIKMOBJ_cjs.promoteBoldTitle; }
612
+ get: function () { return chunk7C77IBQZ_cjs.promoteBoldTitle; }
613
613
  });
614
614
  Object.defineProperty(exports, "repairParsedStructure", {
615
615
  enumerable: true,
616
- get: function () { return chunkNDIKMOBJ_cjs.repairParsedStructure; }
616
+ get: function () { return chunk7C77IBQZ_cjs.repairParsedStructure; }
617
617
  });
618
618
  Object.defineProperty(exports, "repairParsedTitle", {
619
619
  enumerable: true,
620
- get: function () { return chunkNDIKMOBJ_cjs.repairParsedTitle; }
620
+ get: function () { return chunk7C77IBQZ_cjs.repairParsedTitle; }
621
621
  });
622
622
  Object.defineProperty(exports, "savedFromId", {
623
623
  enumerable: true,
624
- get: function () { return chunkNDIKMOBJ_cjs.savedFromId; }
624
+ get: function () { return chunk7C77IBQZ_cjs.savedFromId; }
625
625
  });
626
626
  Object.defineProperty(exports, "stripAgentPreamble", {
627
627
  enumerable: true,
628
- get: function () { return chunkNDIKMOBJ_cjs.stripAgentPreamble; }
628
+ get: function () { return chunk7C77IBQZ_cjs.stripAgentPreamble; }
629
629
  });
630
630
  Object.defineProperty(exports, "toArtifactVersions", {
631
631
  enumerable: true,
632
- get: function () { return chunkNDIKMOBJ_cjs.toArtifactVersions; }
632
+ get: function () { return chunk7C77IBQZ_cjs.toArtifactVersions; }
633
633
  });
634
634
  Object.defineProperty(exports, "unescapeMarkdown", {
635
635
  enumerable: true,
636
- get: function () { return chunkNDIKMOBJ_cjs.unescapeMarkdown; }
636
+ get: function () { return chunk7C77IBQZ_cjs.unescapeMarkdown; }
637
637
  });
638
638
  Object.defineProperty(exports, "unwrapCitationLinks", {
639
639
  enumerable: true,
640
- get: function () { return chunkNDIKMOBJ_cjs.unwrapCitationLinks; }
640
+ get: function () { return chunk7C77IBQZ_cjs.unwrapCitationLinks; }
641
641
  });
642
642
  Object.defineProperty(exports, "versionLabel", {
643
643
  enumerable: true,
644
- get: function () { return chunkNDIKMOBJ_cjs.versionLabel; }
644
+ get: function () { return chunk7C77IBQZ_cjs.versionLabel; }
645
645
  });
646
646
  Object.defineProperty(exports, "versionRef", {
647
647
  enumerable: true,
648
- get: function () { return chunkNDIKMOBJ_cjs.versionRef; }
648
+ get: function () { return chunk7C77IBQZ_cjs.versionRef; }
649
649
  });
650
650
  Object.defineProperty(exports, "normalizeMarkdown", {
651
651
  enumerable: true,
@@ -1,16 +1,16 @@
1
1
  import { useDocuments, refreshDocuments } from '../chunk-MAUZSNQY.js';
2
- import { useDocumentVersionList } from '../chunk-AXKIOI2U.js';
2
+ import { MarkdownRenderer } from '../chunk-WL2Y2T47.js';
3
+ import { useDocumentVersionList } from '../chunk-RC42YRVA.js';
3
4
  import { revertRedlineRegion, buildHybridRedlineWithRegions, buildHybridRedlineMarkdown } from '../chunk-74N436VK.js';
4
5
  export { buildHybridRedlineMarkdown, buildHybridRedlineWithRegions, revertRedlineRegion } from '../chunk-74N436VK.js';
5
6
  import { useArbi, arbiQueryKeys } from '../chunk-M74JCOXW.js';
6
7
  import '../chunk-DPYBZDJB.js';
7
- import { isDocumentId, parseVersionRef, flattenChunks, documentVersions, toArtifactVersions, findVersion, versionLabel, cleanDraftWithReport } from '../chunk-UW2SGTI5.js';
8
- export { cleanDraftMarkdown, cleanDraftWithReport, documentVersions, findVersion, flattenChunks, isDocumentId, parseVersionRef, promoteBoldTitle, repairParsedStructure, repairParsedTitle, savedFromId, stripAgentPreamble, toArtifactVersions, unescapeMarkdown, unwrapCitationLinks, versionLabel, versionRef } from '../chunk-UW2SGTI5.js';
9
- import { normalizeMarkdown } from '../chunk-WUTL62MC.js';
10
- export { normalizeMarkdown } from '../chunk-WUTL62MC.js';
11
- import { MarkdownRenderer } from '../chunk-WL2Y2T47.js';
8
+ import { isDocumentId, parseVersionRef, flattenChunks, documentVersions, toArtifactVersions, findVersion, versionLabel, cleanDraftWithReport } from '../chunk-GR7CZEJJ.js';
9
+ export { cleanDraftMarkdown, cleanDraftWithReport, documentVersions, findVersion, flattenChunks, isDocumentId, parseVersionRef, promoteBoldTitle, repairParsedStructure, repairParsedTitle, savedFromId, stripAgentPreamble, toArtifactVersions, unescapeMarkdown, unwrapCitationLinks, versionLabel, versionRef } from '../chunk-GR7CZEJJ.js';
12
10
  import '../chunk-VSCU7K4V.js';
13
11
  import '../chunk-SN5YV6FF.js';
12
+ import { normalizeMarkdown } from '../chunk-WUTL62MC.js';
13
+ export { normalizeMarkdown } from '../chunk-WUTL62MC.js';
14
14
  import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
15
15
  import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
16
16
  import { jsx } from 'react/jsx-runtime';
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var chunkB6I2HRRF_cjs = require('./chunk-B6I2HRRF.cjs');
4
+ require('./chunk-2IJP73ZG.cjs');
5
+ require('./chunk-IU2CJNTB.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "buildBundle", {
10
+ enumerable: true,
11
+ get: function () { return chunkB6I2HRRF_cjs.buildBundle; }
12
+ });
13
+ //# sourceMappingURL=bundle-DCWPYNGD.cjs.map
14
+ //# sourceMappingURL=bundle-DCWPYNGD.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-IC65W2AO.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-DCWPYNGD.cjs"}
@@ -0,0 +1,5 @@
1
+ export { buildBundle } from './chunk-A2XSLTIP.js';
2
+ import './chunk-T3USOSVN.js';
3
+ import './chunk-PTOP7OHG.js';
4
+ //# sourceMappingURL=bundle-JCKKGEJE.js.map
5
+ //# sourceMappingURL=bundle-JCKKGEJE.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-YNOX7VIL.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"bundle-JCKKGEJE.js"}
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkTV4QQVZM_cjs = require('../../chunk-TV4QQVZM.cjs');
4
- require('../../chunk-XOS7ISIR.cjs');
3
+ var chunk524AFWK7_cjs = require('../../chunk-524AFWK7.cjs');
4
+ require('../../chunk-EEIYXVM4.cjs');
5
+ require('../../chunk-6TUNWGRJ.cjs');
5
6
  var chunkQ2GNEVG2_cjs = require('../../chunk-Q2GNEVG2.cjs');
6
7
  var chunkRLSBRZ6Z_cjs = require('../../chunk-RLSBRZ6Z.cjs');
7
8
  require('../../chunk-N73IMVFF.cjs');
8
- require('../../chunk-NDIKMOBJ.cjs');
9
- require('../../chunk-VOFNX4P6.cjs');
10
- require('../../chunk-EEIYXVM4.cjs');
9
+ require('../../chunk-7C77IBQZ.cjs');
11
10
  require('../../chunk-5NOZDH3F.cjs');
12
11
  require('../../chunk-S6A6FSG7.cjs');
12
+ require('../../chunk-VOFNX4P6.cjs');
13
13
  var react = require('react');
14
14
  var livekitClient = require('livekit-client');
15
15
  var componentsReact = require('@livekit/components-react');
@@ -123,8 +123,8 @@ function useCallTranscriber({
123
123
  const arbi = chunkQ2GNEVG2_cjs.useArbi();
124
124
  const queryClient = reactQuery.useQueryClient();
125
125
  const profile = arbi.isLoggedIn ? arbi.user.profile() : null;
126
- const myProfileName = profile && chunkTV4QQVZM_cjs.toProfileView(profile).fullName || null;
127
- const deploymentAvailable = chunkTV4QQVZM_cjs.useCallTranscriptionAvailable();
126
+ const myProfileName = profile && chunk524AFWK7_cjs.toProfileView(profile).fullName || null;
127
+ const deploymentAvailable = chunk524AFWK7_cjs.useCallTranscriptionAvailable();
128
128
  const available = deploymentAvailable && !!callKey;
129
129
  const [state, setState] = react.useState(null);
130
130
  const [creatorExtId, setCreatorExtId] = react.useState(null);
@@ -167,7 +167,7 @@ function useCallTranscriber({
167
167
  };
168
168
  }, [available, callExtId]);
169
169
  react.useEffect(
170
- () => chunkTV4QQVZM_cjs.onCallEvent("call.transcription", (message) => {
170
+ () => chunk524AFWK7_cjs.onCallEvent("call.transcription", (message) => {
171
171
  if (message.call_ext_id === callExtId) applyState(message);
172
172
  }),
173
173
  [callExtId, applyState]
@@ -183,7 +183,7 @@ function useCallTranscriber({
183
183
  const persist = react.useCallback(
184
184
  (segment, speakerNeedsProxy) => {
185
185
  if (!callKey || persisted.current.has(segment.segmentId)) return;
186
- const role = chunkTV4QQVZM_cjs.transcriptPersistRole({
186
+ const role = chunk524AFWK7_cjs.transcriptPersistRole({
187
187
  myIdentity,
188
188
  canPost: canPost && (segment.speakerIdentity !== myIdentity || selfPosts.current),
189
189
  hasCallKey: true,
@@ -192,7 +192,7 @@ function useCallTranscriber({
192
192
  });
193
193
  if (!role) return;
194
194
  persisted.current.add(segment.segmentId);
195
- chunkTV4QQVZM_cjs.persistTranscriptSegment(arbi, queryClient, callExtId, callKey, segment).catch(
195
+ chunk524AFWK7_cjs.persistTranscriptSegment(arbi, queryClient, callExtId, callKey, segment).catch(
196
196
  (err) => {
197
197
  persisted.current.delete(segment.segmentId);
198
198
  if (role === "own" && err?.status === 403) {
@@ -212,7 +212,7 @@ function useCallTranscriber({
212
212
  );
213
213
  react.useEffect(() => {
214
214
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
215
- if (topic === chunkTV4QQVZM_cjs.CALL_TRANSCRIPTION_TOPIC) {
215
+ if (topic === chunk524AFWK7_cjs.CALL_TRANSCRIPTION_TOPIC) {
216
216
  if (participant || participantIdentity) return;
217
217
  try {
218
218
  const next = browser.calls.transcriptionStateFrom(JSON.parse(new TextDecoder().decode(payload)));
@@ -221,10 +221,10 @@ function useCallTranscriber({
221
221
  }
222
222
  return;
223
223
  }
224
- if (topic !== chunkTV4QQVZM_cjs.CALL_CAPTION_TOPIC || !callKey) return;
224
+ if (topic !== chunk524AFWK7_cjs.CALL_CAPTION_TOPIC || !callKey) return;
225
225
  const identity = participant?.identity ?? participantIdentity;
226
226
  if (!identity || identity === myIdentity) return;
227
- void chunkTV4QQVZM_cjs.decodeCaptionPacket(payload, callKey).then((packet) => {
227
+ void chunk524AFWK7_cjs.decodeCaptionPacket(payload, callKey).then((packet) => {
228
228
  if (!packet || packet.identity !== identity) return;
229
229
  const name = participant?.name || packet.name || identity;
230
230
  const t = Math.min(packet.t, Date.now());
@@ -264,7 +264,7 @@ function useCallTranscriber({
264
264
  })) {
265
265
  return;
266
266
  }
267
- const segmentId = chunkTV4QQVZM_cjs.newSegmentId();
267
+ const segmentId = chunk524AFWK7_cjs.newSegmentId();
268
268
  const startedAt = new Date(segment.startedAt).toISOString();
269
269
  let text;
270
270
  try {
@@ -298,7 +298,7 @@ function useCallTranscriber({
298
298
  });
299
299
  try {
300
300
  await localParticipant.publishData(
301
- await chunkTV4QQVZM_cjs.encodeCaptionPacket(
301
+ await chunk524AFWK7_cjs.encodeCaptionPacket(
302
302
  {
303
303
  v: 1,
304
304
  segment_id: segmentId,
@@ -310,7 +310,7 @@ function useCallTranscriber({
310
310
  },
311
311
  callKey
312
312
  ),
313
- { reliable: true, topic: chunkTV4QQVZM_cjs.CALL_CAPTION_TOPIC }
313
+ { reliable: true, topic: chunk524AFWK7_cjs.CALL_CAPTION_TOPIC }
314
314
  );
315
315
  } catch (err) {
316
316
  console.warn("[calls] could not broadcast a caption", err);
@@ -425,14 +425,14 @@ function useCallRecorder({
425
425
  };
426
426
  }, [callExtId]);
427
427
  react.useEffect(
428
- () => chunkTV4QQVZM_cjs.onCallEvent("call.recording", (message) => {
428
+ () => chunk524AFWK7_cjs.onCallEvent("call.recording", (message) => {
429
429
  if (message.call_ext_id === callExtId) applyState(message);
430
430
  }),
431
431
  [callExtId, applyState]
432
432
  );
433
433
  react.useEffect(() => {
434
434
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
435
- if (topic !== chunkTV4QQVZM_cjs.CALL_RECORDING_TOPIC) return;
435
+ if (topic !== chunk524AFWK7_cjs.CALL_RECORDING_TOPIC) return;
436
436
  if (participant || participantIdentity) return;
437
437
  try {
438
438
  const next = browser.calls.recordingStateFrom(JSON.parse(new TextDecoder().decode(payload)));
@@ -453,7 +453,7 @@ function useCallRecorder({
453
453
  try {
454
454
  const row = call ?? await arbi.calls.get(callExtId);
455
455
  if (!row.workspace_locked && !row.chat_ext_id && callKey) {
456
- const ref = await chunkTV4QQVZM_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
456
+ const ref = await chunk524AFWK7_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
457
457
  if (ref.kind === "chat") setCall({ ...row, chat_ext_id: ref.chatExtId });
458
458
  }
459
459
  const answer = await arbi.calls.recording.start(callExtId, mode);
@@ -555,7 +555,7 @@ function useTrackUploader(recording, callKey, kind, mimeType) {
555
555
  const queryClient = reactQuery.useQueryClient();
556
556
  return react.useMemo(() => {
557
557
  if (!shouldCapture || !recordingExtId || !call) return null;
558
- return chunkTV4QQVZM_cjs.trackUploaderFor({
558
+ return chunk524AFWK7_cjs.trackUploaderFor({
559
559
  arbi,
560
560
  callExtId: call.external_id,
561
561
  recordingExtId,
@@ -563,7 +563,7 @@ function useTrackUploader(recording, callKey, kind, mimeType) {
563
563
  mimeType,
564
564
  recordingStartedAt: startedAt,
565
565
  linkVersion,
566
- conversationKey: () => chunkTV4QQVZM_cjs.conversationKeyForCall(arbi, queryClient, call, { callKey }),
566
+ conversationKey: () => chunk524AFWK7_cjs.conversationKeyForCall(arbi, queryClient, call, { callKey }),
567
567
  // The server stopped the recording at the quota (its state event says so too).
568
568
  onStopped: () => markStopped()
569
569
  });
@@ -612,10 +612,10 @@ function useInCallChat({
612
612
  react.useEffect(() => {
613
613
  if (!callKey) return;
614
614
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
615
- if (topic !== chunkTV4QQVZM_cjs.CALL_CHAT_TOPIC) return;
615
+ if (topic !== chunk524AFWK7_cjs.CALL_CHAT_TOPIC) return;
616
616
  const identity = participant?.identity ?? participantIdentity;
617
617
  if (!identity || identity === myIdentity) return;
618
- void chunkTV4QQVZM_cjs.decodeCallChatPacket(payload, callKey).then((packet) => {
618
+ void chunk524AFWK7_cjs.decodeCallChatPacket(payload, callKey).then((packet) => {
619
619
  if (!packet) return;
620
620
  const key = `${identity}:${packet.id}`;
621
621
  if (seen.current.has(key)) return;
@@ -645,7 +645,7 @@ function useInCallChat({
645
645
  if (!open || !canRead || historyRequested.current) return;
646
646
  historyRequested.current = true;
647
647
  setHistoryLoading(true);
648
- chunkTV4QQVZM_cjs.loadMeetingHistory(arbi, queryClient, callExtId).then((result) => {
648
+ chunk524AFWK7_cjs.loadMeetingHistory(arbi, queryClient, callExtId).then((result) => {
649
649
  if (!result) return;
650
650
  setMeetingChat(result.ref);
651
651
  setHistory(result.messages);
@@ -656,13 +656,13 @@ function useInCallChat({
656
656
  }, [open, canRead, callExtId]);
657
657
  const send = react.useCallback(
658
658
  async (raw) => {
659
- const text = raw.trim().slice(0, chunkTV4QQVZM_cjs.CALL_CHAT_MAX_CHARS);
659
+ const text = raw.trim().slice(0, chunk524AFWK7_cjs.CALL_CHAT_MAX_CHARS);
660
660
  if (!text || !callKey || readOnly) return;
661
- const id = chunkTV4QQVZM_cjs.newPacketId();
661
+ const id = chunk524AFWK7_cjs.newPacketId();
662
662
  const at = Date.now();
663
663
  await localParticipant.publishData(
664
- await chunkTV4QQVZM_cjs.encodeCallChatPacket({ v: 1, id, text, at }, callKey),
665
- { reliable: true, topic: chunkTV4QQVZM_cjs.CALL_CHAT_TOPIC }
664
+ await chunk524AFWK7_cjs.encodeCallChatPacket({ v: 1, id, text, at }, callKey),
665
+ { reliable: true, topic: chunk524AFWK7_cjs.CALL_CHAT_TOPIC }
666
666
  );
667
667
  setLive((prev) => [
668
668
  ...prev,
@@ -681,7 +681,7 @@ function useInCallChat({
681
681
  (prev) => prev.map((l) => l.id === id && l.senderIdentity === myIdentity ? { ...l, status } : l)
682
682
  );
683
683
  try {
684
- setMeetingChat(await chunkTV4QQVZM_cjs.persistMeetingMessage(arbi, queryClient, callExtId, callKey, text));
684
+ setMeetingChat(await chunk524AFWK7_cjs.persistMeetingMessage(arbi, queryClient, callExtId, callKey, text));
685
685
  mark("saved");
686
686
  } catch (err) {
687
687
  console.warn("[calls] could not keep the message in the meeting chat", err);
@@ -693,7 +693,7 @@ function useInCallChat({
693
693
  const openMeeting = react.useCallback(async () => {
694
694
  if (!callKey) return;
695
695
  try {
696
- const ref = meetingChat ?? await chunkTV4QQVZM_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
696
+ const ref = meetingChat ?? await chunk524AFWK7_cjs.ensureMeetingChat(arbi, queryClient, callExtId, callKey);
697
697
  setMeetingChat(ref);
698
698
  openMeetingChat?.(ref);
699
699
  } catch (err) {
@@ -701,7 +701,7 @@ function useInCallChat({
701
701
  }
702
702
  }, [callExtId, callKey, meetingChat]);
703
703
  const lines = react.useMemo(
704
- () => chunkTV4QQVZM_cjs.mergeChatLines(history, live, {
704
+ () => chunk524AFWK7_cjs.mergeChatLines(history, live, {
705
705
  myIdentity,
706
706
  nameOf: (identity) => identity === myIdentity ? localParticipant.name || "You" : room.remoteParticipants.get(identity)?.name || null
707
707
  }),
@@ -760,7 +760,7 @@ function useWebinar({
760
760
  const n = ++questionsRead.current;
761
761
  try {
762
762
  const rows = await webinarApi().questions.list(callExtId, linkVersion);
763
- const opened = await Promise.all(rows.map((q) => chunkTV4QQVZM_cjs.openQuestion(q, callKey)));
763
+ const opened = await Promise.all(rows.map((q) => chunk524AFWK7_cjs.openQuestion(q, callKey)));
764
764
  if (n === questionsRead.current) setQuestions(opened);
765
765
  } catch (err) {
766
766
  console.warn("[calls] could not load the questions", err);
@@ -772,7 +772,7 @@ function useWebinar({
772
772
  }, [refresh, refreshQuestions]);
773
773
  react.useEffect(() => {
774
774
  if (!enabled) return;
775
- return chunkTV4QQVZM_cjs.onCallEvent("call.webinar", (m) => {
775
+ return chunk524AFWK7_cjs.onCallEvent("call.webinar", (m) => {
776
776
  if (m.call_ext_id !== callExtId) return;
777
777
  setState((s) => s ? { ...s, live: m.live, chat: m.chat } : s);
778
778
  });
@@ -781,8 +781,8 @@ function useWebinar({
781
781
  react.useEffect(() => {
782
782
  if (!enabled) return;
783
783
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
784
- if (topic !== chunkTV4QQVZM_cjs.CALL_WEBINAR_TOPIC) return;
785
- const packet = chunkTV4QQVZM_cjs.parseWebinarPacket(payload, !!(participant || participantIdentity));
784
+ if (topic !== chunk524AFWK7_cjs.CALL_WEBINAR_TOPIC) return;
785
+ const packet = chunk524AFWK7_cjs.parseWebinarPacket(payload, !!(participant || participantIdentity));
786
786
  if (!packet) return;
787
787
  switch (packet.type) {
788
788
  case "state":
@@ -803,7 +803,7 @@ function useWebinar({
803
803
  return;
804
804
  case "demoted":
805
805
  setStageCheck(false);
806
- chunkTV4QQVZM_cjs.markRejoining(callExtId);
806
+ chunk524AFWK7_cjs.markRejoining(callExtId);
807
807
  if (fallback.current) clearTimeout(fallback.current);
808
808
  fallback.current = setTimeout(() => void room.disconnect(), DEMOTE_REJOIN_FALLBACK_MS);
809
809
  return;
@@ -830,12 +830,12 @@ function useWebinar({
830
830
  [callExtId, linkVersion]
831
831
  );
832
832
  const stepDown = react.useCallback(async () => {
833
- chunkTV4QQVZM_cjs.markRejoining(callExtId);
833
+ chunk524AFWK7_cjs.markRejoining(callExtId);
834
834
  setStageCheck(false);
835
835
  try {
836
836
  await webinarApi().demote(callExtId, myIdentity, linkVersion);
837
837
  } catch (err) {
838
- chunkTV4QQVZM_cjs.markRejoining(callExtId, false);
838
+ chunk524AFWK7_cjs.markRejoining(callExtId, false);
839
839
  failed("leave the stage")(err);
840
840
  }
841
841
  }, [callExtId, myIdentity, linkVersion]);
@@ -895,7 +895,7 @@ function useWebinar({
895
895
  if (!callKey) throw new Error("This call has no key.");
896
896
  await webinarApi().questions.ask(
897
897
  callExtId,
898
- await chunkTV4QQVZM_cjs.sealQuestionText(text, callKey),
898
+ await chunk524AFWK7_cjs.sealQuestionText(text, callKey),
899
899
  linkVersion
900
900
  );
901
901
  }, "ask the question"),
@@ -909,7 +909,7 @@ function useWebinar({
909
909
  await webinarApi().questions.update(
910
910
  callExtId,
911
911
  id,
912
- { answer: await chunkTV4QQVZM_cjs.sealQuestionText(text, callKey) },
912
+ { answer: await chunk524AFWK7_cjs.sealQuestionText(text, callKey) },
913
913
  linkVersion
914
914
  );
915
915
  }, "answer the question"),
@@ -939,15 +939,15 @@ function useWebinar({
939
939
  function useHostMuteNotice(callExtId) {
940
940
  const room = componentsReact.useRoomContext();
941
941
  react.useEffect(() => {
942
- const notifyMuted = chunkTV4QQVZM_cjs.createMutedNotifier((text) => chunkRLSBRZ6Z_cjs.notify.info(text));
942
+ const notifyMuted = chunk524AFWK7_cjs.createMutedNotifier((text) => chunkRLSBRZ6Z_cjs.notify.info(text));
943
943
  const onData = (payload, participant, _kind, topic, _encryption, participantIdentity) => {
944
- if (topic !== chunkTV4QQVZM_cjs.CALL_MODERATION_TOPIC) return;
944
+ if (topic !== chunk524AFWK7_cjs.CALL_MODERATION_TOPIC) return;
945
945
  if (participant || participantIdentity) return;
946
- const notice = chunkTV4QQVZM_cjs.mutedNoticeFromPacket(payload);
946
+ const notice = chunk524AFWK7_cjs.mutedNoticeFromPacket(payload);
947
947
  if (notice) notifyMuted(notice);
948
948
  };
949
949
  room.on(livekitClient.RoomEvent.DataReceived, onData);
950
- const offWs = chunkTV4QQVZM_cjs.onCallEvent("call.muted", (message) => {
950
+ const offWs = chunk524AFWK7_cjs.onCallEvent("call.muted", (message) => {
951
951
  if (message.callExtId === callExtId) notifyMuted(message);
952
952
  });
953
953
  return () => {