@stll/folio-vue 0.13.5 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,26 +1,26 @@
1
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-D2wgbGwH.js";
2
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-BlOX6_s_.js";
3
3
  import { t as ae } from "./zIndex-Ei9BbHSW.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-DZmNIcAL.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
- 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
- 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
- import { expectTableAttrs as Xe } from "@stll/folio-core/prosemirror/attrs";
9
- import { getTableContext as Ze } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
10
- import { extractSelectionContext as Qe } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
11
- import { inspectDocxCompatibility as $e } from "@stll/folio-core/docx/compatibility";
12
- import { resolveActiveEditorStory as et } from "@stll/folio-core/controller/activeEditorStory";
13
- import { clearAllCaches as tt, resetCanvasContext as nt } from "@stll/folio-core/layout-bridge/engine/measuring";
14
- import { onFontsLoaded as rt } from "@stll/folio-core/utils/fontLoader";
15
- import { twipsToPixels as it } from "@stll/folio-core/paged-layout/sectionGeometry";
16
- import { getDocumentWatermark as at, getDocumentWatermark as ot, setDocumentWatermark as st, setDocumentWatermark as ct } from "@stll/folio-core/watermark";
4
+ import { a as S, c as C, i as oe, l as w, o as se, r as ce, s as T, t as le, u as ue } from "./useZoom-Cj-YPUlw.js";
5
+ import { FindReplaceDialog as de, FootnotePropertiesDialog as fe, HyperlinkDialog as pe, ImagePositionDialog as me, ImagePropertiesDialog as E, InsertImageDialog as he, InsertSymbolDialog as D, InsertTableDialog as ge, PageSetupDialog as _e, PasteSpecialDialog as ve, SplitCellDialog as ye, TablePropertiesDialog as be, WatermarkDialog as xe } from "./dialogs.js";
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 De, mergeProps as Oe, nextTick as L, 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
+ 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 Xe } from "@stll/folio-core/prosemirror";
8
+ import { expectTableAttrs as Ze } from "@stll/folio-core/prosemirror/attrs";
9
+ import { getTableContext as Qe } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
10
+ import { extractSelectionContext as $e } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
11
+ import { inspectDocxCompatibility as et } from "@stll/folio-core/docx/compatibility";
12
+ import { resolveActiveEditorStory as tt } from "@stll/folio-core/controller/activeEditorStory";
13
+ import { clearAllCaches as nt, resetCanvasContext as rt } from "@stll/folio-core/layout-bridge/engine/measuring";
14
+ import { onFontsLoaded as it } from "@stll/folio-core/utils/fontLoader";
15
+ import { twipsToPixels as at } from "@stll/folio-core/paged-layout/sectionGeometry";
16
+ import { getDocumentWatermark as J, getDocumentWatermark as ot, setDocumentWatermark as st, setDocumentWatermark as ct } from "@stll/folio-core/watermark";
17
17
  import { createLatestRequestGate as lt } from "@stll/folio-core/controller/latestRequestGate";
18
18
  import { measureDirectiveGutter as ut, projectRangesToRects as dt } from "@stll/folio-core/paged-layout/rangeProjection";
19
19
  import { prefersReducedMotionBehavior as ft } from "@stll/folio-core/paged-layout/scrollNavigation";
20
20
  import { anonymizationDecorationsKey as pt, getAnonymizationMatches as mt, getAnonymizationMatches as ht, setAnonymizationTermsMeta as gt, slugAnonymizationLabel as _t } from "@stll/folio-core/prosemirror/plugins/anonymizationDecorations";
21
- import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as vt, acceptAutocompleteSuggestion as yt, acceptAutocompleteWord as bt, appendAutocompleteToken as Y, autocompleteSuggestionKey as xt, autocompleteSuggestionPlugin as St, clearAutocompleteSuggestion as Ct, finishAutocompleteSuggestion as wt, getAutocompleteSuggestion as Tt, getAutocompleteSuggestion as Et, shouldTriggerAutocomplete as Dt, startAutocompleteSuggestion as Ot } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
22
- import { createRenderedDomContext as X } from "@stll/folio-core/render-dom/RenderedDomContext";
23
- import { ContentControlWidgetController as kt } from "@stll/folio-core/controller/contentControlWidgetController";
21
+ import { DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES as vt, acceptAutocompleteSuggestion as yt, acceptAutocompleteWord as bt, appendAutocompleteToken as xt, autocompleteSuggestionKey as Y, autocompleteSuggestionPlugin as St, clearAutocompleteSuggestion as Ct, finishAutocompleteSuggestion as wt, getAutocompleteSuggestion as Tt, getAutocompleteSuggestion as Et, shouldTriggerAutocomplete as Dt, startAutocompleteSuggestion as Ot } from "@stll/folio-core/prosemirror/plugins/autocompleteSuggestion";
22
+ import { createRenderedDomContext as kt } from "@stll/folio-core/render-dom/RenderedDomContext";
23
+ import { ContentControlWidgetController as X } from "@stll/folio-core/controller/contentControlWidgetController";
24
24
  import { NodeSelection as At, Selection as jt, TextSelection as Z } from "prosemirror-state";
25
25
  import { pixelsToEmu as Mt } from "@stll/folio-core/utils/units";
26
26
  import { IMAGE_LAYOUT_OPTIONS as Nt, captureInlinePositionEmu as Pt, deriveLayoutChoice as Ft, findImageElement as It, isImageLayoutOptionEnabled as Lt, toolbarValueToLayoutTarget as Rt } from "@stll/folio-core/layout-painter/imageLayout";
@@ -36,9 +36,9 @@ import { closeHistory as rn, redo as an, undo as on } from "prosemirror-history"
36
36
  import { clearFormatting as sn } from "@stll/folio-core/prosemirror/commands/formatting";
37
37
  import { PENDING_COMMENT_ID as cn, createCommentIdAllocator as ln, seedCommentAllocator as un } from "@stll/folio-core/prosemirror/commentIdAllocator";
38
38
  import { createComment as dn } from "@stll/folio-core/prosemirror/commentOps";
39
- import { acceptAIEditRevision as fn, acceptChange as pn, acceptSuggestion as mn, findAIEditRevisionRange as hn, findSuggestionRange as gn, getSuggestions as _n, rejectAIEditRevision as vn, rejectChange as Q, rejectSuggestion as yn } from "@stll/folio-core/prosemirror/commands/comments";
40
- import { makeRevisionInfo as $ } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
41
- import { findPageIndexContainingPmPos as bn } from "@stll/folio-core/layout-engine";
39
+ import { acceptAIEditRevision as fn, acceptChange as pn, acceptSuggestion as mn, findAIEditRevisionRange as hn, findSuggestionRange as gn, getSuggestions as _n, rejectAIEditRevision as vn, rejectChange as yn, rejectSuggestion as Q } from "@stll/folio-core/prosemirror/commands/comments";
40
+ import { makeRevisionInfo as bn } from "@stll/folio-core/prosemirror/plugins/suggestionMode";
41
+ import { findPageIndexContainingPmPos as $ } from "@stll/folio-core/layout-engine";
42
42
  import { proseDocToBlocks as xn } from "@stll/folio-core/prosemirror/conversion/fromProseDoc";
43
43
  import { setTemplatePreviewValues as Sn } from "@stll/folio-core/prosemirror/plugins/templatePreviewValues";
44
44
  import { clearTemplateSlashMenu as Cn, consumeTemplateSlashQuery as wn, getTemplateSlashMenu as Tn, resetTemplateSlashQuery as En, templateSlashMenuKey as Dn } from "@stll/folio-core/prosemirror/plugins/templateSlashMenu";
@@ -59,34 +59,35 @@ import { setEmbeddedFontFamilyMap as Sr } from "@stll/folio-core/utils/fontResol
59
59
  import { buildEmbeddedFontFamilyMap as Cr, extractEmbeddedFonts as wr } from "@stll/folio-core/fonts/embeddedFonts";
60
60
  import { editHyperlinkAtCursor as Tr, removeHyperlinkAtCursor as Er } from "@stll/folio-core/prosemirror/commands/hyperlink";
61
61
  import { sanitizeExternalUrl as Dr } from "@stll/folio-core/utils/urlSecurity";
62
- import { collectHeadings as Or } from "@stll/folio-core/utils/headingCollector";
63
- import { clickToPositionInHfSlot as kr } from "@stll/folio-core/layout-bridge/dom/findHfPmSpans";
64
- import { findNoteStoryForTarget as Ar } from "@stll/folio-core/layout-bridge/dom/noteStoryDom";
65
- import { TABLE_INSERT_HIDE_DELAY_MS as jr, detectTableInsertHover as Mr } from "@stll/folio-core/layout-bridge/tableInsertHover";
66
- import { createCellDragTracker as Nr, findCellPosFromPmPos as Pr } from "@stll/folio-core/prosemirror/cellDragSelection";
67
- import { RemoteSelectionOverlay as Fr } from "@stll/folio-core/render-dom/RemoteSelectionOverlay";
68
- import { BodySelectionOverlay as Ir } from "@stll/folio-core/render-dom/BodySelectionOverlay";
69
- import { createEmptyDocument as Lr } from "@stll/folio-core/utils/createDocument";
70
- import { extractDocumentStyleSet as Rr, extractDocumentStyleSetFromDocx as zr, inspectDocumentStyles as Br, inspectDocumentStylesFromDocx as Vr } from "@stll/folio-core/style-sets/extract";
71
- import { STELLA_STYLE_SET_NAME as Hr, createStellaStyleDocumentPreset as Ur, createStellaStyleSet as Wr } from "@stll/folio-core/style-sets/stellaStyle";
72
- import { DOCUMENT_PRESET_VERSION as Gr, DOCUMENT_STYLE_SET_VERSION as Kr } from "@stll/folio-core/style-sets/types";
73
- import { createDocx as qr } from "@stll/folio-core/docx/rezip";
74
- import { DEFAULT_AI_SUGGESTION_PRESETS as Jr } from "@stll/folio-core/ai-suggestions/types";
75
- import { applySuggestions as Yr } from "@stll/folio-core/ai-suggestions/apply";
76
- import { isSuggestionStale as Xr, resolveSuggestionAnchor as Zr } from "@stll/folio-core/ai-suggestions/conflict";
77
- import { buildPositionalText as Qr } from "@stll/folio-core/ai-suggestions/text-positions";
78
- import { setAISuggestionsMeta as $r, setFocusedSuggestionMeta as ei } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
79
- import { scrollFolioPositionIntoView as ti } from "@stll/folio-core/paged-layout/scrollToPmPosition";
80
- import { getFolioCaretViewportRect as ni, getFolioSelectionViewportRect as ri } from "@stll/folio-core/paged-layout/selectionViewportRect";
81
- import { createAICitationDecorationsPlugin as ii, setAICitationsMeta as ai, setActiveCitationMeta as oi } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
82
- import { fromMarkdown as si, toMarkdown as ci, toMarkdownResult as li } from "@stll/folio-core/markdown";
62
+ import { isKeydownInShortcutScope as Or } from "@stll/folio-core/managers/editorShortcuts";
63
+ import { collectHeadings as kr } from "@stll/folio-core/utils/headingCollector";
64
+ import { clickToPositionInHfSlot as Ar } from "@stll/folio-core/layout-bridge/dom/findHfPmSpans";
65
+ import { findNoteStoryForTarget as jr } from "@stll/folio-core/layout-bridge/dom/noteStoryDom";
66
+ import { TABLE_INSERT_HIDE_DELAY_MS as Mr, detectTableInsertHover as Nr } from "@stll/folio-core/layout-bridge/tableInsertHover";
67
+ import { createCellDragTracker as Pr, findCellPosFromPmPos as Fr } from "@stll/folio-core/prosemirror/cellDragSelection";
68
+ import { RemoteSelectionOverlay as Ir } from "@stll/folio-core/render-dom/RemoteSelectionOverlay";
69
+ import { BodySelectionOverlay as Lr } from "@stll/folio-core/render-dom/BodySelectionOverlay";
70
+ import { createEmptyDocument as Rr } from "@stll/folio-core/utils/createDocument";
71
+ import { extractDocumentStyleSet as zr, extractDocumentStyleSetFromDocx as Br, inspectDocumentStyles as Vr, inspectDocumentStylesFromDocx as Hr } from "@stll/folio-core/style-sets/extract";
72
+ import { STELLA_STYLE_SET_NAME as Ur, createStellaStyleDocumentPreset as Wr, createStellaStyleSet as Gr } from "@stll/folio-core/style-sets/stellaStyle";
73
+ import { DOCUMENT_PRESET_VERSION as Kr, DOCUMENT_STYLE_SET_VERSION as qr } from "@stll/folio-core/style-sets/types";
74
+ import { createDocx as Jr } from "@stll/folio-core/docx/rezip";
75
+ import { DEFAULT_AI_SUGGESTION_PRESETS as Yr } from "@stll/folio-core/ai-suggestions/types";
76
+ import { applySuggestions as Xr } from "@stll/folio-core/ai-suggestions/apply";
77
+ import { isSuggestionStale as Zr, resolveSuggestionAnchor as Qr } from "@stll/folio-core/ai-suggestions/conflict";
78
+ import { buildPositionalText as $r } from "@stll/folio-core/ai-suggestions/text-positions";
79
+ import { setAISuggestionsMeta as ei, setFocusedSuggestionMeta as ti } from "@stll/folio-core/prosemirror/plugins/aiSuggestionDecorations";
80
+ import { scrollFolioPositionIntoView as ni } from "@stll/folio-core/paged-layout/scrollToPmPosition";
81
+ import { getFolioCaretViewportRect as ri, getFolioSelectionViewportRect as ii } from "@stll/folio-core/paged-layout/selectionViewportRect";
82
+ import { createAICitationDecorationsPlugin as ai, setAICitationsMeta as oi, setActiveCitationMeta as si } from "@stll/folio-core/prosemirror/plugins/aiCitationDecorations";
83
+ import { fromMarkdown as ci, toMarkdown as li, toMarkdownResult as ui } from "@stll/folio-core/markdown";
83
84
  //#region src/components/AnonymizationRectsOverlay.vue?vue&type=script&setup=true&lang.ts
84
- var ui = [
85
+ var di = [
85
86
  "data-folio-anonymization-label",
86
87
  "data-folio-anonymization-canonical",
87
88
  "data-folio-anonymization-selected",
88
89
  "title"
89
- ], di = /*#__PURE__*/ t(/* @__PURE__ */ I({
90
+ ], fi = /*#__PURE__*/ t(/* @__PURE__ */ I({
90
91
  __name: "AnonymizationRectsOverlay",
91
92
  props: {
92
93
  getView: { type: Function },
@@ -203,12 +204,12 @@ var ui = [
203
204
  width: `${n.width}px`,
204
205
  height: `${n.height}px`
205
206
  })
206
- }, null, 14, ui))), 128))], 64))), 128))], 512));
207
+ }, null, 14, di))), 128))], 64))), 128))], 512));
207
208
  }
