@stll/folio-vue 0.11.2 → 0.11.3

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,8 +1,8 @@
1
- import { A as e, F as t, M as n, N as r, P as i, _ as a, c as o, d as s, f as c, g as l, j as u, l as d, m as f, p, u as m, y as h } from "./SplitCellDialog-BhI4fYJv.js";
2
- import { D as g, E as _, d as v, f as y, i as b, n as x, r as ee, t as te, v as ne, w as re, y as ie } from "./ListButtons-BTUUFlMO.js";
1
+ import { A as e, F as t, M as n, N as r, P as i, _ as a, c as o, d as s, f as c, g as l, j as u, l as d, m as f, p, u as m, y as h } from "./SplitCellDialog-gik8BmFh.js";
2
+ import { D as g, E as _, d as v, f as y, i as b, n as x, r as ee, t as te, v as ne, w as re, y as ie } from "./ListButtons-BIbTi82v.js";
3
3
  import { t as ae } from "./zIndex-Ei9BbHSW.js";
4
- import { a as S, c as oe, i as se, l as C, o as ce, r as le, s as ue, t as de, u as fe } from "./useZoom-DwDDS7hq.js";
5
- import { FindReplaceDialog as pe, FootnotePropertiesDialog as me, HyperlinkDialog as he, ImagePositionDialog as w, ImagePropertiesDialog as ge, InsertImageDialog as T, InsertSymbolDialog as E, InsertTableDialog as _e, PageSetupDialog as ve, PasteSpecialDialog as ye, SplitCellDialog as be, TablePropertiesDialog as xe, WatermarkDialog as D } from "./dialogs.js";
4
+ import { a as S, c as C, i as oe, l as w, o as se, r as ce, s as le, t as ue, u as de } from "./useZoom-DwDDS7hq.js";
5
+ import { FindReplaceDialog as fe, FootnotePropertiesDialog as pe, HyperlinkDialog as me, ImagePositionDialog as T, ImagePropertiesDialog as he, InsertImageDialog as ge, InsertSymbolDialog as E, InsertTableDialog as _e, PageSetupDialog as ve, PasteSpecialDialog as ye, SplitCellDialog as be, TablePropertiesDialog as xe, WatermarkDialog as D } from "./dialogs.js";
6
6
  import { Fragment as O, Teleport as k, computed as A, createApp as Se, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createSlots as Ce, createStaticVNode as we, createTextVNode as Te, createVNode as F, defineComponent as I, h as Ee, inject as L, mergeProps as De, nextTick as Oe, normalizeClass as R, normalizeStyle as z, onBeforeUnmount as B, onMounted as ke, onScopeDispose as Ae, openBlock as V, provide as je, ref as H, renderList as U, renderSlot as Me, shallowRef as Ne, toDisplayString as W, unref as G, vModelText as Pe, vShow as Fe, watch as K, withCtx as Ie, withDirectives as Le, withKeys as Re, withModifiers as q } from "vue";
7
7
  import { createStyleResolver as ze, extractSelectionState as Be, getSelectedText as Ve, insertImageFromFile as He, insertImageFromFile as Ue, insertPageBreakInView as We, insertPageBreakInView as Ge, insertTableInView as Ke, insertTableInView as qe, insertTableOfContentsInView as Je, insertTableOfContentsInView as Ye, schema as J } from "@stll/folio-core/prosemirror";
8
8
  import { getTableContext as Xe } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
@@ -24,66 +24,67 @@ import { NodeSelection as kt, Selection as At, TextSelection as Z } from "prosem
24
24
  import { pixelsToEmu as jt } from "@stll/folio-core/utils/units";
25
25
  import { IMAGE_LAYOUT_OPTIONS as Mt, captureInlinePositionEmu as Nt, deriveLayoutChoice as Pt, findImageElement as Ft, isImageLayoutOptionEnabled as It, toolbarValueToLayoutTarget as Lt } from "@stll/folio-core/layout-painter/imageLayout";
26
26
  import { isTrackChangesMode as Rt, toggledTrackChangesMode as zt } from "@stll/folio-core/managers/EditorModeManager";
27
- import { clickToPositionDom as Bt } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
28
- import { calculateResizedImageDimensions as Vt, commitImageFloatMove as Ht, commitImageInlineMove as Ut, commitImageResize as Wt, isFloatingImage as Gt } from "@stll/folio-core/prosemirror/imageCommit";
29
- import { findBodyPmAnchor as Kt, findBodyPmSpans as qt } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
30
- import { PAINTER_PAINTED_EVENT as Jt } from "@stll/folio-core/layout-painter/renderPage";
31
- import { HeaderFooterSelectionOverlay as Yt } from "@stll/folio-core/render-dom/HeaderFooterSelectionOverlay";
32
- import { getTemplateDirectives as Xt, getTemplateDirectives as Zt, scanDirectives as Qt } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
33
- import { closeHistory as $t, redo as en, undo as tn } from "prosemirror-history";
34
- import { clearFormatting as nn } from "@stll/folio-core/prosemirror/commands/formatting";
35
- import { PENDING_COMMENT_ID as rn, createCommentIdAllocator as an, seedCommentAllocator as on } from "@stll/folio-core/prosemirror/commentIdAllocator";
36
- import { createComment as sn } from "@stll/folio-core/prosemirror/commentOps";
37
- import { acceptAIEditRevision as cn, acceptChange as ln, acceptSuggestion as un, findAIEditRevisionRange as dn, findSuggestionRange as fn, getSuggestions as pn, rejectAIEditRevision as mn, rejectChange as hn, rejectSuggestion as gn } from "@stll/folio-core/prosemirror/commands/comments";
38
- import { makeRevisionInfo as _n } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
39
- import { findPageIndexContainingPmPos as Q } from "@stll/folio-core/layout-engine";
40
- import { proseDocToBlocks as vn } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
41
- import { setTemplatePreviewValues as $ } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
42
- import { clearTemplateSlashMenu as yn, consumeTemplateSlashQuery as bn, getTemplateSlashMenu as xn, resetTemplateSlashQuery as Sn, templateSlashMenuKey as Cn } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
43
- import { createEmptyHeaderFooter as wn, pickActiveHeaderFooterRId as Tn, removeHeaderFooter as En, resolveHeaderFooterContent as Dn, saveHeaderFooterContent as On } from "@stll/folio-core/utils/headerFooter";
44
- import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as kn, applyFolioAIEditOperations as An, applyFolioAIEditOperations as jn, applyFolioDocumentOperations as Mn, assertSupportedFolioDocumentOperationVersion as Nn, createFolioAIEditSnapshot as Pn, createFolioAIEditSnapshot as Fn, diffWordSegments as In, getCommentAnchorsFromDoc as Ln, getFolioDocumentOperationIssues as Rn, getTrackedChangesFromDoc as zn, hashFolioAIBlockText as Bn, normalizeFolioAIBlockText as Vn } from "@stll/folio-core/ai-edits";
45
- import { findParagraphFragmentsByParaId as Hn, flashParagraphElements as Un } from "@stll/folio-core/paged-layout/paragraphFlash";
46
- import { blockSdtAttrsToSdtProperties as Wn, findBlockSdtMatch as Gn, findBlockSdtMatches as Kn, removeContentControlTr as qn, setContentControlContentTr as Jn, setContentControlValueTr as Yn } from "@stll/folio-core/prosemirror/commands/contentControls";
47
- import { setContentControlContentBlocksTr as Xn } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
48
- import { clampRangeToDocSize as Zn, resolveFolioAIBlockRange as Qn, resolveFolioAITextRange as $n, resolvePassageRange as er } from "@stll/folio-core/ai-edits/blockRange";
49
- import { deriveBlockId as tr, getFolioParaIdFromBlockId as nr, getFolioParaIdFromBlockId as rr, isFolioBlockId as ir, isSequentialFolioBlockId as ar } from "@stll/folio-core/types/block-id";
50
- import { getPageTextFromLayout as or } from "@stll/folio-core/paged-layout/pageText";
51
- import { applyStyle as sr, removeTabStop as cr, setIndentFirstLine as lr, setIndentLeft as ur, setIndentRight as dr } from "@stll/folio-core/prosemirror/commands/paragraph";
52
- import { getCachedNumberingMap as fr } from "@stll/folio-core/docx";
53
- import { insertPageBreak as pr } from "@stll/folio-core/prosemirror/commands/pageBreak";
54
- import { insertSectionBreakContinuous as mr, insertSectionBreakNextPage as hr } from "@stll/folio-core/prosemirror/commands/sectionBreak";
55
- import { setEmbeddedFontFamilyMap as gr } from "@stll/folio-core/utils/fontResolver";
56
- import { buildEmbeddedFontFamilyMap as _r, extractEmbeddedFonts as vr } from "@stll/folio-core/fonts/embeddedFonts";
57
- import { editHyperlinkAtCursor as yr, removeHyperlinkAtCursor as br } from "@stll/folio-core/prosemirror/commands/hyperlink";
58
- import { sanitizeExternalUrl as xr } from "@stll/folio-core/utils/urlSecurity";
59
- import { collectHeadings as Sr } from "@stll/folio-core/utils/headingCollector";
60
- import { clickToPositionInHfSlot as Cr } from "@stll/folio-core/layout-bridge/dom/findHfPmSpans";
61
- import { findNoteStoryForTarget as wr } from "@stll/folio-core/layout-bridge/dom/noteStoryDom";
62
- import { TABLE_INSERT_HIDE_DELAY_MS as Tr, detectTableInsertHover as Er } from "@stll/folio-core/layout-bridge/tableInsertHover";
63
- import { createCellDragTracker as Dr, findCellPosFromPmPos as Or } from "@stll/folio-core/prosemirror/cellDragSelection";
64
- import { RemoteSelectionOverlay as kr } from "@stll/folio-core/render-dom/RemoteSelectionOverlay";
65
- import { BodySelectionOverlay as Ar } from "@stll/folio-core/render-dom/BodySelectionOverlay";
66
- import { createEmptyDocument as jr } from "@stll/folio-core/utils/createDocument";
67
- import { extractDocumentStyleSet as Mr, extractDocumentStyleSetFromDocx as Nr, inspectDocumentStyles as Pr, inspectDocumentStylesFromDocx as Fr } from "@stll/folio-core/style-sets/extract";
68
- import { STELLA_STYLE_SET_NAME as Ir, createStellaStyleDocumentPreset as Lr, createStellaStyleSet as Rr } from "@stll/folio-core/style-sets/stellaStyle";
69
- import { DOCUMENT_PRESET_VERSION as zr, DOCUMENT_STYLE_SET_VERSION as Br } from "@stll/folio-core/style-sets/types";
70
- import { createDocx as Vr } from "@stll/folio-core/docx/rezip";
71
- import { DEFAULT_AI_SUGGESTION_PRESETS as Hr } from "@stll/folio-core/ai-suggestions/types";
72
- import { applySuggestions as Ur } from "@stll/folio-core/ai-suggestions/apply";
73
- import { isSuggestionStale as Wr, resolveSuggestionAnchor as Gr } from "@stll/folio-core/ai-suggestions/conflict";
74
- import { buildPositionalText as Kr } from "@stll/folio-core/ai-suggestions/text-positions";
75
- import { setAISuggestionsMeta as qr, setFocusedSuggestionMeta as Jr } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
76
- import { scrollFolioPositionIntoView as Yr } from "@stll/folio-core/paged-layout/scrollToPmPosition";
77
- import { getFolioCaretViewportRect as Xr, getFolioSelectionViewportRect as Zr } from "@stll/folio-core/paged-layout/selectionViewportRect";
78
- import { createAICitationDecorationsPlugin as Qr, setAICitationsMeta as $r, setActiveCitationMeta as ei } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
79
- import { fromMarkdown as ti, toMarkdown as ni, toMarkdownResult as ri } from "@stll/folio-core/markdown";
27
+ import { clickToPositionDom as Bt, getCaretPositionFromDom as Vt } from "@stll/folio-core/layout-bridge/dom/clickToPositionDom";
28
+ import { calculateResizedImageDimensions as Ht, commitImageFloatMove as Ut, commitImageInlineMove as Wt, commitImageResize as Gt, isFloatingImage as Kt } from "@stll/folio-core/prosemirror/imageCommit";
29
+ import { findBodyPmAnchor as qt, findBodyPmSpans as Jt } from "@stll/folio-core/layout-bridge/dom/findBodyPmSpans";
30
+ import { resetImeCaretAnchor as Yt, syncImeCaretAnchor as Xt } from "@stll/folio-core/layout-bridge/dom/imeCaretAnchor";
31
+ import { PAINTER_PAINTED_EVENT as Zt } from "@stll/folio-core/layout-painter/renderPage";
32
+ import { HeaderFooterSelectionOverlay as Qt } from "@stll/folio-core/render-dom/HeaderFooterSelectionOverlay";
33
+ import { getTemplateDirectives as $t, getTemplateDirectives as en, scanDirectives as tn } from "@stll/folio-core/prosemirror/plugins/templateDirectives";
34
+ import { closeHistory as nn, redo as rn, undo as an } from "prosemirror-history";
35
+ import { clearFormatting as on } from "@stll/folio-core/prosemirror/commands/formatting";
36
+ import { PENDING_COMMENT_ID as sn, createCommentIdAllocator as cn, seedCommentAllocator as ln } from "@stll/folio-core/prosemirror/commentIdAllocator";
37
+ import { createComment as un } from "@stll/folio-core/prosemirror/commentOps";
38
+ import { acceptAIEditRevision as dn, acceptChange as fn, acceptSuggestion as pn, findAIEditRevisionRange as mn, findSuggestionRange as hn, getSuggestions as gn, rejectAIEditRevision as _n, rejectChange as Q, rejectSuggestion as vn } from "@stll/folio-core/prosemirror/commands/comments";
39
+ import { makeRevisionInfo as $ } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
40
+ import { findPageIndexContainingPmPos as yn } from "@stll/folio-core/layout-engine";
41
+ import { proseDocToBlocks as bn } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
42
+ import { setTemplatePreviewValues as xn } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
43
+ import { clearTemplateSlashMenu as Sn, consumeTemplateSlashQuery as Cn, getTemplateSlashMenu as wn, resetTemplateSlashQuery as Tn, templateSlashMenuKey as En } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
44
+ import { createEmptyHeaderFooter as Dn, pickActiveHeaderFooterRId as On, removeHeaderFooter as kn, resolveHeaderFooterContent as An, saveHeaderFooterContent as jn } from "@stll/folio-core/utils/headerFooter";
45
+ import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION as Mn, applyFolioAIEditOperations as Nn, applyFolioAIEditOperations as Pn, applyFolioDocumentOperations as Fn, assertSupportedFolioDocumentOperationVersion as In, createFolioAIEditSnapshot as Ln, createFolioAIEditSnapshot as Rn, diffWordSegments as zn, getCommentAnchorsFromDoc as Bn, getFolioDocumentOperationIssues as Vn, getTrackedChangesFromDoc as Hn, hashFolioAIBlockText as Un, normalizeFolioAIBlockText as Wn } from "@stll/folio-core/ai-edits";
46
+ import { findParagraphFragmentsByParaId as Gn, flashParagraphElements as Kn } from "@stll/folio-core/paged-layout/paragraphFlash";
47
+ import { blockSdtAttrsToSdtProperties as qn, findBlockSdtMatch as Jn, findBlockSdtMatches as Yn, removeContentControlTr as Xn, setContentControlContentTr as Zn, setContentControlValueTr as Qn } from "@stll/folio-core/prosemirror/commands/contentControls";
48
+ import { setContentControlContentBlocksTr as $n } from "@stll/folio-core/prosemirror/commands/contentControlsBlockFill";
49
+ import { clampRangeToDocSize as er, resolveFolioAIBlockRange as tr, resolveFolioAITextRange as nr, resolvePassageRange as rr } from "@stll/folio-core/ai-edits/blockRange";
50
+ import { deriveBlockId as ir, getFolioParaIdFromBlockId as ar, getFolioParaIdFromBlockId as or, isFolioBlockId as sr, isSequentialFolioBlockId as cr } from "@stll/folio-core/types/block-id";
51
+ import { getPageTextFromLayout as lr } from "@stll/folio-core/paged-layout/pageText";
52
+ import { applyStyle as ur, removeTabStop as dr, setIndentFirstLine as fr, setIndentLeft as pr, setIndentRight as mr } from "@stll/folio-core/prosemirror/commands/paragraph";
53
+ import { getCachedNumberingMap as hr } from "@stll/folio-core/docx";
54
+ import { insertPageBreak as gr } from "@stll/folio-core/prosemirror/commands/pageBreak";
55
+ import { insertSectionBreakContinuous as _r, insertSectionBreakNextPage as vr } from "@stll/folio-core/prosemirror/commands/sectionBreak";
56
+ import { setEmbeddedFontFamilyMap as yr } from "@stll/folio-core/utils/fontResolver";
57
+ import { buildEmbeddedFontFamilyMap as br, extractEmbeddedFonts as xr } from "@stll/folio-core/fonts/embeddedFonts";
58
+ import { editHyperlinkAtCursor as Sr, removeHyperlinkAtCursor as Cr } from "@stll/folio-core/prosemirror/commands/hyperlink";
59
+ import { sanitizeExternalUrl as wr } from "@stll/folio-core/utils/urlSecurity";
60
+ import { collectHeadings as Tr } from "@stll/folio-core/utils/headingCollector";
61
+ import { clickToPositionInHfSlot as Er } from "@stll/folio-core/layout-bridge/dom/findHfPmSpans";
62
+ import { findNoteStoryForTarget as Dr } from "@stll/folio-core/layout-bridge/dom/noteStoryDom";
63
+ import { TABLE_INSERT_HIDE_DELAY_MS as Or, detectTableInsertHover as kr } from "@stll/folio-core/layout-bridge/tableInsertHover";
64
+ import { createCellDragTracker as Ar, findCellPosFromPmPos as jr } from "@stll/folio-core/prosemirror/cellDragSelection";
65
+ import { RemoteSelectionOverlay as Mr } from "@stll/folio-core/render-dom/RemoteSelectionOverlay";
66
+ import { BodySelectionOverlay as Nr } from "@stll/folio-core/render-dom/BodySelectionOverlay";
67
+ import { createEmptyDocument as Pr } from "@stll/folio-core/utils/createDocument";
68
+ import { extractDocumentStyleSet as Fr, extractDocumentStyleSetFromDocx as Ir, inspectDocumentStyles as Lr, inspectDocumentStylesFromDocx as Rr } from "@stll/folio-core/style-sets/extract";
69
+ import { STELLA_STYLE_SET_NAME as zr, createStellaStyleDocumentPreset as Br, createStellaStyleSet as Vr } from "@stll/folio-core/style-sets/stellaStyle";
70
+ import { DOCUMENT_PRESET_VERSION as Hr, DOCUMENT_STYLE_SET_VERSION as Ur } from "@stll/folio-core/style-sets/types";
71
+ import { createDocx as Wr } from "@stll/folio-core/docx/rezip";
72
+ import { DEFAULT_AI_SUGGESTION_PRESETS as Gr } from "@stll/folio-core/ai-suggestions/types";
73
+ import { applySuggestions as Kr } from "@stll/folio-core/ai-suggestions/apply";
74
+ import { isSuggestionStale as qr, resolveSuggestionAnchor as Jr } from "@stll/folio-core/ai-suggestions/conflict";
75
+ import { buildPositionalText as Yr } from "@stll/folio-core/ai-suggestions/text-positions";
76
+ import { setAISuggestionsMeta as Xr, setFocusedSuggestionMeta as Zr } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
77
+ import { scrollFolioPositionIntoView as Qr } from "@stll/folio-core/paged-layout/scrollToPmPosition";
78
+ import { getFolioCaretViewportRect as $r, getFolioSelectionViewportRect as ei } from "@stll/folio-core/paged-layout/selectionViewportRect";
79
+ import { createAICitationDecorationsPlugin as ti, setAICitationsMeta as ni, setActiveCitationMeta as ri } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
80
+ import { fromMarkdown as ii, toMarkdown as ai, toMarkdownResult as oi } from "@stll/folio-core/markdown";
80
81
  //#region src/components/AnonymizationRectsOverlay.vue?vue&type=script&setup=true&lang.ts
81
- var ii = [
82
+ var si = [
82
83
  "data-folio-anonymization-label",
83
84
  "data-folio-anonymization-canonical",
84
85
  "data-folio-anonymization-selected",
85
86
  "title"
86
- ], ai = /*#__PURE__*/ t(/* @__PURE__ */ I({
87
+ ], ci = /*#__PURE__*/ t(/* @__PURE__ */ I({
87
88
  __name: "AnonymizationRectsOverlay",
88
89
  props: {
89
90
  getView: { type: Function },
@@ -200,12 +201,12 @@ var ii = [
200
201
  width: `${n.width}px`,
201
202
  height: `${n.height}px`
202
203
  })
203
- }, null, 14, ii))), 128))], 64))), 128))], 512));
204
+ }, null, 14, si))), 128))], 64))), 128))], 512));
204
205
  }
