@stll/folio-vue 0.25.0 → 0.26.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.
Files changed (117) hide show
  1. package/dist/SplitCellDialog-DfMw2Ev2.cjs +15 -0
  2. package/dist/{SplitCellDialog-CSqbtDum.js → SplitCellDialog-bNeugz_3.js} +1737 -1757
  3. package/dist/{ListButtons-BeELtp_-.js → StylePicker-DfIQUq6G.js} +1158 -1164
  4. package/dist/StylePicker-ynX3GzFu.cjs +4 -0
  5. package/dist/components/DocxEditor/DocxEditorDialogs.vue.d.ts +4 -10
  6. package/dist/components/DocxEditor/pagedEditorRef.d.ts +1 -1
  7. package/dist/components/DocxEditor/types.d.ts +18 -9
  8. package/dist/components/DocxEditor.vue.d.ts +7 -4
  9. package/dist/components/InlineHeaderFooterEditor.vue.d.ts +2 -2
  10. package/dist/components/OutlineToggleButton.vue.d.ts +21 -0
  11. package/dist/components/ReviewControls.vue.d.ts +2 -2
  12. package/dist/components/Toolbar.vue.d.ts +9 -9
  13. package/dist/components/UnifiedSidebar.vue.d.ts +2 -2
  14. package/dist/components/dialogs/FindReplaceDialog.vue.d.ts +3 -11
  15. package/dist/components/dialogs/FootnotePropertiesDialog.vue.d.ts +2 -2
  16. package/dist/components/dialogs/HyperlinkDialog.vue.d.ts +2 -2
  17. package/dist/components/dialogs/ImagePositionDialog.vue.d.ts +2 -2
  18. package/dist/components/dialogs/PageSetupDialog.vue.d.ts +2 -2
  19. package/dist/components/dialogs/SetNumberingValueDialog.vue.d.ts +2 -2
  20. package/dist/components/dialogs/TablePropertiesDialog.vue.d.ts +2 -2
  21. package/dist/components/dialogs/WatermarkDialog.vue.d.ts +2 -2
  22. package/dist/components/sidebar/CommentCard.vue.d.ts +2 -2
  23. package/dist/components/sidebar/TrackedChangeCard.vue.d.ts +2 -2
  24. package/dist/components/sidebar/cardStyles.d.ts +1 -1
  25. package/dist/components/tableStylePresets.d.ts +1 -1
  26. package/dist/components/ui/Button.vue.d.ts +1 -1
  27. package/dist/components/ui/FontSizePicker.vue.d.ts +1 -1
  28. package/dist/components/ui/HorizontalRuler.vue.d.ts +2 -2
  29. package/dist/components/ui/HyperlinkPopup.vue.d.ts +4 -4
  30. package/dist/components/ui/Input.vue.d.ts +1 -1
  31. package/dist/components/ui/ListButtons.vue.d.ts +1 -1
  32. package/dist/components/ui/OutlineRail.vue.d.ts +1 -1
  33. package/dist/components/ui/TableMoreDropdown.vue.d.ts +1 -1
  34. package/dist/components/ui/TableToolbar.vue.d.ts +1 -1
  35. package/dist/components/ui/VerticalRuler.vue.d.ts +2 -2
  36. package/dist/components/ui/icon-paths.json.d.ts +18 -6
  37. package/dist/composables/useAutoSave.d.ts +1 -1
  38. package/dist/composables/useClipboard.d.ts +2 -2
  39. package/dist/composables/useCommentLifecycle.d.ts +1 -1
  40. package/dist/composables/useCommentManagement.d.ts +1 -1
  41. package/dist/composables/useContextMenus.d.ts +2 -2
  42. package/dist/composables/useDocxEditor.d.ts +4 -4
  43. package/dist/composables/useDocxEditorRefApi.d.ts +6 -4
  44. package/dist/composables/useFindReplace.d.ts +36 -18
  45. package/dist/composables/useFixedDropdown.d.ts +1 -1
  46. package/dist/composables/useFormattingActions.d.ts +1 -1
  47. package/dist/composables/useHistory.d.ts +1 -1
  48. package/dist/composables/useHyperlinkManagement.d.ts +1 -1
  49. package/dist/composables/useImageActions.d.ts +1 -1
  50. package/dist/composables/useOutlineSidebar.d.ts +1 -1
  51. package/dist/composables/usePageSetupControls.d.ts +1 -1
  52. package/dist/composables/usePagesPointer.d.ts +3 -3
  53. package/dist/composables/useParagraphStyleOptions.d.ts +1 -1
  54. package/dist/composables/useSelectionHighlight.d.ts +1 -1
  55. package/dist/composables/useSelectionSync.d.ts +1 -1
  56. package/dist/composables/useToolbarDropdowns.d.ts +1 -1
  57. package/dist/composables/useToolbarFontSize.d.ts +1 -1
  58. package/dist/composables/useTrackedChanges.d.ts +1 -1
  59. package/dist/composables/useVisualLineNavigation.d.ts +1 -1
  60. package/dist/composables/useZoom.d.ts +1 -1
  61. package/dist/composables.cjs +2 -2
  62. package/dist/composables.js +65 -72
  63. package/dist/dialogs.cjs +1 -1
  64. package/dist/dialogs.js +1 -2
  65. package/dist/folio-vue.css +1 -1
  66. package/dist/index.cjs +1 -1
  67. package/dist/index.d.ts +5 -4
  68. package/dist/index.js +4816 -4831
  69. package/dist/messages/ar.cjs +1 -1
  70. package/dist/messages/ar.js +1 -2
  71. package/dist/messages/cs.cjs +1 -1
  72. package/dist/messages/cs.js +1 -2
  73. package/dist/messages/de.cjs +1 -1
  74. package/dist/messages/de.js +1 -2
  75. package/dist/messages/en.cjs +1 -1
  76. package/dist/messages/en.js +1 -2
  77. package/dist/messages/es.cjs +1 -1
  78. package/dist/messages/es.js +1 -2
  79. package/dist/messages/et.cjs +1 -1
  80. package/dist/messages/et.js +1 -2
  81. package/dist/messages/fr.cjs +1 -1
  82. package/dist/messages/fr.js +1 -2
  83. package/dist/messages/he.cjs +1 -1
  84. package/dist/messages/he.js +1 -2
  85. package/dist/messages/hi.cjs +1 -1
  86. package/dist/messages/hi.js +1 -2
  87. package/dist/messages/hu.cjs +1 -1
  88. package/dist/messages/hu.js +1 -2
  89. package/dist/messages/locales.js +1 -2
  90. package/dist/messages/lt.cjs +1 -1
  91. package/dist/messages/lt.js +1 -2
  92. package/dist/messages/lv.cjs +1 -1
  93. package/dist/messages/lv.js +1 -2
  94. package/dist/messages/pl.cjs +1 -1
  95. package/dist/messages/pl.js +1 -2
  96. package/dist/messages/pt-BR.cjs +1 -1
  97. package/dist/messages/pt-BR.js +1 -2
  98. package/dist/messages/sk.cjs +1 -1
  99. package/dist/messages/sk.js +1 -2
  100. package/dist/messages/tr.cjs +1 -1
  101. package/dist/messages/tr.js +1 -2
  102. package/dist/messages/zh-CN.cjs +1 -1
  103. package/dist/messages/zh-CN.js +1 -2
  104. package/dist/{rolldown-runtime-C6qsp3rV.cjs → rolldown-runtime-CYJQrBu7.cjs} +1 -1
  105. package/dist/ui.cjs +1 -1
  106. package/dist/ui.d.ts +1 -1
  107. package/dist/ui.js +21 -27
  108. package/dist/useZoom-Bwnae1jX.cjs +1 -0
  109. package/dist/useZoom-CX0mrPQY.js +996 -0
  110. package/dist/utils/viewportPosition.d.ts +1 -1
  111. package/package.json +13 -13
  112. package/dist/ListButtons-B8HxA64I.cjs +0 -4
  113. package/dist/SplitCellDialog-DzKBu09z.cjs +0 -15
  114. package/dist/useFindReplace-BbW0xWo7.js +0 -74
  115. package/dist/useFindReplace-neQmDh2i.cjs +0 -1
  116. package/dist/useZoom-B1miNAf_.cjs +0 -1
  117. package/dist/useZoom-Bw5gp69V.js +0 -887
@@ -1,20 +1,22 @@
1
- import { D as e, F as t, N as n, P as r, y as i } from "./SplitCellDialog-CSqbtDum.js";
1
+ import { A as e, D as t, F as n, O as r, y as i } from "./SplitCellDialog-bNeugz_3.js";
2
2
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, reactive as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, toRef as D, unref as O, vModelSelect as k, vModelText as A, watch as j, withCtx as M, withDirectives as N, withKeys as P, withModifiers as F } from "vue";
3
- import { NO_LIST_STATE as I, listStateLevel as L } from "@stll/folio-core/prosemirror";
4
- import { getTableContext as R } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
5
- import { extractSelectionContext as z } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
6
- import { PANEL_METRICS as B } from "@stll/folio-core/panel-layout";
7
- import { createRenderedDomContext as V } from "@stll/folio-core/render-dom/RenderedDomContext";
8
- import { commentAnchorSelector as H, indexCommentAnchors as U } from "@stll/folio-core/render-dom/commentAnchorAttributes";
9
- import { sliceText as W } from "@stll/folio-core/utils/sliceText";
10
- import { DISPLAY_MODES as G } from "@stll/folio-core/managers/EditorModeManager";
11
- import { pixelsToTwips as ee, twipsToPixels as K } from "@stll/folio-core/utils/units";
12
- import { redoDepth as te, undoDepth as q } from "prosemirror-history";
13
- import { clearFormatting as J } from "@stll/folio-core/prosemirror/commands/formatting";
14
- import { executeEditorCommand as Y } from "@stll/folio-core/prosemirror/executeEditorCommand";
15
- import { resolveSidebarItemPositions as X } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
3
+ import { DISPLAY_MODES as I } from "@stll/folio-core/managers/EditorModeManager";
4
+ import { PANEL_METRICS as L } from "@stll/folio-core/panel-layout";
5
+ import { NO_LIST_STATE as ee, listStateLevel as R } from "@stll/folio-core/prosemirror";
6
+ import { getTableContext as z } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
7
+ import { extractSelectionContext as B } from "@stll/folio-core/prosemirror/plugins/selectionTracker";
8
+ import { redoDepth as te, undoDepth as ne } from "prosemirror-history";
9
+ import { getFindParagraphText as V } from "@stll/folio-core/utils/findReplace";
10
+ import { clearFormatting as re } from "@stll/folio-core/prosemirror/commands/formatting";
11
+ import { executeEditorCommand as H } from "@stll/folio-core/prosemirror/executeEditorCommand";
12
+ import { sliceText as U } from "@stll/folio-core/utils/sliceText";
13
+ import { createRenderedDomContext as W } from "@stll/folio-core/render-dom/RenderedDomContext";
14
+ import { commentAnchorSelector as G, indexCommentAnchors as K } from "@stll/folio-core/render-dom/commentAnchorAttributes";
15
+ import { pixelsToTwips as q, twipsToPixels as J } from "@stll/folio-core/utils/units";
16
+ import { onDocumentPointerDown as Y } from "@stll/folio-core/utils/documentPointerDown";
17
+ import { resolveSidebarItemPositions as ie } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
16
18
  //#region src/components/CommentMarginMarkers.vue?vue&type=script&setup=true&lang.ts
17
- var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
19
+ var ae = ["title", "onClick"], oe = /*#__PURE__*/ e(/* @__PURE__ */ p({
18
20
  __name: "CommentMarginMarkers",
19
21
  props: {
20
22
  comments: {},
@@ -30,7 +32,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
30
32
  if (t.sidebarOpen) return [];
31
33
  let e = t.pagesContainer;
32
34
  if (!e) return [];
33
- let n = e.getBoundingClientRect(), r = U(e), i = [];
35
+ let n = e.getBoundingClientRect(), r = K(e), i = [];
34
36
  for (let a of t.comments) {
35
37
  if (a.parentId != null) continue;
36
38
  let o = r.get(String(a.id));
@@ -64,12 +66,12 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
64
66
  }, [f(r, {
65
67
  name: n.isResolved ? "chat_bubble_check" : "chat_bubble_outline",
66
68
  size: 18
67
- }, null, 8, ["name"])], 12, ne))), 128))], 36)) : c("", !0);
69
+ }, null, 8, ["name"])], 12, ae))), 128))], 36)) : c("", !0);
68
70
  }
69
- }), [["__scopeId", "data-v-bf75a017"]]), re = { class: "doc-name" }, ie = ["value"], ae = {
71
+ }), [["__scopeId", "data-v-4157fff7"]]), se = { class: "doc-name" }, ce = ["value"], le = {
70
72
  key: 1,
71
73
  class: "doc-name__text"
72
- }, oe = /*#__PURE__*/ t(/* @__PURE__ */ p({
74
+ }, ue = /*#__PURE__*/ e(/* @__PURE__ */ p({
73
75
  __name: "DocumentName",
74
76
  props: {
75
77
  modelValue: {},
@@ -91,16 +93,16 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
91
93
  let t = e.target;
92
94
  t instanceof HTMLInputElement && (t.value.trim() || r("update:modelValue", "Untitled document.docx"));
93
95
  }
94
- return (t, n) => (b(), l("div", re, [e.editable ? (b(), l("input", {
96
+ return (t, n) => (b(), l("div", se, [e.editable ? (b(), l("input", {
95
97
  key: 0,
96
98
  class: "doc-name__input",
97
99
  value: i.value,
98
100
  placeholder: "Untitled document",
99
101
  onInput: a,
100
102
  onBlur: s
101
- }, null, 40, ie)) : (b(), l("span", ae, E(i.value || "Untitled document"), 1))]));
103
+ }, null, 40, ce)) : (b(), l("span", le, E(i.value || "Untitled document"), 1))]));
102
104
  }
103
- }), [["__scopeId", "data-v-ae6cb472"]]), se = ["aria-selected", "onMouseenter"], ce = { class: "docx-table-grid-inline__label" }, Q = /*#__PURE__*/ t(/* @__PURE__ */ p({
105
+ }), [["__scopeId", "data-v-0f0d068b"]]), X = ["aria-selected", "onMouseenter"], de = { class: "docx-table-grid-inline__label" }, fe = /*#__PURE__*/ e(/* @__PURE__ */ p({
104
106
  __name: "TableGridInline",
105
107
  props: {
106
108
  gridRows: { default: 6 },
@@ -136,15 +138,15 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
136
138
  i.value = e.r, s.value = e.c;
137
139
  },
138
140
  onClick: F(d, ["prevent"])
139
- }, null, 42, se))), 128))], 36), u("div", ce, E(i.value > 0 && s.value > 0 ? `${s.value} × ${i.value}` : "Select size"), 1)]));
141
+ }, null, 42, X))), 128))], 36), u("div", de, E(i.value > 0 && s.value > 0 ? `${s.value} × ${i.value}` : "Select size"), 1)]));
140
142
  }
141
- }), [["__scopeId", "data-v-79c593ca"]]), le = {
143
+ }), [["__scopeId", "data-v-4e94349a"]]), pe = {
142
144
  class: "menu-bar",
143
145
  role: "menubar"
144
- }, ue = {
146
+ }, me = {
145
147
  key: 1,
146
148
  class: "menu-bar__break-submenu"
147
- }, de = ["onClick"], fe = /*#__PURE__*/ t(/* @__PURE__ */ p({
149
+ }, Z = ["onClick"], he = /*#__PURE__*/ e(/* @__PURE__ */ p({
148
150
  __name: "MenuBar",
149
151
  props: {
150
152
  showFileOpen: {
@@ -240,7 +242,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
240
242
  label: h("toolbar.reportIssue"),
241
243
  onClick: g("reportIssue")
242
244
  }]);
243
- return (t, n) => (b(), l("div", le, [
245
+ return (t, n) => (b(), l("div", pe, [
244
246
  f(O(d), {
245
247
  label: O(h)("toolbar.file"),
246
248
  items: _.value
@@ -253,12 +255,12 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
253
255
  label: O(h)("toolbar.insert"),
254
256
  items: y.value
255
257
  }, {
256
- submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(Q, {
258
+ submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(fe, {
257
259
  key: 0,
258
260
  onInsert: (e, n) => {
259
261
  m("insert-table", e, n), t();
260
262
  }
261
- }, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div", ue, [(b(!0), l(a, null, C(x.value, (e) => (b(), l("button", {
263
+ }, null, 8, ["onInsert"])) : e.key === "break" ? (b(), l("div", me, [(b(!0), l(a, null, C(x.value, (e) => (b(), l("button", {
262
264
  key: e.action,
263
265
  type: "button",
264
266
  class: "menu-bar__break-item",
@@ -268,7 +270,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
268
270
  }, [f(r, {
269
271
  name: e.icon,
270
272
  size: 18
271
- }, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8, de))), 128))])) : c("", !0)]),
273
+ }, null, 8, ["name"]), u("span", null, E(e.label), 1)], 8, Z))), 128))])) : c("", !0)]),
272
274
  _: 1
273
275
  }, 8, ["label", "items"]),
274
276
  e.showHelpMenu ? (b(), s(O(d), {
@@ -278,365 +280,7 @@ var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
278
280
  }, null, 8, ["label", "items"])) : c("", !0)
279
281
  ]));
280
282
  }