208
- }), [["__scopeId", "data-v-df8fe7df"]]), fi = {
209
+ }), [["__scopeId", "data-v-df8fe7df"]]), pi = {
209
210
  class: "folio-passage-highlight-overlay",
210
211
  "data-folio-passage-highlight-overlay": ""
211
- }, pi = /*#__PURE__*/ t(/* @__PURE__ */ I({
212
+ }, mi = /*#__PURE__*/ t(/* @__PURE__ */ I({
212
213
  __name: "PassageHighlightOverlay",
213
214
  props: {
214
215
  range: {},
@@ -255,7 +256,7 @@ var ui = [
255
256
  t.measures
256
257
  ], () => a(), { immediate: !0 }), B(() => {
257
258
  r.invalidate(), i !== null && (cancelAnimationFrame(i), i = null);
258
- }), (e, t) => (V(), N("div", fi, [(V(!0), N(O, null, U(n.value, (e, t) => (V(), N("span", {
259
+ }), (e, t) => (V(), N("div", pi, [(V(!0), N(O, null, U(n.value, (e, t) => (V(), N("span", {
259
260
  key: `${t}:${e.left}:${e.top}`,
260
261
  class: "folio-passage-highlight",
261
262
  style: z({
@@ -267,11 +268,11 @@ var ui = [
267
268
  })
268
269
  }, null, 4))), 128))]));
269
270
  }
270
- }), [["__scopeId", "data-v-bde9f41b"]]), mi = {
271
+ }), [["__scopeId", "data-v-bde9f41b"]]), hi = {
271
272
  key: 0,
272
273
  class: "folio-autocomplete-overlay",
273
274
  "data-folio-autocomplete-overlay": ""
274
- }, hi = /*#__PURE__*/ t(/* @__PURE__ */ I({
275
+ }, gi = /*#__PURE__*/ t(/* @__PURE__ */ I({
275
276
  __name: "AutocompleteCaretOverlay",
276
277
  props: {
277
278
  caret: {},
@@ -279,7 +280,7 @@ var ui = [
279
280
  isStreaming: { type: Boolean }
280
281
  },
281
282
  setup(e) {
282
- return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", mi, [P("span", {
283
+ return (t, n) => e.caret && e.text.length > 0 ? (V(), N("div", hi, [P("span", {
283
284
  class: "folio-autocomplete-ghost",
284
285
  style: z({
285
286
  left: `${e.caret.x}px`,
@@ -292,7 +293,7 @@ var ui = [
292
293
  "aria-hidden": "true"
293
294
  }, "stella", 2)], 4)])) : M("", !0);
294
295
  }
295
- }), [["__scopeId", "data-v-00299904"]]), gi = 48, _i = /* @__PURE__ */ I({
296
+ }), [["__scopeId", "data-v-00299904"]]), _i = 48, vi = /* @__PURE__ */ I({
296
297
  __name: "AutocompleteSuggestionOverlay",
297
298
  props: {
298
299
  getPagesContainer: { type: Function },
@@ -309,7 +310,7 @@ var ui = [
309
310
  let c = r.querySelector(".layout-page-content");
310
311
  if (!c) return;
311
312
  let l = (c.getBoundingClientRect().right - a.left) / i;
312
- return Math.max(gi, l - t);
313
+ return Math.max(_i, l - t);
313
314
  }
314
315
  }, s = () => {
315
316
  let e = t.getPagesContainer(), r = t.editorState;
@@ -322,7 +323,7 @@ var ui = [
322
323
  n.value = null;
323
324
  return;
324
325
  }
325
- let a = X(e, t.zoom), s = a.getCoordinatesForPosition(i.anchor);
326
+ let a = kt(e, t.zoom), s = a.getCoordinatesForPosition(i.anchor);
326
327
  if (!s) {
327
328
  n.value = null;
328
329
  return;
@@ -358,7 +359,7 @@ var ui = [
358
359
  t.editorState,
359
360
  t.zoom,
360
361
  r.value
361
- ], () => c()), (e, t) => (V(), j(hi, {
362
+ ], () => c()), (e, t) => (V(), j(gi, {
362
363
  caret: n.value?.caret ?? null,
363
364
  text: n.value?.text ?? "",
364
365
  "is-streaming": n.value?.isStreaming ?? !1
@@ -368,33 +369,33 @@ var ui = [
368
369
  "is-streaming"
369
370
  ]));
370
371
  }
371
- }), vi = Symbol("docx-portal-class");
372
- function yi(e) {
373
- je(vi, A(() => ({
372
+ }), yi = Symbol("docx-portal-class");
373
+ function bi(e) {
374
+ je(yi, A(() => ({
374
375
  "ep-root": !0,
375
376
  dark: !!G(e)
376
377
  })));
377
378
  }
378
- function bi() {
379
- return L(vi, A(() => ({ "ep-root": !0 })));
379
+ function xi() {
380
+ return De(yi, A(() => ({ "ep-root": !0 })));
380
381
  }
381
382
  //#endregion
382
383
  //#region src/components/ContentControlWidgetsOverlay.vue?vue&type=script&setup=true&lang.ts
383
- var xi = ["aria-label"], Si = {
384
+ var Si = ["aria-label"], Ci = {
384
385
  key: 0,
385
386
  class: "content-control-picker__items",
386
387
  role: "menu"
387
- }, Ci = {
388
+ }, wi = {
388
389
  key: 0,
389
390
  class: "content-control-picker__empty"
390
- }, wi = /*#__PURE__*/ t(/* @__PURE__ */ I({
391
+ }, Ti = /*#__PURE__*/ t(/* @__PURE__ */ I({
391
392
  __name: "ContentControlWidgetsOverlay",
392
393
  props: {
393
394
  eventRoot: {},
394
395
  view: {}
395
396
  },
396
397
  setup(e) {
397
- let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = bi(), s = new kt(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
398
+ let t = e, { t: n } = r(), { Button: i, DatePickerPopover: a } = h(), o = xi(), s = new X(), c = Ne(s.getSnapshot()), l = s.subscribe(() => {
398
399
  c.value = s.getSnapshot();
399
400
  });
400
401
  K([() => t.view, () => t.eventRoot], ([e, t]) => s.bind(e, t), { immediate: !0 }), B(() => {
@@ -413,7 +414,7 @@ var xi = ["aria-label"], Si = {
413
414
  role: "dialog",
414
415
  "aria-label": c.value.status === "dropdown" ? G(n)("contentControlDropdownAriaLabel") : G(n)("contentControlDateAriaLabel"),
415
416
  onMousedown: t[1] ||= q(() => {}, ["stop"])
416
- }, [c.value.status === "dropdown" ? (V(), N("div", Si, [c.value.items.length === 0 ? (V(), N("div", Ci, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(O, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
417
+ }, [c.value.status === "dropdown" ? (V(), N("div", Ci, [c.value.items.length === 0 ? (V(), N("div", wi, W(G(n)("contentControlDropdownNoOptions")), 1)) : (V(!0), N(O, { key: 1 }, U(c.value.items, (e) => (V(), j(G(i), {
417
418
  key: `${e.value}::${e.displayText}`,
418
419
  "class-name": "content-control-picker__item",
419
420
  type: "button",
@@ -430,9 +431,9 @@ var xi = ["aria-label"], Si = {
430
431
  value: c.value.currentValue,
431
432
  "default-open": !0,
432
433
  onChange: d
433
- }, null, 8, ["value"])) : M("", !0)], 46, xi))]));
434
+ }, null, 8, ["value"])) : M("", !0)], 46, Si))]));
434
435
  }
435
- }), [["__scopeId", "data-v-19e067b7"]]), Ti = /* @__PURE__ */ I({
436
+ }), [["__scopeId", "data-v-19e067b7"]]), Ei = /* @__PURE__ */ I({
436
437
  __name: "DecorationLayer",
437
438
  props: {
438
439
  getView: { type: Function },
@@ -467,7 +468,7 @@ var xi = ["aria-label"], Si = {
467
468
  n.firstChild && n.replaceChildren();
468
469
  return;
469
470
  }
470
- let a = X(t, r), o = a.getContainerOffset(), s = document.createDocumentFragment();
471
+ let a = kt(t, r), o = a.getContainerOffset(), s = document.createDocumentFragment();
471
472
  for (let { decoration: t, from: n, to: r } of i) {
472
473
  if (n === r) {
473
474
  let r = u(t, e);
@@ -544,10 +545,10 @@ var xi = ["aria-label"], Si = {
544
545
  "aria-hidden": "true"
545
546
  }, null, 512));
546
547
  }
547
- }), Ei = { class: "doc-outline__header" }, Di = { class: "doc-outline__body" }, Oi = {
548
+ }), Di = { class: "doc-outline__header" }, Oi = { class: "doc-outline__body" }, ki = {
548
549
  key: 0,
549
550
  class: "doc-outline__empty"
550
- }, ki = /*#__PURE__*/ t(/* @__PURE__ */ I({
551
+ }, Ai = /*#__PURE__*/ t(/* @__PURE__ */ I({
551
552
  __name: "DocumentOutline",
552
553
  props: {
553
554
  isOpen: { type: Boolean },
@@ -576,7 +577,7 @@ var xi = ["aria-label"], Si = {
576
577
  role: "navigation",
577
578
  "aria-label": "Document outline",
578
579
  onMousedown: n[1] ||= q(() => {}, ["stop"])
579
- }, [P("div", Ei, [P("button", {
580
+ }, [P("div", Di, [P("button", {
580
581
  class: "doc-outline__back",
581
582
  title: "Close outline",
582
583
  "aria-label": "Close outline",
@@ -584,7 +585,7 @@ var xi = ["aria-label"], Si = {
584
585
  }, [F(i, {
585
586
  name: "arrow_back",
586
587
  size: 20
587
- })]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div", Di, [e.headings.length === 0 ? (V(), N("div", Oi, "No headings found")) : (V(), j(G(r), {
588
+ })]), n[2] ||= P("span", { class: "doc-outline__title" }, "Document Outline", -1)]), P("div", Oi, [e.headings.length === 0 ? (V(), N("div", ki, "No headings found")) : (V(), j(G(r), {
588
589
  key: 1,
589
590
  items: o.value,
590
591
  "get-scroll-container": e.getScrollContainer ?? (() => null),
@@ -592,7 +593,7 @@ var xi = ["aria-label"], Si = {
592
593
  "aria-label": "Document outline"
593
594
  }, null, 8, ["items", "get-scroll-container"]))])], 36)) : M("", !0);
594
595
  }
595
- }), [["__scopeId", "data-v-0797b3b1"]]), Ai = /* @__PURE__ */ I({
596
+ }), [["__scopeId", "data-v-0797b3b1"]]), ji = /* @__PURE__ */ I({
596
597
  __name: "DocxEditorDialogs",
597
598
  props: {
598
599
  view: {},
@@ -685,10 +686,10 @@ var xi = ["aria-label"], Si = {
685
686
  }, null, 8, ["is-open", "current-watermark"])
686
687
  ], 64));
687
688
  }
688
- }), ji = {
689
+ }), Mi = {
689
690
  key: 0,
690
691
  class: "docx-editor-vue__title-bar"
691
- }, Mi = { class: "docx-editor-vue__title-bar-left" }, Ni = { class: "docx-editor-vue__title-bar-center" }, Pi = { class: "docx-editor-vue__title-bar-right" }, Fi = /* @__PURE__ */ I({
692
+ }, Ni = { class: "docx-editor-vue__title-bar-left" }, Pi = { class: "docx-editor-vue__title-bar-center" }, Fi = { class: "docx-editor-vue__title-bar-right" }, Ii = /* @__PURE__ */ I({
692
693
  __name: "DocxEditorMenuBar",
693
694
  props: {
694
695
  showMenuBar: {
@@ -720,9 +721,9 @@ var xi = ["aria-label"], Si = {
720
721
  ],
721
722
  setup(e, { emit: t }) {
722
723
  let n = t;
723
- return (t, r) => e.showMenuBar ? (V(), N("div", ji, [
724
- P("div", Mi, [Me(t.$slots, "title-bar-left")]),
725
- P("div", Ni, [F(_, {
724
+ return (t, r) => e.showMenuBar ? (V(), N("div", Mi, [
725
+ P("div", Ni, [Me(t.$slots, "title-bar-left")]),
726
+ P("div", Pi, [F(_, {
726
727
  "model-value": e.documentName,
727
728
  editable: e.documentNameEditable,
728
729
  "onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
@@ -737,28 +738,28 @@ var xi = ["aria-label"], Si = {
737
738
  "show-help-menu",
738
739
  "show-table-insert"
739
740
  ])]),
740
- P("div", Pi, [Me(t.$slots, "title-bar-right")])
741
+ P("div", Fi, [Me(t.$slots, "title-bar-right")])
741
742
  ])) : M("", !0);
742
743
  }
743
- }), Ii = ["aria-label"], Li = { class: "image-ctx-menu__icon" }, Ri = { class: "image-ctx-menu__label" }, zi = {
744
+ }), Li = ["aria-label"], Ri = { class: "image-ctx-menu__icon" }, zi = { class: "image-ctx-menu__label" }, Bi = {
744
745
  key: 1,
745
746
  class: "image-ctx-menu__divider",
746
747
  role: "separator"
747
- }, Bi = [
748
+ }, Vi = [
748
749
  "data-wrap-type",
749
750
  "data-current",
750
751
  "data-disabled",
751
752
  "disabled",
752
753
  "title",
753
754
  "onClick"
754
- ], Vi = { class: "image-ctx-menu__icon" }, Hi = { class: "image-ctx-menu__label" }, Ui = ["aria-label"], Wi = ["disabled", "onClick"], Gi = { class: "image-ctx-menu__label" }, Ki = {
755
+ ], Hi = { class: "image-ctx-menu__icon" }, Ui = { class: "image-ctx-menu__label" }, Wi = ["aria-label"], Gi = ["disabled", "onClick"], Ki = { class: "image-ctx-menu__label" }, qi = {
755
756
  key: 0,
756
757
  class: "image-ctx-menu__shortcut"
757
- }, qi = {
758
+ }, Ji = {
758
759
  key: 0,
759
760
  class: "image-ctx-menu__divider",
760
761
  role: "separator"
761
- }, Ji = 18, Yi = 260, Xi = 10, Zi = /*#__PURE__*/ t(/* @__PURE__ */ I({
762
+ }, Yi = 18, Xi = 260, Zi = 10, Qi = /*#__PURE__*/ t(/* @__PURE__ */ I({
762
763
  __name: "ImageContextMenu",
763
764
  props: {
764
765
  state: {},
@@ -779,7 +780,7 @@ var xi = ["aria-label"], Si = {
779
780
  function o() {
780
781
  a("open-properties"), a("close");
781
782
  }
782
- let { t: s } = r(), c = bi(), l = Nt, u = A(() => n.state ? Ft(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
783
+ let { t: s } = r(), c = xi(), l = Nt, u = A(() => n.state ? Ft(n.state.currentWrapType, n.state.currentCssFloat ?? null) : null), d = {
783
784
  inline: "wrap_text",
784
785
  squareLeft: "format_image_left",
785
786
  squareRight: "format_image_right",
@@ -792,11 +793,11 @@ var xi = ["aria-label"], Si = {
792
793
  let p = A(() => {
793
794
  if (!n.state) return {};
794
795
  let e = Nt.length * 36 + 16, t = n.state.position.x, r = n.state.position.y;
795
- return typeof window < "u" && (t + Yi > window.innerWidth && (t = window.innerWidth - Yi - Xi), r + e > window.innerHeight && (r = window.innerHeight - e - Xi), t < Xi && (t = Xi), r < Xi && (r = Xi)), {
796
+ return typeof window < "u" && (t + Xi > window.innerWidth && (t = window.innerWidth - Xi - Zi), r + e > window.innerHeight && (r = window.innerHeight - e - Zi), t < Zi && (t = Zi), r < Zi && (r = Zi)), {
796
797
  position: "fixed",
797
798
  left: `${t}px`,
798
799
  top: `${r}px`,
799
- minWidth: `${Yi}px`,
800
+ minWidth: `${Xi}px`,
800
801
  zIndex: 400
801
802
  };
802
803
  });
@@ -838,11 +839,11 @@ var xi = ["aria-label"], Si = {
838
839
  "data-action": "open-properties",
839
840
  onMousedown: n[1] ||= q(() => {}, ["prevent"]),
840
841
  onClick: o
841
- }, [P("span", Li, [F(i, {
842
+ }, [P("span", Ri, [F(i, {
842
843
  name: "settings",
843
- size: Ji
844
- })]), P("span", Ri, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
845
- e.canOpenProperties ? (V(), N("div", zi)) : M("", !0),
844
+ size: Yi
845
+ })]), P("span", zi, W(G(s)("imageWrap.menu.imageProperties")), 1)], 32)) : M("", !0),
846
+ e.canOpenProperties ? (V(), N("div", Bi)) : M("", !0),
846
847
  (V(!0), N(O, null, U(G(l), (e) => (V(), N("button", {
847
848
  key: e.choice,
848
849
  type: "button",
@@ -856,17 +857,17 @@ var xi = ["aria-label"], Si = {
856
857
  onMousedown: n[2] ||= q(() => {}, ["prevent"]),
857
858
  onClick: (t) => h(e)
858
859
  }, [
859
- P("span", Vi, [F(i, {
860
+ P("span", Hi, [F(i, {
860
861
  name: f(e.iconHint),
861
- size: Ji
862
+ size: Yi
862
863
  }, null, 8, ["name"])]),
863
- P("span", Hi, W(G(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
864
+ P("span", Ui, W(G(s)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
864
865
  e.choice === u.value ? (V(), N("span", {
865
866
  key: 0,
866
867
  class: "image-ctx-menu__current-dot",
867
868
  "aria-label": G(s)("imageWrap.menu.ariaLabel")
868
- }, "●", 8, Ui)) : M("", !0)
869
- ], 42, Bi))), 128)),
869
+ }, "●", 8, Wi)) : M("", !0)
870
+ ], 42, Vi))), 128)),
870
871
  e.textActions && e.textActions.length > 0 ? (V(), N(O, { key: 2 }, [n[5] ||= P("div", {
871
872
  class: "image-ctx-menu__divider",
872
873
  role: "separator"
@@ -877,16 +878,16 @@ var xi = ["aria-label"], Si = {
877
878
  disabled: e.disabled,
878
879
  onMousedown: n[3] ||= q(() => {}, ["prevent"]),
879
880
  onClick: (t) => g(e)
880
- }, [P("span", Gi, W(e.label), 1), e.shortcut ? (V(), N("span", Ki, W(e.shortcut), 1)) : M("", !0)], 40, Wi), e.dividerAfter ? (V(), N("div", qi)) : M("", !0)], 64))), 128))], 64)) : M("", !0)
881
- ], 46, Ii)) : M("", !0)]));
881
+ }, [P("span", Ki, W(e.label), 1), e.shortcut ? (V(), N("span", qi, W(e.shortcut), 1)) : M("", !0)], 40, Gi), e.dividerAfter ? (V(), N("div", Ji)) : M("", !0)], 64))), 128))], 64)) : M("", !0)
882
+ ], 46, Li)) : M("", !0)]));
882
883
  }
883
- }), [["__scopeId", "data-v-fc8f35bc"]]), Qi = ["disabled", "onMousedown"], $i = {
884
+ }), [["__scopeId", "data-v-fc8f35bc"]]), $i = ["disabled", "onMousedown"], ea = {
884
885
  key: 0,
885
886
  class: "ctx-menu__icon"
886
- }, ea = { class: "ctx-menu__label" }, ta = {
887
+ }, ta = { class: "ctx-menu__label" }, na = {
887
888
  key: 1,
888
889
  class: "ctx-menu__shortcut"
889
- }, na = 220, ra = 32, ia = 10, aa = /*#__PURE__*/ t(/* @__PURE__ */ I({
890
+ }, ra = 220, ia = 32, aa = 10, oa = /*#__PURE__*/ t(/* @__PURE__ */ I({
890
891
  __name: "TextContextMenu",
891
892
  props: {
892
893
  isOpen: { type: Boolean },
@@ -903,7 +904,7 @@ var xi = ["aria-label"], Si = {
903
904
  setup(e, { emit: t }) {
904
905
  let n = e, i = ({ node: e }) => e;
905
906
  i.props = ["node"];
906
- let a = t, { t: o } = r(), s = bi(), c = H(null), l = A(() => {
907
+ let a = t, { t: o } = r(), s = xi(), c = H(null), l = A(() => {
907
908
  let e = [], t = n.customItems ?? [];
908
909
  for (let [n, r] of t.entries()) e.push({
909
910
  id: `custom-${r.id}`,
@@ -1039,8 +1040,8 @@ var xi = ["aria-label"], Si = {
1039
1040
  action: "deleteTable"
1040
1041
  }), e;
1041
1042
  }), u = A(() => {
1042
- 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 * ra + i * 9;
1043
- return typeof window < "u" && (e + na + ia > window.innerWidth && (e = window.innerWidth - na - ia), t + a + ia > window.innerHeight && (t = window.innerHeight - a - ia)), {
1043
+ 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 * ia + i * 9;
1044
+ return typeof window < "u" && (e + ra + aa > window.innerWidth && (e = window.innerWidth - ra - aa), t + a + aa > window.innerHeight && (t = window.innerHeight - a - aa)), {
1044
1045
  position: "fixed",
1045
1046
  left: `${e}px`,
1046
1047
  top: `${t}px`,
@@ -1054,7 +1055,7 @@ var xi = ["aria-label"], Si = {
1054
1055
  e.key === "Escape" && a("close");
1055
1056
  }
1056
1057
  return K(() => n.isOpen, (e) => {
1057
- e && Oe(() => c.value?.focus());
1058
+ e && L(() => c.value?.focus());
1058
1059
  }), (t, n) => (V(), j(k, { to: "body" }, [e.isOpen ? (V(), N("div", {
1059
1060
  key: 0,
1060
1061
  class: "ctx-menu-backdrop",
@@ -1078,12 +1079,12 @@ var xi = ["aria-label"], Si = {
1078
1079
  disabled: e.disabled,
1079
1080
  onMousedown: q((t) => d(e.action), ["prevent"])
1080
1081
  }, [
1081
- e.icon ? (V(), N("span", $i, [F(i, { node: e.icon }, null, 8, ["node"])])) : M("", !0),
1082
- P("span", ea, W(e.label), 1),
1083
- e.shortcut ? (V(), N("span", ta, W(e.shortcut), 1)) : M("", !0)
1084
- ], 42, Qi))), 128))], 38)) : M("", !0)]));
1082
+ e.icon ? (V(), N("span", ea, [F(i, { node: e.icon }, null, 8, ["node"])])) : M("", !0),
1083
+ P("span", ta, W(e.label), 1),
1084
+ e.shortcut ? (V(), N("span", na, W(e.shortcut), 1)) : M("", !0)
1085
+ ], 42, $i))), 128))], 38)) : M("", !0)]));
1085
1086
  }
1086
- }), [["__scopeId", "data-v-c1416e84"]]), oa = /* @__PURE__ */ I({
1087
+ }), [["__scopeId", "data-v-c1416e84"]]), sa = /* @__PURE__ */ I({
1087
1088
  __name: "DocxEditorOverlays",
1088
1089
  props: {
1089
1090
  readOnly: { type: Boolean },
@@ -1102,7 +1103,7 @@ var xi = ["aria-label"], Si = {
1102
1103
  ],
1103
1104
  setup(e, { emit: t }) {
1104
1105
  let n = t;
1105
- return (t, r) => (V(), N(O, null, [F(aa, {
1106
+ return (t, r) => (V(), N(O, null, [F(oa, {
1106
1107
  "is-open": e.contextMenu.isOpen,
1107
1108
  position: e.contextMenu.position,
1108
1109
  "has-selection": e.contextMenu.hasSelection,
@@ -1124,7 +1125,7 @@ var xi = ["aria-label"], Si = {
1124
1125
  "can-merge-cells",
1125
1126
  "can-split-cell",
1126
1127
  "custom-items"
1127
- ]), F(Zi, {
1128
+ ]), F(Qi, {
1128
1129
  state: e.imageContextMenu,
1129
1130
  "text-actions": e.imageContextMenuTextActions,
1130
1131
  "can-open-properties": e.canOpenImageProperties,
@@ -1141,7 +1142,7 @@ var xi = ["aria-label"], Si = {
1141
1142
  });
1142
1143
  //#endregion
1143
1144
  //#region src/composables/imageOverlayRect.ts
1144
- function sa(e) {
1145
+ function ca(e) {
1145
1146
  let t = Math.max(0, e.parentOffsetWidth - e.parentClientWidth) / 2, n = e.zoom || 1;
1146
1147
  return {
1147
1148
  left: (e.imageRect.left - e.parentRect.left - t + e.scrollLeft) / n,
@@ -1152,13 +1153,13 @@ function sa(e) {
1152
1153
  }
1153
1154
  //#endregion
1154
1155
  //#region src/components/ImageSelectionOverlay.vue?vue&type=script&setup=true&lang.ts
1155
- var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1156
+ var la = ["data-handle", "onMousedown"], ua = ["title"], da = {
1156
1157
  key: 0,
1157
1158
  class: "image-overlay__dim"
1158
- }, da = {
1159
+ }, fa = {
1159
1160
  key: 1,
1160
1161
  class: "image-overlay__dim image-overlay__dim--rotate"
1161
- }, fa = 4, pa = 15, ma = 250, ha = 700, ga = /*#__PURE__*/ t(/* @__PURE__ */ I({
1162
+ }, pa = 4, ma = 15, ha = 250, ga = 700, _a = /*#__PURE__*/ t(/* @__PURE__ */ I({
1162
1163
  __name: "ImageSelectionOverlay",
1163
1164
  props: {
1164
1165
  imageInfo: {},
@@ -1211,7 +1212,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1211
1212
  return;
1212
1213
  }
1213
1214
  let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
1214
- p.value = sa({
1215
+ p.value = ca({
1215
1216
  imageRect: r,
1216
1217
  parentRect: n,
1217
1218
  scrollLeft: t.scrollLeft,
@@ -1229,10 +1230,10 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1229
1230
  let o = a - r;
1230
1231
  S();
1231
1232
  let s = p.value, c = s ? `${s.left}|${s.top}|${s.width}|${s.height}` : "";
1232
- n = c === t ? n + 1 : 0, t = c, !(o >= ma && n >= 2) && o < ha && (e = requestAnimationFrame(i));
1233
+ n = c === t ? n + 1 : 0, t = c, !(o >= ha && n >= 2) && o < ga && (e = requestAnimationFrame(i));
1233
1234
  };
1234
1235
  e = requestAnimationFrame(i);
1235
- let a = setTimeout(S, ma);
1236
+ let a = setTimeout(S, ha);
1236
1237
  C = () => {
1237
1238
  cancelAnimationFrame(e), clearTimeout(a);
1238
1239
  };
@@ -1252,7 +1253,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1252
1253
  }, a = o.value?.closest(".docx-editor-vue__pages-viewport");
1253
1254
  a?.addEventListener("scroll", r, { passive: !0 }), window.addEventListener("resize", r, { passive: !0 });
1254
1255
  let s = null, c = !1;
1255
- Oe(() => {
1256
+ L(() => {
1256
1257
  if (c || !i.imageInfo) return;
1257
1258
  let e = re();
1258
1259
  e && (s = new MutationObserver(() => oe()), s.observe(e, {
@@ -1284,7 +1285,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1284
1285
  zIndex: ae.imageOverlay,
1285
1286
  pointerEvents: "auto"
1286
1287
  };
1287
- }), le = A(() => {
1288
+ }), T = A(() => {
1288
1289
  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";
1289
1290
  return [
1290
1291
  {
@@ -1353,10 +1354,10 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1353
1354
  }
1354
1355
  ];
1355
1356
  });
1356
- function ue(e, t) {
1357
- !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));
1357
+ function le(e, t) {
1358
+ !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", ue), document.addEventListener("mouseup", de));
1358
1359
  }
1359
- function de(e) {
1360
+ function ue(e) {
1360
1361
  let t = i.zoom, n = (e.clientX - h) / t, r = (e.clientY - g) / t, a = !e.shiftKey, o = Ut(m, n, r, _, v, a);
1361
1362
  u.value = Math.round(o.width), d.value = Math.round(o.height);
1362
1363
  let s = y;
@@ -1370,58 +1371,58 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1370
1371
  };
1371
1372
  }
1372
1373
  }
1373
- function fe() {
1374
- document.removeEventListener("mousemove", de), document.removeEventListener("mouseup", fe), s.value = !1, y = null, a("interact-end");
1374
+ function de() {
1375
+ document.removeEventListener("mousemove", ue), document.removeEventListener("mouseup", de), s.value = !1, y = null, a("interact-end");
1375
1376
  let e = i.view, t = i.imageInfo;
1376
1377
  if (!e || !t) {
1377
1378
  S();
1378
1379
  return;
1379
1380
  }
1380
1381
  let n = Kt(e, t.pmPos, u.value, d.value);
1381
- n !== null && Ce(n), Oe(() => S());
1382
+ n !== null && Ce(n), L(() => S());
1382
1383
  }
1383
- let pe = 0, me = 0, T = 0, he = 0, ge = null, E = null;
1384
- function _e(e) {
1384
+ let fe = 0, pe = 0, me = 0, E = 0, he = null, D = null;
1385
+ function ge(e) {
1385
1386
  if (!e) return 0;
1386
1387
  let t = e.match(/rotate\((-?\d+(?:\.\d+)?)deg\)/)?.[1];
1387
1388
  return t ? parseFloat(t) : 0;
1388
1389
  }
1389
- function ve(e, t) {
1390
+ function _e(e, t) {
1390
1391
  let n = /scaleX\(-1\)/.test(e || ""), r = /scaleY\(-1\)/.test(e || ""), i = [], a = (t % 360 + 360) % 360;
1391
1392
  return a !== 0 && i.push(`rotate(${a}deg)`), n && i.push("scaleX(-1)"), r && i.push("scaleY(-1)"), i.length > 0 ? i.join(" ") : null;
1392
1393
  }
1393
- function ye(e, t) {
1394
- return Math.atan2(e - pe, -(t - me)) * 180 / Math.PI;
1394
+ function ve(e, t) {
1395
+ return Math.atan2(e - fe, -(t - pe)) * 180 / Math.PI;
1395
1396
  }
1396
- function be(e) {
1397
+ function ye(e) {
1397
1398
  if (!i.imageInfo) return;
1398
1399
  let t = i.imageInfo.element.getBoundingClientRect();
1399
- 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);
1400
+ fe = t.left + t.width / 2, pe = t.top + t.height / 2, he = ne(te(i.view, i.imageInfo.pmPos)), E = ge(he), D = i.imageInfo.element.querySelector("img"), me = ve(e.clientX, e.clientY), f.value = E, l.value = !0, a("interact-start"), document.addEventListener("mousemove", be), document.addEventListener("mouseup", xe);
1400
1401
  }
1401
- function xe(e) {
1402
- let t = ye(e.clientX, e.clientY) - T, n = he + t;
1403
- e.shiftKey || (n = Math.round(n / pa) * pa), f.value = (n % 360 + 360) % 360, E && (E.style.transform = ve(ge, f.value) || "");
1402
+ function be(e) {
1403
+ let t = ve(e.clientX, e.clientY) - me, n = E + t;
1404
+ e.shiftKey || (n = Math.round(n / ma) * ma), f.value = (n % 360 + 360) % 360, D && (D.style.transform = _e(he, f.value) || "");
1404
1405
  }
1405
- function D() {
1406
- document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", D), l.value = !1, a("interact-end");
1406
+ function xe() {
1407
+ document.removeEventListener("mousemove", be), document.removeEventListener("mouseup", xe), l.value = !1, a("interact-end");
1407
1408
  let e = i.view, t = i.imageInfo;
1408
1409
  try {
1409
1410
  let n = e && t ? te(e, t.pmPos) : null;
1410
1411
  e && t && n && (e.dispatch(e.state.tr.setNodeMarkup(t.pmPos, void 0, {
1411
1412
  ...n.attrs,
1412
- transform: ve(ne(n), f.value)
1413
+ transform: _e(ne(n), f.value)
1413
1414
  })), Ce(t.pmPos));
1414
1415
  } catch {} finally {
1415
- E && (E.style.transform = ""), E = null, ge = null;
1416
+ D && (D.style.transform = ""), D = null, he = null;
1416
1417
  }
1417
- Oe(() => S());
1418
+ L(() => S());
1418
1419
  }
1419
1420
  let k = null;
1420
1421
  function Se(e) {
1421
1422
  if (!i.imageInfo || !p.value) return;
1422
1423
  let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
1423
1424
  let s = e.clientX - t, l = e.clientY - n;
1424
- if (!(!o && Math.sqrt(s * s + l * l) < fa)) {
1425
+ if (!(!o && Math.sqrt(s * s + l * l) < pa)) {
1425
1426
  if (!o) {
1426
1427
  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);";
1427
1428
  let e = i.zoom;
@@ -1468,7 +1469,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1468
1469
  if (a == null || a < 0) return;
1469
1470
  s = Gt(n, r.pmPos, a);
1470
1471
  }
1471
- s !== null && Ce(s), Oe(() => S());
1472
+ s !== null && Ce(s), L(() => S());
1472
1473
  }
1473
1474
  function Ce(e) {
1474
1475
  let t = i.view;
@@ -1478,7 +1479,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1478
1479
  } catch {}
1479
1480
  }
1480
1481
  return B(() => {
1481
- 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?.();
1482
+ document.removeEventListener("mousemove", ue), document.removeEventListener("mouseup", de), document.removeEventListener("mousemove", be), document.removeEventListener("mouseup", xe), x && document.removeEventListener("mousemove", x), ee && document.removeEventListener("mouseup", ee), k &&= (k.remove(), null), b && cancelAnimationFrame(b), C?.();
1482
1483
  }), (t, r) => e.imageInfo ? (V(), N("div", {
1483
1484
  key: 0,
1484
1485
  ref_key: "overlayRootRef",
@@ -1494,25 +1495,25 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1494
1495
  onMousedown: r[0] ||= q((e) => Se(e), ["prevent", "stop"]),
1495
1496
  onContextmenu: r[1] ||= q((e) => t.$emit("context-menu", e), ["prevent", "stop"])
1496
1497
  }, null, 36),
1497
- (V(!0), N(O, null, U(le.value, (e) => (V(), N("div", {
1498
+ (V(!0), N(O, null, U(T.value, (e) => (V(), N("div", {
1498
1499
  key: e.pos,
1499
1500
  class: "image-overlay__handle",
1500
1501
  style: z(e.style),
1501
1502
  "data-handle": e.pos,
1502
- onMousedown: q((t) => ue(t, e.pos), ["prevent", "stop"])
1503
- }, null, 44, ca))), 128)),
1503
+ onMousedown: q((t) => le(t, e.pos), ["prevent", "stop"])
1504
+ }, null, 44, la))), 128)),
1504
1505
  r[5] ||= P("div", { class: "image-overlay__rotate-line" }, null, -1),
1505
1506
  P("div", {
1506
1507
  class: "image-overlay__rotate-handle",
1507
1508
  style: z({ left: `${w.value / 2 - 7}px` }),
1508
1509
  title: G(n)("imageOverlay.rotate"),
1509
- onMousedown: r[2] ||= q((e) => be(e), ["prevent", "stop"])
1510
- }, null, 44, la),
1511
- s.value ? (V(), N("div", ua, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
1512
- l.value ? (V(), N("div", da, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
1510
+ onMousedown: r[2] ||= q((e) => ye(e), ["prevent", "stop"])
1511
+ }, null, 44, ua),
1512
+ s.value ? (V(), N("div", da, W(Math.round(u.value)) + " × " + W(Math.round(d.value)), 1)) : M("", !0),
1513
+ l.value ? (V(), N("div", fa, W(Math.round(f.value)) + "° ", 1)) : M("", !0)
1513
1514
  ], 36)) : M("", !0);
1514
1515
  }
1515
- }), [["__scopeId", "data-v-4c3d1a1d"]]), _a = /* @__PURE__ */ I({
1516
+ }), [["__scopeId", "data-v-4c3d1a1d"]]), va = /* @__PURE__ */ I({
1516
1517
  __name: "HeaderFooterSelectionOverlay",
1517
1518
  props: {
1518
1519
  pagesContainer: {},
@@ -1562,7 +1563,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1562
1563
  i !== null && cancelAnimationFrame(i), o?.removeEventListener("scroll", a, !0), Xt(t.hiddenContainer);
1563
1564
  }), (e, t) => null;
1564
1565
  }
1565
- }), va = { class: "hf-editor-label" }, ya = /*#__PURE__*/ t(/* @__PURE__ */ I({
1566
+ }), ya = { class: "hf-editor-label" }, ba = /*#__PURE__*/ t(/* @__PURE__ */ I({
1566
1567
  __name: "InlineHeaderFooterEditor",
1567
1568
  props: {
1568
1569
  edit: {},
@@ -1580,7 +1581,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1580
1581
  zIndex: 10
1581
1582
  })), u = (e) => {
1582
1583
  s.value = !1;
1583
- let t = n.getView(), r = J.nodes.field;
1584
+ let t = n.getView(), r = Xe.nodes.field;
1584
1585
  if (!t || !r) return;
1585
1586
  let { $from: i, from: a } = t.state.selection, o = t.state.storedMarks ?? i.marks(), c = r.create({
1586
1587
  fieldType: e,
@@ -1605,7 +1606,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1605
1606
  class: "hf-inline-editor",
1606
1607
  style: z(l.value),
1607
1608
  role: "presentation"
1608
- }, [P("div", { class: R(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", va, W(c.value), 1), P("div", {
1609
+ }, [P("div", { class: R(["hf-separator-bar", { "hf-separator-bar--footer": e.edit.position === "footer" }]) }, [P("span", ya, W(c.value), 1), P("div", {
1609
1610
  class: "hf-options",
1610
1611
  onMousedown: n[5] ||= q(() => {}, ["stop"])
1611
1612
  }, [F(G(a), {
@@ -1655,7 +1656,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1655
1656
  })
1656
1657
  ], 2)) : M("", !0)], 32)], 2)], 4));
1657
1658
  }
1658
- }), [["__scopeId", "data-v-a0bd3730"]]), ba = ["title", "aria-label"], xa = /* @__PURE__ */ I({
1659
+ }), [["__scopeId", "data-v-a0bd3730"]]), xa = ["title", "aria-label"], Sa = /* @__PURE__ */ I({
1659
1660
  __name: "OutlineToggleButton",
1660
1661
  props: {
1661
1662
  leftOffset: {},
@@ -1678,9 +1679,9 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1678
1679
  }, [F(i, {
1679
1680
  name: "format_list_bulleted",
1680
1681
  size: 20
1681
- })], 44, ba));
1682
+ })], 44, xa));
1682
1683
  }
1683
- }), Sa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1684
+ }), Ca = /*#__PURE__*/ t(/* @__PURE__ */ I({
1684
1685
  __name: "PageIndicator",
1685
1686
  props: {
1686
1687
  currentPage: {},
@@ -1699,7 +1700,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1699
1700
  total: e.totalPages
1700
1701
  })), 5));
1701
1702
  }
1702
- }), [["__scopeId", "data-v-f1904974"]]), Ca = ["data-folio-block-id"], wa = ["data-folio-block-id", "title"], Ta = 2.5, Ea = 5, Da = 6, Oa = 2, ka = 2, Aa = /*#__PURE__*/ t(/* @__PURE__ */ I({
1703
+ }), [["__scopeId", "data-v-f1904974"]]), wa = ["data-folio-block-id"], Ta = ["data-folio-block-id", "title"], Ea = 2.5, Da = 5, Oa = 6, ka = 2, Aa = 2, ja = /*#__PURE__*/ t(/* @__PURE__ */ I({
1703
1704
  __name: "TemplateDirectivesOverlay",
1704
1705
  props: {
1705
1706
  getView: { type: Function },
@@ -1713,19 +1714,19 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1713
1714
  setup(e) {
1714
1715
  let t = e, n = /* @__PURE__ */ new Set(["if", "each"]), r = /* @__PURE__ */ new Set(["endif", "endeach"]), i = (e) => e === "each" ? "each" : "if";
1715
1716
  function a(e) {
1716
- let t = e - Da - Ta - Oa;
1717
- return t <= 0 ? 0 : Math.floor(t / Ea);
1717
+ let t = e - Oa - Ea - ka;
1718
+ return t <= 0 ? 0 : Math.floor(t / Da);
1718
1719
  }
1719
1720
  function o(e, t, n) {
1720
1721
  let r = a(n), i = Math.min(Math.max(0, e), r);
1721
- return t - Da - Ta - (r - i) * Ea;
1722
+ return t - Oa - Ea - (r - i) * Da;
1722
1723
  }
1723
1724
  function s(e, t) {
1724
- if (t.length === 0) return e.bottom - e.top >= ka ? [e] : [];
1725
+ if (t.length === 0) return e.bottom - e.top >= Aa ? [e] : [];
1725
1726
  let n = [];
1726
1727
  for (let r of t) {
1727
1728
  let t = Math.max(e.top, r.top), i = Math.min(e.bottom, r.bottom);
1728
- i - t >= ka && n.push({
1729
+ i - t >= Aa && n.push({
1729
1730
  top: t,
1730
1731
  bottom: i
1731
1732
  });
@@ -1887,10 +1888,10 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1887
1888
  position: "absolute",
1888
1889
  left: `${t.railX * e.zoom}px`,
1889
1890
  top: `${n.top * e.zoom}px`,
1890
- width: `${Ta * e.zoom}px`,
1891
+ width: `${Ea * e.zoom}px`,
1891
1892
  height: `${Math.max(0, n.bottom - n.top) * e.zoom}px`
1892
1893
  })
1893
- }, null, 14, Ca))), 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", {
1894
+ }, null, 14, wa))), 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", {
1894
1895
  key: `d:${n}:${i}`,
1895
1896
  class: R(oe(t.range)),
1896
1897
  "data-folio-block-id": S(t.range),
@@ -1902,9 +1903,9 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1902
1903
  width: `${(r.width + 2) * e.zoom}px`,
1903
1904
  height: `${Math.max(0, r.height - 2) * e.zoom}px`
1904
1905
  })
1905
- }, null, 14, wa))), 128))], 64))), 128))], 32));
1906
+ }, null, 14, Ta))), 128))], 64))), 128))], 32));
1906
1907
  }
