@eigenpal/docx-editor-vue 1.2.0 → 1.2.1

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
@@ -11,25 +11,25 @@ import { clearFormatting as q, findHyperlinkRangeAt as J } from "@eigenpal/docx-
11
11
  import { SIDEBAR_DOCUMENT_SHIFT as _e, findWordBoundaries as ve, loadFontDefinitions as ye, onFontError as be, pixelsToEmu as xe, readDocxFileFromInput as Se, toArrayBuffer as Ce } from "@eigenpal/docx-editor-core/utils";
12
12
  import { getTableContext as we } from "@eigenpal/docx-editor-core/prosemirror/extensions/nodes/TableExtension";
13
13
  import { clickToPositionDom as Te, getCaretPositionFromDom as Ee, getSelectionRectsFromDom as De } from "@eigenpal/docx-editor-core/layout-bridge/clickToPositionDom";
14
- import { IMAGE_LAYOUT_OPTIONS as Y, captureInlinePositionEmu as Oe, deriveLayoutChoice as ke, findImageElement as Ae, isImageLayoutOptionEnabled as je, toolbarValueToLayoutTarget as Me } from "@eigenpal/docx-editor-core/layout-painter";
15
- import { proseDocToBlocks as Ne } from "@eigenpal/docx-editor-core/prosemirror/conversion";
16
- import { LayoutSelectionGate as Pe, addRepeatingSectionItemTr as Fe, findContentControlPos as Ie, findContentControlsInPM as X, removeContentControlTr as Le, removeRepeatingSectionItemTr as Re, schema as ze, setContentControlContentTr as Be, setContentControlValueTr as Ve } from "@eigenpal/docx-editor-core/prosemirror";
14
+ import { IMAGE_LAYOUT_OPTIONS as Y, captureInlinePositionEmu as Oe, deriveLayoutChoice as ke, findImageElement as Ae, isImageLayoutOptionEnabled as je, renderAllPagesNow as Me, toolbarValueToLayoutTarget as Ne } from "@eigenpal/docx-editor-core/layout-painter";
15
+ import { proseDocToBlocks as Pe } from "@eigenpal/docx-editor-core/prosemirror/conversion";
16
+ import { LayoutSelectionGate as Fe, addRepeatingSectionItemTr as Ie, findContentControlPos as X, findContentControlsInPM as Z, removeContentControlTr as Le, removeRepeatingSectionItemTr as Re, schema as ze, setContentControlContentTr as Be, setContentControlValueTr as Ve } from "@eigenpal/docx-editor-core/prosemirror";
17
17
  import { pointsToHalfPoints as He, twipsToPixels as Ue } from "@eigenpal/docx-editor-core/utils/units";
18
18
  import { makeRevisionInfo as We } from "@eigenpal/docx-editor-core/prosemirror/plugins";
19
19
  import { findPageIndexContainingPmPos as Ge } from "@eigenpal/docx-editor-core/layout-engine";
20
- import { applyStyle as Z, removeTabStop as Ke, setIndentFirstLine as qe, setIndentLeft as Je, setIndentRight as Ye } from "@eigenpal/docx-editor-core/prosemirror/commands/paragraph";
21
- import { createStyleResolver as Xe } from "@eigenpal/docx-editor-core/prosemirror/styles";
22
- import { insertPageBreak as Ze } from "@eigenpal/docx-editor-core/prosemirror/commands/pageBreak";
23
- import { mapHexToHighlightName as Qe } from "@eigenpal/docx-editor-core/utils/highlightColors";
24
- import { collectHeadings as $e } from "@eigenpal/docx-editor-core/utils/headingCollector";
25
- import { acceptChange as et, acceptChangeById as tt, insertImageNode as nt, rejectChange as rt, rejectChangeById as it } from "@eigenpal/docx-editor-core/prosemirror/commands";
26
- import { extractTrackedChanges as at } from "@eigenpal/docx-editor-core/prosemirror/utils/extractTrackedChanges";
27
- import { TABLE_INSERT_HIDE_DELAY_MS as ot, detectTableInsertHover as st } from "@eigenpal/docx-editor-core/layout-bridge/tableInsertHover";
28
- import { openReportIssue as ct } from "@eigenpal/docx-editor-core/utils/reportIssue";
29
- import { ContentControlNotFoundError as lt } from "@eigenpal/docx-editor-core/agent";
30
- import { createDocumentWithText as ut, createEmptyDocument as dt } from "@eigenpal/docx-editor-core";
20
+ import { applyStyle as Ke, removeTabStop as qe, setIndentFirstLine as Je, setIndentLeft as Ye, setIndentRight as Xe } from "@eigenpal/docx-editor-core/prosemirror/commands/paragraph";
21
+ import { createStyleResolver as Ze } from "@eigenpal/docx-editor-core/prosemirror/styles";
22
+ import { insertPageBreak as Qe } from "@eigenpal/docx-editor-core/prosemirror/commands/pageBreak";
23
+ import { mapHexToHighlightName as $e } from "@eigenpal/docx-editor-core/utils/highlightColors";
24
+ import { collectHeadings as et } from "@eigenpal/docx-editor-core/utils/headingCollector";
25
+ import { acceptChange as tt, acceptChangeById as nt, insertImageNode as rt, rejectChange as it, rejectChangeById as at } from "@eigenpal/docx-editor-core/prosemirror/commands";
26
+ import { extractTrackedChanges as ot } from "@eigenpal/docx-editor-core/prosemirror/utils/extractTrackedChanges";
27
+ import { TABLE_INSERT_HIDE_DELAY_MS as st, detectTableInsertHover as ct } from "@eigenpal/docx-editor-core/layout-bridge/tableInsertHover";
28
+ import { openReportIssue as lt } from "@eigenpal/docx-editor-core/utils/reportIssue";
29
+ import { ContentControlNotFoundError as ut } from "@eigenpal/docx-editor-core/agent";
30
+ import { createDocumentWithText as dt, createEmptyDocument as ft } from "@eigenpal/docx-editor-core";
31
31
  //#region src/utils/paraTextHelpers.ts