205
- }), [["__scopeId", "data-v-df8fe7df"]]), oi = {
206
+ }), [["__scopeId", "data-v-df8fe7df"]]), li = {
206
207
  class: "folio-passage-highlight-overlay",
207
208
  "data-folio-passage-highlight-overlay": ""
208
- }, si = /*#__PURE__*/ t(/* @__PURE__ */ I({
209
+ }, ui = /*#__PURE__*/ t(/* @__PURE__ */ I({
209
210
  __name: "PassageHighlightOverlay",
210
211
  props: {
211
212
  range: {},
@@ -252,7 +253,7 @@ var ii = [
252
253
  t.measures
253
254
  ], () => a(), { immediate: !0 }), B(() => {
254
255
  r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
255
- }), (e, t) => (V(), N("div", oi, [(V(!0), N(O, null, U(n.value, (e, t) => (V(), N("span", {
256
+ }), (e, t) => (V(), N("div", li, [(V(!0), N(O, null, U(n.value, (e, t) => (V(), N("span", {
256
257
  key: `${t}:${e.left}:${e.top}`,
257
258
  class: "folio-passage-highlight",
258
259
  style: z({
@@ -264,11 +265,11 @@ var ii = [
264
265
  })
265
266
  }, null, 4))), 128))]));
266
267
  }
267
- }), [["__scopeId", "data-v-bde9f41b"]]), ci = {
268
+ }), [["__scopeId", "data-v-bde9f41b"]]), di = {
268
269
  key: 0,
269
270
  class: "folio-autocomplete-overlay",
270
271
  "data-folio-autocomplete-overlay": ""
271
- }, li = /*#__PURE__*/ t(/* @__PURE__ */ I({
272
+ }, fi = /*#__PURE__*/ t(/* @__PURE__ */ I({
272
273
  __name: "AutocompleteCaretOverlay",
273
274
  props: {
274
275
  caret: {},
@@ -276,7 +277,7 @@ var ii = [
276
277
  isStreaming: { type: Boolean }
277
278
  },
278
279
  setup(e) {
279
- return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", ci, [P("span", {
280
+ return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", di, [P("span", {
280
281
  class: "folio-autocomplete-ghost",
281
282
  style: z({
282
283
  left: `${e.caret.x}px`,
@@ -289,7 +290,7 @@ var ii = [
289
290
  "aria-hidden": "true"
290
291
  }, "stella", 2)], 4)])) : M("", !0);
291
292
  }
292
- }), [["__scopeId", "data-v-00299904"]]), ui = 48, di = /* @__PURE__ */ I({
293
+ }), [["__scopeId", "data-v-00299904"]]), pi = 48, mi = /* @__PURE__ */ I({
293
294
  __name: "AutocompleteSuggestionOverlay",
294
295
  props: {
295
296
  getPagesContainer: { type: Function },
@@ -306,7 +307,7 @@ var ii = [
306
307
  let c = r.querySelector(".layout-page-content");
307
308
  if (!c) return;
308
309
  let l = (c.getBoundingClientRect().right - a.left) / i;
309
- return Math.max(ui, l - t);
310
+ return Math.max(pi, l - t);
310
311
  }
311
312
  }, s = () => {
312
313
  let e = t.getPagesContainer(), r = t.editorState;
@@ -355,7 +356,7 @@ var ii = [
355
356
  t.editorState,
356
357
  t.zoom,
357
358
  r.value
358
- ], () => c()), (e, t) => (V(), j(li, {
359
+ ], () => c()), (e, t) => (V(), j(fi, {
359
360
  caret: n.value?.caret ?? null,
360
361
  text: n.value?.text ?? "",
361
362
  "is-streaming": n.value?.isStreaming ?? !1
@@ -365,33 +366,33 @@ var ii = [
365
366
  "is-streaming"
366
367
  ]));
367
368
  }
368
- }), fi = Symbol("docx-portal-class");
369
- function pi(e) {
370
- je(fi, A(() => ({
369
+ }), hi = Symbol("docx-portal-class");
370
+ function gi(e) {
371
+ je(hi, A(() => ({
371
372
  "ep-root": !0,
372
373
  dark: !!G(e)
373
374
  })));
374
375
  }
375
- function mi() {
376
- return L(fi, A(() => ({ "ep-root": !0 })));
376
+ function _i() {
377
+ return L(hi, A(() => ({ "ep-root": !0 })));
377
378
  }
378
379
  //#endregion
379
380
  //#region src/components/ContentControlWidgetsOverlay.vue?vue&type=script&setup=true&lang.ts
380
- var hi = ["aria-label"], gi = {
381
+ var vi = ["aria-label"], yi = {
381
382
  key: 0,
382
383
  class: "content-control-picker__items",
383
384
  role: "menu"
384
- }, _i = {
385
+ }, bi = {
385
386
  key: 0,
386
387
  class: "content-control-picker__empty"
387
- }, vi = /*#__PURE__*/ t(/* @__PURE__ */ I({
388
+ }, xi = /*#__PURE__*/ t(/* @__PURE__ */ I({
388
389
  __name: "ContentControlWidgetsOverlay",
389
390
  props: {
390
391
  eventRoot: {},
391
392
  view: {}
392
393
  },
393
394
  setup(e) {
394
- let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = mi(), s = new Ot(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
395
+ let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = _i(), s = new Ot(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
395
396
  c.value = s.getSnapshot();
396
397
  });
397
398
  K([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), B(() => {
@@ -410,7 +411,7 @@ var hi = ["aria-label"], gi = {
410
411
  role: "dialog",
411
412
  "aria-label": c.value.status === "dropdown" ? G(n)("contentControlDropdownAriaLabel") : G(n)("contentControlDateAriaLabel"),
412
413
  onMousedown: t[1] ||= q(() => {}, ["stop"])
413
- }, [c.value.status === "dropdown" ? (V(), N("div", gi, [c.value.items.length === 0 ? (V(), N("div", _i, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(O, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
414
+ }, [c.value.status === "dropdown" ? (V(), N("div", yi, [c.value.items.length === 0 ? (V(), N("div", bi, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(O, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
414
415
  key: `${e.value}::${e.displayText}`,
415
416
  "class-name": "content-control-picker__item",
416
417
  type: "button",
@@ -427,9 +428,9 @@ var hi = ["aria-label"], gi = {
427
428
  value: c.value.currentValue,
428
429
  "default-open": !0,
429
430
  onChange: d
430
- }, null, 8, ["value"])) : M("", !0)], 46, hi))]));
431
+ }, null, 8, ["value"])) : M("", !0)], 46, vi))]));
431
432
  }
432
- }), [["__scopeId", "data-v-19e067b7"]]), yi = /* @__PURE__ */ I({
433
+ }), [["__scopeId", "data-v-19e067b7"]]), Si = /* @__PURE__ */ I({
433
434
  __name: "DecorationLayer",
434
435
  props: {
435
436
  getView: { type: Function },
@@ -541,10 +542,10 @@ var hi = ["aria-label"], gi = {
541
542
  "aria-hidden": "true"
542
543
  }, null, 512));
543
544
  }
544
- }), bi = { class: "doc-outline__header" }, xi = { class: "doc-outline__body" }, Si = {
545
+ }), Ci = { class: "doc-outline__header" }, wi = { class: "doc-outline__body" }, Ti = {
545
546
  key: 0,
546
547
  class: "doc-outline__empty"
547
- }, Ci = /*#__PURE__*/ t(/* @__PURE__ */ I({
548
+ }, Ei = /*#__PURE__*/ t(/* @__PURE__ */ I({
548
549
  __name: "DocumentOutline",
549
550
  props: {
550
551
  isOpen: { type: Boolean },
@@ -573,7 +574,7 @@ var hi = ["aria-label"], gi = {
573
574
  role: "navigation",
574
575
  "aria-label": "Document outline",
575
576
  onMousedown: n[1] ||= q(() => {}, ["stop"])
576
- }, [P("div", bi, [P("button", {
577
+ }, [P("div", Ci, [P("button", {
577
578
  class: "doc-outline__back",
578
579
  title: "Close outline",
579
580
  "aria-label": "Close outline",
@@ -581,7 +582,7 @@ var hi = ["aria-label"], gi = {
581
582
  }, [F(i, {
582
583
  name: "arrow_back",
583
584
  size: 20
584
- })]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div", xi, [e.headings.length === 0 ? (V(), N("div", Si, "No headings found")) : (V(), j(G(r), {
585
+ })]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div", wi, [e.headings.length === 0 ? (V(), N("div", Ti, "No headings found")) : (V(), j(G(r), {
585
586
  key: 1,
586
587
  items: o.value,
587
588
  "get-scroll-container": e.getScrollContainer ?? (() => null),
@@ -589,7 +590,7 @@ var hi = ["aria-label"], gi = {
589
590
  "aria-label": "Document outline"
590
591
  }, null, 8, ["items", "get-scroll-container"]))])], 36)) : M("", !0);
591
592
  }
592
- }), [["__scopeId", "data-v-0797b3b1"]]), wi = /* @__PURE__ */ I({
593
+ }), [["__scopeId", "data-v-0797b3b1"]]), Di = /* @__PURE__ */ I({
593
594
  __name: "DocxEditorDialogs",
594
595
  props: {
595
596
  view: {},
@@ -682,10 +683,10 @@ var hi = ["aria-label"], gi = {
682
683
  }, null, 8, ["is-open", "current-watermark"])
683
684
  ], 64));
684
685
  }
685
- }), Ti = {
686
+ }), Oi = {
686
687
  key: 0,
687
688
  class: "docx-editor-vue__title-bar"
688
- }, Ei = { class: "docx-editor-vue__title-bar-left" }, Di = { class: "docx-editor-vue__title-bar-center" }, Oi = { class: "docx-editor-vue__title-bar-right" }, ki = /* @__PURE__ */ I({
689
+ }, ki = { class: "docx-editor-vue__title-bar-left" }, Ai = { class: "docx-editor-vue__title-bar-center" }, ji = { class: "docx-editor-vue__title-bar-right" }, Mi = /* @__PURE__ */ I({
689
690
  __name: "DocxEditorMenuBar",
690
691
  props: {
691
692
  showMenuBar: {
@@ -717,9 +718,9 @@ var hi = ["aria-label"], gi = {
717
718
  ],
718
719
  setup(e, { emit: t }) {
719
720
  let n = t;
720
- return (t, r) => e.showMenuBar ? (V(), N("div", Ti, [
721
- P("div", Ei, [Me(t.$slots, "title-bar-left")]),
722
- P("div", Di, [F(_, {
721
+ return (t, r) => e.showMenuBar ? (V(), N("div", Oi, [
722
+ P("div", ki, [Me(t.$slots, "title-bar-left")]),
723
+ P("div", Ai, [F(_, {
723
724
  "model-value": e.documentName,
724
725
  editable: e.documentNameEditable,
725
726
  "onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
@@ -734,28 +735,28 @@ var hi = ["aria-label"], gi = {
734
735
  "show-help-menu",
735
736
  "show-table-insert"
736
737
  ])]),
737
- P("div", Oi, [Me(t.$slots, "title-bar-right")])
738
+ P("div", ji, [Me(t.$slots, "title-bar-right")])
738
739
  ])) : M("", !0);
739
740
  }
740
- }), Ai = ["aria-label"], ji = { class: "image-ctx-menu__icon" }, Mi = { class: "image-ctx-menu__label" }, Ni = {
741
+ }), Ni = ["aria-label"], Pi = { class: "image-ctx-menu__icon" }, Fi = { class: "image-ctx-menu__label" }, Ii = {
741
742
  key: 1,
742
743
  class: "image-ctx-menu__divider",
743
744
  role: "separator"
744
- }, Pi = [
745
+ }, Li = [
745
746
  "data-wrap-type",
746
747
  "data-current",
747
748
  "data-disabled",
748
749
  "disabled",
749
750
  "title",
750
751
  "onClick"
751
- ], Fi = { class: "image-ctx-menu__icon" }, Ii = { class: "image-ctx-menu__label" }, Li = ["aria-label"], Ri = ["disabled", "onClick"], zi = { class: "image-ctx-menu__label" }, Bi = {
752
+ ], Ri = { class: "image-ctx-menu__icon" }, zi = { class: "image-ctx-menu__label" }, Bi = ["aria-label"], Vi = ["disabled", "onClick"], Hi = { class: "image-ctx-menu__label" }, Ui = {
752
753
  key: 0,
753
754
  class: "image-ctx-menu__shortcut"
754
- }, Vi = {
755
+ }, Wi = {
755
756
  key: 0,
756
757
  class: "image-ctx-menu__divider",
757
758
  role: "separator"
758
- }, Hi = 18, Ui = 260, Wi = 10, Gi = /*#__PURE__*/ t(/* @__PURE__ */ I({
759
+ }, Gi = 18, Ki = 260, qi = 10, Ji = /*#__PURE__*/ t(/* @__PURE__ */ I({
759
760
  __name: "ImageContextMenu",
760
761
  props: {
761
762
  state: {},
@@ -776,7 +777,7 @@ var hi = ["aria-label"], gi = {
776
777
  function o() {
777
778
  a("open-properties"), a("close");
778
779
  }
779
- let { t: s } = r(), c = mi(), l = Mt, u = A(() => n.state ? Pt(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
780
+ let { t: s } = r(), c = _i(), l = Mt, u = A(() => n.state ? Pt(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
780
781
  inline: "wrap_text",
781
782
  squareLeft: "format_image_left",
782
783
  squareRight: "format_image_right",
@@ -789,11 +790,11 @@ var hi = ["aria-label"], gi = {
789
790
  let p = A(() => {
790
791
  if (!n.state) return {};
791
792
  let e = Mt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
792
- return typeof window < "u" && (t + Ui > window.innerWidth && (t = window.innerWidth - Ui - Wi), r + e > window.innerHeight && (r = window.innerHeight - e - Wi), t < Wi && (t = Wi), r < Wi && (r = Wi)), {
793
+ return typeof window < "u" && (t + Ki > window.innerWidth && (t = window.innerWidth - Ki - qi), r + e > window.innerHeight && (r = window.innerHeight - e - qi), t < qi && (t = qi), r < qi && (r = qi)), {
793
794
  position: "fixed",
794
795
  left: `${t}px`,
795
796
  top: `${r}px`,
796
- minWidth: `${Ui}px`,
797
+ minWidth: `${Ki}px`,
797
798
  zIndex: 400
798
799
  };
799
800
  });
@@ -835,11 +836,11 @@ var hi = ["aria-label"], gi = {
835
836
  "data-action": "open-properties",
836
837
  onMousedown: n[1] ||= q(() => {}, ["prevent"]),
837
838
  onClick: o
838
- }, [P("span", ji, [F(i, {
839
+ }, [P("span", Pi, [F(i, {
839
840
  name: "settings",
840
- size: Hi
841
- })]), P("span", Mi, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
842
- e.canOpenProperties ? (V(), N("div", Ni)) : M("", !0),
841
+ size: Gi
842
+ })]), P("span", Fi, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
843
+ e.canOpenProperties ? (V(), N("div", Ii)) : M("", !0),
843
844
  (V(!0), N(O, null, U(G(l), (e) => (V(), N("button", {
844
845
  key: e.choice,
845
846
  type: "button",
@@ -853,17 +854,17 @@ var hi = ["aria-label"], gi = {
853
854
  onMousedown: n[2] ||= q(() => {}, ["prevent"]),
854
855
  onClick: (t) => h(e)
855
856
  }, [
856
- P("span", Fi, [F(i, {
857
+ P("span", Ri, [F(i, {
857
858
  name: f(e.iconHint),
858
- size: Hi
859
+ size: Gi
859
860
  }, null, 8, ["name"])]),
860
- P("span", Ii, W(G(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
861
+ P("span", zi, W(G(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
861
862
  e.choice === u.value ? (V(), N("span", {
862
863
  key: 0,
863
864
  class: "image-ctx-menu__current-dot",
864
865
  "aria-label": G(s)("imageWrap.menu.ariaLabel")
865
- }, "●", 8, Li)) : M("", !0)
866
- ], 42, Pi))), 128)),
866
+ }, "●", 8, Bi)) : M("", !0)
867
+ ], 42, Li))), 128)),
867
868
  e.textActions && e.textActions.length > 0 ? (V(), N(O, { key: 2 }, [n[5] ||= P("div", {
868
869
  class: "image-ctx-menu__divider",
869
870
  role: "separator"
@@ -874,16 +875,16 @@ var hi = ["aria-label"], gi = {
874
875
  disabled: e.disabled,
875
876
  onMousedown: n[3] ||= q(() => {}, ["prevent"]),
876
877
  onClick: (t) => g(e)
877
- }, [P("span", zi, W(e.label), 1), e.shortcut ? (V(), N("span", Bi, W(e.shortcut), 1)) : M("", !0)], 40, Ri), e.dividerAfter ? (V(), N("div", Vi)) : M("", !0)], 64))), 128))], 64)) : M("", !0)
878
- ], 46, Ai)) : M("", !0)]));
878
+ }, [P("span", Hi, W(e.label), 1), e.shortcut ? (V(), N("span", Ui, W(e.shortcut), 1)) : M("", !0)], 40, Vi), e.dividerAfter ? (V(), N("div", Wi)) : M("", !0)], 64))), 128))], 64)) : M("", !0)
879
+ ], 46, Ni)) : M("", !0)]));
879
880
  }
880
- }), [["__scopeId", "data-v-fc8f35bc"]]), Ki = ["disabled", "onMousedown"], qi = {
881
+ }), [["__scopeId", "data-v-fc8f35bc"]]), Yi = ["disabled", "onMousedown"], Xi = {
881
882
  key: 0,
882
883
  class: "ctx-menu__icon"
883
- }, Ji = { class: "ctx-menu__label" }, Yi = {
884
+ }, Zi = { class: "ctx-menu__label" }, Qi = {
884
885
  key: 1,
885
886
  class: "ctx-menu__shortcut"
886
- }, Xi = 220, Zi = 32, Qi = 10, $i = /*#__PURE__*/ t(/* @__PURE__ */ I({
887
+ }, $i = 220, ea = 32, ta = 10, na = /*#__PURE__*/ t(/* @__PURE__ */ I({
887
888
  __name: "TextContextMenu",
888
889
  props: {
889
890
  isOpen: { type: Boolean },
@@ -900,7 +901,7 @@ var hi = ["aria-label"], gi = {
900
901
  setup(e, { emit: t }) {
901
902
  let n = e, i = ({ node: e }) => e;
902
903
  i.props = ["node"];
903
- let a = t, { t: o } = r(), s = mi(), c = H(null), l = A(() => {
904
+ let a = t, { t: o } = r(), s = _i(), c = H(null), l = A(() => {
904
905
  let e = [], t = n.customItems ?? [];
905
906
  for (let [n, r] of t.entries()) e.push({
906
907
  id: `custom-${r.id}`,
@@ -1036,8 +1037,8 @@ var hi = ["aria-label"], gi = {
1036
1037
  action: "deleteTable"
1037
1038
  }), e;
1038
1039
  }), u = A(() => {
1039
- let e = n.position.x, t = n.position.y, r = l.value.filter((e) => !e.divider).length, i = l.value.filter((e) => e.divider).length, a = r * Zi + i * 9;
1040
- return typeof window < "u" && (e + Xi + Qi > window.innerWidth && (e = window.innerWidth - Xi - Qi), t + a + Qi > window.innerHeight && (t = window.innerHeight - a - Qi)), {
1040
+ let e = n.position.x, t = n.position.y, r = l.value.filter((e) => !e.divider).length, i = l.value.filter((e) => e.divider).length, a = r * ea + i * 9;
1041
+ return typeof window < "u" && (e + $i + ta > window.innerWidth && (e = window.innerWidth - $i - ta), t + a + ta > window.innerHeight && (t = window.innerHeight - a - ta)), {
1041
1042
  position: "fixed",
1042
1043
  left: `${e}px`,
1043
1044
  top: `${t}px`,
@@ -1075,12 +1076,12 @@ var hi = ["aria-label"], gi = {
1075
1076
  disabled: e.disabled,
1076
1077
  onMousedown: q((t) => d(e.action), ["prevent"])
1077
1078
  }, [
1078
- e.icon ? (V(), N("span", qi, [F(i, { node: e.icon }, null, 8, ["node"])])) : M("", !0),
1079
- P("span", Ji, W(e.label), 1),
1080
- e.shortcut ? (V(), N("span", Yi, W(e.shortcut), 1)) : M("", !0)
1081
- ], 42, Ki))), 128))], 38)) : M("", !0)]));
1079
+ e.icon ? (V(), N("span", Xi, [F(i, { node: e.icon }, null, 8, ["node"])])) : M("", !0),
1080
+ P("span", Zi, W(e.label), 1),
1081
+ e.shortcut ? (V(), N("span", Qi, W(e.shortcut), 1)) : M("", !0)
1082
+ ], 42, Yi))), 128))], 38)) : M("", !0)]));
1082
1083
  }