1907
- }), [["__scopeId", "data-v-c72dfa21"]]), ja = ["href", "title"], Ma = ["title"], Na = ["title"], Pa = ["title"], Fa = { class: "docx-hyperlink-popup__edit-row" }, Ia = ["placeholder", "onKeydown"], La = { class: "docx-hyperlink-popup__edit-row" }, Ra = ["onKeydown"], za = ["disabled"], Ba = /*#__PURE__*/ t(/* @__PURE__ */ I({
1908
+ }), [["__scopeId", "data-v-c72dfa21"]]), Ma = ["href", "title"], Na = ["title"], Pa = ["title"], Fa = ["title"], Ia = { class: "docx-hyperlink-popup__edit-row" }, La = ["placeholder", "onKeydown"], Ra = { class: "docx-hyperlink-popup__edit-row" }, za = ["onKeydown"], Ba = ["disabled"], Va = /*#__PURE__*/ t(/* @__PURE__ */ I({
1908
1909
  __name: "HyperlinkPopup",
1909
1910
  props: {
1910
1911
  data: {},
@@ -1953,28 +1954,28 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1953
1954
  class: R(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": o.value }]),
1954
1955
  style: z(u.value),
1955
1956
  onMousedown: r[6] ||= q(() => {}, ["stop"])
1956
- }, [o.value ? (V(), N(O, { key: 1 }, [P("div", Fa, [Le(P("input", {
1957
+ }, [o.value ? (V(), N(O, { key: 1 }, [P("div", Ia, [Le(P("input", {
1957
1958
  class: "docx-hyperlink-popup__input",
1958
1959
  placeholder: G(n)("displayText"),
1959
1960
  "onUpdate:modelValue": r[2] ||= (e) => s.value = e,
1960
1961
  onKeydown: [Re(q(h, ["prevent"]), ["enter"]), r[3] ||= Re((e) => t.$emit("close"), ["esc"])]
1961
- }, null, 40, Ia), [[Pe, s.value]])]), P("div", La, [Le(P("input", {
1962
+ }, null, 40, La), [[Pe, s.value]])]), P("div", Ra, [Le(P("input", {
1962
1963
  class: "docx-hyperlink-popup__input",
1963
1964
  placeholder: "https://...",
1964
1965
  "onUpdate:modelValue": r[4] ||= (e) => c.value = e,
1965
1966
  onKeydown: [Re(q(h, ["prevent"]), ["enter"]), r[5] ||= Re((e) => t.$emit("close"), ["esc"])]
1966
- }, null, 40, Ra), [[Pe, c.value]]), P("button", {
1967
+ }, null, 40, za), [[Pe, c.value]]), P("button", {
1967
1968
  class: "docx-hyperlink-popup__apply",
1968
1969
  disabled: !c.value.trim(),
1969
1970
  onClick: q(h, ["prevent"])
1970
- }, W(G(n)("common.apply")), 9, za)])], 64)) : (V(), N(O, { key: 0 }, [
1971
+ }, W(G(n)("common.apply")), 9, Ba)])], 64)) : (V(), N(O, { key: 0 }, [
1971
1972
  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),
1972
1973
  P("a", {
1973
1974
  class: "docx-hyperlink-popup__url",
1974
1975
  href: e.data.href,
1975
1976
  title: e.data.href,
1976
1977
  onClick: r[0] ||= q((n) => t.$emit("navigate", e.data.href), ["prevent"])
1977
- }, W(e.data.href), 9, ja),
1978
+ }, W(e.data.href), 9, Ma),
1978
1979
  r[11] ||= P("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
1979
1980
  P("button", {
1980
1981
  class: "docx-hyperlink-popup__btn",
@@ -1996,7 +1997,7 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
1996
1997
  height: "13",
1997
1998
  rx: "2",
1998
1999
  ry: "2"
1999
- }), 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, Ma),
2000
+ }), 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, Na),
2000
2001
  e.readOnly ? M("", !0) : (V(), N("button", {
2001
2002
  key: 0,
2002
2003
  class: "docx-hyperlink-popup__btn",
@@ -2011,43 +2012,43 @@ var ca = ["data-handle", "onMousedown"], la = ["title"], ua = {
2011
2012
  "stroke-width": "2",
2012
2013
  "stroke-linecap": "round",
2013
2014
  "stroke-linejoin": "round"
2014
- }, [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, Na)),
2015
+ }, [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, Pa)),
2015
2016
  e.readOnly ? M("", !0) : (V(), N("button", {
2016
2017
  key: 1,
2017
2018
  class: "docx-hyperlink-popup__btn",
2018
2019
  title: G(n)("removeLink"),
2019
2020
  onClick: r[1] ||= q((e) => t.$emit("remove"), ["prevent"])
2020
- }, [...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, Pa))
2021
+ }, [...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, Fa))
2021
2022
  ], 64))], 38)) : M("", !0);
2022
2023
  }
2023
2024
  }), [["__scopeId", "data-v-366df18c"]]);
2024
2025
  //#endregion
2025
2026
  //#region src/composables/commentMarks.ts