32
- function ft(e, t) {
32
+ function pt(e, t) {
33
33
  if (!t.trim()) return null;
34
34
  let n = null;
35
35
  return e.descendants((e, r) => n ? !1 : e.isTextblock && e.attrs?.paraId === t ? (n = {
@@ -37,11 +37,11 @@ function ft(e, t) {
37
37
  to: r + e.nodeSize
38
38
  }, !1) : !0), n;
39
39
  }
40
- function pt(e) {
40
+ function mt(e) {
41
41
  let t = [];
42
42
  return e.descendants((e) => !e.isText || !e.text ? !0 : e.marks.some((e) => e.type.name === "insertion") ? !1 : (t.push(e.text), !0)), t.join("");
43
43
  }
44
- function mt(e, t, n) {
44
+ function ht(e, t, n) {
45
45
  if (t >= n) return "";
46
46
  let r = [];
47
47
  return e.nodesBetween(t, n, (e, i) => {
@@ -50,7 +50,7 @@ function mt(e, t, n) {
50
50
  a < o && r.push(e.text.slice(a - i, o - i));
51
51
  }), r.join("");
52
52
  }
53
- function ht(e, t, n, r) {
53
+ function gt(e, t, n, r) {
54
54
  if (!r) return null;
55
55
  let i = "", a = [];
56
56
  e.nodesBetween(t, n, (e, t) => {
@@ -77,7 +77,7 @@ function ht(e, t, n, r) {
77
77
  }
78
78
  //#endregion
79
79
  //#region src/utils/refApiQueries.ts
80
- function gt(e, t, n) {
80
+ function _t(e, t, n) {
81
81
  if (!e || !t) return [];
82
82
  let r = n?.caseSensitive ?? !1, i = n?.limit ?? 20, a = r ? t : t.toLowerCase(), o = [];
83
83
  return e.state.doc.descendants((e) => {
@@ -85,7 +85,7 @@ function gt(e, t, n) {
85
85
  if (!e.isTextblock) return !0;
86
86
  let n = e.attrs?.paraId;
87
87
  if (!n) return !1;
88
- let s = pt(e), c = r ? s : s.toLowerCase(), l = c.indexOf(a);
88
+ let s = mt(e), c = r ? s : s.toLowerCase(), l = c.indexOf(a);
89
89
  return l === -1 || c.indexOf(a, l + 1) !== -1 || o.push({
90
90
  paraId: n,
91
91
  match: s.slice(l, l + t.length),
@@ -94,13 +94,13 @@ function gt(e, t, n) {
94
94
  }), !1;
95
95
  }), o;
96
96
  }
97
- function _t(e) {
97
+ function vt(e) {
98
98
  if (!e) return null;
99
99
  let { selection: t, doc: n } = e.state, r = t.$from, i = r.depth;
100
100
  for (; i > 0 && !r.node(i).isTextblock;) i--;
101
101
  let a = i > 0 ? r.node(i) : null;
102
102
  if (!a) return null;
103
- let o = a.attrs?.paraId ?? null, s = r.start(i), c = s + a.content.size, l = mt(n, s, t.from), u = mt(n, t.from, t.to), d = mt(n, t.to, c);
103
+ let o = a.attrs?.paraId ?? null, s = r.start(i), c = s + a.content.size, l = ht(n, s, t.from), u = ht(n, t.from, t.to), d = ht(n, t.to, c);
104
104
  return {
105
105
  paraId: o,
106
106
  selectedText: u,
@@ -109,7 +109,7 @@ function _t(e) {
109
109
  after: d
110
110
  };
111
111
  }
112
- function vt(e, t, n) {
112
+ function yt(e, t, n) {
113
113
  if (!t || !e) return null;
114
114
  let r = t.pages[n - 1];
115
115
  if (!r) return null;
@@ -123,7 +123,7 @@ function vt(e, t, n) {
123
123
  let o = r.attrs?.paraId;
124
124
  !o || i.has(o) || (i.add(o), a.push({
125
125
  paraId: o,
126
- text: pt(r),
126
+ text: mt(r),
127
127
  styleId: r.attrs?.styleId ?? void 0
128
128
  }));
129
129
  }
@@ -135,7 +135,7 @@ function vt(e, t, n) {
135
135
  }
136
136
  //#endregion
137
137
  //#region src/components/DecorationLayer.vue
138
- var yt = /* @__PURE__ */ j({
138
+ var bt = /* @__PURE__ */ j({
139
139
  __name: "DecorationLayer",
140
140
  props: {
141
141
  getView: { type: Function },
@@ -227,13 +227,13 @@ var yt = /* @__PURE__ */ j({
227
227
  "aria-hidden": "true"
228
228
  }, null, 512));
229
229
  }
230
- }), bt = ["data-handle", "onMousedown"], xt = ["title"], St = {
230
+ }), xt = ["data-handle", "onMousedown"], St = ["title"], Ct = {
231
231
  key: 0,
232
232
  class: "image-overlay__dim"
233
- }, Ct = {
233
+ }, wt = {
234
234
  key: 1,
235
235
  class: "image-overlay__dim image-overlay__dim--rotate"
236
- }, wt = 4, Tt = 15, Et = /* @__PURE__ */ x(/* @__PURE__ */ j({
236
+ }, Tt = 4, Et = 15, Dt = /* @__PURE__ */ x(/* @__PURE__ */ j({
237
237
  __name: "ImageSelectionOverlay",
238
238
  props: {
239
239
  imageInfo: {},
@@ -451,7 +451,7 @@ var yt = /* @__PURE__ */ j({
451
451
  }
452
452
  function he(e) {
453
453
  let t = pe(e.clientX, e.clientY) - ue, n = de + t;
454
- e.shiftKey || (n = Math.round(n / Tt) * Tt), f.value = (n % 360 + 360) % 360, U && (U.style.transform = G(V, f.value) || "");
454
+ e.shiftKey || (n = Math.round(n / Et) * Et), f.value = (n % 360 + 360) % 360, U && (U.style.transform = G(V, f.value) || "");
455
455
  }
456
456
  function ge() {
457
457
  document.removeEventListener("mousemove", he), document.removeEventListener("mouseup", ge), l.value = !1, a("interact-end");
@@ -472,7 +472,7 @@ var yt = /* @__PURE__ */ j({
472
472
  if (!i.imageInfo || !p.value) return;
473
473
  let t = e.clientX, n = e.clientY, r = p.value, o = !1, s = (e) => {
474
474
  let s = e.clientX - t, l = e.clientY - n;
475
- if (!(!o && Math.sqrt(s * s + l * l) < wt)) {
475
+ if (!(!o && Math.sqrt(s * s + l * l) < Tt)) {
476
476
  if (!o) {
477
477
  o = !0, c.value = !0, a("interact-start"), q = document.createElement("div"), q.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);";
478
478
  let e = i.zoom;
@@ -571,22 +571,22 @@ var yt = /* @__PURE__ */ j({
571
571
  style: N(e.style),
572
572
  "data-handle": e.pos,
573
573
  onMousedown: K((t) => j(t, e.pos), ["prevent", "stop"])
574
- }, null, 44, bt))), 128)),
574
+ }, null, 44, xt))), 128)),
575
575
  n[5] ||= k("div", { class: "image-overlay__rotate-line" }, null, -1),
576
576
  k("div", {
577
577
  class: "image-overlay__rotate-handle",
578
578
  style: N({ left: `${w.value / 2 - 7}px` }),
579
579
  title: B(r)("imageOverlay.rotate"),
580
580
  onMousedown: n[2] ||= K((e) => me(e), ["prevent", "stop"])
581
- }, null, 44, xt),
582
- s.value ? (I(), O("div", St, z(Math.round(u.value)) + " × " + z(Math.round(d.value)), 1)) : D("", !0),
583
- l.value ? (I(), O("div", Ct, z(Math.round(f.value)) + "° ", 1)) : D("", !0)
581
+ }, null, 44, St),
582
+ s.value ? (I(), O("div", Ct, z(Math.round(u.value)) + " × " + z(Math.round(d.value)), 1)) : D("", !0),
583
+ l.value ? (I(), O("div", wt, z(Math.round(f.value)) + "° ", 1)) : D("", !0)
584
584
  ], 36)) : D("", !0);
585
585
  }
586
- }), [["__scopeId", "data-v-a6f20ec2"]]), Dt = { class: "doc-outline__header" }, Ot = { class: "doc-outline__body" }, kt = {
586
+ }), [["__scopeId", "data-v-a6f20ec2"]]), Ot = { class: "doc-outline__header" }, kt = { class: "doc-outline__body" }, At = {
587
587
  key: 0,
588
588
  class: "doc-outline__empty"
589
- }, At = ["onMousedown"], jt = /* @__PURE__ */ x(/* @__PURE__ */ j({
589
+ }, jt = ["onMousedown"], Mt = /* @__PURE__ */ x(/* @__PURE__ */ j({
590
590
  __name: "DocumentOutline",
591
591
  props: {
592
592
  isOpen: { type: Boolean },
@@ -600,7 +600,7 @@ var yt = /* @__PURE__ */ j({
600
600
  role: "navigation",
601
601
  "aria-label": "Document outline",
602
602
  onMousedown: n[1] ||= K(() => {}, ["stop"])
603
- }, [k("div", Dt, [k("button", {
603
+ }, [k("div", Ot, [k("button", {
604
604
  class: "doc-outline__back",
605
605
  title: "Close outline",
606
606
  "aria-label": "Close outline",
@@ -608,14 +608,14 @@ var yt = /* @__PURE__ */ j({
608
608
  }, [A(c, {
609
609
  name: "arrow_back",
610
610
  size: 20
611
- })]), n[2] ||= k("span", { class: "doc-outline__title" }, "Document Outline", -1)]), k("div", Ot, [e.headings.length === 0 ? (I(), O("div", kt, " No headings found ")) : D("", !0), (I(!0), O(C, null, R(e.headings, (e, n) => (I(), O("button", {
611
+ })]), n[2] ||= k("span", { class: "doc-outline__title" }, "Document Outline", -1)]), k("div", kt, [e.headings.length === 0 ? (I(), O("div", At, " No headings found ")) : D("", !0), (I(!0), O(C, null, R(e.headings, (e, n) => (I(), O("button", {
612
612
  key: n,
613
613
  class: "doc-outline__item",
614
614
  style: N({ paddingLeft: 12 + (e.level - 1) * 16 + "px" }),
615
615
  onMousedown: K((n) => t.$emit("navigate", e.pmPos), ["prevent"])
616
- }, z(e.text || "(untitled)"), 45, At))), 128))])], 32)) : D("", !0);
616
+ }, z(e.text || "(untitled)"), 45, jt))), 128))])], 32)) : D("", !0);
617
617
  }
618
- }), [["__scopeId", "data-v-cb2cdc39"]]), Mt = /* @__PURE__ */ x(/* @__PURE__ */ j({
618
+ }), [["__scopeId", "data-v-cb2cdc39"]]), Nt = /* @__PURE__ */ x(/* @__PURE__ */ j({
619
619
  __name: "PageIndicator",
620
620
  props: {
621
621
  currentPage: {},
@@ -634,10 +634,10 @@ var yt = /* @__PURE__ */ j({
634
634
  total: e.totalPages
635
635
  })), 5));
636
636
  }
637
- }), [["__scopeId", "data-v-d117bf6e"]]), Nt = { class: "hf-editor__label" }, Pt = {
637
+ }), [["__scopeId", "data-v-d117bf6e"]]), Pt = { class: "hf-editor__label" }, Ft = {
638
638
  class: "hf-editor__actions",
639
639
  style: { position: "relative" }
640
- }, Ft = /* @__PURE__ */ x(/* @__PURE__ */ j({
640
+ }, It = /* @__PURE__ */ x(/* @__PURE__ */ j({
641
641
  __name: "InlineHeaderFooterEditor",
642
642
  props: {
643
643
  isOpen: { type: Boolean },
@@ -681,7 +681,7 @@ var yt = /* @__PURE__ */ j({
681
681
  n.isOpen && s();
682
682
  }, { deep: !0 });
683
683
  function c() {
684
- n.view && (r("save", Ne(n.view.state.doc)), r("close"));
684
+ n.view && (r("save", Pe(n.view.state.doc)), r("close"));
685
685
  }
686
686
  return (t, n) => e.isOpen ? (I(), O("div", {
687
687
  key: 0,
@@ -691,7 +691,7 @@ var yt = /* @__PURE__ */ j({
691
691
  class: M(["hf-editor__toolbar", e.position === "footer" ? "hf-editor__toolbar--below" : "hf-editor__toolbar--above"]),
692
692
  onMousedown: n[8] ||= K(() => {}, ["stop"]),
693
693
  onContextmenu: n[9] ||= K(() => {}, ["stop"])
694
- }, [k("span", Nt, z(e.position === "header" ? "Header" : "Footer"), 1), k("div", Pt, [
694
+ }, [k("span", Pt, z(e.position === "header" ? "Header" : "Footer"), 1), k("div", Ft, [
695
695
  k("button", {
696
696
  class: "hf-editor__btn",
697
697
  title: "Options",
@@ -733,10 +733,10 @@ var yt = /* @__PURE__ */ j({
733
733
  }, " Cancel ", 32)
734
734
  ])], 34)], 4)) : D("", !0);
735
735
  }
736
- }), [["__scopeId", "data-v-e93a9f94"]]), It = ["role"], Lt = {
736
+ }), [["__scopeId", "data-v-e93a9f94"]]), Lt = ["role"], Rt = {
737
737
  key: 0,
738
738
  class: "layout-sdt-widget-empty"
739
- }, Rt = ["aria-selected", "onClick"], zt = ["value"], Bt = /* @__PURE__ */ j({
739
+ }, zt = ["aria-selected", "onClick"], Bt = ["value"], Vt = /* @__PURE__ */ j({
740
740
  __name: "ContentControlWidgets",
741
741
  props: {
742
742
  container: {},
@@ -758,7 +758,7 @@ var yt = /* @__PURE__ */ j({
758
758
  function o(e) {
759
759
  let r = n.view, i = t(e.dataset.sdtGroupId);
760
760
  if (!(!r || i == null)) try {
761
- let t = e.dataset.sdtRepeat === "add" ? Fe(r.state, i) : Re(r.state, i);
761
+ let t = e.dataset.sdtRepeat === "add" ? Ie(r.state, i) : Re(r.state, i);
762
762
  r.dispatch(t), r.focus();
763
763
  } catch {}
764
764
  }
@@ -769,7 +769,7 @@ var yt = /* @__PURE__ */ j({
769
769
  function c(e) {
770
770
  let t = n.view, i = e.dataset.sdtTag, o = e.dataset.sdtWidget;
771
771
  if (!t || !i || !o) return;
772
- let s = X(t.state.doc, { tag: i })[0], c = e.getBoundingClientRect();
772
+ let s = Z(t.state.doc, { tag: i })[0], c = e.getBoundingClientRect();
773
773
  o === "checkbox" ? a(i, {
774
774
  kind: "checkbox",
775
775
  checked: !s?.checked
@@ -849,7 +849,7 @@ var yt = /* @__PURE__ */ j({
849
849
  }),
850
850
  onKeydown: m,
851
851
  onMousedown: t[0] ||= K(() => {}, ["prevent"])
852
- }, [r.value.kind === "dropdown" ? (I(), O(C, { key: 0 }, [r.value.items.length === 0 ? (I(), O("div", Lt, "No options")) : D("", !0), (I(!0), O(C, null, R(r.value.items, (e) => (I(), O("button", {
852
+ }, [r.value.kind === "dropdown" ? (I(), O(C, { key: 0 }, [r.value.items.length === 0 ? (I(), O("div", Rt, "No options")) : D("", !0), (I(!0), O(C, null, R(r.value.items, (e) => (I(), O("button", {
853
853
  key: e.value,
854
854
  type: "button",
855
855
  role: "option",
@@ -859,18 +859,18 @@ var yt = /* @__PURE__ */ j({
859
859
  kind: "dropdown",
860
860
  value: e.value
861
861
  })
862
- }, z(e.displayText), 11, Rt))), 128))], 64)) : (I(), O("input", {
862
+ }, z(e.displayText), 11, zt))), 128))], 64)) : (I(), O("input", {
863
863
  key: 1,
864
864
  type: "date",
865
865
  class: "layout-sdt-widget-date",
866
866
  value: r.value.current,
867
867
  onChange: h
868
- }, null, 40, zt))], 44, It)) : D("", !0);
868
+ }, null, 40, Bt))], 44, Lt)) : D("", !0);
869
869
  }
870
- }), Vt = {
870
+ }), Ht = {
871
871
  key: 0,
872
872
  class: "docx-editor-vue__title-bar"
873
- }, Ht = { class: "docx-editor-vue__title-bar-left" }, Ut = { class: "docx-editor-vue__title-bar-center" }, Wt = { class: "docx-editor-vue__title-bar-right" }, Gt = /* @__PURE__ */ j({
873
+ }, Ut = { class: "docx-editor-vue__title-bar-left" }, Wt = { class: "docx-editor-vue__title-bar-center" }, Gt = { class: "docx-editor-vue__title-bar-right" }, Kt = /* @__PURE__ */ j({
874
874
  __name: "DocxEditorMenuBar",
875
875
  props: {
876
876
  showMenuBar: { type: Boolean },
@@ -889,9 +889,9 @@ var yt = /* @__PURE__ */ j({
889
889
  ],
890
890
  setup(e, { emit: t }) {
891
891
  let n = t;
892
- return (t, r) => e.showMenuBar ? (I(), O("div", Vt, [
893
- k("div", Ht, [e.renderLogo ? (I(), E(ue(e.renderLogo), { key: 0 })) : D("", !0), le(t.$slots, "title-bar-left")]),
894
- k("div", Ut, [A(g, {
892
+ return (t, r) => e.showMenuBar ? (I(), O("div", Ht, [
893
+ k("div", Ut, [e.renderLogo ? (I(), E(ue(e.renderLogo), { key: 0 })) : D("", !0), le(t.$slots, "title-bar-left")]),
894
+ k("div", Wt, [A(g, {
895
895
  "model-value": e.documentName,
896
896
  editable: e.documentNameEditable,
897
897
  "onUpdate:modelValue": r[0] ||= (e) => n("rename", e)
@@ -899,10 +899,10 @@ var yt = /* @__PURE__ */ j({
899
899
  onAction: r[1] ||= (e) => n("menu-action", e),
900
900
  onInsertTable: r[2] ||= (e, t) => n("insert-table", e, t)
901
901
  })]),
902
- k("div", Wt, [le(t.$slots, "title-bar-right"), e.renderTitleBarRight ? (I(), E(ue(e.renderTitleBarRight), { key: 0 })) : D("", !0)])
902
+ k("div", Gt, [le(t.$slots, "title-bar-right"), e.renderTitleBarRight ? (I(), E(ue(e.renderTitleBarRight), { key: 0 })) : D("", !0)])
903
903
  ])) : D("", !0);
904
904
  }
905
- }), Kt = /* @__PURE__ */ j({
905
+ }), qt = /* @__PURE__ */ j({
906
906
  __name: "DocxEditorDialogs",
907
907
  props: {
908
908
  view: {},
@@ -989,10 +989,10 @@ var yt = /* @__PURE__ */ j({
989
989
  }, null, 8, ["is-open"])
990
990
  ], 64));
991
991
  }
992
- }), qt = ["disabled", "onMousedown"], Jt = { class: "ctx-menu__label" }, Yt = {
992
+ }), Jt = ["disabled", "onMousedown"], Yt = { class: "ctx-menu__label" }, Xt = {
993
993
  key: 0,
994
994
  class: "ctx-menu__shortcut"
995
- }, Xt = 220, Zt = 32, Qt = 10, $t = /* @__PURE__ */ x(/* @__PURE__ */ j({
995
+ }, Zt = 220, Qt = 32, $t = 10, en = /* @__PURE__ */ x(/* @__PURE__ */ j({
996
996
  __name: "TextContextMenu",
997
997
  props: {
998
998
  isOpen: { type: Boolean },
@@ -1125,8 +1125,8 @@ var yt = /* @__PURE__ */ j({
1125
1125
  disabled: !n.canSplitCell
1126
1126
  }), e;
1127
1127
  }), o = T(() => {
1128
- let e = n.position.x, t = n.position.y, r = a.value.filter((e) => !e.divider).length, i = a.value.filter((e) => e.divider).length, o = r * Zt + i * 9;
1129
- return typeof window < "u" && (e + Xt + Qt > window.innerWidth && (e = window.innerWidth - Xt - Qt), t + o + Qt > window.innerHeight && (t = window.innerHeight - o - Qt)), {
1128
+ let e = n.position.x, t = n.position.y, r = a.value.filter((e) => !e.divider).length, i = a.value.filter((e) => e.divider).length, o = r * Qt + i * 9;
1129
+ return typeof window < "u" && (e + Zt + $t > window.innerWidth && (e = window.innerWidth - Zt - $t), t + o + $t > window.innerHeight && (t = window.innerHeight - o - $t)), {
1130
1130
  position: "fixed",
1131
1131
  left: `${e}px`,
1132
1132
  top: `${t}px`,
@@ -1162,27 +1162,27 @@ var yt = /* @__PURE__ */ j({
1162
1162
  }]),
1163
1163
  disabled: e.disabled,
1164
1164
  onMousedown: K((t) => s(e.action), ["prevent"])
1165
- }, [k("span", Jt, z(e.label), 1), e.shortcut ? (I(), O("span", Yt, z(e.shortcut), 1)) : D("", !0)], 42, qt))), 128))], 36)) : D("", !0)]));
1165
+ }, [k("span", Yt, z(e.label), 1), e.shortcut ? (I(), O("span", Xt, z(e.shortcut), 1)) : D("", !0)], 42, Jt))), 128))], 36)) : D("", !0)]));
1166
1166
  }
