@stll/folio-vue 0.34.3 → 0.36.0

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, c as t, d as n, i as r, l as i, o as a, r as o, s, t as c, u as l } from "./useZoom-BmnLgNs0.js";
1
+ import { a as e, c as t, d as n, i as r, l as i, o as a, r as o, s, t as c, u as l } from "./useZoom-DknlzjRk.js";
2
2
  import { S as u, a as d, b as f, g as p, m, n as h, r as g, v as _, x as v, y } from "./folio-ui-ctJdVP-s.js";
3
3
  import { t as ee } from "./zIndex-FOGfTBdc.js";
4
4
  import { S as te, T as ne, _ as re, d as ie, i as ae, n as oe, r as b, t as se, w as ce } from "./StylePicker-F3cLPvRE.js";
@@ -100,9 +100,11 @@ import { buildPositionalText as Zr } from "@stll/folio-core/ai-suggestions/text-
100
100
  import { setAISuggestionsMeta as Qr, setFocusedSuggestionMeta as $r } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
101
101
  import { getFolioCaretViewportRect as ei, getFolioSelectionViewportRect as ti } from "@stll/folio-core/paged-layout/selectionViewportRect";
102
102
  import { createAICitationDecorationsPlugin as ni, setAICitationsMeta as ri, setActiveCitationMeta as ii } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
103
- import { fromMarkdown as ai, toMarkdown as oi, toMarkdownResult as si } from "@stll/folio-core/markdown";
103
+ import { configureTiffDecoding as ai } from "@stll/folio-core/tiff-decoding";
104
+ import { HYPHENATION_DICTIONARY_IDS as oi, HyphenationDictionaryError as si, configureHyphenationAssets as ci, preloadHyphenationDictionaries as li } from "@stll/folio-core/hyphenation";
105
+ import { fromMarkdown as ui, toMarkdown as di, toMarkdownResult as fi } from "@stll/folio-core/markdown";
104
106
  // src/composables/documentChrome.ts