281
- }), [["__scopeId", "data-v-bd3f3f2c"]]), $ = [
282
- "disabled",
283
- "aria-label",
284
- "title",
285
- "aria-expanded",
286
- "onClick"
287
- ], pe = { class: "docx-icon-grid__panel" }, me = ["title", "onClick"], he = /*#__PURE__*/ t(/* @__PURE__ */ p({
288
- __name: "IconGridDropdown",
289
- props: {
290
- options: {},
291
- activeValue: {},
292
- triggerIcon: {},
293
- tooltipContent: {},
294
- disabled: { type: Boolean },
295
- ariaLabel: {}
296
- },
297
- emits: ["select"],
298
- setup(e, { emit: t }) {
299
- let n = t, { Popover: o } = i(), c = S(!1);
300
- function d(e) {
301
- n("select", e), c.value = !1;
302
- }
303
- return (t, n) => (b(), s(O(o), {
304
- open: c.value,
305
- "onUpdate:open": n[0] ||= (e) => c.value = e,
306
- onClose: n[1] ||= (e) => c.value = !1
307
- }, {
308
- trigger: M(({ toggle: t }) => [u("button", {
309
- type: "button",
310
- class: g(["docx-icon-grid__btn", { "docx-icon-grid__btn--open": c.value }]),
311
- disabled: e.disabled,
312
- "aria-label": e.ariaLabel ?? e.tooltipContent,
313
- title: e.tooltipContent,
314
- "aria-expanded": c.value,
315
- "aria-haspopup": "true",
316
- onClick: F(t, ["prevent"])
317
- }, [f(r, {
318
- name: e.triggerIcon,
319
- size: 20
320
- }, null, 8, ["name"]), f(r, {
321
- name: "arrow_drop_down",
322
- size: 14
323
- })], 10, $)]),
324
- panel: M(() => [u("div", pe, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
325
- key: t.value,
326
- type: "button",
327
- class: g(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === t.value }]),
328
- title: t.label,
329
- onClick: F((e) => d(t.value), ["prevent"])
330
- }, [f(r, {
331
- name: t.iconName,
332
- size: 18
333
- }, null, 8, ["name"])], 10, me))), 128))])]),
334
- _: 1
335
- }, 8, ["open"]));
336
- }
337
- }), [["__scopeId", "data-v-72fa875c"]]), ge = /* @__PURE__ */ p({
338
- __name: "ImageWrapDropdown",
339
- props: {
340
- imageContext: {},
341
- disabled: { type: Boolean }
342
- },
343
- emits: ["change"],
344
- setup(e) {
345
- let t = e, { t: r } = n(), i = [
346
- {
347
- value: "inline",
348
- labelKey: "imageWrap.inline",
349
- iconName: "format_image_left"
350
- },
351
- {
352
- value: "wrapRight",
353
- labelKey: "imageWrap.floatLeft",
354
- iconName: "format_image_right"
355
- },
356
- {
357
- value: "wrapLeft",
358
- labelKey: "imageWrap.floatRight",
359
- iconName: "format_image_left"
360
- },
361
- {
362
- value: "topAndBottom",
363
- labelKey: "imageWrap.topAndBottom",
364
- iconName: "horizontal_rule"
365
- },
366
- {
367
- value: "behind",
368
- labelKey: "imageWrap.behindText",
369
- iconName: "flip_to_back"
370
- },
371
- {
372
- value: "inFront",
373
- labelKey: "imageWrap.inFrontOfText",
374
- iconName: "flip_to_front"
375
- }
376
- ], a = o(() => i.map((e) => ({
377
- value: e.value,
378
- label: r(e.labelKey),
379
- iconName: e.iconName
380
- }))), c = o(() => {
381
- let e = t.imageContext;
382
- return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
383
- }), l = o(() => a.value.find((e) => e.value === c.value) ?? a.value.at(0)), u = o(() => l.value?.iconName ?? "format_image_left"), d = o(() => l.value?.label ?? "");
384
- return (t, n) => (b(), s(he, {
385
- options: a.value,
386
- "active-value": c.value,
387
- "trigger-icon": u.value,
388
- "tooltip-content": O(r)("imageWrap.tooltipPrefix", { label: d.value }),
389
- disabled: e.disabled,
390
- onSelect: n[0] ||= (e) => t.$emit("change", e)
391
- }, null, 8, [
392
- "options",
393
- "active-value",
394
- "trigger-icon",
395
- "tooltip-content",
396
- "disabled"
397
- ]));
398
- }
399
- }), _e = /* @__PURE__ */ p({
400
- __name: "ImageTransformDropdown",
401
- props: { disabled: { type: Boolean } },
402
- emits: ["transform"],
403
- setup(e) {
404
- let { t } = n(), r = [
405
- {
406
- value: "rotateCW",
407
- labelKey: "imageTransform.rotateClockwise",
408
- iconName: "rotate_right"
409
- },
410
- {
411
- value: "rotateCCW",
412
- labelKey: "imageTransform.rotateCounterClockwise",
413
- iconName: "rotate_left"
414
- },
415
- {
416
- value: "flipH",
417
- labelKey: "imageTransform.flipHorizontal",
418
- iconName: "swap_horiz"
419
- },
420
- {
421
- value: "flipV",
422
- labelKey: "imageTransform.flipVertical",
423
- iconName: "swap_vert"
424
- }
425
- ], i = o(() => r.map((e) => ({
426
- value: e.value,
427
- label: t(e.labelKey),
428
- iconName: e.iconName
429
- })));
430
- return (n, r) => (b(), s(he, {
431
- options: i.value,
432
- "trigger-icon": "rotate_right",
433
- "tooltip-content": O(t)("imageTransform.tooltip"),
434
- disabled: e.disabled,
435
- onSelect: r[0] ||= (e) => n.$emit("transform", e)
436
- }, null, 8, [
437
- "options",
438
- "tooltip-content",
439
- "disabled"
440
- ]));
441
- }
442
- }), ve = ["title", "onClick"], ye = {
443
- key: 0,
444
- class: "editing-mode__label"
445
- }, be = { class: "editing-mode__panel" }, xe = ["onClick"], Se = { class: "editing-mode__option-text" }, Ce = { class: "editing-mode__option-label" }, we = { class: "editing-mode__option-desc" }, Te = /*#__PURE__*/ t(/* @__PURE__ */ p({
446
- __name: "EditingModeDropdown",
447
- props: { modelValue: {} },
448
- emits: ["update:modelValue"],
449
- setup(e, { emit: t }) {
450
- let { t: d } = n(), { Popover: p } = i(), m = e, h = t, _ = {
451
- value: "editing",
452
- labelKey: "editor.editing",
453
- icon: "edit_note",
454
- descKey: "editor.editingDescription"
455
- }, x = [
456
- _,
457
- {
458
- value: "suggesting",
459
- labelKey: "editor.suggesting",
460
- icon: "rate_review",
461
- descKey: "editor.suggestingDescription"
462
- },
463
- {
464
- value: "viewing",
465
- labelKey: "editor.viewing",
466
- icon: "visibility",
467
- descKey: "editor.viewingDescription"
468
- }
469
- ], w = S(!1), T = S(!1), D = o(() => x.find((e) => e.value === m.modelValue) ?? _);
470
- function k(e) {
471
- h("update:modelValue", e), w.value = !1;
472
- }
473
- let A = null;
474
- function j(e) {
475
- T.value = e.matches;
476
- }
477
- return y(() => {
478
- A = window.matchMedia("(max-width: 1400px)"), T.value = A.matches, A.addEventListener("change", j);
479
- }), v(() => A?.removeEventListener("change", j)), (t, n) => (b(), s(O(p), {
480
- open: w.value,
481
- placement: "bottom-right",
482
- "onUpdate:open": n[0] ||= (e) => w.value = e,
483
- onClose: n[1] ||= (e) => w.value = !1
484
- }, {
485
- trigger: M(({ toggle: e }) => [u("button", {
486
- type: "button",
487
- class: g(["editing-mode__trigger", {
488
- "editing-mode__trigger--open": w.value,
489
- "editing-mode__trigger--compact": T.value
490
- }]),
491
- title: `${O(d)(D.value.labelKey)} (Ctrl+Shift+E)`,
492
- onClick: F(e, ["prevent"])
493
- }, [
494
- f(r, {
495
- name: D.value.icon,
496
- size: 18
497
- }, null, 8, ["name"]),
498
- T.value ? c("", !0) : (b(), l("span", ye, E(O(d)(D.value.labelKey)), 1)),
499
- f(r, {
500
- name: "arrow_drop_down",
501
- size: 16
502
- })
503
- ], 10, ve)]),
504
- panel: M(() => [u("div", be, [(b(), l(a, null, C(x, (t) => u("button", {
505
- key: t.value,
506
- type: "button",
507
- class: "editing-mode__option",
508
- onClick: F((e) => k(t.value), ["prevent"])
509
- }, [
510
- f(r, {
511
- name: t.icon,
512
- size: 20
513
- }, null, 8, ["name"]),
514
- u("span", Se, [u("span", Ce, E(O(d)(t.labelKey)), 1), u("span", we, E(O(d)(t.descKey)), 1)]),
515
- t.value === e.modelValue ? (b(), s(r, {
516
- key: 0,
517
- name: "check",
518
- size: 18,
519
- class: "editing-mode__check"
520
- })) : c("", !0)
521
- ], 8, xe)), 64))])]),
522
- _: 1
523
- }, 8, ["open"]));
524
- }
525
- }), [["__scopeId", "data-v-333d7e96"]]), Ee = { class: "review-controls" }, De = [
526
- "disabled",
527
- "aria-pressed",
528
- "aria-label",
529
- "title"
530
- ], Oe = { class: "review-controls__toggle-label" }, ke = ["title", "onClick"], Ae = { class: "review-controls__display-label" }, je = ["onClick"], Me = { class: "review-controls__option-label" }, Ne = /*#__PURE__*/ t(/* @__PURE__ */ p({
531
- __name: "ReviewControls",
532
- props: {
533
- trackChangesOn: { type: Boolean },
534
- displayMode: {},
535
- readOnly: {
536
- type: Boolean,
537
- default: !1
538
- }
539
- },
540
- emits: ["toggle-track-changes", "update:display-mode"],
541
- setup(e, { emit: t }) {
542
- let { t: d } = n(), { Popover: p } = i(), m = e, h = t, _ = S(!1), v = {
543
- "all-markup": "markupView.allMarkup",
544
- "simple-markup": "markupView.simple",
545
- "no-markup": "markupView.noMarkup",
546
- original: "markupView.original"
547
- };
548
- function y(e) {
549
- return d(v[e]);
550
- }
551
- let x = o(() => y(m.displayMode));
552
- function w(e) {
553
- h("update:display-mode", e), _.value = !1;
554
- }
555
- return (t, n) => (b(), l("div", Ee, [u("button", {
556
- type: "button",
557
- class: g(["review-controls__toggle", { "review-controls__toggle--on": e.trackChangesOn }]),
558
- disabled: e.readOnly,
559
- "aria-pressed": e.trackChangesOn,
560
- "aria-label": O(d)("toggleTrackChanges"),
561
- title: O(d)("toggleTrackChanges"),
562
- onMousedown: n[0] ||= F(() => {}, ["prevent"]),
563
- onClick: n[1] ||= F((e) => t.$emit("toggle-track-changes"), ["prevent"])
564
- }, [f(r, {
565
- name: "edit_note",
566
- size: 18
567
- }), u("span", Oe, E(e.trackChangesOn ? O(d)("trackingOn") : O(d)("trackingOff")), 1)], 42, De), f(O(p), {
568
- open: _.value,
569
- placement: "bottom-right",
570
- "onUpdate:open": n[4] ||= (e) => _.value = e,
571
- onClose: n[5] ||= (e) => _.value = !1
572
- }, {
573
- trigger: M(({ toggle: e }) => [u("button", {
574
- type: "button",
575
- class: g(["review-controls__display", { "review-controls__display--open": _.value }]),
576
- title: x.value,
577
- onMousedown: n[2] ||= F(() => {}, ["prevent"]),
578
- onClick: F(e, ["prevent"])
579
- }, [
580
- f(r, {
581
- name: "visibility",
582
- size: 16
583
- }),
584
- u("span", Ae, E(x.value), 1),
585
- f(r, {
586
- name: "arrow_drop_down",
587
- size: 16
588
- })
589
- ], 42, ke)]),
590
- panel: M(() => [u("div", {
591
- class: "review-controls__panel",
592
- onMousedown: n[3] ||= F(() => {}, ["prevent"])
593
- }, [(b(!0), l(a, null, C(O(G), (t) => (b(), l("button", {
594
- key: t,
595
- type: "button",
596
- class: "review-controls__option",
597
- onClick: F((e) => w(t), ["prevent"])
598
- }, [u("span", Me, E(y(t)), 1), t === e.displayMode ? (b(), s(r, {
599
- key: 0,
600
- name: "check",
601
- size: 18,
602
- class: "review-controls__check"
603
- })) : c("", !0)], 8, je))), 128))], 32)]),
604
- _: 1
605
- }, 8, ["open"])]));
606
- }
607
- }), [["__scopeId", "data-v-e54a1ec7"]]);
608
- //#endregion
609
- //#region src/utils/fontOptions.ts
610
- function Pe(e) {
611
- if (e === void 0) return;
612
- let t = e.map((e) => typeof e == "string" ? {
613
- name: e,
614
- fontFamily: e,
615
- category: "other"
616
- } : e);
617
- if (Fe()) {
618
- let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
619
- for (let r of t) n.has(r.name) && !e.has(r.name) && (console.warn(`[DocxEditor] Duplicate font name in fontFamilies: "${r.name}"`), e.add(r.name)), n.add(r.name);
620
- }
621
- return t;
622
- }
623
- function Fe() {
624
- return typeof process < "u" && process.env.NODE_ENV !== "production";
625
- }
626
- function Ie(e, t) {
627
- if (!e || e.length === 0) return [];
628
- let n = /* @__PURE__ */ new Set();
629
- for (let e of t) n.add(e.trim().toLowerCase());
630
- let r = /* @__PURE__ */ new Set(), i = [];
631
- for (let t of e) {
632
- let e = t.name.trim().toLowerCase();
633
- n.has(e) || r.has(e) || (r.add(e), i.push(t));
634
- }
635
- return i;
636
- }
637
- //#endregion
638
- //#region src/components/Toolbar/presets.ts
639
- var Le = [
283
+ }), [["__scopeId", "data-v-a8e543d5"]]), ge = [
640
284
  {
641
285
  name: "Arial",
642
286
  fontFamily: "Arial",
@@ -697,7 +341,7 @@ var Le = [
697
341
  fontFamily: "Consolas",
698
342
  category: "monospace"
699
343
  }
700
- ], Re = [
344
+ ], _e = [
701
345
  8,
702
346
  9,
703
347
  10,
@@ -712,7 +356,7 @@ var Le = [
712
356
  36,
713
357
  48,
714
358
  72
715
- ], ze = [
359
+ ], ve = [
716
360
  {
717
361
  id: "Normal",
718
362
  label: "Normal",
@@ -743,7 +387,7 @@ var Le = [
743
387
  label: "Heading 3",
744
388
  nameKey: "styles.heading3"
745
389
  }
746
- ], Be = [
390
+ ], ye = [
747
391
  {
748
392
  label: "Single",
749
393
  labelKey: "lineSpacing.single",
@@ -762,17 +406,78 @@ var Le = [
762
406
  labelKey: "lineSpacing.double",
763
407
  value: 480
764
408
  }
765
- ], Ve = [
409
+ ], be = [
766
410
  .5,
767
411
  .75,
768
412
  1,
769
413
  1.25,
770
414
  1.5,
771
415
  2
772
- ];
416
+ ], xe = {
417
+ Title: 26,
418
+ Subtitle: 18,
419
+ Heading1: 24,
420
+ Heading2: 18,
421
+ Heading3: 16,
422
+ Heading4: 14,
423
+ Heading5: 13,
424
+ Heading6: 13,
425
+ Normal: 14
426
+ }, Se = /* @__PURE__ */ new Set([
427
+ "Title",
428
+ "Heading1",
429
+ "Heading2",
430
+ "Heading3"
431
+ ]), Ce = { Subtitle: "666666" }, we = "#4a6c8c";
432
+ function Te(e) {
433
+ let t = xe[e.styleId], n = {
434
+ fontSize: t ? `${t}px` : `${Math.min(Math.max(e.fontSize ? e.fontSize / 2 : 11, 11), 20)}px`,
435
+ lineHeight: "1.3"
436
+ };
437
+ (e.bold ?? Se.has(e.styleId)) && (n.fontWeight = "bold"), e.italic && (n.fontStyle = "italic");
438
+ let r = e.color ?? Ce[e.styleId];
439
+ return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color = we), n;
440
+ }
441
+ function Ee(e) {
442
+ return !e || e.length === 0 ? [] : e.filter((e) => e.type === "paragraph").filter((e) => e.qFormat ? !0 : !(e.hidden || e.semiHidden)).map((e) => ({
443
+ styleId: e.styleId,
444
+ name: e.name || e.styleId,
445
+ priority: e.uiPriority ?? 99,
446
+ fontSize: e.rPr?.fontSize,
447
+ bold: e.rPr?.bold,
448
+ italic: e.rPr?.italic,
449
+ color: e.rPr?.color?.rgb
450
+ })).sort((e, t) => e.priority - t.priority);
451
+ }
452
+ //#endregion
453
+ //#region src/composables/useParagraphStyleOptions.ts
454
+ function De(e) {
455
+ let t = o(() => {
456
+ let t = Ee(e.documentStyles());
457
+ return t.length > 0 ? t.map((t) => {
458
+ let n = ve.find((e) => e.id === t.styleId);
459
+ return {
460
+ id: t.styleId,
461
+ label: n ? e.t(n.nameKey) : t.name,
462
+ previewStyle: Te(t)
463
+ };
464
+ }) : ve.map((t) => ({
465
+ id: t.id,
466
+ label: e.t(t.nameKey),
467
+ previewStyle: Te({ styleId: t.id })
468
+ }));
469
+ });
470
+ return {
471
+ resolvedParagraphStyles: t,
472
+ currentStyleLabel: o(() => {
473
+ let n = e.currentStyleId() || "Normal", r = t.value.find((e) => e.id === n);
474
+ return r ? r.label : n;
475
+ })
476
+ };
477
+ }
773
478
  //#endregion
774
479
  //#region src/composables/useToolbarDropdowns.ts
775
- function He(e) {
480
+ function Oe(e) {
776
481
  let t = S(null), n = S({
777
482
  top: 0,
778
483
  left: 0
@@ -815,151 +520,445 @@ function He(e) {
815
520
  e.spacing
816
521
  ].some((e) => e.value?.contains(r)) || (t.value = null));
817
522
  }
818
- return y(() => document.addEventListener("mousedown", c)), v(() => document.removeEventListener("mousedown", c)), {
819
- openDropdown: t,
820
- dropdownMenuStyle: a,
821
- toggleDropdown: s,
822
- recomputeDropdownPos: i
823
- };
523
+ let l;
524
+ return y(() => {
525
+ l = Y(document, c);
526
+ }), v(() => l?.()), {
527
+ openDropdown: t,
528
+ dropdownMenuStyle: a,
529
+ toggleDropdown: s,
530
+ recomputeDropdownPos: i
531
+ };
532
+ }
533
+ //#endregion
534
+ //#region src/composables/useToolbarFontSize.ts
535
+ function ke(e) {
536
+ let t = S(!1), n = (t) => e.execCommand("setFontSize", t * 2);
537
+ function r() {
538
+ t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
539
+ }
540
+ function i() {
541
+ t.value = !0;
542
+ }
543
+ function a(r) {
544
+ if (t.value && r.target instanceof HTMLInputElement) {
545
+ let e = parseFloat(r.target.value);
546
+ isNaN(e) || n(Math.round(Math.min(Math.max(e, 1), 1638) * 2) / 2);
547
+ }
548
+ t.value = !1, e.openDropdown.value = null;
549
+ }
550
+ function o(r) {
551
+ t.value = !1, n(r), e.openDropdown.value = null;
552
+ }
553
+ function s() {
554
+ let t = e.currentFontSize.value;
555
+ n(_e.find((e) => e > t) || t + 1);
556
+ }
557
+ function c() {
558
+ let t = e.currentFontSize.value;
559
+ n([..._e].reverse().find((e) => e < t) || Math.max(1, t - 1));
560
+ }
561
+ return {
562
+ onSizeFocus: r,
563
+ onSizeInput: i,
564
+ commitFontSize: a,
565
+ pickFontSize: o,
566
+ increaseFontSize: s,
567
+ decreaseFontSize: c
568
+ };
569
+ }
570
+ //#endregion
571
+ //#region src/utils/fontOptions.ts
572
+ function Ae(e) {
573
+ if (e === void 0) return;
574
+ let t = e.map((e) => typeof e == "string" ? {
575
+ name: e,
576
+ fontFamily: e,
577
+ category: "other"
578
+ } : e);
579
+ if (je()) {
580
+ let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
581
+ for (let r of t) n.has(r.name) && !e.has(r.name) && (console.warn(`[DocxEditor] Duplicate font name in fontFamilies: "${r.name}"`), e.add(r.name)), n.add(r.name);
582
+ }
583
+ return t;
584
+ }
585
+ function je() {
586
+ return typeof process < "u" && process.env.NODE_ENV !== "production";
587
+ }
588
+ function Me(e, t) {
589
+ if (!e || e.length === 0) return [];
590
+ let n = /* @__PURE__ */ new Set();
591
+ for (let e of t) n.add(e.trim().toLowerCase());
592
+ let r = /* @__PURE__ */ new Set(), i = [];
593
+ for (let t of e) {
594
+ let e = t.name.trim().toLowerCase();
595
+ n.has(e) || r.has(e) || (r.add(e), i.push(t));
596
+ }
597
+ return i;
824
598
  }
825
599
  //#endregion
826
- //#region src/composables/useToolbarFontSize.ts
827
- function Ue(e) {
828
- let t = S(!1), n = (t) => e.execCommand("setFontSize", t * 2);
829
- function r() {
830
- t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
831
- }
832
- function i() {
833
- t.value = !0;
600
+ //#region src/components/EditingModeDropdown.vue?vue&type=script&setup=true&lang.ts
601
+ var Ne = ["title", "onClick"], Pe = {
602
+ key: 0,
603
+ class: "editing-mode__label"
604
+ }, Fe = { class: "editing-mode__panel" }, Ie = ["onClick"], Le = { class: "editing-mode__option-text" }, Re = { class: "editing-mode__option-label" }, ze = { class: "editing-mode__option-desc" }, Be = /*#__PURE__*/ e(/* @__PURE__ */ p({
605
+ __name: "EditingModeDropdown",
606
+ props: { modelValue: {} },
607
+ emits: ["update:modelValue"],
608
+ setup(e, { emit: t }) {
609
+ let { t: d } = n(), { Popover: p } = i(), m = e, h = t, _ = {
610
+ value: "editing",
611
+ labelKey: "editor.editing",
612
+ icon: "edit_note",
613
+ descKey: "editor.editingDescription"
614
+ }, x = [
615
+ _,
616
+ {
617
+ value: "suggesting",
618
+ labelKey: "editor.suggesting",
619
+ icon: "rate_review",
620
+ descKey: "editor.suggestingDescription"
621
+ },
622
+ {
623
+ value: "viewing",
624
+ labelKey: "editor.viewing",
625
+ icon: "visibility",
626
+ descKey: "editor.viewingDescription"
627
+ }
628
+ ], w = S(!1), T = S(!1), D = o(() => x.find((e) => e.value === m.modelValue) ?? _);
629
+ function k(e) {
630
+ h("update:modelValue", e), w.value = !1;
631
+ }
632
+ let A = null;
633
+ function j(e) {
634
+ T.value = e.matches;
635
+ }
636
+ return y(() => {
637
+ A = window.matchMedia("(max-width: 1400px)"), T.value = A.matches, A.addEventListener("change", j);
638
+ }), v(() => A?.removeEventListener("change", j)), (t, n) => (b(), s(O(p), {
639
+ open: w.value,
640
+ placement: "bottom-right",
641
+ "onUpdate:open": n[0] ||= (e) => w.value = e,
642
+ onClose: n[1] ||= (e) => w.value = !1
643
+ }, {
644
+ trigger: M(({ toggle: e }) => [u("button", {
645
+ type: "button",
646
+ class: g(["editing-mode__trigger", {
647
+ "editing-mode__trigger--open": w.value,
648
+ "editing-mode__trigger--compact": T.value
649
+ }]),
650
+ title: `${O(d)(D.value.labelKey)} (Ctrl+Shift+E)`,
651
+ onClick: F(e, ["prevent"])
652
+ }, [
653
+ f(r, {
654
+ name: D.value.icon,
655
+ size: 18
656
+ }, null, 8, ["name"]),
657
+ T.value ? c("", !0) : (b(), l("span", Pe, E(O(d)(D.value.labelKey)), 1)),
658
+ f(r, {
659
+ name: "arrow_drop_down",
660
+ size: 16
661
+ })
662
+ ], 10, Ne)]),
663
+ panel: M(() => [u("div", Fe, [(b(), l(a, null, C(x, (t) => u("button", {
664
+ key: t.value,
665
+ type: "button",
666
+ class: "editing-mode__option",
667
+ onClick: F((e) => k(t.value), ["prevent"])
668
+ }, [
669
+ f(r, {
670
+ name: t.icon,
671
+ size: 20
672
+ }, null, 8, ["name"]),
673
+ u("span", Le, [u("span", Re, E(O(d)(t.labelKey)), 1), u("span", ze, E(O(d)(t.descKey)), 1)]),
674
+ t.value === e.modelValue ? (b(), s(r, {
675
+ key: 0,
676
+ name: "check",
677
+ size: 18,
678
+ class: "editing-mode__check"
679
+ })) : c("", !0)
680
+ ], 8, Ie)), 64))])]),
681
+ _: 1
682
+ }, 8, ["open"]));
834
683
  }
835
- function a(r) {
836
- if (t.value && r.target instanceof HTMLInputElement) {
837
- let e = parseFloat(r.target.value);
838
- isNaN(e) || n(Math.round(Math.min(Math.max(e, 1), 1638) * 2) / 2);
684
+ }), [["__scopeId", "data-v-732ee330"]]), Ve = { class: "review-controls" }, He = [
685
+ "disabled",
686
+ "aria-pressed",
687
+ "aria-label",
688
+ "title"
689
+ ], Ue = { class: "review-controls__toggle-label" }, We = ["title", "onClick"], Ge = { class: "review-controls__display-label" }, Ke = ["onClick"], qe = { class: "review-controls__option-label" }, Je = /*#__PURE__*/ e(/* @__PURE__ */ p({
690
+ __name: "ReviewControls",
691
+ props: {
692
+ trackChangesOn: { type: Boolean },
693
+ displayMode: {},
694
+ readOnly: {
695
+ type: Boolean,
696
+ default: !1
839
697
  }
840
- t.value = !1, e.openDropdown.value = null;
698
+ },
699
+ emits: ["toggle-track-changes", "update:display-mode"],
700
+ setup(e, { emit: t }) {
701
+ let { t: d } = n(), { Popover: p } = i(), m = e, h = t, _ = S(!1), v = {
702
+ "all-markup": "markupView.allMarkup",
703
+ "simple-markup": "markupView.simple",
704
+ "no-markup": "markupView.noMarkup",
705
+ original: "markupView.original"
706
+ };
707
+ function y(e) {
708
+ return d(v[e]);
709
+ }
710
+ let x = o(() => y(m.displayMode));
711
+ function w(e) {
712
+ h("update:display-mode", e), _.value = !1;
713
+ }
714
+ return (t, n) => (b(), l("div", Ve, [u("button", {
715
+ type: "button",
716
+ class: g(["review-controls__toggle", { "review-controls__toggle--on": e.trackChangesOn }]),
717
+ disabled: e.readOnly,
718
+ "aria-pressed": e.trackChangesOn,
719
+ "aria-label": O(d)("toggleTrackChanges"),
720
+ title: O(d)("toggleTrackChanges"),
721
+ onMousedown: n[0] ||= F(() => {}, ["prevent"]),
722
+ onClick: n[1] ||= F((e) => t.$emit("toggle-track-changes"), ["prevent"])
723
+ }, [f(r, {
724
+ name: "edit_note",
725
+ size: 18
726
+ }), u("span", Ue, E(e.trackChangesOn ? O(d)("trackingOn") : O(d)("trackingOff")), 1)], 42, He), f(O(p), {
727
+ open: _.value,
728
+ placement: "bottom-right",
729
+ "onUpdate:open": n[4] ||= (e) => _.value = e,
730
+ onClose: n[5] ||= (e) => _.value = !1
731
+ }, {
732
+ trigger: M(({ toggle: e }) => [u("button", {
733
+ type: "button",
734
+ class: g(["review-controls__display", { "review-controls__display--open": _.value }]),
735
+ title: x.value,
736
+ onMousedown: n[2] ||= F(() => {}, ["prevent"]),
737
+ onClick: F(e, ["prevent"])
738
+ }, [
739
+ f(r, {
740
+ name: "visibility",
741
+ size: 16
742
+ }),
743
+ u("span", Ge, E(x.value), 1),
744
+ f(r, {
745
+ name: "arrow_drop_down",
746
+ size: 16
747
+ })
748
+ ], 42, We)]),
749
+ panel: M(() => [u("div", {
750
+ class: "review-controls__panel",
751
+ onMousedown: n[3] ||= F(() => {}, ["prevent"])
752
+ }, [(b(!0), l(a, null, C(O(I), (t) => (b(), l("button", {
753
+ key: t,
754
+ type: "button",
755
+ class: "review-controls__option",
756
+ onClick: F((e) => w(t), ["prevent"])
757
+ }, [u("span", qe, E(y(t)), 1), t === e.displayMode ? (b(), s(r, {
758
+ key: 0,
759
+ name: "check",
760
+ size: 18,
761
+ class: "review-controls__check"
762
+ })) : c("", !0)], 8, Ke))), 128))], 32)]),
763
+ _: 1
764
+ }, 8, ["open"])]));
841
765
  }
842
- function o(r) {
843
- t.value = !1, n(r), e.openDropdown.value = null;
766
+ }), [["__scopeId", "data-v-e96b04ec"]]), Ye = [
767
+ "disabled",
768
+ "aria-label",
769
+ "title",
770
+ "aria-expanded",
771
+ "onClick"
772
+ ], Xe = { class: "docx-icon-grid__panel" }, Ze = ["title", "onClick"], Qe = /*#__PURE__*/ e(/* @__PURE__ */ p({
773
+ __name: "IconGridDropdown",
774
+ props: {
775
+ options: {},
776
+ activeValue: {},
777
+ triggerIcon: {},
778
+ tooltipContent: {},
779
+ disabled: { type: Boolean },
780
+ ariaLabel: {}
781
+ },
782
+ emits: ["select"],
783
+ setup(e, { emit: t }) {
784
+ let n = t, { Popover: o } = i(), c = S(!1);
785
+ function d(e) {
786
+ n("select", e), c.value = !1;
787
+ }
788
+ return (t, n) => (b(), s(O(o), {
789
+ open: c.value,
790
+ "onUpdate:open": n[0] ||= (e) => c.value = e,
791
+ onClose: n[1] ||= (e) => c.value = !1
792
+ }, {
793
+ trigger: M(({ toggle: t }) => [u("button", {
794
+ type: "button",
795
+ class: g(["docx-icon-grid__btn", { "docx-icon-grid__btn--open": c.value }]),
796
+ disabled: e.disabled,
797
+ "aria-label": e.ariaLabel ?? e.tooltipContent,
798
+ title: e.tooltipContent,
799
+ "aria-expanded": c.value,
800
+ "aria-haspopup": "true",
801
+ onClick: F(t, ["prevent"])
802
+ }, [f(r, {
803
+ name: e.triggerIcon,
804
+ size: 20
805
+ }, null, 8, ["name"]), f(r, {
806
+ name: "arrow_drop_down",
807
+ size: 14
808
+ })], 10, Ye)]),
809
+ panel: M(() => [u("div", Xe, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
810
+ key: t.value,
811
+ type: "button",
812
+ class: g(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === t.value }]),
813
+ title: t.label,
814
+ onClick: F((e) => d(t.value), ["prevent"])
815
+ }, [f(r, {
816
+ name: t.iconName,
817
+ size: 18
818
+ }, null, 8, ["name"])], 10, Ze))), 128))])]),
819
+ _: 1
820
+ }, 8, ["open"]));
844
821
  }
845
- function s() {
846
- let t = e.currentFontSize.value;
847
- n(Re.find((e) => e > t) || t + 1);
822
+ }), [["__scopeId", "data-v-5ef29208"]]), $e = /* @__PURE__ */ p({
823
+ __name: "ImageTransformDropdown",
824
+ props: { disabled: { type: Boolean } },
825
+ emits: ["transform"],
826
+ setup(e) {
827
+ let { t } = n(), r = [
828
+ {
829
+ value: "rotateCW",
830
+ labelKey: "imageTransform.rotateClockwise",
831
+ iconName: "rotate_right"
832
+ },
833
+ {
834
+ value: "rotateCCW",
835
+ labelKey: "imageTransform.rotateCounterClockwise",
836
+ iconName: "rotate_left"
837
+ },
838
+ {
839
+ value: "flipH",
840
+ labelKey: "imageTransform.flipHorizontal",
841
+ iconName: "swap_horiz"
842
+ },
843
+ {
844
+ value: "flipV",
845
+ labelKey: "imageTransform.flipVertical",
846
+ iconName: "swap_vert"
847
+ }
848
+ ], i = o(() => r.map((e) => ({
849
+ value: e.value,
850
+ label: t(e.labelKey),
851
+ iconName: e.iconName
852
+ })));
853
+ return (n, r) => (b(), s(Qe, {
854
+ options: i.value,
855
+ "trigger-icon": "rotate_right",
856
+ "tooltip-content": O(t)("imageTransform.tooltip"),
857
+ disabled: e.disabled,
858
+ onSelect: r[0] ||= (e) => n.$emit("transform", e)
859
+ }, null, 8, [
860
+ "options",
861
+ "tooltip-content",
862
+ "disabled"
863
+ ]));
848
864
  }
849
- function c() {
850
- let t = e.currentFontSize.value;
851
- n([...Re].reverse().find((e) => e < t) || Math.max(1, t - 1));
865
+ }), et = /* @__PURE__ */ p({
866
+ __name: "ImageWrapDropdown",
867
+ props: {
868
+ imageContext: {},
869
+ disabled: { type: Boolean }
870
+ },
871
+ emits: ["change"],
872
+ setup(e) {
873
+ let t = e, { t: r } = n(), i = [
874
+ {
875
+ value: "inline",
876
+ labelKey: "imageWrap.inline",
877
+ iconName: "format_image_left"
878
+ },
879
+ {
880
+ value: "wrapRight",
881
+ labelKey: "imageWrap.floatLeft",
882
+ iconName: "format_image_right"
883
+ },
884
+ {
885
+ value: "wrapLeft",
886
+ labelKey: "imageWrap.floatRight",
887
+ iconName: "format_image_left"
888
+ },
889
+ {
890
+ value: "topAndBottom",
891
+ labelKey: "imageWrap.topAndBottom",
892
+ iconName: "horizontal_rule"
893
+ },
894
+ {
895
+ value: "behind",
896
+ labelKey: "imageWrap.behindText",
897
+ iconName: "flip_to_back"
898
+ },
899
+ {
900
+ value: "inFront",
901
+ labelKey: "imageWrap.inFrontOfText",
902
+ iconName: "flip_to_front"
903
+ }
904
+ ], a = o(() => i.map((e) => ({
905
+ value: e.value,
906
+ label: r(e.labelKey),
907
+ iconName: e.iconName
908
+ }))), c = o(() => {
909
+ let e = t.imageContext;
910
+ return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
911
+ }), l = o(() => a.value.find((e) => e.value === c.value) ?? a.value.at(0)), u = o(() => l.value?.iconName ?? "format_image_left"), d = o(() => l.value?.label ?? "");
912
+ return (t, n) => (b(), s(Qe, {
913
+ options: a.value,
914
+ "active-value": c.value,
915
+ "trigger-icon": u.value,
916
+ "tooltip-content": O(r)("imageWrap.tooltipPrefix", { label: d.value }),
917
+ disabled: e.disabled,
918
+ onSelect: n[0] ||= (e) => t.$emit("change", e)
919
+ }, null, 8, [
920
+ "options",
921
+ "active-value",
922
+ "trigger-icon",
923
+ "tooltip-content",
924
+ "disabled"
925
+ ]));
852
926
  }
853
- return {
854
- onSizeFocus: r,
855
- onSizeInput: i,
856
- commitFontSize: a,
857
- pickFontSize: o,
858
- increaseFontSize: s,
859
- decreaseFontSize: c
860
- };
861
- }
862
- //#endregion
863
- //#region src/utils/stylePreview.ts
864
- var We = {
865
- Title: 26,
866
- Subtitle: 18,
867
- Heading1: 24,
868
- Heading2: 18,
869
- Heading3: 16,
870
- Heading4: 14,
871
- Heading5: 13,
872
- Heading6: 13,
873
- Normal: 14
874
- }, Ge = /* @__PURE__ */ new Set([
875
- "Title",
876
- "Heading1",
877
- "Heading2",
878
- "Heading3"
879
- ]), Ke = { Subtitle: "666666" }, qe = "#4a6c8c";
880
- function Je(e) {
881
- let t = We[e.styleId], n = {
882
- fontSize: t ? `${t}px` : `${Math.min(Math.max(e.fontSize ? e.fontSize / 2 : 11, 11), 20)}px`,
883
- lineHeight: "1.3"
884
- };
885
- (e.bold ?? Ge.has(e.styleId)) && (n.fontWeight = "bold"), e.italic && (n.fontStyle = "italic");
886
- let r = e.color ?? Ke[e.styleId];
887
- return r ? n.color = `#${r}` : e.styleId.startsWith("Heading") && (n.color = qe), n;
888
- }
889
- function Ye(e) {
890
- return !e || e.length === 0 ? [] : e.filter((e) => e.type === "paragraph").filter((e) => e.qFormat ? !0 : !(e.hidden || e.semiHidden)).map((e) => ({
891
- styleId: e.styleId,
892
- name: e.name || e.styleId,
893
- priority: e.uiPriority ?? 99,
894
- fontSize: e.rPr?.fontSize,
895
- bold: e.rPr?.bold,
896
- italic: e.rPr?.italic,
897
- color: e.rPr?.color?.rgb
898
- })).sort((e, t) => e.priority - t.priority);
899
- }
900
- //#endregion
901
- //#region src/composables/useParagraphStyleOptions.ts
902
- function Xe(e) {
903
- let t = o(() => {
904
- let t = Ye(e.documentStyles());
905
- return t.length > 0 ? t.map((t) => {
906
- let n = ze.find((e) => e.id === t.styleId);
907
- return {
908
- id: t.styleId,
909
- label: n ? e.t(n.nameKey) : t.name,
910
- previewStyle: Je(t)
911
- };
912
- }) : ze.map((t) => ({
913
- id: t.id,
914
- label: e.t(t.nameKey),
915
- previewStyle: Je({ styleId: t.id })
916
- }));
917
- });
918
- return {
919
- resolvedParagraphStyles: t,
920
- currentStyleLabel: o(() => {
921
- let n = e.currentStyleId() || "Normal", r = t.value.find((e) => e.id === n);
922
- return r ? r.label : n;
923
- })
924
- };
925
- }
926
- //#endregion
927
- //#region src/components/Toolbar.vue?vue&type=script&setup=true&lang.ts
928
- var Ze = {
927
+ }), tt = {
929
928
  key: 0,
930
929
  class: "basic-toolbar"
931
- }, Qe = [
930
+ }, nt = [
932
931
  "title",
933
932
  "aria-label",
934
933
  "disabled"
935
- ], $e = [
934
+ ], rt = [
936
935
  "title",
937
936
  "aria-label",
938
937
  "disabled"
939
- ], et = ["disabled", "title"], tt = ["aria-expanded", "title"], nt = ["disabled", "title"], rt = ["onMousedown"], it = ["aria-expanded", "title"], at = ["onMousedown"], ot = ["aria-expanded", "title"], st = {
938
+ ], it = ["disabled", "title"], at = ["aria-expanded", "title"], ot = ["disabled", "title"], st = ["onMousedown"], ct = ["aria-expanded", "title"], lt = ["onMousedown"], ut = ["aria-expanded", "title"], dt = {
940
939
  key: 0,
941
940
  class: "toolbar-dropdown__group-label"
942
- }, ct = ["onMousedown"], lt = ["title"], ut = [
941
+ }, ft = ["onMousedown"], pt = ["title"], mt = [
943
942
  "value",
944
943
  "title",
945
944
  "aria-expanded"
946
- ], dt = ["title"], ft = ["onMousedown"], pt = ["title", "aria-label"], mt = ["title", "aria-label"], ht = ["title", "aria-label"], gt = ["title", "aria-label"], _t = ["title", "aria-label"], vt = ["title", "aria-label"], yt = ["title", "aria-label"], bt = ["aria-expanded", "title"], xt = ["title"], St = ["title"], Ct = ["title"], wt = ["title"], Tt = ["title", "aria-label"], Et = ["title", "aria-label"], Dt = [
945
+ ], ht = ["title"], gt = ["onMousedown"], _t = ["title", "aria-label"], vt = ["title", "aria-label"], yt = ["title", "aria-label"], bt = ["title", "aria-label"], xt = ["title", "aria-label"], St = ["title", "aria-label"], Ct = ["title", "aria-label"], wt = ["aria-expanded", "title"], Tt = ["title"], Et = ["title"], Dt = ["title"], Ot = ["title"], kt = ["title", "aria-label"], At = ["title", "aria-label"], jt = [
947
946
  "title",
948
947
  "aria-label",
949
948
  "disabled"
950
- ], Ot = ["title", "aria-label"], kt = ["aria-expanded", "title"], At = ["onMousedown"], jt = ["title", "aria-label"], Mt = [
949
+ ], Mt = ["title", "aria-label"], Nt = ["aria-expanded", "title"], Pt = ["onMousedown"], Ft = ["title", "aria-label"], It = [
951
950
  "title",
952
951
  "aria-label",
953
952
  "aria-pressed"
954
- ], Nt = [
953
+ ], Lt = [
955
954
  "title",
956
955
  "aria-label",
957
956
  "aria-pressed"
958
- ], Pt = {
957
+ ], Rt = {
959
958
  key: 0,
960
959
  "data-testid": "toolbar-comments-count",
961
960
  class: "basic-toolbar__comment-count"
962
- }, Ft = ["title", "aria-label"], It = /*#__PURE__*/ t(/* @__PURE__ */ p({
961
+ }, zt = ["title", "aria-label"], Bt = /*#__PURE__*/ e(/* @__PURE__ */ p({
963
962
  __name: "Toolbar",
964
963
  props: {
965
964
  view: { default: null },
@@ -1024,99 +1023,91 @@ var Ze = {
1024
1023
  "image-transform"
1025
1024
  ],
1026
1025
  setup(e, { emit: t }) {
1027
- let { ColorPicker: p } = i(), m = e, { t: h } = n(), v = t, y = o(() => m.zoomPercent ?? 100), x = o(() => m.isMinZoom ?? !1), T = o(() => m.isMaxZoom ?? !1), D = o(() => m.zoomPresets ?? Ve), k = o(() => m.showZoomControl ?? !0), A = S(null), j = S(null), M = S(null), N = S(null), R = S(null), B = S(null), { openDropdown: V, dropdownMenuStyle: H, toggleDropdown: U, recomputeDropdownPos: W } = He({
1028
- zoom: B,
1026
+ let { ColorPicker: p } = i(), m = e, { t: h } = n(), v = t, y = o(() => m.zoomPercent ?? 100), x = o(() => m.isMinZoom ?? !1), T = o(() => m.isMaxZoom ?? !1), D = o(() => m.zoomPresets ?? be), k = o(() => m.showZoomControl ?? !0), A = S(null), j = S(null), M = S(null), N = S(null), I = S(null), L = S(null), { openDropdown: z, dropdownMenuStyle: V, toggleDropdown: U, recomputeDropdownPos: W } = Oe({
1027
+ zoom: L,
1029
1028
  style: A,
1030
1029
  font: j,
1031
1030
  size: M,
1032
1031
  align: N,
1033
- spacing: R
1032
+ spacing: I
1034
1033
  }), G = o(() => {
1035
1034
  m.stateTick;
1036
1035
  let e = m.view;
1037
- return e ? z(e.state) : {
1036
+ return e ? B(e.state) : {
1038
1037
  hasSelection: !1,
1039
1038
  isMultiParagraph: !1,
1040
1039
  textFormatting: {},
1041
1040
  paragraphFormatting: {},
1042
1041
  startParagraphIndex: 0,
1043
1042
  endParagraphIndex: 0,
1044
- listState: I,
1043
+ listState: ee,
1045
1044
  activeCommentIds: [],
1046
1045
  inInsertion: !1,
1047
1046
  inDeletion: !1
1048
1047
  };
1049
- }), ee = o(() => {
1048
+ }), K = o(() => {
1050
1049
  let e = G.value.textFormatting.fontFamily;
1051
1050
  return e?.ascii || e?.hAnsi || "Arial";
1052
- }), K = o(() => {
1051
+ }), q = o(() => {
1053
1052
  let e = G.value.textFormatting.fontSize;
1054
1053
  return e ? e / 2 : 11;
1055
- }), X = o(() => G.value.paragraphFormatting.alignment || "left"), ne = o(() => {
1056
- switch (X.value) {
1054
+ }), J = o(() => G.value.paragraphFormatting.alignment || "left"), Y = o(() => {
1055
+ switch (J.value) {
1057
1056
  case "center": return "format_align_center";
1058
1057
  case "right": return "format_align_right";
1059
1058
  case "both": return "format_align_justify";
1060
1059
  default: return "format_align_left";
1061
1060
  }
1062
- }), { resolvedParagraphStyles: Z, currentStyleLabel: re } = Xe({
1061
+ }), { resolvedParagraphStyles: ie, currentStyleLabel: ae } = De({
1063
1062
  documentStyles: () => m.documentStyles,
1064
1063
  currentStyleId: () => G.value.paragraphFormatting.styleId || "Normal",
1065
1064
  t: h
1066
- }), ie = o(() => {
1065
+ }), oe = o(() => {
1067
1066
  if (m.stateTick, m.canUndo !== void 0) return m.canUndo;
1068
1067
  let e = m.view;
1069
- return e ? q(e.state) > 0 : !1;
1070
- }), ae = o(() => {
1068
+ return e ? ne(e.state) > 0 : !1;
1069
+ }), se = o(() => {
1071
1070
  if (m.stateTick, m.canRedo !== void 0) return m.canRedo;
1072
1071
  let e = m.view;
1073
1072
  return e ? te(e.state) > 0 : !1;
1074
- }), oe = o(() => {
1075
- let e = G.value, t = L(e.listState) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
1073
+ }), ce = o(() => {
1074
+ let e = G.value, t = R(e.listState) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
1076
1075
  return t || n;
1077
- }), se = o(() => {
1076
+ }), le = o(() => {
1078
1077
  let e = G.value.textFormatting.color?.rgb;
1079
1078
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
1080
- }), ce = o(() => {
1079
+ }), ue = o(() => {
1081
1080
  let e = G.value.textFormatting.highlight;
1082
- if (!(!e || e === "none")) return e.replace(/^#/, "").toUpperCase();
1083
- }), Q = o(() => Pe(m.fontFamilies) ?? Le), le = o(() => Ie(m.documentFonts, Q.value.map((e) => e.name))), ue = o(() => [
1081
+ if (e && e !== "none") return e.replace(/^#/, "").toUpperCase();
1082
+ }), X = o(() => Ae(m.fontFamilies) ?? ge), de = o(() => Me(m.documentFonts, X.value.map((e) => e.name))), fe = o(() => [
1084
1083
  {
1085
1084
  label: h("font.documentFonts"),
1086
- fonts: le.value
1085
+ fonts: de.value
1087
1086
  },
1088
1087
  {
1089
1088
  label: h("font.sansSerif"),
1090
- fonts: Q.value.filter((e) => e.category === "sans-serif")
1089
+ fonts: X.value.filter((e) => e.category === "sans-serif")
1091
1090
  },
1092
1091
  {
1093
1092
  label: h("font.serif"),
1094
- fonts: Q.value.filter((e) => e.category === "serif")
1093
+ fonts: X.value.filter((e) => e.category === "serif")
1095
1094
  },
1096
1095
  {
1097
1096
  label: h("font.monospace"),
1098
- fonts: Q.value.filter((e) => e.category === "monospace")
1097
+ fonts: X.value.filter((e) => e.category === "monospace")
1099
1098
  },
1100
1099
  {
1101
1100
  label: h("font.other"),
1102
- fonts: Q.value.filter((e) => !e.category || e.category === "other")
1101
+ fonts: X.value.filter((e) => !e.category || e.category === "other")
1103
1102
  }
1104
1103
  ]);
1105
- function de() {
1106
- if (m.onUndo) {
1107
- m.onUndo();
1108
- return;
1109
- }
1110
- $("undo");
1104
+ function pe() {
1105
+ m.onUndo ? m.onUndo() : Z("undo");
1111
1106
  }
1112
- function fe() {
1113
- if (m.onRedo) {
1114
- m.onRedo();
1115
- return;
1116
- }
1117
- $("redo");
1107
+ function me() {
1108
+ m.onRedo ? m.onRedo() : Z("redo");
1118
1109
  }
1119
- function $(e, ...t) {
1110
+ function Z(e, ...t) {
1120
1111
  let n = m.view;
1121
1112
  if (!n) return;
1122
1113
  let r = m.getCommands()[e];
@@ -1124,93 +1115,90 @@ var Ze = {
1124
1115
  typeof console < "u" && console.warn("[Toolbar] command not found:", e);
1125
1116
  return;
1126
1117
  }
1127
- Y(n, r(...t)), n.hasFocus() || n.focus(), V.value = null;
1118
+ let i = r(...t);
1119
+ H(n, i), n.hasFocus() || n.focus(), z.value = null;
1128
1120
  }
1129
- function pe(e) {
1130
- $("setFontFamily", e);
1121
+ function he(e) {
1122
+ Z("setFontFamily", e);
1131
1123
  }
1132
- let { onSizeFocus: me, onSizeInput: he, commitFontSize: ve, pickFontSize: ye, increaseFontSize: be, decreaseFontSize: xe } = Ue({
1133
- currentFontSize: K,
1134
- openDropdown: V,
1124
+ let { onSizeFocus: ve, onSizeInput: xe, commitFontSize: Se, pickFontSize: Ce, increaseFontSize: we, decreaseFontSize: Te } = ke({
1125
+ currentFontSize: q,
1126
+ openDropdown: z,
1135
1127
  recomputeDropdownPos: W,
1136
- execCommand: $
1128
+ execCommand: Z
1137
1129
  });
1138
- function Se(e) {
1139
- if (typeof e == "object" && e.auto) {
1140
- $("clearTextColor");
1141
- return;
1142
- }
1143
- $("setTextColor", typeof e == "string" ? { rgb: e } : e);
1130
+ function Ee(e) {
1131
+ typeof e == "object" && e.auto ? Z("clearTextColor") : Z("setTextColor", typeof e == "string" ? { rgb: e } : e);
1144
1132
  }
1145
- function Ce() {
1133
+ function je() {
1146
1134
  let e = m.view;
1147
- e && (Y(e, J), e.hasFocus() || e.focus());
1135
+ e && (H(e, re), e.hasFocus() || e.focus());
1148
1136
  }
1149
- function we(e) {
1150
- $("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
1137
+ function Ne(e) {
1138
+ Z("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
1151
1139
  }
1152
- function Ee(e) {
1153
- v("apply-style", e), V.value = null;
1140
+ function Pe(e) {
1141
+ v("apply-style", e), z.value = null;
1154
1142
  }
1155
- function De(e) {
1156
- $("setLineSpacing", e);
1143
+ function Fe(e) {
1144
+ Z("setLineSpacing", e);
1157
1145
  }
1158
- function Oe(e) {
1146
+ function Ie(e) {
1159
1147
  let t = G.value.paragraphFormatting.lineSpacing;
1160
1148
  return t ? Math.abs(t - e) < 10 : e === 240;
1161
1149
  }
1162
- return (t, n) => e.view ? (b(), l("div", Ze, [
1150
+ return (t, n) => e.view ? (b(), l("div", tt, [
1163
1151
  u("button", {
1164
1152
  title: O(h)("undoShortcut"),
1165
1153
  "aria-label": O(h)("undo"),
1166
- disabled: !ie.value,
1167
- onMousedown: F(de, ["prevent"])
1168
- }, [f(r, { name: "undo" })], 40, Qe),
1154
+ disabled: !oe.value,
1155
+ onMousedown: F(pe, ["prevent"])
1156
+ }, [f(r, { name: "undo" })], 40, nt),
1169
1157
  u("button", {
1170
1158
  title: O(h)("redoShortcut"),
1171
1159
  "aria-label": O(h)("redo"),
1172
- disabled: !ae.value,
1173
- onMousedown: F(fe, ["prevent"])
1174
- }, [f(r, { name: "redo" })], 40, $e),
1160
+ disabled: !se.value,
1161
+ onMousedown: F(me, ["prevent"])
1162
+ }, [f(r, { name: "redo" })], 40, rt),
1175
1163
  n[43] ||= u("span", { class: "divider" }, null, -1),
1176
1164
  k.value ? (b(), l("div", {
1177
1165
  key: 0,
1178
1166
  class: "toolbar-dropdown zoom-group",
1179
1167
  ref_key: "zoomDropdownRef",
1180
- ref: B
1168
+ ref: L
1181
1169
  }, [
1182
1170
  u("button", {
1183
1171
  class: "size-btn",
1184
1172
  onMousedown: n[0] ||= F((e) => t.$emit("zoom-out"), ["prevent"]),
1185
1173
  disabled: x.value,
1186
1174
  title: O(h)("zoom.zoomOut")
1187
- }, " − ", 40, et),
1175
+ }, " − ", 40, it),
1188
1176
  u("button", {
1189
1177
  class: "toolbar-dropdown__trigger zoom-trigger",
1190
1178
  onMousedown: n[1] ||= F((e) => O(U)("zoom"), ["prevent"]),
1191
- "aria-expanded": O(V) === "zoom",
1179
+ "aria-expanded": O(z) === "zoom",
1192
1180
  "aria-haspopup": "listbox",
1193
1181
  title: O(h)("zoom.zoomLevel")
1194
1182
  }, [d(E(y.value) + "% ", 1), f(r, {
1195
1183
  class: "chevron",
1196
1184
  name: "arrow_drop_down",
1197
1185
  size: 16
1198
- })], 40, tt),
1186
+ })], 40, at),
1199
1187
  u("button", {
1200
1188
  class: "size-btn",
1201
1189
  onMousedown: n[2] ||= F((e) => t.$emit("zoom-in"), ["prevent"]),
1202
1190
  disabled: T.value,
1203
1191
  title: O(h)("zoom.zoomIn")
1204
- }, " + ", 40, nt),
1205
- O(V) === "zoom" ? (b(), l("div", {
1192
+ }, " + ", 40, ot),
1193
+ O(z) === "zoom" ? (b(), l("div", {
1206
1194
  key: 0,
1207
- style: _(O(H)),
1195
+ style: _(O(V)),
1208
1196
  class: "toolbar-dropdown__menu zoom-menu"
1209
1197
  }, [(b(!0), l(a, null, C(D.value, (e) => (b(), l("button", {
1210
1198
  key: e,
1211
1199
  class: g(["toolbar-dropdown__item", { active: y.value === Math.round(e * 100) }]),
1212
1200
  onMousedown: F((n) => t.$emit("zoom-set", e), ["prevent"])
1213
- }, E(Math.round(e * 100)) + "% ", 43, rt))), 128))], 4)) : c("", !0)
1201
+ }, E(Math.round(e * 100)) + "% ", 43, st))), 128))], 4)) : c("", !0)
1214
1202
  ], 512)) : c("", !0),
1215
1203
  n[44] ||= u("span", { class: "divider" }, null, -1),
1216
1204
  u("div", {
@@ -1220,22 +1208,22 @@ var Ze = {
1220
1208
  }, [u("button", {
1221
1209
  class: "toolbar-dropdown__trigger style-trigger",
1222
1210
  onMousedown: n[3] ||= F((e) => O(U)("style"), ["prevent"]),
1223
- "aria-expanded": O(V) === "style",
1211
+ "aria-expanded": O(z) === "style",
1224
1212
  "aria-haspopup": "listbox",
1225
1213
  title: O(h)("styles.selectAriaLabel")
1226
- }, [d(E(O(re)) + " ", 1), f(r, {
1214
+ }, [d(E(O(ae)) + " ", 1), f(r, {
1227
1215
  class: "chevron",
1228
1216
  name: "arrow_drop_down",
1229
1217
  size: 16
1230
- })], 40, it), O(V) === "style" ? (b(), l("div", {
1218
+ })], 40, ct), O(z) === "style" ? (b(), l("div", {
1231
1219
  key: 0,
1232
- style: _(O(H)),
1220
+ style: _(O(V)),
1233
1221
  class: "toolbar-dropdown__menu style-menu"
1234
- }, [(b(!0), l(a, null, C(O(Z), (e) => (b(), l("button", {
1222
+ }, [(b(!0), l(a, null, C(O(ie), (e) => (b(), l("button", {
1235
1223
  key: e.id,
1236
1224
  class: g(["toolbar-dropdown__item", { active: (G.value.paragraphFormatting.styleId || "Normal") === e.id }]),
1237
- onMousedown: F((t) => Ee(e.id), ["prevent"])
1238
- }, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42, at))), 128))], 4)) : c("", !0)], 512),
1225
+ onMousedown: F((t) => Pe(e.id), ["prevent"])
1226
+ }, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42, lt))), 128))], 4)) : c("", !0)], 512),
1239
1227
  n[45] ||= u("span", { class: "divider" }, null, -1),
1240
1228
  u("div", {
1241
1229
  class: "toolbar-dropdown",
@@ -1244,23 +1232,23 @@ var Ze = {
1244
1232
  }, [u("button", {
1245
1233
  class: "toolbar-dropdown__trigger font-trigger",
1246
1234
  onMousedown: n[4] ||= F((e) => O(U)("font"), ["prevent"]),
1247
- "aria-expanded": O(V) === "font",
1235
+ "aria-expanded": O(z) === "font",
1248
1236
  "aria-haspopup": "listbox",
1249
1237
  title: O(h)("font.selectAriaLabel")
1250
- }, [d(E(ee.value) + " ", 1), f(r, {
1238
+ }, [d(E(K.value) + " ", 1), f(r, {
1251
1239
  class: "chevron",
1252
1240
  name: "arrow_drop_down",
1253
1241
  size: 16
1254
- })], 40, ot), O(V) === "font" ? (b(), l("div", {
1242
+ })], 40, ut), O(z) === "font" ? (b(), l("div", {
1255
1243
  key: 0,
1256
- style: _(O(H)),
1244
+ style: _(O(V)),
1257
1245
  class: "toolbar-dropdown__menu font-menu"
1258
- }, [(b(!0), l(a, null, C(ue.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", st, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
1246
+ }, [(b(!0), l(a, null, C(fe.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", dt, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
1259
1247
  key: e.name,
1260
- class: g(["toolbar-dropdown__item", { active: ee.value === e.name }]),
1248
+ class: g(["toolbar-dropdown__item", { active: K.value === e.name }]),
1261
1249
  style: _({ fontFamily: e.fontFamily }),
1262
- onMousedown: F((t) => pe(e.name), ["prevent"])
1263
- }, E(e.name), 47, ct))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
1250
+ onMousedown: F((t) => he(e.name), ["prevent"])
1251
+ }, E(e.name), 47, ft))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
1264
1252
  u("div", {
1265
1253
  class: "toolbar-dropdown font-size-group",
1266
1254
  ref_key: "sizeDropdownRef",
@@ -1268,95 +1256,95 @@ var Ze = {
1268
1256
  }, [
1269
1257
  u("button", {
1270
1258
  class: "size-btn",
1271
- onMousedown: n[5] ||= F((...e) => O(xe) && O(xe)(...e), ["prevent"]),
1259
+ onMousedown: n[5] ||= F((...e) => O(Te) && O(Te)(...e), ["prevent"]),
1272
1260
  title: O(h)("decreaseFontSize")
1273
- }, " − ", 40, lt),
1261
+ }, " − ", 40, pt),
1274
1262
  u("input", {
1275
1263
  class: "size-trigger size-input",
1276
1264
  type: "text",
1277
- value: K.value,
1265
+ value: q.value,
1278
1266
  title: O(h)("fontSize"),
1279
1267
  onMousedown: n[6] ||= F(() => {}, ["stop"]),
1280
- onFocus: n[7] ||= (...e) => O(me) && O(me)(...e),
1281
- "aria-expanded": O(V) === "size",
1268
+ onFocus: n[7] ||= (...e) => O(ve) && O(ve)(...e),
1269
+ "aria-expanded": O(z) === "size",
1282
1270
  "aria-haspopup": "listbox",
1283
- onInput: n[8] ||= (...e) => O(he) && O(he)(...e),
1271
+ onInput: n[8] ||= (...e) => O(xe) && O(xe)(...e),
1284
1272
  onKeydown: [
1285
- n[9] ||= P(F((e) => O(be)(), ["prevent", "stop"]), ["up"]),
1286
- n[10] ||= P(F((e) => O(xe)(), ["prevent", "stop"]), ["down"]),
1287
- n[11] ||= P(F((e) => O(ve)(e), ["prevent"]), ["enter"])
1273
+ n[9] ||= P(F((e) => O(we)(), ["prevent", "stop"]), ["up"]),
1274
+ n[10] ||= P(F((e) => O(Te)(), ["prevent", "stop"]), ["down"]),
1275
+ n[11] ||= P(F((e) => O(Se)(e), ["prevent"]), ["enter"])
1288
1276
  ],
1289
- onBlur: n[12] ||= (e) => O(ve)(e)
1290
- }, null, 40, ut),
1277
+ onBlur: n[12] ||= (e) => O(Se)(e)
1278
+ }, null, 40, mt),
1291
1279
  u("button", {
1292
1280
  class: "size-btn",
1293
- onMousedown: n[13] ||= F((...e) => O(be) && O(be)(...e), ["prevent"]),
1281
+ onMousedown: n[13] ||= F((...e) => O(we) && O(we)(...e), ["prevent"]),
1294
1282
  title: O(h)("increaseFontSize")
1295
- }, " + ", 40, dt),
1296
- O(V) === "size" ? (b(), l("div", {
1283
+ }, " + ", 40, ht),
1284
+ O(z) === "size" ? (b(), l("div", {
1297
1285
  key: 0,
1298
- style: _(O(H)),
1286
+ style: _(O(V)),
1299
1287
  class: "toolbar-dropdown__menu size-menu"
1300
- }, [(b(!0), l(a, null, C(O(Re), (e) => (b(), l("button", {
1288
+ }, [(b(!0), l(a, null, C(O(_e), (e) => (b(), l("button", {
1301
1289
  key: e,
1302
- class: g(["toolbar-dropdown__item", { active: K.value === e }]),
1303
- onMousedown: F((t) => O(ye)(e), ["prevent"])
1304
- }, E(e), 43, ft))), 128))], 4)) : c("", !0)
1290
+ class: g(["toolbar-dropdown__item", { active: q.value === e }]),
1291
+ onMousedown: F((t) => O(Ce)(e), ["prevent"])
1292
+ }, E(e), 43, gt))), 128))], 4)) : c("", !0)
1305
1293
  ], 512),
1306
1294
  n[46] ||= u("span", { class: "divider" }, null, -1),
1307
1295
  u("button", {
1308
1296
  title: O(h)("boldShortcut"),
1309
1297
  "aria-label": O(h)("bold"),
1310
1298
  class: g({ active: G.value.textFormatting.bold }),
1311
- onMousedown: n[14] ||= F((e) => $("toggleBold"), ["prevent"])
1312
- }, [f(r, { name: "format_bold" })], 42, pt),
1299
+ onMousedown: n[14] ||= F((e) => Z("toggleBold"), ["prevent"])
1300
+ }, [f(r, { name: "format_bold" })], 42, _t),
1313
1301
  u("button", {
1314
1302
  title: O(h)("italicShortcut"),
1315
1303
  "aria-label": O(h)("italic"),
1316
1304
  class: g({ active: G.value.textFormatting.italic }),
1317
- onMousedown: n[15] ||= F((e) => $("toggleItalic"), ["prevent"])
1318
- }, [f(r, { name: "format_italic" })], 42, mt),
1305
+ onMousedown: n[15] ||= F((e) => Z("toggleItalic"), ["prevent"])
1306
+ }, [f(r, { name: "format_italic" })], 42, vt),
1319
1307
  u("button", {
1320
1308
  title: O(h)("underlineShortcut"),
1321
1309
  "aria-label": O(h)("underline"),
1322
1310
  class: g({ active: !!G.value.textFormatting.underline }),
1323
- onMousedown: n[16] ||= F((e) => $("toggleUnderline"), ["prevent"])
1324
- }, [f(r, { name: "format_underlined" })], 42, ht),
1311
+ onMousedown: n[16] ||= F((e) => Z("toggleUnderline"), ["prevent"])
1312
+ }, [f(r, { name: "format_underlined" })], 42, yt),
1325
1313
  u("button", {
1326
1314
  title: O(h)("formattingBar.strikethrough"),
1327
1315
  "aria-label": O(h)("formattingBar.strikethrough"),
1328
1316
  class: g({ active: G.value.textFormatting.strike }),
1329
- onMousedown: n[17] ||= F((e) => $("toggleStrike"), ["prevent"])
1330
- }, [f(r, { name: "strikethrough_s" })], 42, gt),
1317
+ onMousedown: n[17] ||= F((e) => Z("toggleStrike"), ["prevent"])
1318
+ }, [f(r, { name: "strikethrough_s" })], 42, bt),
1331
1319
  f(O(p), {
1332
1320
  mode: "text",
1333
- value: se.value,
1321
+ value: le.value,
1334
1322
  theme: e.theme ?? null,
1335
- onChange: Se
1323
+ onChange: Ee
1336
1324
  }, null, 8, ["value", "theme"]),
1337
1325
  f(O(p), {
1338
1326
  mode: "highlight",
1339
- value: ce.value,
1327
+ value: ue.value,
1340
1328
  theme: e.theme ?? null,
1341
- onChange: we
1329
+ onChange: Ne
1342
1330
  }, null, 8, ["value", "theme"]),
1343
1331
  u("button", {
1344
1332
  title: O(h)("formattingBar.insertLinkShortcut"),
1345
1333
  "aria-label": O(h)("formattingBar.insertLink"),
1346
1334
  onMousedown: n[18] ||= F((e) => t.$emit("insert-link"), ["prevent"])
1347
- }, [f(r, { name: "link" })], 40, _t),
1335
+ }, [f(r, { name: "link" })], 40, xt),
1348
1336
  u("button", {
1349
1337
  title: O(h)("formattingBar.superscriptShortcut"),
1350
1338
  "aria-label": O(h)("formattingBar.superscript"),
1351
1339
  class: g({ active: G.value.textFormatting.vertAlign === "superscript" }),
1352
- onMousedown: n[19] ||= F((e) => $("toggleSuperscript"), ["prevent"])
1353
- }, [f(r, { name: "superscript" })], 42, vt),
1340
+ onMousedown: n[19] ||= F((e) => Z("toggleSuperscript"), ["prevent"])
1341
+ }, [f(r, { name: "superscript" })], 42, St),
1354
1342
  u("button", {
1355
1343
  title: O(h)("formattingBar.subscriptShortcut"),
1356
1344
  "aria-label": O(h)("formattingBar.subscript"),
1357
1345
  class: g({ active: G.value.textFormatting.vertAlign === "subscript" }),
1358
- onMousedown: n[20] ||= F((e) => $("toggleSubscript"), ["prevent"])
1359
- }, [f(r, { name: "subscript" })], 42, yt),
1346
+ onMousedown: n[20] ||= F((e) => Z("toggleSubscript"), ["prevent"])
1347
+ }, [f(r, { name: "subscript" })], 42, Ct),
1360
1348
  n[47] ||= u("span", { class: "divider" }, null, -1),
1361
1349
  u("div", {
1362
1350
  class: "toolbar-dropdown",
@@ -1365,110 +1353,110 @@ var Ze = {
1365
1353
  }, [u("button", {
1366
1354
  class: "toolbar-dropdown__trigger align-trigger",
1367
1355
  onMousedown: n[21] ||= F((e) => O(U)("align"), ["prevent"]),
1368
- "aria-expanded": O(V) === "align",
1356
+ "aria-expanded": O(z) === "align",
1369
1357
  "aria-haspopup": "listbox",
1370
1358
  title: O(h)("alignmentGroup")
1371
- }, [f(r, { name: ne.value }, null, 8, ["name"]), f(r, {
1359
+ }, [f(r, { name: Y.value }, null, 8, ["name"]), f(r, {
1372
1360
  class: "chevron",
1373
1361
  name: "arrow_drop_down",
1374
1362
  size: 16
1375
- })], 40, bt), O(V) === "align" ? (b(), l("div", {
1363
+ })], 40, wt), O(z) === "align" ? (b(), l("div", {
1376
1364
  key: 0,
1377
- style: _(O(H)),
1365
+ style: _(O(V)),
1378
1366
  class: "toolbar-dropdown__menu align-strip"
1379
1367
  }, [
1380
1368
  u("button", {
1381
- class: g(["align-strip__btn", { active: X.value === "left" }]),
1369
+ class: g(["align-strip__btn", { active: J.value === "left" }]),
1382
1370
  title: `${O(h)("alignLeft")} (${O(h)("alignment.alignLeftShortcut")})`,
1383
1371
  onMousedown: n[22] ||= F((e) => {
1384
- $("alignLeft"), V.value = null;
1372
+ Z("alignLeft"), z.value = null;
1385
1373
  }, ["prevent"])
1386
1374
  }, [f(r, {
1387
1375
  name: "format_align_left",
1388
1376
  size: 18
1389
- })], 42, xt),
1377
+ })], 42, Tt),
1390
1378
  u("button", {
1391
- class: g(["align-strip__btn", { active: X.value === "center" }]),
1379
+ class: g(["align-strip__btn", { active: J.value === "center" }]),
1392
1380
  title: `${O(h)("alignCenter")} (${O(h)("alignment.centerShortcut")})`,
1393
1381
  onMousedown: n[23] ||= F((e) => {
1394
- $("alignCenter"), V.value = null;
1382
+ Z("alignCenter"), z.value = null;
1395
1383
  }, ["prevent"])
1396
1384
  }, [f(r, {
1397
1385
  name: "format_align_center",
1398
1386
  size: 18
1399
- })], 42, St),
1387
+ })], 42, Et),
1400
1388
  u("button", {
1401
- class: g(["align-strip__btn", { active: X.value === "right" }]),
1389
+ class: g(["align-strip__btn", { active: J.value === "right" }]),
1402
1390
  title: `${O(h)("alignRight")} (${O(h)("alignment.alignRightShortcut")})`,
1403
1391
  onMousedown: n[24] ||= F((e) => {
1404
- $("alignRight"), V.value = null;
1392
+ Z("alignRight"), z.value = null;
1405
1393
  }, ["prevent"])
1406
1394
  }, [f(r, {
1407
1395
  name: "format_align_right",
1408
1396
  size: 18
1409
- })], 42, Ct),
1397
+ })], 42, Dt),
1410
1398
  u("button", {
1411
- class: g(["align-strip__btn", { active: X.value === "both" }]),
1399
+ class: g(["align-strip__btn", { active: J.value === "both" }]),
1412
1400
  title: `${O(h)("justify")} (${O(h)("alignment.justifyShortcut")})`,
1413
1401
  onMousedown: n[25] ||= F((e) => {
1414
- $("alignJustify"), V.value = null;
1402
+ Z("alignJustify"), z.value = null;
1415
1403
  }, ["prevent"])
1416
1404
  }, [f(r, {
1417
1405
  name: "format_align_justify",
1418
1406
  size: 18
1419
- })], 42, wt)
1407
+ })], 42, Ot)
1420
1408
  ], 4)) : c("", !0)], 512),