1083
- }), [["__scopeId", "data-v-c1416e84"]]), ea = /* @__PURE__ */ I({
1084
+ }), [["__scopeId", "data-v-c1416e84"]]), ra = /* @__PURE__ */ I({
1084
1085
  __name: "DocxEditorOverlays",
1085
1086
  props: {
1086
1087
  readOnly: { type: Boolean },
@@ -1099,7 +1100,7 @@ var hi = ["aria-label"], gi = {
1099
1100
  ],
1100
1101
  setup(e, { emit: t }) {
1101
1102
  let n = t;
1102
- return (t, r) => (V(), N(O, null, [F($i, {
1103
+ return (t, r) => (V(), N(O, null, [F(na, {
1103
1104
  "is-open": e.contextMenu.isOpen,
1104
1105
  position: e.contextMenu.position,
1105
1106
  "has-selection": e.contextMenu.hasSelection,
@@ -1121,7 +1122,7 @@ var hi = ["aria-label"], gi = {
1121
1122
  "can-merge-cells",
1122
1123
  "can-split-cell",
1123
1124
  "custom-items"
1124
- ]), F(Gi, {
1125
+ ]), F(Ji, {
1125
1126
  state: e.imageContextMenu,
1126
1127
  "text-actions": e.imageContextMenuTextActions,
1127
1128
  "can-open-properties": e.canOpenImageProperties,
@@ -1138,7 +1139,7 @@ var hi = ["aria-label"], gi = {
1138
1139
  });
1139
1140
  //#endregion
1140
1141
  //#region src/composables/imageOverlayRect.ts
1141
- function ta(e) {
1142
+ function ia(e) {
1142
1143
  let t = Math.max(0, e.parentOffsetWidth - e.parentClientWidth) / 2, n = e.zoom || 1;
1143
1144
  return {
1144
1145
  left: (e.imageRect.left - e.parentRect.left - t + e.scrollLeft) / n,
@@ -1149,13 +1150,13 @@ function ta(e) {
1149
1150
  }
1150
1151
  //#endregion
1151
1152
  //#region src/components/ImageSelectionOverlay.vue?vue&type=script&setup=true&lang.ts
1152
- var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1153
+ var aa = ["data-handle", "onMousedown"], oa = ["title"], sa = {
1153
1154
  key: 0,
1154
1155
  class: "image-overlay__dim"
1155
- }, aa = {
1156
+ }, ca = {
1156
1157
  key: 1,
1157
1158
  class: "image-overlay__dim image-overlay__dim--rotate"
1158
- }, oa = 4, sa = 15, ca = 250, la = 700, ua = /*#__PURE__*/ t(/* @__PURE__ */ I({
1159
+ }, la = 4, ua = 15, da = 250, fa = 700, pa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1159
1160
  __name: "ImageSelectionOverlay",
1160
1161
  props: {
1161
1162
  imageInfo: {},
@@ -1193,7 +1194,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1193
1194
  if (e.element.isConnected) return e.element;
1194
1195
  let t = re();
1195
1196
  if (!t) return null;
1196
- let n = Kt(t, e.pmPos);
1197
+ let n = qt(t, e.pmPos);
1197
1198
  return n ? Ft(n) : null;
1198
1199
  }
1199
1200
  function S() {
@@ -1208,7 +1209,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1208
1209
  return;
1209
1210
  }
1210
1211
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
1211
- p.value = ta({
1212
+ p.value = ia({
1212
1213
  imageRect: r,
1213
1214
  parentRect: n,
1214
1215
  scrollLeft: t.scrollLeft,
@@ -1218,19 +1219,19 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1218
1219
  zoom: i.zoom
1219
1220
  });
1220
1221
  }
1221
- let oe = null;
1222
- function se() {
1223
- oe?.();
1222
+ let C = null;
1223
+ function oe() {
1224
+ C?.();
1224
1225
  let e = 0, t = "", n = 0, r = 0, i = (a) => {
1225
1226
  r === 0 && (r = a);
1226
1227
  let o = a - r;
1227
1228
  S();
1228
1229
  let s = p.value, c = s ? `${s.left}|${s.top}|${s.width}|${s.height}` : "";
1229
- n = c === t ? n + 1 : 0, t = c, !(o >= ca && n >= 2) && o < la && (e = requestAnimationFrame(i));
1230
+ n = c === t ? n + 1 : 0, t = c, !(o >= da && n >= 2) && o < fa && (e = requestAnimationFrame(i));
1230
1231
  };
1231
1232
  e = requestAnimationFrame(i);
1232
- let a = setTimeout(S, ca);
1233
- oe = () => {
1233
+ let a = setTimeout(S, da);
1234
+ C = () => {
1234
1235
  cancelAnimationFrame(e), clearTimeout(a);
1235
1236
  };
1236
1237
  }
@@ -1239,9 +1240,9 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1239
1240
  p.value = null;
1240
1241
  return;
1241
1242
  }
1242
- se(), n(() => oe?.());
1243
+ oe(), n(() => C?.());
1243
1244
  }, { immediate: !0 }), K(() => i.zoom, () => {
1244
- i.imageInfo && se();
1245
+ i.imageInfo && oe();
1245
1246
  }), K(() => i.imageInfo, (e, t, n) => {
1246
1247
  if (!i.imageInfo) return;
1247
1248
  let r = () => {
@@ -1252,7 +1253,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1252
1253
  Oe(() => {
1253
1254
  if (c || !i.imageInfo) return;
1254
1255
  let e = re();
1255
- e && (s = new MutationObserver(() => se()), s.observe(e, {
1256
+ e && (s = new MutationObserver(() => oe()), s.observe(e, {
1256
1257
  attributes: !0,
1257
1258
  attributeFilter: ["style"]
1258
1259
  }));
@@ -1260,7 +1261,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1260
1261
  c = !0, a?.removeEventListener("scroll", r), window.removeEventListener("resize", r), s?.disconnect(), b && cancelAnimationFrame(b);
1261
1262
  });
1262
1263
  }, { immediate: !0 });
1263
- let C = A(() => s.value ? u.value : p.value?.width || 0), ce = A(() => s.value ? d.value : p.value?.height || 0), le = A(() => {
1264
+ let w = A(() => s.value ? u.value : p.value?.width || 0), se = A(() => s.value ? d.value : p.value?.height || 0), ce = A(() => {
1264
1265
  let e = p.value;
1265
1266
  if (!e) return {
1266
1267
  position: "absolute",
@@ -1281,8 +1282,8 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1281
1282
  zIndex: ae.imageOverlay,
1282
1283
  pointerEvents: "auto"
1283
1284
  };
1284
- }), ue = A(() => {
1285
- let e = C.value, t = ce.value, n = `${e / 2 - 5}px`, r = `${t / 2 - 5}px`, i = `${e - 5}px`, a = `${t - 5}px`, o = "-5px";
1285
+ }), le = A(() => {
1286
+ let e = w.value, t = se.value, n = `${e / 2 - 5}px`, r = `${t / 2 - 5}px`, i = `${e - 5}px`, a = `${t - 5}px`, o = "-5px";
1286
1287
  return [
1287
1288
  {
1288
1289
  pos: "nw",
@@ -1350,11 +1351,11 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1350
1351
  }
1351
1352
  ];
1352
1353
  });
1353
- function de(e, t) {
1354
- !i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, y = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove", fe), document.addEventListener("mouseup", pe));
1354
+ function ue(e, t) {
1355
+ !i.imageInfo || !p.value || (m = t, h = e.clientX, g = e.clientY, _ = p.value.width, v = p.value.height, y = { ...p.value }, u.value = Math.round(_), d.value = Math.round(v), s.value = !0, a("interact-start"), document.addEventListener("mousemove", de), document.addEventListener("mouseup", fe));
1355
1356
  }
1356
- function fe(e) {
1357
- let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = Vt(m, n, r, _, v, a);
1357
+ function de(e) {
1358
+ let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = Ht(m, n, r, _, v, a);
1358
1359
  u.value = Math.round(o.width), d.value = Math.round(o.height);
1359
1360
  let s = y;
1360
1361
  if (s) {
@@ -1367,17 +1368,17 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1367
1368
  };
1368
1369
  }
1369
1370
  }
1370
- function pe() {
1371
- document.removeEventListener("mousemove", fe), document.removeEventListener("mouseup", pe), s.value = !1, y = null, a("interact-end");
1371
+ function fe() {
1372
+ document.removeEventListener("mousemove", de), document.removeEventListener("mouseup", fe), s.value = !1, y = null, a("interact-end");
1372
1373
  let e = i.view, t = i.imageInfo;
1373
1374
  if (!e || !t) {
1374
1375
  S();
1375
1376
  return;
1376
1377
  }
1377
- let n = Wt(e, t.pmPos, u.value, d.value);
1378
+ let n = Gt(e, t.pmPos, u.value, d.value);
1378
1379
  n !== null && Ce(n), Oe(() => S());
1379
1380
  }
1380
- let me = 0, he = 0, w = 0, ge = 0, T = null, E = null;
1381
+ let pe = 0, me = 0, T = 0, he = 0, ge = null, E = null;
1381
1382
  function _e(e) {
1382
1383
  if (!e) return 0;
1383
1384
  let t = e.match(/rotate\((-?\d+(?:\.\d+)?)deg\)/)?.[1];
@@ -1388,16 +1389,16 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1388
1389
  return a !== 0 && i.push(`rotate(${a}deg)`), n && i.push("scaleX(-1)"), r && i.push("scaleY(-1)"), i.length > 0 ? i.join(" ") : null;
1389
1390
  }
1390
1391
  function ye(e, t) {
1391
- return Math.atan2(e - me, -(t - he)) * 180 / Math.PI;
1392
+ return Math.atan2(e - pe, -(t - me)) * 180 / Math.PI;
1392
1393
  }
1393
1394
  function be(e) {
1394
1395
  if (!i.imageInfo) return;
1395
1396
  let t = i.imageInfo.element.getBoundingClientRect();
1396
- me = t.left + t.width / 2, he = t.top + t.height / 2, T = ne(te(i.view, i.imageInfo.pmPos)), ge = _e(T), E = i.imageInfo.element.querySelector("img"), w = ye(e.clientX, e.clientY), f.value = ge, l.value = !0, a("interact-start"), document.addEventListener("mousemove", xe), document.addEventListener("mouseup", D);
1397
+ pe = t.left + t.width / 2, me = t.top + t.height / 2, ge = ne(te(i.view, i.imageInfo.pmPos)), he = _e(ge), E = i.imageInfo.element.querySelector("img"), T = ye(e.clientX, e.clientY), f.value = he, l.value = !0, a("interact-start"), document.addEventListener("mousemove", xe), document.addEventListener("mouseup", D);
1397
1398
  }
1398
1399
  function xe(e) {
1399
- let t = ye(e.clientX, e.clientY) - w, n = ge + t;
1400
- e.shiftKey || (n = Math.round(n / sa) * sa), f.value = (n % 360 + 360) % 360, E && (E.style.transform = ve(T, f.value) || "");
1400
+ let t = ye(e.clientX, e.clientY) - T, n = he + t;
1401
+ e.shiftKey || (n = Math.round(n / ua) * ua), f.value = (n % 360 + 360) % 360, E && (E.style.transform = ve(ge, f.value) || "");
1401
1402
  }
1402
1403
  function D() {
1403
1404
  document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", D), l.value = !1, a("interact-end");
@@ -1409,7 +1410,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1409
1410
  transform: ve(ne(n), f.value)
1410
1411
  })), Ce(t.pmPos));
1411
1412
  } catch {} finally {
1412
- E && (E.style.transform = ""), E = null, T = null;
1413
+ E && (E.style.transform = ""), E = null, ge = null;
1413
1414
  }
1414
1415
  Oe(() => S());
1415
1416
  }
@@ -1418,7 +1419,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1418
1419
  if (!i.imageInfo || !p.value) return;
1419
1420
  let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
1420
1421
  let s = e.clientX - t, l = e.clientY - n;
1421
- if (!(!o && Math.sqrt(s * s + l * l) < oa)) {
1422
+ if (!(!o && Math.sqrt(s * s + l * l) < la)) {
1422
1423
  if (!o) {
1423
1424
  o = !0, c.value = !0, a("interact-start"), k = document.createElement("div"), k.style.cssText = "position: fixed; pointer-events: none; z-index: 10000; opacity: 0.5; border: 2px dashed #2563eb; border-radius: 4px; background: rgba(37, 99, 235, 0.1);";
1424
1425
  let e = i.zoom;
@@ -1440,7 +1441,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1440
1441
  let a = te(n, r.pmPos);
1441
1442
  if (!a) return;
1442
1443
  let s;
1443
- if (Gt(a)) {
1444
+ if (Kt(a)) {
1444
1445
  let a = (o.value?.closest(".docx-editor-vue__pages-viewport"))?.querySelectorAll(".layout-page");
1445
1446
  if (!a || a.length === 0) return;
1446
1447
  let c = null;
@@ -1457,13 +1458,13 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1457
1458
  }
1458
1459
  if (!c) return;
1459
1460
  let l = c.getBoundingClientRect(), u = i.zoom, d = jt((e - l.left) / u), f = jt((t - l.top) / u);
1460
- s = Ht(n, r.pmPos, d, f);
1461
+ s = Ut(n, r.pmPos, d, f);
1461
1462
  } else {
1462
1463
  let i = re();
1463
1464
  if (!i) return;
1464
1465
  let a = Bt(i, e, t, 1);
1465
1466
  if (a == null || a < 0) return;
1466
- s = Ut(n, r.pmPos, a);
1467
+ s = Wt(n, r.pmPos, a);
1467
1468
  }
1468
1469
  s !== null && Ce(s), Oe(() => S());
1469
1470
  }
@@ -1475,13 +1476,13 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1475
1476
  } catch {}
1476
1477
  }
1477
1478
  return B(() => {
1478
- document.removeEventListener("mousemove", fe), document.removeEventListener("mouseup", pe), document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", D), x && document.removeEventListener("mousemove", x), ee && document.removeEventListener("mouseup", ee), k &&= (k.remove(), null), b && cancelAnimationFrame(b), oe?.();
1479
+ document.removeEventListener("mousemove", de), document.removeEventListener("mouseup", fe), document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", D), x && document.removeEventListener("mousemove", x), ee && document.removeEventListener("mouseup", ee), k &&= (k.remove(), null), b && cancelAnimationFrame(b), C?.();
1479
1480
  }), (t, r) => e.imageInfo ? (V(), N("div", {
1480
1481
  key: 0,
1481
1482
  ref_key: "overlayRootRef",
1482
1483
  ref: o,
1483
1484
  class: "image-overlay",
1484
- style: z(le.value),
1485
+ style: z(ce.value),
1485
1486
  onMousedown: r[3] ||= q(() => {}, ["stop"])
1486
1487
  }, [
1487
1488
  r[4] ||= P("div", { class: "image-overlay__border" }, null, -1),
@@ -1491,38 +1492,50 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1491
1492
  onMousedown: r[0] ||= q((e) => Se(e), ["prevent", "stop"]),
1492
1493
  onContextmenu: r[1] ||= q((e) => t.$emit("context-menu", e), ["prevent", "stop"])
1493
1494
  }, null, 36),
1494
- (V(!0), N(O, null, U(ue.value, (e) => (V(), N("div", {
1495
+ (V(!0), N(O, null, U(le.value, (e) => (V(), N("div", {
1495
1496
  key: e.pos,
1496
1497
  class: "image-overlay__handle",
1497
1498
  style: z(e.style),
1498
1499
  "data-handle": e.pos,
1499
- onMousedown: q((t) => de(t, e.pos), ["prevent", "stop"])
1500
- }, null, 44, na))), 128)),
1500
+ onMousedown: q((t) => ue(t, e.pos), ["prevent", "stop"])
1501
+ }, null, 44, aa))), 128)),
1501
1502
  r[5] ||= P("div", { class: "image-overlay__rotate-line" }, null, -1),
1502
1503
  P("div", {
1503
1504
  class: "image-overlay__rotate-handle",
1504
- style: z({ left: `${C.value / 2 - 7}px` }),
1505
+ style: z({ left: `${w.value / 2 - 7}px` }),
1505
1506
  title: G(n)("imageOverlay.rotate"),
1506
1507
  onMousedown: r[2] ||= q((e) => be(e), ["prevent", "stop"])
1507
- }, null, 44, ra),
1508
- s.value ? (V(), N("div", ia, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
1509
- l.value ? (V(), N("div", aa, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
1508
+ }, null, 44, oa),
1509
+ s.value ? (V(), N("div", sa, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
1510
+ l.value ? (V(), N("div", ca, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
1510
1511
  ], 36)) : M("", !0);
1511
1512
  }
1512
- }), [["__scopeId", "data-v-4c3d1a1d"]]), da = /* @__PURE__ */ I({
1513
+ }), [["__scopeId", "data-v-4c3d1a1d"]]), ma = /* @__PURE__ */ I({
1513
1514
  __name: "HeaderFooterSelectionOverlay",
1514
1515
  props: {
1515
1516
  pagesContainer: {},
1517
+ hiddenContainer: {},
1518
+ editorView: {},
1516
1519
  selection: {},
1517
1520
  zoom: {}
1518
1521
  },
1519
1522
  setup(e) {
1520
- let t = e, n = new Yt(), r = () => {
1521
- t.pagesContainer && n.sync(t.pagesContainer, t.selection, t.zoom);
1523
+ let t = e, n = new Qt(), r = () => {
1524
+ if (!t.pagesContainer) return;
1525
+ n.sync(t.pagesContainer, t.selection, t.zoom);
1526
+ let e = t.pagesContainer.querySelector("[data-testid='hf-caret']")?.getBoundingClientRect();
1527
+ Xt({
1528
+ hiddenHost: t.hiddenContainer,
1529
+ editorView: t.editorView,
1530
+ visibleCaret: e ? {
1531
+ left: e.left,
1532
+ top: e.top
1533
+ } : null
1534
+ });
1522
1535
  };
1523
- return K(() => t.pagesContainer, (e, t, i) => {
1524
- e && (e.addEventListener(Jt, r), r(), i(() => {
1525
- e.removeEventListener(Jt, r), n.clear(e);
1536
+ K(() => t.pagesContainer, (e, t, i) => {
1537
+ e && (e.addEventListener(Zt, r), r(), i(() => {
1538
+ e.removeEventListener(Zt, r), n.clear(e);
1526
1539
  }));
1527
1540
  }, { immediate: !0 }), K(() => [
1528
1541
  t.selection?.rId,
@@ -1530,10 +1543,24 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1530
1543
  t.selection?.from,
1531
1544
  t.selection?.to,
1532
1545
  t.selection?.pageNumber,
1546
+ t.hiddenContainer,
1547
+ t.editorView,
1533
1548
  t.zoom
1534
- ], r), (e, t) => null;
1549
+ ], r), K(() => t.hiddenContainer, (e, t, n) => {
1550
+ e && (e.addEventListener("focusin", r), e.addEventListener("compositionend", r), n(() => {
1551
+ e.removeEventListener("focusin", r), e.removeEventListener("compositionend", r);
1552
+ }));
1553
+ }, { immediate: !0 });
1554
+ let i = null, a = () => {
1555
+ i !== null && cancelAnimationFrame(i), i = requestAnimationFrame(() => {
1556
+ i = null, r();
1557
+ });
1558
+ }, o = typeof window > "u" ? null : window;
1559
+ return o?.addEventListener("scroll", a, !0), Ae(() => {
1560
+ i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Yt(t.hiddenContainer);
1561
+ }), (e, t) => null;
1535
1562
  }
1536
- }), fa = { class: "hf-editor-label" }, pa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1563
+ }), ha = { class: "hf-editor-label" }, ga = /*#__PURE__*/ t(/* @__PURE__ */ I({
1537
1564
  __name: "InlineHeaderFooterEditor",
1538
1565
  props: {
1539
1566
  edit: {},
@@ -1576,7 +1603,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1576
1603
  class: "hf-inline-editor",
1577
1604
  style: z(l.value),
1578
1605
  role: "presentation"
1579
- }, [P("div", { class: R(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", fa, W(c.value), 1), P("div", {
1606
+ }, [P("div", { class: R(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", ha, W(c.value), 1), P("div", {
1580
1607
  class: "hf-options",
1581
1608
  onMousedown: n[5] ||= q(() => {}, ["stop"])
1582
1609
  }, [F(G(a), {
@@ -1626,7 +1653,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1626
1653
  })
1627
1654
  ], 2)) : M("", !0)], 32)], 2)], 4));
1628
1655
  }
1629
- }), [["__scopeId", "data-v-a0bd3730"]]), ma = ["title", "aria-label"], ha = /* @__PURE__ */ I({
1656
+ }), [["__scopeId", "data-v-a0bd3730"]]), _a = ["title", "aria-label"], va = /* @__PURE__ */ I({
1630
1657
  __name: "OutlineToggleButton",
1631
1658
  props: {
1632
1659
  leftOffset: {},
@@ -1649,9 +1676,9 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1649
1676
  }, [F(i, {
1650
1677
  name: "format_list_bulleted",
1651
1678
  size: 20
1652
- })], 44, ma));
1679
+ })], 44, _a));
1653
1680
  }
1654
- }), ga = /*#__PURE__*/ t(/* @__PURE__ */ I({
1681
+ }), ya = /*#__PURE__*/ t(/* @__PURE__ */ I({
1655
1682
  __name: "PageIndicator",
1656
1683
  props: {
1657
1684
  currentPage: {},
@@ -1670,7 +1697,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1670
1697
  total: e.totalPages
1671
1698
  })), 5));
1672
1699
  }
1673
- }), [["__scopeId", "data-v-f1904974"]]), _a = ["data-folio-block-id"], va = ["data-folio-block-id", "title"], ya = 2.5, ba = 5, xa = 6, Sa = 2, Ca = 2, wa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1700
+ }), [["__scopeId", "data-v-f1904974"]]), ba = ["data-folio-block-id"], xa = ["data-folio-block-id", "title"], Sa = 2.5, Ca = 5, wa = 6, Ta = 2, Ea = 2, Da = /*#__PURE__*/ t(/* @__PURE__ */ I({
1674
1701
  __name: "TemplateDirectivesOverlay",
1675
1702
  props: {
1676
1703
  getView: { type: Function },
@@ -1684,19 +1711,19 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1684
1711
  setup(e) {
1685
1712
  let t = e, n = /* @__PURE__ */ new Set(["if", "each"]), r = /* @__PURE__ */ new Set(["endif", "endeach"]), i = (e) => e === "each" ? "each" : "if";
1686
1713
  function a(e) {
1687
- let t = e - xa - ya - Sa;
1688
- return t <= 0 ? 0 : Math.floor(t / ba);
1714
+ let t = e - wa - Sa - Ta;
1715
+ return t <= 0 ? 0 : Math.floor(t / Ca);
1689
1716
  }
1690
1717
  function o(e, t, n) {
1691
1718
  let r = a(n), i = Math.min(Math.max(0, e), r);
1692
- return t - xa - ya - (r - i) * ba;
1719
+ return t - wa - Sa - (r - i) * Ca;
1693
1720
  }
1694
1721
  function s(e, t) {
1695
- if (t.length === 0) return e.bottom - e.top >= Ca ? [e] : [];
1722
+ if (t.length === 0) return e.bottom - e.top >= Ea ? [e] : [];
1696
1723
  let n = [];
1697
1724
  for (let r of t) {
1698
1725
  let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
1699
- i - t >= Ca && n.push({
1726
+ i - t >= Ea && n.push({
1700
1727
  top: t,
1701
1728
  bottom: i
1702
1729
  });
@@ -1773,7 +1800,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1773
1800
  f.value = [], p.value = [], m.value = null, h.value = null;
1774
1801
  return;
1775
1802
  }
1776
- let a = Zt(i);
1803
+ let a = en(i);
1777
1804
  if (a.length === 0) {
1778
1805
  f.value = [], p.value = [], m.value = null, h.value = null;
1779
1806
  return;
@@ -1812,10 +1839,10 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1812
1839
  function S(e) {
1813
1840
  return e.block ? te.value.get(e.from) : void 0;
1814
1841
  }
1815
- function oe(e) {
1842
+ function C(e) {
1816
1843
  return e.block ? ne.value.get(e.from) : void 0;
1817
1844
  }
1818
- function se(e) {
1845
+ function oe(e) {
1819
1846
  let t = S(e), n = t !== void 0 && ie(t);
1820
1847
  return [
1821
1848
  "folio-template-directive",
@@ -1824,19 +1851,19 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1824
1851
  { "folio-template-directive--active": n }
1825
1852
  ];
1826
1853
  }
1827
- function C(e) {
1854
+ function w(e) {
1828
1855
  if (!(e instanceof HTMLElement)) return null;
1829
1856
  let t = e.dataset.folioBlockId;
1830
1857
  return t === void 0 ? null : Number(t);
1831
1858
  }
1832
- function ce(e) {
1833
- let t = C(e.target);
1859
+ function se(e) {
1860
+ let t = w(e.target);
1834
1861
  t !== null && (g.value = t);
1835
1862
  }
1836
- function le(e) {
1837
- let t = C(e.target);
1863
+ function ce(e) {
1864
+ let t = w(e.target);
1838
1865
  if (t === null) return;
1839
- let n = C(e.relatedTarget);
1866
+ let n = w(e.relatedTarget);
1840
1867
  n !== t && g.value === t && (g.value = n);
1841
1868
  }
1842
1869
  return ke(() => y()), B(() => {
@@ -1844,8 +1871,8 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1844
1871
  }), (t, n) => (V(), N("div", {
1845
1872
  class: "folio-template-directives-overlay",
1846
1873
  "data-folio-template-directives-overlay": "",
1847
- onPointerover: ce,
1848
- onPointerout: le
1874
+ onPointerover: se,
1875
+ onPointerout: ce
1849
1876
  }, [(V(!0), N(O, null, U(ee.value, (t) => (V(), N(O, { key: `rail:${t.blockId}` }, [(V(!0), N(O, null, U(t.segments, (n, r) => (V(), N("div", {
1850
1877
  key: `rail:${t.blockId}:${r}`,
1851
1878
  class: R([
@@ -1858,14 +1885,14 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1858
1885
  position: "absolute",
1859
1886
  left: `${t.railX * e.zoom}px`,
1860
1887
  top: `${n.top * e.zoom}px`,
1861
- width: `${ya * e.zoom}px`,
1888
+ width: `${Sa * e.zoom}px`,
1862
1889
  height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
1863
1890
  })
1864
- }, null, 14, _a))), 128))], 64))), 128)), (V(!0), N(O, null, U(p.value, (t, n) => (V(), N(O, { key: `d:${n}` }, [(V(!0), N(O, null, U(t.rects, (r, i) => (V(), N("span", {
1891
+ }, null, 14, ba))), 128))], 64))), 128)), (V(!0), N(O, null, U(p.value, (t, n) => (V(), N(O, { key: `d:${n}` }, [(V(!0), N(O, null, U(t.rects, (r, i) => (V(), N("span", {
1865
1892
  key: `d:${n}:${i}`,
1866
- class: R(se(t.range)),
1893
+ class: R(oe(t.range)),
1867
1894
  "data-folio-block-id": S(t.range),
1868
- title: oe(t.range),
1895
+ title: C(t.range),
1869
1896
  style: z({
1870
1897
  position: "absolute",
1871
1898
  left: `${(r.x - 1) * e.zoom}px`,
@@ -1873,9 +1900,9 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1873
1900
  width: `${(r.width + 2) * e.zoom}px`,
1874
1901
  height: `${Math.max(0, r.height - 2) * e.zoom}px`
1875
1902
  })
1876
- }, null, 14, va))), 128))], 64))), 128))], 32));
1903
+ }, null, 14, xa))), 128))], 64))), 128))], 32));
1877
1904
  }
1878
- }), [["__scopeId", "data-v-c72dfa21"]]), Ta = ["href", "title"], Ea = ["title"], Da = ["title"], Oa = ["title"], ka = { class: "docx-hyperlink-popup__edit-row" }, Aa = ["placeholder", "onKeydown"], ja = { class: "docx-hyperlink-popup__edit-row" }, Ma = ["onKeydown"], Na = ["disabled"], Pa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1905
+ }), [["__scopeId", "data-v-c72dfa21"]]), Oa = ["href", "title"], ka = ["title"], Aa = ["title"], ja = ["title"], Ma = { class: "docx-hyperlink-popup__edit-row" }, Na = ["placeholder", "onKeydown"], Pa = { class: "docx-hyperlink-popup__edit-row" }, Fa = ["onKeydown"], Ia = ["disabled"], La = /*#__PURE__*/ t(/* @__PURE__ */ I({
1879
1906
  __name: "HyperlinkPopup",
1880
1907
  props: {
1881
1908
  data: {},
@@ -1924,28 +1951,28 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1924
1951
  class: R(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": o.value }]),
1925
1952
  style: z(u.value),
1926
1953
  onMousedown: r[6] ||= q(() => {}, ["stop"])
1927
- }, [o.value ? (V(), N(O, { key: 1 }, [P("div", ka, [Le(P("input", {
1954
+ }, [o.value ? (V(), N(O, { key: 1 }, [P("div", Ma, [Le(P("input", {
1928
1955
  class: "docx-hyperlink-popup__input",
1929
1956
  placeholder: G(n)("displayText"),
1930
1957
  "onUpdate:modelValue": r[2] ||= (e) => s.value = e,
1931
1958
  onKeydown: [Re(q(h, ["prevent"]), ["enter"]), r[3] ||= Re((e) => t.$emit("close"), ["esc"])]
1932
- }, null, 40, Aa), [[Pe, s.value]])]), P("div", ja, [Le(P("input", {
1959
+ }, null, 40, Na), [[Pe, s.value]])]), P("div", Pa, [Le(P("input", {
1933
1960
  class: "docx-hyperlink-popup__input",
1934
1961
  placeholder: "https://...",
1935
1962
  "onUpdate:modelValue": r[4] ||= (e) => c.value = e,
1936
1963
  onKeydown: [Re(q(h, ["prevent"]), ["enter"]), r[5] ||= Re((e) => t.$emit("close"), ["esc"])]
1937
- }, null, 40, Ma), [[Pe, c.value]]), P("button", {
1964
+ }, null, 40, Fa), [[Pe, c.value]]), P("button", {
1938
1965
  class: "docx-hyperlink-popup__apply",
1939
1966
  disabled: !c.value.trim(),
1940
1967
  onClick: q(h, ["prevent"])
1941
- }, W(G(n)("common.apply")), 9, Na)])], 64)) : (V(), N(O, { key: 0 }, [
1968
+ }, W(G(n)("common.apply")), 9, Ia)])], 64)) : (V(), N(O, { key: 0 }, [
1942
1969
  r[10] ||= we("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-366df18c><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-366df18c><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-366df18c></circle><path d=\"M2 12h20\" data-v-366df18c></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-366df18c></path></svg></span>", 1),
1943
1970
  P("a", {
1944
1971
  class: "docx-hyperlink-popup__url",
1945
1972
  href: e.data.href,
1946
1973
  title: e.data.href,
1947
1974
  onClick: r[0] ||= q((n) => t.$emit("navigate", e.data.href), ["prevent"])
1948
- }, W(e.data.href), 9, Ta),
1975
+ }, W(e.data.href), 9, Oa),
1949
1976
  r[11] ||= P("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
1950
1977
  P("button", {
1951
1978
  class: "docx-hyperlink-popup__btn",
@@ -1967,7 +1994,7 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1967
1994
  height: "13",
1968
1995
  rx: "2",
1969
1996
  ry: "2"
1970
- }), P("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, Ea),
1997
+ }), P("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, ka),
1971
1998
  e.readOnly ? M("", !0) : (V(), N("button", {
1972
1999
  key: 0,
1973
2000
  class: "docx-hyperlink-popup__btn",
@@ -1982,43 +2009,43 @@ var na = ["data-handle", "onMousedown"], ra = ["title"], ia = {
1982
2009
  "stroke-width": "2",
1983
2010
  "stroke-linecap": "round",
1984
2011
  "stroke-linejoin": "round"
1985
- }, [P("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), P("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, Da)),
2012
+ }, [P("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), P("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, Aa)),
1986
2013
  e.readOnly ? M("", !0) : (V(), N("button", {
1987
2014
  key: 1,
1988
2015
  class: "docx-hyperlink-popup__btn",
1989
2016
  title: G(n)("removeLink"),
1990
2017
  onClick: r[1] ||= q((e) => t.$emit("remove"), ["prevent"])
1991
- }, [...r[9] ||= [we("<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-366df18c><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-366df18c></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-366df18c></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-366df18c></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-366df18c></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-366df18c></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-366df18c></line></svg>", 1)]], 8, Oa))
2018
+ }, [...r[9] ||= [we("<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-366df18c><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-366df18c></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-366df18c></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-366df18c></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-366df18c></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-366df18c></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-366df18c></line></svg>", 1)]], 8, ja))
1992
2019
  ], 64))], 38)) : M("", !0);
1993
2020
  }
1994
2021
  }), [["__scopeId", "data-v-366df18c"]]);