2026
- function Va(e, t) {
2027
+ function Ha(e, t) {
2027
2028
  let n = Math.max(0, Math.min(t.from, e)), r = Math.max(n, Math.min(t.to, e));
2028
2029
  return n === r ? null : {
2029
2030
  from: n,
2030
2031
  to: r
2031
2032
  };
2032
2033
  }
2033
- function Ha({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
2034
+ function Ua({ docSize: e, capturedRange: t, currentRange: n, savedRange: r }) {
2034
2035
  let i = t.from === t.to ? n.from === n.to ? r && r.from !== r.to ? r : null : n : t;
2035
- return i ? Va(e, i) : null;
2036
+ return i ? Ha(e, i) : null;
2036
2037
  }
2037
- function Ua(e, t, n, r) {
2038
- let i = e.state.schema.marks.comment, a = Va(e.state.doc.content.size, t);
2038
+ function Wa(e, t, n, r) {
2039
+ let i = e.state.schema.marks.comment, a = Ha(e.state.doc.content.size, t);
2039
2040
  if (!i || !a) return !1;
2040
2041
  let o = e.state.tr;
2041
2042
  return r?.replacePending && (o = o.removeMark(a.from, a.to, i.create({ commentId: cn }))), o = o.addMark(a.from, a.to, i.create({ commentId: n })), r?.selectEnd && (o = o.setSelection(jt.near(o.doc.resolve(a.to), -1))), e.dispatch(o), !0;
2042
2043
  }
2043
- function Wa(e, t) {
2044
- let n = e.state.schema.marks.comment, r = Va(e.state.doc.content.size, t);
2044
+ function Ga(e, t) {
2045
+ let n = e.state.schema.marks.comment, r = Ha(e.state.doc.content.size, t);
2045
2046
  !n || !r || e.dispatch(e.state.tr.removeMark(r.from, r.to, n.create({ commentId: cn })));
2046
2047
  }
2047
2048
  //#endregion
2048
2049
  //#region src/composables/useCommentLifecycle.ts
2049
- var Ga = 408, Ka = 12;
2050
- function qa(e) {
2050
+ var Ka = 408, qa = 12;
2051
+ function Ja(e) {
2051
2052
  let t = H(!1), n = H(null), r = H(null), i = H(null), a = H(null);
2052
2053
  function o(t) {
2053
2054
  let n = e.editorView.value, r = e.pagesContainer.value;
@@ -2080,7 +2081,7 @@ function qa(e) {
2080
2081
  r.value = null;
2081
2082
  return;
2082
2083
  }
2083
- let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + Ka : l.width / 2 + Ga;
2084
+ let l = i.getBoundingClientRect(), u = e.pagesContainer.value?.getBoundingClientRect(), d = u ? u.right - l.left + qa : l.width / 2 + Ka;
2084
2085
  r.value = {
2085
2086
  top: c.top - l.top,
2086
2087
  left: Math.max(16, Math.min(d, l.width - 16)),
@@ -2091,7 +2092,7 @@ function qa(e) {
2091
2092
  function c() {
2092
2093
  let s = e.editorView.value;
2093
2094
  if (!s) return;
2094
- let c = r.value, l = s.state.selection, u = Ha({
2095
+ let c = r.value, l = s.state.selection, u = Ua({
2095
2096
  docSize: s.state.doc.content.size,
2096
2097
  capturedRange: c ? {
2097
2098
  from: c.from,
@@ -2110,7 +2111,7 @@ function qa(e) {
2110
2111
  r.value = null;
2111
2112
  return;
2112
2113
  }
2113
- if (!Ua(s, u, cn, { selectEnd: !0 })) {
2114
+ if (!Wa(s, u, cn, { selectEnd: !0 })) {
2114
2115
  r.value = null, i.value = null;
2115
2116
  return;
2116
2117
  }
@@ -2123,11 +2124,11 @@ function qa(e) {
2123
2124
  let n = e.editorView.value, r = i.value;
2124
2125
  if (!n || !r) return !1;
2125
2126
  let a = e.createComment(t);
2126
- return Ua(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
2127
+ return Wa(n, r, a.id, { replacePending: !0 }) ? (e.pushComment(a), e.reLayout(), e.setActiveSidebarItem(`comment-${a.id}`), l(), !0) : !1;
2127
2128
  }
2128
2129
  function d() {
2129
2130
  let t = e.editorView.value;
2130
- t && i.value && Wa(t, i.value), l();
2131
+ t && i.value && Ga(t, i.value), l();
2131
2132
  }
2132
2133
  return {
2133
2134
  isAddingComment: t,
@@ -2141,7 +2142,7 @@ function qa(e) {
2141
2142
  }
2142
2143
  //#endregion
2143
2144
  //#region src/composables/useCommentManagement.ts
2144
- function Ja(e) {
2145
+ function Ya(e) {
2145
2146
  let t = ln(), n = H([]), r = H(!1);
2146
2147
  function i() {
2147
2148
  r.value = !0;
@@ -2201,7 +2202,7 @@ function Ja(e) {
2201
2202
  }
2202
2203
  function x(t, n) {
2203
2204
  let r = e.editorView.value;
2204
- r && Q(t, n)(r.state, r.dispatch);
2205
+ r && yn(t, n)(r.state, r.dispatch);
2205
2206
  }
2206
2207
  return {
2207
2208
  comments: s,
@@ -2224,8 +2225,8 @@ function Ja(e) {
2224
2225
  }
2225
2226
  //#endregion
2226
2227
  //#region src/utils/imageClipboard.ts
2227
- function Ya(e, t, n) {
2228
- let r = $(e.state), i = e.state.schema.marks.insertion;
2228
+ function Xa(e, t, n) {
2229
+ let r = bn(e.state), i = e.state.schema.marks.insertion;
2229
2230
  if (!r || !i) return;
2230
2231
  let a = t.selection.from, o = a - n.nodeSize;
2231
2232
  o < 0 || t.addMark(o, a, i.create({
@@ -2234,7 +2235,7 @@ function Ya(e, t, n) {
2234
2235
  date: r.date
2235
2236
  }));
2236
2237
  }
2237
- function Xa(e, t) {
2238
+ function Za(e, t) {
2238
2239
  let n = e.state.doc.nodeAt(t);
2239
2240
  if (!n || n.type.name !== "image") return;
2240
2241
  let r = n.attrs.src;
@@ -2248,7 +2249,7 @@ function Xa(e, t) {
2248
2249
  e.value = i, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
2249
2250
  });
2250
2251
  }
2251
- function Za(e) {
2252
+ function Qa(e) {
2252
2253
  return new Promise((t, n) => {
2253
2254
  let r = new FileReader();
2254
2255
  r.onload = () => {
@@ -2256,7 +2257,7 @@ function Za(e) {
2256
2257
  }, r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read blob")), r.readAsDataURL(e);
2257
2258
  });
2258
2259
  }
2259
- function Qa(e) {
2260
+ function $a(e) {
2260
2261
  return new Promise((t) => {
2261
2262
  let n = new Image();
2262
2263
  n.onload = () => t({
@@ -2268,7 +2269,7 @@ function Qa(e) {
2268
2269
  }), n.src = e;
2269
2270
  });
2270
2271
  }
2271
- function $a(e, t, n, r) {
2272
+ function eo(e, t, n, r) {
2272
2273
  let i = e.state.schema.nodes.image;
2273
2274
  if (!i) return;
2274
2275
  let a = i.create({
@@ -2279,23 +2280,23 @@ function $a(e, t, n, r) {
2279
2280
  wrapType: "inline",
2280
2281
  displayMode: "inline"
2281
2282
  }), o = e.state.tr.replaceSelectionWith(a);
2282
- Ya(e, o, a), e.dispatch(o);
2283
+ Xa(e, o, a), e.dispatch(o);
2283
2284
  }
2284
- async function eo(e) {
2285
+ async function to(e) {
2285
2286
  try {
2286
2287
  let t = await navigator.clipboard.read();
2287
2288
  for (let n of t) {
2288
2289
  let t = n.types.find((e) => e.startsWith("image/"));
2289
2290
  if (t) {
2290
- let r = await Za(await n.getType(t)), i = await Qa(r), a = i.width, o = i.height;
2291
- a > 612 && (o = Math.round(612 / a * o), a = 612), $a(e, r, a, o);
2291
+ let r = await Qa(await n.getType(t)), i = await $a(r), a = i.width, o = i.height;
2292
+ a > 612 && (o = Math.round(612 / a * o), a = 612), eo(e, r, a, o);
2292
2293
  return;
2293
2294
  }
2294
2295
  if (n.types.includes("text/html")) {
2295
2296
  let t = await (await n.getType("text/html")).text(), r = /<img[^>]+src="(?<src>[^"]+)"[^>]*>/iu.exec(t)?.groups?.src;
2296
2297
  if (r) {
2297
2298
  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;
2298
- $a(e, r, a || 200, o || 200);
2299
+ eo(e, r, a || 200, o || 200);
2299
2300
  return;
2300
2301
  }
2301
2302
  }
@@ -2316,14 +2317,14 @@ async function eo(e) {
2316
2317
  }
2317
2318
  }
2318
2319
  }
2319
- function to(e, t) {
2320
+ function no(e, t) {
2320
2321
  let n = e.state.doc.nodeAt(t);
2321
2322
  if (!n || n.type.name !== "image") return;
2322
2323
  let r = document.createElement("input");
2323
2324
  r.type = "file", r.accept = "image/*", r.onchange = async () => {
2324
2325
  let i = r.files?.[0];
2325
2326
  if (!i) return;
2326
- let a = await Za(i), o = await Qa(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);
2327
+ let a = await Qa(i), o = await $a(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);
2327
2328
  try {
2328
2329
  let r = e.state.tr.setNodeMarkup(t, void 0, {
2329
2330
  ...n.attrs,
@@ -2338,7 +2339,7 @@ function to(e, t) {
2338
2339
  }
2339
2340
  //#endregion
2340
2341
  //#region src/composables/useContextMenus.ts
2341
- var no = /* @__PURE__ */ new Set([
2342
+ var ro = /* @__PURE__ */ new Set([
2342
2343
  "inline",
2343
2344
  "square",
2344
2345
  "tight",
@@ -2347,16 +2348,16 @@ var no = /* @__PURE__ */ new Set([
2347
2348
  "behind",
2348
2349
  "inFront"
2349
2350
  ]);
2350
- function ro(e) {
2351
- return typeof e == "string" && no.has(e);
2352
- }
2353
2351
  function io(e) {
2354
- return ro(e) ? e : "inline";
2352
+ return typeof e == "string" && ro.has(e);
2355
2353
  }
2356
2354
  function ao(e) {
2357
- return e === "left" || e === "right" || e === "none" ? e : null;
2355
+ return io(e) ? e : "inline";
2358
2356
  }
2359
2357
  function oo(e) {
2358
+ return e === "left" || e === "right" || e === "none" ? e : null;
2359
+ }
2360
+ function so(e) {
2360
2361
  let { t } = r(), n = H({
2361
2362
  isOpen: !1,
2362
2363
  position: {
@@ -2430,7 +2431,7 @@ function oo(e) {
2430
2431
  i.value = l(o, a, {
2431
2432
  x: t.clientX,
2432
2433
  y: t.clientY
2433
- }, io(s.attrs.wrapType), ao(s.attrs.cssFloat)), n.value.isOpen = !1;
2434
+ }, ao(s.attrs.wrapType), oo(s.attrs.cssFloat)), n.value.isOpen = !1;
2434
2435
  return;
2435
2436
  }
2436
2437
  }
@@ -2441,7 +2442,7 @@ function oo(e) {
2441
2442
  e.setPmSelection(a);
2442
2443
  } catch {}
2443
2444
  }
2444
- let s = Ze(r.state), { empty: c, from: u, to: d } = r.state.selection;
2445
+ let s = Qe(r.state), { empty: c, from: u, to: d } = r.state.selection;
2445
2446
  a.value = {
2446
2447
  from: u,
2447
2448
  to: d
@@ -2465,7 +2466,7 @@ function oo(e) {
2465
2466
  !o || o.type.name !== "image" || (i.value = l(a.element, a.pmPos, {
2466
2467
  x: t.clientX,
2467
2468
  y: t.clientY
2468
- }, io(o.attrs.wrapType), ao(o.attrs.cssFloat)), n.value.isOpen = !1);
2469
+ }, ao(o.attrs.wrapType), oo(o.attrs.cssFloat)), n.value.isOpen = !1);
2469
2470
  }
2470
2471
  function f(t) {
2471
2472
  let n = e.editorView.value, r = i.value;
@@ -2489,16 +2490,16 @@ function oo(e) {
2489
2490
  case "cut":
2490
2491
  if (e.selectedImage.value) {
2491
2492
  let t = e.selectedImage.value.pmPos;
2492
- Xa(n, t);
2493
+ Za(n, t);
2493
2494
  let r = n.state.doc.nodeAt(t);
2494
2495
  r && (n.dispatch(n.state.tr.delete(t, t + r.nodeSize)), e.selectedImage.value = null, e.onCut?.());
2495
2496
  } else n.focus(), document.execCommand("cut");
2496
2497
  break;
2497
2498
  case "copy":
2498
- e.selectedImage.value ? (Xa(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
2499
+ e.selectedImage.value ? (Za(n, e.selectedImage.value.pmPos), e.onCopy?.()) : (n.focus(), document.execCommand("copy"));
2499
2500
  break;
2500
2501
  case "paste":
2501
- eo(n).then(() => e.onPaste?.()).catch(() => void 0);
2502
+ to(n).then(() => e.onPaste?.()).catch(() => void 0);
2502
2503
  break;
2503
2504
  case "pasteAsPlainText":
2504
2505
  navigator.clipboard.readText().then((t) => {
@@ -2519,7 +2520,7 @@ function oo(e) {
2519
2520
  e.selectedImage.value && (e.showImageProperties.value = !0);
2520
2521
  break;
2521
2522
  case "replaceImage":
2522
- e.selectedImage.value && to(n, e.selectedImage.value.pmPos);
2523
+ e.selectedImage.value && no(n, e.selectedImage.value.pmPos);
2523
2524
  break;
2524
2525
  case "deleteImage":
2525
2526
  if (e.selectedImage.value) {
@@ -2557,7 +2558,7 @@ function oo(e) {
2557
2558
  }
2558
2559
  //#endregion
2559
2560
  //#region src/composables/useDocumentLifecycle.ts
2560
- function so(e) {
2561
+ function co(e) {
2561
2562
  async function t(t) {
2562
2563
  e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
2563
2564
  }
@@ -2569,26 +2570,26 @@ function so(e) {
2569
2570
  }), K(e.document, (e) => {
2570
2571
  e && n(e);
2571
2572
  }), ke(async () => {
2572
- await Oe();
2573
+ await L();
2573
2574
  let r = e.documentBuffer(), i = e.document();
2574
2575
  r ? await t(r) : i && n(i);
2575
2576
  });
2576
2577
  }
2577
2578
  //#endregion
2578
2579
  //#region src/composables/useDocxEditorRefApi.ts
2579
- var co = Date.now(), lo = async (e, t) => {
2580
+ var lo = Date.now(), uo = async (e, t) => {
2580
2581
  let n = await e.saveDocument(t);
2581
2582
  if (!n) return null;
2582
2583
  let r = await n.arrayBuffer();
2583
2584
  return e.clearCommentsDirty(), e.onSave?.(r), r;
2584
2585
  };
2585
- function uo(e) {
2586
+ function fo(e) {
2586
2587
  let t = [];
2587
2588
  function n() {
2588
2589
  e.onPrint?.(), window.print();
2589
2590
  }
2590
2591
  function r(t) {
2591
- return lo({
2592
+ return uo({
2592
2593
  clearCommentsDirty: e.clearCommentsDirty,
2593
2594
  onSave: e.onSave,
2594
2595
  saveDocument: e.saveDocument
@@ -2671,7 +2672,7 @@ function uo(e) {
2671
2672
  getPageNumberForPmPos: (t) => {
2672
2673
  let n = e.layout.value;
2673
2674
  if (!n) return null;
2674
- let r = bn(n, t);
2675
+ let r = $(n, t);
2675
2676
  return r == null ? null : r + 1;
2676
2677
  },
2677
2678
  getBlockRect: p,
@@ -2686,7 +2687,7 @@ function uo(e) {
2686
2687
  function _() {
2687
2688
  let t = e.layout.value, n = e.editorView.value;
2688
2689
  if (!t || !n) return 0;
2689
- let r = bn(t, n.state.selection.from);
2690
+ let r = $(t, n.state.selection.from);
2690
2691
  return r == null ? 0 : r + 1;
2691
2692
  }
2692
2693
  function v(t) {
@@ -2714,6 +2715,8 @@ function uo(e) {
2714
2715
  scrollToParaId: i,
2715
2716
  openPrintPreview: () => n(),
2716
2717
  print: n,
2718
+ openFind: () => e.openFindReplace(),
2719
+ openReplace: () => e.openFindReplace(),
2717
2720
  loadDocument: (t) => e.editor.loadDocument(t),
2718
2721
  loadDocumentBuffer: (t) => e.editor.loadDocx(t),
2719
2722
  ensureEditorView: () => e.editor.ensureView(),
@@ -2756,7 +2759,7 @@ function uo(e) {
2756
2759
  createCommentId: (t) => e.createAIEditComment(t, i),
2757
2760
  createUndoHandle: () => ({
2758
2761
  type: "documentOperationUndo",
2759
- id: `vue-${String(co++)}`
2762
+ id: `vue-${String(lo++)}`
2760
2763
  })
2761
2764
  });
2762
2765
  return l.undoHandle !== null && t.push({
@@ -2898,7 +2901,7 @@ function uo(e) {
2898
2901
  },
2899
2902
  rejectSuggestion: (t) => {
2900
2903
  let n = e.editorView.value;
2901
- return n ? yn(t)(n.state, n.dispatch) : !1;
2904
+ return n ? Q(t)(n.state, n.dispatch) : !1;
2902
2905
  },
2903
2906
  scrollToSuggestion: (t) => {
2904
2907
  let n = e.editorView.value;
@@ -2937,7 +2940,7 @@ function uo(e) {
2937
2940
  snapshot: n
2938
2941
  });
2939
2942
  if (a === null) return null;
2940
- let o = bn(i, a.from);
2943
+ let o = $(i, a.from);
2941
2944
  return o == null ? null : o + 1;
2942
2945
  },
2943
2946
  getBlockRect: p,
@@ -2982,7 +2985,7 @@ function uo(e) {
2982
2985
  }
2983
2986
  //#endregion
2984
2987
  //#region src/composables/useFormattingActions.ts
2985
- function fo(e) {
2988
+ function po(e) {
2986
2989
  let t = () => e.activeView?.value ?? e.editorView.value;
2987
2990
  function n() {
2988
2991
  let e = t();
@@ -3029,10 +3032,10 @@ function fo(e) {
3029
3032
  }
3030
3033
  //#endregion
3031
3034
  //#region src/utils/fontFaces.ts
3032
- function po() {
3035
+ function mo() {
3033
3036
  return typeof document > "u" || !("fonts" in document) ? null : document.fonts;
3034
3037
  }
3035
- async function mo(e, t, n, r) {
3038
+ async function ho(e, t, n, r) {
3036
3039
  let i;
3037
3040
  try {
3038
3041
  i = new FontFace(t, n, r), e.add(i);
@@ -3041,27 +3044,27 @@ async function mo(e, t, n, r) {
3041
3044
  }
3042
3045
  return await i.load().then(() => !0, () => !1) ? i : (e.delete(i), null);
3043
3046
  }
3044
- function ho(e) {
3045
- let t = po();
3047
+ function go(e) {
3048
+ let t = mo();
3046
3049
  if (t) for (let n of e) t.delete(n);
3047
3050
  }
3048
3051
  //#endregion
3049
3052
  //#region src/utils/embeddedFonts.ts
3050
- var go = {
3053
+ var _o = {
3051
3054
  faces: [],
3052
3055
  familyMap: /* @__PURE__ */ new Map()
3053
3056
  };
3054
- async function _o(e) {
3055
- let t = po();
3056
- if (!t) return go;
3057
+ async function vo(e) {
3058
+ let t = mo();
3059
+ if (!t) return _o;
3057
3060
  let n;
3058
3061
  try {
3059
3062
  n = await wr(e);
3060
3063
  } catch {
3061
- return go;
3064
+ return _o;
3062
3065
  }
3063
3066
  return {
3064
- faces: (await Promise.all(n.map((e) => mo(t, e.family, e.bytes, {
3067
+ faces: (await Promise.all(n.map((e) => ho(t, e.family, e.bytes, {
3065
3068
  weight: String(e.weight),
3066
3069
  style: e.style
3067
3070
  })))).filter((e) => e !== null),
@@ -3070,17 +3073,17 @@ async function _o(e) {
3070
3073
  }
3071
3074
  //#endregion
3072
3075
  //#region src/utils/hostFonts.ts
3073
- function vo(e) {
3074
- return typeof e == "string" && e.trim().length > 0;
3075
- }
3076
3076
  function yo(e) {
3077
- return typeof e != "object" || !e ? !1 : vo(Reflect.get(e, "family")) && vo(Reflect.get(e, "src"));
3077
+ return typeof e == "string" && e.trim().length > 0;
3078
3078
  }
3079
3079
  function bo(e) {
3080
+ return typeof e != "object" || !e ? !1 : yo(Reflect.get(e, "family")) && yo(Reflect.get(e, "src"));
3081
+ }
3082
+ function xo(e) {
3080
3083
  if (!e) return [];
3081
3084
  let t = [];
3082
3085
  for (let n of e) {
3083
- if (!yo(n)) continue;
3086
+ if (!bo(n)) continue;
3084
3087
  let e = { display: "swap" };
3085
3088
  (typeof n.weight == "number" || typeof n.weight == "string") && (e.weight = String(n.weight)), t.push({
3086
3089
  family: n.family.trim(),
@@ -3090,20 +3093,20 @@ function bo(e) {
3090
3093
  }
3091
3094
  return t;
3092
3095
  }
3093
- async function xo(e) {
3094
- let t = po();
3096
+ async function So(e) {
3097
+ let t = mo();
3095
3098
  if (!t) return [];
3096
- let n = bo(e);
3097
- return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => mo(t, e, n, r)))).filter((e) => e !== null);
3099
+ let n = xo(e);
3100
+ return n.length === 0 ? [] : (await Promise.all(n.map(({ family: e, source: n, descriptors: r }) => ho(t, e, n, r)))).filter((e) => e !== null);
3098
3101
  }
3099
3102
  //#endregion
3100
3103
  //#region src/composables/useFontLifecycle.ts
3101
- var So = {
3102
- loadEmbedded: _o,
3103
- loadHost: xo,
3104
- remove: ho
3104
+ var Co = {
3105
+ loadEmbedded: vo,
3106
+ loadHost: So,
3107
+ remove: go
3105
3108
  };
3106
- function Co(e, t = So) {
3109
+ function wo(e, t = Co) {
3107
3110
  K(() => e.isReady.value ? e.getDocument()?.originalBuffer ?? null : null, (n, r, i) => {
3108
3111
  if (!n) return;
3109
3112
  let a = !1, o = [];
@@ -3132,7 +3135,7 @@ function Co(e, t = So) {
3132
3135
  }
3133
3136
  //#endregion
3134
3137
  //#region src/composables/useHyperlinkManagement.ts
3135
- function wo(e) {
3138
+ function To(e) {
3136
3139
  let t = H(null);
3137
3140
  function n(e, t) {
3138
3141
  t(e.state, (t) => e.dispatch(t), e);
@@ -3184,7 +3187,7 @@ function wo(e) {
3184
3187
  }
3185
3188
  //#endregion
3186
3189
  //#region src/composables/useImageActions.ts
3187
- function To(e) {
3190
+ function Eo(e) {
3188
3191
  let t = Ne(null), n = H(!1), r = A(() => {
3189
3192
  e.stateTick.value;
3190
3193
  let n = e.editorView.value, r = t.value;
@@ -3234,9 +3237,12 @@ function To(e) {
3234
3237
  }
3235
3238
  //#endregion
3236
3239
  //#region src/composables/useKeyboardShortcuts.ts
3237
- function Eo(e) {
3240
+ function Do(e) {
3238
3241
  function t(t) {
3239
- if (e.handleZoomKeyDown(t), t.ctrlKey || t.metaKey) {
3242
+ if (Or(t, {
3243
+ scope: e.scope(),
3244
+ roots: e.roots.map((e) => e.value)
3245
+ }) && (e.handleZoomKeyDown(t), t.ctrlKey || t.metaKey)) {
3240
3246
  if (t.key === "o") {
3241
3247
  if (!e.showFileOpen?.() || !e.onOpenDocument) return;
3242
3248
  t.preventDefault(), e.onOpenDocument();
@@ -3249,10 +3255,10 @@ function Eo(e) {
3249
3255
  }
3250
3256
  //#endregion
3251
3257
  //#region src/composables/useOutlineSidebar.ts
3252
- function Do(e) {
3258
+ function Oo(e) {
3253
3259
  function t() {
3254
3260
  let t = e.editorView.value;
3255
- t && (e.outlineHeadings.value = Or(t.state.doc));
3261
+ t && (e.outlineHeadings.value = kr(t.state.doc));
3256
3262
  }
3257
3263
  function n() {
3258
3264
  e.showOutline.value || t(), e.showOutline.value = !e.showOutline.value;
@@ -3283,7 +3289,7 @@ function Do(e) {
3283
3289
  }
3284
3290
  //#endregion
3285
3291
  //#region src/composables/usePageSetupControls.ts
3286
- function Oo(e) {
3292
+ function ko(e) {
3287
3293
  function t(t) {
3288
3294
  if (e.readOnly.value) return;
3289
3295
  let n = e.getDocument();
@@ -3339,34 +3345,34 @@ function Oo(e) {
3339
3345
  }
3340
3346
  //#endregion
3341
3347
  //#region src/utils/textSelection.ts
3342
- var ko = /[\p{L}\p{N}\p{M}_''-]/u, Ao = /\s/;
3343
- function jo(e) {
3344
- return !e || e.length === 0 ? !1 : ko.test(e);
3345
- }
3348
+ var Ao = /[\p{L}\p{N}\p{M}_''-]/u, jo = /\s/;
3346
3349
  function Mo(e) {
3347
3350
  return !e || e.length === 0 ? !1 : Ao.test(e);
3348
3351
  }
3349
- function No(e, t) {
3352
+ function No(e) {
3353
+ return !e || e.length === 0 ? !1 : jo.test(e);
3354
+ }
3355
+ function Po(e, t) {
3350
3356
  if (!e || e.length === 0) return [0, 0];
3351
3357
  t = Math.max(0, Math.min(t, e.length - 1));
3352
3358
  let n = e[t];
3353
- if (Mo(n)) {
3359
+ if (No(n)) {
3354
3360
  let n = t, r = t;
3355
- for (; n > 0 && Mo(e[n - 1]);) n--;
3356
- for (; r < e.length && Mo(e[r]);) r++;
3361
+ for (; n > 0 && No(e[n - 1]);) n--;
3362
+ for (; r < e.length && No(e[r]);) r++;
3357
3363
  return [n, r];
3358
3364
  }
3359
- if (jo(n)) {
3365
+ if (Mo(n)) {
3360
3366
  let n = t, r = t;
3361
- for (; n > 0 && jo(e[n - 1]);) n--;
3362
- for (; r < e.length && jo(e[r]);) r++;
3367
+ for (; n > 0 && Mo(e[n - 1]);) n--;
3368
+ for (; r < e.length && Mo(e[r]);) r++;
3363
3369
  return [n, r];
3364
3370
  }
3365
3371
  return [t, t + 1];
3366
3372
  }
3367
3373
  //#endregion
3368
3374
  //#region src/utils/domQueries.ts
3369
- function Po(e, t, n) {
3375
+ function Fo(e, t, n) {
3370
3376
  let r = n ? Array.from(e.querySelectorAll(`.layout-page-${n} span[data-pm-start][data-pm-end]`)) : Yt(e);
3371
3377
  for (let e of r) {
3372
3378
  let n = Number(e.dataset.pmStart), r = Number(e.dataset.pmEnd);
@@ -3374,7 +3380,7 @@ function Po(e, t, n) {
3374
3380
  }
3375
3381
  return null;
3376
3382
  }
3377
- function Fo(e, t, n) {
3383
+ function Io(e, t, n) {
3378
3384
  if (!e || !t) return;
3379
3385
  let r = Jt(e, n);
3380
3386
  if (!r) for (let t of Yt(e)) {
@@ -3391,21 +3397,21 @@ function Fo(e, t, n) {
3391
3397
  behavior: "smooth"
3392
3398
  });
3393
3399
  }
3394
- function Io(e, t, n, r) {
3400
+ function Lo(e, t, n, r) {
3395
3401
  if (!e || !t) return null;
3396
3402
  let i = Vt(e, n, r, 1);
3397
3403
  return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
3398
3404
  }
3399
- function Lo(e, t, n, r) {
3405
+ function Ro(e, t, n, r) {
3400
3406
  if (!e) return;
3401
- let i = Po(e, t, r);
3407
+ let i = Fo(e, t, r);
3402
3408
  if (!i) return;
3403
- let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = No(a, t - o), l = o + s, u = o + c;
3409
+ let a = i.textContent ?? "", o = Number(i.dataset.pmStart) || 0, [s, c] = Po(a, t - o), l = o + s, u = o + c;
3404
3410
  l < u && n(l, u);
3405
3411
  }
3406
- function Ro(e, t, n, r) {
3412
+ function zo(e, t, n, r) {
3407
3413
  if (!e) return;
3408
- let i = Po(e, t, r);
3414
+ let i = Fo(e, t, r);
3409
3415
  if (!i) return;
3410
3416
  let a = i.closest(".layout-paragraph");
3411
3417
  if (!a) return;
@@ -3414,13 +3420,13 @@ function Ro(e, t, n, r) {
3414
3420
  }
3415
3421
  //#endregion
3416
3422
  //#region src/composables/usePagesPointer.ts
3417
- var zo = 500;
3418
- function Bo(e) {
3423
+ var Bo = 500;
3424
+ function Vo(e) {
3419
3425
  let t = H(null), n = null;
3420
3426
  function r() {
3421
3427
  n !== null && (clearTimeout(n), n = null);
3422
3428
  }
3423
- let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u = Nr(), d = S({
3429
+ let i = Ne(null), a = 0, o = null, s = 0, c = !1, l = null, u = Pr(), d = S({
3424
3430
  pagesContainer: e.pagesRef,
3425
3431
  onScrollExtendSelection: (e, t) => {
3426
3432
  if (!c || l === null) return;
@@ -3433,7 +3439,7 @@ function Bo(e) {
3433
3439
  visible: !1
3434
3440
  }), p = null;
3435
3441
  function m(t, n) {
3436
- return Io(e.pagesRef.value, e.editorView.value, t, n);
3442
+ return Lo(e.pagesRef.value, e.editorView.value, t, n);
3437
3443
  }
3438
3444
  function h() {
3439
3445
  let t = i.value;
@@ -3446,7 +3452,7 @@ function Bo(e) {
3446
3452
  function g(t, n) {
3447
3453
  let r = i.value, a = e.pagesRef.value, o = h();
3448
3454
  if (r?.rId && a && o !== e.editorView.value) {
3449
- let e = kr(a, r.position, r.rId, t, n);
3455
+ let e = Ar(a, r.position, r.rId, t, n);
3450
3456
  return e === null || e < 0 ? null : Math.min(e, o?.state.doc.content.size ?? e);
3451
3457
  }
3452
3458
  return m(t, n);
@@ -3459,13 +3465,13 @@ function Bo(e) {
3459
3465
  } catch {}
3460
3466
  }
3461
3467
  function v(t) {
3462
- Fo(e.pagesRef.value, e.pagesViewportRef.value, t);
3468
+ Io(e.pagesRef.value, e.pagesViewportRef.value, t);
3463
3469
  }
3464
3470
  function y(t) {
3465
- Lo(e.pagesRef.value, t, _, i.value?.position);
3471
+ Ro(e.pagesRef.value, t, _, i.value?.position);
3466
3472
  }
3467
3473
  function b(t) {
3468
- Ro(e.pagesRef.value, t, _, i.value?.position);
3474
+ zo(e.pagesRef.value, t, _, i.value?.position);
3469
3475
  }
3470
3476
  function x(t) {
3471
3477
  let n = e.editorView.value;
@@ -3494,7 +3500,7 @@ function Bo(e) {
3494
3500
  if (!o) return;
3495
3501
  let s = e.pagesViewportRef.value;
3496
3502
  if (!s || !(a.target instanceof HTMLElement) || a.target.closest(".docx-editor-vue__note-editor")) return;
3497
- let l = Mr({
3503
+ let l = Nr({
3498
3504
  mouseX: a.clientX,
3499
3505
  mouseY: a.clientY,
3500
3506
  pagesContainer: o,
@@ -3504,7 +3510,7 @@ function Bo(e) {
3504
3510
  if (!l) {
3505
3511
  n === null && (n = setTimeout(() => {
3506
3512
  t.value = null, n = null;
3507
- }, jr));
3513
+ }, Mr));
3508
3514
  return;
3509
3515
  }
3510
3516
  let u = e.zoom.value || 1, d = s.getBoundingClientRect();
@@ -3555,7 +3561,7 @@ function Bo(e) {
3555
3561
  if (e.readOnly.value || !(t.target instanceof HTMLElement)) return;
3556
3562
  let n = t.target;
3557
3563
  if (n.closest(".docx-editor-vue__note-editor")) return;
3558
- let r = Ar(n);
3564
+ let r = jr(n);
3559
3565
  if (r) {
3560
3566
  t.preventDefault(), t.stopPropagation(), i.value && ie(), e.openNoteStory(r);
3561
3567
  return;
@@ -3589,7 +3595,7 @@ function Bo(e) {
3589
3595
  }, requestAnimationFrame(() => {
3590
3596
  let n = e.getHfPmView(h);
3591
3597
  if (!n) return;
3592
- let r = kr(e.pagesRef.value ?? s, c, h, t.clientX, t.clientY);
3598
+ let r = Ar(e.pagesRef.value ?? s, c, h, t.clientX, t.clientY);
3593
3599
  if (r !== null) {
3594
3600
  let e = Math.max(0, Math.min(r, n.state.doc.content.size));
3595
3601
  n.dispatch(n.state.tr.setSelection(Z.create(n.state.doc, e)));
@@ -3678,12 +3684,12 @@ function Bo(e) {
3678
3684
  return;
3679
3685
  }
3680
3686
  let v = Date.now();
3681
- if (v - a < zo && o === m ? s++ : s = 1, a = v, o = m, s === 2) y(m);
3687
+ if (v - a < Bo && o === m ? s++ : s = 1, a = v, o = m, s === 2) y(m);
3682
3688
  else if (s >= 3) b(m), s = 0;
3683
3689
  else if (t.shiftKey) {
3684
3690
  let { from: e } = f.state.selection;
3685
3691
  _(e, m);
3686
- } else _(m), l = m, c = !0, u.begin(Pr(f, m));
3692
+ } else _(m), l = m, c = !0, u.begin(Fr(f, m));
3687
3693
  f.focus();
3688
3694
  }
3689
3695
  function oe(e) {
@@ -3751,8 +3757,8 @@ function Bo(e) {
3751
3757
  }
3752
3758
  //#endregion
3753
3759
  //#region src/composables/useRemoteSelectionSync.ts
3754
- var Vo = (e) => {
3755
- let t = new Fr(), n = null, r = () => {
3760
+ var Ho = (e) => {
3761
+ let t = new Ir(), n = null, r = () => {
3756
3762
  n !== null && (cancelAnimationFrame(n), n = null);
3757
3763
  let r = e.pagesRef.value;
3758
3764
  r && t.clear(r);
@@ -3775,8 +3781,8 @@ var Vo = (e) => {
3775
3781
  ], i, { flush: "post" }), Ae(() => {
3776
3782
  a(), r();
3777
3783
  });
3778
- }, Ho = (e) => {
3779
- let t = new Ir(), n = null, r = () => {
3784
+ }, Uo = (e) => {
3785
+ let t = new Lr(), n = null, r = () => {
3780
3786
  n !== null && (cancelAnimationFrame(n), n = null);
3781
3787
  let r = e.pagesRef.value;
3782
3788
  r && t.clear(r);
@@ -3827,22 +3833,22 @@ var Vo = (e) => {
3827
3833
  clearOverlay: r,
3828
3834
  updateSelectionOverlay: i
3829
3835
  };
3830
- }, Uo = { class: "docx-editor-vue__toolbar-shell" }, Wo = {
3836
+ }, Wo = { class: "docx-editor-vue__toolbar-shell" }, Go = {
3831
3837
  key: 0,
3832
3838
  class: "docx-editor-vue__error"
3833
- }, Go = {
3839
+ }, Ko = {
3834
3840
  key: 1,
3835
3841
  class: "docx-editor-vue__loading"
3836
- }, Ko = {
3842
+ }, qo = {
3837
3843
  key: 2,
3838
3844
  class: "docx-editor-vue__placeholder"
3839
- }, qo = { class: "docx-editor-vue__editor-area" }, Jo = {
3845
+ }, Jo = { class: "docx-editor-vue__editor-area" }, Yo = {
3840
3846
  key: 0,
3841
3847
  class: "docx-editor-vue__ruler-h"
3842
- }, Yo = {
3848
+ }, Xo = {
3843
3849
  key: 1,
3844
3850
  class: "docx-editor-vue__ruler-v"
3845
- }, Xo = {
3851
+ }, Zo = {
3846
3852
  class: "docx-editor-vue__editor-content-wrapper",
3847
3853
  style: {
3848
3854
  position: "relative",
@@ -3850,11 +3856,11 @@ var Vo = (e) => {
3850
3856
  flexDirection: "column",
3851
3857
  minHeight: "100%"
3852
3858
  }
3853
- }, Zo = {
3859
+ }, Qo = {
3854
3860
  "data-testid": "selection-overlay",
3855
3861
  class: "docx-editor-vue__decoration-origin",
3856
3862
  "aria-hidden": "true"
3857
- }, Qo = ["aria-label"], $o = { class: "docx-editor-vue__note-editor-header" }, es = ["aria-label"], ts = ["aria-label"], ns = /*#__PURE__*/ t(/* @__PURE__ */ I({
3863
+ }, $o = ["aria-label"], es = { class: "docx-editor-vue__note-editor-header" }, ts = ["aria-label"], ns = ["aria-label"], rs = /*#__PURE__*/ t(/* @__PURE__ */ I({
3858
3864
  __name: "DocxEditor",
3859
3865
  props: {
3860
3866
  documentBuffer: { default: null },
@@ -3886,12 +3892,14 @@ var Vo = (e) => {
3886
3892
  type: Boolean,
3887
3893
  default: !0
3888
3894
  },
3895
+ pageRenderer: {},
3889
3896
  showMarginGuides: { type: Boolean },
3890
3897
  marginGuideColor: {},
3891
3898
  showRuler: { type: Boolean },
3892
3899
  rulerUnit: {},
3893
3900
  initialZoom: { default: 1 },
3894
3901
  enableWheelZoom: { type: Boolean },
3902
+ keyboardShortcuts: {},
3895
3903
  readOnly: {
3896
3904
  type: Boolean,
3897
3905
  default: !1
@@ -3977,14 +3985,14 @@ var Vo = (e) => {
3977
3985
  setup(e, { expose: t, emit: n }) {
3978
3986
  let o = e, s = n;
3979
3987
  a(o.components);
3980
- let c = de();
3981
- yi(c);
3988
+ let c = ue();
3989
+ bi(c);
3982
3990
  function l(e) {
3983
3991
  o.onChange?.(e), s("change", e), s("update:document", e);
3984
3992
  }
3985
3993
  let u = H(o.mode), d = A(() => o.readOnly || u.value === "viewing"), f = A(() => o.showReviewControls), p = A(() => zt(u.value)), m = H("all-markup");
3986
3994
  function h() {
3987
- Kn(Bt(u.value));
3995
+ qn(Bt(u.value));
3988
3996
  }
3989
3997
  function _(e) {
3990
3998
  m.value = e;
@@ -3995,24 +4003,27 @@ var Vo = (e) => {
3995
4003
  K(re, (e) => {
3996
4004
  e || (ae.value = !1);
3997
4005
  });
3998
- 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);
3999
- function Ke(e) {
4000
- o.enableWheelZoom !== !1 && Ve(e);
4006
+ let S = H(null), C = H(null), w = H(null), T = H(null), de = H(null), fe = H(null), pe = H(null), me = A(() => o.showRuler ?? !1), E = H(0), he = H(!1), D = H(!1), ge = H(!1), _e = H(!1), ve = H(!1), ye = H(!1), be = H(!1), xe = H(o.showOutline), k = H(!1), Se = H(null), we = H(null), I = H(null), Ee = Ne([]), De = Ne([]), { zoom: L, zoomPercent: Ae, isMinZoom: je, isMaxZoom: U, setZoom: Pe, zoomIn: ze, zoomOut: Ve, handleWheel: He, handleKeyDown: We, ZOOM_PRESETS: Ke } = le(o.initialZoom);
4007
+ function Je(e) {
4008
+ o.enableWheelZoom !== !1 && He(e);
4001
4009
  }
4002
- Eo({
4010
+ Do({
4003
4011
  showFindReplace: he,
4004
- showHyperlink: ge,
4005
- handleZoomKeyDown: He
4012
+ showHyperlink: D,
4013
+ handleZoomKeyDown: We,
4014
+ scope: () => o.keyboardShortcuts ?? "document",
4015
+ roots: [S]
4006
4016
  });
4007
- let { editor: Je, editorView: J, editorState: at, remoteSelections: st, headerFooterSelection: lt, activeNoteStory: ut, isReady: dt, isDirty: ft, parseError: pt, layout: mt, blocks: ht, measures: gt, syncCoordinator: _t, loadBuffer: vt, loadDocument: yt, save: bt, getDocument: Y, setDocument: xt, getHeaderFooterView: St, syncHeaderFooterViews: Ct, openNoteStory: wt, closeNoteStory: Tt, getActiveNoteView: Et, getCommands: Dt, reLayout: Ot } = se({
4008
- hiddenContainer: S,
4009
- hiddenHeaderFooterContainer: C,
4010
- noteEditorContainer: we,
4011
- pagesContainer: w,
4017
+ let { editor: Xe, editorView: J, editorState: st, remoteSelections: lt, headerFooterSelection: ut, activeNoteStory: dt, isReady: ft, isDirty: pt, parseError: mt, layout: ht, blocks: gt, measures: _t, syncCoordinator: vt, loadBuffer: yt, loadDocument: bt, save: xt, getDocument: Y, setDocument: St, getHeaderFooterView: Ct, syncHeaderFooterViews: wt, openNoteStory: Tt, closeNoteStory: Et, getActiveNoteView: Dt, getCommands: Ot, reLayout: kt } = se({
4018
+ hiddenContainer: C,
4019
+ hiddenHeaderFooterContainer: w,
4020
+ noteEditorContainer: I,
4021
+ pagesContainer: T,
4012
4022
  readOnly: d,
4013
4023
  editorMode: u,
4014
4024
  author: () => o.author,
4015
4025
  password: () => o.password,
4026
+ pageRenderer: () => o.pageRenderer,
4016
4027
  showMarginGuides: () => o.showMarginGuides,
4017
4028
  marginGuideColor: () => o.marginGuideColor,
4018
4029
  externalPlugins: [],
@@ -4043,110 +4054,110 @@ var Vo = (e) => {
4043
4054
  featureFlags: () => o.featureFlags,
4044
4055
  onSelectiveSaveTripwire: o.onSelectiveSaveTripwire ? (e) => o.onSelectiveSaveTripwire?.(e) : void 0
4045
4056
  });
4046
- K(at, (e, t) => {
4057
+ K(st, (e, t) => {
4047
4058
  pe.value !== null && e && t && !e.doc.eq(t.doc) && (pe.value = null);
4048
4059
  });
4049
- let X = A(() => et({
4060
+ let X = A(() => tt({
4050
4061
  bodyView: J.value,
4051
- headerFooterView: Se.value ? St(Se.value) : null,
4052
- noteView: Et()
4053
- }).view), kt = A(() => {
4054
- let e = ut.value;
4062
+ headerFooterView: we.value ? Ct(we.value) : null,
4063
+ noteView: Dt()
4064
+ }).view), At = A(() => {
4065
+ let e = dt.value;
4055
4066
  return e ? ee(e.kind === "footnote" ? "dialogs.footnoteProperties.footnotes" : "dialogs.footnoteProperties.endnotes") : "";
4056
- }), At = A(() => !dt.value && re.value && !(o.preserveDocumentWhileLoading === !0 && ae.value));
4057
- function jt() {
4058
- J.value && (nt(), tt(), Ot());
4067
+ }), jt = A(() => !ft.value && re.value && !(o.preserveDocumentWhileLoading === !0 && ae.value));
4068
+ function Z() {
4069
+ J.value && (rt(), nt(), kt());
4059
4070
  }
4060
- Co({
4061
- isReady: dt,
4071
+ wo({
4072
+ isReady: ft,
4062
4073
  getDocument: Y,
4063
4074
  fonts: () => o.fonts,
4064
- remeasure: jt
4075
+ remeasure: Z
4065
4076
  });
4066
- let { selectedImage: Z, imageInteracting: Mt, imageToolbarContext: Nt, handleToolbarImageWrap: Pt, handleImageTransform: Ft } = To({
4077
+ let { selectedImage: Mt, imageInteracting: Nt, imageToolbarContext: Pt, handleToolbarImageWrap: Ft, handleImageTransform: It } = Eo({
4067
4078
  editorView: X,
4068
4079
  zoom: L,
4069
- stateTick: T,
4070
- getCommands: Dt
4071
- }), It = Ho({
4080
+ stateTick: E,
4081
+ getCommands: Ot
4082
+ }), Lt = Uo({
4072
4083
  editorView: J,
4073
- hiddenContainer: S,
4074
- pagesRef: w,
4084
+ hiddenContainer: C,
4085
+ pagesRef: T,
4075
4086
  zoom: L,
4076
- selectedImage: Z,
4077
- syncCoordinator: _t,
4078
- imageInteracting: Mt
4087
+ selectedImage: Mt,
4088
+ syncCoordinator: vt,
4089
+ imageInteracting: Nt
4079
4090
  });
4080
- Vo({
4081
- pagesRef: w,
4082
- remoteSelections: st,
4083
- syncCoordinator: _t,
4091
+ Ho({
4092
+ pagesRef: T,
4093
+ remoteSelections: lt,
4094
+ syncCoordinator: vt,
4084
4095
  zoom: L
4085
4096
  });
4086
- let { hyperlinkPopupData: Lt, handleHyperlinkSubmit: Rt, handleHyperlinkRemove: Vt, handleHyperlinkPopupNavigate: Ht, handleHyperlinkPopupEdit: Ut, handleHyperlinkPopupRemove: Wt } = wo({
4097
+ let { hyperlinkPopupData: Rt, handleHyperlinkSubmit: Vt, handleHyperlinkRemove: Ht, handleHyperlinkPopupNavigate: Ut, handleHyperlinkPopupEdit: Wt, handleHyperlinkPopupRemove: Gt } = To({
4087
4098
  editorView: X,
4088
- getCommands: Dt
4089
- }), Gt = oe(), { tableInsertButton: Kt, hfEdit: qt, scrollPageInfo: Jt, resolvePos: Yt, setPmSelection: Xt, scrollVisiblePositionIntoView: Zt, handlePagesMouseDown: Qt, handlePagesMouseMove: $t, handlePagesClick: en, handlePagesDoubleClick: tn, handleTableInsertClick: nn, handleHfSave: rn, handleHfRemove: an } = Bo({
4099
+ getCommands: Ot
4100
+ }), Kt = oe(), { tableInsertButton: qt, hfEdit: Jt, scrollPageInfo: Yt, resolvePos: Xt, setPmSelection: Zt, scrollVisiblePositionIntoView: Qt, handlePagesMouseDown: $t, handlePagesMouseMove: en, handlePagesClick: tn, handlePagesDoubleClick: nn, handleTableInsertClick: rn, handleHfSave: an, handleHfRemove: on } = Vo({
4090
4101
  editorView: J,
4091
- pagesRef: w,
4092
- pagesViewportRef: le,
4093
- selectedImage: Z,
4094
- imageInteracting: Mt,
4095
- hyperlinkPopupData: Lt,
4102
+ pagesRef: T,
4103
+ pagesViewportRef: de,
4104
+ selectedImage: Mt,
4105
+ imageInteracting: Nt,
4106
+ hyperlinkPopupData: Rt,
4096
4107
  readOnly: d,
4097
4108
  showHeaderFooterEditing: A(() => o.showHeaderFooterEditing),
4098
4109
  zoom: L,
4099
- layout: mt,
4110
+ layout: ht,
4100
4111
  tableResize: {
4101
- tryStartResize: Gt.tryStartResize,
4102
- isResizing: A(() => Gt.isResizing())
4112
+ tryStartResize: Kt.tryStartResize,
4113
+ isResizing: A(() => Kt.isResizing())
4103
4114
  },
4104
- getCommands: Dt,
4115
+ getCommands: Ot,
4105
4116
  getDocument: Y,
4106
- getHfPmView: St,
4107
- syncHfPMs: Ct,
4108
- setDocument: xt,
4117
+ getHfPmView: Ct,
4118
+ syncHfPMs: wt,
4119
+ setDocument: St,
4109
4120
  openNoteStory: (e) => {
4110
- wt(e), It.clearOverlay();
4121
+ Tt(e), Lt.clearOverlay();
4111
4122
  },
4112
- closeNoteStory: Tt,
4113
- getActiveNoteView: Et,
4114
- reLayout: Ot,
4123
+ closeNoteStory: Et,
4124
+ getActiveNoteView: Dt,
4125
+ reLayout: kt,
4115
4126
  onDocumentChange: l,
4116
- clearOverlay: It.clearOverlay
4117
- }), on = () => qt.value?.rId ? St(qt.value.rId) : null, sn = A(() => {
4118
- let e = qt.value, t = lt.value;
4127
+ clearOverlay: Lt.clearOverlay
4128
+ }), sn = () => Jt.value?.rId ? Ct(Jt.value.rId) : null, cn = A(() => {
4129
+ let e = Jt.value, t = ut.value;
4119
4130
  return !e?.rId || !t || t.rId !== e.rId ? null : {
4120
4131
  ...t,
4121
4132
  pageNumber: e.pageNumber
4122
4133
  };
4123
4134
  });
4124
- K(qt, (e) => {
4125
- Se.value = e?.rId ?? null, e && It.clearOverlay();
4135
+ K(Jt, (e) => {
4136
+ we.value = e?.rId ?? null, e && Lt.clearOverlay();
4126
4137
  }, { immediate: !0 });
4127
- let cn = Do({
4138
+ let ln = Oo({
4128
4139
  editorView: J,
4129
4140
  showOutline: xe,
4130
- showSidebar: D,
4131
- outlineHeadings: Ee,
4132
- activeSidebarItem: k,
4141
+ showSidebar: k,
4142
+ outlineHeadings: De,
4143
+ activeSidebarItem: Se,
4133
4144
  extractCommentsAndChanges: () => {},
4134
- scrollToVisiblePosition: Zt
4135
- }), { contextMenu: ln, imageContextMenu: un, imageContextMenuTextActions: dn, customTextMenuItems: fn, handleContextMenu: pn, handleSelectedImageContextMenu: mn, handleImageWrapSelect: hn, handleContextMenuAction: gn } = oo({
4145
+ scrollToVisiblePosition: Qt
4146
+ }), { contextMenu: un, imageContextMenu: dn, imageContextMenuTextActions: fn, customTextMenuItems: pn, handleContextMenu: mn, handleSelectedImageContextMenu: hn, handleImageWrapSelect: gn, handleContextMenuAction: _n } = so({
4136
4147
  editorView: X,
4137
- selectedImage: Z,
4148
+ selectedImage: Mt,
4138
4149
  zoom: L,
4139
4150
  showImageProperties: _e,
4140
- getCommands: Dt,
4141
- clearOverlay: It.clearOverlay,
4142
- setPmSelection: Xt,
4143
- resolvePos: Yt,
4151
+ getCommands: Ot,
4152
+ clearOverlay: Lt.clearOverlay,
4153
+ setPmSelection: Zt,
4154
+ resolvePos: Xt,
4144
4155
  customContextMenuItems: () => d.value ? void 0 : o.customContextMenuItems,
4145
4156
  onCustomContextAction: (e, t) => o.onCustomContextAction?.(e, t),
4146
4157
  onCopy: () => o.onCopy?.(),
4147
4158
  onCut: () => o.onCut?.(),
4148
4159
  onPaste: () => o.onPaste?.()
4149
- }), _n = ce(J, T), vn = A(() => _n.value.entries), Q = Ja({
4160
+ }), vn = ce(J, E), yn = A(() => vn.value.entries), Q = Ya({
4150
4161
  editorView: J,
4151
4162
  getDocument: Y,
4152
4163
  author: () => o.author,
@@ -4154,56 +4165,56 @@ var Vo = (e) => {
4154
4165
  onCommentsChange: (e) => {
4155
4166
  o.onCommentsChange?.(e), s("comments-change", e);
4156
4167
  },
4157
- reLayout: Ot
4158
- }), yn = Q.comments, $ = qa({
4168
+ reLayout: kt
4169
+ }), bn = Q.comments, $ = Ja({
4159
4170
  editorView: J,
4160
- pagesViewport: le,
4161
- pagesContainer: w,
4171
+ pagesViewport: de,
4172
+ pagesContainer: T,
4162
4173
  readOnly: d,
4163
4174
  createComment: Q.createComment,
4164
4175
  pushComment: Q.pushComment,
4165
- reLayout: Ot,
4166
- showSidebar: D,
4176
+ reLayout: kt,
4177
+ showSidebar: k,
4167
4178
  setActiveSidebarItem: (e) => {
4168
- k.value = e;
4179
+ Se.value = e;
4169
4180
  }
4170
4181
  });
4171
- function bn(e) {
4172
- navigator.clipboard?.writeText(e), Lt.value = null;
4182
+ function xn(e) {
4183
+ navigator.clipboard?.writeText(e), Rt.value = null;
4173
4184
  }
4174
- let xn = A(() => {
4175
- T.value;
4185
+ let Sn = A(() => {
4186
+ E.value;
4176
4187
  let e = Y()?.package.document;
4177
4188
  return e ? e.finalSectionProperties ?? e.sections?.[0]?.properties ?? null : null;
4178
- }), Sn = A(() => {
4179
- T.value;
4189
+ }), Cn = A(() => {
4190
+ E.value;
4180
4191
  let e = Y();
4181
4192
  return e ? ot(e) : void 0;
4182
- }), Cn = A(() => {
4183
- T.value;
4193
+ }), wn = A(() => {
4194
+ E.value;
4184
4195
  let e = X.value;
4185
4196
  if (!e) return {};
4186
- let t = Ze(e.state).table;
4187
- return t ? Xe(t) : {};
4188
- }), wn = A(() => {
4189
- T.value;
4197
+ let t = Qe(e.state).table;
4198
+ return t ? Ze(t) : {};
4199
+ }), Tn = A(() => {
4200
+ E.value;
4190
4201
  let e = {};
4191
4202
  o.fontFamilies !== void 0 && (e.fontFamilies = o.fontFamilies);
4192
4203
  let t = Y()?.package.styles?.styles;
4193
4204
  return t !== void 0 && (e.documentStyles = t), e;
4194
- }), Tn = A(() => it(xn.value?.pageWidth ?? 12240) * L.value), En = A(() => {
4205
+ }), En = A(() => at(Sn.value?.pageWidth ?? 12240) * L.value), Dn = A(() => {
4195
4206
  let e = /* @__PURE__ */ new Set();
4196
- for (let t of yn.value) t.done && e.add(t.id);
4207
+ for (let t of bn.value) t.done && e.add(t.id);
4197
4208
  return e;
4198
- }), Dn = A(() => ({
4209
+ }), On = A(() => ({
4199
4210
  transform: L.value === 1 ? void 0 : `scale(${L.value})`,
4200
4211
  transformOrigin: "top center",
4201
4212
  transition: "transform 0.2s ease"
4202
- })), { handleApplyStyle: On, handleInsertSymbol: kn, handleInsertSectionBreakNextPage: An, handleInsertSectionBreakContinuous: jn } = fo({
4213
+ })), { handleApplyStyle: kn, handleInsertSymbol: An, handleInsertSectionBreakNextPage: jn, handleInsertSectionBreakContinuous: Mn } = po({
4203
4214
  editorView: X,
4204
4215
  getDocument: Y
4205
4216
  });
4206
- function Mn() {
4217
+ function Nn() {
4207
4218
  if (o.onInsertImage) {
4208
4219
  o.onInsertImage();
4209
4220
  return;
@@ -4216,7 +4227,7 @@ var Vo = (e) => {
4216
4227
  n && Ue(e, n, () => e.focus()), t.remove();
4217
4228
  }), document.body.appendChild(t), t.click();
4218
4229
  }
4219
- function Nn(e, t) {
4230
+ function Pn(e, t) {
4220
4231
  if (o.onInsertTable) {
4221
4232
  o.onInsertTable(e, t);
4222
4233
  return;
@@ -4224,7 +4235,7 @@ var Vo = (e) => {
4224
4235
  let n = X.value;
4225
4236
  n && (qe(n, e, t), n.focus());
4226
4237
  }
4227
- function Pn() {
4238
+ function Fn() {
4228
4239
  if (o.onInsertPageBreak) {
4229
4240
  o.onInsertPageBreak();
4230
4241
  return;
@@ -4232,7 +4243,7 @@ var Vo = (e) => {
4232
4243
  let e = J.value;
4233
4244
  e && (Ge(e), e.focus());
4234
4245
  }
4235
- function Fn() {
4246
+ function In() {
4236
4247
  if (o.onInsertTOC) {
4237
4248
  o.onInsertTOC();
4238
4249
  return;
@@ -4240,16 +4251,16 @@ var Vo = (e) => {
4240
4251
  let e = J.value;
4241
4252
  e && (Ye(e), e.focus());
4242
4253
  }
4243
- let { handlePageSetupApply: In, handleLeftMarginChange: Ln, handleRightMarginChange: Rn, handleTopMarginChange: zn, handleBottomMarginChange: Bn, handleIndentLeftChange: Vn, handleIndentRightChange: Hn, handleFirstLineIndentChange: Un, handleTabStopRemove: Wn } = Oo({
4254
+ let { handlePageSetupApply: Ln, handleLeftMarginChange: Rn, handleRightMarginChange: zn, handleTopMarginChange: Bn, handleBottomMarginChange: Vn, handleIndentLeftChange: Hn, handleIndentRightChange: Un, handleFirstLineIndentChange: Wn, handleTabStopRemove: Gn } = ko({
4244
4255
  editorView: J,
4245
4256
  getDocument: Y,
4246
4257
  readOnly: d,
4247
- stateTick: T,
4248
- reLayout: Ot,
4258
+ stateTick: E,
4259
+ reLayout: kt,
4249
4260
  onChange: l
4250
- }), Gn = A(() => {
4251
- T.value;
4252
- let e = X.value, t = e ? Qe(e.state).paragraphFormatting : {};
4261
+ }), Kn = A(() => {
4262
+ E.value;
4263
+ let e = X.value, t = e ? $e(e.state).paragraphFormatting : {};
4253
4264
  return {
4254
4265
  indentLeft: t.indentLeft ?? 0,
4255
4266
  indentRight: t.indentRight ?? 0,
@@ -4258,20 +4269,20 @@ var Vo = (e) => {
4258
4269
  tabs: t.tabs ?? null
4259
4270
  };
4260
4271
  });
4261
- function Kn(e) {
4272
+ function qn(e) {
4262
4273
  u.value !== e && (u.value = e, o.onModeChange?.(e), s("mode-change", e));
4263
4274
  }
4264
- function qn(e) {
4275
+ function Jn(e) {
4265
4276
  switch (e) {
4266
4277
  case "find":
4267
4278
  case "findReplace":
4268
4279
  he.value = !0;
4269
4280
  break;
4270
4281
  case "insertSymbol":
4271
- E.value = !0;
4282
+ ge.value = !0;
4272
4283
  break;
4273
4284
  case "insertHyperlink":
4274
- ge.value = !0;
4285
+ D.value = !0;
4275
4286
  break;
4276
4287
  case "pageSetup":
4277
4288
  ve.value = !0;
@@ -4280,102 +4291,102 @@ var Vo = (e) => {
4280
4291
  d.value || (be.value = !0);
4281
4292
  break;
4282
4293
  case "toggleOutline":
4283
- cn.handleToggleOutline();
4294
+ ln.handleToggleOutline();
4284
4295
  break;
4285
4296
  case "toggleSidebar":
4286
- D.value = !D.value;
4297
+ k.value = !k.value;
4287
4298
  break;
4288
4299
  case "insertImage":
4289
- Mn();
4300
+ Nn();
4290
4301
  break;
4291
4302
  case "insertPageBreak":
4292
- Pn();
4303
+ Fn();
4293
4304
  break;
4294
4305
  case "insertSectionBreakNextPage":
4295
- An();
4306
+ jn();
4296
4307
  break;
4297
4308
  case "insertSectionBreakContinuous":
4298
- jn();
4309
+ Mn();
4299
4310
  break;
4300
4311
  case "insertTOC":
4301
- Fn();
4312
+ In();
4302
4313
  break;
4303
4314
  default: break;
4304
4315
  }
4305
4316
  s("menu-action", e);
4306
4317
  }
4307
- function Jn(e) {
4318
+ function Yn(e) {
4308
4319
  if (d.value) return;
4309
4320
  let t = Y();
4310
4321
  if (!t) return;
4311
4322
  let n = ct(t, e);
4312
- xt(n), ft.value = !0, T.value++, Ot(), l(n);
4323
+ St(n), pt.value = !0, E.value++, kt(), l(n);
4313
4324
  }
4314
- function Yn(e, t) {
4315
- Nn(e, t);
4325
+ function Xn(e, t) {
4326
+ Pn(e, t);
4316
4327
  }
4317
- function Xn(e) {
4318
- let t = X.value, n = Dt().setTableProperties;
4328
+ function Zn(e) {
4329
+ let t = X.value, n = Ot().setTableProperties;
4319
4330
  !t || !n || (n(e)(t.state, (e) => t.dispatch(e), t), t.focus());
4320
4331
  }
4321
- let Zn = H(!1);
4322
- so({
4332
+ let Qn = H(!1);
4333
+ co({
4323
4334
  documentBuffer: () => o.documentBuffer ?? null,
4324
4335
  document: () => o.document ?? null,
4325
- loadDocumentBuffer: vt,
4326
- loadDocument: yt,
4327
- sidebarAutoOpenedRef: Zn
4336
+ loadDocumentBuffer: yt,
4337
+ loadDocument: bt,
4338
+ sidebarAutoOpenedRef: Qn
4328
4339
  }), K(() => o.mode, (e) => {
4329
4340
  e && e !== u.value && (u.value = e);
4330
4341
  }), K(() => o.showOutline, (e) => {
4331
- xe.value = !!e, cn.recomputeHeadingsIfOpen();
4342
+ xe.value = !!e, ln.recomputeHeadingsIfOpen();
4332
4343
  });
4333
- let Qn = H(!1);
4334
- function $n(e) {
4344
+ let $n = H(!1);
4345
+ function er(e) {
4335
4346
  let t = e.currentTarget;
4336
4347
  t instanceof HTMLElement && o.onScrollTopChange?.(t.scrollTop);
4337
4348
  }
4338
- function er() {
4339
- if (o.initialScrollTop === void 0 || Qn.value) return;
4340
- Qn.value = !0;
4349
+ function tr() {
4350
+ if (o.initialScrollTop === void 0 || $n.value) return;
4351
+ $n.value = !0;
4341
4352
  let e = o.initialScrollTop;
4342
4353
  requestAnimationFrame(() => {
4343
4354
  fe.value && (fe.value.scrollTop = e);
4344
4355
  });
4345
4356
  }
4346
- K(dt, (e) => {
4357
+ K(ft, (e) => {
4347
4358
  if (!e) {
4348
- Qn.value = !1;
4359
+ $n.value = !1;
4349
4360
  return;
4350
4361
  }
4351
- ae.value = !0, cn.recomputeHeadingsIfOpen(), Q.seedFromDocument();
4362
+ ae.value = !0, ln.recomputeHeadingsIfOpen(), Q.seedFromDocument();
4352
4363
  let t = Y();
4353
- t && o.onCompatibilityChange?.($e(t)), o.autoOpenReviewSidebar !== !1 && !Zn.value && (yn.value.length > 0 || vn.value.length > 0) && (Zn.value = !0, D.value = !0), er(), s("ready");
4364
+ t && o.onCompatibilityChange?.(et(t)), o.autoOpenReviewSidebar !== !1 && !Qn.value && (bn.value.length > 0 || yn.value.length > 0) && (Qn.value = !0, k.value = !0), tr(), s("ready");
4354
4365
  }), ke(() => {
4355
- let e = Je.on("selectionChange", () => {
4356
- T.value++, $.updateFloatingButton();
4357
- }), t = Je.on("docChange", () => {
4358
- T.value++, cn.recomputeHeadingsIfOpen();
4359
- }), n = Je.on("layoutComplete", () => {
4360
- T.value++;
4361
- }), r = Gt.install(), i = rt(() => o.onFontsLoaded?.());
4366
+ let e = Xe.on("selectionChange", () => {
4367
+ E.value++, $.updateFloatingButton();
4368
+ }), t = Xe.on("docChange", () => {
4369
+ E.value++, ln.recomputeHeadingsIfOpen();
4370
+ }), n = Xe.on("layoutComplete", () => {
4371
+ E.value++;
4372
+ }), r = Kt.install(), i = it(() => o.onFontsLoaded?.());
4362
4373
  B(() => {
4363
4374
  e(), t(), n(), r(), i();
4364
4375
  });
4365
4376
  });
4366
- let { exposed: tr } = uo({
4367
- editor: Je,
4377
+ let { exposed: nr } = fo({
4378
+ editor: Xe,
4368
4379
  editorView: J,
4369
- isDirty: ft,
4380
+ isDirty: pt,
4370
4381
  commentsDirty: Q.commentsDirty,
4371
4382
  clearCommentsDirty: Q.clearCommentsDirty,
4372
- saveDocument: bt,
4373
- layout: mt,
4374
- pagesRef: w,
4375
- pagesViewportRef: le,
4383
+ saveDocument: xt,
4384
+ layout: ht,
4385
+ pagesRef: T,
4386
+ pagesViewportRef: de,
4376
4387
  scrollRootRef: fe,
4377
4388
  zoom: L,
4378
- scrollVisiblePositionIntoView: Zt,
4389
+ scrollVisiblePositionIntoView: Qt,
4379
4390
  setPassageHighlight: (e) => {
4380
4391
  pe.value = e;
4381
4392
  },
@@ -4389,13 +4400,18 @@ var Vo = (e) => {
4389
4400
  focus: () => X.value?.focus(),
4390
4401
  getDocument: Y,
4391
4402
  getActiveView: () => X.value,
4392
- closeNoteStory: Tt,
4393
- getHeaderFooterView: St,
4394
- setZoom: U,
4403
+ closeNoteStory: Et,
4404
+ getHeaderFooterView: Ct,
4405
+ setZoom: Pe,
4406
+ openFindReplace: () => {
4407
+ he.value = !0;
4408
+ },
4395
4409
  onPrint: o.onPrint,
4396
4410
  onSave: o.onSave
4397
4411
  });
4398
- return t(tr), (t, n) => (V(), N("div", {
4412
+ return t(nr), (t, n) => (V(), N("div", {
4413
+ ref_key: "rootRef",
4414
+ ref: S,
4399
4415
  class: R([
4400
4416
  "docx-editor-vue ep-root paged-editor",
4401
4417
  e.className,
@@ -4407,56 +4423,56 @@ var Vo = (e) => {
4407
4423
  ]),
4408
4424
  style: z(e.style)
4409
4425
  }, [
4410
- P("div", Uo, [F(Fi, {
4426
+ P("div", Wo, [F(Ii, {
4411
4427
  "show-table-insert": o.showTableInsert !== !1,
4412
4428
  onRename: n[0] ||= (e) => s("rename", e),
4413
- onMenuAction: qn,
4414
- onInsertTable: Yn
4429
+ onMenuAction: Jn,
4430
+ onInsertTable: Xn
4415
4431
  }, {
4416
4432
  "title-bar-left": Ie(() => [Me(t.$slots, "title-bar-left", {}, void 0, !0)]),
4417
4433
  "title-bar-right": Ie(() => [Me(t.$slots, "title-bar-right", {}, void 0, !0)]),
4418
4434
  _: 3
4419
- }, 8, ["show-table-insert"]), e.showToolbar ? (V(), j(ie, De({
4435
+ }, 8, ["show-table-insert"]), e.showToolbar ? (V(), j(ie, Oe({
4420
4436
  key: 0,
4421
4437
  view: X.value,
4422
- "get-commands": G(Dt),
4423
- "state-tick": T.value,
4424
- "zoom-percent": G(Oe),
4425
- "is-min-zoom": G(Ae),
4426
- "is-max-zoom": G(je),
4427
- "zoom-presets": G(We),
4438
+ "get-commands": G(Ot),
4439
+ "state-tick": E.value,
4440
+ "zoom-percent": G(Ae),
4441
+ "is-min-zoom": G(je),
4442
+ "is-max-zoom": G(U),
4443
+ "zoom-presets": G(Ke),
4428
4444
  "show-zoom-control": e.showZoomControl,
4429
4445
  "editor-mode": u.value,
4430
4446
  "show-review-controls": f.value,
4431
4447
  "track-changes-on": p.value,
4432
4448
  "display-mode": m.value,
4433
4449
  "read-only": d.value,
4434
- "comments-sidebar-open": D.value,
4435
- "image-context": G(Nt),
4450
+ "comments-sidebar-open": k.value,
4451
+ "image-context": G(Pt),
4436
4452
  theme: e.theme ?? null
4437
- }, wn.value, {
4453
+ }, Tn.value, {
4438
4454
  onFindReplace: n[2] ||= (e) => he.value = !0,
4439
- onInsertLink: n[3] ||= (e) => ge.value = !0,
4440
- onInsertSymbol: n[4] ||= (e) => E.value = !0,
4441
- onInsertPageBreak: Pn,
4455
+ onInsertLink: n[3] ||= (e) => D.value = !0,
4456
+ onInsertSymbol: n[4] ||= (e) => ge.value = !0,
4457
+ onInsertPageBreak: Fn,
4442
4458
  onPageSetup: n[5] ||= (e) => ve.value = !0,
4443
- onToggleOutline: G(cn).handleToggleOutline,
4444
- onApplyStyle: G(On),
4445
- onZoomIn: G(Pe),
4446
- onZoomOut: G(ze),
4447
- onZoomSet: G(U),
4448
- onToggleSidebar: n[6] ||= (e) => D.value = !D.value,
4449
- onModeChange: Kn,
4459
+ onToggleOutline: G(ln).handleToggleOutline,
4460
+ onApplyStyle: G(kn),
4461
+ onZoomIn: G(ze),
4462
+ onZoomOut: G(Ve),
4463
+ onZoomSet: G(Pe),
4464
+ onToggleSidebar: n[6] ||= (e) => k.value = !k.value,
4465
+ onModeChange: qn,
4450
4466
  onToggleTrackChanges: h,
4451
4467
  "onUpdate:displayMode": _,
4452
4468
  onImageProperties: n[7] ||= (e) => _e.value = !0,
4453
- onImageWrapType: G(Pt),
4454
- onImageTransform: G(Ft)
4469
+ onImageWrapType: G(Ft),
4470
+ onImageTransform: G(It)
4455
4471
  }), Ce({
4456
4472
  "table-context": Ie(() => [F(y, {
4457
4473
  view: X.value,
4458
- "get-commands": G(Dt),
4459
- "state-tick": T.value,
4474
+ "get-commands": G(Ot),
4475
+ "state-tick": E.value,
4460
4476
  theme: e.theme ?? null,
4461
4477
  onOpenTableProperties: n[1] ||= (e) => ye.value = !0
4462
4478
  }, null, 8, [
@@ -4498,13 +4514,13 @@ var Vo = (e) => {
4498
4514
  "onImageWrapType",
4499
4515
  "onImageTransform"
4500
4516
  ])) : M("", !0)]),
4501
- F(Ai, {
4517
+ F(ji, {
4502
4518
  "show-find-replace": he.value,
4503
4519
  "onUpdate:showFindReplace": n[8] ||= (e) => he.value = e,
4504
- "show-hyperlink": ge.value,
4505
- "onUpdate:showHyperlink": n[9] ||= (e) => ge.value = e,
4506
- "show-insert-symbol": E.value,
4507
- "onUpdate:showInsertSymbol": n[10] ||= (e) => E.value = e,
4520
+ "show-hyperlink": D.value,
4521
+ "onUpdate:showHyperlink": n[9] ||= (e) => D.value = e,
4522
+ "show-insert-symbol": ge.value,
4523
+ "onUpdate:showInsertSymbol": n[10] ||= (e) => ge.value = e,
4508
4524
  "show-image-properties": _e.value,
4509
4525
  "onUpdate:showImageProperties": n[11] ||= (e) => _e.value = e,
4510
4526
  "show-page-setup": ve.value,
@@ -4514,18 +4530,18 @@ var Vo = (e) => {
4514
4530
  "show-watermark": be.value,
4515
4531
  "onUpdate:showWatermark": n[14] ||= (e) => be.value = e,
4516
4532
  view: X.value,
4517
- "scroll-visible-position-into-view": G(Zt),
4518
- bookmarks: I.value,
4519
- "current-watermark": Sn.value,
4520
- "selected-image-pm-pos": G(Z)?.pmPos ?? null,
4521
- "section-properties": xn.value,
4522
- "table-properties": Cn.value,
4523
- onInsertSymbol: G(kn),
4524
- onHyperlinkSubmit: G(Rt),
4525
- onHyperlinkRemove: G(Vt),
4526
- onPageSetupApply: G(In),
4527
- onTablePropertiesApply: Xn,
4528
- onWatermarkApply: Jn
4533
+ "scroll-visible-position-into-view": G(Qt),
4534
+ bookmarks: Ee.value,
4535
+ "current-watermark": Cn.value,
4536
+ "selected-image-pm-pos": G(Mt)?.pmPos ?? null,
4537
+ "section-properties": Sn.value,
4538
+ "table-properties": wn.value,
4539
+ onInsertSymbol: G(An),
4540
+ onHyperlinkSubmit: G(Vt),
4541
+ onHyperlinkRemove: G(Ht),
4542
+ onPageSetupApply: G(Ln),
4543
+ onTablePropertiesApply: Zn,
4544
+ onWatermarkApply: Yn
4529
4545
  }, null, 8, [
4530
4546
  "show-find-replace",
4531
4547
  "show-hyperlink",
@@ -4546,46 +4562,46 @@ var Vo = (e) => {
4546
4562
  "onHyperlinkRemove",
4547
4563
  "onPageSetupApply"
4548
4564
  ]),
4549
- G(pt) ? (V(), N("div", Wo, W(G(pt)), 1)) : At.value ? (V(), N("div", Go, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(te, {
4565
+ G(mt) ? (V(), N("div", Go, W(G(mt)), 1)) : jt.value ? (V(), N("div", Ko, [Me(t.$slots, "loading-indicator", {}, () => [e.loadingIndicator ? (V(), j(te, {
4550
4566
  key: 0,
4551
4567
  node: e.loadingIndicator
4552
- }, null, 8, ["node"])) : (V(), N(O, { key: 1 }, [Te(W(G(ee)("loadingDocument")), 1)], 64))], !0)])) : !G(dt) && !re.value ? (V(), N("div", Ko, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(te, {
4568
+ }, null, 8, ["node"])) : (V(), N(O, { key: 1 }, [Te(W(G(ee)("loadingDocument")), 1)], 64))], !0)])) : !G(ft) && !re.value ? (V(), N("div", qo, [Me(t.$slots, "placeholder", {}, () => [e.placeholder ? (V(), j(te, {
4553
4569
  key: 0,
4554
4570
  node: e.placeholder
4555
4571
  }, null, 8, ["node"])) : (V(), N(O, { key: 1 }, [Te("No document loaded")], 64))], !0)])) : M("", !0),
4556
4572
  P("div", {
4557
4573
  ref_key: "hiddenPmRef",
4558
- ref: S,
4574
+ ref: C,
4559
4575
  class: "docx-editor-vue__hidden-pm paged-editor__hidden-pm"
4560
4576
  }, null, 512),
4561
4577
  P("div", {
4562
4578
  ref_key: "hiddenHfPmRef",
4563
- ref: C,
4579
+ ref: w,
4564
4580
  class: "docx-editor-vue__hidden-pm paged-editor__hidden-hf-pm"
4565
4581
  }, null, 512),
4566
4582
  P("div", {
4567
4583
  ref_key: "editorScrollRef",
4568
4584
  ref: fe,
4569
4585
  class: "docx-editor-vue__editor-scroll",
4570
- onScroll: $n
4571
- }, [P("div", qo, [
4572
- me.value && !d.value ? (V(), N("div", Jo, [F(ne, {
4573
- "section-props": xn.value,
4586
+ onScroll: er
4587
+ }, [P("div", Jo, [
4588
+ me.value && !d.value ? (V(), N("div", Yo, [F(ne, {
4589
+ "section-props": Sn.value,
4574
4590
  zoom: G(L),
4575
4591
  unit: e.rulerUnit ?? "inch",
4576
4592
  editable: !d.value,
4577
- "indent-left": Gn.value.indentLeft,
4578
- "indent-right": Gn.value.indentRight,
4579
- "first-line-indent": Gn.value.firstLineIndent,
4580
- "hanging-indent": Gn.value.hangingIndent,
4593
+ "indent-left": Kn.value.indentLeft,
4594
+ "indent-right": Kn.value.indentRight,
4595
+ "first-line-indent": Kn.value.firstLineIndent,
4596
+ "hanging-indent": Kn.value.hangingIndent,
4581
4597
  "show-first-line-indent": !0,
4582
- "tab-stops": Gn.value.tabs,
4583
- onLeftMarginChange: G(Ln),
4584
- onRightMarginChange: G(Rn),
4585
- onIndentLeftChange: G(Vn),
4586
- onIndentRightChange: G(Hn),
4587
- onFirstLineIndentChange: G(Un),
4588
- onTabStopRemove: G(Wn)
4598
+ "tab-stops": Kn.value.tabs,
4599
+ onLeftMarginChange: G(Rn),
4600
+ onRightMarginChange: G(zn),
4601
+ onIndentLeftChange: G(Hn),
4602
+ onIndentRightChange: G(Un),
4603
+ onFirstLineIndentChange: G(Wn),
4604
+ onTabStopRemove: G(Gn)
4589
4605
  }, null, 8, [
4590
4606
  "section-props",
4591
4607
  "zoom",
@@ -4603,13 +4619,13 @@ var Vo = (e) => {
4603
4619
  "onFirstLineIndentChange",
4604
4620
  "onTabStopRemove"
4605
4621
  ])])) : M("", !0),
4606
- me.value && !d.value ? (V(), N("div", Yo, [F(v, {
4607
- "section-props": xn.value,
4622
+ me.value && !d.value ? (V(), N("div", Xo, [F(v, {
4623
+ "section-props": Sn.value,
4608
4624
  zoom: G(L),
4609
4625
  unit: e.rulerUnit ?? "inch",
4610
4626
  editable: !d.value,
4611
- onTopMarginChange: G(zn),
4612
- onBottomMarginChange: G(Bn)
4627
+ onTopMarginChange: G(Bn),
4628
+ onBottomMarginChange: G(Vn)
4613
4629
  }, null, 8, [
4614
4630
  "section-props",
4615
4631
  "zoom",
@@ -4620,27 +4636,27 @@ var Vo = (e) => {
4620
4636
  ])])) : M("", !0),
4621
4637
  P("div", {
4622
4638
  ref_key: "pagesViewportRef",
4623
- ref: le,
4639
+ ref: de,
4624
4640
  class: "docx-editor-vue__pages-viewport",
4625
- onWheel: Ke,
4626
- onMousedown: n[25] ||= (...e) => G(Qt) && G(Qt)(...e),
4627
- onMousemove: n[26] ||= (...e) => G($t) && G($t)(...e),
4628
- onClick: n[27] ||= (...e) => G(en) && G(en)(...e),
4629
- onDblclick: n[28] ||= (...e) => G(tn) && G(tn)(...e),
4630
- onContextmenu: n[29] ||= q((...e) => G(pn) && G(pn)(...e), ["prevent"])
4641
+ onWheel: Je,
4642
+ onMousedown: n[25] ||= (...e) => G($t) && G($t)(...e),
4643
+ onMousemove: n[26] ||= (...e) => G(en) && G(en)(...e),
4644
+ onClick: n[27] ||= (...e) => G(tn) && G(tn)(...e),
4645
+ onDblclick: n[28] ||= (...e) => G(nn) && G(nn)(...e),
4646
+ onContextmenu: n[29] ||= q((...e) => G(mn) && G(mn)(...e), ["prevent"])
4631
4647
  }, [
4632
- P("div", Xo, [
4648
+ P("div", Zo, [
4633
4649
  P("div", {
4634
4650
  ref_key: "pagesRef",
4635
- ref: w,
4636
- class: R(["docx-editor-vue__pages paged-editor__pages", G(qt) ? `paged-editor--hf-editing paged-editor--editing-${G(qt).position}` : ""]),
4637
- style: z(Dn.value)
4651
+ ref: T,
4652
+ class: R(["docx-editor-vue__pages paged-editor__pages", G(Jt) ? `paged-editor--hf-editing paged-editor--editing-${G(Jt).position}` : ""]),
4653
+ style: z(On.value)
4638
4654
  }, null, 6),
4639
- F(_a, {
4640
- "editor-view": on(),
4641
- "hidden-container": C.value,
4642
- "pages-container": w.value,
4643
- selection: sn.value,
4655
+ F(va, {
4656
+ "editor-view": sn(),
4657
+ "hidden-container": w.value,
4658
+ "pages-container": T.value,
4659
+ selection: cn.value,
4644
4660
  zoom: G(L)
4645
4661
  }, null, 8, [
4646
4662
  "editor-view",
@@ -4649,15 +4665,15 @@ var Vo = (e) => {
4649
4665
  "selection",
4650
4666
  "zoom"
4651
4667
  ]),
4652
- P("div", Zo, [
4653
- F(di, {
4668
+ P("div", Qo, [
4669
+ F(fi, {
4654
4670
  "get-view": () => G(J),
4655
- "get-pages-container": () => w.value,
4656
- "editor-state": G(at),
4671
+ "get-pages-container": () => T.value,
4672
+ "editor-state": G(st),
4657
4673
  zoom: G(L),
4658
- layout: G(mt),
4659
- blocks: G(ht),
4660
- measures: G(gt),
4674
+ layout: G(ht),
4675
+ blocks: G(gt),
4676
+ measures: G(_t),
4661
4677
  "on-term-click": o.onAnonymizationTermClick,
4662
4678
  "selected-canonical": o.selectedAnonymizationCanonical,
4663
4679
  "selection-seq": o.anonymizationSelectionSeq
@@ -4673,13 +4689,13 @@ var Vo = (e) => {
4673
4689
  "selected-canonical",
4674
4690
  "selection-seq"
4675
4691
  ]),
4676
- F(pi, {
4692
+ F(mi, {
4677
4693
  range: pe.value,
4678
- "get-pages-container": () => w.value,
4694
+ "get-pages-container": () => T.value,
4679
4695
  zoom: G(L),
4680
- layout: G(mt),
4681
- blocks: G(ht),
4682
- measures: G(gt)
4696
+ layout: G(ht),
4697
+ blocks: G(gt),
4698
+ measures: G(_t)
4683
4699
  }, null, 8, [
4684
4700
  "range",
4685
4701
  "get-pages-container",
@@ -4688,15 +4704,15 @@ var Vo = (e) => {
4688
4704
  "blocks",
4689
4705
  "measures"
4690
4706
  ]),
4691
- o.showTemplateDirectives ? (V(), j(Aa, {
4707
+ o.showTemplateDirectives ? (V(), j(ja, {
4692
4708
  key: 0,
4693
4709
  "get-view": () => G(J),
4694
- "get-pages-container": () => w.value,
4695
- "editor-state": G(at),
4710
+ "get-pages-container": () => T.value,
4711
+ "editor-state": G(st),
4696
4712
  zoom: G(L),
4697
- layout: G(mt),
4698
- blocks: G(ht),
4699
- measures: G(gt)
4713
+ layout: G(ht),
4714
+ blocks: G(gt),
4715
+ measures: G(_t)
4700
4716
  }, null, 8, [
4701
4717
  "get-view",
4702
4718
  "get-pages-container",
@@ -4706,23 +4722,23 @@ var Vo = (e) => {
4706
4722
  "blocks",
4707
4723
  "measures"
4708
4724
  ])) : M("", !0),
4709
- F(_i, {
4710
- "get-pages-container": () => w.value,
4711
- "editor-state": G(at),
4725
+ F(vi, {
4726
+ "get-pages-container": () => T.value,
4727
+ "editor-state": G(st),
4712
4728
  zoom: G(L),
4713
- "sync-coordinator": G(_t)
4729
+ "sync-coordinator": G(vt)
4714
4730
  }, null, 8, [
4715
4731
  "get-pages-container",
4716
4732
  "editor-state",
4717
4733
  "zoom",
4718
4734
  "sync-coordinator"
4719
4735
  ]),
4720
- F(Ti, {
4736
+ F(Ei, {
4721
4737
  "get-view": () => G(J),
4722
- "get-pages-container": () => w.value,
4738
+ "get-pages-container": () => T.value,
4723
4739
  zoom: G(L),
4724
- "transaction-version": T.value,
4725
- "sync-coordinator": G(_t)
4740
+ "transaction-version": E.value,
4741
+ "sync-coordinator": G(vt)
4726
4742
  }, null, 8, [
4727
4743
  "get-view",
4728
4744
  "get-pages-container",
@@ -4732,12 +4748,12 @@ var Vo = (e) => {
4732
4748
  ])
4733
4749
  ])
4734
4750
  ]),
4735
- G(qt) ? (V(), j(ya, {
4751
+ G(Jt) ? (V(), j(ba, {
4736
4752
  key: 0,
4737
- edit: G(qt),
4738
- "get-view": on,
4739
- onClose: G(rn),
4740
- onRemove: G(an)
4753
+ edit: G(Jt),
4754
+ "get-view": sn,
4755
+ onClose: G(an),
4756
+ onRemove: G(on)
4741
4757
  }, null, 8, [
4742
4758
  "edit",
4743
4759
  "onClose",
@@ -4745,39 +4761,39 @@ var Vo = (e) => {
4745
4761
  ])) : M("", !0),
4746
4762
  Le(P("aside", {
4747
4763
  class: "docx-editor-vue__note-editor",
4748
- "aria-label": kt.value,
4749
- onKeydown: n[16] ||= Re(q((...e) => G(Tt) && G(Tt)(...e), ["stop", "prevent"]), ["esc"])
4750
- }, [P("header", $o, [P("span", null, W(kt.value), 1), P("button", {
4764
+ "aria-label": At.value,
4765
+ onKeydown: n[16] ||= Re(q((...e) => G(Et) && G(Et)(...e), ["stop", "prevent"]), ["esc"])
4766
+ }, [P("header", es, [P("span", null, W(At.value), 1), P("button", {
4751
4767
  type: "button",
4752
4768
  "aria-label": G(ee)("common.closeDialog"),
4753
- onClick: n[15] ||= (...e) => G(Tt) && G(Tt)(...e)
4754
- }, " × ", 8, es)]), P("div", {
4769
+ onClick: n[15] ||= (...e) => G(Et) && G(Et)(...e)
4770
+ }, " × ", 8, ts)]), P("div", {
4755
4771
  ref_key: "notePmRef",
4756
- ref: we,
4772
+ ref: I,
4757
4773
  class: "docx-editor-vue__note-editor-host"
4758
- }, null, 512)], 40, Qo), [[Fe, G(ut)]]),
4759
- F(ga, {
4760
- "image-info": G(Z),
4774
+ }, null, 512)], 40, $o), [[Fe, G(dt)]]),
4775
+ F(_a, {
4776
+ "image-info": G(Mt),
4761
4777
  zoom: G(L),
4762
4778
  view: X.value,
4763
- onDeselect: n[17] ||= (e) => Z.value = null,
4764
- onInteractStart: n[18] ||= (e) => Mt.value = !0,
4765
- onInteractEnd: n[19] ||= (e) => Mt.value = !1,
4766
- onContextMenu: G(mn)
4779
+ onDeselect: n[17] ||= (e) => Mt.value = null,
4780
+ onInteractStart: n[18] ||= (e) => Nt.value = !0,
4781
+ onInteractEnd: n[19] ||= (e) => Nt.value = !1,
4782
+ onContextMenu: G(hn)
4767
4783
  }, null, 8, [
4768
4784
  "image-info",
4769
4785
  "zoom",
4770
4786
  "view",
4771
4787
  "onContextMenu"
4772
4788
  ]),
4773
- F(Ba, {
4774
- data: G(Lt),
4789
+ F(Va, {
4790
+ data: G(Rt),
4775
4791
  "read-only": d.value,
4776
- onNavigate: G(Ht),
4777
- onCopy: bn,
4778
- onEdit: G(Ut),
4779
- onRemove: G(Wt),
4780
- onClose: n[20] ||= (e) => Lt.value = null
4792
+ onNavigate: G(Ut),
4793
+ onCopy: xn,
4794
+ onEdit: G(Wt),
4795
+ onRemove: G(Gt),
4796
+ onClose: n[20] ||= (e) => Rt.value = null
4781
4797
  }, null, 8, [
4782
4798
  "data",
4783
4799
  "read-only",
@@ -4785,24 +4801,24 @@ var Vo = (e) => {
4785
4801
  "onEdit",
4786
4802
  "onRemove"
4787
4803
  ]),
4788
- G(Kt) ? (V(), N("button", {
4804
+ G(qt) ? (V(), N("button", {
4789
4805
  key: 1,
4790
4806
  type: "button",
4791
4807
  class: "docx-editor-vue__table-insert-btn",
4792
4808
  style: z({
4793
- left: G(Kt).x + "px",
4794
- top: G(Kt).y + "px"
4809
+ left: G(qt).x + "px",
4810
+ top: G(qt).y + "px"
4795
4811
  }),
4796
- "aria-label": G(Kt).type === "row" ? "Insert row" : "Insert column",
4797
- onMousedown: n[21] ||= (...e) => G(nn) && G(nn)(...e)
4798
- }, " + ", 44, ts)) : M("", !0),
4812
+ "aria-label": G(qt).type === "row" ? "Insert row" : "Insert column",
4813
+ onMousedown: n[21] ||= (...e) => G(rn) && G(rn)(...e)
4814
+ }, " + ", 44, ns)) : M("", !0),
4799
4815
  F(g, {
4800
- comments: G(yn),
4801
- "pages-container": w.value,
4816
+ comments: G(bn),
4817
+ "pages-container": T.value,
4802
4818
  zoom: G(L),
4803
- "page-width-px": Tn.value,
4804
- "sidebar-open": D.value,
4805
- "resolved-comment-ids": En.value,
4819
+ "page-width-px": En.value,
4820
+ "sidebar-open": k.value,
4821
+ "resolved-comment-ids": Dn.value,
4806
4822
  onMarkerClick: () => {}
4807
4823
  }, null, 8, [
4808
4824
  "comments",
@@ -4813,18 +4829,18 @@ var Vo = (e) => {
4813
4829
  "resolved-comment-ids"
4814
4830
  ]),
4815
4831
  F(b, {
4816
- "is-open": D.value,
4817
- comments: G(yn),
4818
- "tracked-changes": vn.value,
4832
+ "is-open": k.value,
4833
+ comments: G(bn),
4834
+ "tracked-changes": yn.value,
4819
4835
  "show-resolved": !0,
4820
4836
  "is-adding-comment": G($).isAddingComment.value,
4821
4837
  "add-comment-y-position": G($).addCommentYPosition.value,
4822
- "pages-container": w.value,
4823
- "page-width-px": Tn.value,
4838
+ "pages-container": T.value,
4839
+ "page-width-px": En.value,
4824
4840
  zoom: G(L),
4825
- "active-item-id": k.value,
4826
- onClose: n[22] ||= (e) => D.value = !1,
4827
- "onUpdate:activeItemId": n[23] ||= (e) => k.value = e,
4841
+ "active-item-id": Se.value,
4842
+ onClose: n[22] ||= (e) => k.value = !1,
4843
+ "onUpdate:activeItemId": n[23] ||= (e) => Se.value = e,
4828
4844
  onAddComment: G($).handleAddComment,
4829
4845
  onCancelAddComment: G($).handleCancelAddComment,
4830
4846
  onCommentReply: G(Q).handleReply,
@@ -4874,27 +4890,27 @@ var Vo = (e) => {
4874
4890
  size: 18
4875
4891
  })], 36)) : M("", !0)
4876
4892
  ], 544),
4877
- xe.value ? M("", !0) : (V(), j(xa, {
4893
+ xe.value ? M("", !0) : (V(), j(Sa, {
4878
4894
  key: 2,
4879
4895
  "left-offset": 12,
4880
- onToggle: G(cn).handleToggleOutline
4896
+ onToggle: G(ln).handleToggleOutline
4881
4897
  }, null, 8, ["onToggle"])),
4882
- G(Jt).totalPages > 1 ? (V(), j(Sa, {
4898
+ G(Yt).totalPages > 1 ? (V(), j(Ca, {
4883
4899
  key: 3,
4884
- "current-page": G(Jt).currentPage,
4885
- "total-pages": G(Jt).totalPages,
4886
- visible: G(Jt).visible
4900
+ "current-page": G(Yt).currentPage,
4901
+ "total-pages": G(Yt).totalPages,
4902
+ visible: G(Yt).visible
4887
4903
  }, null, 8, [
4888
4904
  "current-page",
4889
4905
  "total-pages",
4890
4906
  "visible"
4891
4907
  ])) : M("", !0),
4892
- F(ki, {
4908
+ F(Ai, {
4893
4909
  "is-open": xe.value,
4894
- headings: Ee.value,
4895
- "get-scroll-container": () => w.value,
4910
+ headings: De.value,
4911
+ "get-scroll-container": () => T.value,
4896
4912
  onClose: n[30] ||= (e) => xe.value = !1,
4897
- onNavigate: G(cn).handleOutlineNavigate
4913
+ onNavigate: G(ln).handleOutlineNavigate
4898
4914
  }, null, 8, [
4899
4915
  "is-open",
4900
4916
  "headings",
@@ -4902,17 +4918,17 @@ var Vo = (e) => {
4902
4918
  "onNavigate"
4903
4919
  ])
4904
4920
  ])], 544),
4905
- F(oa, {
4921
+ F(sa, {
4906
4922
  "read-only": d.value,
4907
- "context-menu": G(ln),
4908
- "image-context-menu": G(un),
4909
- "image-context-menu-text-actions": G(dn),
4910
- "custom-text-menu-items": G(fn),
4911
- "can-open-image-properties": G(Z) !== null,
4912
- onContextMenuAction: G(gn),
4913
- onCloseContextMenu: n[31] ||= (e) => G(ln).isOpen = !1,
4914
- onImageWrapSelect: G(hn),
4915
- onCloseImageContextMenu: n[32] ||= (e) => un.value = null,
4923
+ "context-menu": G(un),
4924
+ "image-context-menu": G(dn),
4925
+ "image-context-menu-text-actions": G(fn),
4926
+ "custom-text-menu-items": G(pn),
4927
+ "can-open-image-properties": G(Mt) !== null,
4928
+ onContextMenuAction: G(_n),
4929
+ onCloseContextMenu: n[31] ||= (e) => G(un).isOpen = !1,
4930
+ onImageWrapSelect: G(gn),
4931
+ onCloseImageContextMenu: n[32] ||= (e) => dn.value = null,
4916
4932
  onOpenImageProperties: n[33] ||= (e) => _e.value = !0
4917
4933
  }, null, 8, [
4918
4934
  "read-only",
@@ -4924,16 +4940,16 @@ var Vo = (e) => {
4924
4940
  "onContextMenuAction",
4925
4941
  "onImageWrapSelect"
4926
4942
  ]),
4927
- F(wi, {
4928
- "event-root": d.value ? null : w.value,
4943
+ F(Ti, {
4944
+ "event-root": d.value ? null : T.value,
4929
4945
  view: G(J)
4930
4946
  }, null, 8, ["event-root", "view"])
4931
4947
  ], 6));
4932
4948
  }
4933
- }), [["__scopeId", "data-v-9aed719f"]]);
4949
+ }), [["__scopeId", "data-v-a5e2281b"]]);
4934
4950
  //#endregion
4935
4951
  //#region src/utils/listState.ts
4936
- function rs() {
4952
+ function is() {
4937
4953
  return {
4938
4954
  type: "none",
4939
4955
  level: 0,
@@ -4942,30 +4958,30 @@ function rs() {
4942
4958
  }
4943
4959
  //#endregion
4944
4960
  //#region src/components/FormattingBar.vue?vue&type=script&setup=true&lang.ts
4945
- var is = ["aria-label"], as = ["aria-label"], os = [
4961
+ var as = ["aria-label"], os = ["aria-label"], ss = [
4946
4962
  "disabled",
4947
4963
  "title",
4948
4964
  "aria-label"
4949
- ], ss = [
4965
+ ], cs = [
4950
4966
  "disabled",
4951
4967
  "title",
4952
4968
  "aria-label"
4953
- ], cs = ["aria-label"], ls = [
4969
+ ], ls = ["aria-label"], us = [
4954
4970
  "disabled",
4955
4971
  "title",
4956
4972
  "aria-label",
4957
4973
  "aria-pressed"
4958
- ], us = [
4974
+ ], ds = [
4959
4975
  "disabled",
4960
4976
  "title",
4961
4977
  "aria-label",
4962
4978
  "aria-pressed"
4963
- ], ds = [
4979
+ ], fs = [
4964
4980
  "disabled",
4965
4981
  "title",
4966
4982
  "aria-label",
4967
4983
  "aria-pressed"
4968
- ], fs = /*#__PURE__*/ t(/* @__PURE__ */ I({
4984
+ ], ps = /*#__PURE__*/ t(/* @__PURE__ */ I({
4969
4985
  __name: "FormattingBar",
4970
4986
  props: {
4971
4987
  currentFormatting: {},
@@ -5007,7 +5023,7 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5007
5023
  "redo"
5008
5024
  ],
5009
5025
  setup(e, { emit: t }) {
5010
- 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 ?? rs()), d = A(() => {
5026
+ 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 ?? is()), d = A(() => {
5011
5027
  let e = c.value.color;
5012
5028
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
5013
5029
  }), f = A(() => {
@@ -5040,7 +5056,7 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5040
5056
  }, [F(i, {
5041
5057
  name: "undo",
5042
5058
  size: 18
5043
- })], 40, os), P("button", {
5059
+ })], 40, ss), P("button", {
5044
5060
  type: "button",
5045
5061
  class: "docx-formatting-bar__btn",
5046
5062
  disabled: e.disabled || !e.canRedo,
@@ -5050,12 +5066,12 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5050
5066
  }, [F(i, {
5051
5067
  name: "redo",
5052
5068
  size: 18
5053
- })], 40, ss)], 8, as),
5069
+ })], 40, cs)], 8, os),
5054
5070
  r[13] ||= P("span", {
5055
5071
  class: "docx-formatting-bar__divider",
5056
5072
  role: "separator"
5057
5073
  }, null, -1),
5058
- e.showStylePicker ? (V(), N(O, { key: 0 }, [F(ee, De({ value: c.value.styleId ?? "Normal" }, l.value, {
5074
+ e.showStylePicker ? (V(), N(O, { key: 0 }, [F(ee, Oe({ value: c.value.styleId ?? "Normal" }, l.value, {
5059
5075
  disabled: e.disabled,
5060
5076
  onChange: r[2] ||= (e) => o("format", {
5061
5077
  type: "applyStyle",
@@ -5081,7 +5097,7 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5081
5097
  }, [F(i, {
5082
5098
  name: "format_bold",
5083
5099
  size: 18
5084
- })], 42, ls),
5100
+ })], 42, us),
5085
5101
  P("button", {
5086
5102
  type: "button",
5087
5103
  class: R(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.italic }]),
@@ -5093,7 +5109,7 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5093
5109
  }, [F(i, {
5094
5110
  name: "format_italic",
5095
5111
  size: 18
5096
- })], 42, us),
5112
+ })], 42, ds),
5097
5113
  P("button", {
5098
5114
  type: "button",
5099
5115
  class: R(["docx-formatting-bar__btn", { "docx-formatting-bar__btn--active": c.value.underline }]),
@@ -5105,8 +5121,8 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5105
5121
  }, [F(i, {
5106
5122
  name: "format_underlined",
5107
5123
  size: 18
5108
- })], 42, ds)
5109
- ], 8, cs),
5124
+ })], 42, fs)
5125
+ ], 8, ls),
5110
5126
  e.showTextColorPicker ? (V(), N(O, { key: 1 }, [r[12] ||= P("span", {
5111
5127
  class: "docx-formatting-bar__divider",
5112
5128
  role: "separator"
@@ -5148,9 +5164,9 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5148
5164
  "disabled",
5149
5165
  "can-outdent"
5150
5166
  ])) : M("", !0)
5151
- ], 10, is));
5167
+ ], 10, as));
5152
5168
  }
5153
- }), [["__scopeId", "data-v-fc03de2e"]]), ps = [
5169
+ }), [["__scopeId", "data-v-fc03de2e"]]), ms = [
5154
5170
  {
5155
5171
  value: .5,
5156
5172
  label: "50%"
@@ -5175,7 +5191,7 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5175
5191
  value: 2,
5176
5192
  label: "200%"
5177
5193
  }
5178
- ], ms = /*#__PURE__*/ t(/* @__PURE__ */ I({
5194
+ ], hs = /*#__PURE__*/ t(/* @__PURE__ */ I({
5179
5195
  __name: "ZoomControl",
5180
5196
  props: {
5181
5197
  value: { default: 1 },
@@ -5192,7 +5208,7 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5192
5208
  },
5193
5209
  emits: ["change"],
5194
5210
  setup(e, { emit: t }) {
5195
- let { Select: n } = h(), r = e, i = t, a = A(() => r.levels ?? ps), 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(() => {
5211
+ let { Select: n } = h(), r = e, i = t, a = A(() => r.levels ?? ms), 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(() => {
5196
5212
  let e = a.value.map((e) => ({
5197
5213
  value: String(e.value),
5198
5214
  label: e.label
@@ -5220,7 +5236,7 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5220
5236
  "disabled"
5221
5237
  ]));
5222
5238
  }
5223
- }), [["__scopeId", "data-v-8079e07f"]]), hs = (e, t, n = {}) => {
5239
+ }), [["__scopeId", "data-v-8079e07f"]]), gs = (e, t, n = {}) => {
5224
5240
  let { colorMode: r = C, locale: i = "en", ...a } = n;
5225
5241
  return new Promise((n, o) => {
5226
5242
  let s = H(null), c = null, l = !1, d = {
@@ -5246,7 +5262,7 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5246
5262
  }
5247
5263
  };
5248
5264
  c = Se({ setup() {
5249
- return () => Ee(ns, {
5265
+ return () => Ee(rs, {
5250
5266
  ...a,
5251
5267
  documentBuffer: e,
5252
5268
  ref: s,
@@ -5257,8 +5273,8 @@ var is = ["aria-label"], as = ["aria-label"], os = [
5257
5273
  a.onError?.(e), l || (l = !0, c?.unmount(), c = null, o(e));
5258
5274
  }
5259
5275
  });
5260
- } }), c.use(u, i), c.use(le, r), c.mount(t);
5276
+ } }), c.use(u, i), c.use(T, r), c.mount(t);
5261
5277
  });
5262
5278
  };
5263
5279
  //#endregion
5264
- export { hi as AutocompleteCaretOverlay, Jr as DEFAULT_AI_SUGGESTION_PRESETS, vt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Gr as DOCUMENT_PRESET_VERSION, Kr as DOCUMENT_STYLE_SET_VERSION, ns as DocxEditor, fe as FindReplaceDialog, l as FolioUIProvider, pe as FootnotePropertiesDialog, fs 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, Hr as STELLA_STYLE_SET_NAME, be as SplitCellDialog, xe as TablePropertiesDialog, D as WatermarkDialog, ms as ZoomControl, yt as acceptAutocompleteSuggestion, bt as acceptAutocompleteWord, pt as anonymizationDecorationsKey, Y as appendAutocompleteToken, Pn as applyFolioAIEditOperations, Yr as applySuggestions, xt as autocompleteSuggestionKey, St as autocompleteSuggestionPlugin, Qr as buildPositionalText, Ct as clearAutocompleteSuggestion, Cn as clearTemplateSlashMenu, le as colorModePlugin, wn as consumeTemplateSlashQuery, ii as createAICitationDecorationsPlugin, qr as createDocx, Lr as createEmptyDocument, Rn as createFolioAIEditSnapshot, Ur as createStellaStyleDocumentPreset, Wr as createStellaStyleSet, C as defaultColorMode, e as defaultLocale, sr as deriveBlockId, Bn as diffWordSegments, Rr as extractDocumentStyleSet, zr as extractDocumentStyleSetFromDocx, wt as finishAutocompleteSuggestion, si as fromMarkdown, mt as getAnonymizationMatches, Tt as getAutocompleteSuggestion, at as getDocumentWatermark, ni as getFolioCaretViewportRect, cr as getFolioParaIdFromBlockId, ri as getFolioSelectionViewportRect, en as getTemplateDirectives, Tn as getTemplateSlashMenu, Wn as hashFolioAIBlockText, u as i18nPlugin, He as insertImageFromFile, We as insertPageBreakInView, Ke as insertTableInView, Je as insertTableOfContentsInView, Br as inspectDocumentStyles, Vr as inspectDocumentStylesFromDocx, ur as isFolioBlockId, dr as isSequentialFolioBlockId, Xr as isSuggestionStale, Gn as normalizeFolioAIBlockText, w as provideColorMode, n as provideLocale, hs as renderAsync, En as resetTemplateSlashQuery, Zr as resolveSuggestionAnchor, nn as scanDirectives, ti as scrollFolioPositionIntoView, ai as setAICitationsMeta, $r as setAISuggestionsMeta, oi as setActiveCitationMeta, gt as setAnonymizationTermsMeta, st as setDocumentWatermark, ei as setFocusedSuggestionMeta, Sn as setTemplatePreviewValues, Dt as shouldTriggerAutocomplete, Ot as startAutocompleteSuggestion, Dn as templateSlashMenuKey, ci as toMarkdown, li as toMarkdownResult, de as useColorMode, r as useTranslation, ue as useWheelZoom };
5280
+ export { gi as AutocompleteCaretOverlay, Yr as DEFAULT_AI_SUGGESTION_PRESETS, vt as DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, Kr as DOCUMENT_PRESET_VERSION, qr as DOCUMENT_STYLE_SET_VERSION, rs as DocxEditor, de as FindReplaceDialog, l as FolioUIProvider, fe as FootnotePropertiesDialog, ps as FormattingBar, pe as HyperlinkDialog, me as ImagePositionDialog, E as ImagePropertiesDialog, he as InsertImageDialog, D as InsertSymbolDialog, ge as InsertTableDialog, _e as PageSetupDialog, ve as PasteSpecialDialog, Ur as STELLA_STYLE_SET_NAME, ye as SplitCellDialog, be as TablePropertiesDialog, xe as WatermarkDialog, hs as ZoomControl, yt as acceptAutocompleteSuggestion, bt as acceptAutocompleteWord, pt as anonymizationDecorationsKey, xt as appendAutocompleteToken, Pn as applyFolioAIEditOperations, Xr as applySuggestions, Y as autocompleteSuggestionKey, St as autocompleteSuggestionPlugin, $r as buildPositionalText, Ct as clearAutocompleteSuggestion, Cn as clearTemplateSlashMenu, T as colorModePlugin, wn as consumeTemplateSlashQuery, ai as createAICitationDecorationsPlugin, Jr as createDocx, Rr as createEmptyDocument, Rn as createFolioAIEditSnapshot, Wr as createStellaStyleDocumentPreset, Gr as createStellaStyleSet, C as defaultColorMode, e as defaultLocale, sr as deriveBlockId, Bn as diffWordSegments, zr as extractDocumentStyleSet, Br as extractDocumentStyleSetFromDocx, wt as finishAutocompleteSuggestion, ci as fromMarkdown, mt as getAnonymizationMatches, Tt as getAutocompleteSuggestion, J as getDocumentWatermark, ri as getFolioCaretViewportRect, cr as getFolioParaIdFromBlockId, ii as getFolioSelectionViewportRect, en as getTemplateDirectives, Tn as getTemplateSlashMenu, Wn as hashFolioAIBlockText, u as i18nPlugin, He as insertImageFromFile, We as insertPageBreakInView, Ke as insertTableInView, Je as insertTableOfContentsInView, Vr as inspectDocumentStyles, Hr as inspectDocumentStylesFromDocx, ur as isFolioBlockId, dr as isSequentialFolioBlockId, Zr as isSuggestionStale, Gn as normalizeFolioAIBlockText, w as provideColorMode, n as provideLocale, gs as renderAsync, En as resetTemplateSlashQuery, Qr as resolveSuggestionAnchor, nn as scanDirectives, ni as scrollFolioPositionIntoView, oi as setAICitationsMeta, ei as setAISuggestionsMeta, si as setActiveCitationMeta, gt as setAnonymizationTermsMeta, st as setDocumentWatermark, ti as setFocusedSuggestionMeta, Sn as setTemplatePreviewValues, Dt as shouldTriggerAutocomplete, Ot as startAutocompleteSuggestion, Dn as templateSlashMenuKey, li as toMarkdown, ui as toMarkdownResult, ue as useColorMode, r as useTranslation, le as useWheelZoom };