1421
1409
  u("button", {
1422
1410
  title: O(h)("bulletList"),
1423
1411
  "aria-label": O(h)("bulletList"),
1424
1412
  class: g({ active: G.value.listState.type === "bullet" }),
1425
- onMousedown: n[26] ||= F((e) => $("toggleBulletList"), ["prevent"])
1426
- }, [f(r, { name: "format_list_bulleted" })], 42, Tt),
1413
+ onMousedown: n[26] ||= F((e) => Z("toggleBulletList"), ["prevent"])
1414
+ }, [f(r, { name: "format_list_bulleted" })], 42, kt),
1427
1415
  u("button", {
1428
1416
  title: O(h)("numberedList"),
1429
1417
  "aria-label": O(h)("numberedList"),
1430
1418
  class: g({ active: G.value.listState.type === "numbered" }),
1431
- onMousedown: n[27] ||= F((e) => $("toggleNumberedList"), ["prevent"])
1432
- }, [f(r, { name: "format_list_numbered" })], 42, Et),
1419
+ onMousedown: n[27] ||= F((e) => Z("toggleNumberedList"), ["prevent"])
1420
+ }, [f(r, { name: "format_list_numbered" })], 42, At),
1433
1421
  u("button", {
1434
1422
  title: O(h)("decreaseIndent"),
1435
1423
  "aria-label": O(h)("decreaseIndent"),
1436
- disabled: !oe.value,
1437
- onMousedown: n[28] ||= F((e) => $("outdent"), ["prevent"])
1438
- }, [f(r, { name: "format_indent_decrease" })], 40, Dt),
1424
+ disabled: !ce.value,
1425
+ onMousedown: n[28] ||= F((e) => Z("outdent"), ["prevent"])
1426
+ }, [f(r, { name: "format_indent_decrease" })], 40, jt),
1439
1427
  u("button", {
1440
1428
  title: O(h)("increaseIndent"),
1441
1429
  "aria-label": O(h)("increaseIndent"),
1442
- onMousedown: n[29] ||= F((e) => $("indent"), ["prevent"])
1443
- }, [f(r, { name: "format_indent_increase" })], 40, Ot),
1430
+ onMousedown: n[29] ||= F((e) => Z("indent"), ["prevent"])
1431
+ }, [f(r, { name: "format_indent_increase" })], 40, Mt),
1444
1432
  u("div", {
1445
1433
  class: "toolbar-dropdown",
1446
1434
  ref_key: "spacingDropdownRef",
1447
- ref: R
1435
+ ref: I
1448
1436
  }, [u("button", {
1449
1437
  class: "toolbar-dropdown__trigger",
1450
1438
  onMousedown: n[30] ||= F((e) => O(U)("spacing"), ["prevent"]),
1451
- "aria-expanded": O(V) === "spacing",
1439
+ "aria-expanded": O(z) === "spacing",
1452
1440
  "aria-haspopup": "listbox",
1453
1441
  title: O(h)("lineSpacing.label")
1454
1442
  }, [f(r, { name: "format_line_spacing" }), f(r, {
1455
1443
  class: "chevron",
1456
1444
  name: "arrow_drop_down",
1457
1445
  size: 16
1458
- })], 40, kt), O(V) === "spacing" ? (b(), l("div", {
1446
+ })], 40, Nt), O(z) === "spacing" ? (b(), l("div", {
1459
1447
  key: 0,
1460
- style: _(O(H)),
1448
+ style: _(O(V)),
1461
1449
  class: "toolbar-dropdown__menu"
1462
- }, [(b(!0), l(a, null, C(O(Be), (e) => (b(), l("button", {
1450
+ }, [(b(!0), l(a, null, C(O(ye), (e) => (b(), l("button", {
1463
1451
  key: e.value,
1464
- class: g(["toolbar-dropdown__item", { active: Oe(e.value) }]),
1465
- onMousedown: F((t) => De(e.value), ["prevent"])
1466
- }, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43, At))), 128))], 4)) : c("", !0)], 512),
1452
+ class: g(["toolbar-dropdown__item", { active: Ie(e.value) }]),
1453
+ onMousedown: F((t) => Fe(e.value), ["prevent"])
1454
+ }, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43, Pt))), 128))], 4)) : c("", !0)], 512),
1467
1455
  u("button", {
1468
1456
  title: O(h)("formattingBar.clearFormatting"),
1469
1457
  "aria-label": O(h)("formattingBar.clearFormatting"),
1470
- onMousedown: F(Ce, ["prevent"])
1471
- }, [f(r, { name: "format_clear" })], 40, jt),
1458
+ onMousedown: F(je, ["prevent"])
1459
+ }, [f(r, { name: "format_clear" })], 40, Ft),
1472
1460
  n[48] ||= u("span", { class: "divider" }, null, -1),