1995
2022
  //#endregion
1996
2023
  //#region src/composables/commentMarks.ts
1997
- function Fa(e, t) {
2024
+ function Ra(e, t) {
1998
2025
  let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
1999
2026
  return n === r ? null : {
2000
2027
  from: n,
2001
2028
  to: r
2002
2029
  };
2003
2030
  }
2004
- function Ia({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
2031
+ function za({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
2005
2032
  let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
2006
- return i ? Fa(e, i) : null;
2033
+ return i ? Ra(e, i) : null;
2007
2034
  }
2008
- function La(e, t, n, r) {
2009
- let i = e.state.schema.marks.comment, a = Fa(e.state.doc.content.size, t);
2035
+ function Ba(e, t, n, r) {
2036
+ let i = e.state.schema.marks.comment, a = Ra(e.state.doc.content.size, t);
2010
2037
  if (!i || !a) return !1;
2011
2038
  let o = e.state.tr;
2012
- return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: rn }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(At.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2039
+ return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: sn }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(At.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2013
2040
  }
2014
- function Ra(e, t) {
2015
- let n = e.state.schema.marks.comment, r = Fa(e.state.doc.content.size, t);
2016
- !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: rn })));
2041
+ function Va(e, t) {
2042
+ let n = e.state.schema.marks.comment, r = Ra(e.state.doc.content.size, t);
2043
+ !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: sn })));
2017
2044
  }
2018
2045
  //#endregion
2019
2046
  //#region src/composables/useCommentLifecycle.ts