1167
- }), [["__scopeId", "data-v-741c4f71"]]), en = ["aria-label"], tn = { class: "image-ctx-menu__icon" }, nn = { class: "image-ctx-menu__label" }, rn = {
1167
+ }), [["__scopeId", "data-v-741c4f71"]]), tn = ["aria-label"], nn = { class: "image-ctx-menu__icon" }, rn = { class: "image-ctx-menu__label" }, an = {
1168
1168
  key: 1,
1169
1169
  class: "image-ctx-menu__divider",
1170
1170
  role: "separator"
1171
- }, an = [
1171
+ }, on = [
1172
1172
  "data-wrap-type",
1173
1173
  "data-current",
1174
1174
  "data-disabled",
1175
1175
  "disabled",
1176
1176
  "title",
1177
1177
  "onClick"
1178
- ], on = { class: "image-ctx-menu__icon" }, sn = { class: "image-ctx-menu__label" }, cn = ["aria-label"], ln = ["disabled", "onClick"], un = { class: "image-ctx-menu__label" }, dn = {
1178
+ ], sn = { class: "image-ctx-menu__icon" }, cn = { class: "image-ctx-menu__label" }, ln = ["aria-label"], un = ["disabled", "onClick"], dn = { class: "image-ctx-menu__label" }, fn = {
1179
1179
  key: 0,
1180
1180
  class: "image-ctx-menu__shortcut"
1181
- }, fn = {
1181
+ }, pn = {
1182
1182
  key: 0,
1183
1183
  class: "image-ctx-menu__divider",
1184
1184
  role: "separator"
1185
- }, pn = 18, mn = 260, Q = 10, $ = /* @__PURE__ */ x(/* @__PURE__ */ j({
1185
+ }, mn = 18, Q = 260, $ = 10, hn = /* @__PURE__ */ x(/* @__PURE__ */ j({
1186
1186
  __name: "ImageContextMenu",
1187
1187
  props: {
1188
1188
  state: {},
@@ -1216,11 +1216,11 @@ var yt = /* @__PURE__ */ j({
1216
1216
  let p = T(() => {
1217
1217
  if (!r.state) return {};
1218
1218
  let e = Y.length * 36 + 16, t = r.state.position.x, n = r.state.position.y;
1219
- return typeof window < "u" && (t + mn > window.innerWidth && (t = window.innerWidth - mn - Q), n + e > window.innerHeight && (n = window.innerHeight - e - Q), t < Q && (t = Q), n < Q && (n = Q)), {
1219
+ return typeof window < "u" && (t + Q > window.innerWidth && (t = window.innerWidth - Q - $), n + e > window.innerHeight && (n = window.innerHeight - e - $), t < $ && (t = $), n < $ && (n = $)), {
1220
1220
  position: "fixed",
1221
1221
  left: `${t}px`,
1222
1222
  top: `${n}px`,
1223
- minWidth: `${mn}px`,
1223
+ minWidth: `${Q}px`,
1224
1224
  zIndex: 400
1225
1225
  };
1226
1226
  });
@@ -1264,11 +1264,11 @@ var yt = /* @__PURE__ */ j({
1264
1264
  "data-action": "open-properties",
1265
1265
  onMousedown: n[1] ||= K(() => {}, ["prevent"]),
1266
1266
  onClick: a
1267
- }, [k("span", tn, [A(c, {
1267
+ }, [k("span", nn, [A(c, {
1268
1268
  name: "settings",
1269
- size: pn
1270
- })]), k("span", nn, z(B(o)("imageWrap.menu.imageProperties")), 1)], 32)) : D("", !0),
1271
- e.canOpenProperties ? (I(), O("div", rn)) : D("", !0),
1269
+ size: mn
1270
+ })]), k("span", rn, z(B(o)("imageWrap.menu.imageProperties")), 1)], 32)) : D("", !0),
1271
+ e.canOpenProperties ? (I(), O("div", an)) : D("", !0),
1272
1272
  (I(!0), O(C, null, R(B(l), (e) => (I(), O("button", {
1273
1273
  key: e.choice,
1274
1274
  type: "button",
@@ -1282,17 +1282,17 @@ var yt = /* @__PURE__ */ j({
1282
1282
  onMousedown: n[2] ||= K(() => {}, ["prevent"]),
1283
1283
  onClick: (t) => h(e)
1284
1284
  }, [
1285
- k("span", on, [A(c, {
1285
+ k("span", sn, [A(c, {
1286
1286
  name: f(e.iconHint),
1287
- size: pn
1287
+ size: mn
1288
1288
  }, null, 8, ["name"])]),
1289
- k("span", sn, z(B(o)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
1289
+ k("span", cn, z(B(o)(`imageWrap.menu.${e.i18nLabelKey}`)), 1),
1290
1290
  e.choice === u.value ? (I(), O("span", {
1291
1291
  key: 0,
1292
1292
  class: "image-ctx-menu__current-dot",
1293
1293
  "aria-label": B(o)("imageWrap.menu.ariaLabel")
1294
- }, "●", 8, cn)) : D("", !0)
1295
- ], 42, an))), 128)),
1294
+ }, "●", 8, ln)) : D("", !0)
1295
+ ], 42, on))), 128)),
1296
1296
  e.textActions && e.textActions.length > 0 ? (I(), O(C, { key: 2 }, [n[5] ||= k("div", {
1297
1297
  class: "image-ctx-menu__divider",
1298
1298
  role: "separator"
@@ -1303,10 +1303,10 @@ var yt = /* @__PURE__ */ j({
1303
1303
  disabled: e.disabled,
1304
1304
  onMousedown: n[3] ||= K(() => {}, ["prevent"]),
1305
1305
  onClick: (t) => g(e)
1306
- }, [k("span", un, z(e.label), 1), e.shortcut ? (I(), O("span", dn, z(e.shortcut), 1)) : D("", !0)], 40, ln), e.dividerAfter ? (I(), O("div", fn)) : D("", !0)], 64))), 128))], 64)) : D("", !0)
1307
- ], 44, en)) : D("", !0)]));
1306
+ }, [k("span", dn, z(e.label), 1), e.shortcut ? (I(), O("span", fn, z(e.shortcut), 1)) : D("", !0)], 40, un), e.dividerAfter ? (I(), O("div", pn)) : D("", !0)], 64))), 128))], 64)) : D("", !0)
1307
+ ], 44, tn)) : D("", !0)]));
1308
1308
  }