1473
1461
  e.outlineDrawer ? (b(), l("button", {
1474
1462
  key: 1,
@@ -1480,7 +1468,7 @@ var Ze = {
1480
1468
  class: g({ active: e.outlineDrawerOpen }),
1481
1469
  onMousedown: n[31] ||= F(() => {}, ["prevent"]),
1482
1470
  onClick: n[32] ||= (e) => t.$emit("toggle-outline")
1483
- }, [f(r, { name: "format_list_bulleted" })], 42, Mt)) : c("", !0),
1471
+ }, [f(r, { name: "format_list_bulleted" })], 42, It)) : c("", !0),
1484
1472
  u("button", {
1485
1473
  type: "button",
1486
1474
  "data-testid": "toolbar-comments-toggle",
@@ -1490,22 +1478,22 @@ var Ze = {
1490
1478
  class: g({ active: e.commentsSidebarOpen }),
1491
1479
  onMousedown: n[33] ||= F(() => {}, ["prevent"]),
1492
1480
  onClick: n[34] ||= (e) => t.$emit("toggle-sidebar")
1493
- }, [f(r, { name: "comment" }), e.commentCount > 0 ? (b(), l("span", Pt, E(e.commentCount > 99 ? "99+" : e.commentCount), 1)) : c("", !0)], 42, Nt),
1481
+ }, [f(r, { name: "comment" }), e.commentCount > 0 ? (b(), l("span", Rt, E(e.commentCount > 99 ? "99+" : e.commentCount), 1)) : c("", !0)], 42, Lt),
1494
1482
  e.imageContext ? (b(), l(a, { key: 2 }, [
1495
1483
  n[41] ||= u("span", { class: "divider" }, null, -1),
1496
- f(ge, {
1484
+ f(et, {
1497
1485
  "image-context": e.imageContext,
1498
1486
  onChange: n[35] ||= (e) => t.$emit("image-wrap-type", e)
1499
1487
  }, null, 8, ["image-context"]),
1500
- f(_e, { onTransform: n[36] ||= (e) => t.$emit("image-transform", e) }),
1488
+ f($e, { onTransform: n[36] ||= (e) => t.$emit("image-transform", e) }),
1501
1489
  u("button", {
1502
1490
  title: O(h)("formattingBar.imagePropertiesShortcut"),
1503
1491
  "aria-label": O(h)("formattingBar.imageProperties"),
1504
1492
  onMousedown: n[37] ||= F((e) => t.$emit("image-properties"), ["prevent"])
1505
- }, [f(r, { name: "tune" })], 40, Ft)
1493
+ }, [f(r, { name: "tune" })], 40, zt)
1506
1494
  ], 64)) : c("", !0),
1507
1495
  w(t.$slots, "table-context", {}, void 0, !0),