2020
- var za = 408, Ba = 12;
2021
- function Va(e) {
2047
+ var Ha = 408, Ua = 12;
2048
+ function Wa(e) {
2022
2049
  let t = H(!1), n = H(null), r = H(null), i = H(null), a = H(null);
2023
2050
  function o(t) {
2024
2051
  let n = e.editorView.value, r = e.pagesContainer.value;
@@ -2051,7 +2078,7 @@ function Va(e) {
2051
2078
  r.value = null;
2052
2079
  return;
2053
2080
  }
2054
- let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + Ba : l.width / 2 + za;
2081
+ let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + Ua : l.width / 2 + Ha;
2055
2082
  r.value = {
2056
2083
  top: c.top - l.top,
2057
2084
  left: Math.max(16, Math.min(d, l.width - 16)),
@@ -2062,7 +2089,7 @@ function Va(e) {
2062
2089
  function c() {
2063
2090
  let s = e.editorView.value;
2064
2091
  if (!s) return;
2065
- let c = r.value, l = s.state.selection, u = Ia({
2092
+ let c = r.value, l = s.state.selection, u = za({
2066
2093
  docSize: s.state.doc.content.size,
2067
2094
  capturedRange: c ? {
2068
2095
  from: c.from,
@@ -2081,7 +2108,7 @@ function Va(e) {
2081
2108
  r.value = null;
2082
2109
  return;
2083
2110
  }
2084
- if (!La(s, u, rn, { selectEnd: !0 })) {
2111
+ if (!Ba(s, u, sn, { selectEnd: !0 })) {
2085
2112
  r.value = null, i.value = null;
2086
2113
  return;
2087
2114
  }
@@ -2094,11 +2121,11 @@ function Va(e) {
2094
2121
  let n = e.editorView.value, r = i.value;
2095
2122
  if (!n || !r) return !1;
2096
2123
  let a = e.createComment(t);
2097
- return La(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
2124
+ return Ba(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
2098
2125
  }
2099
2126
  function d() {
2100
2127
  let t = e.editorView.value;
2101
- t && i.value && Ra(t, i.value), l();
2128
+ t && i.value && Va(t, i.value), l();
2102
2129
  }
2103
2130
  return {
2104
2131
  isAddingComment: t,
@@ -2112,8 +2139,8 @@ function Va(e) {
2112
2139
  }
2113
2140
  //#endregion
2114
2141
  //#region src/composables/useCommentManagement.ts
2115
- function Ha(e) {
2116
- let t = an(), n = H([]), r = H(!1);
2142
+ function Ga(e) {
2143
+ let t = cn(), n = H([]), r = H(!1);
2117
2144
  function i() {
2118
2145
  r.value = !0;
2119
2146
  }
@@ -2128,12 +2155,12 @@ function Ha(e) {
2128
2155
  i(), c([...s.value, e]);
2129
2156
  }
2130
2157
  function u(n, r, i) {
2131
- return on(t, s.value, e.editorView.value), sn(t, n, i ?? e.author(), r);
2158
+ return ln(t, s.value, e.editorView.value), un(t, n, i ?? e.author(), r);
2132
2159
  }
2133
2160
  function d() {
2134
2161
  if (a(), o.value) return;
2135
2162
  let n = e.getDocument()?.package.document.comments;
2136
- on(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
2163
+ ln(t, n, e.editorView.value), c(n && n.length > 0 ? n : []);
2137
2164
  }
2138
2165
  function f(e, t) {
2139
2166
  l(u(t, e));
@@ -2158,7 +2185,7 @@ function Ha(e) {
2158
2185
  }
2159
2186
  function _(t, n) {
2160
2187
  let r = e.editorView.value;
2161
- r && (n ? cn : mn)(t)(r.state, r.dispatch);
2188
+ r && (n ? dn : _n)(t)(r.state, r.dispatch);
2162
2189
  }
2163
2190
  function v(e) {
2164
2191
  _(e, !0);
@@ -2168,11 +2195,11 @@ function Ha(e) {
2168
2195
  }
2169
2196
  function b(t, n) {
2170
2197
  let r = e.editorView.value;
2171
- r && ln(t, n)(r.state, r.dispatch);
2198
+ r && fn(t, n)(r.state, r.dispatch);
2172
2199
  }
2173
2200
  function x(t, n) {
2174
2201
  let r = e.editorView.value;
2175
- r && hn(t, n)(r.state, r.dispatch);
2202
+ r && Q(t, n)(r.state, r.dispatch);
2176
2203
  }
2177
2204
  return {
2178
2205
  comments: s,
@@ -2195,8 +2222,8 @@ function Ha(e) {
2195
2222
  }
2196
2223
  //#endregion
2197
2224
  //#region src/utils/imageClipboard.ts
2198
- function Ua(e, t, n) {
2199
- let r = _n(e.state), i = e.state.schema.marks.insertion;
2225
+ function Ka(e, t, n) {
2226
+ let r = $(e.state), i = e.state.schema.marks.insertion;
2200
2227
  if (!r || !i) return;
2201
2228
  let a = t.selection.from, o = a - n.nodeSize;
2202
2229
  o < 0 || t.addMark(o, a, i.create({
@@ -2205,7 +2232,7 @@ function Ua(e, t, n) {
2205
2232
  date: r.date
2206
2233
  }));
2207
2234
  }
2208
- function Wa(e, t) {
2235
+ function qa(e, t) {
2209
2236
  let n = e.state.doc.nodeAt(t);
2210
2237
  if (!n || n.type.name !== "image") return;
2211
2238
  let r = n.attrs.src;
@@ -2219,7 +2246,7 @@ function Wa(e, t) {
2219
2246
  e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
2220
2247
  });
2221
2248
  }
2222
- function Ga(e) {
2249
+ function Ja(e) {
2223
2250
  return new Promise((t, n) => {
2224
2251
  let r = new FileReader();
2225
2252
  r.onload = () => {
@@ -2227,7 +2254,7 @@ function Ga(e) {
2227
2254
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
2228
2255
  });
2229
2256
  }
2230
- function Ka(e) {
2257
+ function Ya(e) {
2231
2258
  return new Promise((t) => {
2232
2259
  let n = new Image();
2233
2260
  n.onload = () => t({
@@ -2239,7 +2266,7 @@ function Ka(e) {
2239
2266
  }), n.src = e;
2240
2267
  });
2241
2268
  }
2242
- function qa(e, t, n, r) {
2269
+ function Xa(e, t, n, r) {
2243
2270
  let i = e.state.schema.nodes.image;
2244
2271
  if (!i) return;
2245
2272
  let a = i.create({
@@ -2250,23 +2277,23 @@ function qa(e, t, n, r) {
2250
2277
  wrapType: "inline",
2251
2278
  displayMode: "inline"
2252
2279
  }), o = e.state.tr.replaceSelectionWith(a);
2253
- Ua(e, o, a), e.dispatch(o);
2280
+ Ka(e, o, a), e.dispatch(o);
2254
2281
  }
2255
- async function Ja(e) {
2282
+ async function Za(e) {
2256
2283
  try {
2257
2284
  let t = await navigator.clipboard.read();
2258
2285
  for (let n of t) {
2259
2286
  let t = n.types.find((e) => e.startsWith("image/"));
2260
2287
  if (t) {
2261
- let r = await Ga(await n.getType(t)), i = await Ka(r), a = i.width, o = i.height;
2262
- a > 612 && (o = Math.round(612 / a * o), a = 612), qa(e, r, a, o);
2288
+ let r = await Ja(await n.getType(t)), i = await Ya(r), a = i.width, o = i.height;
2289
+ a > 612 && (o = Math.round(612 / a * o), a = 612), Xa(e, r, a, o);
2263
2290
  return;
2264
2291
  }
2265
2292
  if (n.types.includes("text/html")) {
2266
2293
  let t = await (await n.getType("text/html")).text(), r = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(t)?.groups?.src;
2267
2294
  if (r) {
2268
2295
  let n = /data-width="(?<w>\d+)"/u.exec(t)?.groups?.w, i = /data-height="(?<h>\d+)"/u.exec(t)?.groups?.h, a = n ? Number(n) : 200, o = i ? Number(i) : 200;
2269
- qa(e, r, a || 200, o || 200);
2296
+ Xa(e, r, a || 200, o || 200);
2270
2297
  return;
2271
2298
  }
2272
2299
  }
@@ -2287,14 +2314,14 @@ async function Ja(e) {
2287
2314
  }
2288
2315
  }
2289
2316
  }
2290
- function Ya(e, t) {
2317
+ function Qa(e, t) {
2291
2318
  let n = e.state.doc.nodeAt(t);
2292
2319
  if (!n || n.type.name !== "image") return;
2293
2320
  let r = document.createElement("input");
2294
2321
  r.type = "file", r.accept = "image/*", r.onchange = async () => {
2295
2322
  let i = r.files?.[0];
2296
2323
  if (!i) return;
2297
- let a = await Ga(i), o = await Ka(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);
2324
+ let a = await Ja(i), o = await Ya(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);
2298
2325
  try {
2299
2326
  let r = e.state.tr.setNodeMarkup(t, void 0, {
2300
2327
  ...n.attrs,
@@ -2309,7 +2336,7 @@ function Ya(e, t) {
2309
2336
  }
2310
2337
  //#endregion
2311
2338
  //#region src/composables/useContextMenus.ts
2312
- var Xa = /* @__PURE__ */ new Set([
2339
+ var $a = /* @__PURE__ */ new Set([
2313
2340
  "inline",
2314
2341
  "square",
2315
2342
  "tight",
@@ -2318,16 +2345,16 @@ var Xa = /* @__PURE__ */ new Set([
2318
2345
  "behind",
2319
2346
  "inFront"
2320
2347
  ]);
2321
- function Za(e) {
2322
- return typeof e == "string" && Xa.has(e);
2348
+ function eo(e) {
2349
+ return typeof e == "string" && $a.has(e);
2323
2350
  }
2324
- function Qa(e) {
2325
- return Za(e) ? e : "inline";
2351
+ function to(e) {
2352
+ return eo(e) ? e : "inline";
2326
2353
  }
2327
- function $a(e) {
2354
+ function no(e) {
2328
2355
  return e === "left" || e === "right" || e === "none" ? e : null;
2329
2356
  }
2330
- function eo(e) {
2357
+ function ro(e) {
2331
2358
  let { t } = r(), n = H({
2332
2359
  isOpen: !1,
2333
2360
  position: {
@@ -2401,7 +2428,7 @@ function eo(e) {
2401
2428
  i.value = l(o, a, {
2402
2429
  x: t.clientX,
2403
2430
  y: t.clientY
2404
- }, Qa(s.attrs.wrapType), $a(s.attrs.cssFloat)), n.value.isOpen = !1;
2431
+ }, to(s.attrs.wrapType), no(s.attrs.cssFloat)), n.value.isOpen = !1;
2405
2432
  return;
2406
2433
  }
2407
2434
  }
@@ -2436,7 +2463,7 @@ function eo(e) {
2436
2463
  !o || o.type.name !== "image" || (i.value = l(a.element, a.pmPos, {
2437
2464
  x: t.clientX,
2438
2465
  y: t.clientY
2439
- }, Qa(o.attrs.wrapType), $a(o.attrs.cssFloat)), n.value.isOpen = !1);
2466
+ }, to(o.attrs.wrapType), no(o.attrs.cssFloat)), n.value.isOpen = !1);
2440
2467
  }
2441
2468
  function f(t) {
2442
2469
  let n = e.editorView.value, r = i.value;
@@ -2460,16 +2487,16 @@ function eo(e) {
2460
2487
  case "cut":
2461
2488
  if (e.selectedImage.value) {
2462
2489
  let t = e.selectedImage.value.pmPos;
2463
- Wa(n, t);
2490
+ qa(n, t);
2464
2491
  let r = n.state.doc.nodeAt(t);
2465
2492
  r && (n.dispatch(n.state.tr.delete(t, t + r.nodeSize)), e.selectedImage.value = null, e.onCut?.());
2466
2493
  } else n.focus(), document.execCommand("cut");
2467
2494
  break;
2468
2495
  case "copy":
2469
- e.selectedImage.value ? (Wa(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
2496
+ e.selectedImage.value ? (qa(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
2470
2497
  break;
2471
2498
  case "paste":
2472
- Ja(n).then(() => e.onPaste?.()).catch(() => void 0);
2499
+ Za(n).then(() => e.onPaste?.()).catch(() => void 0);
2473
2500
  break;
2474
2501
  case "pasteAsPlainText":
2475
2502
  navigator.clipboard.readText().then((t) => {
@@ -2490,7 +2517,7 @@ function eo(e) {
2490
2517
  e.selectedImage.value && (e.showImageProperties.value = !0);
2491
2518
  break;
2492
2519
  case "replaceImage":
2493
- e.selectedImage.value && Ya(n, e.selectedImage.value.pmPos);
2520
+ e.selectedImage.value && Qa(n, e.selectedImage.value.pmPos);
2494
2521
  break;
2495
2522
  case "deleteImage":
2496
2523
  if (e.selectedImage.value) {
@@ -2528,7 +2555,7 @@ function eo(e) {
2528
2555
  }
2529
2556
  //#endregion
2530
2557
  //#region src/composables/useDocumentLifecycle.ts
2531
- function to(e) {
2558
+ function io(e) {
2532
2559
  async function t(t) {
2533
2560
  e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
2534
2561
  }
@@ -2547,8 +2574,8 @@ function to(e) {
2547
2574
  }
2548
2575
  //#endregion
2549
2576
  //#region src/composables/useDocxEditorRefApi.ts
2550
- var no = Date.now();
2551
- function ro(e) {
2577
+ var ao = Date.now();
2578
+ function oo(e) {
2552
2579
  let t = [];
2553
2580
  function n() {
2554
2581
  e.onPrint?.(), window.print();
@@ -2562,11 +2589,11 @@ function ro(e) {
2562
2589
  function i(t, n) {
2563
2590
  let r = e.pagesRef.value;
2564
2591
  if (!r) return !1;
2565
- let i = Hn(r, t), a = i.at(0);
2592
+ let i = Gn(r, t), a = i.at(0);
2566
2593
  return a ? (a.scrollIntoView({
2567
2594
  block: "center",
2568
2595
  behavior: "smooth"
2569
- }), n?.highlight && Un(i, n.highlight), !0) : !1;
2596
+ }), n?.highlight && Kn(i, n.highlight), !0) : !1;
2570
2597
  }
2571
2598
  function a() {
2572
2599
  return e.zoom.value;
@@ -2574,19 +2601,19 @@ function ro(e) {
2574
2601
  let o = null;
2575
2602
  function s() {
2576
2603
  let t = e.getActiveView();
2577
- return t ? tn(t.state, t.dispatch) : !1;
2604
+ return t ? an(t.state, t.dispatch) : !1;
2578
2605
  }
2579
2606
  function c() {
2580
2607
  let t = e.getActiveView();
2581
- return t ? en(t.state, t.dispatch) : !1;
2608
+ return t ? rn(t.state, t.dispatch) : !1;
2582
2609
  }
2583
2610
  function l() {
2584
2611
  let t = e.getActiveView();
2585
- return t ? tn(t.state) : !1;
2612
+ return t ? an(t.state) : !1;
2586
2613
  }
2587
2614
  function u() {
2588
2615
  let t = e.getActiveView();
2589
- return t ? en(t.state) : !1;
2616
+ return t ? rn(t.state) : !1;
2590
2617
  }
2591
2618
  function d() {
2592
2619
  let t = e.getActiveView();
@@ -2620,7 +2647,7 @@ function ro(e) {
2620
2647
  getPageNumberForPmPos: (t) => {
2621
2648
  let n = e.layout.value;
2622
2649
  if (!n) return null;
2623
- let r = Q(n, t);
2650
+ let r = yn(n, t);
2624
2651
  return r == null ? null : r + 1;
2625
2652
  }
2626
2653
  }, o;
@@ -2631,7 +2658,7 @@ function ro(e) {
2631
2658
  function m() {
2632
2659
  let t = e.layout.value, n = e.editorView.value;
2633
2660
  if (!t || !n) return 0;
2634
- let r = Q(t, n.state.selection.from);
2661
+ let r = yn(t, n.state.selection.from);
2635
2662
  return r == null ? 0 : r + 1;
2636
2663
  }
2637
2664
  function h(t) {
@@ -2664,10 +2691,10 @@ function ro(e) {
2664
2691
  ensureEditorView: () => e.editor.ensureView(),
2665
2692
  createAIEditSnapshot: () => {
2666
2693
  let t = e.editorView.value;
2667
- return t ? Fn(t.state.doc) : null;
2694
+ return t ? Rn(t.state.doc) : null;
2668
2695
  },
2669
2696
  applyDocumentOperations: ({ snapshot: n, batch: r, author: i = e.author() }) => {
2670
- Nn(r.version);
2697
+ In(r.version);
2671
2698
  let a = e.editorView.value;
2672
2699
  if (!a) {
2673
2700
  let e = "committed";
@@ -2677,11 +2704,11 @@ function ro(e) {
2677
2704
  reason: "unsupportedBlock"
2678
2705
  }));
2679
2706
  return {
2680
- version: kn,
2707
+ version: Mn,
2681
2708
  status: e,
2682
2709
  applied: [],
2683
2710
  skipped: t,
2684
- issues: Rn(r.operations, t),
2711
+ issues: Vn(r.operations, t),
2685
2712
  receipts: [],
2686
2713
  undoHandle: null
2687
2714
  };
@@ -2691,9 +2718,9 @@ function ro(e) {
2691
2718
  let s = e.getComments(), c = {
2692
2719
  state: a.state,
2693
2720
  dispatch: (e) => {
2694
- a.dispatch($t(e)), c.state = a.state;
2721
+ a.dispatch(nn(e)), c.state = a.state;
2695
2722
  }
2696
- }, l = Mn({
2723
+ }, l = Fn({
2697
2724
  view: c,
2698
2725
  snapshot: n,
2699
2726
  batch: r,
@@ -2701,7 +2728,7 @@ function ro(e) {
2701
2728
  createCommentId: (t) => e.createAIEditComment(t, i),
2702
2729
  createUndoHandle: () => ({
2703
2730
  type: "documentOperationUndo",
2704
- id: `vue-${String(no++)}`
2731
+ id: `vue-${String(ao++)}`
2705
2732
  })
2706
2733
  });
2707
2734
  return l.undoHandle !== null && t.push({
@@ -2739,7 +2766,7 @@ function ro(e) {
2739
2766
  },
2740
2767
  applyAIEditOperations: ({ snapshot: t, operations: n, mode: r = "tracked-changes", author: i = e.author() }) => {
2741
2768
  let a = e.editorView.value;
2742
- return a ? jn({
2769
+ return a ? Pn({
2743
2770
  view: a,
2744
2771
  snapshot: t,
2745
2772
  operations: n,
@@ -2756,26 +2783,26 @@ function ro(e) {
2756
2783
  },
2757
2784
  acceptAIEditOperation: (t) => {
2758
2785
  let n = e.editorView.value;
2759
- return n ? cn(t)(n.state, n.dispatch) : !1;
2786
+ return n ? dn(t)(n.state, n.dispatch) : !1;
2760
2787
  },
2761
2788
  rejectAIEditOperation: (t) => {
2762
2789
  let n = e.editorView.value;
2763
- return n ? mn(t)(n.state, n.dispatch) : !1;
2790
+ return n ? _n(t)(n.state, n.dispatch) : !1;
2764
2791
  },
2765
2792
  undo: s,
2766
2793
  redo: c,
2767
2794
  scrollToAIEditOperation: (t) => {
2768
2795
  let n = e.editorView.value;
2769
2796
  if (!n) return !1;
2770
- let r = dn(n.state, t);
2797
+ let r = mn(n.state, t);
2771
2798
  if (!r) return !1;
2772
- let { from: i, to: a } = Zn(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2799
+ let { from: i, to: a } = er(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2773
2800
  return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2774
2801
  },
2775
2802
  scrollToBlock: (t, n) => {
2776
2803
  let r = e.editorView.value;
2777
2804
  if (!r) return !1;
2778
- let i = Qn({
2805
+ let i = tr({
2779
2806
  blockId: t,
2780
2807
  doc: r.state.doc,
2781
2808
  snapshot: n
@@ -2787,7 +2814,7 @@ function ro(e) {
2787
2814
  highlightPassage: ({ blockId: t, text: n, snapshot: r }) => {
2788
2815
  let a = e.editorView.value;
2789
2816
  if (!a) return "none";
2790
- let o = er({
2817
+ let o = rr({
2791
2818
  blockId: t,
2792
2819
  text: n,
2793
2820
  doc: a.state.doc,
@@ -2795,13 +2822,13 @@ function ro(e) {
2795
2822
  });
2796
2823
  if (o !== null) return e.setPassageHighlight(o), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(o.from)), "passage";
2797
2824
  e.setPassageHighlight(null);
2798
- let s = Qn({
2825
+ let s = tr({
2799
2826
  blockId: t,
2800
2827
  doc: a.state.doc,
2801
2828
  snapshot: r
2802
2829
  });
2803
2830
  if (s === null) return "none";
2804
- let c = rr(t);
2831
+ let c = or(t);
2805
2832
  if (c !== null && i(c, { highlight: {} })) return "block";
2806
2833
  let { from: l, to: u } = s, d = a.state.doc.resolve(l), f = a.state.doc.resolve(u);
2807
2834
  return a.dispatch(a.state.tr.setSelection(Z.between(d, f))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(l)), "block";
@@ -2812,11 +2839,11 @@ function ro(e) {
2812
2839
  showInDocument: (t, n) => {
2813
2840
  let r = e.editorView.value;
2814
2841
  if (!r) return !1;
2815
- let i = t.type === "textRange" ? $n({
2842
+ let i = t.type === "textRange" ? nr({
2816
2843
  range: t,
2817
2844
  doc: r.state.doc,
2818
2845
  snapshot: n
2819
- }) : Qn({
2846
+ }) : tr({
2820
2847
  blockId: t.blockId,
2821
2848
  doc: r.state.doc,
2822
2849
  snapshot: n
@@ -2827,7 +2854,7 @@ function ro(e) {
2827
2854
  },
2828
2855
  getSuggestions: () => {
2829
2856
  let t = e.editorView.value;
2830
- return t ? pn(t.state) : [];
2857
+ return t ? gn(t.state) : [];
2831
2858
  },
2832
2859
  acceptSuggestion: (t, n) => {
2833
2860
  let r = e.editorView.value;
@@ -2835,7 +2862,7 @@ function ro(e) {
2835
2862
  accepted: !1,
2836
2863
  appliedAs: null
2837
2864
  };
2838
- let i = pn(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = un(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
2865
+ let i = gn(r.state).find((e) => e.suggestionId === t)?.appliedAs ?? null, a = pn(t, { author: n?.author ?? e.author() })(r.state, r.dispatch);
2839
2866
  return {
2840
2867
  accepted: a,
2841
2868
  appliedAs: a ? i : null
@@ -2843,23 +2870,23 @@ function ro(e) {
2843
2870
  },
2844
2871
  rejectSuggestion: (t) => {
2845
2872
  let n = e.editorView.value;
2846
- return n ? gn(t)(n.state, n.dispatch) : !1;
2873
+ return n ? vn(t)(n.state, n.dispatch) : !1;
2847
2874
  },
2848
2875
  scrollToSuggestion: (t) => {
2849
2876
  let n = e.editorView.value;
2850
2877
  if (!n) return !1;
2851
- let r = fn(n.state, t);
2878
+ let r = hn(n.state, t);
2852
2879
  if (!r) return !1;
2853
- let { from: i, to: a } = Zn(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2880
+ let { from: i, to: a } = er(n.state.doc.content.size, r), o = n.state.doc.resolve(i), s = n.state.doc.resolve(a);
2854
2881
  return n.dispatch(n.state.tr.setSelection(Z.between(o, s))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
2855
2882
  },
2856
2883
  getTrackedChanges: () => {
2857
2884
  let t = e.editorView.value;
2858
- return t ? zn(t.state.doc) : [];
2885
+ return t ? Hn(t.state.doc) : [];
2859
2886
  },
2860
2887
  getCommentAnchors: () => {
2861
2888
  let t = e.editorView.value;
2862
- return t ? Ln(t.state.doc) : [];
2889
+ return t ? Bn(t.state.doc) : [];
2863
2890
  },
2864
2891
  getSelectionText: () => {
2865
2892
  let t = e.editorView.value;
@@ -2867,28 +2894,28 @@ function ro(e) {
2867
2894
  },
2868
2895
  getPageText: (t) => {
2869
2896
  let n = e.editorView.value;
2870
- return n ? or(e.layout.value, n.state.doc, t) : null;
2897
+ return n ? lr(e.layout.value, n.state.doc, t) : null;
2871
2898
  },
2872
2899
  getTargetPage: (t, n) => {
2873
2900
  let r = e.editorView.value, i = e.layout.value;
2874
2901
  if (!r || !i) return null;
2875
- let a = t.type === "textRange" ? $n({
2902
+ let a = t.type === "textRange" ? nr({
2876
2903
  range: t,
2877
2904
  doc: r.state.doc,
2878
2905
  snapshot: n
2879
- }) : Qn({
2906
+ }) : tr({
2880
2907
  blockId: t.blockId,
2881
2908
  doc: r.state.doc,
2882
2909
  snapshot: n
2883
2910
  });
2884
2911
  if (a === null) return null;
2885
- let o = Q(i, a.from);
2912
+ let o = yn(i, a.from);
2886
2913
  return o == null ? null : o + 1;
2887
2914
  },
2888
2915
  getContentControls: (t = {}) => {
2889
2916
  let n = e.editorView.value;
2890
- return n ? Kn(n.state.doc, t).map((e) => ({
2891
- properties: Wn(e.node),
2917
+ return n ? Yn(n.state.doc, t).map((e) => ({
2918
+ properties: qn(e.node),
2892
2919
  path: e.path,
2893
2920
  pmPos: e.pos
2894
2921
  })) : [];
@@ -2896,7 +2923,7 @@ function ro(e) {
2896
2923
  scrollToContentControl: (t) => {
2897
2924
  let n = e.editorView.value;
2898
2925
  if (!n) return !1;
2899
- let r = Gn(n.state.doc, t);
2926
+ let r = Jn(n.state.doc, t);
2900
2927
  if (!r) return !1;
2901
2928
  let i = r.pos + 1, a = n.state.doc.resolve(i);
2902
2929
  return n.dispatch(n.state.tr.setSelection(Z.near(a))), requestAnimationFrame(() => e.scrollVisiblePositionIntoView(i)), !0;
@@ -2904,52 +2931,52 @@ function ro(e) {
2904
2931
  setContentControlContent: (t, n, r = {}) => {
2905
2932
  let i = e.editorView.value;
2906
2933
  if (!i) return !1;
2907
- let a = typeof n == "string" ? Jn(i.state, t, n, r) : Xn(i.state, t, n, r);
2934
+ let a = typeof n == "string" ? Zn(i.state, t, n, r) : $n(i.state, t, n, r);
2908
2935
  return a ? (i.dispatch(a), !0) : !1;
2909
2936
  },
2910
2937
  setContentControlValue: (t, n, r = {}) => {
2911
2938
  let i = e.editorView.value;
2912
2939
  if (!i) return !1;
2913
- let a = Yn(i.state, t, n, r);
2940
+ let a = Qn(i.state, t, n, r);
2914
2941
  return a ? (i.dispatch(a), !0) : !1;
2915
2942
  },
2916
2943
  removeContentControl: (t, n = {}) => {
2917
2944
  let r = e.editorView.value;
2918
2945
  if (!r) return !1;
2919
- let i = qn(r.state, t, n);
2946
+ let i = Xn(r.state, t, n);
2920
2947
  return i ? (r.dispatch(i), !0) : !1;
2921
2948
  }
2922
2949
  } };
2923
2950
  }
2924
2951
  //#endregion
2925
2952
  //#region src/composables/useFormattingActions.ts
2926
- function io(e) {
2953
+ function so(e) {
2927
2954
  let t = () => e.activeView?.value ?? e.editorView.value;
2928
2955
  function n() {
2929
2956
  let e = t();
2930
- e && (nn(e.state, e.dispatch, e), e.focus());
2957
+ e && (on(e.state, e.dispatch, e), e.focus());
2931
2958
  }
2932
2959
  function r(n) {
2933
2960
  let r = t();
2934
2961
  if (!r) return;
2935
2962
  let i = e.getDocument(), a = i?.package?.styles;
2936
2963
  if (a) {
2937
- let e = ze(a).resolveParagraphStyle(n), t = { numbering: i?.package?.numbering ? fr(i.package.numbering) : null };
2938
- e.paragraphFormatting && (t.paragraphFormatting = e.paragraphFormatting), e.runFormatting && (t.runFormatting = e.runFormatting), sr(n, t)(r.state, (e) => r.dispatch(e));
2939
- } else sr(n)(r.state, (e) => r.dispatch(e));
2964
+ let e = ze(a).resolveParagraphStyle(n), t = { numbering: i?.package?.numbering ? hr(i.package.numbering) : null };
2965
+ e.paragraphFormatting && (t.paragraphFormatting = e.paragraphFormatting), e.runFormatting && (t.runFormatting = e.runFormatting), ur(n, t)(r.state, (e) => r.dispatch(e));
2966
+ } else ur(n)(r.state, (e) => r.dispatch(e));
2940
2967
  r.focus();
2941
2968
  }
2942
2969
  function i() {
2943
2970
  let t = e.editorView.value;
2944
- t && (pr(t.state, (e) => t.dispatch(e), t), t.focus());
2971
+ t && (gr(t.state, (e) => t.dispatch(e), t), t.focus());
2945
2972
  }
2946
2973
  function a() {
2947
2974
  let t = e.editorView.value;
2948
- t && (hr(t.state, (e) => t.dispatch(e), t), t.focus());
2975
+ t && (vr(t.state, (e) => t.dispatch(e), t), t.focus());
2949
2976
  }
2950
2977
  function o() {
2951
2978
  let t = e.editorView.value;
2952
- t && (mr(t.state, (e) => t.dispatch(e), t), t.focus());
2979
+ t && (_r(t.state, (e) => t.dispatch(e), t), t.focus());
2953
2980
  }
2954
2981
  function s(e) {
2955
2982
  let n = t();
@@ -2968,10 +2995,10 @@ function io(e) {
2968
2995
  }
2969
2996
  //#endregion
2970
2997
  //#region src/utils/fontFaces.ts
2971
- function ao() {
2998
+ function co() {
2972
2999
  return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
2973
3000
  }
2974
- async function oo(e, t, n, r) {
3001
+ async function lo(e, t, n, r) {
2975
3002
  let i;
2976
3003
  try {
2977
3004
  i = new FontFace(t, n, r), e.add(i);
@@ -2980,46 +3007,46 @@ async function oo(e, t, n, r) {
2980
3007
  }
2981
3008
  return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
2982
3009
  }
2983
- function so(e) {
2984
- let t = ao();
3010
+ function uo(e) {
3011
+ let t = co();
2985
3012
  if (t) for (let n of e) t.delete(n);
2986
3013
  }
2987
3014
  //#endregion
2988
3015
  //#region src/utils/embeddedFonts.ts
2989
- var co = {
3016
+ var fo = {
2990
3017
  faces: [],
2991
3018
  familyMap: /* @__PURE__ */ new Map()
2992
3019
  };
2993
- async function lo(e) {
2994
- let t = ao();
2995
- if (!t) return co;
3020
+ async function po(e) {
3021
+ let t = co();
3022
+ if (!t) return fo;
2996
3023
  let n;
2997
3024
  try {
2998
- n = await vr(e);
3025
+ n = await xr(e);
2999
3026
  } catch {
3000
- return co;
3027
+ return fo;
3001
3028
  }
3002
3029
  return {
3003
- faces: (await Promise.all(n.map((e) => oo(t, e.family, e.bytes, {
3030
+ faces: (await Promise.all(n.map((e) => lo(t, e.family, e.bytes, {
3004
3031
  weight: String(e.weight),
3005
3032
  style: e.style
3006
3033
  })))).filter((e) => e !== null),
3007
- familyMap: _r(n)
3034
+ familyMap: br(n)
3008
3035
  };
3009
3036
  }
3010
3037
  //#endregion
3011
3038
  //#region src/utils/hostFonts.ts
3012
- function uo(e) {
3039
+ function mo(e) {
3013
3040
  return typeof e == "string" && e.trim().length > 0;
3014
3041
  }
3015
- function fo(e) {
3016
- return typeof e != "object" || !e ? !1 : uo(Reflect.get(e, "family")) && uo(Reflect.get(e, "src"));
3042
+ function ho(e) {
3043
+ return typeof e != "object" || !e ? !1 : mo(Reflect.get(e, "family")) && mo(Reflect.get(e, "src"));
3017
3044
  }
3018
- function po(e) {
3045
+ function go(e) {
3019
3046
  if (!e) return [];
3020
3047
  let t = [];
3021
3048
  for (let n of e) {
3022
- if (!fo(n)) continue;
3049
+ if (!ho(n)) continue;
3023
3050
  let e = { display: "swap" };
3024
3051
  (typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
3025
3052
  family: n.family.trim(),
@@ -3029,20 +3056,20 @@ function po(e) {
3029
3056
  }
3030
3057
  return t;
3031
3058
  }
3032
- async function mo(e) {
3033
- let t = ao();
3059
+ async function _o(e) {
3060
+ let t = co();
3034
3061
  if (!t) return [];
3035
- let n = po(e);
3036
- return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => oo(t, e, n, r)))).filter((e) => e !== null);
3062
+ let n = go(e);
3063
+ return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => lo(t, e, n, r)))).filter((e) => e !== null);
3037
3064
  }
3038
3065
  //#endregion
3039
3066
  //#region src/composables/useFontLifecycle.ts
3040
- var ho = {
3041
- loadEmbedded: lo,
3042
- loadHost: mo,
3043
- remove: so
3067
+ var vo = {
3068
+ loadEmbedded: po,
3069
+ loadHost: _o,
3070
+ remove: uo
3044
3071
  };
3045
- function go(e, t = ho) {
3072
+ function yo(e, t = vo) {
3046
3073
  K(() => e.isReady.value ? e.getDocument()?.originalBuffer ?? null : null, (n, r, i) => {
3047
3074
  if (!n) return;
3048
3075
  let a = !1, o = [];
@@ -3051,9 +3078,9 @@ function go(e, t = ho) {
3051
3078
  t.remove(n);
3052
3079
  return;
3053
3080
  }
3054
- o = n, !(n.length === 0 && r.size === 0) && (gr(r.size > 0 ? r : null), e.remeasure());
3081
+ o = n, !(n.length === 0 && r.size === 0) && (yr(r.size > 0 ? r : null), e.remeasure());
3055
3082
  }), i(() => {
3056
- a = !0, t.remove(o), gr(null);
3083
+ a = !0, t.remove(o), yr(null);
3057
3084
  });
3058
3085
  }, { immediate: !0 }), K(e.fonts, (n, r, i) => {
3059
3086
  if (!n || n.length === 0) return;
@@ -3071,7 +3098,7 @@ function go(e, t = ho) {
3071
3098
  }
3072
3099
  //#endregion
3073
3100
  //#region src/composables/useHyperlinkManagement.ts
3074
- function _o(e) {
3101
+ function bo(e) {
3075
3102
  let t = H(null);
3076
3103
  function n(e, t) {
3077
3104
  t(e.state, (t) => e.dispatch(t), e);
@@ -3098,19 +3125,19 @@ function _o(e) {
3098
3125
  r && n(t, r()), t.focus();
3099
3126
  }
3100
3127
  function a(e) {
3101
- let n = xr(e);
3128
+ let n = wr(e);
3102
3129
  n && (window.open(n, "_blank", "noopener,noreferrer"), t.value = null);
3103
3130
  }
3104
3131
  function o(n, r) {
3105
3132
  let i = e.editorView.value;
3106
- i && (yr(i, {
3133
+ i && (Sr(i, {
3107
3134
  displayText: n,
3108
3135
  href: r
3109
3136
  }), t.value = null, i.focus());
3110
3137
  }
3111
3138
  function s() {
3112
3139
  let n = e.editorView.value;
3113
- n && (br(n, { popupHref: t.value?.href }), t.value = null, n.focus());
3140
+ n && (Cr(n, { popupHref: t.value?.href }), t.value = null, n.focus());
3114
3141
  }
3115
3142
  return {
3116
3143
  hyperlinkPopupData: t,
@@ -3123,7 +3150,7 @@ function _o(e) {
3123
3150
  }
3124
3151
  //#endregion
3125
3152
  //#region src/composables/useImageActions.ts
3126
- function vo(e) {
3153
+ function xo(e) {
3127
3154
  let t = Ne(null), n = H(!1), r = A(() => {
3128
3155
  e.stateTick.value;
3129
3156
  let n = e.editorView.value, r = t.value;
@@ -3173,7 +3200,7 @@ function vo(e) {
3173
3200
  }
3174
3201
  //#endregion
3175
3202
  //#region src/composables/useKeyboardShortcuts.ts
3176
- function yo(e) {
3203
+ function So(e) {
3177
3204
  function t(t) {
3178
3205
  if (e.handleZoomKeyDown(t), t.ctrlKey || t.metaKey) {
3179
3206
  if (t.key === "o") {
@@ -3188,10 +3215,10 @@ function yo(e) {
3188
3215
  }
3189
3216
  //#endregion
3190
3217
  //#region src/composables/useOutlineSidebar.ts
3191
- function bo(e) {
3218
+ function Co(e) {
3192
3219
  function t() {
3193
3220
  let t = e.editorView.value;
3194
- t && (e.outlineHeadings.value = Sr(t.state.doc));
3221
+ t && (e.outlineHeadings.value = Tr(t.state.doc));
3195
3222
  }
3196
3223
  function n() {
3197
3224
  e.showOutline.value || t(), e.showOutline.value = !e.showOutline.value;
@@ -3222,7 +3249,7 @@ function bo(e) {
3222
3249
  }
3223
3250
  //#endregion
3224
3251
  //#region src/composables/usePageSetupControls.ts
3225
- function xo(e) {
3252
+ function wo(e) {
3226
3253
  function t(t) {
3227
3254
  if (e.readOnly.value) return;
3228
3255
  let n = e.getDocument();
@@ -3250,19 +3277,19 @@ function xo(e) {
3250
3277
  }
3251
3278
  function s(t) {
3252
3279
  let n = e.editorView.value;
3253
- n && ur(t)(n.state, n.dispatch);
3280
+ n && pr(t)(n.state, n.dispatch);
3254
3281
  }
3255
3282
  function c(t) {
3256
3283
  let n = e.editorView.value;
3257
- n && dr(t)(n.state, n.dispatch);
3284
+ n && mr(t)(n.state, n.dispatch);
3258
3285
  }
3259
3286
  function l(t) {
3260
3287
  let n = e.editorView.value;
3261
- n && (t < 0 ? lr(-t, !0)(n.state, n.dispatch) : lr(t, !1)(n.state, n.dispatch));
3288
+ n && (t < 0 ? fr(-t, !0)(n.state, n.dispatch) : fr(t, !1)(n.state, n.dispatch));
3262
3289
  }
3263
3290
  function u(t) {
3264
3291
  let n = e.editorView.value;
3265
- n && cr(t)(n.state, n.dispatch);
3292
+ n && dr(t)(n.state, n.dispatch);
3266
3293
  }
3267
3294
  return {
3268
3295
  handlePageSetupApply: t,
@@ -3278,45 +3305,45 @@ function xo(e) {
3278
3305
  }
3279
3306
  //#endregion
3280
3307
  //#region src/utils/textSelection.ts
3281
- var So = /[\p{L}\p{N}\p{M}_''-]/u, Co = /\s/;
3282
- function wo(e) {
3283
- return !e || e.length === 0 ? !1 : So.test(e);
3308
+ var To = /[\p{L}\p{N}\p{M}_''-]/u, Eo = /\s/;
3309
+ function Do(e) {
3310
+ return !e || e.length === 0 ? !1 : To.test(e);
3284
3311
  }
3285
- function To(e) {
3286
- return !e || e.length === 0 ? !1 : Co.test(e);
3312
+ function Oo(e) {
3313
+ return !e || e.length === 0 ? !1 : Eo.test(e);
3287
3314
  }
3288
- function Eo(e, t) {
3315
+ function ko(e, t) {
3289
3316
  if (!e || e.length === 0) return [0, 0];
3290
3317
  t = Math.max(0, Math.min(t, e.length - 1));
3291
3318
  let n = e[t];
3292
- if (To(n)) {
3319
+ if (Oo(n)) {
3293
3320
  let n = t, r = t;
3294
- for (; n > 0 && To(e[n - 1]);) n--;
3295
- for (; r < e.length && To(e[r]);) r++;
3321
+ for (; n > 0 && Oo(e[n - 1]);) n--;
3322
+ for (; r < e.length && Oo(e[r]);) r++;
3296
3323
  return [n, r];
3297
3324
  }
3298
- if (wo(n)) {
3325
+ if (Do(n)) {
3299
3326
  let n = t, r = t;
3300
- for (; n > 0 && wo(e[n - 1]);) n--;
3301
- for (; r < e.length && wo(e[r]);) r++;
3327
+ for (; n > 0 && Do(e[n - 1]);) n--;
3328
+ for (; r < e.length && Do(e[r]);) r++;
3302
3329
  return [n, r];
3303
3330
  }
3304
3331
  return [t, t + 1];
3305
3332
  }
3306
3333
  //#endregion
3307
3334
  //#region src/utils/domQueries.ts
3308
- function Do(e, t, n) {
3309
- let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : qt(e);
3335
+ function Ao(e, t, n) {
3336
+ let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : Jt(e);
3310
3337
  for (let e of r) {
3311
3338
  let n = Number(e.dataset.pmStart), r = Number(e.dataset.pmEnd);
3312
3339
  if (!Number.isNaN(n) && !Number.isNaN(r) && t >= n && t <= r) return e;
3313
3340
  }
3314
3341
  return null;
3315
3342
  }
3316
- function Oo(e, t, n) {
3343
+ function jo(e, t, n) {
3317
3344
  if (!e || !t) return;
3318
- let r = Kt(e, n);
3319
- if (!r) for (let t of qt(e)) {
3345
+ let r = qt(e, n);
3346
+ if (!r) for (let t of Jt(e)) {
3320
3347
  let e = Number(t.dataset.pmStart), i = Number(t.dataset.pmEnd);
3321
3348
  if (Number.isFinite(e) && Number.isFinite(i) && n >= e && n <= i) {
3322
3349
  r = t;
@@ -3330,21 +3357,21 @@ function Oo(e, t, n) {
3330
3357
  behavior: "smooth"
3331
3358
  });
3332
3359
  }
3333
- function ko(e, t, n, r) {
3360
+ function Mo(e, t, n, r) {
3334
3361
  if (!e || !t) return null;
3335
3362
  let i = Bt(e, n, r, 1);
3336
3363
  return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
3337
3364
  }
3338
- function Ao(e, t, n, r) {
3365
+ function No(e, t, n, r) {
3339
3366
  if (!e) return;
3340
- let i = Do(e, t, r);
3367
+ let i = Ao(e, t, r);
3341
3368
  if (!i) return;
3342
- let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = Eo(a, t - o), l = o + s, u = o + c;
3369
+ let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = ko(a, t - o), l = o + s, u = o + c;
3343
3370
  l < u && n(l, u);
3344
3371
  }
3345
- function jo(e, t, n, r) {
3372
+ function Po(e, t, n, r) {
3346
3373
  if (!e) return;
3347
- let i = Do(e, t, r);
3374
+ let i = Ao(e, t, r);
3348
3375
  if (!i) return;
3349
3376
  let a = i.closest(".layout-paragraph");
3350
3377
  if (!a) return;
@@ -3353,13 +3380,13 @@ function jo(e, t, n, r) {
3353
3380
  }
3354
3381
  //#endregion
3355
3382
  //#region src/composables/usePagesPointer.ts
3356
- var Mo = 500;
3357
- function No(e) {
3383
+ var Fo = 500;
3384
+ function Io(e) {
3358
3385
  let t = H(null), n = null;
3359
3386
  function r() {
3360
3387
  n !== null && (clearTimeout(n), n = null);
3361
3388
  }
3362
- let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u = Dr(), d = S({
3389
+ let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u = Ar(), d = S({
3363
3390
  pagesContainer: e.pagesRef,
3364
3391
  onScrollExtendSelection: (e, t) => {
3365
3392
  if (!c || l === null) return;
@@ -3372,7 +3399,7 @@ function No(e) {
3372
3399
  visible: !1
3373
3400
  }), p = null;
3374
3401
  function m(t, n) {
3375
- return ko(e.pagesRef.value, e.editorView.value, t, n);
3402
+ return Mo(e.pagesRef.value, e.editorView.value, t, n);
3376
3403
  }
3377
3404
  function h() {
3378
3405
  let t = i.value;
@@ -3385,7 +3412,7 @@ function No(e) {
3385
3412
  function g(t, n) {
3386
3413
  let r = i.value, a = e.pagesRef.value, o = h();
3387
3414
  if (r?.rId && a && o !== e.editorView.value) {
3388
- let e = Cr(a, r.position, r.rId, t, n);
3415
+ let e = Er(a, r.position, r.rId, t, n);
3389
3416
  return e === null || e < 0 ? null : Math.min(e, o?.state.doc.content.size ?? e);
3390
3417
  }
3391
3418
  return m(t, n);
@@ -3398,13 +3425,13 @@ function No(e) {
3398
3425
  } catch {}
3399
3426
  }
3400
3427
  function v(t) {
3401
- Oo(e.pagesRef.value, e.pagesViewportRef.value, t);
3428
+ jo(e.pagesRef.value, e.pagesViewportRef.value, t);
3402
3429
  }
3403
3430
  function y(t) {
3404
- Ao(e.pagesRef.value, t, _, i.value?.position);
3431
+ No(e.pagesRef.value, t, _, i.value?.position);
3405
3432
  }
3406
3433
  function b(t) {
3407
- jo(e.pagesRef.value, t, _, i.value?.position);
3434
+ Po(e.pagesRef.value, t, _, i.value?.position);
3408
3435
  }
3409
3436
  function x(t) {
3410
3437
  let n = e.editorView.value;
@@ -3433,7 +3460,7 @@ function No(e) {
3433
3460
  if (!o) return;
3434
3461
  let s = e.pagesViewportRef.value;
3435
3462
  if (!s || !(a.target instanceof HTMLElement) || a.target.closest(".docx-editor-vue__note-editor")) return;
3436
- let l = Er({
3463
+ let l = kr({
3437
3464
  mouseX: a.clientX,
3438
3465
  mouseY: a.clientY,
3439
3466
  pagesContainer: o,
@@ -3443,7 +3470,7 @@ function No(e) {
3443
3470
  if (!l) {
3444
3471
  n === null && (n = setTimeout(() => {
3445
3472
  t.value = null, n = null;
3446
- }, Tr));
3473
+ }, Or));
3447
3474
  return;
3448
3475
  }
3449
3476
  let u = e.zoom.value || 1, d = s.getBoundingClientRect();
@@ -3494,7 +3521,7 @@ function No(e) {
3494
3521
  if (e.readOnly.value || !(t.target instanceof HTMLElement)) return;
3495
3522
  let n = t.target;
3496
3523
  if (n.closest(".docx-editor-vue__note-editor")) return;
3497
- let r = wr(n);
3524
+ let r = Dr(n);
3498
3525
  if (r) {
3499
3526
  t.preventDefault(), t.stopPropagation(), i.value && ie(), e.openNoteStory(r);
3500
3527
  return;
@@ -3504,11 +3531,11 @@ function No(e) {
3504
3531
  if (!s) return;
3505
3532
  let c = a ? "header" : "footer", l = e.getDocument();
3506
3533
  if (!l?.package) return;
3507
- let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = Dn(l.package), p = f.hasTitlePg && d === 1, m = Tn(f, c, p);
3534
+ let u = s.closest("[data-page-number]"), d = Number.parseInt(u?.dataset.pageNumber ?? "1", 10), f = An(l.package), p = f.hasTitlePg && d === 1, m = On(f, c, p);
3508
3535
  if (!m) {
3509
- let t = wn(l, c, p);
3536
+ let t = Dn(l, c, p);
3510
3537
  if (!t) return;
3511
- e.setDocument(t), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(t), f = Dn(t.package), m = Tn(f, c, p);
3538
+ e.setDocument(t), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(t), f = An(t.package), m = On(f, c, p);
3512
3539
  }
3513
3540
  if (!m) return;
3514
3541
  let h = m, g = e.pagesViewportRef.value;
@@ -3528,7 +3555,7 @@ function No(e) {
3528
3555
  }, requestAnimationFrame(() => {
3529
3556
  let n = e.getHfPmView(h);
3530
3557
  if (!n) return;
3531
- let r = Cr(e.pagesRef.value ?? s, c, h, t.clientX, t.clientY);
3558
+ let r = Er(e.pagesRef.value ?? s, c, h, t.clientX, t.clientY);
3532
3559
  if (r !== null) {
3533
3560
  let e = Math.max(0, Math.min(r, n.state.doc.content.size));
3534
3561
  n.dispatch(n.state.tr.setSelection(Z.create(n.state.doc, e)));
@@ -3541,12 +3568,12 @@ function No(e) {
3541
3568
  if (!t?.package || !n?.rId) return;
3542
3569
  let r = e.getHfPmView(n.rId);
3543
3570
  if (!r) return;
3544
- let a = On({
3571
+ let a = jn({
3545
3572
  document: t,
3546
3573
  position: n.position,
3547
3574
  isFirstPage: n.isFirstPage,
3548
3575
  activeRId: n.rId,
3549
- blocks: vn(r.state.doc)
3576
+ blocks: bn(r.state.doc)
3550
3577
  });
3551
3578
  a && (i.value = null, e.setDocument(a), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(a));
3552
3579
  }
@@ -3556,14 +3583,14 @@ function No(e) {
3556
3583
  i.value = null;
3557
3584
  return;
3558
3585
  }
3559
- let r = En({
3586
+ let r = kn({
3560
3587
  document: t,
3561
3588
  position: n.position,
3562
3589
  activeRId: n.rId
3563
3590
  });
3564
3591
  i.value = null, e.setDocument(r), e.syncHfPMs(), e.reLayout(), e.onDocumentChange(r);
3565
3592
  }
3566
- function oe(t) {
3593
+ function C(t) {
3567
3594
  if (t.button !== 0) {
3568
3595
  (t.target instanceof HTMLElement ? t.target : null)?.closest("a[href]") && t.preventDefault();
3569
3596
  return;
@@ -3617,15 +3644,15 @@ function No(e) {
3617
3644
  return;
3618
3645
  }
3619
3646
  let v = Date.now();
3620
- if (v - a < Mo && o === m ? s++ : s = 1, a = v, o = m, s === 2) y(m);
3647
+ if (v - a < Fo && o === m ? s++ : s = 1, a = v, o = m, s === 2) y(m);
3621
3648
  else if (s >= 3) b(m), s = 0;
3622
3649
  else if (t.shiftKey) {
3623
3650
  let { from: e } = f.state.selection;
3624
3651
  _(e, m);
3625
- } else _(m), l = m, c = !0, u.begin(Or(f, m));
3652
+ } else _(m), l = m, c = !0, u.begin(jr(f, m));
3626
3653
  f.focus();
3627
3654
  }
3628
- function se(e) {
3655
+ function oe(e) {
3629
3656
  if (!c || l === null) return;
3630
3657
  let t = g(e.clientX, e.clientY);
3631
3658
  if (t !== null) {
@@ -3638,10 +3665,10 @@ function No(e) {
3638
3665
  }
3639
3666
  d.updateMousePosition(e.clientX, e.clientY);
3640
3667
  }
3641
- function C() {
3668
+ function w() {
3642
3669
  c = !1, u.end(), d.stopAutoScroll();
3643
3670
  }
3644
- function ce() {
3671
+ function se() {
3645
3672
  let t = e.pagesViewportRef.value, n = e.layout.value;
3646
3673
  if (!t || !n || n.pages.length === 0) return;
3647
3674
  let r = t.scrollTop, i = n.pages.length, a = r + t.clientHeight / 2, o = 24, s = 1;
@@ -3667,9 +3694,9 @@ function No(e) {
3667
3694
  }, 600);
3668
3695
  }
3669
3696
  return ke(() => {
3670
- window.addEventListener("mousemove", se), window.addEventListener("mouseup", C), e.pagesViewportRef.value?.addEventListener("scroll", ce, { passive: !0 });
3697
+ window.addEventListener("mousemove", oe), window.addEventListener("mouseup", w), e.pagesViewportRef.value?.addEventListener("scroll", se, { passive: !0 });
3671
3698
  }), B(() => {
3672
- r(), window.removeEventListener("mousemove", se), window.removeEventListener("mouseup", C), e.pagesViewportRef.value?.removeEventListener("scroll", ce), p && clearTimeout(p);
3699
+ r(), window.removeEventListener("mousemove", oe), window.removeEventListener("mouseup", w), e.pagesViewportRef.value?.removeEventListener("scroll", se), p && clearTimeout(p);
3673
3700
  }), {
3674
3701
  tableInsertButton: t,
3675
3702
  hfEdit: i,
@@ -3678,7 +3705,7 @@ function No(e) {
3678
3705
  setPmSelection: _,
3679
3706
  scrollVisiblePositionIntoView: v,
3680
3707
  navigateToBookmark: x,
3681
- handlePagesMouseDown: oe,
3708
+ handlePagesMouseDown: C,
3682
3709
  handlePagesMouseMove: ee,
3683
3710
  handlePagesClick: ne,
3684
3711
  handlePagesDoubleClick: re,
@@ -3690,8 +3717,8 @@ function No(e) {
3690
3717
  }
3691
3718
  //#endregion
3692
3719
  //#region src/composables/useRemoteSelectionSync.ts
3693
- var Po = (e) => {
3694
- let t = new kr(), n = null, r = () => {
3720
+ var Lo = (e) => {
3721
+ let t = new Mr(), n = null, r = () => {
3695
3722
  n !== null && (cancelAnimationFrame(n), n = null);
3696
3723
  let r = e.pagesRef.value;
3697
3724
  r && t.clear(r);
@@ -3714,8 +3741,8 @@ var Po = (e) => {
3714
3741
  ], i, { flush: "post" }), Ae(() => {
3715
3742
  a(), r();
3716
3743
  });
3717
- }, Fo = (e) => {
3718
- let t = new Ar(), n = null, r = () => {
3744
+ }, Ro = (e) => {
3745
+ let t = new Nr(), n = null, r = () => {
3719
3746
  n !== null && (cancelAnimationFrame(n), n = null);
3720
3747
  let r = e.pagesRef.value;
3721
3748
  r && t.clear(r);
@@ -3729,8 +3756,15 @@ var Po = (e) => {
3729
3756
  state: i.state,
3730
3757
  zoom: e.zoom.value,
3731
3758
  zIndex: ae.selectionOverlay
3732
- });
3733
- if (a.type === "image") {
3759
+ }), { selection: o } = i.state, s = r.getBoundingClientRect(), c = o.empty ? Vt(r, o.head, s) : null;
3760
+ if (Xt({
3761
+ hiddenHost: e.hiddenContainer.value,
3762
+ editorView: i,
3763
+ visibleCaret: c ? {
3764
+ left: s.left + c.x,
3765
+ top: s.top + c.y
3766
+ } : null
3767
+ }), a.type === "image") {
3734
3768
  let t = e.selectedImage.value, n = a.element.offsetWidth, r = a.element.offsetHeight;
3735
3769
  (t?.element !== a.element || t.pmPos !== a.pmPos || t.width !== n || t.height !== r) && (e.selectedImage.value = {
3736
3770
  element: a.element,
@@ -3743,32 +3777,38 @@ var Po = (e) => {
3743
3777
  e.imageInteracting?.value || (e.selectedImage.value = null);
3744
3778
  });
3745
3779
  }, a = e.syncCoordinator.onRender(i);
3746
- return K([
3780
+ K([
3747
3781
  e.zoom,
3748
3782
  e.editorView,
3749
3783
  e.pagesRef
3750
- ], i, { flush: "post" }), Ae(() => {
3751
- a(), r();
3784
+ ], i, { flush: "post" }), K(e.hiddenContainer, (e, t, n) => {
3785
+ e && (e.addEventListener("focusin", i), e.addEventListener("compositionend", i), n(() => {
3786
+ e.removeEventListener("focusin", i), e.removeEventListener("compositionend", i);
3787
+ }));
3788
+ }, { immediate: !0 });
3789
+ let o = typeof window > "u" ? null : window;
3790
+ return o?.addEventListener("scroll", i, !0), Ae(() => {
3791
+ a(), r(), o?.removeEventListener("scroll", i, !0), Yt(e.hiddenContainer.value);
3752
3792
  }), {
3753
3793
  clearOverlay: r,
3754
3794
  updateSelectionOverlay: i
3755
3795
  };
3756
- }, Io = { class: "docx-editor-vue__toolbar-shell" }, Lo = {
3796
+ }, zo = { class: "docx-editor-vue__toolbar-shell" }, Bo = {
3757
3797
  key: 0,
3758
3798
  class: "docx-editor-vue__error"
3759
- }, Ro = {
3799
+ }, Vo = {
3760
3800
  key: 1,
3761
3801
  class: "docx-editor-vue__loading"
3762
- }, zo = {
3802
+ }, Ho = {
3763
3803
  key: 2,
3764
3804
  class: "docx-editor-vue__placeholder"
3765
- }, Bo = { class: "docx-editor-vue__editor-area" }, Vo = {
3805
+ }, Uo = { class: "docx-editor-vue__editor-area" }, Wo = {
3766
3806
  key: 0,
3767
3807
  class: "docx-editor-vue__ruler-h"
3768
- }, Ho = {
3808
+ }, Go = {
3769
3809
  key: 1,
3770
3810
  class: "docx-editor-vue__ruler-v"
3771
- }, Uo = {
3811
+ }, Ko = {
3772
3812
  class: "docx-editor-vue__editor-content-wrapper",
3773
3813
  style: {
3774
3814
  position: "relative",
@@ -3776,11 +3816,11 @@ var Po = (e) => {
3776
3816
  flexDirection: "column",
3777
3817
  minHeight: "100%"
3778
3818
  }
3779
- }, Wo = {
3819
+ }, qo = {
3780
3820
  "data-testid": "selection-overlay",
3781
3821
  class: "docx-editor-vue__decoration-origin",
3782
3822
  "aria-hidden": "true"
3783
- }, Go = ["aria-label"], Ko = { class: "docx-editor-vue__note-editor-header" }, qo = ["aria-label"], Jo = ["aria-label"], Yo = /*#__PURE__*/ t(/* @__PURE__ */ I({
3823
+ }, Jo = ["aria-label"], Yo = { class: "docx-editor-vue__note-editor-header" }, Xo = ["aria-label"], Zo = ["aria-label"], Qo = /*#__PURE__*/ t(/* @__PURE__ */ I({
3784
3824
  __name: "DocxEditor",
3785
3825
  props: {
3786
3826
  documentBuffer: { default: null },
@@ -3904,8 +3944,8 @@ var Po = (e) => {
3904
3944
  setup(e, { expose: t, emit: n }) {
3905
3945
  let o = e, s = n;
3906
3946
  a(o.components);
3907
- let c = fe();
3908
- pi(c);
3947
+ let c = de();
3948
+ gi(c);
3909
3949
  function l(e) {
3910
3950
  o.onChange?.(e), s("change", e), s("update:document", e);
3911
3951
  }
@@ -3922,20 +3962,20 @@ var Po = (e) => {
3922
3962
  K(re, (e) => {
3923
3963
  e || (ae.value = !1);
3924
3964
  });
3925
- let S = H(null), oe = H(null), C = H(null), ue = H(null), pe = H(null), me = H(null), he = A(() => o.showRuler ?? !1), w = H(0), ge = H(!1), T = H(!1), E = H(!1), _e = H(!1), ve = H(!1), ye = H(!1), be = H(!1), xe = H(o.showOutline), D = H(!1), k = H(null), Se = H(null), we = H(null), I = Ne([]), Ee = Ne([]), { zoom: L, zoomPercent: Oe, isMinZoom: Ae, isMaxZoom: je, setZoom: U, zoomIn: Pe, zoomOut: ze, handleWheel: Ve, handleKeyDown: He, ZOOM_PRESETS: We } = de(o.initialZoom);
3965
+ let S = H(null), C = H(null), w = H(null), le = H(null), fe = H(null), pe = H(null), me = A(() => o.showRuler ?? !1), T = H(0), he = H(!1), ge = H(!1), E = H(!1), _e = H(!1), ve = H(!1), ye = H(!1), be = H(!1), xe = H(o.showOutline), D = H(!1), k = H(null), Se = H(null), we = H(null), I = Ne([]), Ee = Ne([]), { zoom: L, zoomPercent: Oe, isMinZoom: Ae, isMaxZoom: je, setZoom: U, zoomIn: Pe, zoomOut: ze, handleWheel: Ve, handleKeyDown: He, ZOOM_PRESETS: We } = ue(o.initialZoom);
3926
3966
  function Ke(e) {
3927
3967
  o.enableWheelZoom !== !1 && Ve(e);
3928
3968
  }
3929
- yo({
3930
- showFindReplace: ge,
3931
- showHyperlink: T,
3969
+ So({
3970
+ showFindReplace: he,
3971
+ showHyperlink: ge,
3932
3972
  handleZoomKeyDown: He
3933
3973
  });
3934
- let { editor: Je, editorView: J, editorState: it, remoteSelections: ot, headerFooterSelection: ct, activeNoteStory: lt, isReady: ut, isDirty: dt, parseError: ft, layout: pt, blocks: mt, measures: ht, syncCoordinator: gt, loadBuffer: _t, loadDocument: vt, save: yt, getDocument: Y, setDocument: bt, getHeaderFooterView: xt, syncHeaderFooterViews: St, openNoteStory: Ct, closeNoteStory: wt, getActiveNoteView: Tt, getCommands: Et, reLayout: Dt } = ce({
3974
+ let { editor: Je, editorView: J, editorState: it, remoteSelections: ot, headerFooterSelection: ct, activeNoteStory: lt, isReady: ut, isDirty: dt, parseError: ft, layout: pt, blocks: mt, measures: ht, syncCoordinator: gt, loadBuffer: _t, loadDocument: vt, save: yt, getDocument: Y, setDocument: bt, getHeaderFooterView: xt, syncHeaderFooterViews: St, openNoteStory: Ct, closeNoteStory: wt, getActiveNoteView: Tt, getCommands: Et, reLayout: Dt } = se({
3935
3975
  hiddenContainer: S,
3936
- hiddenHeaderFooterContainer: oe,
3976
+ hiddenHeaderFooterContainer: C,
3937
3977
  noteEditorContainer: we,
3938
- pagesContainer: C,
3978
+ pagesContainer: w,
3939
3979
  readOnly: d,
3940
3980
  editorMode: u,
3941
3981
  author: () => o.author,
@@ -3972,7 +4012,7 @@ var Po = (e) => {
3972
4012
  onSelectiveSaveTripwire: o.onSelectiveSaveTripwire ? (e) => o.onSelectiveSaveTripwire?.(e) : void 0
3973
4013
  });
3974
4014
  K(it, (e, t) => {
3975
- me.value !== null && e && t && !e.doc.eq(t.doc) && (me.value = null);
4015
+ pe.value !== null && e && t && !e.doc.eq(t.doc) && (pe.value = null);
3976
4016
  });
3977
4017
  let X = A(() => $e({
3978
4018
  bodyView: J.value,
@@ -3985,38 +4025,39 @@ var Po = (e) => {
3985
4025
  function At() {
3986
4026
  J.value && (tt(), et(), Dt());
3987
4027
  }
3988
- go({
4028
+ yo({
3989
4029
  isReady: ut,
3990
4030
  getDocument: Y,
3991
4031
  fonts: () => o.fonts,
3992
4032
  remeasure: At
3993
4033
  });
3994
- let { selectedImage: Z, imageInteracting: jt, imageToolbarContext: Mt, handleToolbarImageWrap: Nt, handleImageTransform: Pt } = vo({
4034
+ let { selectedImage: Z, imageInteracting: jt, imageToolbarContext: Mt, handleToolbarImageWrap: Nt, handleImageTransform: Pt } = xo({
3995
4035
  editorView: X,
3996
4036
  zoom: L,
3997
- stateTick: w,
4037
+ stateTick: T,
3998
4038
  getCommands: Et
3999
- }), Ft = Fo({
4039
+ }), Ft = Ro({
4000
4040
  editorView: J,
4001
- pagesRef: C,
4041
+ hiddenContainer: S,
4042
+ pagesRef: w,
4002
4043
  zoom: L,
4003
4044
  selectedImage: Z,
4004
4045
  syncCoordinator: gt,
4005
4046
  imageInteracting: jt
4006
4047
  });
4007
- Po({
4008
- pagesRef: C,
4048
+ Lo({
4049
+ pagesRef: w,
4009
4050
  remoteSelections: ot,
4010
4051
  syncCoordinator: gt,
4011
4052
  zoom: L
4012
4053
  });
4013
- let { hyperlinkPopupData: It, handleHyperlinkSubmit: Lt, handleHyperlinkRemove: Bt, handleHyperlinkPopupNavigate: Vt, handleHyperlinkPopupEdit: Ht, handleHyperlinkPopupRemove: Ut } = _o({
4054
+ let { hyperlinkPopupData: It, handleHyperlinkSubmit: Lt, handleHyperlinkRemove: Bt, handleHyperlinkPopupNavigate: Vt, handleHyperlinkPopupEdit: Ht, handleHyperlinkPopupRemove: Ut } = bo({
4014
4055
  editorView: X,
4015
4056
  getCommands: Et
4016
- }), Wt = se(), { tableInsertButton: Gt, hfEdit: Kt, scrollPageInfo: qt, resolvePos: Jt, setPmSelection: Yt, scrollVisiblePositionIntoView: Xt, handlePagesMouseDown: Zt, handlePagesMouseMove: Qt, handlePagesClick: $t, handlePagesDoubleClick: en, handleTableInsertClick: tn, handleHfSave: nn, handleHfRemove: rn } = No({
4057
+ }), Wt = oe(), { tableInsertButton: Gt, hfEdit: Kt, scrollPageInfo: qt, resolvePos: Jt, setPmSelection: Yt, scrollVisiblePositionIntoView: Xt, handlePagesMouseDown: Zt, handlePagesMouseMove: Qt, handlePagesClick: $t, handlePagesDoubleClick: en, handleTableInsertClick: tn, handleHfSave: nn, handleHfRemove: rn } = Io({
4017
4058
  editorView: J,
4018
- pagesRef: C,
4019
- pagesViewportRef: ue,
4059
+ pagesRef: w,
4060
+ pagesViewportRef: le,
4020
4061
  selectedImage: Z,
4021
4062
  imageInteracting: jt,
4022
4063
  hyperlinkPopupData: It,
@@ -4051,7 +4092,7 @@ var Po = (e) => {
4051
4092
  K(Kt, (e) => {
4052
4093
  Se.value = e?.rId ?? null, e && Ft.clearOverlay();
4053
4094
  }, { immediate: !0 });
4054
- let sn = bo({
4095
+ let sn = Co({
4055
4096
  editorView: J,
4056
4097
  showOutline: xe,
4057
4098
  showSidebar: D,
@@ -4059,7 +4100,7 @@ var Po = (e) => {
4059
4100
  activeSidebarItem: k,
4060
4101
  extractCommentsAndChanges: () => {},
4061
4102
  scrollToVisiblePosition: Xt
4062
- }), { contextMenu: cn, imageContextMenu: ln, imageContextMenuTextActions: un, customTextMenuItems: dn, handleContextMenu: fn, handleSelectedImageContextMenu: pn, handleImageWrapSelect: mn, handleContextMenuAction: hn } = eo({
4103
+ }), { contextMenu: cn, imageContextMenu: ln, imageContextMenuTextActions: un, customTextMenuItems: dn, handleContextMenu: fn, handleSelectedImageContextMenu: pn, handleImageWrapSelect: mn, handleContextMenuAction: hn } = ro({
4063
4104
  editorView: X,
4064
4105
  selectedImage: Z,
4065
4106
  zoom: L,
@@ -4073,7 +4114,7 @@ var Po = (e) => {
4073
4114
  onCopy: () => o.onCopy?.(),
4074
4115
  onCut: () => o.onCut?.(),
4075
4116
  onPaste: () => o.onPaste?.()
4076
- }), gn = le(J, w), _n = A(() => gn.value.entries), Q = Ha({
4117
+ }), gn = ce(J, T), _n = A(() => gn.value.entries), Q = Ga({
4077
4118
  editorView: J,
4078
4119
  getDocument: Y,
4079
4120
  author: () => o.author,
@@ -4082,10 +4123,10 @@ var Po = (e) => {
4082
4123
  o.onCommentsChange?.(e), s("comments-change", e);
4083
4124
  },
4084
4125
  reLayout: Dt
4085
- }), vn = Q.comments, $ = Va({
4126
+ }), vn = Q.comments, $ = Wa({
4086
4127
  editorView: J,
4087
- pagesViewport: ue,
4088
- pagesContainer: C,
4128
+ pagesViewport: le,
4129
+ pagesContainer: w,
4089
4130
  readOnly: d,
4090
4131
  createComment: Q.createComment,
4091
4132
  pushComment: Q.pushComment,
@@ -4099,15 +4140,15 @@ var Po = (e) => {
4099
4140
  navigator.clipboard?.writeText(e), It.value = null;
4100
4141
  }
4101
4142
  let bn = A(() => {
4102
- w.value;
4143
+ T.value;
4103
4144
  let e = Y()?.package.document;
4104
4145
  return e ? e.finalSectionProperties ?? e.sections?.[0]?.properties ?? null : null;
4105
4146
  }), xn = A(() => {
4106
- w.value;
4147
+ T.value;
4107
4148
  let e = Y();
4108
4149
  return e ? at(e) : void 0;
4109
4150
  }), Sn = A(() => {
4110
- w.value;
4151
+ T.value;
4111
4152
  let e = X.value;
4112
4153
  if (!e) return {};
4113
4154
  let t = Xe(e.state).table;
@@ -4115,7 +4156,7 @@ var Po = (e) => {
4115
4156
  let n = {}, r = t.attrs.width, i = t.attrs.widthType, a = t.attrs.justification;
4116
4157
  return typeof r == "number" && (n.width = r), typeof i == "string" && (n.widthType = i), typeof a == "string" && (n.justification = a), n;
4117
4158
  }), Cn = A(() => {
4118
- w.value;
4159
+ T.value;
4119
4160
  let e = {};
4120
4161
  o.fontFamilies !== void 0 && (e.fontFamilies = o.fontFamilies);
4121
4162
  let t = Y()?.package.styles?.styles;
@@ -4128,7 +4169,7 @@ var Po = (e) => {
4128
4169
  transform: L.value === 1 ? void 0 : `scale(${L.value})`,
4129
4170
  transformOrigin: "top center",
4130
4171
  transition: "transform 0.2s ease"
4131
- })), { handleApplyStyle: Dn, handleInsertSymbol: On, handleInsertSectionBreakNextPage: kn, handleInsertSectionBreakContinuous: An } = io({
4172
+ })), { handleApplyStyle: Dn, handleInsertSymbol: On, handleInsertSectionBreakNextPage: kn, handleInsertSectionBreakContinuous: An } = so({
4132
4173
  editorView: X,
4133
4174
  getDocument: Y
4134
4175
  });
@@ -4169,15 +4210,15 @@ var Po = (e) => {
4169
4210
  let e = J.value;
4170
4211
  e && (Ye(e), e.focus());
4171
4212
  }
4172
- let { handlePageSetupApply: Fn, handleLeftMarginChange: In, handleRightMarginChange: Ln, handleTopMarginChange: Rn, handleBottomMarginChange: zn, handleIndentLeftChange: Bn, handleIndentRightChange: Vn, handleFirstLineIndentChange: Hn, handleTabStopRemove: Un } = xo({
4213
+ let { handlePageSetupApply: Fn, handleLeftMarginChange: In, handleRightMarginChange: Ln, handleTopMarginChange: Rn, handleBottomMarginChange: zn, handleIndentLeftChange: Bn, handleIndentRightChange: Vn, handleFirstLineIndentChange: Hn, handleTabStopRemove: Un } = wo({
4173
4214
  editorView: J,
4174
4215
  getDocument: Y,
4175
4216
  readOnly: d,
4176
- stateTick: w,
4217
+ stateTick: T,
4177
4218
  reLayout: Dt,
4178
4219
  onChange: l
4179
4220
  }), Wn = A(() => {
4180
- w.value;
4221
+ T.value;
4181
4222
  let e = X.value, t = e ? Ze(e.state).paragraphFormatting : {};
4182
4223
  return {
4183
4224
  indentLeft: t.indentLeft ?? 0,
@@ -4194,13 +4235,13 @@ var Po = (e) => {
4194
4235
  switch (e) {
4195
4236
  case "find":
4196
4237
  case "findReplace":
4197
- ge.value = !0;
4238
+ he.value = !0;
4198
4239
  break;
4199
4240
  case "insertSymbol":
4200
4241
  E.value = !0;
4201
4242
  break;
4202
4243
  case "insertHyperlink":
4203
- T.value = !0;
4244
+ ge.value = !0;
4204
4245
  break;
4205
4246
  case "pageSetup":
4206
4247
  ve.value = !0;
@@ -4238,7 +4279,7 @@ var Po = (e) => {
4238
4279
  let t = Y();
4239
4280
  if (!t) return;
4240
4281
  let n = st(t, e);
4241
- bt(n), dt.value = !0, w.value++, Dt(), l(n);
4282
+ bt(n), dt.value = !0, T.value++, Dt(), l(n);
4242
4283
  }
4243
4284
  function Jn(e, t) {
4244
4285
  Mn(e, t);
@@ -4248,7 +4289,7 @@ var Po = (e) => {
4248
4289
  !t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
4249
4290
  }
4250
4291
  let Xn = H(!1);
4251
- to({
4292
+ io({
4252
4293
  documentBuffer: () => o.documentBuffer ?? null,
4253
4294
  document: () => o.document ?? null,
4254
4295
  loadDocumentBuffer: _t,
@@ -4269,7 +4310,7 @@ var Po = (e) => {
4269
4310
  Zn.value = !0;
4270
4311
  let e = o.initialScrollTop;
4271
4312
  requestAnimationFrame(() => {
4272
- pe.value && (pe.value.scrollTop = e);
4313
+ fe.value && (fe.value.scrollTop = e);
4273
4314
  });
4274
4315
  }
4275
4316
  K(ut, (e) => {
@@ -4282,29 +4323,29 @@ var Po = (e) => {
4282
4323
  t && o.onCompatibilityChange?.(Qe(t)), o.autoOpenReviewSidebar !== !1 && !Xn.value && (vn.value.length > 0 || _n.value.length > 0) && (Xn.value = !0, D.value = !0), $n(), s("ready");
4283
4324
  }), ke(() => {
4284
4325
  let e = Je.on("selectionChange", () => {
4285
- w.value++, $.updateFloatingButton();
4326
+ T.value++, $.updateFloatingButton();
4286
4327
  }), t = Je.on("docChange", () => {
4287
- w.value++, sn.recomputeHeadingsIfOpen();
4328
+ T.value++, sn.recomputeHeadingsIfOpen();
4288
4329
  }), n = Je.on("layoutComplete", () => {
4289
- w.value++;
4330
+ T.value++;
4290
4331
  }), r = Wt.install(), i = nt(() => o.onFontsLoaded?.());
4291
4332
  B(() => {
4292
4333
  e(), t(), n(), r(), i();
4293
4334
  });
4294
4335
  });
4295
- let { exposed: er } = ro({
4336
+ let { exposed: er } = oo({
4296
4337
  editor: Je,
4297
4338
  editorView: J,
4298
4339
  isDirty: dt,
4299
4340
  commentsDirty: Q.commentsDirty,
4300
4341
  clearCommentsDirty: Q.clearCommentsDirty,
4301
4342
  layout: pt,
4302
- pagesRef: C,
4303
- pagesViewportRef: ue,
4343
+ pagesRef: w,
4344
+ pagesViewportRef: le,
4304
4345
  zoom: L,
4305
4346
  scrollVisiblePositionIntoView: Xt,
4306
4347
  setPassageHighlight: (e) => {
4307
- me.value = e;
4348
+ pe.value = e;
4308
4349
  },
4309
4350
  author: () => o.author,
4310
4351
  createAIEditComment: (e, t) => {
@@ -4337,7 +4378,7 @@ var Po = (e) => {
4337
4378
  ]),
4338
4379
  style: z(e.style)
4339
4380
  }, [
4340
- P("div", Io, [F(ki, {
4381
+ P("div", zo, [F(Mi, {
4341
4382
  "show-table-insert": o.showTableInsert !== !1,
4342
4383
  onRename: n[0] ||= (e) => s("rename", e),
4343
4384
  onMenuAction: Kn,
@@ -4350,7 +4391,7 @@ var Po = (e) => {
4350
4391
  key: 0,
4351
4392
  view: X.value,
4352
4393
  "get-commands": G(Et),
4353
- "state-tick": w.value,
4394
+ "state-tick": T.value,
4354
4395
  "zoom-percent": G(Oe),
4355
4396
  "is-min-zoom": G(Ae),
4356
4397
  "is-max-zoom": G(je),
@@ -4365,8 +4406,8 @@ var Po = (e) => {
4365
4406
  "image-context": G(Mt),
4366
4407
  theme: e.theme ?? null
4367
4408
  }, Cn.value, {
4368
- onFindReplace: n[2] ||= (e) => ge.value = !0,
4369
- onInsertLink: n[3] ||= (e) => T.value = !0,
4409
+ onFindReplace: n[2] ||= (e) => he.value = !0,
4410
+ onInsertLink: n[3] ||= (e) => ge.value = !0,
4370
4411
  onInsertSymbol: n[4] ||= (e) => E.value = !0,
4371
4412
  onInsertPageBreak: Nn,
4372
4413
  onPageSetup: n[5] ||= (e) => ve.value = !0,
@@ -4386,7 +4427,7 @@ var Po = (e) => {
4386
4427
  "table-context": Ie(() => [F(y, {
4387
4428
  view: X.value,
4388
4429
  "get-commands": G(Et),
4389
- "state-tick": w.value,
4430
+ "state-tick": T.value,
4390
4431
  theme: e.theme ?? null,
4391
4432
  onOpenTableProperties: n[1] ||= (e) => ye.value = !0
4392
4433
  }, null, 8, [
@@ -4428,11 +4469,11 @@ var Po = (e) => {
4428
4469
  "onImageWrapType",
4429
4470
  "onImageTransform"
4430
4471
  ])) : M("", !0)]),
4431
- F(wi, {
4432
- "show-find-replace": ge.value,
4433
- "onUpdate:showFindReplace": n[8] ||= (e) => ge.value = e,
4434
- "show-hyperlink": T.value,
4435
- "onUpdate:showHyperlink": n[9] ||= (e) => T.value = e,
4472
+ F(Di, {
4473
+ "show-find-replace": he.value,
4474
+ "onUpdate:showFindReplace": n[8] ||= (e) => he.value = e,
4475
+ "show-hyperlink": ge.value,
4476
+ "onUpdate:showHyperlink": n[9] ||= (e) => ge.value = e,
4436
4477
  "show-insert-symbol": E.value,
4437
4478
  "onUpdate:showInsertSymbol": n[10] ||= (e) => E.value = e,
4438
4479
  "show-image-properties": _e.value,
@@ -4476,10 +4517,10 @@ var Po = (e) => {
4476
4517
  "onHyperlinkRemove",
4477
4518
  "onPageSetupApply"
4478
4519
  ]),
4479
- G(ft) ? (V(), N("div", Lo, W(G(ft)), 1)) : kt.value ? (V(), N("div", Ro, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(te, {
4520
+ G(ft) ? (V(), N("div", Bo, W(G(ft)), 1)) : kt.value ? (V(), N("div", Vo, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(te, {
4480
4521
  key: 0,
4481
4522
  node: e.loadingIndicator
4482
- }, null, 8, ["node"])) : (V(), N(O, { key: 1 }, [Te(W(G(ee)("loadingDocument")), 1)], 64))], !0)])) : !G(ut) && !re.value ? (V(), N("div", zo, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(te, {
4523
+ }, null, 8, ["node"])) : (V(), N(O, { key: 1 }, [Te(W(G(ee)("loadingDocument")), 1)], 64))], !0)])) : !G(ut) && !re.value ? (V(), N("div", Ho, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(te, {
4483
4524
  key: 0,
4484
4525
  node: e.placeholder
4485
4526
  }, null, 8, ["node"])) : (V(), N(O, { key: 1 }, [Te("No document loaded")], 64))], !0)])) : M("", !0),
@@ -4490,16 +4531,16 @@ var Po = (e) => {
4490
4531
  }, null, 512),
4491
4532
  P("div", {
4492
4533
  ref_key: "hiddenHfPmRef",
4493
- ref: oe,
4534
+ ref: C,
4494
4535
  class: "docx-editor-vue__hidden-pm paged-editor__hidden-hf-pm"
4495
4536
  }, null, 512),
4496
4537
  P("div", {
4497
4538
  ref_key: "editorScrollRef",
4498
- ref: pe,
4539
+ ref: fe,
4499
4540
  class: "docx-editor-vue__editor-scroll",
4500
4541
  onScroll: Qn
4501
- }, [P("div", Bo, [
4502
- he.value && !d.value ? (V(), N("div", Vo, [F(ne, {
4542
+ }, [P("div", Uo, [
4543
+ me.value && !d.value ? (V(), N("div", Wo, [F(ne, {
4503
4544
  "section-props": bn.value,
4504
4545
  zoom: G(L),
4505
4546
  unit: e.rulerUnit ?? "inch",
@@ -4533,7 +4574,7 @@ var Po = (e) => {
4533
4574
  "onFirstLineIndentChange",
4534
4575
  "onTabStopRemove"
4535
4576
  ])])) : M("", !0),
4536
- he.value && !d.value ? (V(), N("div", Ho, [F(v, {
4577
+ me.value && !d.value ? (V(), N("div", Go, [F(v, {
4537
4578
  "section-props": bn.value,
4538
4579
  zoom: G(L),
4539
4580
  unit: e.rulerUnit ?? "inch",
@@ -4550,7 +4591,7 @@ var Po = (e) => {
4550
4591
  ])])) : M("", !0),
4551
4592
  P("div", {
4552
4593
  ref_key: "pagesViewportRef",
4553
- ref: ue,
4594
+ ref: le,
4554
4595
  class: "docx-editor-vue__pages-viewport",
4555
4596
  onWheel: Ke,
4556
4597
  onMousedown: n[25] ||= (...e) => G(Zt) && G(Zt)(...e),
@@ -4559,26 +4600,30 @@ var Po = (e) => {
4559
4600
  onDblclick: n[28] ||= (...e) => G(en) && G(en)(...e),
4560
4601
  onContextmenu: n[29] ||= q((...e) => G(fn) && G(fn)(...e), ["prevent"])
4561
4602
  }, [
4562
- P("div", Uo, [
4603
+ P("div", Ko, [
4563
4604
  P("div", {
4564
4605
  ref_key: "pagesRef",
4565
- ref: C,
4606
+ ref: w,
4566
4607
  class: R(["docx-editor-vue__pages paged-editor__pages", G(Kt) ? `paged-editor--hf-editing paged-editor--editing-${G(Kt).position}` : ""]),
4567
4608
  style: z(En.value)
4568
4609
  }, null, 6),
4569
- F(da, {
4570
- "pages-container": C.value,
4610
+ F(ma, {
4611
+ "editor-view": an(),
4612
+ "hidden-container": C.value,
4613
+ "pages-container": w.value,
4571
4614
  selection: on.value,
4572
4615
  zoom: G(L)
4573
4616
  }, null, 8, [
4617
+ "editor-view",
4618
+ "hidden-container",
4574
4619
  "pages-container",
4575
4620
  "selection",
4576
4621
  "zoom"
4577
4622
  ]),
4578
- P("div", Wo, [
4579
- F(ai, {
4623
+ P("div", qo, [
4624
+ F(ci, {
4580
4625
  "get-view": () => G(J),
4581
- "get-pages-container": () => C.value,
4626
+ "get-pages-container": () => w.value,
4582
4627
  "editor-state": G(it),
4583
4628
  zoom: G(L),
4584
4629
  layout: G(pt),
@@ -4599,9 +4644,9 @@ var Po = (e) => {
4599
4644
  "selected-canonical",
4600
4645
  "selection-seq"
4601
4646
  ]),
4602
- F(si, {
4603
- range: me.value,
4604
- "get-pages-container": () => C.value,
4647
+ F(ui, {
4648
+ range: pe.value,
4649
+ "get-pages-container": () => w.value,
4605
4650
  zoom: G(L),
4606
4651
  layout: G(pt),
4607
4652
  blocks: G(mt),
@@ -4614,10 +4659,10 @@ var Po = (e) => {
4614
4659
  "blocks",
4615
4660
  "measures"
4616
4661
  ]),
4617
- o.showTemplateDirectives ? (V(), j(wa, {
4662
+ o.showTemplateDirectives ? (V(), j(Da, {
4618
4663
  key: 0,
4619
4664
  "get-view": () => G(J),
4620
- "get-pages-container": () => C.value,
4665
+ "get-pages-container": () => w.value,
4621
4666
  "editor-state": G(it),
4622
4667
  zoom: G(L),
4623
4668
  layout: G(pt),
@@ -4632,8 +4677,8 @@ var Po = (e) => {
4632
4677
  "blocks",
4633
4678
  "measures"
4634
4679
  ])) : M("", !0),
4635
- F(di, {
4636
- "get-pages-container": () => C.value,
4680
+ F(mi, {
4681
+ "get-pages-container": () => w.value,
4637
4682
  "editor-state": G(it),
4638
4683
  zoom: G(L),
4639
4684
  "sync-coordinator": G(gt)
@@ -4643,11 +4688,11 @@ var Po = (e) => {
4643
4688
  "zoom",
4644
4689
  "sync-coordinator"
4645
4690
  ]),
4646
- F(yi, {
4691
+ F(Si, {
4647
4692
  "get-view": () => G(J),
4648
- "get-pages-container": () => C.value,
4693
+ "get-pages-container": () => w.value,
4649
4694
  zoom: G(L),
4650
- "transaction-version": w.value,
4695
+ "transaction-version": T.value,
4651
4696
  "sync-coordinator": G(gt)
4652
4697
  }, null, 8, [
4653
4698
  "get-view",
@@ -4658,7 +4703,7 @@ var Po = (e) => {
4658
4703
  ])
4659
4704
  ])
4660
4705
  ]),
4661
- G(Kt) ? (V(), j(pa, {
4706
+ G(Kt) ? (V(), j(ga, {
4662
4707
  key: 0,
4663
4708
  edit: G(Kt),
4664
4709
  "get-view": an,
@@ -4673,16 +4718,16 @@ var Po = (e) => {
4673
4718
  class: "docx-editor-vue__note-editor",
4674
4719
  "aria-label": Ot.value,
4675
4720
  onKeydown: n[16] ||= Re(q((...e) => G(wt) && G(wt)(...e), ["stop", "prevent"]), ["esc"])
4676
- }, [P("header", Ko, [P("span", null, W(Ot.value), 1), P("button", {
4721
+ }, [P("header", Yo, [P("span", null, W(Ot.value), 1), P("button", {
4677
4722
  type: "button",
4678
4723
  "aria-label": G(ee)("common.closeDialog"),
4679
4724
  onClick: n[15] ||= (...e) => G(wt) && G(wt)(...e)
4680
- }, " × ", 8, qo)]), P("div", {
4725
+ }, " × ", 8, Xo)]), P("div", {
4681
4726
  ref_key: "notePmRef",
4682
4727
  ref: we,
4683
4728
  class: "docx-editor-vue__note-editor-host"
4684
- }, null, 512)], 40, Go), [[Fe, G(lt)]]),
4685
- F(ua, {
4729
+ }, null, 512)], 40, Jo), [[Fe, G(lt)]]),
4730
+ F(pa, {
4686
4731
  "image-info": G(Z),
4687
4732
  zoom: G(L),
4688
4733
  view: X.value,
@@ -4696,7 +4741,7 @@ var Po = (e) => {
4696
4741
  "view",
4697
4742
  "onContextMenu"
4698
4743
  ]),
4699
- F(Pa, {
4744
+ F(La, {
4700
4745
  data: G(It),
4701
4746
  "read-only": d.value,
4702
4747
  onNavigate: G(Vt),
@@ -4721,10 +4766,10 @@ var Po = (e) => {
4721
4766
  }),
4722
4767
  "aria-label": G(Gt).type === "row" ? "Insert row" : "Insert column",
4723
4768
  onMousedown: n[21] ||= (...e) => G(tn) && G(tn)(...e)
4724
- }, " + ", 44, Jo)) : M("", !0),
4769
+ }, " + ", 44, Zo)) : M("", !0),
4725
4770
  F(g, {
4726
4771
  comments: G(vn),
4727
- "pages-container": C.value,
4772
+ "pages-container": w.value,
4728
4773
  zoom: G(L),
4729
4774
  "page-width-px": wn.value,
4730
4775
  "sidebar-open": D.value,
@@ -4745,7 +4790,7 @@ var Po = (e) => {
4745
4790
  "show-resolved": !0,
4746
4791
  "is-adding-comment": G($).isAddingComment.value,
4747
4792
  "add-comment-y-position": G($).addCommentYPosition.value,
4748
- "pages-container": C.value,
4793
+ "pages-container": w.value,
4749
4794
  "page-width-px": wn.value,
4750
4795
  zoom: G(L),
4751
4796
  "active-item-id": k.value,
@@ -4800,12 +4845,12 @@ var Po = (e) => {
4800
4845
  size: 18
4801
4846
  })], 36)) : M("", !0)
4802
4847
  ], 544),
4803
- xe.value ? M("", !0) : (V(), j(ha, {
4848
+ xe.value ? M("", !0) : (V(), j(va, {
4804
4849
  key: 2,
4805
4850
  "left-offset": 12,
4806
4851
  onToggle: G(sn).handleToggleOutline
4807
4852
  }, null, 8, ["onToggle"])),
4808
- G(qt).totalPages > 1 ? (V(), j(ga, {
4853
+ G(qt).totalPages > 1 ? (V(), j(ya, {
4809
4854
  key: 3,
4810
4855
  "current-page": G(qt).currentPage,
4811
4856
  "total-pages": G(qt).totalPages,
@@ -4815,10 +4860,10 @@ var Po = (e) => {
4815
4860
  "total-pages",
4816
4861
  "visible"
4817
4862
  ])) : M("", !0),
4818
- F(Ci, {
4863
+ F(Ei, {
4819
4864
  "is-open": xe.value,
4820
4865
  headings: Ee.value,
4821
- "get-scroll-container": () => C.value,
4866
+ "get-scroll-container": () => w.value,
4822
4867
  onClose: n[30] ||= (e) => xe.value = !1,
4823
4868
  onNavigate: G(sn).handleOutlineNavigate
4824
4869
  }, null, 8, [
@@ -4828,7 +4873,7 @@ var Po = (e) => {
4828
4873
  "onNavigate"
4829
4874
  ])
4830
4875
  ])], 544),
4831
- F(ea, {
4876
+ F(ra, {
4832
4877
  "read-only": d.value,
4833
4878
  "context-menu": G(cn),
4834
4879
  "image-context-menu": G(ln),
@@ -4850,16 +4895,16 @@ var Po = (e) => {
4850
4895
  "onContextMenuAction",
4851
4896
  "onImageWrapSelect"
4852
4897
  ]),
4853
- F(vi, {
4854
- "event-root": d.value ? null : C.value,
4898
+ F(xi, {
4899
+ "event-root": d.value ? null : w.value,
4855
4900
  view: G(J)
4856
4901
  }, null, 8, ["event-root", "view"])
4857
4902
  ], 6));
4858
4903
  }
4859
- }), [["__scopeId", "data-v-3eaed64d"]]);
4904
+ }), [["__scopeId", "data-v-f072cb31"]]);
4860
4905
  //#endregion
4861
4906
  //#region src/utils/listState.ts
4862
- function Xo() {
4907
+ function $o() {
4863
4908
  return {
4864
4909
  type: "none",
4865
4910
  level: 0,
@@ -4868,30 +4913,30 @@ function Xo() {
4868
4913
  }
4869
4914
  //#endregion
4870
4915
  //#region src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
4871
- var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
4916
+ var es = ["aria-label"], ts = ["aria-label"], ns = [
4872
4917
  "disabled",
4873
4918
  "title",
4874
4919
  "aria-label"
4875
- ], es = [
4920
+ ], rs = [
4876
4921
  "disabled",
4877
4922
  "title",
4878
4923
  "aria-label"
4879
- ], ts = ["aria-label"], ns = [
4924
+ ], is = ["aria-label"], as = [
4880
4925
  "disabled",
4881
4926
  "title",
4882
4927
  "aria-label",
4883
4928
  "aria-pressed"
4884
- ], rs = [
4929
+ ], os = [
4885
4930
  "disabled",
4886
4931
  "title",
4887
4932
  "aria-label",
4888
4933
  "aria-pressed"
4889
- ], is = [
4934
+ ], ss = [
4890
4935
  "disabled",
4891
4936
  "title",
4892
4937
  "aria-label",
4893
4938
  "aria-pressed"
4894
- ], as = /*#__PURE__*/ t(/* @__PURE__ */ I({
4939
+ ], cs = /*#__PURE__*/ t(/* @__PURE__ */ I({
4895
4940
  __name: "FormattingBar",
4896
4941
  props: {
4897
4942
  currentFormatting: {},
@@ -4933,7 +4978,7 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
4933
4978
  "redo"
4934
4979
  ],
4935
4980
  setup(e, { emit: t }) {
4936
- let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = A(() => a.currentFormatting ?? {}), l = A(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = A(() => c.value.listState ?? Xo()), d = A(() => {
4981
+ let { ColorPicker: n } = h(), a = e, o = t, { t: s } = r(), c = A(() => a.currentFormatting ?? {}), l = A(() => a.documentStyles ? { styles: a.documentStyles } : {}), u = A(() => c.value.listState ?? $o()), d = A(() => {
4937
4982
  let e = c.value.color;
4938
4983
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
4939
4984
  }), f = A(() => {
@@ -4966,7 +5011,7 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
4966
5011
  }, [F(i, {
4967
5012
  name: "undo",
4968
5013
  size: 18
4969
- })], 40, $o), P("button", {
5014
+ })], 40, ns), P("button", {
4970
5015
  type: "button",
4971
5016
  class: "docx-formatting-bar__btn",
4972
5017
  disabled: e.disabled || !e.canRedo,
@@ -4976,7 +5021,7 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
4976
5021
  }, [F(i, {
4977
5022
  name: "redo",
4978
5023
  size: 18
4979
- })], 40, es)], 8, Qo),
5024
+ })], 40, rs)], 8, ts),
4980
5025
  r[13] ||= P("span", {
4981
5026
  class: "docx-formatting-bar__divider",
4982
5027
  role: "separator"
@@ -5007,7 +5052,7 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
5007
5052
  }, [F(i, {
5008
5053
  name: "format_bold",
5009
5054
  size: 18
5010
- })], 42, ns),
5055
+ })], 42, as),
5011
5056
  P("button", {
5012
5057
  type: "button",
5013
5058
  class: R(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
@@ -5019,7 +5064,7 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
5019
5064
  }, [F(i, {
5020
5065
  name: "format_italic",
5021
5066
  size: 18
5022
- })], 42, rs),
5067
+ })], 42, os),
5023
5068
  P("button", {
5024
5069
  type: "button",
5025
5070
  class: R(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
@@ -5031,8 +5076,8 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
5031
5076
  }, [F(i, {
5032
5077
  name: "format_underlined",
5033
5078
  size: 18
5034
- })], 42, is)
5035
- ], 8, ts),
5079
+ })], 42, ss)
5080
+ ], 8, is),
5036
5081
  e.showTextColorPicker ? (V(), N(O, { key: 1 }, [r[12] ||= P("span", {
5037
5082
  class: "docx-formatting-bar__divider",
5038
5083
  role: "separator"
@@ -5074,9 +5119,9 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
5074
5119
  "disabled",
5075
5120
  "can-outdent"
5076
5121
  ])) : M("", !0)
5077
- ], 10, Zo));
5122
+ ], 10, es));
5078
5123
  }
5079
- }), [["__scopeId", "data-v-fc03de2e"]]), os = [
5124
+ }), [["__scopeId", "data-v-fc03de2e"]]), ls = [
5080
5125
  {
5081
5126
  value: .5,
5082
5127
  label: "50%"
@@ -5101,7 +5146,7 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
5101
5146
  value: 2,
5102
5147
  label: "200%"
5103
5148
  }
5104
- ], ss = /*#__PURE__*/ t(/* @__PURE__ */ I({
5149
+ ], us = /*#__PURE__*/ t(/* @__PURE__ */ I({
5105
5150
  __name: "ZoomControl",
5106
5151
  props: {
5107
5152
  value: { default: 1 },
@@ -5118,7 +5163,7 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
5118
5163
  },
5119
5164
  emits: ["change"],
5120
5165
  setup(e, { emit: t }) {
5121
- let { Select: n } = h(), r = e, i = t, a = A(() => r.levels ?? os), o = A(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = A(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = A(() => o.value ? String(o.value.value) : String(r.value)), l = A(() => {
5166
+ let { Select: n } = h(), r = e, i = t, a = A(() => r.levels ?? ls), o = A(() => a.value.find((e) => Math.abs(e.value - r.value) < .001)), s = A(() => o.value ? o.value.label : `${Math.round(r.value * 100)}%`), c = A(() => o.value ? String(o.value.value) : String(r.value)), l = A(() => {
5122
5167
  let e = a.value.map((e) => ({
5123
5168
  value: String(e.value),
5124
5169
  label: e.label
@@ -5146,8 +5191,8 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
5146
5191
  "disabled"
5147
5192
  ]));
5148
5193
  }
5149
- }), [["__scopeId", "data-v-8079e07f"]]), cs = (e, t, n = {}) => {
5150
- let { colorMode: r = oe, locale: i = "en", ...a } = n;
5194
+ }), [["__scopeId", "data-v-8079e07f"]]), ds = (e, t, n = {}) => {
5195
+ let { colorMode: r = C, locale: i = "en", ...a } = n;
5151
5196
  return new Promise((n, o) => {
5152
5197
  let s = H(null), c = null, l = !1, d = {
5153
5198
  save: async () => {
@@ -5172,7 +5217,7 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
5172
5217
  }
5173
5218
  };
5174
5219
  c = Se({ setup() {
5175
- return () => Ee(Yo, {
5220
+ return () => Ee(Qo, {
5176
5221
  ...a,
5177
5222
  documentBuffer: e,
5178
5223
  ref: s,
@@ -5183,8 +5228,8 @@ var Zo = ["aria-label"], Qo = ["aria-label"], $o = [
5183
5228
  a.onError?.(e), l || (l = !0, c?.unmount(), c = null, o(e));
5184
5229
  }
5185
5230
  });
5186
- } }), c.use(u, i), c.use(ue, r), c.mount(t);
5231
+ } }), c.use(u, i), c.use(le, r), c.mount(t);
5187
5232
  });
5188
5233
  };
5189
5234
  //#endregion
5190
- export { li as AutocompleteCaretOverlay, Hr as DEFAULT_AI_SUGGESTION_PRESETS, _t as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, zr as DOCUMENT_PRESET_VERSION, Br as DOCUMENT_STYLE_SET_VERSION, Yo as DocxEditor, pe as FindReplaceDialog, l as FolioUIProvider, me as FootnotePropertiesDialog, as as FormattingBar, he as HyperlinkDialog, w as ImagePositionDialog, ge as ImagePropertiesDialog, T as InsertImageDialog, E as InsertSymbolDialog, _e as InsertTableDialog, ve as PageSetupDialog, ye as PasteSpecialDialog, Ir as STELLA_STYLE_SET_NAME, be as SplitCellDialog, xe as TablePropertiesDialog, D as WatermarkDialog, ss as ZoomControl, vt as acceptAutocompleteSuggestion, yt as acceptAutocompleteWord, ft as anonymizationDecorationsKey, Y as appendAutocompleteToken, An as applyFolioAIEditOperations, Ur as applySuggestions, bt as autocompleteSuggestionKey, xt as autocompleteSuggestionPlugin, Kr as buildPositionalText, St as clearAutocompleteSuggestion, yn as clearTemplateSlashMenu, ue as colorModePlugin, bn as consumeTemplateSlashQuery, Qr as createAICitationDecorationsPlugin, Vr as createDocx, jr as createEmptyDocument, Pn as createFolioAIEditSnapshot, Lr as createStellaStyleDocumentPreset, Rr as createStellaStyleSet, oe as defaultColorMode, e as defaultLocale, tr as deriveBlockId, In as diffWordSegments, Mr as extractDocumentStyleSet, Nr as extractDocumentStyleSetFromDocx, Ct as finishAutocompleteSuggestion, ti as fromMarkdown, pt as getAnonymizationMatches, wt as getAutocompleteSuggestion, it as getDocumentWatermark, Xr as getFolioCaretViewportRect, nr as getFolioParaIdFromBlockId, Zr as getFolioSelectionViewportRect, Xt as getTemplateDirectives, xn as getTemplateSlashMenu, Bn as hashFolioAIBlockText, u as i18nPlugin, He as insertImageFromFile, We as insertPageBreakInView, Ke as insertTableInView, Je as insertTableOfContentsInView, Pr as inspectDocumentStyles, Fr as inspectDocumentStylesFromDocx, ir as isFolioBlockId, ar as isSequentialFolioBlockId, Wr as isSuggestionStale, Vn as normalizeFolioAIBlockText, C as provideColorMode, n as provideLocale, cs as renderAsync, Sn as resetTemplateSlashQuery, Gr as resolveSuggestionAnchor, Qt as scanDirectives, Yr as scrollFolioPositionIntoView, $r as setAICitationsMeta, qr as setAISuggestionsMeta, ei as setActiveCitationMeta, ht as setAnonymizationTermsMeta, ot as setDocumentWatermark, Jr as setFocusedSuggestionMeta, $ as setTemplatePreviewValues, Et as shouldTriggerAutocomplete, Dt as startAutocompleteSuggestion, Cn as templateSlashMenuKey, ni as toMarkdown, ri as toMarkdownResult, fe as useColorMode, r as useTranslation, de as useWheelZoom };
5235
+ export { fi as AutocompleteCaretOverlay, Gr as DEFAULT_AI_SUGGESTION_PRESETS, _t as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Hr as DOCUMENT_PRESET_VERSION, Ur as DOCUMENT_STYLE_SET_VERSION, Qo as DocxEditor, fe as FindReplaceDialog, l as FolioUIProvider, pe as FootnotePropertiesDialog, cs as FormattingBar, me as HyperlinkDialog, T as ImagePositionDialog, he as ImagePropertiesDialog, ge as InsertImageDialog, E as InsertSymbolDialog, _e as InsertTableDialog, ve as PageSetupDialog, ye as PasteSpecialDialog, zr as STELLA_STYLE_SET_NAME, be as SplitCellDialog, xe as TablePropertiesDialog, D as WatermarkDialog, us as ZoomControl, vt as acceptAutocompleteSuggestion, yt as acceptAutocompleteWord, ft as anonymizationDecorationsKey, Y as appendAutocompleteToken, Nn as applyFolioAIEditOperations, Kr as applySuggestions, bt as autocompleteSuggestionKey, xt as autocompleteSuggestionPlugin, Yr as buildPositionalText, St as clearAutocompleteSuggestion, Sn as clearTemplateSlashMenu, le as colorModePlugin, Cn as consumeTemplateSlashQuery, ti as createAICitationDecorationsPlugin, Wr as createDocx, Pr as createEmptyDocument, Ln as createFolioAIEditSnapshot, Br as createStellaStyleDocumentPreset, Vr as createStellaStyleSet, C as defaultColorMode, e as defaultLocale, ir as deriveBlockId, zn as diffWordSegments, Fr as extractDocumentStyleSet, Ir as extractDocumentStyleSetFromDocx, Ct as finishAutocompleteSuggestion, ii as fromMarkdown, pt as getAnonymizationMatches, wt as getAutocompleteSuggestion, it as getDocumentWatermark, $r as getFolioCaretViewportRect, ar as getFolioParaIdFromBlockId, ei as getFolioSelectionViewportRect, $t as getTemplateDirectives, wn as getTemplateSlashMenu, Un as hashFolioAIBlockText, u as i18nPlugin, He as insertImageFromFile, We as insertPageBreakInView, Ke as insertTableInView, Je as insertTableOfContentsInView, Lr as inspectDocumentStyles, Rr as inspectDocumentStylesFromDocx, sr as isFolioBlockId, cr as isSequentialFolioBlockId, qr as isSuggestionStale, Wn as normalizeFolioAIBlockText, w as provideColorMode, n as provideLocale, ds as renderAsync, Tn as resetTemplateSlashQuery, Jr as resolveSuggestionAnchor, tn as scanDirectives, Qr as scrollFolioPositionIntoView, ni as setAICitationsMeta, Xr as setAISuggestionsMeta, ri as setActiveCitationMeta, ht as setAnonymizationTermsMeta, ot as setDocumentWatermark, Zr as setFocusedSuggestionMeta, xn as setTemplatePreviewValues, Et as shouldTriggerAutocomplete, Dt as startAutocompleteSuggestion, En as templateSlashMenuKey, ai as toMarkdown, oi as toMarkdownResult, de as useColorMode, r as useTranslation, ue as useWheelZoom };