1309
- }), [["__scopeId", "data-v-5c21ca8c"]]), hn = /* @__PURE__ */ j({
1309
+ }), [["__scopeId", "data-v-5c21ca8c"]]), gn = /* @__PURE__ */ j({
1310
1310
  __name: "DocxEditorOverlays",
1311
1311
  props: {
1312
1312
  readOnly: { type: Boolean },
@@ -1324,7 +1324,7 @@ var yt = /* @__PURE__ */ j({
1324
1324
  ],
1325
1325
  setup(e, { emit: t }) {
1326
1326
  let n = t;
1327
- return (t, r) => (I(), O(C, null, [A($t, {
1327
+ return (t, r) => (I(), O(C, null, [A(en, {
1328
1328
  "is-open": e.contextMenu.isOpen,
1329
1329
  position: e.contextMenu.position,
1330
1330
  "has-selection": e.contextMenu.hasSelection,
@@ -1344,7 +1344,7 @@ var yt = /* @__PURE__ */ j({
1344
1344
  "on-image",
1345
1345
  "can-merge-cells",
1346
1346
  "can-split-cell"
1347
- ]), A($, {
1347
+ ]), A(hn, {
1348
1348
  state: e.imageContextMenu,
1349
1349
  "text-actions": e.imageContextMenuTextActions,
1350
1350
  "can-open-properties": e.canOpenImageProperties,
@@ -1358,7 +1358,7 @@ var yt = /* @__PURE__ */ j({
1358
1358
  "can-open-properties"
1359
1359
  ])], 64));
1360
1360
  }
1361
- }), gn = ["href", "title"], _n = ["title"], vn = ["title"], yn = ["title"], bn = { class: "docx-hyperlink-popup__edit-row" }, xn = ["placeholder", "onKeydown"], Sn = { class: "docx-hyperlink-popup__edit-row" }, Cn = ["onKeydown"], wn = ["disabled"], Tn = /* @__PURE__ */ x(/* @__PURE__ */ j({
1361
+ }), _n = ["href", "title"], vn = ["title"], yn = ["title"], bn = ["title"], xn = { class: "docx-hyperlink-popup__edit-row" }, Sn = ["placeholder", "onKeydown"], Cn = { class: "docx-hyperlink-popup__edit-row" }, wn = ["onKeydown"], Tn = ["disabled"], En = /* @__PURE__ */ x(/* @__PURE__ */ j({
1362
1362
  __name: "HyperlinkPopup",
1363
1363
  props: {
1364
1364
  data: {},
@@ -1407,28 +1407,28 @@ var yt = /* @__PURE__ */ j({
1407
1407
  class: M(["docx-hyperlink-popup", { "docx-hyperlink-popup--edit": o.value }]),
1408
1408
  style: N(u.value),
1409
1409
  onMousedown: n[6] ||= K(() => {}, ["stop"])
1410
- }, [o.value ? (I(), O(C, { key: 1 }, [k("div", bn, [W(k("input", {
1410
+ }, [o.value ? (I(), O(C, { key: 1 }, [k("div", xn, [W(k("input", {
1411
1411
  class: "docx-hyperlink-popup__input",
1412
1412
  placeholder: B(r)("hyperlinkPopup.displayTextPlaceholder"),
1413
1413
  "onUpdate:modelValue": n[2] ||= (e) => s.value = e,
1414
1414
  onKeydown: [G(K(h, ["prevent"]), ["enter"]), n[3] ||= G((e) => t.$emit("close"), ["esc"])]
1415
- }, null, 40, xn), [[V, s.value]])]), k("div", Sn, [W(k("input", {
1415
+ }, null, 40, Sn), [[V, s.value]])]), k("div", Cn, [W(k("input", {
1416
1416
  class: "docx-hyperlink-popup__input",
1417
1417
  placeholder: "https://...",
1418
1418
  "onUpdate:modelValue": n[4] ||= (e) => c.value = e,
1419
1419
  onKeydown: [G(K(h, ["prevent"]), ["enter"]), n[5] ||= G((e) => t.$emit("close"), ["esc"])]
1420
- }, null, 40, Cn), [[V, c.value]]), k("button", {
1420
+ }, null, 40, wn), [[V, c.value]]), k("button", {
1421
1421
  class: "docx-hyperlink-popup__apply",
1422
1422
  disabled: !c.value.trim(),
1423
1423
  onClick: K(h, ["prevent"])
1424
- }, z(B(r)("common.apply")), 9, wn)])], 64)) : (I(), O(C, { key: 0 }, [
1424
+ }, z(B(r)("common.apply")), 9, Tn)])], 64)) : (I(), O(C, { key: 0 }, [
1425
1425
  n[10] ||= oe("<span class=\"docx-hyperlink-popup__icon\" aria-hidden data-v-9d23bb12><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-9d23bb12><circle cx=\"12\" cy=\"12\" r=\"10\" data-v-9d23bb12></circle><path d=\"M2 12h20\" data-v-9d23bb12></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-9d23bb12></path></svg></span>", 1),
1426
1426
  k("a", {
1427
1427
  class: "docx-hyperlink-popup__url",
1428
1428
  href: e.data.href,
1429
1429
  title: e.data.href,
1430
1430
  onClick: n[0] ||= K((n) => t.$emit("navigate", e.data.href), ["prevent"])
1431
- }, z(e.data.href), 9, gn),
1431
+ }, z(e.data.href), 9, _n),
1432
1432
  n[11] ||= k("span", { class: "docx-hyperlink-popup__sep" }, null, -1),
1433
1433
  k("button", {
1434
1434
  class: "docx-hyperlink-popup__btn",
@@ -1450,7 +1450,7 @@ var yt = /* @__PURE__ */ j({
1450
1450
  height: "13",
1451
1451
  rx: "2",
1452
1452
  ry: "2"
1453
- }), k("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, _n),
1453
+ }), k("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })], -1)]], 8, vn),
1454
1454
  e.readOnly ? D("", !0) : (I(), O("button", {
1455
1455
  key: 0,
1456
1456
  class: "docx-hyperlink-popup__btn",
@@ -1465,19 +1465,19 @@ var yt = /* @__PURE__ */ j({
1465
1465
  "stroke-width": "2",
1466
1466
  "stroke-linecap": "round",
1467
1467
  "stroke-linejoin": "round"
1468
- }, [k("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), k("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, vn)),
1468
+ }, [k("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), k("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, yn)),
1469
1469
  e.readOnly ? D("", !0) : (I(), O("button", {
1470
1470
  key: 1,
1471
1471
  class: "docx-hyperlink-popup__btn",
1472
1472
  title: B(r)("hyperlinkPopup.removeLink"),
1473
1473
  onClick: n[1] ||= K((e) => t.$emit("remove"), ["prevent"])
1474
- }, [...n[9] ||= [oe("<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-9d23bb12><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-9d23bb12></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-9d23bb12></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-9d23bb12></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-9d23bb12></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-9d23bb12></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-9d23bb12></line></svg>", 1)]], 8, yn))
1474
+ }, [...n[9] ||= [oe("<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-9d23bb12><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-9d23bb12></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-9d23bb12></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\" data-v-9d23bb12></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\" data-v-9d23bb12></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\" data-v-9d23bb12></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\" data-v-9d23bb12></line></svg>", 1)]], 8, bn))
1475
1475
  ], 64))], 38)) : D("", !0);
1476
1476
  }
1477
1477
  }), [["__scopeId", "data-v-9d23bb12"]]);
1478
1478
  //#endregion
1479
1479
  //#region src/composables/useFileIO.ts
1480
- function En(e) {
1480
+ function Dn(e) {
1481
1481
  let t = L(null);
1482
1482
  async function n() {
1483
1483
  await e.nextTick(), e.extractCommentsAndChanges(), e.emit("ready");
@@ -1523,7 +1523,7 @@ function En(e) {
1523
1523
  }
1524
1524
  //#endregion
1525
1525
  //#region src/composables/useHyperlinkManagement.ts
1526
- function Dn(e) {
1526
+ function On(e) {
1527
1527
  let t = L(null);
1528
1528
  function n(t) {
1529
1529
  let n = e.editorView.value;
@@ -1585,7 +1585,7 @@ function Dn(e) {
1585
1585
  }
1586
1586
  //#endregion
1587
1587
  //#region src/composables/useFormattingActions.ts
1588
- function On(e) {
1588
+ function kn(e) {
1589
1589
  function t() {
1590
1590
  let t = e.editorView.value;
1591
1591
  t && (q(t.state, t.dispatch, t), t.focus());
@@ -1595,17 +1595,17 @@ function On(e) {
1595
1595
  if (!n) return;
1596
1596
  let r = e.getDocument()?.package?.styles;
1597
1597
  if (r) {
1598
- let e = Xe(r).resolveParagraphStyle(t);
1599
- Z(t, {
1598
+ let e = Ze(r).resolveParagraphStyle(t);
1599
+ Ke(t, {
1600
1600
  paragraphFormatting: e.paragraphFormatting,
1601
1601
  runFormatting: e.runFormatting
1602
1602
  })(n.state, (e) => n.dispatch(e));
1603
- } else Z(t)(n.state, (e) => n.dispatch(e));
1603
+ } else Ke(t)(n.state, (e) => n.dispatch(e));
1604
1604
  n.focus();
1605
1605
  }
1606
1606
  function r() {
1607
1607
  let t = e.editorView.value;
1608
- t && (Ze(t.state, (e) => t.dispatch(e), t), t.focus());
1608
+ t && (Qe(t.state, (e) => t.dispatch(e), t), t.focus());
1609
1609
  }
1610
1610
  function i(t) {
1611
1611
  let n = e.editorView.value;
@@ -1616,11 +1616,11 @@ function On(e) {
1616
1616
  function a(t) {
1617
1617
  let n = e.editorView.value;
1618
1618
  if (!n) return !1;
1619
- let r = ft(n.state.doc, t.paraId);
1619
+ let r = pt(n.state.doc, t.paraId);
1620
1620
  if (!r) return !1;
1621
1621
  let i = r.from + 1, a = r.to - 1;
1622
1622
  if (t.search) {
1623
- let e = ht(n.state.doc, r.from, r.to, t.search);
1623
+ let e = gt(n.state.doc, r.from, r.to, t.search);
1624
1624
  if (!e) return !1;
1625
1625
  i = e.from, a = e.to;
1626
1626
  }
@@ -1633,7 +1633,7 @@ function On(e) {
1633
1633
  return s.strike !== void 0 && o.marks.strike && (c = s.strike ? c.addMark(i, a, o.marks.strike.create()) : c.removeMark(i, a, o.marks.strike)), s.color !== void 0 && o.marks.textColor && (c = s.color && (s.color.rgb || s.color.themeColor) ? c.addMark(i, a, o.marks.textColor.create({
1634
1634
  rgb: s.color.rgb ?? null,
1635
1635
  themeColor: s.color.themeColor ?? null
1636
- })) : c.removeMark(i, a, o.marks.textColor)), s.highlight !== void 0 && o.marks.highlight && (c = s.highlight ? c.addMark(i, a, o.marks.highlight.create({ color: Qe(s.highlight) || s.highlight })) : c.removeMark(i, a, o.marks.highlight)), s.fontSize !== void 0 && o.marks.fontSize && (c = s.fontSize > 0 ? c.addMark(i, a, o.marks.fontSize.create({ size: He(s.fontSize) })) : c.removeMark(i, a, o.marks.fontSize)), s.fontFamily !== void 0 && o.marks.fontFamily && (c = s.fontFamily && (s.fontFamily.ascii || s.fontFamily.hAnsi) ? c.addMark(i, a, o.marks.fontFamily.create({
1636
+ })) : c.removeMark(i, a, o.marks.textColor)), s.highlight !== void 0 && o.marks.highlight && (c = s.highlight ? c.addMark(i, a, o.marks.highlight.create({ color: $e(s.highlight) || s.highlight })) : c.removeMark(i, a, o.marks.highlight)), s.fontSize !== void 0 && o.marks.fontSize && (c = s.fontSize > 0 ? c.addMark(i, a, o.marks.fontSize.create({ size: He(s.fontSize) })) : c.removeMark(i, a, o.marks.fontSize)), s.fontFamily !== void 0 && o.marks.fontFamily && (c = s.fontFamily && (s.fontFamily.ascii || s.fontFamily.hAnsi) ? c.addMark(i, a, o.marks.fontFamily.create({
1637
1637
  ascii: s.fontFamily.ascii ?? null,
1638
1638
  hAnsi: s.fontFamily.hAnsi ?? s.fontFamily.ascii ?? null
1639
1639
  })) : c.removeMark(i, a, o.marks.fontFamily)), n.dispatch(c), !0;
@@ -1641,17 +1641,17 @@ function On(e) {
1641
1641
  function o(t) {
1642
1642
  let n = e.editorView.value;
1643
1643
  if (!n) return !1;
1644
- let r = ft(n.state.doc, t.paraId);
1644
+ let r = pt(n.state.doc, t.paraId);
1645
1645
  if (!r) return !1;
1646
- let i = e.getDocument(), a = i?.package?.styles ? Xe(i.package.styles) : null;
1646
+ let i = e.getDocument(), a = i?.package?.styles ? Ze(i.package.styles) : null;
1647
1647
  if (a && !a.hasParagraphStyle(t.styleId)) return !1;
1648
1648
  let o = n.state.doc.resolve(r.from + 1), s = n.state.doc.resolve(r.to - 1), c = n.state.apply(n.state.tr.setSelection(pe.between(o, s))), l = a ? (() => {
1649
1649
  let e = a.resolveParagraphStyle(t.styleId);
1650
- return Z(t.styleId, {
1650
+ return Ke(t.styleId, {
1651
1651
  paragraphFormatting: e.paragraphFormatting,
1652
1652
  runFormatting: e.runFormatting
1653
1653
  });
1654
- })() : Z(t.styleId), u = !1;
1654
+ })() : Ke(t.styleId), u = !1;
1655
1655
  return l(c, (e) => {
1656
1656
  u = !0, e.setSelection(n.state.selection.map(e.doc, e.mapping)), n.dispatch(e);
1657
1657
  }), u;
@@ -1667,7 +1667,7 @@ function On(e) {
1667
1667
  }
1668
1668
  //#endregion
1669
1669
  //#region src/composables/usePageSetupControls.ts
1670
- function kn(e) {
1670
+ function An(e) {
1671
1671
  function t(t) {
1672
1672
  let n = e.getDocument();
1673
1673
  if (!n?.package?.document) return;
@@ -1694,19 +1694,19 @@ function kn(e) {
1694
1694
  }
1695
1695
  function s(t) {
1696
1696
  let n = e.editorView.value;
1697
- n && Je(t)(n.state, n.dispatch);
1697
+ n && Ye(t)(n.state, n.dispatch);
1698
1698
  }
1699
1699
  function c(t) {
1700
1700
  let n = e.editorView.value;
1701
- n && Ye(t)(n.state, n.dispatch);
1701
+ n && Xe(t)(n.state, n.dispatch);
1702
1702
  }
1703
1703
  function l(t) {
1704
1704
  let n = e.editorView.value;
1705
- n && (t < 0 ? qe(-t, !0)(n.state, n.dispatch) : qe(t, !1)(n.state, n.dispatch));
1705
+ n && (t < 0 ? Je(-t, !0)(n.state, n.dispatch) : Je(t, !1)(n.state, n.dispatch));
1706
1706
  }
1707
1707
  function u(t) {
1708
1708
  let n = e.editorView.value;
1709
- n && Ke(t)(n.state, n.dispatch);
1709
+ n && qe(t)(n.state, n.dispatch);
1710
1710
  }
1711
1711
  return {
1712
1712
  handlePageSetupApply: t,
@@ -1722,11 +1722,11 @@ function kn(e) {
1722
1722
  }
1723
1723
  //#endregion
1724
1724
  //#region src/composables/useOutlineSidebar.ts
1725
- function An(e) {
1725
+ function jn(e) {
1726
1726
  function t() {
1727
1727
  if (!e.showOutline.value) {
1728
1728
  let t = e.editorView.value;
1729
- t && (e.outlineHeadings.value = $e(t.state.doc));
1729
+ t && (e.outlineHeadings.value = et(t.state.doc));
1730
1730
  }
1731
1731
  e.showOutline.value = !e.showOutline.value;
1732
1732
  }
@@ -1752,7 +1752,7 @@ function An(e) {
1752
1752
  }
1753
1753
  //#endregion
1754
1754
  //#region src/composables/useKeyboardShortcuts.ts
1755
- function jn(e) {
1755
+ function Mn(e) {
1756
1756
  function t(t) {
1757
1757
  if (t.key === "F1") {
1758
1758
  t.preventDefault(), e.showKeyboardShortcuts.value = !0;
@@ -1764,7 +1764,7 @@ function jn(e) {
1764
1764
  }
1765
1765
  //#endregion
1766
1766
  //#region src/utils/commentFactories.ts
1767
- function Mn(e, t, n, r) {
1767
+ function Nn(e, t, n, r) {
1768
1768
  return {
1769
1769
  id: e.reduce((e, t) => Math.max(e, t.id), 0) + 1,
1770
1770
  author: n,
@@ -1786,9 +1786,9 @@ function Mn(e, t, n, r) {
1786
1786
  }
1787
1787
  //#endregion
1788
1788
  //#region src/composables/useCommentManagement.ts
1789
- function Nn(e) {
1789
+ function Pn(e) {
1790
1790
  function t(t, n, r) {
1791
- return Mn(e.getDocument()?.package?.document?.comments ?? [], t, n, r);
1791
+ return Nn(e.getDocument()?.package?.document?.comments ?? [], t, n, r);
1792
1792
  }
1793
1793
  function n(n) {
1794
1794
  let r = e.getDocument(), i = e.editorView.value;
@@ -1796,11 +1796,11 @@ function Nn(e) {
1796
1796
  r.package.document.comments || (r.package.document.comments = []);
1797
1797
  let a = i.state.schema.marks.comment;
1798
1798
  if (!a) return null;
1799
- let o = ft(i.state.doc, n.paraId);
1799
+ let o = pt(i.state.doc, n.paraId);
1800
1800
  if (!o) return null;
1801
1801
  let s = o.from + 1, c = o.to - 1;
1802
1802
  if (n.search) {
1803
- let e = ht(i.state.doc, o.from, o.to, n.search);
1803
+ let e = gt(i.state.doc, o.from, o.to, n.search);
1804
1804
  if (!e) return null;
1805
1805
  s = e.from, c = e.to;
1806
1806
  }
@@ -1825,14 +1825,14 @@ function Nn(e) {
1825
1825
  if (!n) return !1;
1826
1826
  let { schema: r } = n.state;
1827
1827
  if (!r.marks.deletion || !r.marks.insertion) return !1;
1828
- let i = ft(n.state.doc, t.paraId);
1828
+ let i = pt(n.state.doc, t.paraId);
1829
1829
  if (!i) return !1;
1830
1830
  let a = t.search === "", o = t.replaceWith === "";
1831
1831
  if (a && o) return !1;
1832
1832
  let s, c;
1833
1833
  if (a) s = i.to - 1, c = i.to - 1;
1834
1834
  else {
1835
- let e = ht(n.state.doc, i.from, i.to, t.search);
1835
+ let e = gt(n.state.doc, i.from, i.to, t.search);
1836
1836
  if (!e) return !1;
1837
1837
  s = e.from, c = e.to;
1838
1838
  }
@@ -1867,19 +1867,19 @@ function Nn(e) {
1867
1867
  }
1868
1868
  function l(t, n) {
1869
1869
  let r = e.editorView.value;
1870
- r && (et(t, n)(r.state, r.dispatch), e.extractCommentsAndChanges(), r.focus());
1870
+ r && (tt(t, n)(r.state, r.dispatch), e.extractCommentsAndChanges(), r.focus());
1871
1871
  }
1872
1872
  function u(t, n) {
1873
1873
  let r = e.editorView.value;
1874
- r && (rt(t, n)(r.state, r.dispatch), e.extractCommentsAndChanges(), r.focus());
1874
+ r && (it(t, n)(r.state, r.dispatch), e.extractCommentsAndChanges(), r.focus());
1875
1875
  }
1876
1876
  function d(t) {
1877
1877
  let n = e.editorView.value;
1878
- n && (tt(t)(n.state, n.dispatch), e.extractCommentsAndChanges(), n.focus());
1878
+ n && (nt(t)(n.state, n.dispatch), e.extractCommentsAndChanges(), n.focus());
1879
1879
  }
1880
1880
  function f(t) {
1881
1881
  let n = e.editorView.value;
1882
- n && (it(t)(n.state, n.dispatch), e.extractCommentsAndChanges(), n.focus());
1882
+ n && (at(t)(n.state, n.dispatch), e.extractCommentsAndChanges(), n.focus());
1883
1883
  }
1884
1884
  function p(n, r) {
1885
1885
  let i = e.getDocument(), a = e.editorView.value;
@@ -1915,7 +1915,7 @@ function Nn(e) {
1915
1915
  }
1916
1916
  //#endregion
1917
1917
  //#region src/utils/domQueries.ts
1918
- function Pn(e, t) {
1918
+ function Fn(e, t) {
1919
1919
  let n = ge(e);
1920
1920
  for (let e of n) {
1921
1921
  let n = Number(e.dataset.pmStart), r = Number(e.dataset.pmEnd);
@@ -1923,7 +1923,7 @@ function Pn(e, t) {
1923
1923
  }
1924
1924
  return null;
1925
1925
  }
1926
- function Fn(e, t, n) {
1926
+ function In(e, t, n) {
1927
1927
  if (!e || !t) return;
1928
1928
  let r = null;
1929
1929
  for (let t of ge(e)) {
@@ -1940,21 +1940,21 @@ function Fn(e, t, n) {
1940
1940
  behavior: "smooth"
1941
1941
  });
1942
1942
  }
1943
- function In(e, t, n, r) {
1943
+ function Ln(e, t, n, r) {
1944
1944
  if (!e || !t) return null;
1945
1945
  let i = me(e, n, r, 1);
1946
1946
  return i === null || i < 0 ? null : Math.min(i, t.state.doc.content.size);
1947
1947
  }
1948
- function Ln(e, t, n) {
1948
+ function Rn(e, t, n) {
1949
1949
  if (!e) return;
1950
- let r = Pn(e, t);
1950
+ let r = Fn(e, t);
1951
1951
  if (!r) return;
1952
1952
  let i = r.textContent || "", a = Number(r.dataset.pmStart) || 0, [o, s] = ve(i, t - a), c = a + o, l = a + s;
1953
1953
  c < l && n(c, l);
1954
1954
  }
1955
- function Rn(e, t, n) {
1955
+ function zn(e, t, n) {
1956
1956
  if (!e) return;
1957
- let r = Pn(e, t);
1957
+ let r = Fn(e, t);
1958
1958
  if (!r) return;
1959
1959
  let i = r.closest(".layout-paragraph");
1960
1960
  if (!i) return;
@@ -1963,11 +1963,11 @@ function Rn(e, t, n) {
1963
1963
  }
1964
1964
  //#endregion
1965
1965
  //#region src/composables/useCommentLifecycle.ts
1966
- function zn(e) {
1966
+ function Bn(e) {
1967
1967
  let t = L(null), n = L(null), r = L(null), i = L(!1);
1968
1968
  function a() {
1969
1969
  let t = e.getDocument(), n = e.editorView.value;
1970
- !t || !n || (e.comments.value = [...t.package?.document?.comments ?? []], e.trackedChanges.value = at(n.state).entries, !i.value && (e.comments.value.length > 0 || e.trackedChanges.value.length > 0) && (e.showSidebar.value = !0, i.value = !0));
1970
+ !t || !n || (e.comments.value = [...t.package?.document?.comments ?? []], e.trackedChanges.value = ot(n.state).entries, !i.value && (e.comments.value.length > 0 || e.trackedChanges.value.length > 0) && (e.showSidebar.value = !0, i.value = !0));
1971
1971
  }
1972
1972
  function o() {
1973
1973
  e.stateTick.value;
@@ -1986,7 +1986,7 @@ function zn(e) {
1986
1986
  t.value = null;
1987
1987
  return;
1988
1988
  }
1989
- let s = o.getBoundingClientRect(), c = Pn(a, r);
1989
+ let s = o.getBoundingClientRect(), c = Fn(a, r);
1990
1990
  if (!c) {
1991
1991
  t.value = null;
1992
1992
  return;
@@ -2048,7 +2048,7 @@ function zn(e) {
2048
2048
  let i = e.getDocument(), a = e.editorView.value;
2049
2049
  if (!i?.package) return;
2050
2050
  i.package.document.comments || (i.package.document.comments = []);
2051
- let o = Mn(i.package.document.comments, t, "User");
2051
+ let o = Nn(i.package.document.comments, t, "User");
2052
2052
  i.package.document.comments.push(o), e.comments.value = [...i.package.document.comments];
2053
2053
  let s = n.value;
2054
2054
  if (a && s && s.from !== s.to) {
@@ -2097,7 +2097,7 @@ function zn(e) {
2097
2097
  }
2098
2098
  //#endregion
2099
2099
  //#region src/composables/useImageActions.ts
2100
- function Bn(e) {
2100
+ function Vn(e) {
2101
2101
  let t = de(null), n = L(!1), r = T(() => {
2102
2102
  e.stateTick.value;
2103
2103
  let n = e.editorView.value, r = t.value;
@@ -2120,12 +2120,12 @@ function Bn(e) {
2120
2120
  width: t.width,
2121
2121
  height: t.height
2122
2122
  });
2123
- nt(n.state, n.dispatch, i, n.state.selection.from), n.focus();
2123
+ rt(n.state, n.dispatch, i, n.state.selection.from), n.focus();
2124
2124
  }
2125
2125
  function a(n) {
2126
2126
  let r = e.editorView.value, i = t.value;
2127
2127
  if (!r || !i) return;
2128
- let a = Me(n);
2128
+ let a = Ne(n);
2129
2129
  if (!a) return;
2130
2130
  let o = r.state.doc.nodeAt(i.pmPos), s = e.getCommands(), c = o?.attrs.wrapType === "inline" && a !== "inline" ? { initialPositionEmu: Oe(i.element, e.zoom.value) } : void 0, l = s.setImageWrapType?.(i.pmPos, a, c);
2131
2131
  l && (l(r.state, (e) => r.dispatch(e), r), r.focus());
@@ -2156,7 +2156,7 @@ function Bn(e) {
2156
2156
  }
2157
2157
  //#endregion
2158
2158
  //#region src/utils/imageClipboard.ts
2159
- function Vn(e, t, n) {
2159
+ function Hn(e, t, n) {
2160
2160
  let r = We(e.state), i = e.state.schema.marks.insertion;
2161
2161
  if (!r || !i) return;
2162
2162
  let a = t.selection.from, o = a - n.nodeSize;
@@ -2166,10 +2166,10 @@ function Vn(e, t, n) {
2166
2166
  date: r.date
2167
2167
  }));
2168
2168
  }
2169
- function Hn(e, t) {
2169
+ function Un(e, t) {
2170
2170
  return e.getBlob(t);
2171
2171
  }
2172
- function Un(e, t) {
2172
+ function Wn(e, t) {
2173
2173
  let n = e.state.doc.nodeAt(t);
2174
2174
  if (!n || n.type.name !== "image") return;
2175
2175
  let r = `<img src="${n.attrs.src}" data-pm-image="true" data-width="${n.attrs.width ?? ""}" data-height="${n.attrs.height ?? ""}" data-wrap-type="${n.attrs.wrapType ?? ""}" data-display-mode="${n.attrs.displayMode ?? ""}" data-rid="${n.attrs.rId ?? ""}" />`, i = new ClipboardItem({
@@ -2181,13 +2181,13 @@ function Un(e, t) {
2181
2181
  e.value = r, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
2182
2182
  });
2183
2183
  }
2184
- function Wn(e) {
2184
+ function Gn(e) {
2185
2185
  return new Promise((t, n) => {
2186
2186
  let r = new FileReader();
2187
2187
  r.onload = () => t(r.result), r.onerror = n, r.readAsDataURL(e);
2188
2188
  });
2189
2189
  }
2190
- function Gn(e) {
2190
+ function Kn(e) {
2191
2191
  return new Promise((t) => {
2192
2192
  let n = new Image();
2193
2193
  n.onload = () => t({
@@ -2199,13 +2199,13 @@ function Gn(e) {
2199
2199
  }), n.src = e;
2200
2200
  });
2201
2201
  }
2202
- async function Kn(e) {
2202
+ async function qn(e) {
2203
2203
  try {
2204
2204
  let t = await navigator.clipboard.read();
2205
2205
  for (let n of t) {
2206
2206
  let t = n.types.find((e) => e.startsWith("image/"));
2207
2207
  if (t) {
2208
- let r = await Wn(await Hn(n, t)), i = await Gn(r), a = i.width, o = i.height;
2208
+ let r = await Gn(await Un(n, t)), i = await Kn(r), a = i.width, o = i.height;
2209
2209
  a > 612 && (o = Math.round(612 / a * o), a = 612);
2210
2210
  let s = e.state.schema.nodes.image.create({
2211
2211
  src: r,
@@ -2215,11 +2215,11 @@ async function Kn(e) {
2215
2215
  wrapType: "inline",
2216
2216
  displayMode: "inline"
2217
2217
  }), c = e.state.tr.replaceSelectionWith(s);
2218
- Vn(e, c, s), e.dispatch(c);
2218
+ Hn(e, c, s), e.dispatch(c);
2219
2219
  return;
2220
2220
  }
2221
2221
  if (n.types.includes("text/html")) {
2222
- let t = await (await Hn(n, "text/html")).text(), r = t.match(/<img[^>]+src="([^"]+)"[^>]*>/i);
2222
+ let t = await (await Un(n, "text/html")).text(), r = t.match(/<img[^>]+src="([^"]+)"[^>]*>/i);
2223
2223
  if (r && r[1]) {
2224
2224
  let n = r[1], i = t.match(/data-width="(\d+)"/), a = t.match(/data-height="(\d+)"/), o = i ? Number(i[1]) : 200, s = a ? Number(a[1]) : 200, c = e.state.schema.nodes.image.create({
2225
2225
  src: n,
@@ -2229,12 +2229,12 @@ async function Kn(e) {
2229
2229
  wrapType: "inline",
2230
2230
  displayMode: "inline"
2231
2231
  }), l = e.state.tr.replaceSelectionWith(c);
2232
- Vn(e, l, c), e.dispatch(l);
2232
+ Hn(e, l, c), e.dispatch(l);
2233
2233
  return;
2234
2234
  }
2235
2235
  }
2236
2236
  if (n.types.includes("text/plain")) {
2237
- let t = await (await Hn(n, "text/plain")).text();
2237
+ let t = await (await Un(n, "text/plain")).text();
2238
2238
  if (t && t !== "[image]") {
2239
2239
  let { from: n } = e.state.selection;
2240
2240
  e.dispatch(e.state.tr.insertText(t, n));
@@ -2250,14 +2250,14 @@ async function Kn(e) {
2250
2250
  }
2251
2251
  }
2252
2252
  }
2253
- function qn(e, t) {
2253
+ function Jn(e, t) {
2254
2254
  let n = e.state.doc.nodeAt(t);
2255
2255
  if (!n || n.type.name !== "image") return;
2256
2256
  let r = document.createElement("input");
2257
2257
  r.type = "file", r.accept = "image/*", r.onchange = async () => {
2258
2258
  let i = r.files?.[0];
2259
2259
  if (!i) return;
2260
- let a = await Wn(i), o = await Gn(a), s = n.attrs.width || o.width, c = n.attrs.height || o.height, l = Math.min(s / o.width, c / o.height), u = Math.round(o.width * l), d = Math.round(o.height * l);
2260
+ let a = await Gn(i), o = await Kn(a), s = n.attrs.width || o.width, c = n.attrs.height || o.height, l = Math.min(s / o.width, c / o.height), u = Math.round(o.width * l), d = Math.round(o.height * l);
2261
2261
  try {
2262
2262
  let r = e.state.tr.setNodeMarkup(t, void 0, {
2263
2263
  ...n.attrs,
@@ -2272,7 +2272,7 @@ function qn(e, t) {
2272
2272
  }
2273
2273
  //#endregion
2274
2274
  //#region src/composables/useContextMenus.ts
2275
- function Jn(e) {
2275
+ function Yn(e) {
2276
2276
  let { t } = n(), r = L({
2277
2277
  isOpen: !1,
2278
2278
  position: {
@@ -2393,16 +2393,16 @@ function Jn(e) {
2393
2393
  switch (t) {
2394
2394
  case "cut":
2395
2395
  if (e.selectedImage.value) {
2396
- Un(n, e.selectedImage.value.pmPos);
2396
+ Wn(n, e.selectedImage.value.pmPos);
2397
2397
  let t = e.selectedImage.value.pmPos, r = n.state.doc.nodeAt(t);
2398
2398
  r && (n.dispatch(n.state.tr.delete(t, t + r.nodeSize)), e.selectedImage.value = null);
2399
2399
  } else document.execCommand("cut");
2400
2400
  break;
2401
2401
  case "copy":
2402
- e.selectedImage.value ? Un(n, e.selectedImage.value.pmPos) : document.execCommand("copy");
2402
+ e.selectedImage.value ? Wn(n, e.selectedImage.value.pmPos) : document.execCommand("copy");
2403
2403
  break;
2404
2404
  case "paste":
2405
- Kn(n);
2405
+ qn(n);
2406
2406
  break;
2407
2407
  case "pasteAsPlainText":
2408
2408
  navigator.clipboard.readText().then((e) => {
@@ -2423,7 +2423,7 @@ function Jn(e) {
2423
2423
  e.selectedImage.value && (e.showImageProperties.value = !0);
2424
2424
  break;
2425
2425
  case "replaceImage":
2426
- e.selectedImage.value && qn(n, e.selectedImage.value.pmPos);
2426
+ e.selectedImage.value && Jn(n, e.selectedImage.value.pmPos);
2427
2427
  break;
2428
2428
  case "deleteImage":
2429
2429
  if (e.selectedImage.value) {
@@ -2458,8 +2458,8 @@ function Jn(e) {
2458
2458
  }
2459
2459
  //#endregion
2460
2460
  //#region src/composables/usePagesPointer.ts
2461
- var Yn = 500;
2462
- function Xn(e) {
2461
+ var Xn = 500;
2462
+ function Zn(e) {
2463
2463
  let t = L(null), n = null;
2464
2464
  function r() {
2465
2465
  n !== null && (clearTimeout(n), n = null);
@@ -2470,7 +2470,7 @@ function Xn(e) {
2470
2470
  visible: !1
2471
2471
  }), d = null;
2472
2472
  function f(t, n) {
2473
- return In(e.pagesRef.value, e.editorView.value, t, n);
2473
+ return Ln(e.pagesRef.value, e.editorView.value, t, n);
2474
2474
  }
2475
2475
  function p() {
2476
2476
  let t = i.value;
@@ -2488,13 +2488,13 @@ function Xn(e) {
2488
2488
  } catch {}
2489
2489
  }
2490
2490
  function h(t) {
2491
- Fn(e.pagesRef.value, e.pagesViewportRef.value, t);
2491
+ In(e.pagesRef.value, e.pagesViewportRef.value, t);
2492
2492
  }
2493
2493
  function g(t) {
2494
- Ln(e.pagesRef.value, t, m);
2494
+ Rn(e.pagesRef.value, t, m);
2495
2495
  }
2496
2496
  function _(t) {
2497
- Rn(e.pagesRef.value, t, m);
2497
+ zn(e.pagesRef.value, t, m);
2498
2498
  }
2499
2499
  function v(t) {
2500
2500
  let n = e.editorView.value;
@@ -2515,7 +2515,7 @@ function Xn(e) {
2515
2515
  if (!o) return;
2516
2516
  let s = e.pagesViewportRef.value;
2517
2517
  if (!s) return;
2518
- let l = st({
2518
+ let l = ct({
2519
2519
  mouseX: a.clientX,
2520
2520
  mouseY: a.clientY,
2521
2521
  pagesContainer: o,
@@ -2525,7 +2525,7 @@ function Xn(e) {
2525
2525
  if (!l) {
2526
2526
  n === null && (n = setTimeout(() => {
2527
2527
  t.value = null, n = null;
2528
- }, ot));
2528
+ }, st));
2529
2529
  return;
2530
2530
  }
2531
2531
  let u = s.getBoundingClientRect();
@@ -2684,7 +2684,7 @@ function Xn(e) {
2684
2684
  return;
2685
2685
  }
2686
2686
  let v = Date.now();
2687
- if (v - a < Yn && o === h ? s++ : s = 1, a = v, o = h, s === 2) g(h);
2687
+ if (v - a < Xn && o === h ? s++ : s = 1, a = v, o = h, s === 2) g(h);
2688
2688
  else if (s >= 3) _(h), s = 0;
2689
2689
  else {
2690
2690
  if (t.shiftKey) {
@@ -2750,7 +2750,7 @@ function Xn(e) {
2750
2750
  }
2751
2751
  //#endregion
2752
2752
  //#region src/composables/useSelectionSync.ts
2753
- function Zn(e) {
2753
+ function Qn(e) {
2754
2754
  let t = null, n = null;
2755
2755
  function r() {
2756
2756
  let r = e.pagesRef.value;
@@ -2827,7 +2827,7 @@ function Zn(e) {
2827
2827
  }
2828
2828
  //#endregion
2829
2829
  //#region src/composables/useMenuActions.ts
2830
- function Qn(e) {
2830
+ function $n(e) {
2831
2831
  function t(t) {
2832
2832
  let n = e.editorView.value;
2833
2833
  if (!n) return;
@@ -2879,7 +2879,7 @@ function Qn(e) {
2879
2879
  e.showKeyboardShortcuts.value = !0;
2880
2880
  break;
2881
2881
  case "reportIssue":
2882
- ct();
2882
+ lt();
2883
2883
  break;
2884
2884
  case "dirLTR":
2885
2885
  t("setLtr");
@@ -2897,7 +2897,7 @@ function Qn(e) {
2897
2897
  }
2898
2898
  //#endregion
2899
2899
  //#region src/composables/useDocumentLifecycle.ts
2900
- function $n(e) {
2900
+ function er(e) {
2901
2901
  async function t(t) {
2902
2902
  e.sidebarAutoOpenedRef.value = !1, await e.loadDocumentBuffer(t);
2903
2903
  }
@@ -2916,9 +2916,10 @@ function $n(e) {
2916
2916
  }
2917
2917
  //#endregion
2918
2918
  //#region src/composables/useDocxEditorRefApi.ts
2919
- function er(e) {
2919
+ function tr(e) {
2920
2920
  function t() {
2921
- e.onPrint?.(), window.print();
2921
+ let t = e.pagesRef.value;
2922
+ t && Me(t), e.onPrint?.(), window.print();
2922
2923
  }
2923
2924
  function n() {
2924
2925
  t();
@@ -2958,26 +2959,26 @@ function er(e) {
2958
2959
  function l(t) {
2959
2960
  let n = e.editorView.value;
2960
2961
  if (!n) return !1;
2961
- let r = ft(n.state.doc, t);
2962
+ let r = pt(n.state.doc, t);
2962
2963
  return r ? (e.scrollVisiblePositionIntoView(r.from + 1), !0) : !1;
2963
2964
  }
2964
2965
  function u(t, n) {
2965
- return gt(e.editorView.value, t, n);
2966
+ return _t(e.editorView.value, t, n);
2966
2967
  }
2967
2968
  function d() {
2968
- return _t(e.editorView.value);
2969
+ return vt(e.editorView.value);
2969
2970
  }
2970
2971
  function f() {
2971
2972
  return e.comments.value;
2972
2973
  }
2973
2974
  function p(t) {
2974
2975
  let n = e.editorView.value;
2975
- return n ? X(n.state.doc, t ?? {}) : [];
2976
+ return n ? Z(n.state.doc, t ?? {}) : [];
2976
2977
  }
2977
2978
  function m(t) {
2978
2979
  let n = e.editorView.value;
2979
2980
  if (!n) return !1;
2980
- let r = Ie(n.state.doc, t);
2981
+ let r = X(n.state.doc, t);
2981
2982
  return r == null ? !1 : (a(r), !0);
2982
2983
  }
2983
2984
  function h(t, n, r) {
@@ -2986,7 +2987,7 @@ function er(e) {
2986
2987
  try {
2987
2988
  return i.dispatch(Be(i.state, t, n, r)), !0;
2988
2989
  } catch (e) {
2989
- if (e instanceof lt) return !1;
2990
+ if (e instanceof ut) return !1;
2990
2991
  throw e;
2991
2992
  }
2992
2993
  }
@@ -2996,7 +2997,7 @@ function er(e) {
2996
2997
  try {
2997
2998
  return r.dispatch(Le(r.state, t, n)), !0;
2998
2999
  } catch (e) {
2999
- if (e instanceof lt) return !1;
3000
+ if (e instanceof ut) return !1;
3000
3001
  throw e;
3001
3002
  }
3002
3003
  }
@@ -3006,12 +3007,12 @@ function er(e) {
3006
3007
  try {
3007
3008
  return i.dispatch(Ve(i.state, t, n, r)), !0;
3008
3009
  } catch (e) {
3009
- if (e instanceof lt) return !1;
3010
+ if (e instanceof ut) return !1;
3010
3011
  throw e;
3011
3012
  }
3012
3013
  }
3013
3014
  function v(t) {
3014
- return vt(e.editorView.value, e.layout.value, t);
3015
+ return yt(e.editorView.value, e.layout.value, t);
3015
3016
  }
3016
3017
  function y(t) {
3017
3018
  return e.contentChangeSubscribers.add(t), () => e.contentChangeSubscribers.delete(t);
@@ -3058,7 +3059,7 @@ function er(e) {
3058
3059
  }
3059
3060
  //#endregion
3060
3061
  //#region src/composables/useFontLifecycle.ts
3061
- function tr(e, t) {
3062
+ function nr(e, t) {
3062
3063
  H(e, (e) => {
3063
3064
  ye(e);
3064
3065
  }, { immediate: !0 });
@@ -3067,16 +3068,16 @@ function tr(e, t) {
3067
3068
  }
3068
3069
  //#endregion
3069
3070
  //#region src/components/DocxEditor.vue?vue&type=script&setup=true&lang.ts
3070
- var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3071
+ var rr = { class: "docx-editor-vue__toolbar-shell" }, ir = {
3071
3072
  key: 0,
3072
3073
  class: "docx-editor-vue__error"
3073
- }, ir = {
3074
+ }, ar = {
3074
3075
  key: 1,
3075
3076
  class: "docx-editor-vue__loading"
3076
- }, ar = { class: "docx-editor-vue__editor-area" }, or = {
3077
+ }, or = { class: "docx-editor-vue__editor-area" }, sr = {
3077
3078
  key: 0,
3078
3079
  class: "docx-editor-vue__vertical-ruler"
3079
- }, sr = ["title"], cr = ["title", "aria-label"], lr = /* @__PURE__ */ j({
3080
+ }, cr = ["title"], lr = ["title", "aria-label"], ur = /* @__PURE__ */ j({
3080
3081
  __name: "DocxEditor",
3081
3082
  props: {
3082
3083
  documentBuffer: { default: null },
@@ -3170,9 +3171,9 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3170
3171
  setup(e, { expose: n, emit: r }) {
3171
3172
  let i = e, a = r, o = L(i.mode), s = T(() => i.readOnly || o.value === "viewing");
3172
3173
  f(T(() => i.i18n));
3173
- let { t: l } = t(T(() => i.i18n)), u = L(null), d = L(null), g = L(null), y = L(0), x = /* @__PURE__ */ new Set(), ee = /* @__PURE__ */ new Set(), te = new Pe(), C = L(!1), w = L(!1), ie = L(!1), oe = L(!1), j = L(!1), se = L(!1), R = L(i.showOutline), V = L(!1), W = L(!1), G = L(!1), fe = L(null), me = de([]), ge = de([]), q = de([]), { zoom: J, zoomPercent: ve, isMinZoom: ye, isMaxZoom: be, setZoom: xe, zoomIn: Se, zoomOut: Ce, handleWheel: we, handleKeyDown: Te, installShortcuts: Ee, ZOOM_PRESETS: De } = ne(i.initialZoom);
3174
+ let { t: l } = t(T(() => i.i18n)), u = L(null), d = L(null), g = L(null), y = L(0), x = /* @__PURE__ */ new Set(), ee = /* @__PURE__ */ new Set(), te = new Fe(), C = L(!1), w = L(!1), ie = L(!1), oe = L(!1), j = L(!1), se = L(!1), R = L(i.showOutline), V = L(!1), W = L(!1), G = L(!1), fe = L(null), me = de([]), ge = de([]), q = de([]), { zoom: J, zoomPercent: ve, isMinZoom: ye, isMaxZoom: be, setZoom: xe, zoomIn: Se, zoomOut: Ce, handleWheel: we, handleKeyDown: Te, installShortcuts: Ee, ZOOM_PRESETS: De } = ne(i.initialZoom);
3174
3175
  Ee();
3175
- let { editorView: Y, isReady: Oe, parseError: ke, layout: Ae, loadBuffer: je, loadDocument: Me, save: Ne, focus: Fe, destroy: Ie, getDocument: X, getCommands: Le, reLayout: Re, getHfPmView: ze, syncHfPMs: Be, setHfTransactionListener: Ve, setDocument: He } = re({
3176
+ let { editorView: Y, isReady: Oe, parseError: ke, layout: Ae, loadBuffer: je, loadDocument: Me, save: Ne, focus: Pe, destroy: Ie, getDocument: X, getCommands: Z, reLayout: Le, getHfPmView: Re, syncHfPMs: ze, setHfTransactionListener: Be, setDocument: Ve } = re({
3176
3177
  hiddenContainer: u,
3177
3178
  pagesContainer: d,
3178
3179
  readOnly: s,
@@ -3185,22 +3186,22 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3185
3186
  onError: (e) => a("error", e),
3186
3187
  onSelectionUpdate: () => {
3187
3188
  y.value++, dr();
3188
- let e = _t(Y.value);
3189
+ let e = vt(Y.value);
3189
3190
  ee.forEach((t) => t(e));
3190
3191
  }
3191
- }), We = T(() => {
3192
+ }), He = T(() => {
3192
3193
  y.value;
3193
3194
  let e = X();
3194
3195
  if (!e?.package?.document) return null;
3195
3196
  let t = e.package.document;
3196
3197
  return t.finalSectionProperties ?? t.sections?.[0]?.properties ?? null;
3197
- }), Ge = T(() => (y.value, X()?.package?.theme ?? i.theme ?? null)), Z = L(null);
3198
- tr(() => i.fonts, (e) => a("error", e));
3199
- let Ke = T(() => $.value?.headerFooter ? ze($.value.headerFooter) ?? null : null);
3198
+ }), We = T(() => (y.value, X()?.package?.theme ?? i.theme ?? null)), Ge = L(null);
3199
+ nr(() => i.fonts, (e) => a("error", e));
3200
+ let Ke = T(() => $.value?.headerFooter ? Re($.value.headerFooter) ?? null : null);
3200
3201
  F(() => {
3201
- Ve((e, t) => {
3202
+ Be((e, t) => {
3202
3203
  requestAnimationFrame(() => {
3203
- Z.value = he(t);
3204
+ Ge.value = he(t);
3204
3205
  let e = $.value;
3205
3206
  if (!e) return;
3206
3207
  let n = window.document.querySelector(e.position === "header" ? ".layout-page-header" : ".layout-page-footer"), r = g.value;
@@ -3218,7 +3219,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3218
3219
  });
3219
3220
  }), H(() => $.value, (e) => {
3220
3221
  if (!e) {
3221
- Z.value = null;
3222
+ Ge.value = null;
3222
3223
  return;
3223
3224
  }
3224
3225
  let t = Y.value;
@@ -3237,8 +3238,8 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3237
3238
  e = 0;
3238
3239
  let t = $.value;
3239
3240
  if (!t?.headerFooter) return;
3240
- let n = ze(t.headerFooter);
3241
- n && (Z.value = he(n));
3241
+ let n = Re(t.headerFooter);
3242
+ n && (Ge.value = he(n));
3242
3243
  }));
3243
3244
  }
3244
3245
  window.addEventListener("scroll", t, !0), window.addEventListener("resize", t), P(() => {
@@ -3257,7 +3258,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3257
3258
  paddingRight: 20 + (W.value ? _e * 2 : 0) + "px",
3258
3259
  transition: "padding 0.2s ease"
3259
3260
  })), Ye = T(() => {
3260
- let e = We.value;
3261
+ let e = He.value;
3261
3262
  return Ue(e?.pageWidth ?? 12240) * J.value;
3262
3263
  }), Xe = T(() => {
3263
3264
  let e = /* @__PURE__ */ new Set();
@@ -3280,7 +3281,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3280
3281
  }
3281
3282
  return !0;
3282
3283
  }), n.sort((e, t) => e.name.localeCompare(t.name));
3283
- }), { floatingCommentBtn: Qe, pendingCommentRange: $e, addCommentYPosition: et, sidebarAutoOpenedRef: tt, extractCommentsAndChanges: nt, handleAddComment: rt, handleCancelAddComment: it, handleStartAddComment: at, handleMarkerClick: ot } = zn({
3284
+ }), { floatingCommentBtn: Qe, pendingCommentRange: $e, addCommentYPosition: et, sidebarAutoOpenedRef: tt, extractCommentsAndChanges: nt, handleAddComment: rt, handleCancelAddComment: it, handleStartAddComment: at, handleMarkerClick: ot } = Bn({
3284
3285
  editorView: Y,
3285
3286
  getDocument: X,
3286
3287
  comments: me,
@@ -3295,7 +3296,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3295
3296
  pagesRef: d,
3296
3297
  pagesViewportRef: g,
3297
3298
  emit: a
3298
- }), { docxInputRef: st, handleDocxFileChange: ct, handleDocumentNameChange: lt, downloadCurrentDocument: ut, loadDocumentBuffer: dt, loadDocument: ft, save: pt } = En({
3299
+ }), { docxInputRef: st, handleDocxFileChange: ct, handleDocumentNameChange: lt, downloadCurrentDocument: ut, loadDocumentBuffer: dt, loadDocument: ft, save: pt } = Dn({
3299
3300
  loadBuffer: je,
3300
3301
  loadParsedDocument: Me,
3301
3302
  getDocument: X,
@@ -3305,20 +3306,20 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3305
3306
  documentName: () => i.documentName,
3306
3307
  onDocumentNameChange: i.onDocumentNameChange,
3307
3308
  nextTick: ce
3308
- }), { hyperlinkPopupData: mt, handleHyperlinkSubmit: ht, handleHyperlinkRemove: gt, handleHyperlinkPopupNavigate: vt, handleHyperlinkPopupEdit: bt, handleHyperlinkPopupRemove: xt } = Dn({
3309
+ }), { hyperlinkPopupData: mt, handleHyperlinkSubmit: ht, handleHyperlinkRemove: gt, handleHyperlinkPopupNavigate: _t, handleHyperlinkPopupEdit: yt, handleHyperlinkPopupRemove: xt } = On({
3309
3310
  editorView: Y,
3310
- getCommands: Le
3311
- }), { handleClearFormatting: St, handleApplyStyle: Ct, handleInsertPageBreak: wt, handleInsertSymbol: Tt, applyFormatting: Dt, setParagraphStyle: Ot } = On({
3311
+ getCommands: Z
3312
+ }), { handleClearFormatting: St, handleApplyStyle: Ct, handleInsertPageBreak: wt, handleInsertSymbol: Tt, applyFormatting: Et, setParagraphStyle: Ot } = kn({
3312
3313
  editorView: Y,
3313
3314
  getDocument: X
3314
- }), { handlePageSetupApply: kt, handleLeftMarginChange: At, handleRightMarginChange: Nt, handleTopMarginChange: Pt, handleBottomMarginChange: It, handleIndentLeftChange: Lt, handleIndentRightChange: Rt, handleFirstLineIndentChange: zt, handleTabStopRemove: Vt } = kn({
3315
+ }), { handlePageSetupApply: kt, handleLeftMarginChange: At, handleRightMarginChange: jt, handleTopMarginChange: Pt, handleBottomMarginChange: Ft, handleIndentLeftChange: Lt, handleIndentRightChange: Rt, handleFirstLineIndentChange: zt, handleTabStopRemove: Bt } = An({
3315
3316
  editorView: Y,
3316
3317
  getDocument: X,
3317
3318
  readOnly: s,
3318
3319
  stateTick: y,
3319
- reLayout: Re,
3320
+ reLayout: Le,
3320
3321
  emit: a
3321
- }), { handleToggleOutline: Ht, handleOutlineNavigate: Ut, handleToggleSidebar: Wt, handleEditorScrollMouseDown: qt } = An({
3322
+ }), { handleToggleOutline: Ht, handleOutlineNavigate: Ut, handleToggleSidebar: Wt, handleEditorScrollMouseDown: Gt } = jn({
3322
3323
  editorView: Y,
3323
3324
  showOutline: R,
3324
3325
  showSidebar: W,
@@ -3326,14 +3327,14 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3326
3327
  activeSidebarItem: fe,
3327
3328
  extractCommentsAndChanges: nt
3328
3329
  });
3329
- jn({
3330
+ Mn({
3330
3331
  showKeyboardShortcuts: V,
3331
3332
  showFindReplace: C,
3332
3333
  showHyperlink: ie,
3333
3334
  handleZoomKeyDown: Te,
3334
3335
  disableFindReplaceShortcuts: () => i.disableFindReplaceShortcuts
3335
3336
  });
3336
- let { addComment: Jt, replyToComment: Yt, resolveComment: Xt, proposeChange: Zt, handleCommentReply: Qt, handleCommentUnresolve: $t, handleCommentDelete: en, handleAcceptChange: tn, handleRejectChange: nn, handleAcceptChangeById: rn, handleRejectChangeById: an, handleTrackedChangeReply: on } = Nn({
3337
+ let { addComment: Jt, replyToComment: Yt, resolveComment: Xt, proposeChange: Zt, handleCommentReply: Qt, handleCommentUnresolve: $t, handleCommentDelete: en, handleAcceptChange: tn, handleRejectChange: nn, handleAcceptChangeById: rn, handleRejectChangeById: an, handleTrackedChangeReply: on } = Pn({
3337
3338
  editorView: Y,
3338
3339
  getDocument: X,
3339
3340
  comments: me,
@@ -3344,12 +3345,12 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3344
3345
  contentChangeSubscribers: x,
3345
3346
  extractCommentsAndChanges: nt,
3346
3347
  emit: a
3347
- }), { selectedImage: sn, imageInteracting: cn, imageToolbarContext: ln, handleInsertImage: un, handleToolbarImageWrap: dn, handleImageTransform: fn } = Bn({
3348
+ }), { selectedImage: sn, imageInteracting: cn, imageToolbarContext: ln, handleInsertImage: un, handleToolbarImageWrap: dn, handleImageTransform: fn } = Vn({
3348
3349
  editorView: Y,
3349
3350
  zoom: J,
3350
3351
  stateTick: y,
3351
- getCommands: Le
3352
- }), pn = S(), mn = null, { tableInsertButton: Q, hfEdit: $, scrollPageInfo: gn, resolvePos: _n, setPmSelection: vn, scrollVisiblePositionIntoView: yn, handlePagesMouseDown: bn, handlePagesMouseMove: xn, handlePagesClick: Sn, handlePagesDoubleClick: Cn, handleTableInsertClick: wn, clearTableInsertTimer: Mn, handleHfSave: Pn, handleHfRemove: Fn } = Xn({
3352
+ getCommands: Z
3353
+ }), pn = S(), mn = null, { tableInsertButton: Q, hfEdit: $, scrollPageInfo: hn, resolvePos: _n, setPmSelection: vn, scrollVisiblePositionIntoView: yn, handlePagesMouseDown: bn, handlePagesMouseMove: xn, handlePagesClick: Sn, handlePagesDoubleClick: Cn, handleTableInsertClick: wn, clearTableInsertTimer: Tn, handleHfSave: Nn, handleHfRemove: Fn } = Zn({
3353
3354
  editorView: Y,
3354
3355
  pagesRef: d,
3355
3356
  pagesViewportRef: g,
@@ -3360,26 +3361,26 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3360
3361
  zoom: J,
3361
3362
  layout: Ae,
3362
3363
  tableResize: pn,
3363
- getCommands: Le,
3364
+ getCommands: Z,
3364
3365
  getDocument: X,
3365
- reLayout: Re,
3366
+ reLayout: Le,
3366
3367
  emit: a,
3367
3368
  clearOverlay: ur,
3368
- syncHfPMs: Be,
3369
- getHfPmView: ze,
3370
- setDocument: He
3371
- }), { contextMenu: In, imageContextMenu: Ln, imageContextMenuTextActions: Rn, handleContextMenu: Vn, handleSelectedImageContextMenu: Hn, handleImageWrapSelect: Un, handleContextMenuAction: Wn } = Jn({
3369
+ syncHfPMs: ze,
3370
+ getHfPmView: Re,
3371
+ setDocument: Ve
3372
+ }), { contextMenu: In, imageContextMenu: Ln, imageContextMenuTextActions: Rn, handleContextMenu: zn, handleSelectedImageContextMenu: Hn, handleImageWrapSelect: Un, handleContextMenuAction: Wn } = Yn({
3372
3373
  editorView: Y,
3373
3374
  selectedImage: sn,
3374
3375
  zoom: J,
3375
3376
  showImageProperties: j,
3376
- getCommands: Le,
3377
+ getCommands: Z,
3377
3378
  clearOverlay: ur,
3378
3379
  setPmSelection: vn,
3379
3380
  resolvePos: _n
3380
- }), { handleMenuAction: Gn, handleMenuTableInsert: Kn } = Qn({
3381
+ }), { handleMenuAction: Gn, handleMenuTableInsert: Kn } = $n({
3381
3382
  editorView: Y,
3382
- getCommands: Le,
3383
+ getCommands: Z,
3383
3384
  docxInputRef: st,
3384
3385
  showPageSetup: se,
3385
3386
  showInsertImage: w,
@@ -3393,20 +3394,20 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3393
3394
  downloadCurrentDocument: ut,
3394
3395
  emit: a
3395
3396
  });
3396
- $n({
3397
+ er({
3397
3398
  documentBuffer: () => i.documentBuffer,
3398
3399
  document: () => i.document,
3399
3400
  loadDocumentBuffer: dt,
3400
3401
  loadDocument: ft,
3401
3402
  sidebarAutoOpenedRef: tt
3402
3403
  });
3403
- let qn = () => Y.value, Yn = () => d.value;
3404
+ let qn = () => Y.value, Jn = () => d.value;
3404
3405
  H(() => i.mode, (e) => {
3405
3406
  e && e !== o.value && (o.value = e);
3406
3407
  }), H(() => i.showOutline, (e) => {
3407
3408
  R.value = !!e;
3408
3409
  });
3409
- function lr(e) {
3410
+ function Xn(e) {
3410
3411
  o.value !== e && (o.value = e, a("mode-change", e));
3411
3412
  }
3412
3413
  F(() => {
@@ -3420,7 +3421,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3420
3421
  function dr() {
3421
3422
  fr.updateSelectionOverlay();
3422
3423
  }
3423
- let fr = Zn({
3424
+ let fr = Qn({
3424
3425
  editorView: Y,
3425
3426
  pagesRef: d,
3426
3427
  selectedImage: sn,
@@ -3429,14 +3430,14 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3429
3430
  P(() => {
3430
3431
  ur();
3431
3432
  });
3432
- let { exposed: pr } = er({
3433
+ let { exposed: pr } = tr({
3433
3434
  editorView: Y,
3434
3435
  layout: Ae,
3435
3436
  pagesRef: d,
3436
3437
  pagesViewportRef: g,
3437
3438
  zoom: J,
3438
3439
  comments: me,
3439
- focus: Fe,
3440
+ focus: Pe,
3440
3441
  destroy: Ie,
3441
3442
  getDocument: X,
3442
3443
  setZoom: xe,
@@ -3447,7 +3448,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3447
3448
  replyToComment: Yt,
3448
3449
  resolveComment: Xt,
3449
3450
  proposeChange: Zt,
3450
- applyFormatting: Dt,
3451
+ applyFormatting: Et,
3451
3452
  setParagraphStyle: Ot,
3452
3453
  scrollVisiblePositionIntoView: yn,
3453
3454
  contentChangeSubscribers: x,
@@ -3467,7 +3468,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3467
3468
  ]),
3468
3469
  style: N(e.style)
3469
3470
  }, [
3470
- k("div", nr, [A(Gt, {
3471
+ k("div", rr, [A(Kt, {
3471
3472
  "show-menu-bar": e.showMenuBar,
3472
3473
  "document-name": e.documentName,
3473
3474
  "document-name-editable": e.documentNameEditable,
@@ -3492,7 +3493,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3492
3493
  ]), e.showToolbar ? (I(), E(b, {
3493
3494
  key: 0,
3494
3495
  view: B(Y),
3495
- "get-commands": B(Le),
3496
+ "get-commands": B(Z),
3496
3497
  "state-tick": y.value,
3497
3498
  "zoom-percent": B(ve),
3498
3499
  "is-min-zoom": B(ye),
@@ -3502,7 +3503,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3502
3503
  "editor-mode": o.value,
3503
3504
  "comments-sidebar-open": W.value,
3504
3505
  "image-context": B(ln),
3505
- theme: Ge.value,
3506
+ theme: We.value,
3506
3507
  "font-families": e.fontFamilies,
3507
3508
  onInsertLink: n[0] ||= (e) => ie.value = !0,
3508
3509
  onApplyStyle: B(Ct),
@@ -3510,16 +3511,16 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3510
3511
  onZoomOut: B(Ce),
3511
3512
  onZoomSet: B(xe),
3512
3513
  onToggleSidebar: B(Wt),
3513
- onModeChange: lr,
3514
+ onModeChange: Xn,
3514
3515
  onImageWrapType: B(dn),
3515
3516
  onImageProperties: n[1] ||= (e) => j.value = !0,
3516
3517
  onImageTransform: B(fn)
3517
3518
  }, ae({
3518
3519
  "table-context": U(() => [A(h, {
3519
3520
  view: B(Y),
3520
- "get-commands": B(Le),
3521
+ "get-commands": B(Z),
3521
3522
  "state-tick": y.value,
3522
- theme: Ge.value
3523
+ theme: We.value
3523
3524
  }, null, 8, [
3524
3525
  "view",
3525
3526
  "get-commands",
@@ -3557,7 +3558,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3557
3558
  "onImageWrapType",
3558
3559
  "onImageTransform"
3559
3560
  ])) : D("", !0)]),
3560
- A(Kt, {
3561
+ A(qt, {
3561
3562
  "show-find-replace": C.value,
3562
3563
  "onUpdate:showFindReplace": n[2] ||= (e) => C.value = e,
3563
3564
  "show-insert-image": w.value,
@@ -3575,7 +3576,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3575
3576
  view: B(Y),
3576
3577
  bookmarks: Ze.value,
3577
3578
  "selected-image-pm-pos": B(sn)?.pmPos ?? null,
3578
- "section-properties": We.value,
3579
+ "section-properties": He.value,
3579
3580
  "scroll-visible-position-into-view": B(yn),
3580
3581
  onInsertImage: B(un),
3581
3582
  onInsertSymbol: B(Tt),
@@ -3601,8 +3602,8 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3601
3602
  "onHyperlinkRemove",
3602
3603
  "onPageSetupApply"
3603
3604
  ]),
3604
- B(ke) ? (I(), O("div", rr, z(B(ke)), 1)) : D("", !0),
3605
- !B(Oe) && !B(ke) ? (I(), O("div", ir, "Loading...")) : D("", !0),
3605
+ B(ke) ? (I(), O("div", ir, z(B(ke)), 1)) : D("", !0),
3606
+ !B(Oe) && !B(ke) ? (I(), O("div", ar, "Loading...")) : D("", !0),
3606
3607
  k("div", {
3607
3608
  ref_key: "hiddenPmRef",
3608
3609
  ref: u,
@@ -3610,21 +3611,21 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3610
3611
  }, null, 512),
3611
3612
  k("div", {
3612
3613
  class: "docx-editor-vue__editor-scroll",
3613
- onMousedown: n[31] ||= (...e) => B(qt) && B(qt)(...e)
3614
- }, [e.showRuler && We.value ? (I(), O("div", {
3614
+ onMousedown: n[31] ||= (...e) => B(Gt) && B(Gt)(...e)
3615
+ }, [e.showRuler && He.value ? (I(), O("div", {
3615
3616
  key: 0,
3616
3617
  class: "docx-editor-vue__ruler-row",
3617
3618
  style: N(Je.value)
3618
3619
  }, [A(_, {
3619
- "section-props": We.value,
3620
+ "section-props": He.value,
3620
3621
  zoom: B(J),
3621
3622
  editable: !s.value,
3622
3623
  onLeftMarginChange: B(At),
3623
- onRightMarginChange: B(Nt),
3624
+ onRightMarginChange: B(jt),
3624
3625
  onIndentLeftChange: B(Lt),
3625
3626
  onIndentRightChange: B(Rt),
3626
3627
  onFirstLineIndentChange: B(zt),
3627
- onTabStopRemove: B(Vt)
3628
+ onTabStopRemove: B(Bt)
3628
3629
  }, null, 8, [
3629
3630
  "section-props",
3630
3631
  "zoom",
@@ -3635,7 +3636,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3635
3636
  "onIndentRightChange",
3636
3637
  "onFirstLineIndentChange",
3637
3638
  "onTabStopRemove"
3638
- ])], 4)) : D("", !0), k("div", ar, [
3639
+ ])], 4)) : D("", !0), k("div", or, [
3639
3640
  k("div", {
3640
3641
  ref_key: "pagesViewportRef",
3641
3642
  ref: g,
@@ -3644,15 +3645,15 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3644
3645
  onMousemove: n[23] ||= (...e) => B(xn) && B(xn)(...e),
3645
3646
  onClick: n[24] ||= (...e) => B(Sn) && B(Sn)(...e),
3646
3647
  onDblclick: n[25] ||= (...e) => B(Cn) && B(Cn)(...e),
3647
- onContextmenu: n[26] ||= K((...e) => B(Vn) && B(Vn)(...e), ["prevent"]),
3648
+ onContextmenu: n[26] ||= K((...e) => B(zn) && B(zn)(...e), ["prevent"]),
3648
3649
  onWheel: n[27] ||= (...e) => B(we) && B(we)(...e)
3649
3650
  }, [
3650
- e.showRuler && We.value ? (I(), O("div", or, [A(p, {
3651
- "section-props": We.value,
3651
+ e.showRuler && He.value ? (I(), O("div", sr, [A(p, {
3652
+ "section-props": He.value,
3652
3653
  zoom: B(J),
3653
3654
  editable: !s.value,
3654
3655
  onTopMarginChange: B(Pt),
3655
- onBottomMarginChange: B(It)
3656
+ onBottomMarginChange: B(Ft)
3656
3657
  }, null, 8, [
3657
3658
  "section-props",
3658
3659
  "zoom",
@@ -3666,17 +3667,17 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3666
3667
  class: "docx-editor-vue__pages paged-editor__pages",
3667
3668
  style: N(qe.value)
3668
3669
  }, null, 4),
3669
- s.value ? D("", !0) : (I(), E(Bt, {
3670
+ s.value ? D("", !0) : (I(), E(Vt, {
3670
3671
  key: 1,
3671
3672
  container: d.value,
3672
3673
  view: B(Y)
3673
3674
  }, null, 8, ["container", "view"])),
3674
- A(Ft, {
3675
+ A(It, {
3675
3676
  "is-open": B($) !== null,
3676
3677
  position: B($)?.position ?? "header",
3677
3678
  view: Ke.value,
3678
3679
  "target-rect": B($)?.targetRect ?? null,
3679
- onSave: B(Pn),
3680
+ onSave: B(Nn),
3680
3681
  onClose: n[9] ||= (e) => $.value = null,
3681
3682
  onRemove: B(Fn)
3682
3683
  }, null, 8, [
@@ -3687,22 +3688,22 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3687
3688
  "onSave",
3688
3689
  "onRemove"
3689
3690
  ]),
3690
- B($) && Z.value ? (I(), O("div", {
3691
+ B($) && Ge.value ? (I(), O("div", {
3691
3692
  key: 2,
3692
3693
  "aria-hidden": "true",
3693
3694
  style: N({
3694
3695
  position: "fixed",
3695
- top: `${Z.value.top}px`,
3696
- left: `${Z.value.left}px`,
3696
+ top: `${Ge.value.top}px`,
3697
+ left: `${Ge.value.left}px`,
3697
3698
  width: "2px",
3698
- height: `${Z.value.height}px`,
3699
+ height: `${Ge.value.height}px`,
3699
3700
  background: "#4285f4",
3700
3701
  pointerEvents: "none",
3701
3702
  zIndex: 9999,
3702
3703
  animation: "hf-caret-blink 1.06s steps(1) infinite"
3703
3704
  })
3704
3705
  }, null, 4)) : D("", !0),
3705
- A(Et, {
3706
+ A(Dt, {
3706
3707
  "image-info": B(sn),
3707
3708
  zoom: B(J),
3708
3709
  view: B(Y),
@@ -3717,9 +3718,9 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3717
3718
  "view",
3718
3719
  "onContextMenu"
3719
3720
  ]),
3720
- A(yt, {
3721
+ A(bt, {
3721
3722
  "get-view": qn,
3722
- "get-pages-container": Yn,
3723
+ "get-pages-container": Jn,
3723
3724
  zoom: B(J),
3724
3725
  "transaction-version": y.value,
3725
3726
  "sync-coordinator": B(te)
@@ -3741,7 +3742,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3741
3742
  }, [A(c, {
3742
3743
  name: "add_comment",
3743
3744
  size: 16
3744
- })], 44, sr)) : D("", !0),
3745
+ })], 44, cr)) : D("", !0),
3745
3746
  B(Q) && !s.value ? (I(), O("button", {
3746
3747
  key: 4,
3747
3748
  type: "button",
@@ -3753,7 +3754,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3753
3754
  title: B(Q).type === "row" ? "Insert row below" : "Insert column to the right",
3754
3755
  "aria-label": B(Q).type === "row" ? "Insert row below" : "Insert column to the right",
3755
3756
  onMousedown: n[15] ||= (...e) => B(wn) && B(wn)(...e),
3756
- onMouseenter: n[16] ||= (...e) => B(Mn) && B(Mn)(...e),
3757
+ onMouseenter: n[16] ||= (...e) => B(Tn) && B(Tn)(...e),
3757
3758
  onMouseleave: n[17] ||= (e) => Q.value = null
3758
3759
  }, [...n[36] ||= [k("svg", {
3759
3760
  width: "12",
@@ -3765,7 +3766,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3765
3766
  stroke: "currentColor",
3766
3767
  "stroke-width": "1.5",
3767
3768
  "stroke-linecap": "round"
3768
- })], -1)]], 44, cr)) : D("", !0),
3769
+ })], -1)]], 44, lr)) : D("", !0),
3769
3770
  A(v, {
3770
3771
  comments: me.value,
3771
3772
  "pages-container": d.value,
@@ -3829,12 +3830,12 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3829
3830
  "onRejectChangeById",
3830
3831
  "onTrackedChangeReply"
3831
3832
  ]),
3832
- A(Tn, {
3833
+ A(En, {
3833
3834
  data: B(mt),
3834
3835
  "read-only": s.value,
3835
- onNavigate: B(vt),
3836
+ onNavigate: B(_t),
3836
3837
  onCopy: n[20] ||= (e) => mt.value = null,
3837
- onEdit: B(bt),
3838
+ onEdit: B(yt),
3838
3839
  onRemove: B(xt),
3839
3840
  onClose: n[21] ||= (e) => mt.value = null
3840
3841
  }, null, 8, [
@@ -3856,17 +3857,17 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3856
3857
  name: "format_list_bulleted",
3857
3858
  size: 20
3858
3859
  })], 32)) : D("", !0),
3859
- B(gn).totalPages > 1 ? (I(), E(Mt, {
3860
+ B(hn).totalPages > 1 ? (I(), E(Nt, {
3860
3861
  key: 1,
3861
- "current-page": B(gn).currentPage,
3862
- "total-pages": B(gn).totalPages,
3863
- visible: B(gn).visible
3862
+ "current-page": B(hn).currentPage,
3863
+ "total-pages": B(hn).totalPages,
3864
+ visible: B(hn).visible
3864
3865
  }, null, 8, [
3865
3866
  "current-page",
3866
3867
  "total-pages",
3867
3868
  "visible"
3868
3869
  ])) : D("", !0),
3869
- A(jt, {
3870
+ A(Mt, {
3870
3871
  "is-open": R.value,
3871
3872
  headings: q.value,
3872
3873
  onClose: n[30] ||= (e) => R.value = !1,
@@ -3885,7 +3886,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3885
3886
  style: { display: "none" },
3886
3887
  onChange: n[32] ||= (...e) => B(ct) && B(ct)(...e)
3887
3888
  }, null, 544),
3888
- A(hn, {
3889
+ A(gn, {
3889
3890
  "read-only": s.value,
3890
3891
  "context-menu": B(In),
3891
3892
  "image-context-menu": B(Ln),
@@ -3910,7 +3911,7 @@ var nr = { class: "docx-editor-vue__toolbar-shell" }, rr = {
3910
3911
  });
3911
3912
  //#endregion
3912
3913
  //#region src/renderAsync.ts
3913
- async function ur(e, t, n = {}) {
3914
+ async function dr(e, t, n = {}) {
3914
3915
  let r = e instanceof ArrayBuffer ? e : await Ce(e), i = null, a = null, o = !1, s = {
3915
3916
  save: async () => {
3916
3917
  let e = await (i?.save() ?? Promise.resolve(null));
@@ -3933,7 +3934,7 @@ async function ur(e, t, n = {}) {
3933
3934
  };
3934
3935
  return new Promise((e, c) => {
3935
3936
  a = ie({ setup() {
3936
- return () => se(lr, {
3937
+ return () => se(ur, {
3937
3938
  ...n,
3938
3939
  documentBuffer: r,
3939
3940
  showToolbar: n.showToolbar ?? !0,
@@ -3957,6 +3958,6 @@ async function ur(e, t, n = {}) {
3957
3958
  }
3958
3959
  //#endregion
3959
3960
  //#region src/index.ts
3960
- var dr = "0.0.2";
3961
+ var fr = "0.0.2";
3961
3962
  //#endregion
3962
- export { lr as DocxEditor, dr as VERSION, ut as createDocumentWithText, dt as createEmptyDocument, r as defaultLocale, a as i18nPlugin, f as provideLocale, ur as renderAsync, n as useTranslation };
3963
+ export { ur as DocxEditor, fr as VERSION, dt as createDocumentWithText, ft as createEmptyDocument, r as defaultLocale, a as i18nPlugin, f as provideLocale, dr as renderAsync, n as useTranslation };