1508
- e.showReviewControls ? (b(), l(a, { key: 3 }, [n[42] ||= u("span", { class: "divider" }, null, -1), f(Ne, {
1496
+ e.showReviewControls ? (b(), l(a, { key: 3 }, [n[42] ||= u("span", { class: "divider" }, null, -1), f(Je, {
1509
1497
  "track-changes-on": e.trackChangesOn,
1510
1498
  "display-mode": e.displayMode,
1511
1499
  "read-only": e.readOnly,
@@ -1517,7 +1505,7 @@ var Ze = {
1517
1505
  "read-only"
1518
1506
  ])], 64)) : c("", !0),
1519
1507
  n[49] ||= u("span", { class: "divider" }, null, -1),
1520
- e.editorMode ? (b(), s(Te, {
1508
+ e.editorMode ? (b(), s(Be, {
1521
1509
  key: 4,
1522
1510
  "model-value": e.editorMode,
1523
1511
  "onUpdate:modelValue": n[40] ||= (e) => t.$emit("mode-change", e)
@@ -1525,7 +1513,7 @@ var Ze = {
1525
1513
  w(t.$slots, "toolbar-extra", {}, void 0, !0)
1526
1514
  ])) : c("", !0);
1527
1515
  }
1528
- }), [["__scopeId", "data-v-1ad51d76"]]), Lt = ["aria-valuemax"], Rt = { class: "docx-horizontal-ruler__ticks" }, zt = ["title", "onDblclick"], Bt = 12240, Vt = 1440, Ht = 1440, Ut = 567, Wt = "var(--doc-primary)", Gt = "var(--doc-primary)", Kt = "var(--doc-primary-hover)", qt = 5, Jt = /*#__PURE__*/ t(/* @__PURE__ */ p({
1516
+ }), [["__scopeId", "data-v-fe97ba0f"]]), Vt = ["aria-valuemax"], Ht = { class: "docx-horizontal-ruler__ticks" }, Ut = ["title", "onDblclick"], Wt = 12240, Gt = 1440, Kt = 1440, qt = 567, Jt = "var(--doc-primary)", Yt = "var(--doc-primary)", Xt = "var(--doc-primary-hover)", Q = 5, Zt = /*#__PURE__*/ e(/* @__PURE__ */ p({
1529
1517
  __name: "HorizontalRuler",
1530
1518
  props: {
1531
1519
  sectionProps: {},
@@ -1557,14 +1545,14 @@ var Ze = {
1557
1545
  "tab-stop-remove"
1558
1546
  ],
1559
1547
  setup(e, { emit: t }) {
1560
- let n = e, r = t, i = Math.round(qt * 1.6), s = S(null), d = S(null), f = S(null), p = S(0), m = S("");
1548
+ let n = e, r = t, i = Math.round(Q * 1.6), s = S(null), d = S(null), f = S(null), p = S(0), m = S("");
1561
1549
  function h(e) {
1562
- return K(e) * n.zoom;
1550
+ return J(e) * n.zoom;
1563
1551
  }
1564
1552
  function g(e) {
1565
- return Math.round(ee(e / n.zoom));
1553
+ return Math.round(q(e / n.zoom));
1566
1554
  }
1567
- let y = o(() => n.sectionProps?.pageWidth ?? Bt), x = o(() => n.sectionProps?.marginLeft ?? Vt), w = o(() => n.sectionProps?.marginRight ?? Vt), T = o(() => y.value - x.value - w.value), D = o(() => h(y.value)), O = o(() => h(x.value)), k = o(() => h(w.value)), A = o(() => h(n.indentLeft)), j = o(() => h(n.indentRight)), M = o(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), N = o(() => h(M.value)), P = o(() => O.value + A.value), I = o(() => D.value - k.value - j.value), L = o(() => O.value + A.value + N.value), R = o(() => ({
1555
+ let y = o(() => n.sectionProps?.pageWidth ?? Wt), x = o(() => n.sectionProps?.marginLeft ?? Gt), w = o(() => n.sectionProps?.marginRight ?? Gt), T = o(() => y.value - x.value - w.value), D = o(() => h(y.value)), O = o(() => h(x.value)), k = o(() => h(w.value)), A = o(() => h(n.indentLeft)), j = o(() => h(n.indentRight)), M = o(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), N = o(() => h(M.value)), P = o(() => O.value + A.value), I = o(() => D.value - k.value - j.value), L = o(() => O.value + A.value + N.value), ee = o(() => ({
1568
1556
  position: "relative",
1569
1557
  width: D.value + "px",
1570
1558
  height: "22px",
@@ -1572,7 +1560,7 @@ var Ze = {
1572
1560
  overflow: "visible",
1573
1561
  userSelect: "none",
1574
1562
  cursor: d.value ? "ew-resize" : "default"
1575
- })), z = o(() => ({
1563
+ })), R = o(() => ({
1576
1564
  position: "absolute",
1577
1565
  top: 0,
1578
1566
  left: 0,
@@ -1582,7 +1570,7 @@ var Ze = {
1582
1570
  borderRight: "1px solid var(--doc-shadow-subtle)",
1583
1571
  cursor: n.editable ? "ew-resize" : "default",
1584
1572
  zIndex: 1
1585
- })), B = o(() => ({
1573
+ })), z = o(() => ({
1586
1574
  position: "absolute",
1587
1575
  top: 0,
1588
1576
  right: 0,
@@ -1592,10 +1580,10 @@ var Ze = {
1592
1580
  borderLeft: "1px solid var(--doc-shadow-subtle)",
1593
1581
  cursor: n.editable ? "ew-resize" : "default",
1594
1582
  zIndex: 1
1595
- })), V = o(() => {
1583
+ })), B = o(() => {
1596
1584
  let e = [];
1597
1585
  if (n.unit === "inch") {
1598
- let t = Ht / 8, n = Math.ceil(y.value / t);
1586
+ let t = Kt / 8, n = Math.ceil(y.value / t);
1599
1587
  for (let r = 0; r <= n; r++) {
1600
1588
  let n = r * t;
1601
1589
  if (n > y.value) break;
@@ -1616,7 +1604,7 @@ var Ze = {
1616
1604
  });
1617
1605
  }
1618
1606
  } else {
1619
- let t = Ut / 10, n = Math.ceil(y.value / t);
1607
+ let t = qt / 10, n = Math.ceil(y.value / t);
1620
1608
  for (let r = 0; r <= n; r++) {
1621
1609
  let n = r * t;
1622
1610
  if (n > y.value) break;
@@ -1635,24 +1623,24 @@ var Ze = {
1635
1623
  }
1636
1624
  }
1637
1625
  return e;
1638
- }), H = o(() => n.tabStops?.length ? n.tabStops.map((e) => {
1626
+ }), te = o(() => n.tabStops?.length ? n.tabStops.map((e) => {
1639
1627
  let t = e.position;
1640
1628
  return {
1641
1629
  px: h(t),
1642
1630
  twips: t,
1643
- label: U(t)
1631
+ label: ne(t)
1644
1632
  };
1645
1633
  }) : []);
1646
- function U(e) {
1647
- return n.unit === "cm" ? (e / Ut).toFixed(1) + " cm" : (e / Ht).toFixed(2) + "\"";
1634
+ function ne(e) {
1635
+ return n.unit === "cm" ? (e / qt).toFixed(1) + " cm" : (e / Kt).toFixed(2) + "\"";
1648
1636
  }
1649
- function W(e) {
1650
- return d.value === e ? Kt : f.value === e ? Gt : Wt;
1637
+ function V(e) {
1638
+ return d.value === e ? Xt : f.value === e ? Yt : Jt;
1651
1639
  }
1652
- function G(e, t, r) {
1640
+ function re(e, t, r) {
1653
1641
  return {
1654
1642
  position: "absolute",
1655
- left: t - qt + "px",
1643
+ left: t - Q + "px",
1656
1644
  width: "10px",
1657
1645
  height: "10px",
1658
1646
  cursor: n.editable ? "ew-resize" : "default",
@@ -1660,15 +1648,15 @@ var Ze = {
1660
1648
  ...e === "down" ? { top: 0 } : { bottom: 0 }
1661
1649
  };
1662
1650
  }
1663
- function te(e, t) {
1651
+ function H(e, t) {
1664
1652
  return e === "down" ? {
1665
1653
  position: "absolute",
1666
1654
  top: "1px",
1667
1655
  left: 0,
1668
1656
  width: 0,
1669
1657
  height: 0,
1670
- borderLeft: `${qt}px solid transparent`,
1671
- borderRight: `${qt}px solid transparent`,
1658
+ borderLeft: `${Q}px solid transparent`,
1659
+ borderRight: `${Q}px solid transparent`,
1672
1660
  borderTop: `${i}px solid ${t}`,
1673
1661
  transition: "border-top-color 0.1s"
1674
1662
  } : {
@@ -1677,29 +1665,29 @@ var Ze = {
1677
1665
  left: 0,
1678
1666
  width: 0,
1679
1667
  height: 0,
1680
- borderLeft: `${qt}px solid transparent`,
1681
- borderRight: `${qt}px solid transparent`,
1668
+ borderLeft: `${Q}px solid transparent`,
1669
+ borderRight: `${Q}px solid transparent`,
1682
1670
  borderBottom: `${i}px solid ${t}`,
1683
1671
  transition: "border-bottom-color 0.1s"
1684
1672
  };
1685
1673
  }
1686
- let q = 0;
1687
- function J(e, t) {
1688
- n.editable && (d.value = e, e === "leftMargin" ? q = x.value : e === "rightMargin" ? q = w.value : e === "leftIndent" ? q = n.indentLeft : e === "rightIndent" ? q = n.indentRight : e === "firstLineIndent" && (q = n.firstLineIndent), p.value = t.clientX - (s.value?.getBoundingClientRect().left ?? 0), m.value = U(q), document.addEventListener("mousemove", Y), document.addEventListener("mouseup", X));
1674
+ let U = 0;
1675
+ function W(e, t) {
1676
+ n.editable && (d.value = e, e === "leftMargin" ? U = x.value : e === "rightMargin" ? U = w.value : e === "leftIndent" ? U = n.indentLeft : e === "rightIndent" ? U = n.indentRight : e === "firstLineIndent" && (U = n.firstLineIndent), p.value = t.clientX - (s.value?.getBoundingClientRect().left ?? 0), m.value = ne(U), document.addEventListener("mousemove", G), document.addEventListener("mouseup", K));
1689
1677
  }
1690
- function Y(e) {
1678
+ function G(e) {
1691
1679
  if (!d.value || !s.value) return;
1692
1680
  let t = s.value.getBoundingClientRect();
1693
1681
  if (!t) return;
1694
1682
  let n = e.clientX - t.left;
1695
1683
  p.value = n;
1696
- let r = g(n), i = ne(d.value, r);
1697
- m.value = U(i), Z(d.value, i);
1684
+ let r = g(n), i = Y(d.value, r);
1685
+ m.value = ne(i), ie(d.value, i);
1698
1686
  }
1699
- function X(e) {
1700
- d.value = null, document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", X);
1687
+ function K(e) {
1688
+ d.value = null, document.removeEventListener("mousemove", G), document.removeEventListener("mouseup", K);
1701
1689
  }
1702
- function ne(e, t) {
1690
+ function Y(e, t) {
1703
1691
  if (e === "leftMargin") {
1704
1692
  let e = y.value - w.value - 720;
1705
1693
  return Math.round(Math.max(0, Math.min(t, e)));
@@ -1719,7 +1707,7 @@ var Ze = {
1719
1707
  let r = y.value - w.value - t, i = T.value - n.indentLeft - 720;
1720
1708
  return Math.round(Math.max(0, Math.min(r, i)));
1721
1709
  }
1722
- function Z(e, t) {
1710
+ function ie(e, t) {
1723
1711
  switch (e) {
1724
1712
  case "leftMargin":
1725
1713
  r("left-margin-change", t);
@@ -1733,18 +1721,16 @@ var Ze = {
1733
1721
  case "leftIndent":
1734
1722
  r("indent-left-change", t);
1735
1723
  break;
1736
- case "rightIndent":
1737
- r("indent-right-change", t);
1738
- break;
1724
+ case "rightIndent": r("indent-right-change", t);
1739
1725
  }
1740
1726
  }
1741
1727
  return v(() => {
1742
- document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", X);
1728
+ document.removeEventListener("mousemove", G), document.removeEventListener("mouseup", K);
1743
1729
  }), (t, n) => (b(), l("div", {
1744
1730
  ref_key: "rulerRef",
1745
1731
  ref: s,
1746
1732
  class: "docx-horizontal-ruler",
1747
- style: _(R.value),
1733
+ style: _(ee.value),
1748
1734
  role: "slider",
1749
1735
  "aria-label": "Horizontal ruler",
1750
1736
  "aria-valuemin": 0,
@@ -1752,15 +1738,15 @@ var Ze = {
1752
1738
  }, [
1753
1739
  u("div", {
1754
1740
  class: "docx-horizontal-ruler__margin",
1755
- style: _(z.value),
1756
- onMousedown: n[0] ||= F((t) => e.editable ? J("leftMargin", t) : null, ["prevent", "stop"])
1741
+ style: _(R.value),
1742
+ onMousedown: n[0] ||= F((t) => e.editable ? W("leftMargin", t) : null, ["prevent", "stop"])
1757
1743
  }, null, 36),
1758
1744
  u("div", {
1759
1745
  class: "docx-horizontal-ruler__margin",
1760
- style: _(B.value),
1761
- onMousedown: n[1] ||= F((t) => e.editable ? J("rightMargin", t) : null, ["prevent", "stop"])
1746
+ style: _(z.value),
1747
+ onMousedown: n[1] ||= F((t) => e.editable ? W("rightMargin", t) : null, ["prevent", "stop"])
1762
1748
  }, null, 36),
1763
- u("div", Rt, [(b(!0), l(a, null, C(V.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
1749
+ u("div", Ht, [(b(!0), l(a, null, C(B.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
1764
1750
  class: "docx-horizontal-ruler__tick-line",
1765
1751
  style: _({
1766
1752
  left: e.position + "px",
@@ -1774,42 +1760,69 @@ var Ze = {
1774
1760
  e.showFirstLineIndent ? (b(), l("div", {
1775
1761
  key: 0,
1776
1762
  class: "docx-ruler-indent",
1777
- style: _(G("down", L.value, d.value === "firstLineIndent")),
1778
- onMousedown: n[2] ||= F((t) => e.editable ? J("firstLineIndent", t) : null, ["prevent", "stop"]),
1763
+ style: _(re("down", L.value, d.value === "firstLineIndent")),
1764
+ onMousedown: n[2] ||= F((t) => e.editable ? W("firstLineIndent", t) : null, ["prevent", "stop"]),
1779
1765
  onMouseenter: n[3] ||= (e) => f.value = "firstLineIndent",
1780
1766
  onMouseleave: n[4] ||= (e) => f.value = null
1781
- }, [u("div", { style: _(te("down", W("firstLineIndent"))) }, null, 4)], 36)) : c("", !0),
1767
+ }, [u("div", { style: _(H("down", V("firstLineIndent"))) }, null, 4)], 36)) : c("", !0),
1782
1768
  e.editable ? (b(), l("div", {
1783
1769
  key: 1,
1784
1770
  class: "docx-ruler-indent",
1785
- style: _(G("up", P.value, d.value === "leftIndent")),
1786
- onMousedown: n[5] ||= F((e) => J("leftIndent", e), ["prevent", "stop"]),
1771
+ style: _(re("up", P.value, d.value === "leftIndent")),
1772
+ onMousedown: n[5] ||= F((e) => W("leftIndent", e), ["prevent", "stop"]),
1787
1773
  onMouseenter: n[6] ||= (e) => f.value = "leftIndent",
1788
1774
  onMouseleave: n[7] ||= (e) => f.value = null
1789
- }, [u("div", { style: _(te("up", W("leftIndent"))) }, null, 4)], 36)) : c("", !0),
1775
+ }, [u("div", { style: _(H("up", V("leftIndent"))) }, null, 4)], 36)) : c("", !0),
1790
1776
  e.editable ? (b(), l("div", {
1791
1777
  key: 2,
1792
1778
  class: "docx-ruler-indent",
1793
- style: _(G("down", I.value, d.value === "rightIndent")),
1794
- onMousedown: n[8] ||= F((e) => J("rightIndent", e), ["prevent", "stop"]),
1779
+ style: _(re("down", I.value, d.value === "rightIndent")),
1780
+ onMousedown: n[8] ||= F((e) => W("rightIndent", e), ["prevent", "stop"]),
1795
1781
  onMouseenter: n[9] ||= (e) => f.value = "rightIndent",
1796
1782
  onMouseleave: n[10] ||= (e) => f.value = null
1797
- }, [u("div", { style: _(te("down", W("rightIndent"))) }, null, 4)], 36)) : c("", !0),
1798
- (b(!0), l(a, null, C(H.value, (e, n) => (b(), l("div", {
1783
+ }, [u("div", { style: _(H("down", V("rightIndent"))) }, null, 4)], 36)) : c("", !0),
1784
+ (b(!0), l(a, null, C(te.value, (e, n) => (b(), l("div", {
1799
1785
  key: n,
1800
1786
  class: "docx-horizontal-ruler__tab",
1801
1787
  style: _({ left: e.px + "px" }),
1802
1788
  title: `${e.label}`,
1803
1789
  onDblclick: F((n) => t.$emit("tab-stop-remove", e.twips), ["prevent"])
1804
- }, " L ", 44, zt))), 128)),
1790
+ }, " L ", 44, Ut))), 128)),
1805
1791
  d.value && m.value ? (b(), l("div", {
1806
1792
  key: 3,
1807
1793
  class: "docx-horizontal-ruler__tooltip",
1808
1794
  style: _({ left: p.value + "px" })
1809
1795
  }, E(m.value), 5)) : c("", !0)
1810
- ], 12, Lt));
1796
+ ], 12, Vt));
1797
+ }
1798
+ }), [["__scopeId", "data-v-b25fde06"]]), Qt = /* @__PURE__ */ p({
1799
+ __name: "TableBorderColorPicker",
1800
+ props: {
1801
+ disabled: { type: Boolean },
1802
+ theme: {},
1803
+ value: {}
1804
+ },
1805
+ emits: ["change"],
1806
+ setup(e, { emit: r }) {
1807
+ let i = r, { t: a } = n();
1808
+ function o(e) {
1809
+ typeof e == "string" ? i("change", e.replace(/^#/, "")) : e.rgb ? i("change", e.rgb.replace(/^#/, "")) : e.auto && i("change", "000000");
1810
+ }
1811
+ return (n, r) => (b(), s(t, {
1812
+ mode: "border",
1813
+ value: e.value,
1814
+ theme: e.theme ?? null,
1815
+ disabled: e.disabled,
1816
+ title: O(a)("table.borderColor"),
1817
+ onChange: o
1818
+ }, null, 8, [
1819
+ "value",
1820
+ "theme",
1821
+ "disabled",
1822
+ "title"
1823
+ ]));
1811
1824
  }
1812
- }), [["__scopeId", "data-v-6f3ea48c"]]), Yt = ["disabled", "onClick"], Xt = { class: "docx-tbp__panel" }, Zt = ["title", "onClick"], Qt = /*#__PURE__*/ t(/* @__PURE__ */ p({
1825
+ }), $t = ["disabled", "onClick"], en = { class: "docx-tbp__panel" }, tn = ["title", "onClick"], nn = /*#__PURE__*/ e(/* @__PURE__ */ p({
1813
1826
  __name: "TableBorderPicker",
1814
1827
  props: { disabled: { type: Boolean } },
1815
1828
  emits: ["change"],
@@ -1883,8 +1896,8 @@ var Ze = {
1883
1896
  }, [f(r, {
1884
1897
  name: "border_all",
1885
1898
  size: 20
1886
- })], 8, Yt)]),
1887
- panel: M(() => [u("div", Xt, [(b(), l(a, null, C(d, (e) => u("button", {
1899
+ })], 8, $t)]),
1900
+ panel: M(() => [u("div", en, [(b(), l(a, null, C(d, (e) => u("button", {
1888
1901
  key: e.value,
1889
1902
  type: "button",
1890
1903
  class: "docx-tbp__option",
@@ -1893,38 +1906,11 @@ var Ze = {
1893
1906
  }, [f(r, {
1894
1907
  name: e.icon,
1895
1908
  size: 20
1896
- }, null, 8, ["name"])], 8, Zt)), 64))])]),
1909
+ }, null, 8, ["name"])], 8, tn)), 64))])]),
1897
1910
  _: 1
1898
1911
  }, 8, ["open"]));
1899
1912
  }
1900
- }), [["__scopeId", "data-v-4e30a014"]]), $t = /* @__PURE__ */ p({
1901
- __name: "TableBorderColorPicker",
1902
- props: {
1903
- disabled: { type: Boolean },
1904
- theme: {},
1905
- value: {}
1906
- },
1907
- emits: ["change"],
1908
- setup(t, { emit: r }) {
1909
- let i = r, { t: a } = n();
1910
- function o(e) {
1911
- typeof e == "string" ? i("change", e.replace(/^#/, "")) : e.rgb ? i("change", e.rgb.replace(/^#/, "")) : e.auto && i("change", "000000");
1912
- }
1913
- return (n, r) => (b(), s(e, {
1914
- mode: "border",
1915
- value: t.value,
1916
- theme: t.theme ?? null,
1917
- disabled: t.disabled,
1918
- title: O(a)("table.borderColor"),
1919
- onChange: o
1920
- }, null, 8, [
1921
- "value",
1922
- "theme",
1923
- "disabled",
1924
- "title"
1925
- ]));
1926
- }
1927
- }), en = ["disabled", "onClick"], tn = { class: "docx-tbwidth__panel" }, nn = ["onClick"], rn = { class: "docx-tbwidth__label" }, an = /*#__PURE__*/ t(/* @__PURE__ */ p({
1913
+ }), [["__scopeId", "data-v-02e5b963"]]), rn = ["disabled", "onClick"], an = { class: "docx-tbwidth__panel" }, on = ["onClick"], sn = { class: "docx-tbwidth__label" }, cn = /*#__PURE__*/ e(/* @__PURE__ */ p({
1928
1914
  __name: "TableBorderWidthPicker",
1929
1915
  props: { disabled: { type: Boolean } },
1930
1916
  emits: ["change"],
@@ -1988,8 +1974,8 @@ var Ze = {
1988
1974
  }, [f(r, {
1989
1975
  name: "line_weight",
1990
1976
  size: 20
1991
- })], 8, en)]),
1992
- panel: M(() => [u("div", tn, [(b(), l(a, null, C(d, (e) => u("button", {
1977
+ })], 8, rn)]),
1978
+ panel: M(() => [u("div", an, [(b(), l(a, null, C(d, (e) => u("button", {
1993
1979
  key: e.eighths,
1994
1980
  type: "button",
1995
1981
  class: "docx-tbwidth__option",
@@ -1997,11 +1983,11 @@ var Ze = {
1997
1983
  }, [u("span", {
1998
1984
  class: "docx-tbwidth__preview",
1999
1985
  style: _({ borderTopWidth: e.previewPx + "px" })
2000
- }, null, 4), u("span", rn, E(e.label), 1)], 8, nn)), 64))])]),
1986
+ }, null, 4), u("span", sn, E(e.label), 1)], 8, on)), 64))])]),
2001
1987
  _: 1
2002
1988
  }, 8, ["open"]));
2003
1989
  }
2004
- }), [["__scopeId", "data-v-42a746ba"]]), on = /* @__PURE__ */ p({
1990
+ }), [["__scopeId", "data-v-0aa73d09"]]), ln = /* @__PURE__ */ p({
2005
1991
  __name: "TableCellFillPicker",
2006
1992
  props: {
2007
1993
  disabled: { type: Boolean },
@@ -2009,16 +1995,16 @@ var Ze = {
2009
1995
  value: {}
2010
1996
  },
2011
1997
  emits: ["change"],
2012
- setup(t, { emit: r }) {
1998
+ setup(e, { emit: r }) {
2013
1999
  let i = r, { t: a } = n();
2014
2000
  function o(e) {
2015
2001
  typeof e == "string" && i("change", e === "none" ? "" : e.replace(/^#/, ""));
2016
2002
  }
2017
- return (n, r) => (b(), s(e, {
2003
+ return (n, r) => (b(), s(t, {
2018
2004
  mode: "highlight",
2019
- value: t.value,
2020
- theme: t.theme ?? null,
2021
- disabled: t.disabled,
2005
+ value: e.value,
2006
+ theme: e.theme ?? null,
2007
+ disabled: e.disabled,
2022
2008
  title: O(a)("table.cellFillColor"),
2023
2009
  icon: "format_color_fill",
2024
2010
  "auto-label": O(a)("colorPicker.noColor"),
@@ -2031,23 +2017,23 @@ var Ze = {
2031
2017
  "auto-label"
2032
2018
  ]));
2033
2019
  }
2034
- }), sn = [
2020
+ }), un = [
2035
2021
  "disabled",
2036
2022
  "title",
2037
2023
  "onClick"
2038
- ], cn = ["aria-label"], ln = ["disabled"], un = ["disabled"], dn = ["disabled"], fn = ["disabled"], pn = { class: "docx-tmore__section-label" }, mn = { class: "docx-tmore__icon-row" }, hn = ["title"], gn = ["title"], _n = ["title"], vn = { class: "docx-tmore__section-label" }, yn = { class: "docx-tmore__icon-row" }, bn = ["title"], xn = ["title"], Sn = ["title"], Cn = { class: "docx-tmore__grow" }, wn = {
2024
+ ], dn = ["aria-label"], fn = ["disabled"], pn = ["disabled"], mn = ["disabled"], hn = ["disabled"], gn = { class: "docx-tmore__section-label" }, _n = { class: "docx-tmore__icon-row" }, vn = ["title"], yn = ["title"], bn = ["title"], xn = { class: "docx-tmore__section-label" }, Sn = { class: "docx-tmore__icon-row" }, Cn = ["title"], wn = ["title"], Tn = ["title"], En = { class: "docx-tmore__grow" }, Dn = {
2039
2025
  key: 0,
2040
2026
  class: "docx-tmore__sub"
2041
- }, Tn = { class: "docx-tmore__margin-grid" }, En = { class: "docx-tmore__field-label" }, Dn = ["onUpdate:modelValue"], On = { class: "docx-tmore__grow" }, kn = {
2027
+ }, On = { class: "docx-tmore__margin-grid" }, kn = { class: "docx-tmore__field-label" }, An = ["onUpdate:modelValue"], jn = { class: "docx-tmore__grow" }, Mn = {
2042
2028
  key: 1,
2043
2029
  class: "docx-tmore__sub"
2044
- }, An = { class: "docx-tmore__row-field" }, jn = { class: "docx-tmore__field-label" }, Mn = { value: "auto" }, Nn = { value: "atLeast" }, Pn = { value: "exact" }, Fn = {
2030
+ }, Nn = { class: "docx-tmore__row-field" }, Pn = { class: "docx-tmore__field-label" }, Fn = { value: "auto" }, In = { value: "atLeast" }, Ln = { value: "exact" }, Rn = {
2045
2031
  key: 0,
2046
2032
  class: "docx-tmore__row-field"
2047
- }, In = { class: "docx-tmore__field-label" }, Ln = { class: "docx-tmore__grow" }, Rn = {
2033
+ }, zn = { class: "docx-tmore__field-label" }, Bn = { class: "docx-tmore__grow" }, Vn = {
2048
2034
  key: 2,
2049
2035
  class: "docx-tmore__sub docx-tmore__sub--list"
2050
- }, zn = /*#__PURE__*/ t(/* @__PURE__ */ p({
2036
+ }, Hn = /*#__PURE__*/ e(/* @__PURE__ */ p({
2051
2037
  __name: "TableMoreDropdown",
2052
2038
  props: {
2053
2039
  disabled: {
@@ -2092,7 +2078,7 @@ var Ze = {
2092
2078
  let t = Number(e);
2093
2079
  return Number.isFinite(t) && t > 0 ? t : 0;
2094
2080
  };
2095
- function R() {
2081
+ function ee() {
2096
2082
  p("cell-margins", {
2097
2083
  top: L(w.top),
2098
2084
  bottom: L(w.bottom),
@@ -2100,14 +2086,14 @@ var Ze = {
2100
2086
  right: L(w.right)
2101
2087
  }), h.value = !1;
2102
2088
  }
2103
- function z() {
2089
+ function R() {
2104
2090
  let e = L(T.value);
2105
2091
  D.value === "auto" || e <= 0 ? p("row-height", { height: null }) : p("row-height", {
2106
2092
  height: e,
2107
2093
  rule: D.value
2108
2094
  }), h.value = !1;
2109
2095
  }
2110
- function B(e) {
2096
+ function z(e) {
2111
2097
  p("cell-text-direction", e), h.value = !1;
2112
2098
  }
2113
2099
  return (t, n) => (b(), s(O(o), {
@@ -2125,7 +2111,7 @@ var Ze = {
2125
2111
  }, [f(r, {
2126
2112
  name: "more_vert",
2127
2113
  size: 20
2128
- })], 10, sn)]),
2114
+ })], 10, un)]),
2129
2115
  panel: M(() => [u("div", {
2130
2116
  class: "docx-tmore__panel",
2131
2117
  role: "menu",
@@ -2172,7 +2158,7 @@ var Ze = {
2172
2158
  }, [f(r, {
2173
2159
  name: "call_merge",
2174
2160
  size: 18
2175
- }), u("span", null, E(O(m)("table.mergeCells")), 1)], 8, ln),
2161
+ }), u("span", null, E(O(m)("table.mergeCells")), 1)], 8, fn),
2176
2162
  u("button", {
2177
2163
  type: "button",
2178
2164
  class: "docx-tmore__item",
@@ -2181,7 +2167,7 @@ var Ze = {
2181
2167
  }, [f(r, {
2182
2168
  name: "call_split",
2183
2169
  size: 18
2184
- }), u("span", null, E(O(m)("table.splitCell")), 1)], 8, un),
2170
+ }), u("span", null, E(O(m)("table.splitCell")), 1)], 8, pn),
2185
2171
  n[40] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
2186
2172
  u("button", {
2187
2173
  type: "button",
@@ -2200,7 +2186,7 @@ var Ze = {
2200
2186
  }, [f(r, {
2201
2187
  name: "delete",
2202
2188
  size: 18
2203
- }), u("span", null, E(O(m)("deleteRow")), 1)], 8, dn),
2189
+ }), u("span", null, E(O(m)("deleteRow")), 1)], 8, mn),
2204
2190
  u("button", {
2205
2191
  type: "button",
2206
2192
  class: "docx-tmore__item docx-tmore__item--danger",
@@ -2209,7 +2195,7 @@ var Ze = {
2209
2195
  }, [f(r, {
2210
2196
  name: "delete",
2211
2197
  size: 18
2212
- }), u("span", null, E(O(m)("deleteColumn")), 1)], 8, fn),
2198
+ }), u("span", null, E(O(m)("deleteColumn")), 1)], 8, hn),
2213
2199
  u("button", {
2214
2200
  type: "button",
2215
2201
  class: "docx-tmore__item docx-tmore__item--danger",
@@ -2219,8 +2205,8 @@ var Ze = {
2219
2205
  size: 18
2220
2206
  }), u("span", null, E(O(m)("table.deleteTable")), 1)]),
2221
2207
  n[42] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
2222
- u("div", pn, E(O(m)("tableAdvanced.verticalAlignment")), 1),
2223
- u("div", mn, [
2208
+ u("div", gn, E(O(m)("tableAdvanced.verticalAlignment")), 1),
2209
+ u("div", _n, [
2224
2210
  u("button", {
2225
2211
  type: "button",
2226
2212
  class: "docx-tmore__icon-btn",
@@ -2230,7 +2216,7 @@ var Ze = {
2230
2216
  }, [f(r, {
2231
2217
  name: "vertical_align_top",
2232
2218
  size: 16
2233
- })], 40, hn),
2219
+ })], 40, vn),
2234
2220
  u("button", {
2235
2221
  type: "button",
2236
2222
  class: "docx-tmore__icon-btn",
@@ -2240,7 +2226,7 @@ var Ze = {
2240
2226
  }, [f(r, {
2241
2227
  name: "vertical_align_center",
2242
2228
  size: 16
2243
- })], 40, gn),
2229
+ })], 40, yn),
2244
2230
  u("button", {
2245
2231
  type: "button",
2246
2232
  class: "docx-tmore__icon-btn",
@@ -2250,11 +2236,11 @@ var Ze = {
2250
2236
  }, [f(r, {
2251
2237
  name: "vertical_align_bottom",
2252
2238
  size: 16
2253
- })], 40, _n)
2239
+ })], 40, bn)
2254
2240
  ]),