105
- var ci = (e) => {
107
+ var pi = (e) => {
106
108
  if (!e) return {
107
109
  sectionProperties: null,
108
110
  watermark: void 0,
@@ -116,20 +118,20 @@ var ci = (e) => {
116
118
  };
117
119
  };
118
120
  // src/composables/commentMarks.ts
119
- function li(e, t) {
121
+ function mi(e, t) {
120
122
  let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
121
123
  return n === r ? null : {
122
124
  from: n,
123
125
  to: r
124
126
  };
125
127
  }
126
- function ui({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
128
+ function hi({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
127
129
  let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
128
- return i ? li(e, i) : null;
130
+ return i ? mi(e, i) : null;
129
131
  }
130
132
  // src/composables/useCommentLifecycle.ts
131
- var di = 408, fi = 12;
132
- function pi(e) {
133
+ var gi = 408, _i = 12;
134
+ function vi(e) {
133
135
  let t = P(!1), n = P(null), r = P(null), i = P(null), a = P(null);
134
136
  function o(t) {
135
137
  let n = e.editorView.value, r = e.pagesContainer.value;
@@ -162,7 +164,7 @@ function pi(e) {
162
164
  r.value = null;
163
165
  return;
164
166
  }
165
- let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + fi : l.width / 2 + di;
167
+ let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + _i : l.width / 2 + gi;
166
168
  r.value = {
167
169
  top: c.top - l.top,
168
170
  left: Math.max(16, Math.min(d, l.width - 16)),
@@ -173,7 +175,7 @@ function pi(e) {
173
175
  function c() {
174
176
  let s = e.editorView.value;
175
177
  if (!s) return;
176
- let c = r.value, l = s.state.selection, u = ui({
178
+ let c = r.value, l = s.state.selection, u = hi({
177
179
  docSize: s.state.doc.content.size,
178
180
  capturedRange: c ? {
179
181
  from: c.from,
@@ -210,7 +212,7 @@ function pi(e) {
210
212
  };
211
213
  }
212
214
  // src/composables/useCommentManagement.ts
213
- function mi(e) {
215
+ function yi(e) {
214
216
  let t = Nt(), n = P([]), r = P(!1);
215
217
  function i() {
216
218
  r.value = !0;
@@ -401,7 +403,7 @@ function mi(e) {
401
403
  };
402
404
  }
403
405
  // src/utils/imageClipboard.ts
404
- function hi(e, t) {
406
+ function bi(e, t) {
405
407
  let n = e.state.doc.nodeAt(t);
406
408
  if (!n || n.type.name !== "image") return;
407
409
  let r = n.attrs.src;
@@ -415,7 +417,7 @@ function hi(e, t) {
415
417
  e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
416
418
  });
417
419
  }
418
- function gi(e) {
420
+ function xi(e) {
419
421
  return new Promise((t, n) => {
420
422
  let r = new FileReader();
421
423
  r.onload = () => {
@@ -423,7 +425,7 @@ function gi(e) {
423
425
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
424
426
  });
425
427
  }
426
- function _i(e) {
428
+ function Si(e) {
427
429
  return new Promise((t) => {
428
430
  let n = new Image();
429
431
  n.onload = () => t({
@@ -435,7 +437,7 @@ function _i(e) {
435
437
  }), n.src = e;
436
438
  });
437
439
  }
438
- function vi(e, t, n, r) {
440
+ function Ci(e, t, n, r) {
439
441
  let i = e.state.schema.nodes.image;
440
442
  if (!i) return;
441
443
  let a = i.create({
@@ -448,21 +450,21 @@ function vi(e, t, n, r) {
448
450
  }), o = e.state.tr.replaceSelectionWith(a);
449
451
  e.dispatch(o);
450
452
  }
451
- async function yi(e) {
453
+ async function wi(e) {
452
454
  try {
453
455
  let t = await navigator.clipboard.read();
454
456
  for (let n of t) {
455
457
  let t = n.types.find((e) => e.startsWith("image/"));
456
458
  if (t) {
457
- let r = await gi(await n.getType(t)), i = await _i(r), a = i.width, o = i.height;
458
- a > 612 && (o = Math.round(612 / a * o), a = 612), vi(e, r, a, o);
459
+ let r = await xi(await n.getType(t)), i = await Si(r), a = i.width, o = i.height;
460
+ a > 612 && (o = Math.round(612 / a * o), a = 612), Ci(e, r, a, o);
459
461
  return;
460
462
  }
461
463
  if (n.types.includes("text/html")) {
462
464
  let t = await n.getType("text/html"), r = await Xt(t), i = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(r)?.groups?.src;
463
465
  if (i) {
464
466
  let t = /data-width="(?<w>\d+)"/u.exec(r)?.groups?.w, n = /data-height="(?<h>\d+)"/u.exec(r)?.groups?.h, a = t ? Number(t) : 200, o = n ? Number(n) : 200;
465
- vi(e, i, a || 200, o || 200);
467
+ Ci(e, i, a || 200, o || 200);
466
468
  return;
467
469
  }
468
470
  }
@@ -483,14 +485,14 @@ async function yi(e) {
483
485
  }
484
486
  }
485
487
  }
486
- function bi(e, t) {
488
+ function Ti(e, t) {
487
489
  let n = e.state.doc.nodeAt(t);
488
490
  if (!n || n.type.name !== "image") return;
489
491
  let r = document.createElement("input");
490
492
  r.type = "file", r.accept = "image/*", r.onchange = async () => {
491
493
  let i = r.files?.[0];
492
494
  if (!i) return;
493
- let a = await gi(i), o = await _i(a), s = n.attrs.width, c = n.attrs.height, l = typeof s == "number" ? s : o.width, u = typeof c == "number" ? c : o.height, d = Math.min(l / o.width, u / o.height), f = Math.round(o.width * d), p = Math.round(o.height * d);
495
+ let a = await xi(i), o = await Si(a), s = n.attrs.width, c = n.attrs.height, l = typeof s == "number" ? s : o.width, u = typeof c == "number" ? c : o.height, d = Math.min(l / o.width, u / o.height), f = Math.round(o.width * d), p = Math.round(o.height * d);
494
496
  try {
495
497
  let r = e.state.tr.setNodeMarkup(t, void 0, {
496
498
  ...n.attrs,
@@ -504,7 +506,7 @@ function bi(e, t) {
504
506
  }, r.click();
505
507
  }
506
508
  // src/composables/useContextMenus.ts
507
- var xi = /* @__PURE__ */ new Set([
509
+ var Ei = /* @__PURE__ */ new Set([
508
510
  "inline",
509
511
  "square",
510
512
  "tight",
@@ -513,16 +515,16 @@ var xi = /* @__PURE__ */ new Set([
513
515
  "behind",
514
516
  "inFront"
515
517
  ]);
516
- function Si(e) {
517
- return typeof e == "string" && xi.has(e);
518
+ function Di(e) {
519
+ return typeof e == "string" && Ei.has(e);
518
520
  }
519
- function Ci(e) {
520
- return Si(e) ? e : "inline";
521
+ function Oi(e) {
522
+ return Di(e) ? e : "inline";
521
523
  }
522
- function wi(e) {
524
+ function ki(e) {
523
525
  return e === "left" || e === "right" || e === "none" ? e : null;
524
526
  }
525
- function Ti(e) {
527
+ function Ai(e) {
526
528
  let { t } = u(), n = P({
527
529
  isOpen: !1,
528
530
  position: {
@@ -597,7 +599,7 @@ function Ti(e) {
597
599
  r.value = c(o, i, {
598
600
  x: t.clientX,
599
601
  y: t.clientY
600
- }, Ci(s.attrs.wrapType), wi(s.attrs.cssFloat)), n.value.isOpen = !1;
602
+ }, Oi(s.attrs.wrapType), ki(s.attrs.cssFloat)), n.value.isOpen = !1;
601
603
  return;
602
604
  }
603
605
  }
@@ -633,7 +635,7 @@ function Ti(e) {
633
635
  o && o.type.name === "image" && (r.value = c(a.element, a.pmPos, {
634
636
  x: t.clientX,
635
637
  y: t.clientY
636
- }, Ci(o.attrs.wrapType), wi(o.attrs.cssFloat)), n.value.isOpen = !1);
638
+ }, Oi(o.attrs.wrapType), ki(o.attrs.cssFloat)), n.value.isOpen = !1);
637
639
  }
638
640
  function f(t) {
639
641
  let n = e.editorView.value, i = r.value;
@@ -656,7 +658,7 @@ function Ti(e) {
656
658
  case "cut":
657
659
  if (e.selectedImage.value) {
658
660
  let t = e.selectedImage.value.pmPos;
659
- hi(n, t);
661
+ bi(n, t);
660
662
  let r = n.state.doc.nodeAt(t);
661
663
  r && U(n, Jt({
662
664
  from: t,
@@ -666,10 +668,10 @@ function Ti(e) {
666
668
  } else n.focus(), document.execCommand("cut");
667
669
  break;
668
670
  case "copy":
669
- e.selectedImage.value ? (hi(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
671
+ e.selectedImage.value ? (bi(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
670
672
  break;
671
673
  case "paste":
672
- yi(n).then(() => e.onPaste?.()).catch(() => void 0);
674
+ wi(n).then(() => e.onPaste?.()).catch(() => void 0);
673
675
  break;
674
676
  case "pasteAsPlainText":
675
677
  navigator.clipboard.readText().then((t) => {
@@ -694,7 +696,7 @@ function Ti(e) {
694
696
  e.selectedImage.value && (e.showImageProperties.value = !0);
695
697
  break;
696
698
  case "replaceImage":
697
- e.selectedImage.value && bi(n, e.selectedImage.value.pmPos);
699
+ e.selectedImage.value && Ti(n, e.selectedImage.value.pmPos);
698
700
  break;
699
701
  case "deleteImage":
700
702
  if (e.selectedImage.value) {
@@ -739,7 +741,7 @@ function Ti(e) {
739
741
  };
740
742
  }
741
743
  // src/composables/useDocumentLifecycle.ts
742
- function Ei(e) {
744
+ function ji(e) {
743
745
  async function t(t) {
744
746
  e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
745
747
  }
@@ -757,19 +759,19 @@ function Ei(e) {
757
759
  });
758
760
  }
759
761
  // src/composables/useDocxEditorRefApi.ts
760
- var Di = async (e, t) => {
762
+ var Mi = async (e, t) => {
761
763
  let n = await e.saveDocument(t);
762
764
  if (!n) return null;
763
765
  let r = await n.arrayBuffer();
764
766
  return e.clearCommentsDirty(), e.onSave?.(r), r;
765
767
  };
766
- function Oi(e) {
768
+ function Ni(e) {
767
769
  let t = new hn();
768
770
  function n() {
769
771
  e.onPrint?.(), window.print();
770
772
  }
771
773
  function r(t) {
772
- return Di({
774
+ return Mi({
773
775
  clearCommentsDirty: e.clearCommentsDirty,
774
776
  onSave: e.onSave,
775
777
  saveDocument: e.saveDocument
@@ -1189,10 +1191,10 @@ function Oi(e) {
1189
1191
  } };
1190
1192
  }
1191
1193
  // src/utils/fontFaces.ts
1192
- function ki() {
1194
+ function Pi() {
1193
1195
  return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
1194
1196
  }
1195
- async function Ai(e, t, n, r) {
1197
+ async function Fi(e, t, n, r) {
1196
1198
  let i;
1197
1199
  try {
1198
1200
  i = new FontFace(t, n, r), e.add(i);
@@ -1201,26 +1203,26 @@ async function Ai(e, t, n, r) {
1201
1203
  }
1202
1204
  return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
1203
1205
  }
1204
- function ji(e) {
1205
- let t = ki();
1206
+ function Ii(e) {
1207
+ let t = Pi();
1206
1208
  if (t) for (let n of e) t.delete(n);
1207
1209
  }
1208
1210
  // src/utils/embeddedFonts.ts
1209
- var Mi = {
1211
+ var Li = {
1210
1212
  faces: [],
1211
1213
  familyMap: /* @__PURE__ */ new Map()
1212
1214
  };
1213
- async function Ni(e) {
1214
- let t = ki();
1215
- if (!t) return Mi;
1215
+ async function Ri(e) {
1216
+ let t = Pi();
1217
+ if (!t) return Li;
1216
1218
  let n;
1217
1219
  try {
1218
1220
  n = await rr(e);
1219
1221
  } catch {
1220
- return Mi;
1222
+ return Li;
1221
1223
  }
1222
1224
  return {
1223
- faces: (await Promise.all(n.map((e) => Ai(t, e.family, e.bytes, {
1225
+ faces: (await Promise.all(n.map((e) => Fi(t, e.family, e.bytes, {
1224
1226
  weight: String(e.weight),
1225
1227
  style: e.style
1226
1228
  })))).filter((e) => e !== null),
@@ -1228,17 +1230,17 @@ async function Ni(e) {
1228
1230
  };
1229
1231
  }
1230
1232
  // src/utils/hostFonts.ts
1231
- function Pi(e) {
1233
+ function zi(e) {
1232
1234
  return typeof e == "string" && e.trim().length > 0;
1233
1235
  }
1234
- function Fi(e) {
1235
- return typeof e != "object" || !e ? !1 : Pi(Reflect.get(e, "family")) && Pi(Reflect.get(e, "src"));
1236
+ function Bi(e) {
1237
+ return typeof e != "object" || !e ? !1 : zi(Reflect.get(e, "family")) && zi(Reflect.get(e, "src"));
1236
1238
  }
1237
- function Ii(e) {
1239
+ function Vi(e) {
1238
1240
  if (!e) return [];
1239
1241
  let t = [];
1240
1242
  for (let n of e) {
1241
- if (!Fi(n)) continue;
1243
+ if (!Bi(n)) continue;
1242
1244
  let e = { display: "swap" };
1243
1245
  (typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
1244
1246
  family: n.family.trim(),
@@ -1248,19 +1250,19 @@ function Ii(e) {
1248
1250
  }
1249
1251
  return t;
1250
1252
  }
1251
- async function Li(e) {
1252
- let t = ki();
1253
+ async function Hi(e) {
1254
+ let t = Pi();
1253
1255
  if (!t) return [];
1254
- let n = Ii(e);
1255
- return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => Ai(t, e, n, r)))).filter((e) => e !== null);
1256
+ let n = Vi(e);
1257
+ return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => Fi(t, e, n, r)))).filter((e) => e !== null);
1256
1258
  }
1257
1259
  // src/composables/useFontLifecycle.ts
1258
- var Ri = {
1259
- loadEmbedded: Ni,
1260
- loadHost: Li,
1261
- remove: ji
1260
+ var Ui = {
1261
+ loadEmbedded: Ri,
1262
+ loadHost: Hi,
1263
+ remove: Ii
1262
1264
  };
1263
- function zi(e, t = Ri) {
1265
+ function Wi(e, t = Ui) {
1264
1266
  R(() => e.isReady.value ? e.sourceBuffer() : null, (n, r, i) => {
1265
1267
  if (!n) return;
1266
1268
  let a = !1, o = [], s = !1;
@@ -1283,7 +1285,7 @@ function zi(e, t = Ri) {
1283
1285
  }, { immediate: !0 });
1284
1286
  }
1285
1287
  // src/composables/useFormattingActions.ts
1286
- function Bi(e) {
1288
+ function Gi(e) {
1287
1289
  let t = () => e.activeView?.value ?? e.editorView.value;
1288
1290
  function n() {
1289
1291
  let e = t();
@@ -1329,7 +1331,7 @@ function Bi(e) {
1329
1331
  };
1330
1332
  }
1331
1333
  // src/composables/useHyperlinkManagement.ts
1332
- function Vi(e) {
1334
+ function Ki(e) {
1333
1335
  let t = P(null);
1334
1336
  function n(t) {
1335
1337
  let n = e.editorView.value;
@@ -1379,7 +1381,7 @@ function Vi(e) {
1379
1381
  };
1380
1382
  }
1381
1383
  // src/composables/useImageActions.ts
1382
- function Hi(e) {
1384
+ function qi(e) {
1383
1385
  let t = Se(null), n = P(!1), r = S(() => {
1384
1386
  e.stateTick.value;
1385
1387
  let n = e.editorView.value, r = t.value;
@@ -1425,7 +1427,7 @@ function Hi(e) {
1425
1427
  };
1426
1428
  }
1427
1429
  // src/composables/useKeyboardShortcuts.ts
1428
- function Ui(e) {
1430
+ function Ji(e) {
1429
1431
  function t(t) {
1430
1432
  if (Ke(t, {
1431
1433
  scope: e.scope(),
@@ -1440,7 +1442,7 @@ function Ui(e) {
1440
1442
  return ve(() => window.addEventListener("keydown", t)), _e(() => window.removeEventListener("keydown", t)), { handleKeyDown: t };
1441
1443
  }
1442
1444
  // src/composables/useOutlineSidebar.ts
1443
- function Wi(e) {
1445
+ function Yi(e) {
1444
1446
  function t() {
1445
1447
  let t = e.editorView.value;
1446
1448
  t && (e.outlineHeadings.value = hr(t.state.doc, it(t.state)));
@@ -1473,7 +1475,7 @@ function Wi(e) {
1473
1475
  };
1474
1476
  }
1475
1477
  // src/composables/usePageSetupControls.ts
1476
- function Gi(e) {
1478
+ function Xi(e) {
1477
1479
  function t(t) {
1478
1480
  if (e.readOnly.value) return;
1479
1481
  let n = e.applySectionProperties?.(t);
@@ -1542,33 +1544,33 @@ function Gi(e) {
1542
1544
  };
1543
1545
  }
1544
1546
  // src/utils/textSelection.ts
1545
- var Ki = /[\p{L}\p{N}\p{M}_''-]/u, qi = /\s/;
1546
- function Ji(e) {
1547
- return !e || e.length === 0 ? !1 : Ki.test(e);
1547
+ var Zi = /[\p{L}\p{N}\p{M}_''-]/u, Qi = /\s/;
1548
+ function $i(e) {
1549
+ return !e || e.length === 0 ? !1 : Zi.test(e);
1548
1550
  }
1549
- function Yi(e) {
1550
- return !e || e.length === 0 ? !1 : qi.test(e);
1551
+ function ea(e) {
1552
+ return !e || e.length === 0 ? !1 : Qi.test(e);
1551
1553
  }
1552
- function Xi(e, t) {
1554
+ function ta(e, t) {
1553
1555
  if (!e || e.length === 0) return [0, 0];
1554
1556
  t = Math.max(0, Math.min(t, e.length - 1));
1555
1557
  let n = e[t];
1556
- if (Yi(n)) {
1558
+ if (ea(n)) {
1557
1559
  let n = t, r = t;
1558
- for (; n > 0 && Yi(e[n - 1]);) n--;
1559
- for (; r < e.length && Yi(e[r]);) r++;
1560
+ for (; n > 0 && ea(e[n - 1]);) n--;
1561
+ for (; r < e.length && ea(e[r]);) r++;
1560
1562
  return [n, r];
1561
1563
  }
1562
- if (Ji(n)) {
1564
+ if ($i(n)) {
1563
1565
  let n = t, r = t;
1564
- for (; n > 0 && Ji(e[n - 1]);) n--;
1565
- for (; r < e.length && Ji(e[r]);) r++;
1566
+ for (; n > 0 && $i(e[n - 1]);) n--;
1567
+ for (; r < e.length && $i(e[r]);) r++;
1566
1568
  return [n, r];
1567
1569
  }
1568
1570
  return [t, t + 1];
1569
1571
  }
1570
1572
  // src/utils/domQueries.ts
1571
- function Zi(e, t, n) {
1573
+ function na(e, t, n) {
1572
1574
  let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span${Tt}`)) : Fe(e);
1573
1575
  for (let e of r) {
1574
1576
  let n = Dt(e) ?? NaN, r = Et(e) ?? NaN;
@@ -1576,24 +1578,24 @@ function Zi(e, t, n) {
1576
1578
  }
1577
1579
  return null;
1578
1580
  }
1579
- function Qi(e, t) {
1581
+ function ra(e, t) {
1580
1582
  e && Er(e, t);
1581
1583
  }
1582
- function $i(e, t, n, r) {
1584
+ function ia(e, t, n, r) {
1583
1585
  if (!e || !t) return null;
1584
1586
  let i = Cr(e, n, r, 1);
1585
1587
  return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
1586
1588
  }
1587
- function ea(e, t, n, r) {
1589
+ function aa(e, t, n, r) {
1588
1590
  if (!e) return;
1589
- let i = Zi(e, t, r);
1591
+ let i = na(e, t, r);
1590
1592
  if (!i) return;
1591
- let a = i.textContent ?? "", o = Dt(i) || 0, [s, c] = Xi(a, t - o), l = o + s, u = o + c;
1593
+ let a = i.textContent ?? "", o = Dt(i) || 0, [s, c] = ta(a, t - o), l = o + s, u = o + c;
1592
1594
  l < u && n(l, u);
1593
1595
  }
1594
- function ta(e, t, n, r) {
1596
+ function oa(e, t, n, r) {
1595
1597
  if (!e) return;
1596
- let i = Zi(e, t, r);
1598
+ let i = na(e, t, r);
1597
1599
  if (!i) return;
1598
1600
  let a = i.closest(".layout-paragraph");
1599
1601
  if (!a) return;
@@ -1601,11 +1603,11 @@ function ta(e, t, n, r) {
1601
1603
  !Number.isNaN(o) && !Number.isNaN(s) && o < s && n(o, s);
1602
1604
  }
1603
1605
  // src/utils/listItems.ts
1604
- var na = (e, t) => t > 0 ? e[t - 1] : void 0, ra = ({ clientX: e, clientY: t, viewport: n }) => ({
1606
+ var sa = (e, t) => t > 0 ? e[t - 1] : void 0, ca = ({ clientX: e, clientY: t, viewport: n }) => ({
1605
1607
  left: e - n.left,
1606
1608
  top: t - n.top
1607
- }), ia = 500;
1608
- function aa(t) {
1609
+ }), la = 500;
1610
+ function ua(t) {
1609
1611
  let n = P(null), r = null;
1610
1612
  function i() {
1611
1613
  r !== null && (clearTimeout(r), r = null);
@@ -1623,7 +1625,7 @@ function aa(t) {
1623
1625
  visible: !1
1624
1626
  }), m = null;
1625
1627
  function h(e, n) {
1626
- return $i(t.pagesRef.value, t.editorView.value, e, n);
1628
+ return ia(t.pagesRef.value, t.editorView.value, e, n);
1627
1629
  }
1628
1630
  function g() {
1629
1631
  let e = a.value;
@@ -1649,13 +1651,13 @@ function aa(t) {
1649
1651
  } catch {}
1650
1652
  }
1651
1653
  function y(e) {
1652
- Qi(t.pagesRef.value, e);
1654
+ ra(t.pagesRef.value, e);
1653
1655
  }
1654
1656
  function ee(e) {
1655
- ea(t.pagesRef.value, e, v, a.value?.position);
1657
+ aa(t.pagesRef.value, e, v, a.value?.position);
1656
1658
  }
1657
1659
  function te(e) {
1658
- ta(t.pagesRef.value, e, v, a.value?.position);
1660
+ oa(t.pagesRef.value, e, v, a.value?.position);
1659
1661
  }
1660
1662
  function ne(e) {
1661
1663
  let n = t.editorView.value;
@@ -1697,7 +1699,7 @@ function aa(t) {
1697
1699
  }, yr));
1698
1700
  return;
1699
1701
  }
1700
- let u = ra({
1702
+ let u = ca({
1701
1703
  clientX: c.clientX,
1702
1704
  clientY: c.clientY,
1703
1705
  viewport: s.getBoundingClientRect()
@@ -1734,7 +1736,7 @@ function aa(t) {
1734
1736
  if (a && a.state.selection.from !== a.state.selection.to) return;
1735
1737
  let o = t.pagesViewportRef.value;
1736
1738
  if (!o) return;
1737
- let s = r.getBoundingClientRect(), c = ra({
1739
+ let s = r.getBoundingClientRect(), c = ca({
1738
1740
  clientX: s.left,
1739
1741
  clientY: s.bottom,
1740
1742
  viewport: o.getBoundingClientRect()
@@ -1765,7 +1767,7 @@ function aa(t) {
1765
1767
  if (!l?.package) return;
1766
1768
  let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = pn(l.package), p = f.hasTitlePg && d === 1, m = fn(f, c, p);
1767
1769
  if (!m) {
1768
- let e = t.layout.value?.pages, n = e === void 0 ? void 0 : na(e, d)?.sectionIndex, r = gr({
1770
+ let e = t.layout.value?.pages, n = e === void 0 ? void 0 : sa(e, d)?.sectionIndex, r = gr({
1769
1771
  document: l,
1770
1772
  position: c,
1771
1773
  referenceType: p ? "first" : "default",
@@ -1786,7 +1788,7 @@ function aa(t) {
1786
1788
  position: c,
1787
1789
  rId: h,
1788
1790
  targetRect: {
1789
- ...ra({
1791
+ ...ca({
1790
1792
  clientX: _.left,
1791
1793
  clientY: _.top,
1792
1794
  viewport: v
@@ -1844,7 +1846,7 @@ function aa(t) {
1844
1846
  ...e,
1845
1847
  pageNumber: t,
1846
1848
  targetRect: {
1847
- ...ra({
1849
+ ...ca({
1848
1850
  clientX: i.left,
1849
1851
  clientY: i.top,
1850
1852
  viewport: s
@@ -1883,7 +1885,7 @@ function aa(t) {
1883
1885
  return;
1884
1886
  }
1885
1887
  let h = Date.now();
1886
- if (h - o < ia && s === m ? c++ : c = 1, o = h, s = m, c === 2) ee(m);
1888
+ if (h - o < la && s === m ? c++ : c = 1, o = h, s = m, c === 2) ee(m);
1887
1889
  else if (c >= 3) te(m), c = 0;
1888
1890
  else if (e.shiftKey) {
1889
1891
  let { from: e } = f.state.selection;
@@ -1955,18 +1957,18 @@ function aa(t) {
1955
1957
  };
1956
1958
  }
1957
1959
  // src/composables/usePortalClass.ts
1958
- var oa = Symbol("docx-portal-class");
1959
- function sa(e) {
1960
- be(oa, S(() => ({
1960
+ var da = Symbol("docx-portal-class");
1961
+ function fa(e) {
1962
+ be(da, S(() => ({
1961
1963
  "ep-root": !0,
1962
1964
  dark: !!L(e)
1963
1965
  })));
1964
1966
  }
1965
- function ca() {
1966
- return me(oa, S(() => ({ "ep-root": !0 })));
1967
+ function pa() {
1968
+ return me(da, S(() => ({ "ep-root": !0 })));
1967
1969
  }
1968
1970
  // src/composables/useRemoteSelectionSync.ts
1969
- var la = (e) => {
1971
+ var ma = (e) => {
1970
1972
  let t = new Dr(), n = null, r = () => {
1971
1973
  n !== null && (cancelAnimationFrame(n), n = null);
1972
1974
  let r = e.pagesRef.value;
@@ -1990,7 +1992,7 @@ var la = (e) => {
1990
1992
  ], i, { flush: "post" }), ye(() => {
1991
1993
  a(), r();
1992
1994
  });
1993
- }, ua = (e) => {
1995
+ }, ha = (e) => {
1994
1996
  let t = new Or(), n = null, r = () => {
1995
1997
  n !== null && (cancelAnimationFrame(n), n = null);
1996
1998
  let r = e.pagesRef.value;
@@ -2041,25 +2043,25 @@ var la = (e) => {
2041
2043
  clearOverlay: r,
2042
2044
  updateSelectionOverlay: i
2043
2045
  };
2044
- }, da = 3e3, fa = (e = en) => {
2046
+ }, ga = 3e3, _a = (e = en) => {
2045
2047
  let t = P(null), n = null, r = () => {
2046
2048
  n !== null && e.clearTimer(n), n = null, t.value = null;
2047
2049
  };
2048
2050
  return ye(r), {
2049
2051
  message: t,
2050
2052
  show: (i) => {
2051
- r(), t.value = i, n = e.setTimer(r, da);
2053
+ r(), t.value = i, n = e.setTimer(r, ga);
2052
2054
  }
2053
2055
  };
2054
- }, pa = () => pe("div", {
2056
+ }, va = () => pe("div", {
2055
2057
  class: "docx-editor-vue__loading",
2056
2058
  "aria-busy": "true"
2057
- }, [pe("progress", { "aria-hidden": "true" })]), ma = [
2059
+ }, [pe("progress", { "aria-hidden": "true" })]), ya = [
2058
2060
  "data-folio-anonymization-label",
2059
2061
  "data-folio-anonymization-canonical",
2060
2062
  "data-folio-anonymization-selected",
2061
2063
  "title"
2062
- ], ha = /*#__PURE__*/ p(/* @__PURE__ */ A({
2064
+ ], ba = /*#__PURE__*/ p(/* @__PURE__ */ A({
2063
2065
  __name: "AnonymizationRectsOverlay",
2064
2066
  props: {
2065
2067
  getHighlights: { type: Function },
@@ -2174,13 +2176,13 @@ var la = (e) => {
2174
2176
  width: `${n.width}px`,
2175
2177
  height: `${n.height}px`
2176
2178
  })
2177
- }, null, 14, ma))), 128))], 64))), 128))], 512));
2179
+ }, null, 14, ya))), 128))], 64))), 128))], 512));
2178
2180
  }
2179
- }), [["__scopeId", "data-v-1260b607"]]), ga = {
2181
+ }), [["__scopeId", "data-v-1260b607"]]), xa = {
2180
2182
  key: 0,
2181
2183
  class: "folio-autocomplete-overlay",
2182
2184
  "data-folio-autocomplete-overlay": ""
2183
- }, _a = /*#__PURE__*/ p(/* @__PURE__ */ A({
2185
+ }, Sa = /*#__PURE__*/ p(/* @__PURE__ */ A({
2184
2186
  __name: "AutocompleteCaretOverlay",
2185
2187
  props: {
2186
2188
  caret: {},
@@ -2188,7 +2190,7 @@ var la = (e) => {
2188
2190
  isStreaming: { type: Boolean }
2189
2191
  },
2190
2192
  setup(e) {
2191
- return (t, n) => e.caret && e.text.length > 0 ? (N(), E("div", ga, [D("span", {
2193
+ return (t, n) => e.caret && e.text.length > 0 ? (N(), E("div", xa, [D("span", {
2192
2194
  class: "folio-autocomplete-ghost",
2193
2195
  style: M({
2194
2196
  left: `${e.caret.x}px`,
@@ -2201,7 +2203,7 @@ var la = (e) => {
2201
2203
  "aria-hidden": "true"
2202
2204
  }, "stella", 2)], 4)])) : T("", !0);
2203
2205
  }
2204
- }), [["__scopeId", "data-v-39deaa80"]]), va = 48, ya = /* @__PURE__ */ A({
2206
+ }), [["__scopeId", "data-v-39deaa80"]]), Ca = 48, wa = /* @__PURE__ */ A({
2205
2207
  __name: "AutocompleteSuggestionOverlay",
2206
2208
  props: {
2207
2209
  getPagesContainer: { type: Function },
@@ -2220,7 +2222,7 @@ var la = (e) => {
2220
2222
  let c = r.querySelector(".layout-page-content");
2221
2223
  if (!c) return;
2222
2224
  let l = (c.getBoundingClientRect().right - a.left) / i;
2223
- return Math.max(va, l - t);
2225
+ return Math.max(Ca, l - t);
2224
2226
  }
2225
2227
  }, s = () => {
2226
2228
  let e = t.getPagesContainer();
@@ -2270,7 +2272,7 @@ var la = (e) => {
2270
2272
  t.editorState,
2271
2273
  t.zoom,
2272
2274
  r.value
2273
- ], () => c()), (e, t) => (N(), w(_a, {
2275
+ ], () => c()), (e, t) => (N(), w(Sa, {
2274
2276
  caret: n.value?.caret ?? null,
2275
2277
  text: n.value?.text ?? "",
2276
2278
  "is-streaming": n.value?.isStreaming ?? !1
@@ -2280,14 +2282,14 @@ var la = (e) => {
2280
2282
  "is-streaming"
2281
2283
  ]));
2282
2284
  }
2283
- }), ba = ["aria-label"], xa = {
2285
+ }), Ta = ["aria-label"], Ea = {
2284
2286
  key: 0,
2285
2287
  class: "content-control-picker__items",
2286
2288
  role: "menu"
2287
- }, Sa = {
2289
+ }, Da = {
2288
2290
  key: 0,
2289
2291
  class: "content-control-picker__empty"
2290
- }, Ca = /*#__PURE__*/ p(/* @__PURE__ */ A({
2292
+ }, Oa = /*#__PURE__*/ p(/* @__PURE__ */ A({
2291
2293
  __name: "ContentControlWidgetsOverlay",
2292
2294
  props: {
2293
2295
  eventRoot: {},
@@ -2295,7 +2297,7 @@ var la = (e) => {
2295
2297
  },
2296
2298
  emits: ["refused"],
2297
2299
  setup(e, { emit: t }) {
2298
- let n = e, { t: r } = u(), { Button: i, DatePickerPopover: a } = d(), o = ca(), s = t, c = new Nr({ onRefused: (e) => s("refused", r($(e))) }), l = Se(c.getSnapshot()), f = c.subscribe(() => {
2300
+ let n = e, { t: r } = u(), { Button: i, DatePickerPopover: a } = d(), o = pa(), s = t, c = new Nr({ onRefused: (e) => s("refused", r($(e))) }), l = Se(c.getSnapshot()), f = c.subscribe(() => {
2299
2301
  l.value = c.getSnapshot();
2300
2302
  });
2301
2303
  R([() => n.view, () => n.eventRoot], ([e, t]) => c.bind(e, t), { immediate: !0 }), _e(() => {
@@ -2315,7 +2317,7 @@ var la = (e) => {
2315
2317
  "aria-label": l.value.status === "dropdown" ? L(r)("contentControlDropdownAriaLabel") : L(r)("contentControlDateAriaLabel"),
2316
2318
  onMousedown: t[1] ||= z(() => {}, ["stop"]),
2317
2319
  onPointerdown: t[2] ||= z(() => {}, ["stop"])
2318
- }, [l.value.status === "dropdown" ? (N(), E("div", xa, [l.value.items.length === 0 ? (N(), E("div", Sa, I(L(r)("contentControlDropdownNoOptions")), 1)) : (N(!0), E(x, { key: 1 }, F(l.value.items, (e) => (N(), w(L(i), {
2320
+ }, [l.value.status === "dropdown" ? (N(), E("div", Ea, [l.value.items.length === 0 ? (N(), E("div", Da, I(L(r)("contentControlDropdownNoOptions")), 1)) : (N(!0), E(x, { key: 1 }, F(l.value.items, (e) => (N(), w(L(i), {
2319
2321
  key: `${e.value}::${e.displayText}`,
2320
2322
  "class-name": "content-control-picker__item",
2321
2323
  type: "button",
@@ -2332,9 +2334,9 @@ var la = (e) => {
2332
2334
  value: l.value.currentValue,
2333
2335
  "default-open": !0,
2334
2336
  onChange: m
2335
- }, null, 8, ["value"])) : T("", !0)], 46, ba))]));
2337
+ }, null, 8, ["value"])) : T("", !0)], 46, Ta))]));
2336
2338
  }
2337
- }), [["__scopeId", "data-v-5367d712"]]), wa = /* @__PURE__ */ A({
2339
+ }), [["__scopeId", "data-v-5367d712"]]), ka = /* @__PURE__ */ A({
2338
2340
  __name: "DecorationLayer",
2339
2341
  props: {
2340
2342
  getView: { type: Function },
@@ -2446,7 +2448,7 @@ var la = (e) => {
2446
2448
  "aria-hidden": "true"
2447
2449
  }, null, 512));
2448
2450
  }
2449
- }), Ta = ({ surface: e, available: t, navRef: n, onClose: r }) => {
2451
+ }), Aa = ({ surface: e, available: t, navRef: n, onClose: r }) => {
2450
2452
  let i = S(() => we(e) === "expanded" && we(t));
2451
2453
  R(i, async (e, t, i) => {
2452
2454
  if (!e || typeof document > "u") return;
@@ -2462,18 +2464,18 @@ var la = (e) => {
2462
2464
  immediate: !0,
2463
2465
  flush: "post"
2464
2466
  });
2465
- }, Ea = [
2467
+ }, ja = [
2466
2468
  "aria-label",
2467
2469
  "data-folio-outline-surface",
2468
2470
  "tabindex"
2469
- ], Da = [
2471
+ ], Ma = [
2470
2472
  "aria-label",
2471
2473
  "aria-expanded",
2472
2474
  "title"
2473
- ], Oa = {
2475
+ ], Na = {
2474
2476
  key: 1,
2475
2477
  class: "folio-outline-header"
2476
- }, ka = { class: "folio-outline-heading-row" }, Aa = { class: "folio-outline-title" }, ja = ["aria-label", "title"], Ma = { class: "folio-outline-depth-control" }, Na = ["aria-label", "value"], Pa = { value: 2 }, Fa = { value: 3 }, Ia = { value: "all" }, La = /*#__PURE__*/ p(/* @__PURE__ */ A({
2478
+ }, Pa = { class: "folio-outline-heading-row" }, Fa = { class: "folio-outline-title" }, Ia = ["aria-label", "title"], La = { class: "folio-outline-depth-control" }, Ra = ["aria-label", "value"], za = { value: 2 }, Ba = { value: 3 }, Va = { value: "all" }, Ha = /*#__PURE__*/ p(/* @__PURE__ */ A({
2477
2479
  __name: "DocumentOutline",
2478
2480
  props: {
2479
2481
  headings: {},
@@ -2501,7 +2503,7 @@ var la = (e) => {
2501
2503
  rail: Ze.outlineRailWidth,
2502
2504
  expanded: Ze.outlineColumnWidth
2503
2505
  }, r = e, i = t, { t: a } = u(), { OutlineRail: o } = d(), s = P(null);
2504
- Ta({
2506
+ Aa({
2505
2507
  surface: () => r.surface,
2506
2508
  available: () => r.available,
2507
2509
  navRef: s,
@@ -2551,7 +2553,7 @@ var la = (e) => {
2551
2553
  name: "view_column",
2552
2554
  size: 16,
2553
2555
  "aria-hidden": "true"
2554
- })], 8, Da)) : (N(), E("div", Oa, [D("div", ka, [D("span", Aa, I(L(a)("editor.outlineTitle")), 1), e.surface === "expanded" ? (N(), E("button", {
2556
+ })], 8, Ma)) : (N(), E("div", Na, [D("div", Pa, [D("span", Fa, I(L(a)("editor.outlineTitle")), 1), e.surface === "expanded" ? (N(), E("button", {
2555
2557
  key: 0,
2556
2558
  type: "button",
2557
2559
  class: "folio-outline-icon-button",
@@ -2563,15 +2565,15 @@ var la = (e) => {
2563
2565
  name: "close",
2564
2566
  size: 16,
2565
2567
  "aria-hidden": "true"
2566
- })], 8, ja)) : T("", !0)]), D("label", Ma, [D("span", null, I(L(a)("editor.outlineDepthLabel")), 1), D("select", {
2568
+ })], 8, Ia)) : T("", !0)]), D("label", La, [D("span", null, I(L(a)("editor.outlineDepthLabel")), 1), D("select", {
2567
2569
  "aria-label": L(a)("editor.outlineDepthLabel"),
2568
2570
  value: e.outlineDepth,
2569
2571
  onChange: l
2570
2572
  }, [
2571
- D("option", Pa, I(L(a)("editor.outlineDepthTwo")), 1),
2572
- D("option", Fa, I(L(a)("editor.outlineDepthThree")), 1),
2573
- D("option", Ia, I(L(a)("editor.outlineDepthAll")), 1)
2574
- ], 40, Na)])])), O(L(o), {
2573
+ D("option", za, I(L(a)("editor.outlineDepthTwo")), 1),
2574
+ D("option", Ba, I(L(a)("editor.outlineDepthThree")), 1),
2575
+ D("option", Va, I(L(a)("editor.outlineDepthAll")), 1)
2576
+ ], 40, Ra)])])), O(L(o), {
2575
2577
  items: h.value,
2576
2578
  "get-scroll-container": e.getScrollContainer,
2577
2579
  "resolve-pct": _,
@@ -2588,9 +2590,9 @@ var la = (e) => {
2588
2590
  "presentation",
2589
2591
  "panel-width",
2590
2592
  "aria-label"
2591
- ])], 14, Ea)) : T("", !0);
2593
+ ])], 14, ja)) : T("", !0);
2592
2594
  }
2593
- }), [["__scopeId", "data-v-23e73f91"]]), Ra = /* @__PURE__ */ A({
2595
+ }), [["__scopeId", "data-v-23e73f91"]]), Ua = /* @__PURE__ */ A({
2594
2596
  __name: "DocxEditorDialogs",
2595
2597
  props: {
2596
2598
  search: {},
@@ -2694,10 +2696,10 @@ var la = (e) => {
2694
2696
  }, null, 8, ["is-open", "current-watermark"])) : T("", !0)
2695
2697
  ], 64));
2696
2698
  }
2697
- }), za = {
2699
+ }), Wa = {
2698
2700
  key: 0,
2699
2701
  class: "docx-editor-vue__title-bar"
2700
- }, Ba = { class: "docx-editor-vue__title-bar-left" }, Va = { class: "docx-editor-vue__title-bar-center" }, Ha = { class: "docx-editor-vue__title-bar-right" }, Ua = /* @__PURE__ */ A({
2702
+ }, Ga = { class: "docx-editor-vue__title-bar-left" }, Ka = { class: "docx-editor-vue__title-bar-center" }, qa = { class: "docx-editor-vue__title-bar-right" }, Ja = /* @__PURE__ */ A({
2701
2703
  __name: "DocxEditorMenuBar",
2702
2704
  props: {
2703
2705
  showMenuBar: {
@@ -2729,9 +2731,9 @@ var la = (e) => {
2729
2731
  ],
2730
2732
  setup(e, { emit: t }) {
2731
2733
  let n = t;
2732
- return (t, r) => e.showMenuBar ? (N(), E("div", za, [
2733
- D("div", Ba, [xe(t.$slots, "title-bar-left")]),
2734
- D("div", Va, [O(ce, {
2734
+ return (t, r) => e.showMenuBar ? (N(), E("div", Wa, [
2735
+ D("div", Ga, [xe(t.$slots, "title-bar-left")]),
2736
+ D("div", Ka, [O(ce, {
2735
2737
  "model-value": e.documentName,
2736
2738
  editable: e.documentNameEditable,
2737
2739
  "onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
@@ -2746,28 +2748,28 @@ var la = (e) => {
2746
2748
  "show-help-menu",
2747
2749
  "show-table-insert"
2748
2750
  ])]),
2749
- D("div", Ha, [xe(t.$slots, "title-bar-right")])
2751
+ D("div", qa, [xe(t.$slots, "title-bar-right")])
2750
2752
  ])) : T("", !0);
2751
2753
  }
2752
- }), Wa = ["aria-label"], Ga = { class: "image-ctx-menu__icon" }, Ka = { class: "image-ctx-menu__label" }, qa = {
2754
+ }), Ya = ["aria-label"], Xa = { class: "image-ctx-menu__icon" }, Za = { class: "image-ctx-menu__label" }, Qa = {
2753
2755
  key: 1,
2754
2756
  class: "image-ctx-menu__divider",
2755
2757
  role: "separator"
2756
- }, Ja = [
2758
+ }, $a = [
2757
2759
  "data-wrap-type",
2758
2760
  "data-current",
2759
2761
  "data-disabled",
2760
2762
  "disabled",
2761
2763
  "title",
2762
2764
  "onClick"
2763
- ], Ya = { class: "image-ctx-menu__icon" }, Xa = { class: "image-ctx-menu__label" }, Za = ["aria-label"], Qa = ["disabled", "onClick"], $a = { class: "image-ctx-menu__label" }, eo = {
2765
+ ], eo = { class: "image-ctx-menu__icon" }, to = { class: "image-ctx-menu__label" }, no = ["aria-label"], ro = ["disabled", "onClick"], io = { class: "image-ctx-menu__label" }, ao = {
2764
2766
  key: 0,
2765
2767
  class: "image-ctx-menu__shortcut"
2766
- }, to = {
2768
+ }, oo = {
2767
2769
  key: 0,
2768
2770
  class: "image-ctx-menu__divider",
2769
2771
  role: "separator"
2770
- }, no = 18, ro = 260, io = 10, ao = /*#__PURE__*/ p(/* @__PURE__ */ A({
2772
+ }, so = 18, co = 260, lo = 10, uo = /*#__PURE__*/ p(/* @__PURE__ */ A({
2771
2773
  __name: "ImageContextMenu",
2772
2774
  props: {
2773
2775
  state: {},
@@ -2788,7 +2790,7 @@ var la = (e) => {
2788
2790
  function i() {
2789
2791
  r("open-properties"), r("close");
2790
2792
  }
2791
- let { t: a } = u(), o = ca(), s = Bt, c = S(() => n.state ? Ht(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), l = {
2793
+ let { t: a } = u(), o = pa(), s = Bt, c = S(() => n.state ? Ht(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), l = {
2792
2794
  inline: "wrap_text",
2793
2795
  squareLeft: "format_image_left",
2794
2796
  squareRight: "format_image_right",
@@ -2801,11 +2803,11 @@ var la = (e) => {
2801
2803
  let f = S(() => {
2802
2804
  if (!n.state) return {};
2803
2805
  let e = Bt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
2804
- return typeof window < "u" && (t + ro > window.innerWidth && (t = window.innerWidth - ro - io), r + e > window.innerHeight && (r = window.innerHeight - e - io), t < io && (t = io), r < io && (r = io)), {
2806
+ return typeof window < "u" && (t + co > window.innerWidth && (t = window.innerWidth - co - lo), r + e > window.innerHeight && (r = window.innerHeight - e - lo), t < lo && (t = lo), r < lo && (r = lo)), {
2805
2807
  position: "fixed",
2806
2808
  left: `${t}px`,
2807
2809
  top: `${r}px`,
2808
- minWidth: `${ro}px`,
2810
+ minWidth: `${co}px`,
2809
2811
  zIndex: 400
2810
2812
  };
2811
2813
  });
@@ -2847,11 +2849,11 @@ var la = (e) => {
2847
2849
  "data-action": "open-properties",
2848
2850
  onMousedown: n[1] ||= z(() => {}, ["prevent"]),
2849
2851
  onClick: i
2850
- }, [D("span", Ga, [O(m, {
2852
+ }, [D("span", Xa, [O(m, {
2851
2853
  name: "settings",
2852
- size: no
2853
- })]), D("span", Ka, I(L(a)("imageWrap.menu.imageProperties")), 1)], 32)) : T("", !0),
2854
- e.canOpenProperties ? (N(), E("div", qa)) : T("", !0),
2854
+ size: so
2855
+ })]), D("span", Za, I(L(a)("imageWrap.menu.imageProperties")), 1)], 32)) : T("", !0),
2856
+ e.canOpenProperties ? (N(), E("div", Qa)) : T("", !0),
2855
2857
  (N(!0), E(x, null, F(L(s), (e) => (N(), E("button", {
2856
2858
  key: e.choice,
2857
2859
  type: "button",
@@ -2865,17 +2867,17 @@ var la = (e) => {
2865
2867
  onMousedown: n[2] ||= z(() => {}, ["prevent"]),
2866
2868
  onClick: (t) => h(e)
2867
2869
  }, [
2868
- D("span", Ya, [O(m, {
2870
+ D("span", eo, [O(m, {
2869
2871
  name: d(e.iconHint),
2870
- size: no
2872
+ size: so
2871
2873
  }, null, 8, ["name"])]),
2872
- D("span", Xa, I(L(a)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
2874
+ D("span", to, I(L(a)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
2873
2875
  e.choice === c.value ? (N(), E("span", {
2874
2876
  key: 0,
2875
2877
  class: "image-ctx-menu__current-dot",
2876
2878
  "aria-label": L(a)("imageWrap.menu.ariaLabel")
2877
- }, "●", 8, Za)) : T("", !0)
2878
- ], 42, Ja))), 128)),
2879
+ }, "●", 8, no)) : T("", !0)
2880
+ ], 42, $a))), 128)),
2879
2881
  e.textActions && e.textActions.length > 0 ? (N(), E(x, { key: 2 }, [n[5] ||= D("div", {
2880
2882
  class: "image-ctx-menu__divider",
2881
2883
  role: "separator"
@@ -2886,16 +2888,16 @@ var la = (e) => {
2886
2888
  disabled: e.disabled,
2887
2889
  onMousedown: n[3] ||= z(() => {}, ["prevent"]),
2888
2890
  onClick: (t) => g(e)
2889
- }, [D("span", $a, I(e.label), 1), e.shortcut ? (N(), E("span", eo, I(e.shortcut), 1)) : T("", !0)], 40, Qa), e.dividerAfter ? (N(), E("div", to)) : T("", !0)], 64))), 128))], 64)) : T("", !0)
2890
- ], 46, Wa)) : T("", !0)]));
2891
+ }, [D("span", io, I(e.label), 1), e.shortcut ? (N(), E("span", ao, I(e.shortcut), 1)) : T("", !0)], 40, ro), e.dividerAfter ? (N(), E("div", oo)) : T("", !0)], 64))), 128))], 64)) : T("", !0)
2892
+ ], 46, Ya)) : T("", !0)]));
2891
2893
  }
2892
- }), [["__scopeId", "data-v-96099b5d"]]), oo = ["disabled", "onMousedown"], so = {
2894
+ }), [["__scopeId", "data-v-96099b5d"]]), fo = ["disabled", "onMousedown"], po = {
2893
2895
  key: 0,
2894
2896
  class: "ctx-menu__icon"
2895
- }, co = { class: "ctx-menu__label" }, lo = {
2897
+ }, mo = { class: "ctx-menu__label" }, ho = {
2896
2898
  key: 1,
2897
2899
  class: "ctx-menu__shortcut"
2898
- }, uo = 220, fo = 32, po = 10, mo = /*#__PURE__*/ p(/* @__PURE__ */ A({
2900
+ }, go = 220, _o = 32, vo = 10, yo = /*#__PURE__*/ p(/* @__PURE__ */ A({
2899
2901
  __name: "TextContextMenu",
2900
2902
  props: {
2901
2903
  isOpen: { type: Boolean },
@@ -2913,7 +2915,7 @@ var la = (e) => {
2913
2915
  setup(e, { emit: t }) {
2914
2916
  let n = e, r = ({ node: e }) => e;
2915
2917
  r.props = ["node"];
2916
- let i = t, { t: a } = u(), o = ca(), s = P(null), c = S(() => {
2918
+ let i = t, { t: a } = u(), o = pa(), s = P(null), c = S(() => {
2917
2919
  let e = [], t = n.customItems ?? [];
2918
2920
  for (let [n, r] of t.entries()) e.push({
2919
2921
  id: `custom-${r.id}`,
@@ -3067,8 +3069,8 @@ var la = (e) => {
3067
3069
  action: "setNumberingValue"
3068
3070
  }), e;
3069
3071
  }), l = S(() => {
3070
- let e = n.position.x, t = n.position.y, r = c.value.filter((e) => !e.divider).length, i = c.value.filter((e) => e.divider).length, a = r * fo + i * 9;
3071
- return typeof window < "u" && (e + uo + po > window.innerWidth && (e = window.innerWidth - uo - po), t + a + po > window.innerHeight && (t = window.innerHeight - a - po)), {
3072
+ let e = n.position.x, t = n.position.y, r = c.value.filter((e) => !e.divider).length, i = c.value.filter((e) => e.divider).length, a = r * _o + i * 9;
3073
+ return typeof window < "u" && (e + go + vo > window.innerWidth && (e = window.innerWidth - go - vo), t + a + vo > window.innerHeight && (t = window.innerHeight - a - vo)), {
3072
3074
  position: "fixed",
3073
3075
  left: `${e}px`,
3074
3076
  top: `${t}px`,
@@ -3106,12 +3108,12 @@ var la = (e) => {
3106
3108
  disabled: e.disabled,
3107
3109
  onMousedown: z((t) => d(e.action), ["prevent"])
3108
3110
  }, [
3109
- e.icon ? (N(), E("span", so, [O(r, { node: e.icon }, null, 8, ["node"])])) : T("", !0),
3110
- D("span", co, I(e.label), 1),
3111
- e.shortcut ? (N(), E("span", lo, I(e.shortcut), 1)) : T("", !0)
3112
- ], 42, oo))), 128))], 38)) : T("", !0)]));
3111
+ e.icon ? (N(), E("span", po, [O(r, { node: e.icon }, null, 8, ["node"])])) : T("", !0),
3112
+ D("span", mo, I(e.label), 1),
3113
+ e.shortcut ? (N(), E("span", ho, I(e.shortcut), 1)) : T("", !0)
3114
+ ], 42, fo))), 128))], 38)) : T("", !0)]));
3113
3115
  }
3114
- }), [["__scopeId", "data-v-7eae304c"]]), ho = /* @__PURE__ */ A({
3116
+ }), [["__scopeId", "data-v-7eae304c"]]), bo = /* @__PURE__ */ A({
3115
3117
  __name: "DocxEditorOverlays",
3116
3118
  props: {
3117
3119
  readOnly: { type: Boolean },
@@ -3130,7 +3132,7 @@ var la = (e) => {
3130
3132
  ],
3131
3133
  setup(e, { emit: t }) {
3132
3134
  let n = t;
3133
- return (t, r) => (N(), E(x, null, [O(mo, {
3135
+ return (t, r) => (N(), E(x, null, [O(yo, {
3134
3136
  "is-open": e.contextMenu.isOpen,
3135
3137
  position: e.contextMenu.position,
3136
3138
  "has-selection": e.contextMenu.hasSelection,
@@ -3154,7 +3156,7 @@ var la = (e) => {
3154
3156
  "can-split-cell",
3155
3157
  "list-numbering",
3156
3158
  "custom-items"
3157
- ]), O(ao, {
3159
+ ]), O(uo, {
3158
3160
  state: e.imageContextMenu,
3159
3161
  "text-actions": e.imageContextMenuTextActions,
3160
3162
  "can-open-properties": e.canOpenImageProperties,
@@ -3168,7 +3170,7 @@ var la = (e) => {
3168
3170
  "can-open-properties"
3169
3171
  ])], 64));
3170
3172
  }
3171
- }), go = /* @__PURE__ */ A({
3173
+ }), xo = /* @__PURE__ */ A({
3172
3174
  __name: "HeaderFooterSelectionOverlay",
3173
3175
  props: {
3174
3176
  pagesContainer: {},
@@ -3218,7 +3220,7 @@ var la = (e) => {
3218
3220
  i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Le(t.hiddenContainer);
3219
3221
  }), (e, t) => null;
3220
3222
  }
3221
- }), _o = { class: "hf-editor-label" }, vo = /*#__PURE__*/ p(/* @__PURE__ */ A({
3223
+ }), So = { class: "hf-editor-label" }, Co = /*#__PURE__*/ p(/* @__PURE__ */ A({
3222
3224
  __name: "InlineHeaderFooterEditor",
3223
3225
  props: {
3224
3226
  edit: {},
@@ -3261,7 +3263,7 @@ var la = (e) => {
3261
3263
  class: "hf-inline-editor",
3262
3264
  style: M(c.value),
3263
3265
  role: "presentation"
3264
- }, [D("div", { class: j(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [D("span", _o, I(s.value), 1), D("div", {
3266
+ }, [D("div", { class: j(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [D("span", So, I(s.value), 1), D("div", {
3265
3267
  class: "hf-options",
3266
3268
  onMousedown: n[5] ||= z(() => {}, ["stop"])
3267
3269
  }, [O(L(i), {
@@ -3311,7 +3313,7 @@ var la = (e) => {
3311
3313
  })
3312
3314
  ], 2)) : T("", !0)], 32)], 2)], 4));
3313
3315
  }
3314
- }), [["__scopeId", "data-v-74134c4e"]]), yo = /*#__PURE__*/ p(/* @__PURE__ */ A({
3316
+ }), [["__scopeId", "data-v-74134c4e"]]), wo = /*#__PURE__*/ p(/* @__PURE__ */ A({
3315
3317
  __name: "PageIndicator",
3316
3318
  props: {
3317
3319
  currentPage: {},
@@ -3330,10 +3332,10 @@ var la = (e) => {
3330
3332
  total: e.totalPages
3331
3333
  })), 5));
3332
3334
  }
3333
- }), [["__scopeId", "data-v-d6c69c2c"]]), bo = {
3335
+ }), [["__scopeId", "data-v-d6c69c2c"]]), To = {
3334
3336
  class: "folio-passage-highlight-overlay",
3335
3337
  "data-folio-passage-highlight-overlay": ""
3336
- }, xo = /*#__PURE__*/ p(/* @__PURE__ */ A({
3338
+ }, Eo = /*#__PURE__*/ p(/* @__PURE__ */ A({
3337
3339
  __name: "PassageHighlightOverlay",
3338
3340
  props: {
3339
3341
  range: {},
@@ -3380,7 +3382,7 @@ var la = (e) => {
3380
3382
  t.measures
3381
3383
  ], () => a(), { immediate: !0 }), _e(() => {
3382
3384
  r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
3383
- }), (e, t) => (N(), E("div", bo, [(N(!0), E(x, null, F(n.value, (e, t) => (N(), E("span", {
3385
+ }), (e, t) => (N(), E("div", To, [(N(!0), E(x, null, F(n.value, (e, t) => (N(), E("span", {
3384
3386
  key: `${t}:${e.left}:${e.top}`,
3385
3387
  class: "folio-passage-highlight",
3386
3388
  style: M({
@@ -3392,7 +3394,7 @@ var la = (e) => {
3392
3394
  })
3393
3395
  }, null, 4))), 128))]));
3394
3396
  }
3395
- }), [["__scopeId", "data-v-cb52fdae"]]), So = ["data-folio-block-id"], Co = ["data-folio-block-id", "title"], wo = 2.5, To = 5, Eo = 6, Do = 2, Oo = 2, ko = /*#__PURE__*/ p(/* @__PURE__ */ A({
3397
+ }), [["__scopeId", "data-v-cb52fdae"]]), Do = ["data-folio-block-id"], Oo = ["data-folio-block-id", "title"], ko = 2.5, Ao = 5, jo = 6, Mo = 2, No = 2, Po = /*#__PURE__*/ p(/* @__PURE__ */ A({
3396
3398
  __name: "TemplateDirectivesOverlay",
3397
3399
  props: {
3398
3400
  getView: { type: Function },
@@ -3406,19 +3408,19 @@ var la = (e) => {
3406
3408
  setup(e) {
3407
3409
  let t = e, n = /* @__PURE__ */ new Set(["if", "for"]), r = /* @__PURE__ */ new Set(["endif", "endfor"]), i = (e) => e === "for" ? "for" : "if";
3408
3410
  function a(e) {
3409
- let t = e - Eo - wo - Do;
3410
- return t <= 0 ? 0 : Math.floor(t / To);
3411
+ let t = e - jo - ko - Mo;
3412
+ return t <= 0 ? 0 : Math.floor(t / Ao);
3411
3413
  }
3412
3414
  function o(e, t, n) {
3413
3415
  let r = a(n), i = Math.min(Math.max(0, e), r);
3414
- return t - Eo - wo - (r - i) * To;
3416
+ return t - jo - ko - (r - i) * Ao;
3415
3417
  }
3416
3418
  function s(e, t) {
3417
- if (t.length === 0) return e.bottom - e.top >= Oo ? [e] : [];
3419
+ if (t.length === 0) return e.bottom - e.top >= No ? [e] : [];
3418
3420
  let n = [];
3419
3421
  for (let r of t) {
3420
3422
  let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
3421
- i - t >= Oo && n.push({
3423
+ i - t >= No && n.push({
3422
3424
  top: t,
3423
3425
  bottom: i
3424
3426
  });
@@ -3580,10 +3582,10 @@ var la = (e) => {
3580
3582
  position: "absolute",
3581
3583
  left: `${t.railX * e.zoom}px`,
3582
3584
  top: `${n.top * e.zoom}px`,
3583
- width: `${wo * e.zoom}px`,
3585
+ width: `${ko * e.zoom}px`,
3584
3586
  height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
3585
3587
  })
3586
- }, null, 14, So))), 128))], 64))), 128)), (N(!0), E(x, null, F(p.value, (t, n) => (N(), E(x, { key: `d:${n}` }, [(N(!0), E(x, null, F(t.rects, (r, i) => (N(), E("span", {
3588
+ }, null, 14, Do))), 128))], 64))), 128)), (N(!0), E(x, null, F(p.value, (t, n) => (N(), E(x, { key: `d:${n}` }, [(N(!0), E(x, null, F(t.rects, (r, i) => (N(), E("span", {
3587
3589
  key: `d:${n}:${i}`,
3588
3590
  class: j(le(t.range)),
3589
3591
  "data-folio-block-id": se(t.range),
@@ -3595,14 +3597,14 @@ var la = (e) => {
3595
3597
  width: `${(r.width + 2) * e.zoom}px`,
3596
3598
  height: `${Math.max(0, r.height - 2) * e.zoom}px`
3597
3599
  })
3598
- }, null, 14, Co))), 128))], 64))), 128))], 32));
3600
+ }, null, 14, Oo))), 128))], 64))), 128))], 32));
3599
3601
  }
3600
- }), [["__scopeId", "data-v-62b2d0a0"]]), Ao = [
3602
+ }), [["__scopeId", "data-v-62b2d0a0"]]), Fo = [
3601
3603
  "href",
3602
3604
  "rel",
3603
3605
  "target",
3604
3606
  "title"
3605
- ], jo = ["title"], Mo = ["title"], No = ["title"], Po = { class: "docx-hyperlink-popup__edit-row" }, Fo = ["placeholder", "onKeydown"], Io = { class: "docx-hyperlink-popup__edit-row" }, Lo = ["onKeydown"], Ro = ["disabled"], zo = /*#__PURE__*/ p(/* @__PURE__ */ A({
3607
+ ], Io = ["title"], Lo = ["title"], Ro = ["title"], zo = { class: "docx-hyperlink-popup__edit-row" }, Bo = ["placeholder", "onKeydown"], Vo = { class: "docx-hyperlink-popup__edit-row" }, Ho = ["onKeydown"], Uo = ["disabled"], Wo = /*#__PURE__*/ p(/* @__PURE__ */ A({
3606
3608
  __name: "HyperlinkPopup",
3607
3609
  props: {
3608
3610
  data: {},
@@ -3651,21 +3653,21 @@ var la = (e) => {
3651
3653
  class: j(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": o.value }]),
3652
3654
  style: M(d.value),
3653
3655
  onMousedown: i[6] ||= z(() => {}, ["stop"])
3654
- }, [o.value ? (N(), E(x, { key: 1 }, [D("div", Po, [Oe(D("input", {
3656
+ }, [o.value ? (N(), E(x, { key: 1 }, [D("div", zo, [Oe(D("input", {
3655
3657
  class: "docx-hyperlink-popup__input",
3656
3658
  placeholder: L(n)("displayText"),
3657
3659
  "onUpdate:modelValue": i[2] ||= (e) => s.value = e,
3658
3660
  onKeydown: [ke(z(g, ["prevent"]), ["enter"]), i[3] ||= ke((e) => t.$emit("close"), ["esc"])]
3659
- }, null, 40, Fo), [[Te, s.value]])]), D("div", Io, [Oe(D("input", {
3661
+ }, null, 40, Bo), [[Te, s.value]])]), D("div", Vo, [Oe(D("input", {
3660
3662
  class: "docx-hyperlink-popup__input",
3661
3663
  placeholder: "https://...",
3662
3664
  "onUpdate:modelValue": i[4] ||= (e) => c.value = e,
3663
3665
  onKeydown: [ke(z(g, ["prevent"]), ["enter"]), i[5] ||= ke((e) => t.$emit("close"), ["esc"])]
3664
- }, null, 40, Lo), [[Te, c.value]]), D("button", {
3666
+ }, null, 40, Ho), [[Te, c.value]]), D("button", {
3665
3667
  class: "docx-hyperlink-popup__apply",
3666
3668
  disabled: !c.value.trim(),
3667
3669
  onClick: z(g, ["prevent"])
3668
- }, I(L(n)("common.apply")), 9, Ro)])], 64)) : (N(), E(x, { key: 0 }, [
3670
+ }, I(L(n)("common.apply")), 9, Uo)])], 64)) : (N(), E(x, { key: 0 }, [
3669
3671
  i[10] ||= de("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-a7918e6a><svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-a7918e6a><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-a7918e6a></circle><path d=\"M2 12h20\" data-v-a7918e6a></path><path d=\"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z\" data-v-a7918e6a></path></svg></span>", 1),
3670
3672
  D("a", {
3671
3673
  class: "docx-hyperlink-popup__url",
@@ -3674,7 +3676,7 @@ var la = (e) => {
3674
3676
  target: L(r).target,
3675
3677
  title: e.data.href,
3676
3678
  onClick: i[0] ||= z((n) => t.$emit("navigate", e.data.href), ["prevent"])
3677
- }, I(e.data.href), 9, Ao),
3679
+ }, I(e.data.href), 9, Fo),
3678
3680
  i[11] ||= D("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
3679
3681
  D("button", {
3680
3682
  class: "docx-hyperlink-popup__btn",
@@ -3696,7 +3698,7 @@ var la = (e) => {
3696
3698
  height: "13",
3697
3699
  rx: "2",
3698
3700
  ry: "2"
3699
- }), D("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, jo),
3701
+ }), D("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, Io),
3700
3702
  e.readOnly ? T("", !0) : (N(), E("button", {
3701
3703
  key: 0,
3702
3704
  class: "docx-hyperlink-popup__btn",
@@ -3711,40 +3713,40 @@ var la = (e) => {
3711
3713
  "stroke-width": "2",
3712
3714
  "stroke-linecap": "round",
3713
3715
  "stroke-linejoin": "round"
3714
- }, [D("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), D("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })], -1)]], 8, Mo)),
3716
+ }, [D("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), D("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })], -1)]], 8, Lo)),
3715
3717
  e.readOnly ? T("", !0) : (N(), E("button", {
3716
3718
  key: 1,
3717
3719
  class: "docx-hyperlink-popup__btn",
3718
3720
  title: L(n)("removeLink"),
3719
3721
  onClick: i[1] ||= z((e) => t.$emit("remove"), ["prevent"])
3720
- }, [...i[9] ||= [de("<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-a7918e6a><path d=\"M18.84 12.25l1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\" data-v-a7918e6a></path><path d=\"M5.17 11.75l-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\" data-v-a7918e6a></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-a7918e6a></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-a7918e6a></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-a7918e6a></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-a7918e6a></line></svg>", 1)]], 8, No))
3722
+ }, [...i[9] ||= [de("<svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" data-v-a7918e6a><path d=\"M18.84 12.25l1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71\" data-v-a7918e6a></path><path d=\"M5.17 11.75l-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71\" data-v-a7918e6a></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-a7918e6a></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-a7918e6a></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-a7918e6a></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-a7918e6a></line></svg>", 1)]], 8, Ro))
3721
3723
  ], 64))], 38)) : T("", !0);
3722
3724
  }
3723
- }), [["__scopeId", "data-v-a7918e6a"]]), Bo = ["data-folio-locale-pending", "aria-busy"], Vo = {
3725
+ }), [["__scopeId", "data-v-a7918e6a"]]), Go = ["data-folio-locale-pending", "aria-busy"], Ko = {
3724
3726
  key: 0,
3725
3727
  class: "docx-editor-vue__locale-loading docx-editor-vue__error",
3726
3728
  role: "alert"
3727
- }, Ho = { class: "docx-editor-vue__toolbar-shell" }, Uo = {
3729
+ }, qo = { class: "docx-editor-vue__toolbar-shell" }, Jo = {
3728
3730
  key: 2,
3729
3731
  class: "docx-editor-vue__error"
3730
- }, Wo = {
3732
+ }, Yo = {
3731
3733
  key: 3,
3732
3734
  class: "docx-editor-vue__loading"
3733
- }, Go = {
3735
+ }, Xo = {
3734
3736
  key: 4,
3735
3737
  class: "docx-editor-vue__placeholder"
3736
- }, Ko = {
3738
+ }, Zo = {
3737
3739
  key: 5,
3738
3740
  class: "docx-editor-vue__notice",
3739
3741
  role: "status"
3740
- }, qo = [
3742
+ }, Qo = [
3741
3743
  "data-folio-panel-tier",
3742
3744
  "data-folio-outline",
3743
3745
  "data-folio-comments"
3744
- ], Jo = {
3746
+ ], $o = {
3745
3747
  key: 1,
3746
3748
  class: "docx-editor-vue__ruler-v"
3747
- }, Yo = {
3749
+ }, es = {
3748
3750
  class: "docx-editor-vue__editor-content-wrapper",
3749
3751
  style: {
3750
3752
  position: "relative",
@@ -3752,11 +3754,11 @@ var la = (e) => {
3752
3754
  flexDirection: "column",
3753
3755
  minHeight: "100%"
3754
3756
  }
3755
- }, Xo = {
3757
+ }, ts = {
3756
3758
  "data-testid": "selection-overlay",
3757
3759
  class: "docx-editor-vue__decoration-origin",
3758
3760
  "aria-hidden": "true"
3759
- }, Zo = ["aria-label"], Qo = { class: "docx-editor-vue__note-editor-header" }, $o = ["aria-label"], es = ["aria-label"], ts = /*#__PURE__*/ p(/* @__PURE__ */ A({
3761
+ }, ns = ["aria-label"], rs = { class: "docx-editor-vue__note-editor-header" }, is = ["aria-label"], as = ["aria-label"], os = /*#__PURE__*/ p(/* @__PURE__ */ A({
3760
3762
  __name: "DocxEditor",
3761
3763
  props: {
3762
3764
  documentBuffer: { default: null },
@@ -3869,6 +3871,7 @@ var la = (e) => {
3869
3871
  onCompatibilityChange: {},
3870
3872
  onCanonicalHistory: {},
3871
3873
  onCanonicalHistoryDrop: {},
3874
+ onCanonicalPasteWarnings: {},
3872
3875
  onEditorViewReady: {},
3873
3876
  collaboration: {},
3874
3877
  anonymizationTerms: {},
@@ -3908,11 +3911,11 @@ var la = (e) => {
3908
3911
  }), u = k(() => import("./VerticalRuler-D973NTMv.js").then((e) => e.n)), d = k(() => import("./ImageSelectionOverlay-DULrvfOJ.js")), f = e, p = f.plugins ?? [], h = i;
3909
3912
  g(f.components);
3910
3913
  let _ = n();
3911
- sa(_);
3914
+ fa(_);
3912
3915
  function y(e) {
3913
3916
  f.onChange?.(e), h("change", e), h("update:document", e);
3914
3917
  }
3915
- let { message: ee, show: te } = fa();
3918
+ let { message: ee, show: te } = _a();
3916
3919
  function oe(e) {
3917
3920
  Me.is(e) && te(bt(e.ground, F)), f.onError?.(e), h("error", e);
3918
3921
  }
@@ -3926,7 +3929,7 @@ var la = (e) => {
3926
3929
  e !== null && f.onReadonlyEditAttempt?.(e);
3927
3930
  }
3928
3931
  function ge() {
3929
- hi(Ue(b.value));
3932
+ fi(Ue(b.value));
3930
3933
  }
3931
3934
  function ye(e) {
3932
3935
  le.value = e;
@@ -3943,7 +3946,7 @@ var la = (e) => {
3943
3946
  function qt(e) {
3944
3947
  f.enableWheelZoom !== !1 && Wt(e);
3945
3948
  }
3946
- Ui({
3949
+ Ji({
3947
3950
  showFindReplace: ct,
3948
3951
  showHyperlink: ut,
3949
3952
  handleZoomKeyDown: Gt,
@@ -3972,6 +3975,7 @@ var la = (e) => {
3972
3975
  historyShortcuts: Ge(f.hostShortcuts ?? []),
3973
3976
  onCanonicalHistory: (e) => f.onCanonicalHistory?.(e),
3974
3977
  onCanonicalHistoryDrop: (e) => f.onCanonicalHistoryDrop?.(e),
3978
+ onCanonicalPasteWarnings: (e) => f.onCanonicalPasteWarnings?.(e),
3975
3979
  collaboration: () => f.collaboration,
3976
3980
  getAnonymizationTerms: () => f.anonymizationTerms,
3977
3981
  getDerivedFields: () => f.derivedFields,
@@ -4015,14 +4019,14 @@ var la = (e) => {
4015
4019
  function On() {
4016
4020
  Y.value && (Be(), ze(), Sn());
4017
4021
  }
4018
- zi({
4022
+ Wi({
4019
4023
  isReady: $t,
4020
4024
  sourceBuffer: () => an.value,
4021
4025
  fonts: () => f.fonts,
4022
4026
  remeasure: On,
4023
4027
  setEmbeddedFontFamilies: Cn
4024
4028
  });
4025
- let { selectedImage: kn, imageInteracting: An, imageToolbarContext: jn, handleToolbarImageWrap: Mn, handleImageTransform: Nn } = Hi({
4029
+ let { selectedImage: kn, imageInteracting: An, imageToolbarContext: jn, handleToolbarImageWrap: Mn, handleImageTransform: Nn } = qi({
4026
4030
  editorView: X,
4027
4031
  zoom: K,
4028
4032
  stateTick: H,
@@ -4031,7 +4035,7 @@ var la = (e) => {
4031
4035
  R(kn, (e) => {
4032
4036
  e && (Pn.value = !0);
4033
4037
  }, { flush: "sync" });
4034
- let Fn = ua({
4038
+ let Fn = ha({
4035
4039
  editorView: Y,
4036
4040
  hiddenContainer: Ke,
4037
4041
  pagesRef: B,
@@ -4041,18 +4045,18 @@ var la = (e) => {
4041
4045
  syncCoordinator: ln,
4042
4046
  imageInteracting: An
4043
4047
  });
4044
- la({
4048
+ ma({
4045
4049
  pagesRef: B,
4046
4050
  remoteSelections: Xt,
4047
4051
  syncCoordinator: ln,
4048
4052
  zoom: K
4049
4053
  });
4050
- let { hyperlinkPopupData: In, handleHyperlinkSubmit: Ln, handleHyperlinkRemove: Rn, handleHyperlinkPopupNavigate: zn, handleHyperlinkPopupEdit: Bn, handleHyperlinkPopupRemove: Vn } = Vi({
4054
+ let { hyperlinkPopupData: In, handleHyperlinkSubmit: Ln, handleHyperlinkRemove: Rn, handleHyperlinkPopupNavigate: zn, handleHyperlinkPopupEdit: Bn, handleHyperlinkPopupRemove: Vn } = Ki({
4051
4055
  editorView: X,
4052
4056
  getCommands: xn
4053
4057
  }), Hn = r({ runCommand: (e, t) => {
4054
4058
  e === Y.value ? J.executeCommand(t) : U(e, t);
4055
- } }), { tableInsertButton: Un, hfEdit: Wn, scrollPageInfo: Gn, resolvePos: Kn, setPmSelection: qn, scrollVisiblePositionIntoView: Jn, handlePagesMouseDown: Yn, handlePagesMouseMove: Xn, handlePagesClick: Zn, handlePagesDoubleClick: Qn, handleTableInsertClick: $n, handleHfSave: er, handleHfRemove: tr } = aa({
4059
+ } }), { tableInsertButton: Un, hfEdit: Wn, scrollPageInfo: Gn, resolvePos: Kn, setPmSelection: qn, scrollVisiblePositionIntoView: Jn, handlePagesMouseDown: Yn, handlePagesMouseMove: Xn, handlePagesClick: Zn, handlePagesDoubleClick: Qn, handleTableInsertClick: $n, handleHfSave: er, handleHfRemove: tr } = ua({
4056
4060
  editorView: Y,
4057
4061
  pagesRef: B,
4058
4062
  pagesViewportRef: tt,
@@ -4098,7 +4102,7 @@ var la = (e) => {
4098
4102
  R(Wn, (e) => {
4099
4103
  Pt.value = e?.rId ?? null, e && Fn.clearOverlay();
4100
4104
  }, { immediate: !0 });
4101
- let ar = Wi({
4105
+ let ar = Yi({
4102
4106
  editorView: Y,
4103
4107
  showOutline: kt,
4104
4108
  showSidebar: W,
@@ -4106,7 +4110,7 @@ var la = (e) => {
4106
4110
  activeSidebarItem: Nt,
4107
4111
  extractCommentsAndChanges: () => {},
4108
4112
  scrollToVisiblePosition: Jn
4109
- }), { contextMenu: or, imageContextMenu: sr, imageContextMenuTextActions: cr, customTextMenuItems: lr, handleContextMenu: ur, handleSelectedImageContextMenu: dr, handleImageWrapSelect: fr, handleContextMenuAction: pr } = Ti({
4113
+ }), { contextMenu: or, imageContextMenu: sr, imageContextMenuTextActions: cr, customTextMenuItems: lr, handleContextMenu: ur, handleSelectedImageContextMenu: dr, handleImageWrapSelect: fr, handleContextMenuAction: pr } = Ai({
4110
4114
  editorView: X,
4111
4115
  selectedImage: kn,
4112
4116
  zoom: K,
@@ -4121,7 +4125,7 @@ var la = (e) => {
4121
4125
  onCopy: () => f.onCopy?.(),
4122
4126
  onCut: () => f.onCut?.(),
4123
4127
  onPaste: () => f.onPaste?.()
4124
- }), mr = o(Y, H, J), hr = S(() => mr.value.entries), Z = mi({
4128
+ }), mr = o(Y, H, J), hr = S(() => mr.value.entries), Z = yi({
4125
4129
  editor: J,
4126
4130
  editorView: Y,
4127
4131
  getDocument: pn,
@@ -4135,7 +4139,7 @@ var la = (e) => {
4135
4139
  reLayout: Sn,
4136
4140
  readOnly: () => A.value,
4137
4141
  onReadOnlyEditAttempt: me
4138
- }), gr = Z.comments, Q = pi({
4142
+ }), gr = Z.comments, Q = vi({
4139
4143
  editorView: Y,
4140
4144
  pagesViewport: tt,
4141
4145
  pagesContainer: B,
@@ -4183,7 +4187,7 @@ var la = (e) => {
4183
4187
  function wr(e) {
4184
4188
  navigator.clipboard?.writeText(e), In.value = null;
4185
4189
  }
4186
- let Tr = S(() => ci(rn.value)), Er = S(() => Tr.value.sectionProperties), Dr = S(() => Tr.value.watermark), Or = S(() => Tr.value.styles), kr = S(() => {
4190
+ let Tr = S(() => pi(rn.value)), Er = S(() => Tr.value.sectionProperties), Dr = S(() => Tr.value.watermark), Or = S(() => Tr.value.styles), kr = S(() => {
4187
4191
  H.value;
4188
4192
  let e = X.value;
4189
4193
  if (!e) return {};
@@ -4256,7 +4260,7 @@ var la = (e) => {
4256
4260
  transform: K.value === 1 ? void 0 : `scale(${K.value})`,
4257
4261
  transformOrigin: "top center",
4258
4262
  transition: "transform 0.2s ease"
4259
- })), { handleApplyStyle: Jr, handleInsertSymbol: Yr, handleInsertSectionBreakNextPage: Xr, handleInsertSectionBreakContinuous: Zr } = Bi({
4263
+ })), { handleApplyStyle: Jr, handleInsertSymbol: Yr, handleInsertSectionBreakNextPage: Xr, handleInsertSectionBreakContinuous: Zr } = Gi({
4260
4264
  editorView: X,
4261
4265
  getDocument: Tn
4262
4266
  });
@@ -4297,7 +4301,7 @@ var la = (e) => {
4297
4301
  let e = Y.value;
4298
4302
  e && (pt(e, { title: F("toolbar.tableOfContents") }), e.focus());
4299
4303
  }
4300
- let { handlePageSetupApply: ni, handleLeftMarginChange: ri, handleRightMarginChange: ii, handleTopMarginChange: ai, handleBottomMarginChange: oi, handleIndentLeftChange: si, handleIndentRightChange: li, handleFirstLineIndentChange: ui, handleTabStopRemove: di } = Gi({
4304
+ let { handlePageSetupApply: ni, handleLeftMarginChange: ri, handleRightMarginChange: ii, handleTopMarginChange: ai, handleBottomMarginChange: oi, handleIndentLeftChange: si, handleIndentRightChange: ci, handleFirstLineIndentChange: li, handleTabStopRemove: ui } = Xi({
4301
4305
  editorView: X,
4302
4306
  getDocument: pn,
4303
4307
  readOnly: A,
@@ -4308,7 +4312,7 @@ var la = (e) => {
4308
4312
  let t = J.applyCanonicalSectionProperties(e);
4309
4313
  return t === null ? "unhandled" : t.status;
4310
4314
  }
4311
- }), fi = S(() => {
4315
+ }), di = S(() => {
4312
4316
  H.value;
4313
4317
  let e = X.value, t = e ? yt(e.state).paragraphFormatting : {};
4314
4318
  return {
@@ -4319,10 +4323,10 @@ var la = (e) => {
4319
4323
  tabs: t.tabs ?? null
4320
4324
  };
4321
4325
  });
4322
- function hi(e) {
4326
+ function fi(e) {
4323
4327
  b.value !== e && (b.value = e, f.onModeChange?.(e), h("mode-change", e));
4324
4328
  }
4325
- function gi(e) {
4329
+ function mi(e) {
4326
4330
  switch (e) {
4327
4331
  case "find":
4328
4332
  case "findReplace":
@@ -4362,15 +4366,15 @@ var la = (e) => {
4362
4366
  }
4363
4367
  h("menu-action", e);
4364
4368
  }
4365
- function _i(e) {
4369
+ function hi(e) {
4366
4370
  if (A.value) return;
4367
4371
  let t = pn();
4368
4372
  t && J.applyCanonicalOperations(je(t, e)) && (_n(), Sn());
4369
4373
  }
4370
- function vi(e, t) {
4374
+ function gi(e, t) {
4371
4375
  $r(e, t);
4372
4376
  }
4373
- function yi(e) {
4377
+ function _i(e) {
4374
4378
  let t = X.value, n = xn().setNumberingValue;
4375
4379
  !A.value && t && n && (U(t, n(e)), t.focus());
4376
4380
  }
@@ -4379,7 +4383,7 @@ var la = (e) => {
4379
4383
  t && n && (U(t, n(e)), t.focus());
4380
4384
  }
4381
4385
  let xi = P(!1);
4382
- Ei({
4386
+ ji({
4383
4387
  documentBuffer: () => f.documentBuffer ?? null,
4384
4388
  document: () => f.document ?? null,
4385
4389
  loadDocumentBuffer: un,
@@ -4430,7 +4434,7 @@ var la = (e) => {
4430
4434
  let n = J.on("selectionChange", () => {
4431
4435
  H.value++, Q.updateFloatingButton();
4432
4436
  }), r = J.on("docChange", () => {
4433
- H.value++, Di.searchText.value && Di.scheduleSearch(), ar.recomputeHeadingsIfOpen();
4437
+ H.value++, Ti.searchText.value && Ti.scheduleSearch(), ar.recomputeHeadingsIfOpen();
4434
4438
  }), i = J.on("layoutComplete", () => {
4435
4439
  H.value++, requestAnimationFrame(Vr);
4436
4440
  }), a = Hn.install(), o = St(() => f.onFontsLoaded?.());
@@ -4438,7 +4442,7 @@ var la = (e) => {
4438
4442
  t.disconnect(), n(), r(), i(), a(), o();
4439
4443
  });
4440
4444
  });
4441
- let Di = a({
4445
+ let Ti = a({
4442
4446
  editorView: Y,
4443
4447
  pagesRef: B,
4444
4448
  getDocument: () => {
@@ -4468,13 +4472,13 @@ var la = (e) => {
4468
4472
  }
4469
4473
  });
4470
4474
  R(nn, () => {
4471
- Di.searchText.value && Di.scheduleSearch();
4475
+ Ti.searchText.value && Ti.scheduleSearch();
4472
4476
  }), R(gr, () => {
4473
- Di.searchText.value && Di.scheduleSearch();
4477
+ Ti.searchText.value && Ti.scheduleSearch();
4474
4478
  }), R($t, (e) => {
4475
- e || Di.clear();
4479
+ e || Ti.clear();
4476
4480
  });
4477
- let { exposed: ki } = Oi({
4481
+ let { exposed: Ei } = Ni({
4478
4482
  getReadOnlyReason: () => de.value,
4479
4483
  markupView: C,
4480
4484
  editor: J,
@@ -4519,27 +4523,27 @@ var la = (e) => {
4519
4523
  closeNoteStory: yn,
4520
4524
  getHeaderFooterView: gn,
4521
4525
  setZoom: Vt,
4522
- search: Di,
4526
+ search: Ti,
4523
4527
  openFindReplace: () => {
4524
4528
  ct.value = !0;
4525
4529
  },
4526
4530
  onPrint: f.onPrint,
4527
4531
  onSave: f.onSave
4528
- }), Ai = S(() => {
4532
+ }), Di = S(() => {
4529
4533
  H.value;
4530
- let e = ki.getEditorRef();
4534
+ let e = Ei.getEditorRef();
4531
4535
  return {
4532
4536
  canUndo: e?.canUndo() ?? !1,
4533
4537
  canRedo: e?.canRedo() ?? !1
4534
4538
  };
4535
4539
  });
4536
- function ji() {
4537
- ki.undo(), X.value?.focus();
4540
+ function Oi() {
4541
+ Ei.undo(), X.value?.focus();
4538
4542
  }
4539
- function Mi() {
4540
- ki.redo(), X.value?.focus();
4543
+ function ki() {
4544
+ Ei.redo(), X.value?.focus();
4541
4545
  }
4542
- return t(ki), (t, n) => (N(), E("div", {
4546
+ return t(Ei), (t, n) => (N(), E("div", {
4543
4547
  ref_key: "rootRef",
4544
4548
  ref: Re,
4545
4549
  class: j([
@@ -4555,15 +4559,15 @@ var la = (e) => {
4555
4559
  "data-folio-locale-pending": !we.value || void 0,
4556
4560
  "aria-busy": L(Ce).type === "loading" || void 0
4557
4561
  }, [
4558
- L(Ce).type === "failed" ? (N(), E("div", Vo, I(L(Ce).error.message), 1)) : we.value ? T("", !0) : (N(), w(L(pa), {
4562
+ L(Ce).type === "failed" ? (N(), E("div", Ko, I(L(Ce).error.message), 1)) : we.value ? T("", !0) : (N(), w(L(va), {
4559
4563
  key: 1,
4560
4564
  class: "docx-editor-vue__locale-loading"
4561
4565
  })),
4562
- D("div", Ho, [O(Ua, {
4566
+ D("div", qo, [O(Ja, {
4563
4567
  "show-table-insert": f.showTableInsert !== !1,
4564
4568
  onRename: n[0] ||= (e) => h("rename", e),
4565
- onMenuAction: gi,
4566
- onInsertTable: vi
4569
+ onMenuAction: mi,
4570
+ onInsertTable: gi
4567
4571
  }, {
4568
4572
  "title-bar-left": De(() => [xe(t.$slots, "title-bar-left", {}, void 0, !0)]),
4569
4573
  "title-bar-right": De(() => [xe(t.$slots, "title-bar-right", {}, void 0, !0)]),
@@ -4573,10 +4577,10 @@ var la = (e) => {
4573
4577
  view: X.value,
4574
4578
  "get-commands": L(xn),
4575
4579
  "state-tick": H.value,
4576
- "can-undo": Ai.value.canUndo,
4577
- "can-redo": Ai.value.canRedo,
4578
- "on-undo": ji,
4579
- "on-redo": Mi,
4580
+ "can-undo": Di.value.canUndo,
4581
+ "can-redo": Di.value.canRedo,
4582
+ "on-undo": Oi,
4583
+ "on-redo": ki,
4580
4584
  "zoom-percent": L(zt),
4581
4585
  "is-min-zoom": L(q),
4582
4586
  "is-max-zoom": L(Bt),
@@ -4605,7 +4609,7 @@ var la = (e) => {
4605
4609
  onZoomOut: L(Ut),
4606
4610
  onZoomSet: L(Vt),
4607
4611
  onToggleSidebar: Ur,
4608
- onModeChange: hi,
4612
+ onModeChange: fi,
4609
4613
  onToggleTrackChanges: ge,
4610
4614
  "onUpdate:displayMode": ye,
4611
4615
  onImageProperties: n[6] ||= (e) => mt.value = !0,
@@ -4633,8 +4637,8 @@ var la = (e) => {
4633
4637
  }, null, 8, ["node"])) : T("", !0)], !0)]),
4634
4638
  key: "0"
4635
4639
  } : void 0]), 1040, /* @__PURE__ */ "view.get-commands.state-tick.can-undo.can-redo.zoom-percent.is-min-zoom.is-max-zoom.zoom-presets.show-zoom-control.editor-mode.show-review-controls.track-changes-on.display-mode.read-only.comments-sidebar-open.outline-drawer.outline-drawer-open.comment-count.image-context.theme.onApplyStyle.onZoomIn.onZoomOut.onZoomSet.onImageWrapType.onImageTransform".split("."))) : T("", !0)]),
4636
- O(Ra, {
4637
- search: L(Di),
4640
+ O(Ua, {
4641
+ search: L(Ti),
4638
4642
  "show-find-replace": ct.value,
4639
4643
  "onUpdate:showFindReplace": n[7] ||= (e) => ct.value = e,
4640
4644
  "show-hyperlink": ut.value,
@@ -4662,8 +4666,8 @@ var la = (e) => {
4662
4666
  onHyperlinkRemove: L(Rn),
4663
4667
  onPageSetupApply: L(ni),
4664
4668
  onTablePropertiesApply: bi,
4665
- onWatermarkApply: _i,
4666
- onNumberingValueApply: yi
4669
+ onWatermarkApply: hi,
4670
+ onNumberingValueApply: _i
4667
4671
  }, null, 8, [
4668
4672
  "search",
4669
4673
  "show-find-replace",
@@ -4685,14 +4689,14 @@ var la = (e) => {
4685
4689
  "onHyperlinkRemove",
4686
4690
  "onPageSetupApply"
4687
4691
  ]),
4688
- L(tn) ? (N(), E("div", Uo, I(L(tn)), 1)) : we.value && Dn.value ? (N(), E("div", Wo, [xe(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (N(), w(Te, {
4692
+ L(tn) ? (N(), E("div", Jo, I(L(tn)), 1)) : we.value && Dn.value ? (N(), E("div", Yo, [xe(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (N(), w(Te, {
4689
4693
  key: 0,
4690
4694
  node: e.loadingIndicator
4691
- }, null, 8, ["node"])) : (N(), E(x, { key: 1 }, [fe(I(L(F)("loadingDocument")), 1)], 64))], !0)])) : !L($t) && !Fe.value ? (N(), E("div", Go, [xe(t.$slots, "placeholder", {}, () => [e.placeholder ? (N(), w(Te, {
4695
+ }, null, 8, ["node"])) : (N(), E(x, { key: 1 }, [fe(I(L(F)("loadingDocument")), 1)], 64))], !0)])) : !L($t) && !Fe.value ? (N(), E("div", Xo, [xe(t.$slots, "placeholder", {}, () => [e.placeholder ? (N(), w(Te, {
4692
4696
  key: 0,
4693
4697
  node: e.placeholder
4694
4698
  }, null, 8, ["node"])) : (N(), E(x, { key: 1 }, [fe("No document loaded")], 64))], !0)])) : T("", !0),
4695
- L(ee) ? (N(), E("div", Ko, I(L(ee)), 1)) : T("", !0),
4699
+ L(ee) ? (N(), E("div", Zo, I(L(ee)), 1)) : T("", !0),
4696
4700
  D("div", { class: j(["docx-editor-vue__hidden-pm-wrapper", L(Ie)]) }, [D("div", {
4697
4701
  ref_key: "hiddenPmRef",
4698
4702
  ref: Ke,
@@ -4712,7 +4716,7 @@ var la = (e) => {
4712
4716
  "data-folio-outline": $.value.outline,
4713
4717
  "data-folio-comments": $.value.comments
4714
4718
  }, [
4715
- $.value.outline === "column" || $.value.outline === "rail" || $.value.outline === "expanded" ? (N(), w(La, {
4719
+ $.value.outline === "column" || $.value.outline === "rail" || $.value.outline === "expanded" ? (N(), w(Ha, {
4716
4720
  key: 0,
4717
4721
  headings: Rt.value,
4718
4722
  available: Lt.value.length > 1,
@@ -4758,18 +4762,18 @@ var la = (e) => {
4758
4762
  zoom: L(K),
4759
4763
  unit: e.rulerUnit ?? "inch",
4760
4764
  editable: !A.value,
4761
- "indent-left": fi.value.indentLeft,
4762
- "indent-right": fi.value.indentRight,
4763
- "first-line-indent": fi.value.firstLineIndent,
4764
- "hanging-indent": fi.value.hangingIndent,
4765
+ "indent-left": di.value.indentLeft,
4766
+ "indent-right": di.value.indentRight,
4767
+ "first-line-indent": di.value.firstLineIndent,
4768
+ "hanging-indent": di.value.hangingIndent,
4765
4769
  "show-first-line-indent": !0,
4766
- "tab-stops": fi.value.tabs,
4770
+ "tab-stops": di.value.tabs,
4767
4771
  onLeftMarginChange: L(ri),
4768
4772
  onRightMarginChange: L(ii),
4769
4773
  onIndentLeftChange: L(si),
4770
- onIndentRightChange: L(li),
4771
- onFirstLineIndentChange: L(ui),
4772
- onTabStopRemove: L(di)
4774
+ onIndentRightChange: L(ci),
4775
+ onFirstLineIndentChange: L(li),
4776
+ onTabStopRemove: L(ui)
4773
4777
  }, null, 8, [
4774
4778
  "section-props",
4775
4779
  "zoom",
@@ -4787,7 +4791,7 @@ var la = (e) => {
4787
4791
  "onFirstLineIndentChange",
4788
4792
  "onTabStopRemove"
4789
4793
  ])], 4)) : T("", !0),
4790
- ot.value && !A.value ? (N(), E("div", Jo, [O(L(u), {
4794
+ ot.value && !A.value ? (N(), E("div", $o, [O(L(u), {
4791
4795
  "section-props": Er.value,
4792
4796
  zoom: L(K),
4793
4797
  unit: e.rulerUnit ?? "inch",
@@ -4815,14 +4819,14 @@ var la = (e) => {
4815
4819
  onDblclick: n[27] ||= (...e) => L(Qn) && L(Qn)(...e),
4816
4820
  onContextmenu: n[28] ||= z((...e) => L(ur) && L(ur)(...e), ["prevent"])
4817
4821
  }, [
4818
- D("div", Yo, [
4822
+ D("div", es, [
4819
4823
  D("div", {
4820
4824
  ref_key: "pagesRef",
4821
4825
  ref: B,
4822
4826
  class: j(["docx-editor-vue__pages paged-editor__pages", L(Wn) ? `paged-editor--hf-editing paged-editor--editing-${L(Wn).position}` : ""]),
4823
4827
  style: M(qr.value)
4824
4828
  }, null, 6),
4825
- O(go, {
4829
+ O(xo, {
4826
4830
  "editor-view": rr(),
4827
4831
  "hidden-container": Je.value,
4828
4832
  "pages-container": B.value,
@@ -4835,8 +4839,8 @@ var la = (e) => {
4835
4839
  "selection",
4836
4840
  "zoom"
4837
4841
  ]),
4838
- D("div", Xo, [
4839
- O(ha, {
4842
+ D("div", ts, [
4843
+ O(ba, {
4840
4844
  "get-highlights": wn,
4841
4845
  "get-pages-container": () => B.value,
4842
4846
  "editor-state": L(Yt),
@@ -4862,7 +4866,7 @@ var la = (e) => {
4862
4866
  "selected-canonical",
4863
4867
  "selection-seq"
4864
4868
  ]),
4865
- O(xo, {
4869
+ O(Eo, {
4866
4870
  range: at.value,
4867
4871
  "get-pages-container": () => B.value,
4868
4872
  zoom: L(K),
@@ -4877,7 +4881,7 @@ var la = (e) => {
4877
4881
  "blocks",
4878
4882
  "measures"
4879
4883
  ]),
4880
- f.showTemplateDirectives ? (N(), w(ko, {
4884
+ f.showTemplateDirectives ? (N(), w(Po, {
4881
4885
  key: 0,
4882
4886
  "get-view": () => L(Y),
4883
4887
  "get-pages-container": () => B.value,
@@ -4895,7 +4899,7 @@ var la = (e) => {
4895
4899
  "blocks",
4896
4900
  "measures"
4897
4901
  ])) : T("", !0),
4898
- O(ya, {
4902
+ O(wa, {
4899
4903
  "get-pages-container": () => B.value,
4900
4904
  "editor-state": L(Yt),
4901
4905
  zoom: L(K),
@@ -4910,7 +4914,7 @@ var la = (e) => {
4910
4914
  "suggestion",
4911
4915
  "editor-position-at"
4912
4916
  ]),
4913
- O(wa, {
4917
+ O(ka, {
4914
4918
  "get-view": () => L(Y),
4915
4919
  "get-pages-container": () => B.value,
4916
4920
  zoom: L(K),
@@ -4925,7 +4929,7 @@ var la = (e) => {
4925
4929
  ])
4926
4930
  ])
4927
4931
  ]),
4928
- L(Wn) ? (N(), w(vo, {
4932
+ L(Wn) ? (N(), w(Co, {
4929
4933
  key: 0,
4930
4934
  edit: L(Wn),
4931
4935
  "get-view": rr,
@@ -4940,15 +4944,15 @@ var la = (e) => {
4940
4944
  class: "docx-editor-vue__note-editor",
4941
4945
  "aria-label": En.value,
4942
4946
  onKeydown: n[17] ||= ke(z((...e) => L(yn) && L(yn)(...e), ["stop", "prevent"]), ["esc"])
4943
- }, [D("header", Qo, [D("span", null, I(En.value), 1), D("button", {
4947
+ }, [D("header", rs, [D("span", null, I(En.value), 1), D("button", {
4944
4948
  type: "button",
4945
4949
  "aria-label": L(F)("common.closeDialog"),
4946
4950
  onClick: n[16] ||= (...e) => L(yn) && L(yn)(...e)
4947
- }, " × ", 8, $o)]), D("div", {
4951
+ }, " × ", 8, is)]), D("div", {
4948
4952
  ref_key: "notePmRef",
4949
4953
  ref: Ft,
4950
4954
  class: "docx-editor-vue__note-editor-host"
4951
- }, null, 512)], 40, Zo), [[Ee, L(Qt)]]),
4955
+ }, null, 512)], 40, ns), [[Ee, L(Qt)]]),
4952
4956
  Pn.value ? (N(), w(L(d), {
4953
4957
  key: 1,
4954
4958
  "image-info": L(kn),
@@ -4964,7 +4968,7 @@ var la = (e) => {
4964
4968
  "view",
4965
4969
  "onContextMenu"
4966
4970
  ])) : T("", !0),
4967
- O(zo, {
4971
+ O(Wo, {
4968
4972
  data: L(In),
4969
4973
  "read-only": A.value,
4970
4974
  onNavigate: L(zn),
@@ -4989,7 +4993,7 @@ var la = (e) => {
4989
4993
  }),
4990
4994
  "aria-label": L(Un).type === "row" ? "Insert row" : "Insert column",
4991
4995
  onMousedown: n[22] ||= (...e) => L($n) && L($n)(...e)
4992
- }, " + ", 44, es)) : T("", !0),
4996
+ }, " + ", 44, as)) : T("", !0),
4993
4997
  O(ne, {
4994
4998
  comments: L(gr),
4995
4999
  "pages-container": B.value,
@@ -5067,7 +5071,7 @@ var la = (e) => {
5067
5071
  size: 18
5068
5072
  })], 36)) : T("", !0)
5069
5073
  ], 36),
5070
- L(Gn).totalPages > 1 ? (N(), w(yo, {
5074
+ L(Gn).totalPages > 1 ? (N(), w(wo, {
5071
5075
  key: 2,
5072
5076
  "current-page": L(Gn).currentPage,
5073
5077
  "total-pages": L(Gn).totalPages,
@@ -5085,8 +5089,8 @@ var la = (e) => {
5085
5089
  "aria-hidden": "true",
5086
5090
  onMousedown: z(Hr, ["prevent"])
5087
5091
  }, null, 32)) : T("", !0)
5088
- ], 8, qo),
5089
- O(ho, {
5092
+ ], 8, Qo),
5093
+ O(bo, {
5090
5094
  "read-only": A.value,
5091
5095
  "context-menu": L(or),
5092
5096
  "image-context-menu": L(sr),
@@ -5108,7 +5112,7 @@ var la = (e) => {
5108
5112
  "onContextMenuAction",
5109
5113
  "onImageWrapSelect"
5110
5114
  ]),
5111
- O(Ca, {
5115
+ O(Oa, {
5112
5116
  "event-root": A.value ? null : B.value,
5113
5117
  view: L(Y),
5114
5118
  onRefused: L(te)
@@ -5117,38 +5121,38 @@ var la = (e) => {
5117
5121
  "view",
5118
5122
  "onRefused"
5119
5123
  ])
5120
- ], 14, Bo));
5124
+ ], 14, Go));
5121
5125
  }
5122
- }), [["__scopeId", "data-v-a7b741c3"]]);
5126
+ }), [["__scopeId", "data-v-1044227e"]]);
5123
5127
  // src/utils/listState.ts
5124
- function ns() {
5128
+ function ss() {
5125
5129
  return V;
5126
5130
  }
5127
5131
  // src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
5128
- var rs = ["aria-label"], is = ["aria-label"], as = [
5132
+ var cs = ["aria-label"], ls = ["aria-label"], us = [
5129
5133
  "disabled",
5130
5134
  "title",
5131
5135
  "aria-label"
5132
- ], os = [
5136
+ ], ds = [
5133
5137
  "disabled",
5134
5138
  "title",
5135
5139
  "aria-label"
5136
- ], ss = ["aria-label"], cs = [
5140
+ ], fs = ["aria-label"], ps = [
5137
5141
  "disabled",
5138
5142
  "title",
5139
5143
  "aria-label",
5140
5144
  "aria-pressed"
5141
- ], ls = [
5145
+ ], ms = [
5142
5146
  "disabled",
5143
5147
  "title",
5144
5148
  "aria-label",
5145
5149
  "aria-pressed"
5146
- ], us = [
5150
+ ], hs = [
5147
5151
  "disabled",
5148
5152
  "title",
5149
5153
  "aria-label",
5150
5154
  "aria-pressed"
5151
- ], ds = /*#__PURE__*/ p(/* @__PURE__ */ A({
5155
+ ], gs = /*#__PURE__*/ p(/* @__PURE__ */ A({
5152
5156
  __name: "FormattingBar",
5153
5157
  props: {
5154
5158
  currentFormatting: {},
@@ -5190,7 +5194,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5190
5194
  "redo"
5191
5195
  ],
5192
5196
  setup(e, { emit: t }) {
5193
- let { ColorPicker: n } = d(), r = e, i = t, { t: a } = u(), o = S(() => r.currentFormatting ?? {}), s = S(() => r.documentStyles ? { styles: r.documentStyles } : {}), c = S(() => o.value.listState ?? ns()), l = S(() => {
5197
+ let { ColorPicker: n } = d(), r = e, i = t, { t: a } = u(), o = S(() => r.currentFormatting ?? {}), s = S(() => r.documentStyles ? { styles: r.documentStyles } : {}), c = S(() => o.value.listState ?? ss()), l = S(() => {
5194
5198
  let e = o.value.color;
5195
5199
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
5196
5200
  }), f = S(() => ht(c.value) > 0 || (o.value.indentLeft ?? 0) > 0);
@@ -5220,7 +5224,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5220
5224
  }, [O(m, {
5221
5225
  name: "undo",
5222
5226
  size: 18
5223
- })], 40, as), D("button", {
5227
+ })], 40, us), D("button", {
5224
5228
  type: "button",
5225
5229
  class: "docx-formatting-bar__btn",
5226
5230
  disabled: e.disabled || !e.canRedo,
@@ -5230,7 +5234,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5230
5234
  }, [O(m, {
5231
5235
  name: "redo",
5232
5236
  size: 18
5233
- })], 40, os)], 8, is),
5237
+ })], 40, ds)], 8, ls),
5234
5238
  r[13] ||= D("span", {
5235
5239
  class: "docx-formatting-bar__divider",
5236
5240
  role: "separator"
@@ -5261,7 +5265,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5261
5265
  }, [O(m, {
5262
5266
  name: "format_bold",
5263
5267
  size: 18
5264
- })], 42, cs),
5268
+ })], 42, ps),
5265
5269
  D("button", {
5266
5270
  type: "button",
5267
5271
  class: j(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": o.value.italic }]),
@@ -5273,7 +5277,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5273
5277
  }, [O(m, {
5274
5278
  name: "format_italic",
5275
5279
  size: 18
5276
- })], 42, ls),
5280
+ })], 42, ms),
5277
5281
  D("button", {
5278
5282
  type: "button",
5279
5283
  class: j(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": o.value.underline }]),
@@ -5285,8 +5289,8 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5285
5289
  }, [O(m, {
5286
5290
  name: "format_underlined",
5287
5291
  size: 18
5288
- })], 42, us)
5289
- ], 8, ss),
5292
+ })], 42, hs)
5293
+ ], 8, fs),
5290
5294
  e.showTextColorPicker ? (N(), E(x, { key: 1 }, [r[12] ||= D("span", {
5291
5295
  class: "docx-formatting-bar__divider",
5292
5296
  role: "separator"
@@ -5328,9 +5332,9 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5328
5332
  "disabled",
5329
5333
  "can-outdent"
5330
5334
  ])) : T("", !0)
5331
- ], 10, rs));
5335
+ ], 10, cs));
5332
5336
  }
5333
- }), [["__scopeId", "data-v-ad0aef02"]]), fs = [
5337
+ }), [["__scopeId", "data-v-ad0aef02"]]), _s = [
5334
5338
  {
5335
5339
  value: .5,
5336
5340
  label: "50%"
@@ -5355,7 +5359,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5355
5359
  value: 2,
5356
5360
  label: "200%"
5357
5361
  }
5358
- ], ps = /*#__PURE__*/ p(/* @__PURE__ */ A({
5362
+ ], vs = /*#__PURE__*/ p(/* @__PURE__ */ A({
5359
5363
  __name: "ZoomControl",
5360
5364
  props: {
5361
5365
  value: { default: 1 },
@@ -5372,7 +5376,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5372
5376
  },
5373
5377
  emits: ["change"],
5374
5378
  setup(e, { emit: t }) {
5375
- let { Select: n } = d(), r = e, i = t, a = S(() => r.levels ?? fs), o = S(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = S(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = S(() => o.value ? String(o.value.value) : String(r.value)), l = S(() => {
5379
+ let { Select: n } = d(), r = e, i = t, a = S(() => r.levels ?? _s), o = S(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = S(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = S(() => o.value ? String(o.value.value) : String(r.value)), l = S(() => {
5376
5380
  let e = a.value.map((e) => ({
5377
5381
  value: String(e.value),
5378
5382
  label: e.label
@@ -5400,7 +5404,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5400
5404
  "disabled"
5401
5405
  ]));
5402
5406
  }
5403
- }), [["__scopeId", "data-v-8169335f"]]), ms = (e, n, r = {}) => {
5407
+ }), [["__scopeId", "data-v-8169335f"]]), ys = (e, n, r = {}) => {
5404
5408
  let { colorMode: a = i, locale: o = "en", ...s } = r;
5405
5409
  return new Promise((r, i) => {
5406
5410
  let c = P(null), l = null, u = !1, d = P(J(o) !== void 0), f = {
@@ -5428,7 +5432,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5428
5432
  s.onError?.(e), u || (u = !0, l?.unmount(), l = null, i(e));
5429
5433
  };
5430
5434
  l = C({ setup() {
5431
- return () => d.value ? pe(ts, {
5435
+ return () => d.value ? pe(os, {
5432
5436
  ...s,
5433
5437
  documentBuffer: e,
5434
5438
  ref: c,
@@ -5436,7 +5440,7 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5436
5440
  u || (u = !0, r(f));
5437
5441
  },
5438
5442
  onError: p
5439
- }) : pe(pa, {
5443
+ }) : pe(va, {
5440
5444
  class: s.className,
5441
5445
  style: s.style
5442
5446
  });
@@ -5447,4 +5451,4 @@ var rs = ["aria-label"], is = ["aria-label"], as = [
5447
5451
  });
5448
5452
  });
5449
5453
  };
5450
- export { _a as AutocompleteCaretOverlay, qr as DEFAULT_AI_SUGGESTION_PRESETS, Wr as DOCUMENT_PRESET_VERSION, Gr as DOCUMENT_STYLE_SET_VERSION, ts as DocxEditor, h as FolioUIProvider, ds as FormattingBar, Vr as STELLA_STYLE_SET_NAME, ps as ZoomControl, Jr as applySuggestions, Zr as buildPositionalText, sn as clearTemplateSlashMenu, t as colorModePlugin, cn as consumeTemplateSlashQuery, ni as createAICitationDecorationsPlugin, Kr as createDocx, Ir as createEmptyDocument, _n as createFolioAIEditSnapshot, Hr as createStellaStyleDocumentPreset, Ur as createStellaStyleSet, i as defaultColorMode, _ as defaultLocale, Xn as deriveBlockId, xn as diffWordSegments, Lr as extractDocumentStyleSet, Rr as extractDocumentStyleSetFromDocx, ai as fromMarkdown, kt as getDocumentWatermark, ei as getFolioCaretViewportRect, Zn as getFolioParaIdFromBlockId, ti as getFolioSelectionViewportRect, nn as getTemplateDirectives, ln as getTemplateSlashMenu, Tn as hashFolioAIBlockText, y as i18nPlugin, H as insertImageFromFile, ct as insertPageBreakInView, ut as insertTableInView, ft as insertTableOfContentsInView, zr as inspectDocumentStyles, Br as inspectDocumentStylesFromDocx, $n as isFolioBlockId, er as isSequentialFolioBlockId, Yr as isSuggestionStale, X as normalizeFolioAIBlockText, l as provideColorMode, f as provideLocale, ms as renderAsync, un as resetTemplateSlashQuery, Xr as resolveSuggestionAnchor, an as scanDirectives, Tr as scrollFolioPositionIntoView, ri as setAICitationsMeta, Qr as setAISuggestionsMeta, ii as setActiveCitationMeta, jt as setDocumentWatermark, $r as setFocusedSuggestionMeta, on as setTemplatePreviewValues, dn as templateSlashMenuKey, oi as toMarkdown, si as toMarkdownResult, n as useColorMode, u as useTranslation, c as useWheelZoom };
5454
+ export { Sa as AutocompleteCaretOverlay, qr as DEFAULT_AI_SUGGESTION_PRESETS, Wr as DOCUMENT_PRESET_VERSION, Gr as DOCUMENT_STYLE_SET_VERSION, os as DocxEditor, h as FolioUIProvider, gs as FormattingBar, oi as HYPHENATION_DICTIONARY_IDS, si as HyphenationDictionaryError, Vr as STELLA_STYLE_SET_NAME, vs as ZoomControl, Jr as applySuggestions, Zr as buildPositionalText, sn as clearTemplateSlashMenu, t as colorModePlugin, ci as configureHyphenationAssets, ai as configureTiffDecoding, cn as consumeTemplateSlashQuery, ni as createAICitationDecorationsPlugin, Kr as createDocx, Ir as createEmptyDocument, _n as createFolioAIEditSnapshot, Hr as createStellaStyleDocumentPreset, Ur as createStellaStyleSet, i as defaultColorMode, _ as defaultLocale, Xn as deriveBlockId, xn as diffWordSegments, Lr as extractDocumentStyleSet, Rr as extractDocumentStyleSetFromDocx, ui as fromMarkdown, kt as getDocumentWatermark, ei as getFolioCaretViewportRect, Zn as getFolioParaIdFromBlockId, ti as getFolioSelectionViewportRect, nn as getTemplateDirectives, ln as getTemplateSlashMenu, Tn as hashFolioAIBlockText, y as i18nPlugin, H as insertImageFromFile, ct as insertPageBreakInView, ut as insertTableInView, ft as insertTableOfContentsInView, zr as inspectDocumentStyles, Br as inspectDocumentStylesFromDocx, $n as isFolioBlockId, er as isSequentialFolioBlockId, Yr as isSuggestionStale, X as normalizeFolioAIBlockText, li as preloadHyphenationDictionaries, l as provideColorMode, f as provideLocale, ys as renderAsync, un as resetTemplateSlashQuery, Xr as resolveSuggestionAnchor, an as scanDirectives, Tr as scrollFolioPositionIntoView, ri as setAICitationsMeta, Qr as setAISuggestionsMeta, ii as setActiveCitationMeta, jt as setDocumentWatermark, $r as setFocusedSuggestionMeta, on as setTemplatePreviewValues, dn as templateSlashMenuKey, di as toMarkdown, fi as toMarkdownResult, n as useColorMode, u as useTranslation, c as useWheelZoom };