2255
2241
  n[43] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
2256
- u("div", vn, E(O(m)("tableAdvanced.tableAlignment")), 1),
2257
- u("div", yn, [
2242
+ u("div", xn, E(O(m)("tableAdvanced.tableAlignment")), 1),
2243
+ u("div", Sn, [
2258
2244
  u("button", {
2259
2245
  type: "button",
2260
2246
  class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "left" }]),
@@ -2264,7 +2250,7 @@ var Ze = {
2264
2250
  }, [f(r, {
2265
2251
  name: "format_align_left",
2266
2252
  size: 16
2267
- })], 42, bn),
2253
+ })], 42, Cn),
2268
2254
  u("button", {
2269
2255
  type: "button",
2270
2256
  class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "center" }]),
@@ -2274,7 +2260,7 @@ var Ze = {
2274
2260
  }, [f(r, {
2275
2261
  name: "format_align_center",
2276
2262
  size: 16
2277
- })], 42, xn),
2263
+ })], 42, wn),
2278
2264
  u("button", {
2279
2265
  type: "button",
2280
2266
  class: g(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": e.currentJustification === "right" }]),
@@ -2284,7 +2270,7 @@ var Ze = {
2284
2270
  }, [f(r, {
2285
2271
  name: "format_align_right",
2286
2272
  size: 16
2287
- })], 42, Sn)
2273
+ })], 42, Tn)
2288
2274
  ]),
2289
2275
  n[44] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
2290
2276
  u("button", {
@@ -2296,13 +2282,13 @@ var Ze = {
2296
2282
  name: "padding",
2297
2283
  size: 18
2298
2284
  }),
2299
- u("span", Cn, E(O(m)("tableAdvanced.cellMargins")), 1),
2285
+ u("span", En, E(O(m)("tableAdvanced.cellMargins")), 1),
2300
2286
  f(r, {
2301
2287
  name: _.value ? "expand_less" : "expand_more",
2302
2288
  size: 18
2303
2289
  }, null, 8, ["name"])
2304
2290
  ]),
2305
- _.value ? (b(), l("div", wn, [u("div", Tn, [(b(), l(a, null, C([
2291
+ _.value ? (b(), l("div", Dn, [u("div", On, [(b(), l(a, null, C([
2306
2292
  "top",
2307
2293
  "bottom",
2308
2294
  "left",
@@ -2311,14 +2297,14 @@ var Ze = {
2311
2297
  key: e,
2312
2298
  class: "docx-tmore__field"
2313
2299
  }, [
2314
- u("span", En, E(e), 1),
2300
+ u("span", kn, E(e), 1),
2315
2301
  N(u("input", {
2316
2302
  type: "number",
2317
2303
  min: "0",
2318
2304
  step: "20",
2319
2305
  "onUpdate:modelValue": (t) => w[e] = t,
2320
2306
  class: "docx-tmore__input"
2321
- }, null, 8, Dn), [[
2307
+ }, null, 8, An), [[
2322
2308
  A,
2323
2309
  w[e],
2324
2310
  void 0,
@@ -2328,7 +2314,7 @@ var Ze = {
2328
2314
  ])), 64))]), u("button", {
2329
2315
  type: "button",
2330
2316
  class: "docx-tmore__apply",
2331
- onClick: F(R, ["prevent"])
2317
+ onClick: F(ee, ["prevent"])
2332
2318
  }, E(O(m)("common.apply")), 1)])) : c("", !0),
2333
2319
  u("button", {
2334
2320
  type: "button",
@@ -2339,23 +2325,23 @@ var Ze = {
2339
2325
  name: "height",
2340
2326
  size: 18
2341
2327
  }),
2342
- u("span", On, E(O(m)("tableAdvanced.rowHeight")), 1),
2328
+ u("span", jn, E(O(m)("tableAdvanced.rowHeight")), 1),
2343
2329
  f(r, {
2344
2330
  name: v.value ? "expand_less" : "expand_more",
2345
2331
  size: 18
2346
2332
  }, null, 8, ["name"])
2347
2333
  ]),
2348
- v.value ? (b(), l("div", kn, [
2349
- u("label", An, [u("span", jn, E(O(m)("tableAdvanced.rule")), 1), N(u("select", {
2334
+ v.value ? (b(), l("div", Mn, [
2335
+ u("label", Nn, [u("span", Pn, E(O(m)("tableAdvanced.rule")), 1), N(u("select", {
2350
2336
  "onUpdate:modelValue": n[24] ||= (e) => D.value = e,
2351
2337
  class: "docx-tmore__select"
2352
2338
  }, [
2353
- u("option", Mn, E(O(m)("tableAdvanced.heightRules.auto")), 1),
2354
- u("option", Nn, E(O(m)("tableAdvanced.heightRules.atLeast")), 1),
2355
- u("option", Pn, E(O(m)("tableAdvanced.heightRules.exact")), 1)
2339
+ u("option", Fn, E(O(m)("tableAdvanced.heightRules.auto")), 1),
2340
+ u("option", In, E(O(m)("tableAdvanced.heightRules.atLeast")), 1),
2341
+ u("option", Ln, E(O(m)("tableAdvanced.heightRules.exact")), 1)
2356
2342
  ], 512), [[k, D.value]])]),
2357
- D.value === "auto" ? c("", !0) : (b(), l("label", Fn, [
2358
- u("span", In, E(O(m)("tableAdvanced.height")), 1),
2343
+ D.value === "auto" ? c("", !0) : (b(), l("label", Rn, [
2344
+ u("span", zn, E(O(m)("tableAdvanced.height")), 1),
2359
2345
  N(u("input", {
2360
2346
  type: "number",
2361
2347
  min: "0",
@@ -2373,7 +2359,7 @@ var Ze = {
2373
2359
  u("button", {
2374
2360
  type: "button",
2375
2361
  class: "docx-tmore__apply",
2376
- onClick: F(z, ["prevent"])
2362
+ onClick: F(R, ["prevent"])
2377
2363
  }, E(O(m)("common.apply")), 1)
2378
2364
  ])) : c("", !0),
2379
2365
  u("button", {
@@ -2385,27 +2371,27 @@ var Ze = {
2385
2371
  name: "text_rotation_none",
2386
2372
  size: 18
2387
2373
  }),
2388
- u("span", Ln, E(O(m)("textDirection")), 1),
2374
+ u("span", Bn, E(O(m)("textDirection")), 1),
2389
2375
  f(r, {
2390
2376
  name: y.value ? "expand_less" : "expand_more",
2391
2377
  size: 18
2392
2378
  }, null, 8, ["name"])
2393
2379
  ]),
2394
- y.value ? (b(), l("div", Rn, [
2380
+ y.value ? (b(), l("div", Vn, [
2395
2381
  u("button", {
2396
2382
  type: "button",
2397
2383
  class: "docx-tmore__sub-item",
2398
- onClick: n[27] ||= F((e) => B(null), ["prevent"])
2384
+ onClick: n[27] ||= F((e) => z(null), ["prevent"])
2399
2385
  }, E(O(m)("tableAdvanced.textDirections.horizontal")), 1),
2400
2386
  u("button", {
2401
2387
  type: "button",
2402
2388
  class: "docx-tmore__sub-item",
2403
- onClick: n[28] ||= F((e) => B("tbRl"), ["prevent"])
2389
+ onClick: n[28] ||= F((e) => z("tbRl"), ["prevent"])
2404
2390
  }, E(O(m)("tableAdvanced.textDirections.verticalRL")), 1),
2405
2391
  u("button", {
2406
2392
  type: "button",
2407
2393
  class: "docx-tmore__sub-item",
2408
- onClick: n[29] ||= F((e) => B("btLr"), ["prevent"])
2394
+ onClick: n[29] ||= F((e) => z("btLr"), ["prevent"])
2409
2395
  }, E(O(m)("tableAdvanced.textDirections.verticalLR")), 1)
2410
2396
  ])) : c("", !0),
2411
2397
  n[45] ||= u("div", { class: "docx-tmore__separator" }, null, -1),
@@ -2450,11 +2436,11 @@ var Ze = {
2450
2436
  name: "settings",
2451
2437
  size: 18
2452
2438
  }), u("span", null, E(O(m)("tableAdvanced.tableProperties")), 1)])
2453
- ], 8, cn)]),
2439
+ ], 8, dn)]),
2454
2440
  _: 1
2455
2441
  }, 8, ["open"]));
2456
2442
  }
2457
- }), [["__scopeId", "data-v-5d357bc4"]]), Bn = /*#__PURE__*/ t(/* @__PURE__ */ p({
2443
+ }), [["__scopeId", "data-v-af08ecc9"]]), Un = /*#__PURE__*/ e(/* @__PURE__ */ p({
2458
2444
  __name: "TableToolbar",
2459
2445
  props: {
2460
2446
  view: {},
@@ -2467,7 +2453,7 @@ var Ze = {
2467
2453
  let r = e, i = n, s = o(() => {
2468
2454
  r.stateTick;
2469
2455
  let e = r.view;
2470
- return e ? R(e.state) : null;
2456
+ return e ? z(e.state) : null;
2471
2457
  }), d = o(() => !!s.value?.isInTable), p = o(() => {
2472
2458
  r.stateTick;
2473
2459
  let e = r.view;
@@ -2492,8 +2478,8 @@ var Ze = {
2492
2478
  j([() => r.view, () => r.stateTick], () => {
2493
2479
  let e = r.view;
2494
2480
  if (!e) return;
2495
- let t = R(e.state), n = t.cellBorderColor;
2496
- !n || !t.isInTable || typeof n == "object" && "rgb" in n && typeof n.rgb == "string" && (S.color = { rgb: n.rgb });
2481
+ let t = z(e.state), n = t.cellBorderColor;
2482
+ n && t.isInTable && typeof n == "object" && "rgb" in n && typeof n.rgb == "string" && (S.color = { rgb: n.rgb });
2497
2483
  }, { immediate: !0 });
2498
2484
  function C(e, ...t) {
2499
2485
  let n = r.view;
@@ -2581,14 +2567,14 @@ var Ze = {
2581
2567
  onRowHeight: N
2582
2568
  }), (t, n) => d.value ? (b(), l(a, { key: 0 }, [
2583
2569
  n[0] ||= u("span", { class: "divider" }, null, -1),
2584
- f(Qt, { onChange: w }),
2585
- f($t, m({ theme: e.theme ?? null }, g.value, { onChange: T }), null, 16, ["theme"]),
2586
- f(an, { onChange: E }),
2587
- f(on, {
2570
+ f(nn, { onChange: w }),
2571
+ f(Qt, m({ theme: e.theme ?? null }, g.value, { onChange: T }), null, 16, ["theme"]),
2572
+ f(cn, { onChange: E }),
2573
+ f(ln, {
2588
2574
  theme: e.theme ?? null,
2589
2575
  onChange: D
2590
2576
  }, null, 8, ["theme"]),
2591
- f(zn, {
2577
+ f(Hn, {
2592
2578
  "can-split": p.value,
2593
2579
  "can-merge": _.value,
2594
2580
  "row-count": v.value,
@@ -2607,7 +2593,7 @@ var Ze = {
2607
2593
  ])
2608
2594
  ], 64)) : c("", !0);
2609
2595
  }
2610
- }), [["__scopeId", "data-v-c73a7e43"]]), Vn = { class: "docx-vertical-ruler__ticks" }, Hn = 15840, Un = 1440, Wn = 1440, Gn = 567, Kn = /*#__PURE__*/ t(/* @__PURE__ */ p({
2596
+ }), [["__scopeId", "data-v-30ceb320"]]), Wn = { class: "docx-vertical-ruler__ticks" }, Gn = 15840, Kn = 1440, qn = 1440, Jn = 567, Yn = /*#__PURE__*/ e(/* @__PURE__ */ p({
2611
2597
  __name: "VerticalRuler",
2612
2598
  props: {
2613
2599
  sectionProps: {},
@@ -2622,12 +2608,12 @@ var Ze = {
2622
2608
  setup(e, { emit: t }) {
2623
2609
  let n = e, r = t, i = S(null), s = S(null);
2624
2610
  function d(e) {
2625
- return K(e) * n.zoom;
2611
+ return J(e) * n.zoom;
2626
2612
  }
2627
2613
  function f(e) {
2628
- return Math.round(ee(e / n.zoom));
2614
+ return Math.round(q(e / n.zoom));
2629
2615
  }
2630
- let p = o(() => n.sectionProps?.pageHeight ?? Hn), m = o(() => n.sectionProps?.marginTop ?? Un), h = o(() => n.sectionProps?.marginBottom ?? Un), g = o(() => d(p.value)), y = o(() => d(m.value)), x = o(() => d(h.value)), w = o(() => ({
2616
+ let p = o(() => n.sectionProps?.pageHeight ?? Gn), m = o(() => n.sectionProps?.marginTop ?? Kn), h = o(() => n.sectionProps?.marginBottom ?? Kn), g = o(() => d(p.value)), y = o(() => d(m.value)), x = o(() => d(h.value)), w = o(() => ({
2631
2617
  position: "relative",
2632
2618
  width: "20px",
2633
2619
  height: g.value + "px",
@@ -2638,7 +2624,7 @@ var Ze = {
2638
2624
  })), T = o(() => {
2639
2625
  let e = [];
2640
2626
  if (n.unit === "inch") {
2641
- let t = Wn / 8, n = Math.ceil(p.value / t);
2627
+ let t = qn / 8, n = Math.ceil(p.value / t);
2642
2628
  for (let r = 0; r <= n; r++) {
2643
2629
  let n = r * t;
2644
2630
  if (n > p.value) break;
@@ -2659,7 +2645,7 @@ var Ze = {
2659
2645
  });
2660
2646
  }
2661
2647
  } else {
2662
- let t = Gn / 10, n = Math.ceil(p.value / t);
2648
+ let t = Jn / 10, n = Math.ceil(p.value / t);
2663
2649
  for (let r = 0; r <= n; r++) {
2664
2650
  let n = r * t;
2665
2651
  if (n > p.value) break;
@@ -2725,7 +2711,7 @@ var Ze = {
2725
2711
  "aria-label": "Vertical ruler",
2726
2712
  "aria-orientation": "vertical"
2727
2713
  }, [
2728
- u("div", Vn, [(b(!0), l(a, null, C(T.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
2714
+ u("div", Wn, [(b(!0), l(a, null, C(T.value, (e, t) => (b(), l(a, { key: t }, [u("div", {
2729
2715
  class: "docx-vertical-ruler__tick-line",
2730
2716
  style: _({
2731
2717
  top: e.position + "px",
@@ -2754,13 +2740,94 @@ var Ze = {
2754
2740
  }, [u("div", { style: _(O("bottomMargin")) }, null, 4)], 36)) : c("", !0)
2755
2741
  ], 4));
2756
2742
  }
2757
- }), [["__scopeId", "data-v-f7ccbd38"]]);
2743
+ }), [["__scopeId", "data-v-fc4bcb45"]]);
2744
+ //#endregion
2745
+ //#region src/composables/useCommentSidebarItems.ts
2746
+ function Xn({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
2747
+ return o(() => {
2748
+ let a = [];
2749
+ r?.value && i?.value != null && a.push({
2750
+ id: "new-comment-input",
2751
+ anchorPos: 0,
2752
+ fixedY: i.value,
2753
+ priority: -1e3,
2754
+ isTemporary: !0,
2755
+ estimatedHeight: 120,
2756
+ kind: "add-comment"
2757
+ });
2758
+ let o = /* @__PURE__ */ new Map();
2759
+ for (let t of e.value) if (t.parentId != null) {
2760
+ let e = o.get(t.parentId);
2761
+ e ? e.push(t) : o.set(t.parentId, [t]);
2762
+ }
2763
+ for (let t of e.value) t.parentId == null && (!t.done || n?.value) && a.push({
2764
+ id: `comment-${t.id}`,
2765
+ anchorPos: 0,
2766
+ anchorKey: `comment-${t.id}`,
2767
+ priority: 0,
2768
+ estimatedHeight: t.done ? 28 : 80,
2769
+ kind: "comment",
2770
+ comment: t,
2771
+ replies: o.get(t.id) ?? []
2772
+ });
2773
+ return t.value.forEach((e, t) => {
2774
+ a.push({
2775
+ id: `tc-${e.revisionId}-${t}`,
2776
+ anchorPos: e.from,
2777
+ anchorKey: `revision-${e.revisionId}`,
2778
+ priority: 1,
2779
+ estimatedHeight: 80,
2780
+ kind: "tracked-change",
2781
+ change: e,
2782
+ replies: o.get(e.revisionId) ?? []
2783
+ });
2784
+ }), a;
2785
+ });
2786
+ }
2787
+ //#endregion
2788
+ //#region src/components/sidebar/AddCommentCard.vue?vue&type=script&setup=true&lang.ts
2789
+ var Zn = ["onKeydown"], Qn = { class: "add-comment-card__actions" }, $n = ["disabled"], er = /*#__PURE__*/ e(/* @__PURE__ */ p({
2790
+ __name: "AddCommentCard",
2791
+ emits: ["submit", "cancel"],
2792
+ setup(e, { emit: t }) {
2793
+ let n = t, r = S(""), i = S(null), a = o(() => r.value.trim());
2794
+ y(() => {
2795
+ i.value?.focus({ preventScroll: !0 });
2796
+ });
2797
+ function s() {
2798
+ a.value && (n("submit", a.value), r.value = "");
2799
+ }
2800
+ function c() {
2801
+ n("cancel"), r.value = "";
2802
+ }
2803
+ return (e, t) => (b(), l("div", {
2804
+ class: "add-comment-card",
2805
+ onMousedown: t[3] ||= F(() => {}, ["stop"])
2806
+ }, [N(u("textarea", {
2807
+ ref_key: "inputRef",
2808
+ ref: i,
2809
+ "onUpdate:modelValue": t[0] ||= (e) => r.value = e,
2810
+ class: "add-comment-card__field",
2811
+ placeholder: "Add a comment",
2812
+ onMousedown: t[1] ||= F(() => {}, ["stop"]),
2813
+ onKeydown: [
2814
+ t[2] ||= F(() => {}, ["stop"]),
2815
+ P(F(s, ["exact", "prevent"]), ["enter"]),
2816
+ P(c, ["esc"])
2817
+ ]
2818
+ }, null, 40, Zn), [[A, r.value]]), u("div", Qn, [u("button", {
2819
+ class: "add-comment-card__cancel",
2820
+ onClick: c
2821
+ }, " Cancel "), u("button", {
2822
+ class: g(["add-comment-card__submit", { "add-comment-card__submit--active": a.value }]),
2823
+ disabled: !a.value,
2824
+ onClick: s
2825
+ }, " Comment ", 10, $n)])], 32));
2826
+ }
2827
+ }), [["__scopeId", "data-v-8a5fd620"]]);
2758
2828
  //#endregion
2759
2829
  //#region src/utils/comments.ts
2760
- function qn(e) {
2761
- return e?.length ? e.flatMap((e) => e.content.filter((e) => e.type === "run").flatMap((e) => "content" in e ? e.content : []).filter((e) => e.type === "text").map((e) => "text" in e ? e.text : "")).join("") : "";
2762
- }
2763
- function Jn(e) {
2830
+ function tr(e) {
2764
2831
  return e ? new Date(e).toLocaleString(void 0, {
2765
2832
  hour: "numeric",
2766
2833
  minute: "2-digit",
@@ -2768,18 +2835,19 @@ function Jn(e) {
2768
2835
  day: "numeric"
2769
2836
  }) : "";
2770
2837
  }
2771
- function Yn(e) {
2772
- return W({
2773
- text: e.split(/\s+/).map((e) => W({
2774
- text: e,
2775
- units: "graphemes",
2776
- end: 1
2777
- })).join("").toUpperCase(),
2838
+ function nr(e) {
2839
+ let t = e.split(/\s+/).map((e) => U({
2840
+ text: e,
2841
+ units: "graphemes",
2842
+ end: 1
2843
+ })).join("").toUpperCase();
2844
+ return U({
2845
+ text: t,
2778
2846
  units: "graphemes",
2779
2847
  end: 2
2780
2848
  });
2781
2849
  }
2782
- var Xn = [
2850
+ var rr = [
2783
2851
  "#6DCCB1",
2784
2852
  "#79AAD9",
2785
2853
  "#EE789D",
@@ -2793,13 +2861,13 @@ var Xn = [
2793
2861
  "#E15759",
2794
2862
  "#76B7B2"
2795
2863
  ];
2796
- function Zn(e) {
2864
+ function ir(e) {
2797
2865
  let t = 0;
2798
2866
  for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
2799
- return Xn[Math.abs(t) % Xn.length] ?? "#888888";
2867
+ return rr[Math.abs(t) % rr.length] ?? "#888888";
2800
2868
  }
2801
- function Qn(e, t = 50) {
2802
- return e.length > t ? W({
2869
+ function $(e, t = 50) {
2870
+ return e.length > t ? U({
2803
2871
  text: e,
2804
2872
  units: "codeUnits",
2805
2873
  end: t
@@ -2807,18 +2875,18 @@ function Qn(e, t = 50) {
2807
2875
  }
2808
2876
  //#endregion
2809
2877
  //#region src/components/sidebar/Avatar.vue
2810
- var $n = /* @__PURE__ */ p({
2878
+ var ar = /* @__PURE__ */ p({
2811
2879
  __name: "Avatar",
2812
2880
  props: {
2813
2881
  name: { default: "U" },
2814
2882
  size: { default: 32 }
2815
2883
  },
2816
2884
  setup(e) {
2817
- let t = e, n = o(() => Yn(t.name || "U")), r = o(() => ({
2885
+ let t = e, n = o(() => nr(t.name || "U")), r = o(() => ({
2818
2886
  width: t.size + "px",
2819
2887
  height: t.size + "px",
2820
2888
  borderRadius: "50%",
2821
- backgroundColor: Zn(t.name || "U"),
2889
+ backgroundColor: ir(t.name || "U"),
2822
2890
  color: "#fff",
2823
2891
  display: "flex",
2824
2892
  alignItems: "center",
@@ -2832,29 +2900,7 @@ var $n = /* @__PURE__ */ p({
2832
2900
  style: _(r.value)
2833
2901
  }, E(n.value), 5));
2834
2902
  }
2835
- }), er = {
2836
- key: 0,
2837
- class: "reply-thread"
2838
- }, tr = {
2839
- key: 0,
2840
- class: "reply-thread__more"
2841
- }, nr = { class: "reply-thread__header" }, rr = { class: "reply-thread__author-block" }, ir = { class: "reply-thread__author" }, ar = { class: "reply-thread__date" }, or = /*#__PURE__*/ t(/* @__PURE__ */ p({
2842
- __name: "ReplyThread",
2843
- props: {
2844
- replies: {},
2845
- isExpanded: { type: Boolean }
2846
- },
2847
- setup(e) {
2848
- let t = e, n = o(() => t.isExpanded ? t.replies : t.replies.slice(-1)), r = o(() => t.isExpanded ? 0 : Math.max(0, t.replies.length - 1));
2849
- return (t, i) => e.replies.length > 0 ? (b(), l("div", er, [r.value > 0 ? (b(), l("div", tr, E(r.value) + " " + E(r.value === 1 ? "reply" : "replies"), 1)) : c("", !0), (b(!0), l(a, null, C(n.value, (t) => (b(), l("div", {
2850
- key: t.id,
2851
- class: g(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
2852
- }, [u("div", nr, [f($n, {
2853
- name: t.author,
2854
- size: 28
2855
- }, null, 8, ["name"]), u("div", rr, [u("div", ir, E(t.author || "Unknown"), 1), u("div", ar, E(O(Jn)(t.date)), 1)])]), u("div", { class: g(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, E(O(qn)(t.content)), 3)], 2))), 128))])) : c("", !0);
2856
- }
2857
- }), [["__scopeId", "data-v-06331fac"]]), sr = ["onKeydown"], cr = { class: "reply-input__actions" }, lr = ["disabled"], ur = /*#__PURE__*/ t(/* @__PURE__ */ p({
2903
+ }), or = ["onKeydown"], sr = { class: "reply-input__actions" }, cr = ["disabled"], lr = /*#__PURE__*/ e(/* @__PURE__ */ p({
2858
2904
  __name: "ReplyInput",
2859
2905
  emits: ["submit"],
2860
2906
  setup(e, { emit: t }) {
@@ -2886,14 +2932,14 @@ var $n = /* @__PURE__ */ p({
2886
2932
  P(F(p, ["prevent"]), ["enter"]),
2887
2933
  P(f, ["esc"])
2888
2934
  ]
2889
- }, null, 40, sr), [[A, i.value]]), u("div", cr, [u("button", {
2935
+ }, null, 40, or), [[A, i.value]]), u("div", sr, [u("button", {
2890
2936
  class: "reply-input__cancel",
2891
2937
  onClick: F(f, ["stop"])
2892
2938
  }, "Cancel"), u("button", {
2893
2939
  class: g(["reply-input__submit", { "reply-input__submit--active": c.value }]),
2894
2940
  disabled: !c.value,
2895
2941
  onClick: F(p, ["stop"])
2896
- }, " Reply ", 10, lr)])], 64)) : (b(), l("input", {
2942
+ }, " Reply ", 10, cr)])], 64)) : (b(), l("input", {
2897
2943
  key: 0,
2898
2944
  readonly: "",
2899
2945
  placeholder: "Reply",
@@ -2902,13 +2948,38 @@ var $n = /* @__PURE__ */ p({
2902
2948
  onClick: F(d, ["stop"])
2903
2949
  }, null, 32))], 32));
2904
2950
  }
2905
- }), [["__scopeId", "data-v-fea8646c"]]), dr = ["data-comment-id"], fr = {
2951
+ }), [["__scopeId", "data-v-343d2df1"]]), ur = {
2952
+ key: 0,
2953
+ class: "reply-thread"
2954
+ }, dr = {
2955
+ key: 0,
2956
+ class: "reply-thread__more"
2957
+ }, fr = { class: "reply-thread__header" }, pr = { class: "reply-thread__author-block" }, mr = { class: "reply-thread__author" }, hr = { class: "reply-thread__date" }, gr = ["data-find-comment-id", "data-find-comment-paragraph"], _r = /*#__PURE__*/ e(/* @__PURE__ */ p({
2958
+ __name: "ReplyThread",
2959
+ props: {
2960
+ replies: {},
2961
+ isExpanded: { type: Boolean }
2962
+ },
2963
+ setup(e) {
2964
+ let t = e, n = o(() => t.isExpanded ? t.replies : t.replies.slice(-1)), r = o(() => t.isExpanded ? 0 : Math.max(0, t.replies.length - 1));
2965
+ return (t, i) => e.replies.length > 0 ? (b(), l("div", ur, [r.value > 0 ? (b(), l("div", dr, E(r.value) + " " + E(r.value === 1 ? "reply" : "replies"), 1)) : c("", !0), (b(!0), l(a, null, C(n.value, (t) => (b(), l("div", {
2966
+ key: t.id,
2967
+ class: g(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
2968
+ }, [u("div", fr, [f(ar, {
2969
+ name: t.author,
2970
+ size: 28
2971
+ }, null, 8, ["name"]), u("div", pr, [u("div", mr, E(t.author || "Unknown"), 1), u("div", hr, E(O(tr)(t.date)), 1)])]), u("div", { class: g(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, [(b(!0), l(a, null, C(t.content, (e, n) => (b(), l(a, { key: n }, [u("span", {
2972
+ "data-find-comment-id": t.id,
2973
+ "data-find-comment-paragraph": n
2974
+ }, E(O(V)(e)), 9, gr), i[0] ||= d(E(" "), -1)], 64))), 128))], 2)], 2))), 128))])) : c("", !0);
2975
+ }
2976
+ }), [["__scopeId", "data-v-3ab28dc9"]]), vr = ["data-comment-id"], yr = {
2906
2977
  key: 0,
2907
2978
  class: "comment-card__resolved"
2908
- }, pr = { class: "comment-card__head" }, mr = { class: "comment-card__author-block" }, hr = { class: "comment-card__author" }, gr = { class: "comment-card__date" }, _r = {
2979
+ }, br = { class: "comment-card__head" }, xr = { class: "comment-card__author-block" }, Sr = { class: "comment-card__author" }, Cr = { class: "comment-card__date" }, wr = {
2909
2980
  key: 0,
2910
2981
  class: "comment-card__actions"
2911
- }, vr = ["title"], yr = { class: "comment-card__body" }, br = /*#__PURE__*/ t(/* @__PURE__ */ p({
2982
+ }, Tr = ["title"], Er = { class: "comment-card__body" }, Dr = ["data-find-comment-id", "data-find-comment-paragraph"], Or = /*#__PURE__*/ e(/* @__PURE__ */ p({
2912
2983
  __name: "CommentCard",
2913
2984
  props: {
2914
2985
  comment: {},
@@ -2923,9 +2994,9 @@ var $n = /* @__PURE__ */ p({
2923
2994
  "delete"
2924
2995
  ],
2925
2996
  setup(e, { emit: t }) {
2926
- let n = e, i = t, a = S(!1);
2927
- function o() {
2928
- a.value = !1, i("delete", n.comment.id);
2997
+ let n = e, i = t, o = S(!1);
2998
+ function p() {
2999
+ o.value = !1, i("delete", n.comment.id);
2929
3000
  }
2930
3001
  return (t, n) => (b(), l("div", {
2931
3002
  class: g(["comment-card", { "comment-card--expanded": e.expanded }]),
@@ -2933,17 +3004,17 @@ var $n = /* @__PURE__ */ p({
2933
3004
  onClick: n[5] ||= (e) => t.$emit("click"),
2934
3005
  onMousedown: n[6] ||= F(() => {}, ["stop"])
2935
3006
  }, [
2936
- e.comment.done ? (b(), l("div", fr, [f(r, {
3007
+ e.comment.done ? (b(), l("div", yr, [f(r, {
2937
3008
  name: "check",
2938
3009
  size: 12
2939
3010
  }), n[7] ||= u("span", null, "Resolved", -1)])) : c("", !0),
2940
- u("div", pr, [
2941
- f($n, {
3011
+ u("div", br, [
3012
+ f(ar, {
2942
3013
  name: e.comment.author,
2943
3014
  size: 32
2944
3015
  }, null, 8, ["name"]),
2945
- u("div", mr, [u("div", hr, E(e.comment.author || "Unknown"), 1), u("div", gr, E(O(Jn)(e.comment.date)), 1)]),
2946
- e.expanded ? (b(), l("div", _r, [
3016
+ u("div", xr, [u("div", Sr, E(e.comment.author || "Unknown"), 1), u("div", Cr, E(O(tr)(e.comment.date)), 1)]),
3017
+ e.expanded ? (b(), l("div", wr, [
2947
3018
  u("button", {
2948
3019
  class: "comment-card__icon-btn",
2949
3020
  title: e.comment.done ? "Reopen" : "Resolve",
@@ -2951,38 +3022,41 @@ var $n = /* @__PURE__ */ p({
2951
3022
  }, [f(r, {
2952
3023
  name: e.comment.done ? "undo" : "check",
2953
3024
  size: 20
2954
- }, null, 8, ["name"])], 8, vr),
3025
+ }, null, 8, ["name"])], 8, Tr),
2955
3026
  u("button", {
2956
3027
  class: "comment-card__icon-btn",
2957
3028
  title: "More options",
2958
- onClick: n[1] ||= F((e) => a.value = !a.value, ["stop"])
3029
+ onClick: n[1] ||= F((e) => o.value = !o.value, ["stop"])
2959
3030
  }, [f(r, {
2960
3031
  name: "more_vert",
2961
3032
  size: 20
2962
3033
  })]),
2963
- a.value ? (b(), l("div", {
3034
+ o.value ? (b(), l("div", {
2964
3035
  key: 0,
2965
3036
  class: "comment-card__menu",
2966
3037
  onClick: n[2] ||= F(() => {}, ["stop"]),
2967
3038
  onMousedown: n[3] ||= F(() => {}, ["stop"])
2968
3039
  }, [u("button", {
2969
3040
  class: "comment-card__menu-item",
2970
- onClick: o
2971
- }, "Delete")], 32)) : c("", !0)
3041
+ onClick: p
3042
+ }, " Delete ")], 32)) : c("", !0)
2972
3043
  ])) : c("", !0)
2973
3044
  ]),
2974
- u("div", yr, E(O(qn)(e.comment.content)), 1),
2975
- f(or, {
3045
+ u("div", Er, [(b(!0), l(a, null, C(e.comment.content, (t, r) => (b(), l(a, { key: r }, [u("span", {
3046
+ "data-find-comment-id": e.comment.id,
3047
+ "data-find-comment-paragraph": r
3048
+ }, E(O(V)(t)), 9, Dr), n[8] ||= d(E(" "), -1)], 64))), 128))]),
3049
+ f(_r, {
2976
3050
  replies: e.replies,
2977
3051
  "is-expanded": e.expanded
2978
3052
  }, null, 8, ["replies", "is-expanded"]),
2979
- e.expanded && !e.comment.done ? (b(), s(ur, {
3053
+ e.expanded && !e.comment.done ? (b(), s(lr, {
2980
3054
  key: 1,
2981
3055
  onSubmit: n[4] ||= (n) => t.$emit("reply", e.comment.id, n)
2982
3056
  })) : c("", !0)
2983
- ], 42, dr));
3057
+ ], 42, vr));
2984
3058
  }
2985
- }), [["__scopeId", "data-v-7a3ee7ac"]]), xr = ["data-comment-id"], Sr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3059
+ }), [["__scopeId", "data-v-216d0740"]]), kr = ["data-comment-id"], Ar = /*#__PURE__*/ e(/* @__PURE__ */ p({
2986
3060
  __name: "ResolvedCommentMarker",
2987
3061
  props: { comment: {} },
2988
3062
  emits: ["toggle-expand"],
@@ -2996,39 +3070,39 @@ var $n = /* @__PURE__ */ p({
2996
3070
  }, [f(r, {
2997
3071
  name: "chat_bubble_check",
2998
3072
  size: 20
2999
- })], 40, xr));
3073
+ })], 40, kr));
3000
3074
  }
3001
- }), [["__scopeId", "data-v-d0c228f6"]]), Cr = { class: "tc-card__head" }, wr = { class: "tc-card__author-block" }, Tr = { class: "tc-card__author" }, Er = {
3075
+ }), [["__scopeId", "data-v-c10c6f88"]]), jr = { class: "tc-card__head" }, Mr = { class: "tc-card__author-block" }, Nr = { class: "tc-card__author" }, Pr = {
3002
3076
  key: 0,
3003
3077
  class: "tc-card__date"
3004
- }, Dr = {
3078
+ }, Fr = {
3005
3079
  key: 0,
3006
3080
  class: "tc-card__actions"
3007
- }, Or = ["title"], kr = ["title"], Ar = { class: "tc-card__body" }, jr = { class: "tc-card__deleted" }, Mr = { class: "tc-card__inserted" }, Nr = { class: "tc-card__inserted" }, Pr = { class: "tc-card__deleted" }, Fr = {
3081
+ }, Ir = ["title"], Lr = ["title"], Rr = { class: "tc-card__body" }, zr = { class: "tc-card__deleted" }, Br = { class: "tc-card__inserted" }, Vr = { class: "tc-card__inserted" }, Hr = { class: "tc-card__deleted" }, Ur = {
3008
3082
  key: 0,
3009
3083
  class: "tc-card__changed"
3010
- }, Ir = { class: "tc-card__changed" }, Lr = { class: "tc-card__changed" }, Rr = {
3084
+ }, Wr = { class: "tc-card__changed" }, Gr = { class: "tc-card__changed" }, Kr = {
3011
3085
  key: 5,
3012
3086
  class: "tc-card__inserted"
3013
- }, zr = {
3087
+ }, qr = {
3014
3088
  key: 6,
3015
3089
  class: "tc-card__deleted"
3016
- }, Br = {
3090
+ }, Jr = {
3017
3091
  key: 7,
3018
3092
  class: "tc-card__inserted"
3019
- }, Vr = {
3093
+ }, Yr = {
3020
3094
  key: 8,
3021
3095
  class: "tc-card__deleted"
3022
- }, Hr = {
3096
+ }, Xr = {
3023
3097
  key: 9,
3024
3098
  class: "tc-card__changed"
3025
- }, Ur = {
3099
+ }, Zr = {
3026
3100
  key: 10,
3027
3101
  class: "tc-card__inserted"
3028
- }, Wr = {
3102
+ }, Qr = {
3029
3103
  key: 11,
3030
3104
  class: "tc-card__deleted"
3031
- }, Gr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3105
+ }, $r = /*#__PURE__*/ e(/* @__PURE__ */ p({
3032
3106
  __name: "TrackedChangeCard",
3033
3107
  props: {
3034
3108
  change: {},
@@ -3091,129 +3165,45 @@ var $n = /* @__PURE__ */ p({
3091
3165
  onClick: n[1] ||= (e) => t.$emit("click"),
3092
3166
  onMousedown: n[2] ||= F(() => {}, ["stop"])
3093
3167
  }, [
3094
- u("div", Cr, [
3095
- f($n, {
3168
+ u("div", jr, [
3169
+ f(ar, {
3096
3170
  name: h.value,
3097
3171
  size: 32
3098
3172
  }, null, 8, ["name"]),
3099
- u("div", wr, [u("div", Tr, E(h.value), 1), e.change.date ? (b(), l("div", Er, E(O(Jn)(e.change.date)), 1)) : c("", !0)]),
3100
- e.expanded ? (b(), l("div", Dr, [u("button", {
3173
+ u("div", Mr, [u("div", Nr, E(h.value), 1), e.change.date ? (b(), l("div", Pr, E(O(tr)(e.change.date)), 1)) : c("", !0)]),
3174
+ e.expanded ? (b(), l("div", Fr, [u("button", {
3101
3175
  class: "tc-card__icon-btn",
3102
3176
  title: O(i)("acceptChange"),
3103
3177
  onClick: F(x, ["stop"])
3104
3178
  }, [f(r, {
3105
3179
  name: "check",
3106
3180
  size: 20
3107
- })], 8, Or), u("button", {
3181
+ })], 8, Ir), u("button", {
3108
3182
  class: "tc-card__icon-btn",
3109
3183
  title: O(i)("rejectChange"),
3110
3184
  onClick: F(S, ["stop"])
3111
3185
  }, [f(r, {
3112
3186
  name: "close",
3113
3187
  size: 20
3114
- })], 8, kr)])) : c("", !0)
3188
+ })], 8, Lr)])) : c("", !0)
3115
3189
  ]),
3116
- u("div", Ar, [e.change.type === "replacement" ? (b(), l(a, { key: 0 }, [
3190
+ u("div", Rr, [e.change.type === "replacement" ? (b(), l(a, { key: 0 }, [
3117
3191
  d(E(O(i)("trackedChanges.replaced")) + " ", 1),
3118
- u("span", jr, "\"" + E(O(Qn)(e.change.deletedText || "")) + "\"", 1),
3192
+ u("span", zr, "\"" + E(O($)(e.change.deletedText || "")) + "\"", 1),
3119
3193
  d(" " + E(O(i)("trackedChanges.with")) + " ", 1),
3120
- u("span", Mr, "\"" + E(O(Qn)(e.change.text)) + "\"", 1)
3121
- ], 64)) : e.change.type === "paragraphMarkInsertion" ? (b(), l(a, { key: 1 }, [d(E(O(i)("revisions.paragraphMarkInserted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[3] ||= d(": ", -1), u("span", Nr, "\"" + E(O(Qn)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "paragraphMarkDeletion" ? (b(), l(a, { key: 2 }, [d(E(O(i)("revisions.paragraphMarkDeleted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[4] ||= d(": ", -1), u("span", Pr, "\"" + E(O(Qn)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : v.value ? (b(), l(a, { key: 3 }, [v.value.shape === "label-only" ? (b(), l("span", Fr, E(v.value.label), 1)) : (b(), l(a, { key: 1 }, [d(E(v.value.label), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[5] ||= d(": ", -1), u("span", Ir, "\"" + E(O(Qn)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64))], 64)) : e.change.type === "runPropertiesChanged" ? (b(), l(a, { key: 4 }, [d(E(O(i)("revisions.runPropertiesChanged")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[6] ||= d(": ", -1), u("span", Lr, "\"" + E(O(Qn)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "rowInserted" ? (b(), l("span", Rr, E(O(i)("revisions.rowInserted")), 1)) : e.change.type === "rowDeleted" ? (b(), l("span", zr, E(O(i)("revisions.rowDeleted")), 1)) : e.change.type === "cellInserted" ? (b(), l("span", Br, E(O(i)("revisions.cellInserted")), 1)) : e.change.type === "cellDeleted" ? (b(), l("span", Vr, E(O(i)("revisions.cellDeleted")), 1)) : e.change.type === "cellMerged" ? (b(), l("span", Hr, E(O(i)("revisions.cellMerged")), 1)) : e.change.type === "tableInserted" ? (b(), l("span", Ur, E(O(i)("revisions.tableInserted")), 1)) : e.change.type === "tableDeleted" ? (b(), l("span", Wr, E(O(i)("revisions.tableDeleted")), 1)) : (b(), l(a, { key: 12 }, [d(E(e.change.type === "insertion" ? O(i)("inserted") : O(i)("deleted")) + " ", 1), u("span", { class: g(e.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + E(O(Qn)(e.change.text)) + "\" ", 3)], 64))]),
3122
- f(or, {
3194
+ u("span", Br, "\"" + E(O($)(e.change.text)) + "\"", 1)
3195
+ ], 64)) : e.change.type === "paragraphMarkInsertion" ? (b(), l(a, { key: 1 }, [d(E(O(i)("revisions.paragraphMarkInserted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[3] ||= d(": ", -1), u("span", Vr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "paragraphMarkDeletion" ? (b(), l(a, { key: 2 }, [d(E(O(i)("revisions.paragraphMarkDeleted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[4] ||= d(": ", -1), u("span", Hr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : v.value ? (b(), l(a, { key: 3 }, [v.value.shape === "label-only" ? (b(), l("span", Ur, E(v.value.label), 1)) : (b(), l(a, { key: 1 }, [d(E(v.value.label), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[5] ||= d(": ", -1), u("span", Wr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64))], 64)) : e.change.type === "runPropertiesChanged" ? (b(), l(a, { key: 4 }, [d(E(O(i)("revisions.runPropertiesChanged")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[6] ||= d(": ", -1), u("span", Gr, "\"" + E(O($)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "rowInserted" ? (b(), l("span", Kr, E(O(i)("revisions.rowInserted")), 1)) : e.change.type === "rowDeleted" ? (b(), l("span", qr, E(O(i)("revisions.rowDeleted")), 1)) : e.change.type === "cellInserted" ? (b(), l("span", Jr, E(O(i)("revisions.cellInserted")), 1)) : e.change.type === "cellDeleted" ? (b(), l("span", Yr, E(O(i)("revisions.cellDeleted")), 1)) : e.change.type === "cellMerged" ? (b(), l("span", Xr, E(O(i)("revisions.cellMerged")), 1)) : e.change.type === "tableInserted" ? (b(), l("span", Zr, E(O(i)("revisions.tableInserted")), 1)) : e.change.type === "tableDeleted" ? (b(), l("span", Qr, E(O(i)("revisions.tableDeleted")), 1)) : (b(), l(a, { key: 12 }, [d(E(e.change.type === "insertion" ? O(i)("inserted") : O(i)("deleted")) + " ", 1), u("span", { class: g(e.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + E(O($)(e.change.text)) + "\" ", 3)], 64))]),
3196
+ f(_r, {
3123
3197
  replies: e.replies,
3124
3198
  "is-expanded": e.expanded
3125
3199
  }, null, 8, ["replies", "is-expanded"]),
3126
- e.expanded ? (b(), s(ur, {
3200
+ e.expanded ? (b(), s(lr, {
3127
3201
  key: 0,
3128
3202
  onSubmit: n[0] ||= (n) => t.$emit("reply", e.change.revisionId, n)
3129
3203
  })) : c("", !0)
3130
3204
  ], 34));
3131
3205
  }
3132
- }), [["__scopeId", "data-v-b19a1fcd"]]), Kr = ["onKeydown"], qr = { class: "add-comment-card__actions" }, Jr = ["disabled"], Yr = /*#__PURE__*/ t(/* @__PURE__ */ p({
3133
- __name: "AddCommentCard",
3134
- emits: ["submit", "cancel"],
3135
- setup(e, { emit: t }) {
3136
- let n = t, r = S(""), i = S(null), a = o(() => r.value.trim());
3137
- y(() => {
3138
- i.value?.focus({ preventScroll: !0 });
3139
- });
3140
- function s() {
3141
- a.value && (n("submit", a.value), r.value = "");
3142
- }
3143
- function c() {
3144
- n("cancel"), r.value = "";
3145
- }
3146
- return (e, t) => (b(), l("div", {
3147
- class: "add-comment-card",
3148
- onMousedown: t[3] ||= F(() => {}, ["stop"])
3149
- }, [N(u("textarea", {
3150
- ref_key: "inputRef",
3151
- ref: i,
3152
- "onUpdate:modelValue": t[0] ||= (e) => r.value = e,
3153
- class: "add-comment-card__field",
3154
- placeholder: "Add a comment",
3155
- onMousedown: t[1] ||= F(() => {}, ["stop"]),
3156
- onKeydown: [
3157
- t[2] ||= F(() => {}, ["stop"]),
3158
- P(F(s, ["exact", "prevent"]), ["enter"]),
3159
- P(c, ["esc"])
3160
- ]
3161
- }, null, 40, Kr), [[A, r.value]]), u("div", qr, [u("button", {
3162
- class: "add-comment-card__cancel",
3163
- onClick: c
3164
- }, "Cancel"), u("button", {
3165
- class: g(["add-comment-card__submit", { "add-comment-card__submit--active": a.value }]),
3166
- disabled: !a.value,
3167
- onClick: s
3168
- }, " Comment ", 10, Jr)])], 32));
3169
- }
3170
- }), [["__scopeId", "data-v-2939f9cd"]]);
3171
- //#endregion
3172
- //#region src/composables/useCommentSidebarItems.ts
3173
- function Xr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
3174
- return o(() => {
3175
- let a = [];
3176
- r?.value && i?.value != null && a.push({
3177
- id: "new-comment-input",
3178
- anchorPos: 0,
3179
- fixedY: i.value,
3180
- priority: -1e3,
3181
- isTemporary: !0,
3182
- estimatedHeight: 120,
3183
- kind: "add-comment"
3184
- });
3185
- let o = /* @__PURE__ */ new Map();
3186
- for (let t of e.value) if (t.parentId != null) {
3187
- let e = o.get(t.parentId);
3188
- e ? e.push(t) : o.set(t.parentId, [t]);
3189
- }
3190
- for (let t of e.value) t.parentId ?? (t.done && !n?.value || a.push({
3191
- id: `comment-${t.id}`,
3192
- anchorPos: 0,
3193
- anchorKey: `comment-${t.id}`,
3194
- priority: 0,
3195
- estimatedHeight: t.done ? 28 : 80,
3196
- kind: "comment",
3197
- comment: t,
3198
- replies: o.get(t.id) ?? []
3199
- }));
3200
- return t.value.forEach((e, t) => {
3201
- a.push({
3202
- id: `tc-${e.revisionId}-${t}`,
3203
- anchorPos: e.from,
3204
- anchorKey: `revision-${e.revisionId}`,
3205
- priority: 1,
3206
- estimatedHeight: 80,
3207
- kind: "tracked-change",
3208
- change: e,
3209
- replies: o.get(e.revisionId) ?? []
3210
- });
3211
- }), a;
3212
- });
3213
- }
3214
- //#endregion
3215
- //#region src/components/UnifiedSidebar.vue?vue&type=script&setup=true&lang.ts
3216
- var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r = /*#__PURE__*/ t(/* @__PURE__ */ p({
3206
+ }), [["__scopeId", "data-v-8ca9e99c"]]), ei = ["data-folio-comments-surface", "tabindex"], ti = ["data-folio-scroll"], ni = ["data-card-id"], ri = /*#__PURE__*/ e(/* @__PURE__ */ p({
3217
3207
  __name: "UnifiedSidebar",
3218
3208
  props: {
3219
3209
  isOpen: { type: Boolean },
@@ -3245,44 +3235,44 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3245
3235
  "update:activeItemId"
3246
3236
  ],
3247
3237
  setup(e, { emit: t }) {
3248
- let n = e, r = t, i = o(() => n.surface === "drawer"), f = S(null), p = o(() => n.activeItemId === void 0 ? f.value : n.activeItemId);
3249
- function m(e) {
3250
- let t = p.value === e ? null : e;
3251
- f.value = t, r("update:activeItemId", t);
3238
+ let n = e, r = t, i = o(() => n.surface === "drawer"), f = o(() => n.activeItemId);
3239
+ function p(e) {
3240
+ let t = f.value === e ? null : e;
3241
+ r("update:activeItemId", t);
3252
3242
  }
3253
- function h(e) {
3243
+ function m(e) {
3254
3244
  e.stopPropagation();
3255
3245
  let t = e.target;
3256
- t instanceof HTMLElement && t.closest(".unified-sidebar__card-slot") || p.value !== null && (f.value = null, r("update:activeItemId", null));
3246
+ t instanceof HTMLElement && t.closest(".unified-sidebar__card-slot") || f.value !== null && r("update:activeItemId", null);
3257
3247
  }
3258
- let x = Xr({
3248
+ let h = Xn({
3259
3249
  comments: D(n, "comments"),
3260
3250
  trackedChanges: D(n, "trackedChanges"),
3261
3251
  showResolved: o(() => n.showResolved ?? !1),
3262
3252
  isAddingComment: o(() => n.isAddingComment ?? !1),
3263
3253
  addCommentYPosition: o(() => n.addCommentYPosition ?? null)
3264
- }), w = S(null), k = S(/* @__PURE__ */ new Map()), A = /* @__PURE__ */ new Map(), N = null, P = null, F = /* @__PURE__ */ new Set();
3265
- function I() {
3266
- let e = w.value;
3267
- if (!e || !P) return;
3254
+ }), x = S(null), w = S(/* @__PURE__ */ new Map()), k = /* @__PURE__ */ new Map(), A = null, N = null, P = /* @__PURE__ */ new Set();
3255
+ function F() {
3256
+ let e = x.value;
3257
+ if (!e || !N) return;
3268
3258
  let t = new Set(e.querySelectorAll("[data-card-id]"));
3269
- if (!(t.size === F.size && [...t].every((e) => F.has(e)))) {
3270
- P.disconnect();
3271
- for (let e of t) P.observe(e);
3272
- F = t;
3259
+ if (!(t.size === P.size && [...t].every((e) => P.has(e)))) {
3260
+ N.disconnect();
3261
+ for (let e of t) N.observe(e);
3262
+ P = t;
3273
3263
  }
3274
3264
  }
3275
- function L() {
3276
- if (G(), i.value) {
3277
- k.value = /* @__PURE__ */ new Map();
3265
+ function I() {
3266
+ if (te(), i.value) {
3267
+ w.value = /* @__PURE__ */ new Map();
3278
3268
  return;
3279
3269
  }
3280
- let e = n.pagesContainer, t = x.value;
3270
+ let e = n.pagesContainer, t = h.value;
3281
3271
  if (!e || t.length === 0) {
3282
- k.value = /* @__PURE__ */ new Map();
3272
+ w.value = /* @__PURE__ */ new Map();
3283
3273
  return;
3284
3274
  }
3285
- let r = e.getBoundingClientRect(), a = U(e), o = /* @__PURE__ */ new Map();
3275
+ let r = e.getBoundingClientRect(), a = K(e), o = /* @__PURE__ */ new Map();
3286
3276
  for (let t of e.querySelectorAll(".docx-insertion[data-revision-id]")) {
3287
3277
  let e = t.dataset.revisionId;
3288
3278
  e && !o.has(e) && o.set(e, t);
@@ -3309,90 +3299,93 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3309
3299
  }
3310
3300
  t && c.set(e.anchorKey, l(t));
3311
3301
  }
3312
- let u = /* @__PURE__ */ new Map(), d = w.value;
3302
+ let u = /* @__PURE__ */ new Map(), d = x.value;
3313
3303
  if (d) for (let e of d.querySelectorAll("[data-card-id]")) {
3314
3304
  let t = e.dataset.cardId;
3315
3305
  t && u.set(t, e.offsetHeight);
3316
3306
  }
3317
3307
  let f = /* @__PURE__ */ new Map();
3318
- for (let { item: n, y: r } of X({
3308
+ for (let { item: n, y: r } of ie({
3319
3309
  items: t,
3320
3310
  anchorPositions: c,
3321
- renderedDomContext: V(e),
3311
+ renderedDomContext: W(e),
3322
3312
  zoom: 1,
3323
3313
  cardHeights: u,
3324
- lastKnown: A
3314
+ lastKnown: k
3325
3315
  })) f.set(n.id, r);
3326
- k.value = f, I();
3316
+ w.value = f, F();
3327
3317
  }
3328
- let R = o(() => {
3318
+ let ee = o(() => {
3329
3319
  let e = 0;
3330
- for (let t of k.value.values()) e = Math.max(e, t);
3320
+ for (let t of w.value.values()) e = Math.max(e, t);
3331
3321
  return e + 200;
3332
- }), z = S(null), W = S({
3322
+ }), R = S(null), z = {
3333
3323
  top: 0,
3334
- width: B.drawerWidth,
3324
+ width: L.drawerWidth,
3335
3325
  height: 0
3336
- });
3337
- function G() {
3338
- let e = w.value?.offsetParent, t = ne(n.pagesContainer);
3326
+ }, B = S(z);
3327
+ function te() {
3328
+ let e = x.value?.offsetParent, t = J(n.pagesContainer);
3339
3329
  if (!(e instanceof HTMLElement) || !t) return;
3340
3330
  let r = e.getBoundingClientRect(), a = t.getBoundingClientRect();
3341
3331
  if (i.value) {
3342
- let e = Math.max(0, Math.min(B.drawerWidth, t.clientWidth - 16));
3343
- W.value = {
3332
+ let e = Math.max(0, Math.min(L.drawerWidth, t.clientWidth - 16));
3333
+ B.value = {
3344
3334
  top: a.top - r.top,
3345
3335
  width: e,
3346
3336
  height: t.clientHeight
3347
- }, z.value = a.left + t.clientWidth - r.left - e;
3337
+ }, R.value = a.left + t.clientWidth - r.left - e;
3348
3338
  return;
3349
3339
  }
3350
3340
  let o = n.pagesContainer?.querySelector(".layout-page");
3351
3341
  if (!o) {
3352
- z.value = null;
3342
+ R.value = null;
3353
3343
  return;
3354
3344
  }
3355
- let s = o.getBoundingClientRect().right - r.left + B.commentsGap, c = Math.max(8, e.clientWidth - B.commentsWidth - 8);
3356
- z.value = Math.max(8, Math.min(s, c));
3345
+ let s = o.getBoundingClientRect().right - r.left + L.commentsGap, c = Math.max(8, e.clientWidth - L.commentsWidth - 8);
3346
+ R.value = Math.max(8, Math.min(s, c));
3357
3347
  }
3358
- let ee = o(() => ({
3348
+ let ne = o(() => ({
3359
3349
  position: "sticky",
3360
3350
  top: 0,
3361
- maxHeight: W.value.height || void 0,
3351
+ maxHeight: B.value.height || void 0,
3362
3352
  overflowY: "auto",
3363
- paddingBlock: B.commentsGap + "px",
3353
+ paddingBlock: L.commentsGap + "px",
3364
3354
  boxSizing: "border-box"
3365
- })), K = o(() => {
3366
- let e = p.value;
3355
+ })), V = o(() => {
3356
+ let e = f.value;
3367
3357
  if (!e) return "";
3368
- if (e.startsWith("comment-")) return `${H(e.slice(8), ".paged-editor__pages ")} { background-color: rgba(255, 212, 0, 0.35) !important; border-bottom: 2px solid rgba(255, 212, 0, 0.7) !important; }`;
3358
+ if (e.startsWith("comment-")) {
3359
+ let t = e.slice(8);
3360
+ return `${G(t, ".paged-editor__pages ")} { background-color: rgba(255, 212, 0, 0.35) !important; border-bottom: 2px solid rgba(255, 212, 0, 0.7) !important; }`;
3361
+ }
3369
3362
  if (e.startsWith("tc-")) {
3370
3363
  let t = e.split("-").at(1) ?? "";
3371
3364
  return `
3372
- .paged-editor__pages .docx-insertion[data-revision-id="${x.value.find((t) => t.id === e)?.change?.insertionRevisionId ?? Number(t)}"] { background-color: rgba(52, 168, 83, 0.2) !important; border-bottom: 2px solid #2e7d32 !important; }
3365
+ .paged-editor__pages .docx-insertion[data-revision-id="${h.value.find((t) => t.id === e)?.change?.insertionRevisionId ?? Number(t)}"] { background-color: rgba(52, 168, 83, 0.2) !important; border-bottom: 2px solid #2e7d32 !important; }
3373
3366
  .paged-editor__pages .docx-deletion[data-revision-id="${t}"] { background-color: rgba(211, 47, 47, 0.2) !important; text-decoration-thickness: 2px !important; }
3374
3367
  `;
3375
3368
  }
3376
3369
  return "";
3377
- }), te = o(() => {
3378
- let e = i.value, t = e ? z.value !== null : k.value.size > 0 || x.value.length === 0;
3370
+ }), re = o(() => {
3371
+ let e = i.value, t = e ? R.value !== null : w.value.size > 0 || h.value.length === 0;
3379
3372
  return {
3380
3373
  position: "absolute",
3381
- top: e ? W.value.top + "px" : "0",
3382
- left: z.value === null ? `calc(50% + ${n.pageWidthPx / 2 + B.commentsGap}px)` : z.value + "px",
3383
- width: (e ? W.value.width : B.commentsWidth) + "px",
3384
- paddingInline: e ? B.commentsGap + "px" : void 0,
3374
+ top: e ? B.value.top + "px" : "0",
3375
+ left: R.value === null ? `calc(50% + ${n.pageWidthPx / 2 + L.commentsGap}px)` : R.value + "px",
3376
+ width: (e ? B.value.width : L.commentsWidth) + "px",
3377
+ paddingInline: e ? L.commentsGap + "px" : void 0,
3385
3378
  bottom: e ? void 0 : 0,
3386
3379
  opacity: +!!t,
3387
3380
  pointerEvents: t ? "auto" : "none"
3388
3381
  };
3389
3382
  });
3390
- function q(e) {
3383
+ function H(e) {
3391
3384
  if (i.value) return {
3392
3385
  position: "relative",
3393
3386
  marginBottom: "8px"
3394
3387
  };
3395
- let t = k.value.get(e);
3388
+ let t = w.value.get(e);
3396
3389
  return t == null ? {
3397
3390
  position: "static",
3398
3391
  marginBottom: "8px"
@@ -3404,15 +3397,15 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3404
3397
  transition: "top 0.15s ease"
3405
3398
  };
3406
3399
  }
3407
- let J = !1;
3408
- function Y() {
3409
- J || (J = !0, requestAnimationFrame(() => {
3410
- J = !1, L();
3400
+ let U = !1;
3401
+ function q() {
3402
+ U || (U = !0, requestAnimationFrame(() => {
3403
+ U = !1, I();
3411
3404
  }));
3412
3405
  }
3413
3406
  j(() => [
3414
- x.value,
3415
- p.value,
3407
+ h.value,
3408
+ f.value,
3416
3409
  n.pagesContainer,
3417
3410
  n.pageWidthPx,
3418
3411
  n.zoom,
@@ -3420,8 +3413,8 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3420
3413
  n.addCommentYPosition,
3421
3414
  n.surface,
3422
3415
  n.isOpen
3423
- ], () => Y(), { immediate: !0 });
3424
- function ne(e) {
3416
+ ], () => q(), { immediate: !0 });
3417
+ function J(e) {
3425
3418
  let t = e?.parentElement ?? null;
3426
3419
  for (; t;) {
3427
3420
  let e = getComputedStyle(t).overflowY;
@@ -3430,20 +3423,20 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3430
3423
  }
3431
3424
  return null;
3432
3425
  }
3433
- let Z = null;
3434
- function re() {
3435
- Z && Z.removeEventListener("scroll", Y), Z = ne(n.pagesContainer), Z && (Z.addEventListener("scroll", Y, { passive: !0 }), N?.observe(Z));
3426
+ let Y = null;
3427
+ function ae() {
3428
+ Y && Y.removeEventListener("scroll", q), Y = J(n.pagesContainer), Y && (Y.addEventListener("scroll", q, { passive: !0 }), A?.observe(Y));
3436
3429
  }
3437
3430
  return y(() => {
3438
- P = new ResizeObserver(() => Y()), Y(), n.pagesContainer && (N = new ResizeObserver(() => Y()), N.observe(n.pagesContainer), re()), window.addEventListener("resize", Y);
3431
+ N = new ResizeObserver(() => q()), q(), n.pagesContainer && (A = new ResizeObserver(() => q()), A.observe(n.pagesContainer), ae()), window.addEventListener("resize", q);
3439
3432
  }), j(() => n.pagesContainer, (e) => {
3440
- N?.disconnect(), N = null, e && (N = new ResizeObserver(() => Y()), N.observe(e)), re(), Y();
3433
+ A?.disconnect(), A = null, e && (A = new ResizeObserver(() => q()), A.observe(e)), ae(), q();
3441
3434
  }), v(() => {
3442
- N?.disconnect(), P?.disconnect(), Z && Z.removeEventListener("scroll", Y), window.removeEventListener("resize", Y);
3435
+ A?.disconnect(), N?.disconnect(), Y && Y.removeEventListener("scroll", q), window.removeEventListener("resize", q);
3443
3436
  }), j(() => n.isOpen && i.value, (e, t, n) => {
3444
3437
  if (!e || typeof document > "u") return;
3445
3438
  let i = document.activeElement instanceof HTMLElement ? document.activeElement : null;
3446
- w.value?.focus({ preventScroll: !0 });
3439
+ x.value?.focus({ preventScroll: !0 });
3447
3440
  let a = (e) => {
3448
3441
  e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), r("dismiss"));
3449
3442
  };
@@ -3453,41 +3446,42 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3453
3446
  }, {
3454
3447
  immediate: !0,
3455
3448
  flush: "post"
3456
- }), (t, n) => (b(), l(a, null, [K.value ? (b(), s(T("style"), { key: 0 }, {
3457
- default: M(() => [d(E(K.value), 1)]),
3449
+ }), (t, n) => (b(), l(a, null, [V.value ? (b(), s(T("style"), { key: 0 }, {
3450
+ default: M(() => [d(E(V.value), 1)]),
3458
3451
  _: 1
3459
3452
  })) : c("", !0), e.isOpen ? (b(), l("aside", {
3460
3453
  key: 1,
3461
3454
  ref_key: "rootRef",
3462
- ref: w,
3455
+ ref: x,
3463
3456
  class: g(["unified-sidebar", { "unified-sidebar--drawer": i.value }]),
3464
3457
  "data-folio-comments-surface": e.surface ?? "column",
3465
3458
  "data-testid": "folio-comments",
3466
3459
  tabindex: i.value ? -1 : void 0,
3467
- style: _(te.value),
3468
- onMousedown: h
3460
+ style: _(re.value),
3461
+ onMousedown: m
3469
3462
  }, [u("div", {
3470
3463
  class: "unified-sidebar__inner",
3471
- style: _(i.value ? ee.value : { minHeight: R.value + "px" })
3472
- }, [(b(!0), l(a, null, C(O(x), (e) => (b(), l("div", {
3464
+ "data-folio-scroll": i.value ? "" : void 0,
3465
+ style: _(i.value ? ne.value : { minHeight: ee.value + "px" })
3466
+ }, [(b(!0), l(a, null, C(O(h), (e) => (b(), l("div", {
3473
3467
  key: e.id,
3474
3468
  class: "unified-sidebar__card-slot",
3475
3469
  "data-card-id": e.id,
3476
- style: _(q(e.id))
3477
- }, [e.kind === "add-comment" ? (b(), s(Yr, {
3470
+ style: _(H(e.id))
3471
+ }, [e.kind === "add-comment" ? (b(), s(er, {
3478
3472
  key: 0,
3479
3473
  onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
3480
3474
  onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
3481
- })) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (b(), s(Sr, {
3475
+ })) : e.kind === "comment" && e.comment.done && f.value !== e.id ? (b(), s(Ar, {
3482
3476
  key: 1,
3483
3477
  comment: e.comment,
3484
- onToggleExpand: (t) => m(e.id)
3485
- }, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(br, {
3478
+ onToggleExpand: (t) => p(e.id)
3479
+ }, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(Or, {
3486
3480
  key: 2,
3487
3481
  comment: e.comment,
3488
3482
  replies: e.replies,
3489
- expanded: p.value === e.id,
3490
- onClick: (t) => m(e.id),
3483
+ expanded: f.value === e.id,
3484
+ onClick: (t) => p(e.id),
3491
3485
  onReply: n[2] ||= (e, n) => t.$emit("comment-reply", e, n),
3492
3486
  onResolve: n[3] ||= (e) => t.$emit("comment-resolve", e),
3493
3487
  onUnresolve: n[4] ||= (e) => t.$emit("comment-unresolve", e),
@@ -3497,12 +3491,12 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3497
3491
  "replies",
3498
3492
  "expanded",
3499
3493
  "onClick"
3500
- ])) : e.kind === "tracked-change" ? (b(), s(Gr, {
3494
+ ])) : e.kind === "tracked-change" ? (b(), s($r, {
3501
3495
  key: 3,
3502
3496
  change: e.change,
3503
3497
  replies: e.replies ?? [],
3504
- expanded: p.value === e.id,
3505
- onClick: (t) => m(e.id),
3498
+ expanded: f.value === e.id,
3499
+ onClick: (t) => p(e.id),
3506
3500
  onAccept: n[6] ||= (e, n) => t.$emit("accept-change", e, n),
3507
3501
  onReject: n[7] ||= (e, n) => t.$emit("reject-change", e, n),
3508
3502
  onAcceptById: n[8] ||= (e) => t.$emit("accept-change-by-id", e),
@@ -3513,73 +3507,14 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3513
3507
  "replies",
3514
3508
  "expanded",
3515
3509
  "onClick"
3516
- ])) : c("", !0)], 12, Qr))), 128))], 4)], 46, Zr)) : c("", !0)], 64));
3517
- }
3518
- }), [["__scopeId", "data-v-071b08b5"]]), ei = /*#__PURE__*/ t(/* @__PURE__ */ p({
3519
- __name: "StylePicker",
3520
- props: {
3521
- value: {},
3522
- styles: {},
3523
- disabled: {
3524
- type: Boolean,
3525
- default: !1
3526
- },
3527
- className: {}
3528
- },
3529
- emits: ["change"],
3530
- setup(e, { emit: t }) {
3531
- let { Select: n } = i(), r = e, a = t, c = [
3532
- {
3533
- styleId: "Normal",
3534
- name: "Normal text"
3535
- },
3536
- {
3537
- styleId: "Title",
3538
- name: "Title"
3539
- },
3540
- {
3541
- styleId: "Subtitle",
3542
- name: "Subtitle"
3543
- },
3544
- {
3545
- styleId: "Heading1",
3546
- name: "Heading 1"
3547
- },
3548
- {
3549
- styleId: "Heading2",
3550
- name: "Heading 2"
3551
- },
3552
- {
3553
- styleId: "Heading3",
3554
- name: "Heading 3"
3555
- }
3556
- ], l = o(() => r.styles ?? c), u = o(() => l.value.map((e) => ({
3557
- value: e.styleId,
3558
- label: e.name
3559
- })));
3560
- function d(e) {
3561
- a("change", e);
3562
- }
3563
- return (t, r) => (b(), s(O(n), {
3564
- class: g(["docx-style-picker", e.className]),
3565
- value: e.value ?? "Normal",
3566
- items: u.value,
3567
- disabled: e.disabled,
3568
- "aria-label": "Paragraph style",
3569
- onChange: d
3570
- }, null, 8, [
3571
- "value",
3572
- "items",
3573
- "disabled",
3574
- "class"
3575
- ]));
3510
+ ])) : c("", !0)], 12, ni))), 128))], 12, ti)], 46, ei)) : c("", !0)], 64));
3576
3511
  }
3577
- }), [["__scopeId", "data-v-06469e2c"]]), ti = [
3512
+ }), [["__scopeId", "data-v-8a0965e0"]]), ii = [
3578
3513
  "disabled",
3579
3514
  "title",
3580
3515
  "aria-expanded",
3581
3516
  "onClick"
3582
- ], ni = { class: "docx-align__panel" }, ri = ["title", "onClick"], ii = /*#__PURE__*/ t(/* @__PURE__ */ p({
3517
+ ], ai = { class: "docx-align__panel" }, oi = ["title", "onClick"], si = /*#__PURE__*/ e(/* @__PURE__ */ p({
3583
3518
  __name: "AlignmentButtons",
3584
3519
  props: {
3585
3520
  value: { default: "left" },
@@ -3638,8 +3573,8 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3638
3573
  }, null, 8, ["name"]), f(r, {
3639
3574
  name: "arrow_drop_down",
3640
3575
  size: 14
3641
- })], 10, ti)]),
3642
- panel: M(() => [u("div", ni, [(b(), l(a, null, C(m, (t) => u("button", {
3576
+ })], 10, ii)]),
3577
+ panel: M(() => [u("div", ai, [(b(), l(a, null, C(m, (t) => u("button", {
3643
3578
  key: t.value,
3644
3579
  type: "button",
3645
3580
  class: g(["docx-align__option", { "docx-align__option--active": e.value === t.value }]),
@@ -3648,11 +3583,11 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3648
3583
  }, [f(r, {
3649
3584
  name: t.icon,
3650
3585
  size: 20
3651
- }, null, 8, ["name"])], 10, ri)), 64))])]),
3586
+ }, null, 8, ["name"])], 10, oi)), 64))])]),
3652
3587
  _: 1
3653
3588
  }, 8, ["open"]));
3654
3589
  }
3655
- }), [["__scopeId", "data-v-088792b0"]]), ai = { class: "docx-list-btns" }, oi = ["disabled"], si = ["disabled"], ci = ["disabled"], li = ["disabled"], ui = /*#__PURE__*/ t(/* @__PURE__ */ p({
3590
+ }), [["__scopeId", "data-v-de187b7d"]]), ci = { class: "docx-list-btns" }, li = ["disabled"], ui = ["disabled"], di = ["disabled"], fi = ["disabled"], pi = /*#__PURE__*/ e(/* @__PURE__ */ p({
3656
3591
  __name: "ListButtons",
3657
3592
  props: {
3658
3593
  listState: {},
@@ -3676,7 +3611,7 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3676
3611
  "outdent"
3677
3612
  ],
3678
3613
  setup(e) {
3679
- return (t, n) => (b(), l("span", ai, [
3614
+ return (t, n) => (b(), l("span", ci, [
3680
3615
  u("button", {
3681
3616
  type: "button",
3682
3617
  class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.type === "bullet" }]),
@@ -3686,7 +3621,7 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3686
3621
  }, [f(r, {
3687
3622
  name: "format_list_bulleted",
3688
3623
  size: 20
3689
- })], 10, oi),
3624
+ })], 10, li),
3690
3625
  u("button", {
3691
3626
  type: "button",
3692
3627
  class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.type === "numbered" }]),
@@ -3696,7 +3631,7 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3696
3631
  }, [f(r, {
3697
3632
  name: "format_list_numbered",
3698
3633
  size: 20
3699
- })], 10, si),
3634
+ })], 10, ui),
3700
3635
  e.showIndentButtons ? (b(), l(a, { key: 0 }, [u("button", {
3701
3636
  type: "button",
3702
3637
  class: "docx-list-btns__btn",
@@ -3706,7 +3641,7 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3706
3641
  }, [f(r, {
3707
3642
  name: "format_indent_decrease",
3708
3643
  size: 20
3709
- })], 8, ci), u("button", {
3644
+ })], 8, di), u("button", {
3710
3645
  type: "button",
3711
3646
  class: "docx-list-btns__btn",
3712
3647
  disabled: e.disabled,
@@ -3715,9 +3650,68 @@ var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r
3715
3650
  }, [f(r, {
3716
3651
  name: "format_indent_increase",
3717
3652
  size: 20
3718
- })], 8, li)], 64)) : c("", !0)
3653
+ })], 8, fi)], 64)) : c("", !0)
3654
+ ]));
3655
+ }
3656
+ }), [["__scopeId", "data-v-df3a6cfe"]]), mi = /*#__PURE__*/ e(/* @__PURE__ */ p({
3657
+ __name: "StylePicker",
3658
+ props: {
3659
+ value: {},
3660
+ styles: {},
3661
+ disabled: {
3662
+ type: Boolean,
3663
+ default: !1
3664
+ },
3665
+ className: {}
3666
+ },
3667
+ emits: ["change"],
3668
+ setup(e, { emit: t }) {
3669
+ let { Select: n } = i(), r = e, a = t, c = [
3670
+ {
3671
+ styleId: "Normal",
3672
+ name: "Normal text"
3673
+ },
3674
+ {
3675
+ styleId: "Title",
3676
+ name: "Title"
3677
+ },
3678
+ {
3679
+ styleId: "Subtitle",
3680
+ name: "Subtitle"
3681
+ },
3682
+ {
3683
+ styleId: "Heading1",
3684
+ name: "Heading 1"
3685
+ },
3686
+ {
3687
+ styleId: "Heading2",
3688
+ name: "Heading 2"
3689
+ },
3690
+ {
3691
+ styleId: "Heading3",
3692
+ name: "Heading 3"
3693
+ }
3694
+ ], l = o(() => r.styles ?? c), u = o(() => l.value.map((e) => ({
3695
+ value: e.styleId,
3696
+ label: e.name
3697
+ })));
3698
+ function d(e) {
3699
+ a("change", e);
3700
+ }
3701
+ return (t, r) => (b(), s(O(n), {
3702
+ class: g(["docx-style-picker", e.className]),
3703
+ value: e.value ?? "Normal",
3704
+ items: u.value,
3705
+ disabled: e.disabled,
3706
+ "aria-label": "Paragraph style",
3707
+ onChange: d
3708
+ }, null, 8, [
3709
+ "value",
3710
+ "items",
3711
+ "disabled",
3712
+ "class"
3719
3713
  ]));
3720
3714
  }
3721
- }), [["__scopeId", "data-v-7cc21148"]]);
3715
+ }), [["__scopeId", "data-v-44de0ff6"]]);
3722
3716
  //#endregion
3723
- export { he as C, Z as D, oe as E, ge as S, Q as T, Qt as _, Yr as a, Te as b, br as c, Kn as d, Bn as f, $t as g, an as h, $r as i, ur as l, on as m, ii as n, Gr as o, zn as p, ei as r, Sr as s, ui as t, or as u, Jt as v, fe as w, _e as x, It as y };
3717
+ export { Be as C, oe as D, ue as E, Qe as S, fe as T, Qt as _, $r as a, et as b, _r as c, Yn as d, Un as f, nn as g, cn as h, ri as i, lr as l, ln as m, pi as n, Ar as o, Hn as p, si as r, Or as s, mi as t, er as u, Zt as v, he as w, $e as x, Bt as y };