@eigenpal/docx-editor-vue 1.5.0 → 1.6.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 (34) hide show
  1. package/dist/KeyboardShortcutsDialog-Dohz9D39.cjs +1 -0
  2. package/dist/{KeyboardShortcutsDialog-DtuQzPxi.js → KeyboardShortcutsDialog-OPAV0oVm.js} +9 -6
  3. package/dist/{MenuBar-DfQrRpyI.js → MenuBar-BLKoZqG3.js} +644 -540
  4. package/dist/MenuBar-BP-XM0MI.cjs +4 -0
  5. package/dist/{TablePropertiesDialog-BVlqA7s3.cjs → TablePropertiesDialog-B-FVOqkH.cjs} +1 -1
  6. package/dist/{TablePropertiesDialog-D4xs_Xif.js → TablePropertiesDialog-B3oZIIjw.js} +9 -9
  7. package/dist/components/DocxEditor/types.d.ts +8 -0
  8. package/dist/components/Toolbar/presets.d.ts +0 -1
  9. package/dist/components/ui/fontPickerValue.d.ts +1 -0
  10. package/dist/components/ui/fontPickerValue.test.d.ts +1 -0
  11. package/dist/composables/useColorMode.d.ts +8 -0
  12. package/dist/composables/useDocxEditorRefApi.d.ts +4 -0
  13. package/dist/composables/useFormattingActions.d.ts +5 -2
  14. package/dist/composables/useMenuActions.d.ts +2 -0
  15. package/dist/composables/useParagraphStyleOptions.d.ts +18 -0
  16. package/dist/composables/useToolbarDropdowns.d.ts +1 -0
  17. package/dist/composables/useToolbarFontSize.d.ts +15 -0
  18. package/dist/composables.cjs +1 -1
  19. package/dist/composables.js +4 -3
  20. package/dist/dialogs.cjs +1 -1
  21. package/dist/dialogs.js +2 -2
  22. package/dist/docx-editor-vue.css +1 -1
  23. package/dist/index.cjs +3 -3
  24. package/dist/index.js +952 -906
  25. package/dist/plugin-api.cjs +1 -1
  26. package/dist/plugin-api.js +1 -1
  27. package/dist/ui.cjs +2 -2
  28. package/dist/ui.js +220 -197
  29. package/dist/{useDragAutoScroll-BNPB-6SM.js → useDragAutoScroll-B21Ec-Zy.js} +6 -7
  30. package/dist/useDragAutoScroll-BPnc7LEO.cjs +1 -0
  31. package/package.json +4 -4
  32. package/dist/KeyboardShortcutsDialog-DyfvEiK5.cjs +0 -1
  33. package/dist/MenuBar-p9bqtbLg.cjs +0 -4
  34. package/dist/useDragAutoScroll-DCUotwOX.cjs +0 -1
@@ -1,4 +1,4 @@
1
- import { f as e, u as t } from "./KeyboardShortcutsDialog-DtuQzPxi.js";
1
+ import { f as e, u as t } from "./KeyboardShortcutsDialog-OPAV0oVm.js";
2
2
  import { t as n } from "./_plugin-vue_export-helper-B52Kst-M.js";
3
3
  import { t as r } from "./useCommentSidebarItems-DXbF857R.js";
4
4
  import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, nextTick as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, onMounted as _, openBlock as v, reactive as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, unref as T, vModelSelect as E, vModelText as D, watch as O, withCtx as k, withDirectives as A, withKeys as j, withModifiers as M } from "vue";
@@ -7,43 +7,44 @@ import { redoDepth as L, undoDepth as R } from "prosemirror-history";
7
7
  import { extractSelectionContext as ee } from "@eigenpal/docx-editor-core/prosemirror/plugins/selectionTracker";
8
8
  import { clearFormatting as z } from "@eigenpal/docx-editor-core/prosemirror/commands/formatting";
9
9
  import { normalizeFontFamilies as B } from "@eigenpal/docx-editor-core/utils/fontOptions";
10
- import { getTableContext as V } from "@eigenpal/docx-editor-core/prosemirror/extensions/nodes/TableExtension";
11
- import { formatDate as H, getAvatarColor as U, getCommentText as W, getInitials as G, truncateText as K } from "@eigenpal/docx-editor-core/utils/comments";
12
- import { resolveItemPositions as q } from "@eigenpal/docx-editor-core/plugin-api/resolveItemPositions";
13
- import { SIDEBAR_DOCUMENT_SHIFT as J } from "@eigenpal/docx-editor-core/utils/sidebarConstants";
14
- import { pixelsToTwips as te, twipsToPixels as Y } from "@eigenpal/docx-editor-core/utils/units";
10
+ import { getStylePreviewProps as V, resolveParagraphStyleOptions as H } from "@eigenpal/docx-editor-core/utils/stylePreview";
11
+ import { getTableContext as U } from "@eigenpal/docx-editor-core/prosemirror/extensions/nodes/TableExtension";
12
+ import { formatDate as W, getAvatarColor as G, getCommentText as K, getInitials as q, truncateText as J } from "@eigenpal/docx-editor-core/utils/comments";
13
+ import { resolveItemPositions as Y } from "@eigenpal/docx-editor-core/plugin-api/resolveItemPositions";
14
+ import { SIDEBAR_DOCUMENT_SHIFT as X, SIDEBAR_WIDTH as te } from "@eigenpal/docx-editor-core/utils/sidebarConstants";
15
+ import { pixelsToTwips as ne, twipsToPixels as re } from "@eigenpal/docx-editor-core/utils/units";
15
16
  //#region src/components/ui/ColorPicker.vue?vue&type=script&setup=true&lang.ts
16
- var ne = [
17
+ var ie = [
17
18
  "disabled",
18
19
  "title",
19
20
  "aria-label"
20
- ], re = [
21
+ ], ae = [
21
22
  "disabled",
22
23
  "title",
23
24
  "aria-label",
24
25
  "aria-expanded"
25
- ], X = [
26
+ ], oe = [
26
27
  "disabled",
27
28
  "title",
28
29
  "aria-label",
29
30
  "aria-expanded"
30
- ], ie = { class: "docx-color-picker__button-stack" }, Z = ["aria-label"], ae = {
31
+ ], se = { class: "docx-color-picker__button-stack" }, Z = ["aria-label"], ce = {
31
32
  key: 0,
32
33
  class: "docx-color-picker__auto-icon docx-color-picker__auto-icon--none"
33
- }, oe = {
34
+ }, le = {
34
35
  key: 1,
35
36
  class: "docx-color-picker__auto-icon docx-color-picker__auto-icon--auto"
36
- }, se = { class: "docx-color-picker__section-label" }, ce = { class: "docx-color-picker__grid" }, le = [
37
+ }, ue = { class: "docx-color-picker__section-label" }, de = { class: "docx-color-picker__grid" }, fe = [
37
38
  "title",
38
39
  "aria-label",
39
40
  "aria-selected",
40
41
  "onClick"
41
- ], ue = { class: "docx-color-picker__section-label" }, de = { class: "docx-color-picker__grid" }, fe = [
42
+ ], pe = { class: "docx-color-picker__section-label" }, me = { class: "docx-color-picker__grid" }, he = [
42
43
  "title",
43
44
  "aria-label",
44
45
  "aria-selected",
45
46
  "onClick"
46
- ], pe = { class: "docx-color-picker__section-label" }, me = { class: "docx-color-picker__custom" }, he = ["onKeydown"], ge = ["disabled"], _e = /* @__PURE__ */ n(/* @__PURE__ */ f({
47
+ ], ge = { class: "docx-color-picker__section-label" }, _e = { class: "docx-color-picker__custom" }, ve = ["onKeydown"], ye = ["disabled"], be = /* @__PURE__ */ n(/* @__PURE__ */ f({
47
48
  __name: "ColorPicker",
48
49
  props: {
49
50
  mode: {},
@@ -145,37 +146,37 @@ var ne = [
145
146
  left: `${t.left}px`
146
147
  };
147
148
  }
148
- function te() {
149
+ function Y() {
149
150
  o.disabled || (L.value || J(), L.value = !L.value);
150
151
  }
151
- function Y(e, t = !0) {
152
+ function X(e, t = !0) {
152
153
  t && (B.value = e), f("change", e), L.value = !1;
153
154
  }
154
- function _e() {
155
+ function te() {
155
156
  o.disabled || f("change", B.value);
156
157
  }
157
- function ve(e) {
158
+ function ne(e) {
158
159
  if (o.mode === "highlight") {
159
- Y(e.hex);
160
+ X(e.hex);
160
161
  return;
161
162
  }
162
163
  let t = {
163
164
  themeColor: e.themeSlot,
164
165
  rgb: e.hex
165
166
  };
166
- e.tint && (t.themeTint = e.tint), e.shade && (t.themeShade = e.shade), Y(t);
167
- }
168
- function Q(e) {
169
- Y(o.mode === "highlight" ? e : { rgb: e });
167
+ e.tint && (t.themeTint = e.tint), e.shade && (t.themeShade = e.shade), X(t);
170
168
  }
171
- function ye() {
172
- Y(o.mode === "highlight" ? "none" : { auto: !0 }, !1);
169
+ function re(e) {
170
+ X(o.mode === "highlight" ? e : { rgb: e });
173
171
  }
174
172
  function be() {
173
+ X(o.mode === "highlight" ? "none" : { auto: !0 }, !1);
174
+ }
175
+ function xe() {
175
176
  let e = R.value.replace(/^#/, "").toUpperCase();
176
- C(e) && (Y(o.mode === "highlight" ? e : { rgb: e }), R.value = "");
177
+ C(e) && (X(o.mode === "highlight" ? e : { rgb: e }), R.value = "");
177
178
  }
178
- function xe(e) {
179
+ function Q(e) {
179
180
  e.target.tagName !== "INPUT" && e.preventDefault();
180
181
  }
181
182
  function Se(e) {
@@ -198,14 +199,14 @@ var ne = [
198
199
  title: n.title ?? G.value,
199
200
  "aria-label": n.title ?? G.value,
200
201
  onMousedown: r[0] ||= M(() => {}, ["prevent"]),
201
- onClick: _e
202
+ onClick: te
202
203
  }, [d(e, {
203
204
  name: K.value,
204
205
  size: 18
205
206
  }, null, 8, ["name"]), l("span", {
206
207
  class: m(["docx-color-picker__bar", { "is-light": W.value === "transparent" || E(W.value) }]),
207
208
  style: h({ background: W.value === "transparent" ? "#fff" : W.value })
208
- }, null, 6)], 40, ne), l("button", {
209
+ }, null, 6)], 40, ie), l("button", {
209
210
  type: "button",
210
211
  class: m(["docx-color-picker__arrow", { "is-open": L.value }]),
211
212
  disabled: n.disabled,
@@ -214,11 +215,11 @@ var ne = [
214
215
  "aria-haspopup": "true",
215
216
  "aria-expanded": L.value,
216
217
  onMousedown: r[1] ||= M(() => {}, ["prevent"]),
217
- onClick: te
218
+ onClick: Y
218
219
  }, [d(e, {
219
220
  name: "arrow_drop_down",
220
221
  size: 18
221
- })], 42, re)], 2)) : (v(), c("button", {
222
+ })], 42, ae)], 2)) : (v(), c("button", {
222
223
  key: 1,
223
224
  type: "button",
224
225
  class: m(["docx-color-picker__button", { "is-open": L.value }]),
@@ -228,8 +229,8 @@ var ne = [
228
229
  "aria-haspopup": "true",
229
230
  "aria-expanded": L.value,
230
231
  onMousedown: r[2] ||= M(() => {}, ["prevent"]),
231
- onClick: te
232
- }, [l("span", ie, [d(e, {
232
+ onClick: Y
233
+ }, [l("span", se, [d(e, {
233
234
  name: K.value,
234
235
  size: 18
235
236
  }, null, 8, ["name"]), l("span", {
@@ -238,7 +239,7 @@ var ne = [
238
239
  }, null, 6)]), d(e, {
239
240
  name: "arrow_drop_down",
240
241
  size: 14
241
- })], 42, X)), L.value && !n.disabled ? (v(), c("div", {
242
+ })], 42, oe)), L.value && !n.disabled ? (v(), c("div", {
242
243
  key: 2,
243
244
  ref_key: "panelRef",
244
245
  ref: z,
@@ -246,17 +247,17 @@ var ne = [
246
247
  style: h(q.value),
247
248
  role: "dialog",
248
249
  "aria-label": T(p)("colorPicker.ariaLabel", { type: G.value }),
249
- onMousedown: xe
250
+ onMousedown: Q
250
251
  }, [
251
252
  l("button", {
252
253
  type: "button",
253
254
  class: "docx-color-picker__auto",
254
255
  onMousedown: r[3] ||= M(() => {}, ["prevent"]),
255
- onClick: ye
256
- }, [n.mode === "highlight" ? (v(), c("span", ae, [...r[10] ||= [l("span", { class: "docx-color-picker__auto-slash" }, null, -1)]])) : (v(), c("span", oe)), u(" " + w(n.autoLabel ?? (n.mode === "highlight" ? T(p)("colorPicker.noColor") : T(p)("colorPicker.automatic"))), 1)], 32),
256
+ onClick: be
257
+ }, [n.mode === "highlight" ? (v(), c("span", ce, [...r[10] ||= [l("span", { class: "docx-color-picker__auto-slash" }, null, -1)]])) : (v(), c("span", le)), u(" " + w(n.autoLabel ?? (n.mode === "highlight" ? T(p)("colorPicker.noColor") : T(p)("colorPicker.automatic"))), 1)], 32),
257
258
  r[12] ||= l("div", { class: "docx-color-picker__divider" }, null, -1),
258
- l("div", se, w(T(p)("colorPicker.themeColors")), 1),
259
- l("div", ce, [(v(!0), c(i, null, x(H.value, (e) => (v(), c("button", {
259
+ l("div", ue, w(T(p)("colorPicker.themeColors")), 1),
260
+ l("div", de, [(v(!0), c(i, null, x(H.value, (e) => (v(), c("button", {
260
261
  key: e.key,
261
262
  type: "button",
262
263
  class: m(["docx-color-picker__cell", { "is-selected": k(n.value, e.hex) }]),
@@ -265,11 +266,11 @@ var ne = [
265
266
  "aria-label": e.label,
266
267
  "aria-selected": k(n.value, e.hex),
267
268
  onMousedown: r[4] ||= M(() => {}, ["prevent"]),
268
- onClick: (t) => ve(e)
269
- }, null, 46, le))), 128))]),
269
+ onClick: (t) => ne(e)
270
+ }, null, 46, fe))), 128))]),
270
271
  r[13] ||= l("div", { class: "docx-color-picker__divider" }, null, -1),
271
- l("div", ue, w(T(p)("colorPicker.standardColors")), 1),
272
- l("div", de, [(v(), c(i, null, x(y, (e) => l("button", {
272
+ l("div", pe, w(T(p)("colorPicker.standardColors")), 1),
273
+ l("div", me, [(v(), c(i, null, x(y, (e) => l("button", {
273
274
  key: e.hex,
274
275
  type: "button",
275
276
  class: m(["docx-color-picker__cell", { "is-selected": k(n.value, e.hex) }]),
@@ -278,11 +279,11 @@ var ne = [
278
279
  "aria-label": T(p)(e.nameKey),
279
280
  "aria-selected": k(n.value, e.hex),
280
281
  onMousedown: r[5] ||= M(() => {}, ["prevent"]),
281
- onClick: (t) => Q(e.hex)
282
- }, null, 46, fe)), 64))]),
282
+ onClick: (t) => re(e.hex)
283
+ }, null, 46, he)), 64))]),
283
284
  r[14] ||= l("div", { class: "docx-color-picker__divider" }, null, -1),
284
- l("div", pe, w(T(p)("colorPicker.customColor")), 1),
285
- l("div", me, [
285
+ l("div", ge, w(T(p)("colorPicker.customColor")), 1),
286
+ l("div", _e, [
286
287
  r[11] ||= l("span", { class: "docx-color-picker__hash" }, "#", -1),
287
288
  A(l("input", {
288
289
  "onUpdate:modelValue": r[6] ||= (e) => R.value = e,
@@ -292,20 +293,20 @@ var ne = [
292
293
  maxlength: "6",
293
294
  "aria-label": "Custom hex color",
294
295
  onInput: r[7] ||= (e) => R.value = R.value.replace(/[^0-9A-Fa-f]/g, "").slice(0, 6),
295
- onKeydown: j(M(be, ["prevent"]), ["enter"]),
296
+ onKeydown: j(M(xe, ["prevent"]), ["enter"]),
296
297
  onMousedown: r[8] ||= M(() => {}, ["stop"])
297
- }, null, 40, he), [[D, R.value]]),
298
+ }, null, 40, ve), [[D, R.value]]),
298
299
  l("button", {
299
300
  type: "button",
300
301
  class: "docx-color-picker__apply-btn",
301
302
  disabled: !C(R.value),
302
303
  onMousedown: r[9] ||= M(() => {}, ["prevent"]),
303
- onClick: be
304
- }, w(T(p)("common.apply")), 41, ge)
304
+ onClick: xe
305
+ }, w(T(p)("common.apply")), 41, ye)
305
306
  ])
306
307
  ], 44, Z)) : s("", !0)], 6));
307
308
  }
308
- }), [["__scopeId", "data-v-2cbf59ab"]]), ve = 4, Q = /* @__PURE__ */ n(/* @__PURE__ */ f({
309
+ }), [["__scopeId", "data-v-e2472617"]]), xe = 4, Q = /* @__PURE__ */ n(/* @__PURE__ */ f({
309
310
  __name: "Popover",
310
311
  props: {
311
312
  open: { type: Boolean },
@@ -324,7 +325,7 @@ var ne = [
324
325
  let e = i.value;
325
326
  if (!e) return;
326
327
  let t = e.getBoundingClientRect(), r = { position: "fixed" };
327
- n.placement.startsWith("top") ? (r.bottom = `${Math.round(window.innerHeight - t.top + ve)}px`, r.top = "auto") : (r.top = `${Math.round(t.bottom + ve)}px`, r.bottom = "auto"), n.placement.endsWith("right") ? (r.right = `${Math.round(window.innerWidth - t.right)}px`, r.left = "auto") : (r.left = `${Math.round(t.left)}px`, r.right = "auto"), o.value = r;
328
+ n.placement.startsWith("top") ? (r.bottom = `${Math.round(window.innerHeight - t.top + xe)}px`, r.top = "auto") : (r.top = `${Math.round(t.bottom + xe)}px`, r.bottom = "auto"), n.placement.endsWith("right") ? (r.right = `${Math.round(window.innerWidth - t.right)}px`, r.left = "auto") : (r.left = `${Math.round(t.left)}px`, r.right = "auto"), o.value = r;
328
329
  }
329
330
  function u() {
330
331
  r("update:open", !n.open), n.open && r("close");
@@ -372,10 +373,10 @@ var ne = [
372
373
  onMousedown: n[0] ||= M(() => {}, ["stop"])
373
374
  }, [S(t.$slots, "panel", {}, void 0, !0)], 38)) : s("", !0)], 512));
374
375
  }
375
- }), [["__scopeId", "data-v-20a24bb6"]]), ye = ["title", "onClick"], be = {
376
+ }), [["__scopeId", "data-v-5878ce2a"]]), Se = ["title", "onClick"], Ce = {
376
377
  key: 0,
377
378
  class: "editing-mode__label"
378
- }, xe = { class: "editing-mode__panel" }, Se = ["onClick"], Ce = { class: "editing-mode__option-text" }, we = { class: "editing-mode__option-label" }, Te = { class: "editing-mode__option-desc" }, Ee = /* @__PURE__ */ n(/* @__PURE__ */ f({
379
+ }, we = { class: "editing-mode__panel" }, Te = ["onClick"], Ee = { class: "editing-mode__option-text" }, De = { class: "editing-mode__option-label" }, Oe = { class: "editing-mode__option-desc" }, ke = /* @__PURE__ */ n(/* @__PURE__ */ f({
379
380
  __name: "EditingModeDropdown",
380
381
  props: { modelValue: {} },
381
382
  emits: ["update:modelValue"],
@@ -428,13 +429,13 @@ var ne = [
428
429
  name: C.value.icon,
429
430
  size: 18
430
431
  }, null, 8, ["name"]),
431
- S.value ? s("", !0) : (v(), c("span", be, w(T(u)(C.value.labelKey)), 1)),
432
+ S.value ? s("", !0) : (v(), c("span", Ce, w(T(u)(C.value.labelKey)), 1)),
432
433
  d(e, {
433
434
  name: "arrow_drop_down",
434
435
  size: 16
435
436
  })
436
- ], 10, ye)]),
437
- panel: k(() => [l("div", xe, [(v(), c(i, null, x(h, (t) => l("button", {
437
+ ], 10, Se)]),
438
+ panel: k(() => [l("div", we, [(v(), c(i, null, x(h, (t) => l("button", {
438
439
  key: t.value,
439
440
  type: "button",
440
441
  class: "editing-mode__option",
@@ -444,24 +445,24 @@ var ne = [
444
445
  name: t.icon,
445
446
  size: 20
446
447
  }, null, 8, ["name"]),
447
- l("span", Ce, [l("span", we, w(T(u)(t.labelKey)), 1), l("span", Te, w(T(u)(t.descKey)), 1)]),
448
+ l("span", Ee, [l("span", De, w(T(u)(t.labelKey)), 1), l("span", Oe, w(T(u)(t.descKey)), 1)]),
448
449
  t.value === n.modelValue ? (v(), o(e, {
449
450
  key: 0,
450
451
  name: "check",
451
452
  size: 18,
452
453
  class: "editing-mode__check"
453
454
  })) : s("", !0)
454
- ], 8, Se)), 64))])]),
455
+ ], 8, Te)), 64))])]),
455
456
  _: 1
456
457
  }, 8, ["open"]));
457
458
  }
458
- }), [["__scopeId", "data-v-e7645f58"]]), De = [
459
+ }), [["__scopeId", "data-v-00df78da"]]), Ae = [
459
460
  "disabled",
460
461
  "aria-label",
461
462
  "title",
462
463
  "aria-expanded",
463
464
  "onClick"
464
- ], Oe = { class: "docx-icon-grid__panel" }, ke = ["title", "onClick"], Ae = /* @__PURE__ */ n(/* @__PURE__ */ f({
465
+ ], je = { class: "docx-icon-grid__panel" }, Me = ["title", "onClick"], Ne = /* @__PURE__ */ n(/* @__PURE__ */ f({
465
466
  __name: "IconGridDropdown",
466
467
  props: {
467
468
  options: {},
@@ -497,8 +498,8 @@ var ne = [
497
498
  }, null, 8, ["name"]), d(e, {
498
499
  name: "arrow_drop_down",
499
500
  size: 14
500
- })], 10, De)]),
501
- panel: k(() => [l("div", Oe, [(v(!0), c(i, null, x(t.options, (n) => (v(), c("button", {
501
+ })], 10, Ae)]),
502
+ panel: k(() => [l("div", je, [(v(!0), c(i, null, x(t.options, (n) => (v(), c("button", {
502
503
  key: n.value,
503
504
  type: "button",
504
505
  class: m(["docx-icon-grid__option", { "docx-icon-grid__option--active": t.activeValue === n.value }]),
@@ -507,11 +508,11 @@ var ne = [
507
508
  }, [d(e, {
508
509
  name: n.iconName,
509
510
  size: 18
510
- }, null, 8, ["name"])], 10, ke))), 128))])]),
511
+ }, null, 8, ["name"])], 10, Me))), 128))])]),
511
512
  _: 1
512
513
  }, 8, ["open"]));
513
514
  }
514
- }), [["__scopeId", "data-v-435b9662"]]), je = /* @__PURE__ */ f({
515
+ }), [["__scopeId", "data-v-28013428"]]), Pe = /* @__PURE__ */ f({
515
516
  __name: "ImageWrapDropdown",
516
517
  props: {
517
518
  imageContext: {},
@@ -558,7 +559,7 @@ var ne = [
558
559
  let e = n.imageContext;
559
560
  return e.displayMode === "float" && e.cssFloat === "left" ? "wrapRight" : e.displayMode === "float" && e.cssFloat === "right" ? "wrapLeft" : e.wrapType;
560
561
  }), l = a(() => s.value.find((e) => e.value === c.value) ?? s.value[0]);
561
- return (t, n) => (v(), o(Ae, {
562
+ return (t, n) => (v(), o(Ne, {
562
563
  options: s.value,
563
564
  "active-value": c.value,
564
565
  "trigger-icon": l.value.iconName,
@@ -573,7 +574,7 @@ var ne = [
573
574
  "disabled"
574
575
  ]));
575
576
  }
576
- }), Me = /* @__PURE__ */ f({
577
+ }), Fe = /* @__PURE__ */ f({
577
578
  __name: "ImageTransformDropdown",
578
579
  props: { disabled: { type: Boolean } },
579
580
  emits: ["transform"],
@@ -604,7 +605,7 @@ var ne = [
604
605
  label: n(e.labelKey),
605
606
  iconName: e.iconName
606
607
  })));
607
- return (t, r) => (v(), o(Ae, {
608
+ return (t, r) => (v(), o(Ne, {
608
609
  options: i.value,
609
610
  "trigger-icon": "rotate_right",
610
611
  "tooltip-content": T(n)("imageTransform.tooltip"),
@@ -616,7 +617,7 @@ var ne = [
616
617
  "disabled"
617
618
  ]));
618
619
  }
619
- }), Ne = [
620
+ }), Ie = [
620
621
  {
621
622
  name: "Arial",
622
623
  fontFamily: "Arial",
@@ -677,7 +678,7 @@ var ne = [
677
678
  fontFamily: "Consolas",
678
679
  category: "monospace"
679
680
  }
680
- ], Pe = [
681
+ ], Le = [
681
682
  8,
682
683
  9,
683
684
  10,
@@ -692,62 +693,38 @@ var ne = [
692
693
  36,
693
694
  48,
694
695
  72
695
- ], Fe = [
696
+ ], Re = [
696
697
  {
697
698
  id: "Normal",
698
699
  label: "Normal",
699
- nameKey: "styles.normalText",
700
- previewStyle: { fontSize: "13px" }
700
+ nameKey: "styles.normalText"
701
701
  },
702
702
  {
703
703
  id: "Title",
704
704
  label: "Title",
705
- nameKey: "styles.title",
706
- previewStyle: {
707
- fontSize: "20px",
708
- fontWeight: "bold"
709
- }
705
+ nameKey: "styles.title"
710
706
  },
711
707
  {
712
708
  id: "Subtitle",
713
709
  label: "Subtitle",
714
- nameKey: "styles.subtitle",
715
- previewStyle: {
716
- fontSize: "15px",
717
- color: "#6b7280"
718
- }
710
+ nameKey: "styles.subtitle"
719
711
  },
720
712
  {
721
713
  id: "Heading1",
722
714
  label: "Heading 1",
723
- nameKey: "styles.heading1",
724
- previewStyle: {
725
- fontSize: "18px",
726
- fontWeight: "bold",
727
- color: "#4a6c8c"
728
- }
715
+ nameKey: "styles.heading1"
729
716
  },
730
717
  {
731
718
  id: "Heading2",
732
719
  label: "Heading 2",
733
- nameKey: "styles.heading2",
734
- previewStyle: {
735
- fontSize: "16px",
736
- fontWeight: "bold",
737
- color: "#4a6c8c"
738
- }
720
+ nameKey: "styles.heading2"
739
721
  },
740
722
  {
741
723
  id: "Heading3",
742
724
  label: "Heading 3",
743
- nameKey: "styles.heading3",
744
- previewStyle: {
745
- fontSize: "14px",
746
- fontWeight: "bold",
747
- color: "#4a6c8c"
748
- }
725
+ nameKey: "styles.heading3"
749
726
  }
750
- ], Ie = [
727
+ ], ze = [
751
728
  {
752
729
  label: "Single",
753
730
  labelKey: "lineSpacing.single",
@@ -766,7 +743,7 @@ var ne = [
766
743
  labelKey: "lineSpacing.double",
767
744
  value: 480
768
745
  }
769
- ], Le = [
746
+ ], Be = [
770
747
  .5,
771
748
  .75,
772
749
  1,
@@ -776,7 +753,7 @@ var ne = [
776
753
  ];
777
754
  //#endregion
778
755
  //#region src/composables/useToolbarDropdowns.ts
779
- function Re(e) {
756
+ function Ve(e) {
780
757
  let t = b(null), n = b({
781
758
  top: 0,
782
759
  left: 0
@@ -822,30 +799,98 @@ function Re(e) {
822
799
  return _(() => document.addEventListener("mousedown", c)), g(() => document.removeEventListener("mousedown", c)), {
823
800
  openDropdown: t,
824
801
  dropdownMenuStyle: o,
825
- toggleDropdown: s
802
+ toggleDropdown: s,
803
+ recomputeDropdownPos: i
804
+ };
805
+ }
806
+ //#endregion
807
+ //#region src/composables/useToolbarFontSize.ts
808
+ function He(e) {
809
+ let t = b(!1), n = (t) => e.execCommand("setFontSize", t * 2);
810
+ function r() {
811
+ t.value = !1, e.openDropdown.value = "size", e.recomputeDropdownPos("size");
812
+ }
813
+ function i() {
814
+ t.value = !0;
815
+ }
816
+ function a(r) {
817
+ if (t.value) {
818
+ let e = parseFloat(r.target.value);
819
+ isNaN(e) || n(Math.round(Math.min(Math.max(e, 1), 1638) * 2) / 2);
820
+ }
821
+ t.value = !1, e.openDropdown.value = null;
822
+ }
823
+ function o(r) {
824
+ t.value = !1, n(r), e.openDropdown.value = null;
825
+ }
826
+ function s() {
827
+ let t = e.currentFontSize.value;
828
+ n(Le.find((e) => e > t) || t + 1);
829
+ }
830
+ function c() {
831
+ let t = e.currentFontSize.value;
832
+ n([...Le].reverse().find((e) => e < t) || Math.max(1, t - 1));
833
+ }
834
+ return {
835
+ onSizeFocus: r,
836
+ onSizeInput: i,
837
+ commitFontSize: a,
838
+ pickFontSize: o,
839
+ increaseFontSize: s,
840
+ decreaseFontSize: c
841
+ };
842
+ }
843
+ //#endregion
844
+ //#region src/composables/useParagraphStyleOptions.ts
845
+ function Ue(e) {
846
+ let t = a(() => {
847
+ let t = H(e.documentStyles());
848
+ return t.length > 0 ? t.map((t) => {
849
+ let n = Re.find((e) => e.id === t.styleId);
850
+ return {
851
+ id: t.styleId,
852
+ label: n ? e.t(n.nameKey) : t.name,
853
+ previewStyle: V(t)
854
+ };
855
+ }) : Re.map((t) => ({
856
+ id: t.id,
857
+ label: e.t(t.nameKey),
858
+ previewStyle: V({ styleId: t.id })
859
+ }));
860
+ });
861
+ return {
862
+ resolvedParagraphStyles: t,
863
+ currentStyleLabel: a(() => {
864
+ let n = e.currentStyleId() || "Normal", r = t.value.find((e) => e.id === n);
865
+ return r ? r.label : n;
866
+ })
826
867
  };
827
868
  }
828
869
  //#endregion
829
870
  //#region src/components/Toolbar.vue?vue&type=script&setup=true&lang.ts
830
- var ze = {
871
+ var We = {
831
872
  key: 0,
832
873
  class: "basic-toolbar"
833
- }, Be = [
874
+ }, Ge = [
834
875
  "title",
835
876
  "aria-label",
836
877
  "disabled"
837
- ], Ve = [
878
+ ], Ke = [
838
879
  "title",
839
880
  "aria-label",
840
881
  "disabled"
841
- ], He = ["disabled", "title"], Ue = ["title"], We = ["disabled", "title"], Ge = ["onMousedown"], Ke = ["title"], qe = ["onMousedown"], Je = ["title"], Ye = {
882
+ ], qe = ["disabled", "title"], Je = ["aria-expanded", "title"], Ye = ["disabled", "title"], Xe = ["onMousedown"], Ze = ["aria-expanded", "title"], Qe = ["onMousedown"], $e = ["aria-expanded", "title"], et = {
842
883
  key: 0,
843
884
  class: "toolbar-dropdown__group-label"
844
- }, Xe = ["onMousedown"], Ze = ["title"], Qe = ["title"], $e = ["title"], et = ["onMousedown"], tt = ["title", "aria-label"], nt = ["title", "aria-label"], rt = ["title", "aria-label"], it = ["title", "aria-label"], at = ["title", "aria-label"], ot = ["title", "aria-label"], st = ["title", "aria-label"], ct = ["title"], lt = ["title", "aria-label"], ut = ["title", "aria-label"], dt = [
885
+ }, tt = ["onMousedown"], nt = ["title"], rt = [
886
+ "value",
887
+ "title",
888
+ "aria-expanded"
889
+ ], it = ["title"], at = ["onMousedown"], ot = ["title", "aria-label"], st = ["title", "aria-label"], ct = ["title", "aria-label"], lt = ["title", "aria-label"], ut = ["title", "aria-label"], dt = ["title", "aria-label"], ft = ["title", "aria-label"], pt = ["aria-expanded", "title"], mt = ["title"], ht = ["title"], gt = ["title"], _t = ["title"], vt = ["title", "aria-label"], yt = ["title", "aria-label"], bt = [
845
890
  "title",
846
891
  "aria-label",
847
892
  "disabled"
848
- ], ft = ["title", "aria-label"], pt = ["title"], mt = ["onMousedown"], ht = ["title", "aria-label"], gt = ["title", "aria-label"], _t = ["title", "aria-label"], vt = /* @__PURE__ */ n(/* @__PURE__ */ f({
893
+ ], xt = ["title", "aria-label"], St = ["aria-expanded", "title"], Ct = ["onMousedown"], wt = ["title", "aria-label"], Tt = ["title", "aria-label"], Et = ["title", "aria-label"], Dt = /* @__PURE__ */ n(/* @__PURE__ */ f({
849
894
  __name: "Toolbar",
850
895
  props: {
851
896
  view: {},
@@ -860,7 +905,8 @@ var ze = {
860
905
  commentsSidebarOpen: { type: Boolean },
861
906
  imageContext: {},
862
907
  theme: {},
863
- fontFamilies: {}
908
+ fontFamilies: {},
909
+ documentStyles: {}
864
910
  },
865
911
  emits: [
866
912
  "find-replace",
@@ -883,14 +929,14 @@ var ze = {
883
929
  "image-transform"
884
930
  ],
885
931
  setup(n, { emit: r }) {
886
- let f = n, { t: p } = t(), g = r, _ = a(() => f.zoomPercent ?? 100), y = a(() => f.isMinZoom ?? !1), C = a(() => f.isMaxZoom ?? !1), E = a(() => f.zoomPresets ?? Le), D = a(() => f.showZoomControl ?? !0), O = b(null), k = b(null), A = b(null), j = b(null), N = b(null), P = b(null), { openDropdown: F, dropdownMenuStyle: I, toggleDropdown: V } = Re({
887
- zoom: P,
932
+ let f = n, { t: p } = t(), g = r, _ = a(() => f.zoomPercent ?? 100), y = a(() => f.isMinZoom ?? !1), C = a(() => f.isMaxZoom ?? !1), E = a(() => f.zoomPresets ?? Be), D = a(() => f.showZoomControl ?? !0), O = b(null), k = b(null), A = b(null), N = b(null), P = b(null), F = b(null), { openDropdown: I, dropdownMenuStyle: V, toggleDropdown: H, recomputeDropdownPos: U } = Ve({
933
+ zoom: F,
888
934
  style: O,
889
935
  font: k,
890
936
  size: A,
891
- align: j,
892
- spacing: N
893
- }), H = a(() => {
937
+ align: N,
938
+ spacing: P
939
+ }), W = a(() => {
894
940
  f.stateTick;
895
941
  let e = f.view;
896
942
  return e ? ee(e.state) : {
@@ -905,55 +951,56 @@ var ze = {
905
951
  inInsertion: !1,
906
952
  inDeletion: !1
907
953
  };
908
- }), U = a(() => {
909
- let e = H.value.textFormatting.fontFamily;
954
+ }), G = a(() => {
955
+ let e = W.value.textFormatting.fontFamily;
910
956
  return e?.ascii || e?.hAnsi || "Arial";
911
- }), W = a(() => {
912
- let e = H.value.textFormatting.fontSize;
957
+ }), K = a(() => {
958
+ let e = W.value.textFormatting.fontSize;
913
959
  return e ? e / 2 : 11;
914
- }), G = a(() => H.value.paragraphFormatting.alignment || "left"), K = a(() => {
915
- switch (G.value) {
960
+ }), q = a(() => W.value.paragraphFormatting.alignment || "left"), J = a(() => {
961
+ switch (q.value) {
916
962
  case "center": return "format_align_center";
917
963
  case "right": return "format_align_right";
918
964
  case "both": return "format_align_justify";
919
965
  default: return "format_align_left";
920
966
  }
921
- }), q = a(() => {
922
- let e = H.value.paragraphFormatting.styleId || "Normal", t = Fe.find((t) => t.id === e);
923
- return t ? p(t.nameKey) : e;
924
- }), J = a(() => {
967
+ }), { resolvedParagraphStyles: Y, currentStyleLabel: X } = Ue({
968
+ documentStyles: () => f.documentStyles,
969
+ currentStyleId: () => W.value.paragraphFormatting.styleId || "Normal",
970
+ t: p
971
+ }), te = a(() => {
925
972
  f.stateTick;
926
973
  let e = f.view;
927
974
  return e ? R(e.state) > 0 : !1;
928
- }), te = a(() => {
975
+ }), ne = a(() => {
929
976
  f.stateTick;
930
977
  let e = f.view;
931
978
  return e ? L(e.state) > 0 : !1;
932
- }), Y = a(() => {
933
- let e = H.value, t = e.inList && (e.listLevel ?? 0) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
979
+ }), re = a(() => {
980
+ let e = W.value, t = e.inList && (e.listLevel ?? 0) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
934
981
  return t || n;
935
- }), ne = a(() => {
936
- let e = H.value.textFormatting.color?.rgb;
982
+ }), ie = a(() => {
983
+ let e = W.value.textFormatting.color?.rgb;
937
984
  return e ? e.replace(/^#/, "").toUpperCase() : void 0;
938
- }), re = a(() => {
939
- let e = H.value.textFormatting.highlight;
985
+ }), ae = a(() => {
986
+ let e = W.value.textFormatting.highlight;
940
987
  if (!(!e || e === "none")) return e.replace(/^#/, "").toUpperCase();
941
- }), X = a(() => B(f.fontFamilies) ?? Ne), ie = a(() => [
988
+ }), oe = a(() => B(f.fontFamilies) ?? Ie), se = a(() => [
942
989
  {
943
990
  label: p("font.sansSerif"),
944
- fonts: X.value.filter((e) => e.category === "sans-serif")
991
+ fonts: oe.value.filter((e) => e.category === "sans-serif")
945
992
  },
946
993
  {
947
994
  label: p("font.serif"),
948
- fonts: X.value.filter((e) => e.category === "serif")
995
+ fonts: oe.value.filter((e) => e.category === "serif")
949
996
  },
950
997
  {
951
998
  label: p("font.monospace"),
952
- fonts: X.value.filter((e) => e.category === "monospace")
999
+ fonts: oe.value.filter((e) => e.category === "monospace")
953
1000
  },
954
1001
  {
955
1002
  label: p("font.other"),
956
- fonts: X.value.filter((e) => !e.category || e.category === "other")
1003
+ fonts: oe.value.filter((e) => !e.category || e.category === "other")
957
1004
  }
958
1005
  ]);
959
1006
  function Z(e, ...t) {
@@ -964,139 +1011,143 @@ var ze = {
964
1011
  console.warn("[Toolbar] command not found:", e);
965
1012
  return;
966
1013
  }
967
- r(...t)(n.state, (e) => n.dispatch(e), n), n.hasFocus() || n.focus(), F.value = null;
1014
+ r(...t)(n.state, (e) => n.dispatch(e), n), n.hasFocus() || n.focus(), I.value = null;
968
1015
  }
969
- function ae(e) {
1016
+ function ce(e) {
970
1017
  Z("setFontFamily", e);
971
1018
  }
972
- function oe(e) {
973
- Z("setFontSize", e * 2);
974
- }
975
- function se() {
976
- let e = W.value;
977
- oe(Pe.find((t) => t > e) || e + 2);
978
- }
979
- function ce() {
980
- let e = W.value;
981
- oe([...Pe].reverse().find((t) => t < e) || Math.max(1, e - 2));
982
- }
983
- function le(e) {
1019
+ let { onSizeFocus: le, onSizeInput: ue, commitFontSize: de, pickFontSize: fe, increaseFontSize: pe, decreaseFontSize: me } = He({
1020
+ currentFontSize: K,
1021
+ openDropdown: I,
1022
+ recomputeDropdownPos: U,
1023
+ execCommand: Z
1024
+ });
1025
+ function he(e) {
984
1026
  if (typeof e == "object" && e.auto) {
985
1027
  Z("clearTextColor");
986
1028
  return;
987
1029
  }
988
1030
  Z("setTextColor", typeof e == "string" ? { rgb: e } : e);
989
1031
  }
990
- function ue() {
1032
+ function ge() {
991
1033
  let e = f.view;
992
1034
  e && (z(e.state, (t) => e.dispatch(t), e), e.hasFocus() || e.focus());
993
1035
  }
994
- function de(e) {
1036
+ function _e(e) {
995
1037
  Z("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
996
1038
  }
997
- function fe(e) {
998
- g("apply-style", e), F.value = null;
1039
+ function ve(e) {
1040
+ g("apply-style", e), I.value = null;
999
1041
  }
1000
- function pe(e) {
1042
+ function ye(e) {
1001
1043
  Z("setLineSpacing", e);
1002
1044
  }
1003
- function me(e) {
1004
- let t = H.value.paragraphFormatting.lineSpacing;
1045
+ function xe(e) {
1046
+ let t = W.value.paragraphFormatting.lineSpacing;
1005
1047
  return t ? Math.abs(t - e) < 10 : e === 240;
1006
1048
  }
1007
- return (t, r) => n.view ? (v(), c("div", ze, [
1049
+ return (t, r) => n.view ? (v(), c("div", We, [
1008
1050
  l("button", {
1009
1051
  title: T(p)("formattingBar.undoShortcut"),
1010
1052
  "aria-label": T(p)("formattingBar.undo"),
1011
- disabled: !J.value,
1053
+ disabled: !te.value,
1012
1054
  onMousedown: r[0] ||= M((e) => Z("undo"), ["prevent"])
1013
- }, [d(e, { name: "undo" })], 40, Be),
1055
+ }, [d(e, { name: "undo" })], 40, Ge),
1014
1056
  l("button", {
1015
1057
  title: T(p)("formattingBar.redoShortcut"),
1016
1058
  "aria-label": T(p)("formattingBar.redo"),
1017
- disabled: !te.value,
1059
+ disabled: !ne.value,
1018
1060
  onMousedown: r[1] ||= M((e) => Z("redo"), ["prevent"])
1019
- }, [d(e, { name: "redo" })], 40, Ve),
1020
- r[31] ||= l("span", { class: "divider" }, null, -1),
1061
+ }, [d(e, { name: "redo" })], 40, Ke),
1062
+ r[39] ||= l("span", { class: "divider" }, null, -1),
1021
1063
  D.value ? (v(), c("div", {
1022
1064
  key: 0,
1023
1065
  class: "toolbar-dropdown zoom-group",
1024
1066
  ref_key: "zoomDropdownRef",
1025
- ref: P
1067
+ ref: F
1026
1068
  }, [
1027
1069
  l("button", {
1028
1070
  class: "size-btn",
1029
1071
  onMousedown: r[2] ||= M((e) => t.$emit("zoom-out"), ["prevent"]),
1030
1072
  disabled: y.value,
1031
1073
  title: T(p)("zoom.zoomOut")
1032
- }, " − ", 40, He),
1074
+ }, " − ", 40, qe),
1033
1075
  l("button", {
1034
1076
  class: "toolbar-dropdown__trigger zoom-trigger",
1035
- onMousedown: r[3] ||= M((e) => T(V)("zoom"), ["prevent"]),
1077
+ onMousedown: r[3] ||= M((e) => T(H)("zoom"), ["prevent"]),
1078
+ "aria-expanded": T(I) === "zoom",
1079
+ "aria-haspopup": "listbox",
1036
1080
  title: T(p)("zoom.zoomLevel")
1037
- }, w(_.value) + "% ", 41, Ue),
1081
+ }, [u(w(_.value) + "% ", 1), d(e, {
1082
+ class: "chevron",
1083
+ name: "arrow_drop_down",
1084
+ size: 16
1085
+ })], 40, Je),
1038
1086
  l("button", {
1039
1087
  class: "size-btn",
1040
1088
  onMousedown: r[4] ||= M((e) => t.$emit("zoom-in"), ["prevent"]),
1041
1089
  disabled: C.value,
1042
1090
  title: T(p)("zoom.zoomIn")
1043
- }, " + ", 40, We),
1044
- T(F) === "zoom" ? (v(), c("div", {
1091
+ }, " + ", 40, Ye),
1092
+ T(I) === "zoom" ? (v(), c("div", {
1045
1093
  key: 0,
1046
- style: h(T(I)),
1094
+ style: h(T(V)),
1047
1095
  class: "toolbar-dropdown__menu zoom-menu"
1048
1096
  }, [(v(!0), c(i, null, x(E.value, (e) => (v(), c("button", {
1049
1097
  key: e,
1050
1098
  class: m(["toolbar-dropdown__item", { active: _.value === Math.round(e * 100) }]),
1051
1099
  onMousedown: M((n) => t.$emit("zoom-set", e), ["prevent"])
1052
- }, w(Math.round(e * 100)) + "% ", 43, Ge))), 128))], 4)) : s("", !0)
1100
+ }, w(Math.round(e * 100)) + "% ", 43, Xe))), 128))], 4)) : s("", !0)
1053
1101
  ], 512)) : s("", !0),
1054
- r[32] ||= l("span", { class: "divider" }, null, -1),
1102
+ r[40] ||= l("span", { class: "divider" }, null, -1),
1055
1103
  l("div", {
1056
1104
  class: "toolbar-dropdown",
1057
1105
  ref_key: "styleDropdownRef",
1058
1106
  ref: O
1059
1107
  }, [l("button", {
1060
1108
  class: "toolbar-dropdown__trigger style-trigger",
1061
- onMousedown: r[5] ||= M((e) => T(V)("style"), ["prevent"]),
1109
+ onMousedown: r[5] ||= M((e) => T(H)("style"), ["prevent"]),
1110
+ "aria-expanded": T(I) === "style",
1111
+ "aria-haspopup": "listbox",
1062
1112
  title: T(p)("styles.selectAriaLabel")
1063
- }, [u(w(q.value) + " ", 1), d(e, {
1113
+ }, [u(w(T(X)) + " ", 1), d(e, {
1064
1114
  class: "chevron",
1065
1115
  name: "arrow_drop_down",
1066
1116
  size: 16
1067
- })], 40, Ke), T(F) === "style" ? (v(), c("div", {
1117
+ })], 40, Ze), T(I) === "style" ? (v(), c("div", {
1068
1118
  key: 0,
1069
- style: h(T(I)),
1119
+ style: h(T(V)),
1070
1120
  class: "toolbar-dropdown__menu style-menu"
1071
- }, [(v(!0), c(i, null, x(T(Fe), (e) => (v(), c("button", {
1121
+ }, [(v(!0), c(i, null, x(T(Y), (e) => (v(), c("button", {
1072
1122
  key: e.id,
1073
- class: m(["toolbar-dropdown__item", { active: (H.value.paragraphFormatting.styleId || "Normal") === e.id }]),
1074
- style: h(e.previewStyle),
1075
- onMousedown: M((t) => fe(e.id), ["prevent"])
1076
- }, w(T(p)(e.nameKey)), 47, qe))), 128))], 4)) : s("", !0)], 512),
1077
- r[33] ||= l("span", { class: "divider" }, null, -1),
1123
+ class: m(["toolbar-dropdown__item", { active: (W.value.paragraphFormatting.styleId || "Normal") === e.id }]),
1124
+ onMousedown: M((t) => ve(e.id), ["prevent"])
1125
+ }, [l("span", { style: h(e.previewStyle) }, w(e.label), 5)], 42, Qe))), 128))], 4)) : s("", !0)], 512),
1126
+ r[41] ||= l("span", { class: "divider" }, null, -1),
1078
1127
  l("div", {
1079
1128
  class: "toolbar-dropdown",
1080
1129
  ref_key: "fontDropdownRef",
1081
1130
  ref: k
1082
1131
  }, [l("button", {
1083
1132
  class: "toolbar-dropdown__trigger font-trigger",
1084
- onMousedown: r[6] ||= M((e) => T(V)("font"), ["prevent"]),
1133
+ onMousedown: r[6] ||= M((e) => T(H)("font"), ["prevent"]),
1134
+ "aria-expanded": T(I) === "font",
1135
+ "aria-haspopup": "listbox",
1085
1136
  title: T(p)("font.selectAriaLabel")
1086
- }, [u(w(U.value) + " ", 1), d(e, {
1137
+ }, [u(w(G.value) + " ", 1), d(e, {
1087
1138
  class: "chevron",
1088
1139
  name: "arrow_drop_down",
1089
1140
  size: 16
1090
- })], 40, Je), T(F) === "font" ? (v(), c("div", {
1141
+ })], 40, $e), T(I) === "font" ? (v(), c("div", {
1091
1142
  key: 0,
1092
- style: h(T(I)),
1143
+ style: h(T(V)),
1093
1144
  class: "toolbar-dropdown__menu font-menu"
1094
- }, [(v(!0), c(i, null, x(ie.value, (e) => (v(), c(i, { key: e.label }, [e.fonts.length > 0 ? (v(), c("div", Ye, w(e.label), 1)) : s("", !0), (v(!0), c(i, null, x(e.fonts, (e) => (v(), c("button", {
1145
+ }, [(v(!0), c(i, null, x(se.value, (e) => (v(), c(i, { key: e.label }, [e.fonts.length > 0 ? (v(), c("div", et, w(e.label), 1)) : s("", !0), (v(!0), c(i, null, x(e.fonts, (e) => (v(), c("button", {
1095
1146
  key: e.name,
1096
- class: m(["toolbar-dropdown__item", { active: U.value === e.name }]),
1147
+ class: m(["toolbar-dropdown__item", { active: G.value === e.name }]),
1097
1148
  style: h({ fontFamily: e.fontFamily }),
1098
- onMousedown: M((t) => ae(e.name), ["prevent"])
1099
- }, w(e.name), 47, Xe))), 128))], 64))), 128))], 4)) : s("", !0)], 512),
1149
+ onMousedown: M((t) => ce(e.name), ["prevent"])
1150
+ }, w(e.name), 47, tt))), 128))], 64))), 128))], 4)) : s("", !0)], 512),
1100
1151
  l("div", {
1101
1152
  class: "toolbar-dropdown font-size-group",
1102
1153
  ref_key: "sizeDropdownRef",
@@ -1104,218 +1155,238 @@ var ze = {
1104
1155
  }, [
1105
1156
  l("button", {
1106
1157
  class: "size-btn",
1107
- onMousedown: M(ce, ["prevent"]),
1158
+ onMousedown: r[7] ||= M((...e) => T(me) && T(me)(...e), ["prevent"]),
1108
1159
  title: T(p)("fontSize.decrease")
1109
- }, " − ", 40, Ze),
1110
- l("button", {
1111
- class: "toolbar-dropdown__trigger size-trigger",
1112
- onMousedown: r[7] ||= M((e) => T(V)("size"), ["prevent"]),
1113
- title: T(p)("fontSize.label")
1114
- }, w(W.value), 41, Qe),
1160
+ }, " − ", 40, nt),
1161
+ l("input", {
1162
+ class: "size-trigger size-input",
1163
+ type: "text",
1164
+ value: K.value,
1165
+ title: T(p)("fontSize.label"),
1166
+ onMousedown: r[8] ||= M(() => {}, ["stop"]),
1167
+ onFocus: r[9] ||= (...e) => T(le) && T(le)(...e),
1168
+ "aria-expanded": T(I) === "size",
1169
+ "aria-haspopup": "listbox",
1170
+ onInput: r[10] ||= (...e) => T(ue) && T(ue)(...e),
1171
+ onKeydown: [
1172
+ r[11] ||= j(M((e) => T(pe)(), ["prevent", "stop"]), ["up"]),
1173
+ r[12] ||= j(M((e) => T(me)(), ["prevent", "stop"]), ["down"]),
1174
+ r[13] ||= j(M((e) => T(de)(e), ["prevent"]), ["enter"])
1175
+ ],
1176
+ onBlur: r[14] ||= (e) => T(de)(e)
1177
+ }, null, 40, rt),
1115
1178
  l("button", {
1116
1179
  class: "size-btn",
1117
- onMousedown: M(se, ["prevent"]),
1180
+ onMousedown: r[15] ||= M((...e) => T(pe) && T(pe)(...e), ["prevent"]),
1118
1181
  title: T(p)("fontSize.increase")
1119
- }, " + ", 40, $e),
1120
- T(F) === "size" ? (v(), c("div", {
1182
+ }, " + ", 40, it),
1183
+ T(I) === "size" ? (v(), c("div", {
1121
1184
  key: 0,
1122
- style: h(T(I)),
1185
+ style: h(T(V)),
1123
1186
  class: "toolbar-dropdown__menu size-menu"
1124
- }, [(v(!0), c(i, null, x(T(Pe), (e) => (v(), c("button", {
1187
+ }, [(v(!0), c(i, null, x(T(Le), (e) => (v(), c("button", {
1125
1188
  key: e,
1126
- class: m(["toolbar-dropdown__item", { active: W.value === e }]),
1127
- onMousedown: M((t) => oe(e), ["prevent"])
1128
- }, w(e), 43, et))), 128))], 4)) : s("", !0)
1189
+ class: m(["toolbar-dropdown__item", { active: K.value === e }]),
1190
+ onMousedown: M((t) => T(fe)(e), ["prevent"])
1191
+ }, w(e), 43, at))), 128))], 4)) : s("", !0)
1129
1192
  ], 512),
1130
- r[34] ||= l("span", { class: "divider" }, null, -1),
1193
+ r[42] ||= l("span", { class: "divider" }, null, -1),
1131
1194
  l("button", {
1132
1195
  title: T(p)("formattingBar.boldShortcut"),
1133
1196
  "aria-label": T(p)("formattingBar.bold"),
1134
- class: m({ active: H.value.textFormatting.bold }),
1135
- onMousedown: r[8] ||= M((e) => Z("toggleBold"), ["prevent"])
1136
- }, [d(e, { name: "format_bold" })], 42, tt),
1197
+ class: m({ active: W.value.textFormatting.bold }),
1198
+ onMousedown: r[16] ||= M((e) => Z("toggleBold"), ["prevent"])
1199
+ }, [d(e, { name: "format_bold" })], 42, ot),
1137
1200
  l("button", {
1138
1201
  title: T(p)("formattingBar.italicShortcut"),
1139
1202
  "aria-label": T(p)("formattingBar.italic"),
1140
- class: m({ active: H.value.textFormatting.italic }),
1141
- onMousedown: r[9] ||= M((e) => Z("toggleItalic"), ["prevent"])
1142
- }, [d(e, { name: "format_italic" })], 42, nt),
1203
+ class: m({ active: W.value.textFormatting.italic }),
1204
+ onMousedown: r[17] ||= M((e) => Z("toggleItalic"), ["prevent"])
1205
+ }, [d(e, { name: "format_italic" })], 42, st),
1143
1206
  l("button", {
1144
1207
  title: T(p)("formattingBar.underlineShortcut"),
1145
1208
  "aria-label": T(p)("formattingBar.underline"),
1146
- class: m({ active: !!H.value.textFormatting.underline }),
1147
- onMousedown: r[10] ||= M((e) => Z("toggleUnderline"), ["prevent"])
1148
- }, [d(e, { name: "format_underlined" })], 42, rt),
1209
+ class: m({ active: !!W.value.textFormatting.underline }),
1210
+ onMousedown: r[18] ||= M((e) => Z("toggleUnderline"), ["prevent"])
1211
+ }, [d(e, { name: "format_underlined" })], 42, ct),
1149
1212
  l("button", {
1150
1213
  title: T(p)("formattingBar.strikethrough"),
1151
1214
  "aria-label": T(p)("formattingBar.strikethrough"),
1152
- class: m({ active: H.value.textFormatting.strike }),
1153
- onMousedown: r[11] ||= M((e) => Z("toggleStrike"), ["prevent"])
1154
- }, [d(e, { name: "strikethrough_s" })], 42, it),
1155
- d(_e, {
1215
+ class: m({ active: W.value.textFormatting.strike }),
1216
+ onMousedown: r[19] ||= M((e) => Z("toggleStrike"), ["prevent"])
1217
+ }, [d(e, { name: "strikethrough_s" })], 42, lt),
1218
+ d(be, {
1156
1219
  mode: "text",
1157
- value: ne.value,
1220
+ value: ie.value,
1158
1221
  theme: n.theme ?? null,
1159
- onChange: le
1222
+ onChange: he
1160
1223
  }, null, 8, ["value", "theme"]),
1161
- d(_e, {
1224
+ d(be, {
1162
1225
  mode: "highlight",
1163
- value: re.value,
1226
+ value: ae.value,
1164
1227
  theme: n.theme ?? null,
1165
- onChange: de
1228
+ onChange: _e
1166
1229
  }, null, 8, ["value", "theme"]),
1167
1230
  l("button", {
1168
1231
  title: T(p)("formattingBar.insertLinkShortcut"),
1169
1232
  "aria-label": T(p)("formattingBar.insertLink"),
1170
- onMousedown: r[12] ||= M((e) => t.$emit("insert-link"), ["prevent"])
1171
- }, [d(e, { name: "link" })], 40, at),
1233
+ onMousedown: r[20] ||= M((e) => t.$emit("insert-link"), ["prevent"])
1234
+ }, [d(e, { name: "link" })], 40, ut),
1172
1235
  l("button", {
1173
1236
  title: T(p)("formattingBar.superscriptShortcut"),
1174
1237
  "aria-label": T(p)("formattingBar.superscript"),
1175
- class: m({ active: H.value.textFormatting.vertAlign === "superscript" }),
1176
- onMousedown: r[13] ||= M((e) => Z("toggleSuperscript"), ["prevent"])
1177
- }, [d(e, { name: "superscript" })], 42, ot),
1238
+ class: m({ active: W.value.textFormatting.vertAlign === "superscript" }),
1239
+ onMousedown: r[21] ||= M((e) => Z("toggleSuperscript"), ["prevent"])
1240
+ }, [d(e, { name: "superscript" })], 42, dt),
1178
1241
  l("button", {
1179
1242
  title: T(p)("formattingBar.subscriptShortcut"),
1180
1243
  "aria-label": T(p)("formattingBar.subscript"),
1181
- class: m({ active: H.value.textFormatting.vertAlign === "subscript" }),
1182
- onMousedown: r[14] ||= M((e) => Z("toggleSubscript"), ["prevent"])
1183
- }, [d(e, { name: "subscript" })], 42, st),
1184
- r[35] ||= l("span", { class: "divider" }, null, -1),
1244
+ class: m({ active: W.value.textFormatting.vertAlign === "subscript" }),
1245
+ onMousedown: r[22] ||= M((e) => Z("toggleSubscript"), ["prevent"])
1246
+ }, [d(e, { name: "subscript" })], 42, ft),
1247
+ r[43] ||= l("span", { class: "divider" }, null, -1),
1185
1248
  l("div", {
1186
1249
  class: "toolbar-dropdown",
1187
1250
  ref_key: "alignDropdownRef",
1188
- ref: j
1251
+ ref: N
1189
1252
  }, [l("button", {
1190
1253
  class: "toolbar-dropdown__trigger align-trigger",
1191
- onMousedown: r[15] ||= M((e) => T(V)("align"), ["prevent"]),
1254
+ onMousedown: r[23] ||= M((e) => T(H)("align"), ["prevent"]),
1255
+ "aria-expanded": T(I) === "align",
1256
+ "aria-haspopup": "listbox",
1192
1257
  title: T(p)("formattingBar.groups.alignment")
1193
- }, [d(e, { name: K.value }, null, 8, ["name"]), d(e, {
1258
+ }, [d(e, { name: J.value }, null, 8, ["name"]), d(e, {
1194
1259
  class: "chevron",
1195
1260
  name: "arrow_drop_down",
1196
1261
  size: 16
1197
- })], 40, ct), T(F) === "align" ? (v(), c("div", {
1262
+ })], 40, pt), T(I) === "align" ? (v(), c("div", {
1198
1263
  key: 0,
1199
- style: h(T(I)),
1200
- class: "toolbar-dropdown__menu align-menu"
1264
+ style: h(T(V)),
1265
+ class: "toolbar-dropdown__menu align-strip"
1201
1266
  }, [
1202
1267
  l("button", {
1203
- class: m(["toolbar-dropdown__item dropdown-item--icon", { active: G.value === "left" }]),
1204
- onMousedown: r[16] ||= M((e) => {
1205
- Z("alignLeft"), F.value = null;
1268
+ class: m(["align-strip__btn", { active: q.value === "left" }]),
1269
+ title: `${T(p)("alignment.alignLeft")} (${T(p)("alignment.alignLeftShortcut")})`,
1270
+ onMousedown: r[24] ||= M((e) => {
1271
+ Z("alignLeft"), I.value = null;
1206
1272
  }, ["prevent"])
1207
1273
  }, [d(e, {
1208
1274
  name: "format_align_left",
1209
1275
  size: 18
1210
- }), u(" " + w(T(p)("alignment.alignLeft")) + " (" + w(T(p)("alignment.alignLeftShortcut")) + ") ", 1)], 34),
1276
+ })], 42, mt),
1211
1277
  l("button", {
1212
- class: m(["toolbar-dropdown__item dropdown-item--icon", { active: G.value === "center" }]),
1213
- onMousedown: r[17] ||= M((e) => {
1214
- Z("alignCenter"), F.value = null;
1278
+ class: m(["align-strip__btn", { active: q.value === "center" }]),
1279
+ title: `${T(p)("alignment.center")} (${T(p)("alignment.centerShortcut")})`,
1280
+ onMousedown: r[25] ||= M((e) => {
1281
+ Z("alignCenter"), I.value = null;
1215
1282
  }, ["prevent"])
1216
1283
  }, [d(e, {
1217
1284
  name: "format_align_center",
1218
1285
  size: 18
1219
- }), u(" " + w(T(p)("alignment.center")) + " (" + w(T(p)("alignment.centerShortcut")) + ") ", 1)], 34),
1286
+ })], 42, ht),
1220
1287
  l("button", {
1221
- class: m(["toolbar-dropdown__item dropdown-item--icon", { active: G.value === "right" }]),
1222
- onMousedown: r[18] ||= M((e) => {
1223
- Z("alignRight"), F.value = null;
1288
+ class: m(["align-strip__btn", { active: q.value === "right" }]),
1289
+ title: `${T(p)("alignment.alignRight")} (${T(p)("alignment.alignRightShortcut")})`,
1290
+ onMousedown: r[26] ||= M((e) => {
1291
+ Z("alignRight"), I.value = null;
1224
1292
  }, ["prevent"])
1225
1293
  }, [d(e, {
1226
1294
  name: "format_align_right",
1227
1295
  size: 18
1228
- }), u(" " + w(T(p)("alignment.alignRight")) + " (" + w(T(p)("alignment.alignRightShortcut")) + ") ", 1)], 34),
1296
+ })], 42, gt),
1229
1297
  l("button", {
1230
- class: m(["toolbar-dropdown__item dropdown-item--icon", { active: G.value === "both" }]),
1231
- onMousedown: r[19] ||= M((e) => {
1232
- Z("alignJustify"), F.value = null;
1298
+ class: m(["align-strip__btn", { active: q.value === "both" }]),
1299
+ title: `${T(p)("alignment.justify")} (${T(p)("alignment.justifyShortcut")})`,
1300
+ onMousedown: r[27] ||= M((e) => {
1301
+ Z("alignJustify"), I.value = null;
1233
1302
  }, ["prevent"])
1234
1303
  }, [d(e, {
1235
1304
  name: "format_align_justify",
1236
1305
  size: 18
1237
- }), u(" " + w(T(p)("alignment.justify")) + " (" + w(T(p)("alignment.justifyShortcut")) + ") ", 1)], 34)
1306
+ })], 42, _t)
1238
1307
  ], 4)) : s("", !0)], 512),
1239
1308
  l("button", {
1240
1309
  title: T(p)("lists.bulletList"),
1241
1310
  "aria-label": T(p)("lists.bulletList"),
1242
- class: m({ active: H.value.inList && H.value.listType === "bullet" }),
1243
- onMousedown: r[20] ||= M((e) => Z("toggleBulletList"), ["prevent"])
1244
- }, [d(e, { name: "format_list_bulleted" })], 42, lt),
1311
+ class: m({ active: W.value.inList && W.value.listType === "bullet" }),
1312
+ onMousedown: r[28] ||= M((e) => Z("toggleBulletList"), ["prevent"])
1313
+ }, [d(e, { name: "format_list_bulleted" })], 42, vt),
1245
1314
  l("button", {
1246
1315
  title: T(p)("lists.numberedList"),
1247
1316
  "aria-label": T(p)("lists.numberedList"),
1248
- class: m({ active: H.value.inList && H.value.listType === "numbered" }),
1249
- onMousedown: r[21] ||= M((e) => Z("toggleNumberedList"), ["prevent"])
1250
- }, [d(e, { name: "format_list_numbered" })], 42, ut),
1317
+ class: m({ active: W.value.inList && W.value.listType === "numbered" }),
1318
+ onMousedown: r[29] ||= M((e) => Z("toggleNumberedList"), ["prevent"])
1319
+ }, [d(e, { name: "format_list_numbered" })], 42, yt),
1251
1320
  l("button", {
1252
1321
  title: T(p)("lists.decreaseIndent"),
1253
1322
  "aria-label": T(p)("lists.decreaseIndent"),
1254
- disabled: !Y.value,
1255
- onMousedown: r[22] ||= M((e) => Z("outdent"), ["prevent"])
1256
- }, [d(e, { name: "format_indent_decrease" })], 40, dt),
1323
+ disabled: !re.value,
1324
+ onMousedown: r[30] ||= M((e) => Z("outdent"), ["prevent"])
1325
+ }, [d(e, { name: "format_indent_decrease" })], 40, bt),
1257
1326
  l("button", {
1258
1327
  title: T(p)("lists.increaseIndent"),
1259
1328
  "aria-label": T(p)("lists.increaseIndent"),
1260
- onMousedown: r[23] ||= M((e) => Z("indent"), ["prevent"])
1261
- }, [d(e, { name: "format_indent_increase" })], 40, ft),
1329
+ onMousedown: r[31] ||= M((e) => Z("indent"), ["prevent"])
1330
+ }, [d(e, { name: "format_indent_increase" })], 40, xt),
1262
1331
  l("div", {
1263
1332
  class: "toolbar-dropdown",
1264
1333
  ref_key: "spacingDropdownRef",
1265
- ref: N
1334
+ ref: P
1266
1335
  }, [l("button", {
1267
1336
  class: "toolbar-dropdown__trigger",
1268
- onMousedown: r[24] ||= M((e) => T(V)("spacing"), ["prevent"]),
1337
+ onMousedown: r[32] ||= M((e) => T(H)("spacing"), ["prevent"]),
1338
+ "aria-expanded": T(I) === "spacing",
1339
+ "aria-haspopup": "listbox",
1269
1340
  title: T(p)("lineSpacing.label")
1270
1341
  }, [d(e, { name: "format_line_spacing" }), d(e, {
1271
1342
  class: "chevron",
1272
1343
  name: "arrow_drop_down",
1273
1344
  size: 16
1274
- })], 40, pt), T(F) === "spacing" ? (v(), c("div", {
1345
+ })], 40, St), T(I) === "spacing" ? (v(), c("div", {
1275
1346
  key: 0,
1276
- style: h(T(I)),
1347
+ style: h(T(V)),
1277
1348
  class: "toolbar-dropdown__menu"
1278
- }, [(v(!0), c(i, null, x(T(Ie), (e) => (v(), c("button", {
1349
+ }, [(v(!0), c(i, null, x(T(ze), (e) => (v(), c("button", {
1279
1350
  key: e.value,
1280
- class: m(["toolbar-dropdown__item", { active: me(e.value) }]),
1281
- onMousedown: M((t) => pe(e.value), ["prevent"])
1282
- }, w(e.labelKey ? T(p)(e.labelKey) : e.label), 43, mt))), 128))], 4)) : s("", !0)], 512),
1351
+ class: m(["toolbar-dropdown__item", { active: xe(e.value) }]),
1352
+ onMousedown: M((t) => ye(e.value), ["prevent"])
1353
+ }, w(e.labelKey ? T(p)(e.labelKey) : e.label), 43, Ct))), 128))], 4)) : s("", !0)], 512),
1283
1354
  l("button", {
1284
1355
  title: T(p)("formattingBar.clearFormatting"),
1285
1356
  "aria-label": T(p)("formattingBar.clearFormatting"),
1286
- onMousedown: M(ue, ["prevent"])
1287
- }, [d(e, { name: "format_clear" })], 40, ht),
1288
- r[36] ||= l("span", { class: "divider" }, null, -1),
1357
+ onMousedown: M(ge, ["prevent"])
1358
+ }, [d(e, { name: "format_clear" })], 40, wt),
1359
+ r[44] ||= l("span", { class: "divider" }, null, -1),
1289
1360
  l("button", {
1290
1361
  title: T(p)("formattingBar.commentsAndChanges"),
1291
1362
  "aria-label": T(p)("formattingBar.commentsAndChanges"),
1292
1363
  class: m({ active: n.commentsSidebarOpen }),
1293
- onMousedown: r[25] ||= M((e) => t.$emit("toggle-sidebar"), ["prevent"])
1294
- }, [d(e, { name: "comment" })], 42, gt),
1364
+ onMousedown: r[33] ||= M((e) => t.$emit("toggle-sidebar"), ["prevent"])
1365
+ }, [d(e, { name: "comment" })], 42, Tt),
1295
1366
  n.imageContext ? (v(), c(i, { key: 1 }, [
1296
- r[30] ||= l("span", { class: "divider" }, null, -1),
1297
- d(je, {
1367
+ r[38] ||= l("span", { class: "divider" }, null, -1),
1368
+ d(Pe, {
1298
1369
  "image-context": n.imageContext,
1299
- onChange: r[26] ||= (e) => t.$emit("image-wrap-type", e)
1370
+ onChange: r[34] ||= (e) => t.$emit("image-wrap-type", e)
1300
1371
  }, null, 8, ["image-context"]),
1301
- d(Me, { onTransform: r[27] ||= (e) => t.$emit("image-transform", e) }),
1372
+ d(Fe, { onTransform: r[35] ||= (e) => t.$emit("image-transform", e) }),
1302
1373
  l("button", {
1303
1374
  title: T(p)("formattingBar.imagePropertiesShortcut"),
1304
1375
  "aria-label": T(p)("formattingBar.imageProperties"),
1305
- onMousedown: r[28] ||= M((e) => t.$emit("image-properties"), ["prevent"])
1306
- }, [d(e, { name: "tune" })], 40, _t)
1376
+ onMousedown: r[36] ||= M((e) => t.$emit("image-properties"), ["prevent"])
1377
+ }, [d(e, { name: "tune" })], 40, Et)
1307
1378
  ], 64)) : s("", !0),
1308
1379
  S(t.$slots, "table-context", {}, void 0, !0),
1309
- r[37] ||= l("span", { class: "divider" }, null, -1),
1310
- n.editorMode ? (v(), o(Ee, {
1380
+ r[45] ||= l("span", { class: "divider" }, null, -1),
1381
+ n.editorMode ? (v(), o(ke, {
1311
1382
  key: 2,
1312
1383
  "model-value": n.editorMode,
1313
- "onUpdate:modelValue": r[29] ||= (e) => t.$emit("mode-change", e)
1384
+ "onUpdate:modelValue": r[37] ||= (e) => t.$emit("mode-change", e)
1314
1385
  }, null, 8, ["model-value"])) : s("", !0),
1315
1386
  S(t.$slots, "toolbar-extra", {}, void 0, !0)
1316
1387
  ])) : s("", !0);
1317
1388
  }
1318
- }), [["__scopeId", "data-v-9c584674"]]), yt = /* @__PURE__ */ f({
1389
+ }), [["__scopeId", "data-v-8271d639"]]), Ot = /* @__PURE__ */ f({
1319
1390
  __name: "TableCellFillPicker",
1320
1391
  props: {
1321
1392
  disabled: { type: Boolean },
@@ -1328,7 +1399,7 @@ var ze = {
1328
1399
  function a(e) {
1329
1400
  typeof e == "string" && r("change", e === "none" ? "" : e.replace(/^#/, ""));
1330
1401
  }
1331
- return (t, n) => (v(), o(_e, {
1402
+ return (t, n) => (v(), o(be, {
1332
1403
  mode: "highlight",
1333
1404
  value: e.value,
1334
1405
  theme: e.theme ?? null,
@@ -1345,7 +1416,7 @@ var ze = {
1345
1416
  "auto-label"
1346
1417
  ]));
1347
1418
  }
1348
- }), bt = ["disabled", "onClick"], xt = { class: "docx-tbp__panel" }, St = ["title", "onClick"], Ct = /* @__PURE__ */ n(/* @__PURE__ */ f({
1419
+ }), kt = ["disabled", "onClick"], At = { class: "docx-tbp__panel" }, jt = ["title", "onClick"], Mt = /* @__PURE__ */ n(/* @__PURE__ */ f({
1349
1420
  __name: "TableBorderPicker",
1350
1421
  props: { disabled: { type: Boolean } },
1351
1422
  emits: ["change"],
@@ -1419,8 +1490,8 @@ var ze = {
1419
1490
  }, [d(e, {
1420
1491
  name: "border_all",
1421
1492
  size: 20
1422
- })], 8, bt)]),
1423
- panel: k(() => [l("div", xt, [(v(), c(i, null, x(s, (t) => l("button", {
1493
+ })], 8, kt)]),
1494
+ panel: k(() => [l("div", At, [(v(), c(i, null, x(s, (t) => l("button", {
1424
1495
  key: t.value,
1425
1496
  type: "button",
1426
1497
  class: "docx-tbp__option",
@@ -1429,11 +1500,11 @@ var ze = {
1429
1500
  }, [d(e, {
1430
1501
  name: t.icon,
1431
1502
  size: 20
1432
- }, null, 8, ["name"])], 8, St)), 64))])]),
1503
+ }, null, 8, ["name"])], 8, jt)), 64))])]),
1433
1504
  _: 1
1434
1505
  }, 8, ["open"]));
1435
1506
  }
1436
- }), [["__scopeId", "data-v-51d7b6e0"]]), wt = /* @__PURE__ */ f({
1507
+ }), [["__scopeId", "data-v-47032801"]]), Nt = /* @__PURE__ */ f({
1437
1508
  __name: "TableBorderColorPicker",
1438
1509
  props: {
1439
1510
  disabled: { type: Boolean },
@@ -1446,7 +1517,7 @@ var ze = {
1446
1517
  function a(e) {
1447
1518
  typeof e == "string" ? r("change", e.replace(/^#/, "")) : e.rgb ? r("change", e.rgb.replace(/^#/, "")) : e.auto && r("change", "000000");
1448
1519
  }
1449
- return (t, n) => (v(), o(_e, {
1520
+ return (t, n) => (v(), o(be, {
1450
1521
  mode: "border",
1451
1522
  value: e.value,
1452
1523
  theme: e.theme ?? null,
@@ -1460,7 +1531,7 @@ var ze = {
1460
1531
  "title"
1461
1532
  ]));
1462
1533
  }
1463
- }), Tt = ["disabled", "onClick"], Et = { class: "docx-tbwidth__panel" }, Dt = ["onClick"], Ot = { class: "docx-tbwidth__label" }, kt = /* @__PURE__ */ n(/* @__PURE__ */ f({
1534
+ }), Pt = ["disabled", "onClick"], Ft = { class: "docx-tbwidth__panel" }, It = ["onClick"], Lt = { class: "docx-tbwidth__label" }, Rt = /* @__PURE__ */ n(/* @__PURE__ */ f({
1464
1535
  __name: "TableBorderWidthPicker",
1465
1536
  props: { disabled: { type: Boolean } },
1466
1537
  emits: ["change"],
@@ -1524,8 +1595,8 @@ var ze = {
1524
1595
  }, [d(e, {
1525
1596
  name: "line_weight",
1526
1597
  size: 20
1527
- })], 8, Tt)]),
1528
- panel: k(() => [l("div", Et, [(v(), c(i, null, x(s, (e) => l("button", {
1598
+ })], 8, Pt)]),
1599
+ panel: k(() => [l("div", Ft, [(v(), c(i, null, x(s, (e) => l("button", {
1529
1600
  key: e.eighths,
1530
1601
  type: "button",
1531
1602
  class: "docx-tbwidth__option",
@@ -1533,27 +1604,27 @@ var ze = {
1533
1604
  }, [l("span", {
1534
1605
  class: "docx-tbwidth__preview",
1535
1606
  style: h({ borderTopWidth: e.previewPx + "px" })
1536
- }, null, 4), l("span", Ot, w(e.label), 1)], 8, Dt)), 64))])]),
1607
+ }, null, 4), l("span", Lt, w(e.label), 1)], 8, It)), 64))])]),
1537
1608
  _: 1
1538
1609
  }, 8, ["open"]));
1539
1610
  }
1540
- }), [["__scopeId", "data-v-c134095d"]]), At = [
1611
+ }), [["__scopeId", "data-v-f11ca0b1"]]), zt = [
1541
1612
  "disabled",
1542
1613
  "title",
1543
1614
  "onClick"
1544
- ], jt = ["aria-label"], Mt = ["disabled"], Nt = ["disabled"], Pt = ["disabled"], Ft = ["disabled"], It = { class: "docx-tmore__section-label" }, Lt = { class: "docx-tmore__icon-row" }, Rt = ["title"], zt = ["title"], Bt = ["title"], Vt = { class: "docx-tmore__section-label" }, Ht = { class: "docx-tmore__icon-row" }, Ut = ["title"], Wt = ["title"], Gt = ["title"], Kt = { class: "docx-tmore__grow" }, qt = {
1615
+ ], Bt = ["aria-label"], Vt = ["disabled"], Ht = ["disabled"], Ut = ["disabled"], Wt = ["disabled"], Gt = { class: "docx-tmore__section-label" }, Kt = { class: "docx-tmore__icon-row" }, qt = ["title"], Jt = ["title"], Yt = ["title"], Xt = { class: "docx-tmore__section-label" }, Zt = { class: "docx-tmore__icon-row" }, Qt = ["title"], $t = ["title"], en = ["title"], tn = { class: "docx-tmore__grow" }, nn = {
1545
1616
  key: 0,
1546
1617
  class: "docx-tmore__sub"
1547
- }, Jt = { class: "docx-tmore__margin-grid" }, Yt = { class: "docx-tmore__field-label" }, Xt = ["onUpdate:modelValue"], Zt = { class: "docx-tmore__grow" }, Qt = {
1618
+ }, rn = { class: "docx-tmore__margin-grid" }, an = { class: "docx-tmore__field-label" }, on = ["onUpdate:modelValue"], sn = { class: "docx-tmore__grow" }, cn = {
1548
1619
  key: 1,
1549
1620
  class: "docx-tmore__sub"
1550
- }, $t = { class: "docx-tmore__row-field" }, en = { class: "docx-tmore__field-label" }, tn = { value: "auto" }, nn = { value: "atLeast" }, rn = { value: "exact" }, an = {
1621
+ }, ln = { class: "docx-tmore__row-field" }, un = { class: "docx-tmore__field-label" }, dn = { value: "auto" }, fn = { value: "atLeast" }, pn = { value: "exact" }, mn = {
1551
1622
  key: 0,
1552
1623
  class: "docx-tmore__row-field"
1553
- }, on = { class: "docx-tmore__field-label" }, sn = { class: "docx-tmore__grow" }, cn = {
1624
+ }, hn = { class: "docx-tmore__field-label" }, gn = { class: "docx-tmore__grow" }, _n = {
1554
1625
  key: 2,
1555
1626
  class: "docx-tmore__sub docx-tmore__sub--list"
1556
- }, ln = /* @__PURE__ */ n(/* @__PURE__ */ f({
1627
+ }, vn = /* @__PURE__ */ n(/* @__PURE__ */ f({
1557
1628
  __name: "TableMoreDropdown",
1558
1629
  props: {
1559
1630
  disabled: {
@@ -1631,7 +1702,7 @@ var ze = {
1631
1702
  }, [d(e, {
1632
1703
  name: "more_vert",
1633
1704
  size: 20
1634
- })], 10, At)]),
1705
+ })], 10, zt)]),
1635
1706
  panel: k(() => [l("div", {
1636
1707
  class: "docx-tmore__panel",
1637
1708
  role: "menu",
@@ -1678,7 +1749,7 @@ var ze = {
1678
1749
  }, [d(e, {
1679
1750
  name: "call_merge",
1680
1751
  size: 18
1681
- }), l("span", null, w(T(f)("table.mergeCells")), 1)], 8, Mt),
1752
+ }), l("span", null, w(T(f)("table.mergeCells")), 1)], 8, Vt),
1682
1753
  l("button", {
1683
1754
  type: "button",
1684
1755
  class: "docx-tmore__item",
@@ -1687,7 +1758,7 @@ var ze = {
1687
1758
  }, [d(e, {
1688
1759
  name: "call_split",
1689
1760
  size: 18
1690
- }), l("span", null, w(T(f)("table.splitCell")), 1)], 8, Nt),
1761
+ }), l("span", null, w(T(f)("table.splitCell")), 1)], 8, Ht),
1691
1762
  r[39] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
1692
1763
  l("button", {
1693
1764
  type: "button",
@@ -1697,7 +1768,7 @@ var ze = {
1697
1768
  }, [d(e, {
1698
1769
  name: "delete",
1699
1770
  size: 18
1700
- }), l("span", null, w(T(f)("table.deleteRow")), 1)], 8, Pt),
1771
+ }), l("span", null, w(T(f)("table.deleteRow")), 1)], 8, Ut),
1701
1772
  l("button", {
1702
1773
  type: "button",
1703
1774
  class: "docx-tmore__item docx-tmore__item--danger",
@@ -1706,7 +1777,7 @@ var ze = {
1706
1777
  }, [d(e, {
1707
1778
  name: "delete",
1708
1779
  size: 18
1709
- }), l("span", null, w(T(f)("table.deleteColumn")), 1)], 8, Ft),
1780
+ }), l("span", null, w(T(f)("table.deleteColumn")), 1)], 8, Wt),
1710
1781
  l("button", {
1711
1782
  type: "button",
1712
1783
  class: "docx-tmore__item docx-tmore__item--danger",
@@ -1716,8 +1787,8 @@ var ze = {
1716
1787
  size: 18
1717
1788
  }), l("span", null, w(T(f)("table.deleteTable")), 1)]),
1718
1789
  r[40] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
1719
- l("div", It, w(T(f)("tableAdvanced.verticalAlignment")), 1),
1720
- l("div", Lt, [
1790
+ l("div", Gt, w(T(f)("tableAdvanced.verticalAlignment")), 1),
1791
+ l("div", Kt, [
1721
1792
  l("button", {
1722
1793
  type: "button",
1723
1794
  class: "docx-tmore__icon-btn",
@@ -1727,7 +1798,7 @@ var ze = {
1727
1798
  }, [d(e, {
1728
1799
  name: "vertical_align_top",
1729
1800
  size: 16
1730
- })], 40, Rt),
1801
+ })], 40, qt),
1731
1802
  l("button", {
1732
1803
  type: "button",
1733
1804
  class: "docx-tmore__icon-btn",
@@ -1737,7 +1808,7 @@ var ze = {
1737
1808
  }, [d(e, {
1738
1809
  name: "vertical_align_center",
1739
1810
  size: 16
1740
- })], 40, zt),
1811
+ })], 40, Jt),
1741
1812
  l("button", {
1742
1813
  type: "button",
1743
1814
  class: "docx-tmore__icon-btn",
@@ -1747,11 +1818,11 @@ var ze = {
1747
1818
  }, [d(e, {
1748
1819
  name: "vertical_align_bottom",
1749
1820
  size: 16
1750
- })], 40, Bt)
1821
+ })], 40, Yt)
1751
1822
  ]),
1752
1823
  r[41] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
1753
- l("div", Vt, w(T(f)("tableAdvanced.tableAlignment")), 1),
1754
- l("div", Ht, [
1824
+ l("div", Xt, w(T(f)("tableAdvanced.tableAlignment")), 1),
1825
+ l("div", Zt, [
1755
1826
  l("button", {
1756
1827
  type: "button",
1757
1828
  class: m(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "left" }]),
@@ -1761,7 +1832,7 @@ var ze = {
1761
1832
  }, [d(e, {
1762
1833
  name: "format_align_left",
1763
1834
  size: 16
1764
- })], 42, Ut),
1835
+ })], 42, Qt),
1765
1836
  l("button", {
1766
1837
  type: "button",
1767
1838
  class: m(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "center" }]),
@@ -1771,7 +1842,7 @@ var ze = {
1771
1842
  }, [d(e, {
1772
1843
  name: "format_align_center",
1773
1844
  size: 16
1774
- })], 42, Wt),
1845
+ })], 42, $t),
1775
1846
  l("button", {
1776
1847
  type: "button",
1777
1848
  class: m(["docx-tmore__icon-btn", { "docx-tmore__icon-btn--active": n.currentJustification === "right" }]),
@@ -1781,7 +1852,7 @@ var ze = {
1781
1852
  }, [d(e, {
1782
1853
  name: "format_align_right",
1783
1854
  size: 16
1784
- })], 42, Gt)
1855
+ })], 42, en)
1785
1856
  ]),
1786
1857
  r[42] ||= l("div", { class: "docx-tmore__separator" }, null, -1),
1787
1858
  l("button", {
@@ -1793,13 +1864,13 @@ var ze = {
1793
1864
  name: "padding",
1794
1865
  size: 18
1795
1866
  }),
1796
- l("span", Kt, w(T(f)("tableAdvanced.cellMargins")), 1),
1867
+ l("span", tn, w(T(f)("tableAdvanced.cellMargins")), 1),
1797
1868
  d(e, {
1798
1869
  name: h.value ? "expand_less" : "expand_more",
1799
1870
  size: 18
1800
1871
  }, null, 8, ["name"])
1801
1872
  ]),
1802
- h.value ? (v(), c("div", qt, [l("div", Jt, [(v(), c(i, null, x([
1873
+ h.value ? (v(), c("div", nn, [l("div", rn, [(v(), c(i, null, x([
1803
1874
  "top",
1804
1875
  "bottom",
1805
1876
  "left",
@@ -1808,14 +1879,14 @@ var ze = {
1808
1879
  key: e,
1809
1880
  class: "docx-tmore__field"
1810
1881
  }, [
1811
- l("span", Yt, w(e), 1),
1882
+ l("span", an, w(e), 1),
1812
1883
  A(l("input", {
1813
1884
  type: "number",
1814
1885
  min: "0",
1815
1886
  step: "20",
1816
1887
  "onUpdate:modelValue": (t) => S[e] = t,
1817
1888
  class: "docx-tmore__input"
1818
- }, null, 8, Xt), [[
1889
+ }, null, 8, on), [[
1819
1890
  D,
1820
1891
  S[e],
1821
1892
  void 0,
@@ -1836,23 +1907,23 @@ var ze = {
1836
1907
  name: "height",
1837
1908
  size: 18
1838
1909
  }),
1839
- l("span", Zt, w(T(f)("tableAdvanced.rowHeight")), 1),
1910
+ l("span", sn, w(T(f)("tableAdvanced.rowHeight")), 1),
1840
1911
  d(e, {
1841
1912
  name: g.value ? "expand_less" : "expand_more",
1842
1913
  size: 18
1843
1914
  }, null, 8, ["name"])
1844
1915
  ]),
1845
- g.value ? (v(), c("div", Qt, [
1846
- l("label", $t, [l("span", en, w(T(f)("tableAdvanced.rule")), 1), A(l("select", {
1916
+ g.value ? (v(), c("div", cn, [
1917
+ l("label", ln, [l("span", un, w(T(f)("tableAdvanced.rule")), 1), A(l("select", {
1847
1918
  "onUpdate:modelValue": r[23] ||= (e) => j.value = e,
1848
1919
  class: "docx-tmore__select"
1849
1920
  }, [
1850
- l("option", tn, w(T(f)("tableAdvanced.heightRules.auto")), 1),
1851
- l("option", nn, w(T(f)("tableAdvanced.heightRules.atLeast")), 1),
1852
- l("option", rn, w(T(f)("tableAdvanced.heightRules.exact")), 1)
1921
+ l("option", dn, w(T(f)("tableAdvanced.heightRules.auto")), 1),
1922
+ l("option", fn, w(T(f)("tableAdvanced.heightRules.atLeast")), 1),
1923
+ l("option", pn, w(T(f)("tableAdvanced.heightRules.exact")), 1)
1853
1924
  ], 512), [[E, j.value]])]),
1854
- j.value === "auto" ? s("", !0) : (v(), c("label", an, [
1855
- l("span", on, w(T(f)("tableAdvanced.height")), 1),
1925
+ j.value === "auto" ? s("", !0) : (v(), c("label", mn, [
1926
+ l("span", hn, w(T(f)("tableAdvanced.height")), 1),
1856
1927
  A(l("input", {
1857
1928
  type: "number",
1858
1929
  min: "0",
@@ -1882,13 +1953,13 @@ var ze = {
1882
1953
  name: "text_rotation_none",
1883
1954
  size: 18
1884
1955
  }),
1885
- l("span", sn, w(T(f)("tableAdvanced.textDirection")), 1),
1956
+ l("span", gn, w(T(f)("tableAdvanced.textDirection")), 1),
1886
1957
  d(e, {
1887
1958
  name: _.value ? "expand_less" : "expand_more",
1888
1959
  size: 18
1889
1960
  }, null, 8, ["name"])
1890
1961
  ]),
1891
- _.value ? (v(), c("div", cn, [
1962
+ _.value ? (v(), c("div", _n, [
1892
1963
  l("button", {
1893
1964
  type: "button",
1894
1965
  class: "docx-tmore__sub-item",
@@ -1947,11 +2018,11 @@ var ze = {
1947
2018
  name: "settings",
1948
2019
  size: 18
1949
2020
  }), l("span", null, w(T(f)("tableAdvanced.tableProperties")), 1)])
1950
- ], 8, jt)]),
2021
+ ], 8, Bt)]),
1951
2022
  _: 1
1952
2023
  }, 8, ["open"]));
1953
2024
  }
1954
- }), [["__scopeId", "data-v-dbab3895"]]), un = /* @__PURE__ */ n(/* @__PURE__ */ f({
2025
+ }), [["__scopeId", "data-v-27bf8a6f"]]), yn = /* @__PURE__ */ n(/* @__PURE__ */ f({
1955
2026
  __name: "TableToolbar",
1956
2027
  props: {
1957
2028
  view: {},
@@ -1963,7 +2034,7 @@ var ze = {
1963
2034
  let t = e, n = a(() => {
1964
2035
  t.stateTick;
1965
2036
  let e = t.view;
1966
- return e ? V(e.state) : null;
2037
+ return e ? U(e.state) : null;
1967
2038
  }), r = a(() => !!n.value?.isInTable), o = a(() => {
1968
2039
  t.stateTick;
1969
2040
  let e = t.view;
@@ -1985,7 +2056,7 @@ var ze = {
1985
2056
  O([() => t.view, () => t.stateTick], () => {
1986
2057
  let e = t.view;
1987
2058
  if (!e) return;
1988
- let n = V(e.state), r = n.cellBorderColor;
2059
+ let n = U(e.state), r = n.cellBorderColor;
1989
2060
  !r || !n.isInTable || typeof r == "object" && "rgb" in r && typeof r.rgb == "string" && (h.color = { rgb: r.rgb });
1990
2061
  }, { immediate: !0 });
1991
2062
  function g(e, ...n) {
@@ -2058,17 +2129,17 @@ var ze = {
2058
2129
  }
2059
2130
  return (t, n) => r.value ? (v(), c(i, { key: 0 }, [
2060
2131
  n[0] ||= l("span", { class: "divider" }, null, -1),
2061
- d(Ct, { onChange: _ }),
2062
- d(wt, {
2132
+ d(Mt, { onChange: _ }),
2133
+ d(Nt, {
2063
2134
  theme: e.theme ?? null,
2064
2135
  onChange: y
2065
2136
  }, null, 8, ["theme"]),
2066
- d(kt, { onChange: b }),
2067
- d(yt, {
2137
+ d(Rt, { onChange: b }),
2138
+ d(Ot, {
2068
2139
  theme: e.theme ?? null,
2069
2140
  onChange: x
2070
2141
  }, null, 8, ["theme"]),
2071
- d(ln, {
2142
+ d(vn, {
2072
2143
  "can-split": o.value,
2073
2144
  "can-merge": u.value,
2074
2145
  "row-count": f.value,
@@ -2087,18 +2158,18 @@ var ze = {
2087
2158
  ])
2088
2159
  ], 64)) : s("", !0);
2089
2160
  }
2090
- }), [["__scopeId", "data-v-56725acf"]]), dn = /* @__PURE__ */ f({
2161
+ }), [["__scopeId", "data-v-b9fbce78"]]), bn = /* @__PURE__ */ f({
2091
2162
  __name: "Avatar",
2092
2163
  props: {
2093
2164
  name: { default: "U" },
2094
2165
  size: { default: 32 }
2095
2166
  },
2096
2167
  setup(e) {
2097
- let t = e, n = a(() => G(t.name || "U")), r = a(() => ({
2168
+ let t = e, n = a(() => q(t.name || "U")), r = a(() => ({
2098
2169
  width: t.size + "px",
2099
2170
  height: t.size + "px",
2100
2171
  borderRadius: "50%",
2101
- backgroundColor: U(t.name || "U"),
2172
+ backgroundColor: G(t.name || "U"),
2102
2173
  color: "#fff",
2103
2174
  display: "flex",
2104
2175
  alignItems: "center",
@@ -2112,13 +2183,13 @@ var ze = {
2112
2183
  style: h(r.value)
2113
2184
  }, w(n.value), 5));
2114
2185
  }
2115
- }), fn = {
2186
+ }), xn = {
2116
2187
  key: 0,
2117
2188
  class: "reply-thread"
2118
- }, pn = {
2189
+ }, Sn = {
2119
2190
  key: 0,
2120
2191
  class: "reply-thread__more"
2121
- }, mn = { class: "reply-thread__header" }, hn = { class: "reply-thread__author-block" }, gn = { class: "reply-thread__author" }, _n = { class: "reply-thread__date" }, vn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2192
+ }, Cn = { class: "reply-thread__header" }, wn = { class: "reply-thread__author-block" }, Tn = { class: "reply-thread__author" }, En = { class: "reply-thread__date" }, Dn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2122
2193
  __name: "ReplyThread",
2123
2194
  props: {
2124
2195
  replies: {},
@@ -2126,15 +2197,15 @@ var ze = {
2126
2197
  },
2127
2198
  setup(e) {
2128
2199
  let t = e, n = a(() => t.isExpanded ? t.replies : t.replies.slice(-1)), r = a(() => t.isExpanded ? 0 : Math.max(0, t.replies.length - 1));
2129
- return (t, a) => e.replies.length > 0 ? (v(), c("div", fn, [r.value > 0 ? (v(), c("div", pn, w(r.value) + " " + w(r.value === 1 ? "reply" : "replies"), 1)) : s("", !0), (v(!0), c(i, null, x(n.value, (t) => (v(), c("div", {
2200
+ return (t, a) => e.replies.length > 0 ? (v(), c("div", xn, [r.value > 0 ? (v(), c("div", Sn, w(r.value) + " " + w(r.value === 1 ? "reply" : "replies"), 1)) : s("", !0), (v(!0), c(i, null, x(n.value, (t) => (v(), c("div", {
2130
2201
  key: t.id,
2131
2202
  class: m(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
2132
- }, [l("div", mn, [d(dn, {
2203
+ }, [l("div", Cn, [d(bn, {
2133
2204
  name: t.author,
2134
2205
  size: 28
2135
- }, null, 8, ["name"]), l("div", hn, [l("div", gn, w(t.author || "Unknown"), 1), l("div", _n, w(T(H)(t.date)), 1)])]), l("div", { class: m(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, w(T(W)(t.content)), 3)], 2))), 128))])) : s("", !0);
2206
+ }, null, 8, ["name"]), l("div", wn, [l("div", Tn, w(t.author || "Unknown"), 1), l("div", En, w(T(W)(t.date)), 1)])]), l("div", { class: m(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, w(T(K)(t.content)), 3)], 2))), 128))])) : s("", !0);
2136
2207
  }
2137
- }), [["__scopeId", "data-v-fc8a461d"]]), yn = ["onKeydown"], bn = { class: "reply-input__actions" }, xn = ["disabled"], Sn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2208
+ }), [["__scopeId", "data-v-9634d553"]]), On = ["onKeydown"], kn = { class: "reply-input__actions" }, An = ["disabled"], jn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2138
2209
  __name: "ReplyInput",
2139
2210
  emits: ["submit"],
2140
2211
  setup(e, { emit: t }) {
@@ -2166,14 +2237,14 @@ var ze = {
2166
2237
  j(M(h, ["prevent"]), ["enter"]),
2167
2238
  j(f, ["esc"])
2168
2239
  ]
2169
- }, null, 40, yn), [[D, o.value]]), l("div", bn, [l("button", {
2240
+ }, null, 40, On), [[D, o.value]]), l("div", kn, [l("button", {
2170
2241
  class: "reply-input__cancel",
2171
2242
  onClick: M(f, ["stop"])
2172
2243
  }, "Cancel"), l("button", {
2173
2244
  class: m(["reply-input__submit", { "reply-input__submit--active": u.value }]),
2174
2245
  disabled: !u.value,
2175
2246
  onClick: M(h, ["stop"])
2176
- }, "Reply", 10, xn)])], 64)) : (v(), c("input", {
2247
+ }, "Reply", 10, An)])], 64)) : (v(), c("input", {
2177
2248
  key: 0,
2178
2249
  readonly: "",
2179
2250
  placeholder: "Reply",
@@ -2182,13 +2253,13 @@ var ze = {
2182
2253
  onClick: M(d, ["stop"])
2183
2254
  }, null, 32))], 32));
2184
2255
  }
2185
- }), [["__scopeId", "data-v-aa3d5b08"]]), Cn = ["data-comment-id"], wn = {
2256
+ }), [["__scopeId", "data-v-1cfd229c"]]), Mn = ["data-comment-id"], Nn = {
2186
2257
  key: 0,
2187
2258
  class: "comment-card__resolved"
2188
- }, Tn = { class: "comment-card__head" }, En = { class: "comment-card__author-block" }, Dn = { class: "comment-card__author" }, On = { class: "comment-card__date" }, kn = {
2259
+ }, Pn = { class: "comment-card__head" }, Fn = { class: "comment-card__author-block" }, In = { class: "comment-card__author" }, Ln = { class: "comment-card__date" }, Rn = {
2189
2260
  key: 0,
2190
2261
  class: "comment-card__actions"
2191
- }, An = ["title"], jn = { class: "comment-card__body" }, Mn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2262
+ }, zn = ["title"], Bn = { class: "comment-card__body" }, Vn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2192
2263
  __name: "CommentCard",
2193
2264
  props: {
2194
2265
  comment: {},
@@ -2213,17 +2284,17 @@ var ze = {
2213
2284
  onClick: r[5] ||= (e) => n.$emit("click"),
2214
2285
  onMousedown: r[6] ||= M(() => {}, ["stop"])
2215
2286
  }, [
2216
- t.comment.done ? (v(), c("div", wn, [d(e, {
2287
+ t.comment.done ? (v(), c("div", Nn, [d(e, {
2217
2288
  name: "check",
2218
2289
  size: 12
2219
2290
  }), r[7] ||= l("span", null, "Resolved", -1)])) : s("", !0),
2220
- l("div", Tn, [
2221
- d(dn, {
2291
+ l("div", Pn, [
2292
+ d(bn, {
2222
2293
  name: t.comment.author,
2223
2294
  size: 32
2224
2295
  }, null, 8, ["name"]),
2225
- l("div", En, [l("div", Dn, w(t.comment.author || "Unknown"), 1), l("div", On, w(T(H)(t.comment.date)), 1)]),
2226
- t.expanded ? (v(), c("div", kn, [
2296
+ l("div", Fn, [l("div", In, w(t.comment.author || "Unknown"), 1), l("div", Ln, w(T(W)(t.comment.date)), 1)]),
2297
+ t.expanded ? (v(), c("div", Rn, [
2227
2298
  l("button", {
2228
2299
  class: "comment-card__icon-btn",
2229
2300
  title: t.comment.done ? "Reopen" : "Resolve",
@@ -2231,7 +2302,7 @@ var ze = {
2231
2302
  }, [d(e, {
2232
2303
  name: t.comment.done ? "undo" : "check",
2233
2304
  size: 20
2234
- }, null, 8, ["name"])], 8, An),
2305
+ }, null, 8, ["name"])], 8, zn),
2235
2306
  l("button", {
2236
2307
  class: "comment-card__icon-btn",
2237
2308
  title: "More options",
@@ -2251,18 +2322,18 @@ var ze = {
2251
2322
  }, "Delete")], 32)) : s("", !0)
2252
2323
  ])) : s("", !0)
2253
2324
  ]),
2254
- l("div", jn, w(T(W)(t.comment.content)), 1),
2255
- d(vn, {
2325
+ l("div", Bn, w(T(K)(t.comment.content)), 1),
2326
+ d(Dn, {
2256
2327
  replies: t.replies,
2257
2328
  "is-expanded": t.expanded
2258
2329
  }, null, 8, ["replies", "is-expanded"]),
2259
- t.expanded && !t.comment.done ? (v(), o(Sn, {
2330
+ t.expanded && !t.comment.done ? (v(), o(jn, {
2260
2331
  key: 1,
2261
2332
  onSubmit: r[4] ||= (e) => n.$emit("reply", t.comment.id, e)
2262
2333
  })) : s("", !0)
2263
- ], 42, Cn));
2334
+ ], 42, Mn));
2264
2335
  }
2265
- }), [["__scopeId", "data-v-b9e94a26"]]), Nn = ["data-comment-id"], Pn = /* @__PURE__ */ n(/* @__PURE__ */ f({
2336
+ }), [["__scopeId", "data-v-fc5f60de"]]), Hn = ["data-comment-id"], Un = /* @__PURE__ */ n(/* @__PURE__ */ f({
2266
2337
  __name: "ResolvedCommentMarker",
2267
2338
  props: { comment: {} },
2268
2339
  emits: ["toggle-expand"],
@@ -2276,45 +2347,45 @@ var ze = {
2276
2347
  }, [d(e, {
2277
2348
  name: "chat_bubble_check",
2278
2349
  size: 20
2279
- })], 40, Nn));
2350
+ })], 40, Hn));
2280
2351
  }
2281
- }), [["__scopeId", "data-v-c3b210c1"]]), Fn = { class: "tc-card__head" }, In = { class: "tc-card__author-block" }, Ln = { class: "tc-card__author" }, Rn = {
2352
+ }), [["__scopeId", "data-v-c4b9639d"]]), Wn = { class: "tc-card__head" }, Gn = { class: "tc-card__author-block" }, Kn = { class: "tc-card__author" }, qn = {
2282
2353
  key: 0,
2283
2354
  class: "tc-card__date"
2284
- }, zn = {
2355
+ }, Jn = {
2285
2356
  key: 0,
2286
2357
  class: "tc-card__actions"
2287
- }, Bn = ["title"], Vn = ["title"], Hn = { class: "tc-card__body" }, Un = { class: "tc-card__deleted" }, Wn = { class: "tc-card__inserted" }, Gn = { class: "tc-card__inserted" }, Kn = { class: "tc-card__deleted" }, qn = { class: "tc-card__changed" }, Jn = {
2358
+ }, Yn = ["title"], Xn = ["title"], Zn = { class: "tc-card__body" }, Qn = { class: "tc-card__deleted" }, $n = { class: "tc-card__inserted" }, er = { class: "tc-card__inserted" }, tr = { class: "tc-card__deleted" }, nr = { class: "tc-card__changed" }, rr = {
2288
2359
  key: 4,
2289
2360
  class: "tc-card__inserted"
2290
- }, Yn = {
2361
+ }, ir = {
2291
2362
  key: 5,
2292
2363
  class: "tc-card__deleted"
2293
- }, Xn = {
2364
+ }, ar = {
2294
2365
  key: 6,
2295
2366
  class: "tc-card__inserted"
2296
- }, Zn = {
2367
+ }, or = {
2297
2368
  key: 7,
2298
2369
  class: "tc-card__deleted"
2299
- }, Qn = {
2370
+ }, sr = {
2300
2371
  key: 8,
2301
2372
  class: "tc-card__changed"
2302
- }, $n = {
2373
+ }, cr = {
2303
2374
  key: 9,
2304
2375
  class: "tc-card__changed"
2305
- }, er = {
2376
+ }, lr = {
2306
2377
  key: 10,
2307
2378
  class: "tc-card__changed"
2308
- }, tr = {
2379
+ }, ur = {
2309
2380
  key: 11,
2310
2381
  class: "tc-card__changed"
2311
- }, nr = {
2382
+ }, dr = {
2312
2383
  key: 12,
2313
2384
  class: "tc-card__inserted"
2314
- }, rr = {
2385
+ }, fr = {
2315
2386
  key: 13,
2316
2387
  class: "tc-card__deleted"
2317
- }, ir = /* @__PURE__ */ n(/* @__PURE__ */ f({
2388
+ }, pr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2318
2389
  __name: "TrackedChangeCard",
2319
2390
  props: {
2320
2391
  change: {},
@@ -2346,45 +2417,45 @@ var ze = {
2346
2417
  onClick: r[1] ||= (e) => t.$emit("click"),
2347
2418
  onMousedown: r[2] ||= M(() => {}, ["stop"])
2348
2419
  }, [
2349
- l("div", Fn, [
2350
- d(dn, {
2420
+ l("div", Wn, [
2421
+ d(bn, {
2351
2422
  name: g.value,
2352
2423
  size: 32
2353
2424
  }, null, 8, ["name"]),
2354
- l("div", In, [l("div", Ln, w(g.value), 1), n.change.date ? (v(), c("div", Rn, w(T(H)(n.change.date)), 1)) : s("", !0)]),
2355
- n.expanded ? (v(), c("div", zn, [l("button", {
2425
+ l("div", Gn, [l("div", Kn, w(g.value), 1), n.change.date ? (v(), c("div", qn, w(T(W)(n.change.date)), 1)) : s("", !0)]),
2426
+ n.expanded ? (v(), c("div", Jn, [l("button", {
2356
2427
  class: "tc-card__icon-btn",
2357
2428
  title: T(f)("common.accept"),
2358
2429
  onClick: M(y, ["stop"])
2359
2430
  }, [d(e, {
2360
2431
  name: "check",
2361
2432
  size: 20
2362
- })], 8, Bn), l("button", {
2433
+ })], 8, Yn), l("button", {
2363
2434
  class: "tc-card__icon-btn",
2364
2435
  title: T(f)("common.reject"),
2365
2436
  onClick: M(b, ["stop"])
2366
2437
  }, [d(e, {
2367
2438
  name: "close",
2368
2439
  size: 20
2369
- })], 8, Vn)])) : s("", !0)
2440
+ })], 8, Xn)])) : s("", !0)
2370
2441
  ]),
2371
- l("div", Hn, [n.change.type === "replacement" ? (v(), c(i, { key: 0 }, [
2442
+ l("div", Zn, [n.change.type === "replacement" ? (v(), c(i, { key: 0 }, [
2372
2443
  u(w(T(f)("trackedChanges.replaced")) + " ", 1),
2373
- l("span", Un, "\"" + w(T(K)(n.change.deletedText || "")) + "\"", 1),
2444
+ l("span", Qn, "\"" + w(T(J)(n.change.deletedText || "")) + "\"", 1),
2374
2445
  u(" " + w(T(f)("trackedChanges.with")) + " ", 1),
2375
- l("span", Wn, "\"" + w(T(K)(n.change.text)) + "\"", 1)
2376
- ], 64)) : n.change.type === "paragraphMarkInsertion" ? (v(), c(i, { key: 1 }, [u(w(T(f)("revisions.paragraphMarkInserted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[3] ||= u(": ", -1), l("span", Gn, "\"" + w(T(K)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "paragraphMarkDeletion" ? (v(), c(i, { key: 2 }, [u(w(T(f)("revisions.paragraphMarkDeleted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[4] ||= u(": ", -1), l("span", Kn, "\"" + w(T(K)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "paragraphPropertiesChanged" ? (v(), c(i, { key: 3 }, [u(w(T(f)("revisions.paragraphPropertiesChanged")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[5] ||= u(": ", -1), l("span", qn, "\"" + w(T(K)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "rowInserted" ? (v(), c("span", Jn, w(T(f)("revisions.rowInserted")), 1)) : n.change.type === "rowDeleted" ? (v(), c("span", Yn, w(T(f)("revisions.rowDeleted")), 1)) : n.change.type === "cellInserted" ? (v(), c("span", Xn, w(T(f)("revisions.cellInserted")), 1)) : n.change.type === "cellDeleted" ? (v(), c("span", Zn, w(T(f)("revisions.cellDeleted")), 1)) : n.change.type === "cellMerged" ? (v(), c("span", Qn, w(T(f)("revisions.cellMerged")), 1)) : n.change.type === "rowPropertiesChanged" ? (v(), c("span", $n, w(T(f)("revisions.rowPropertiesChanged")), 1)) : n.change.type === "cellPropertiesChanged" ? (v(), c("span", er, w(T(f)("revisions.cellPropertiesChanged")), 1)) : n.change.type === "tablePropertiesChanged" ? (v(), c("span", tr, w(T(f)("revisions.tablePropertiesChanged")), 1)) : n.change.type === "tableInserted" ? (v(), c("span", nr, w(T(f)("revisions.tableInserted")), 1)) : n.change.type === "tableDeleted" ? (v(), c("span", rr, w(T(f)("revisions.tableDeleted")), 1)) : (v(), c(i, { key: 14 }, [u(w(n.change.type === "insertion" ? T(f)("trackedChanges.added") : T(f)("trackedChanges.deleted")) + " ", 1), l("span", { class: m(n.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + w(T(K)(n.change.text)) + "\" ", 3)], 64))]),
2377
- d(vn, {
2446
+ l("span", $n, "\"" + w(T(J)(n.change.text)) + "\"", 1)
2447
+ ], 64)) : n.change.type === "paragraphMarkInsertion" ? (v(), c(i, { key: 1 }, [u(w(T(f)("revisions.paragraphMarkInserted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[3] ||= u(": ", -1), l("span", er, "\"" + w(T(J)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "paragraphMarkDeletion" ? (v(), c(i, { key: 2 }, [u(w(T(f)("revisions.paragraphMarkDeleted")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[4] ||= u(": ", -1), l("span", tr, "\"" + w(T(J)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "paragraphPropertiesChanged" ? (v(), c(i, { key: 3 }, [u(w(T(f)("revisions.paragraphPropertiesChanged")), 1), n.change.text ? (v(), c(i, { key: 0 }, [r[5] ||= u(": ", -1), l("span", nr, "\"" + w(T(J)(n.change.text)) + "\"", 1)], 64)) : s("", !0)], 64)) : n.change.type === "rowInserted" ? (v(), c("span", rr, w(T(f)("revisions.rowInserted")), 1)) : n.change.type === "rowDeleted" ? (v(), c("span", ir, w(T(f)("revisions.rowDeleted")), 1)) : n.change.type === "cellInserted" ? (v(), c("span", ar, w(T(f)("revisions.cellInserted")), 1)) : n.change.type === "cellDeleted" ? (v(), c("span", or, w(T(f)("revisions.cellDeleted")), 1)) : n.change.type === "cellMerged" ? (v(), c("span", sr, w(T(f)("revisions.cellMerged")), 1)) : n.change.type === "rowPropertiesChanged" ? (v(), c("span", cr, w(T(f)("revisions.rowPropertiesChanged")), 1)) : n.change.type === "cellPropertiesChanged" ? (v(), c("span", lr, w(T(f)("revisions.cellPropertiesChanged")), 1)) : n.change.type === "tablePropertiesChanged" ? (v(), c("span", ur, w(T(f)("revisions.tablePropertiesChanged")), 1)) : n.change.type === "tableInserted" ? (v(), c("span", dr, w(T(f)("revisions.tableInserted")), 1)) : n.change.type === "tableDeleted" ? (v(), c("span", fr, w(T(f)("revisions.tableDeleted")), 1)) : (v(), c(i, { key: 14 }, [u(w(n.change.type === "insertion" ? T(f)("trackedChanges.added") : T(f)("trackedChanges.deleted")) + " ", 1), l("span", { class: m(n.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + w(T(J)(n.change.text)) + "\" ", 3)], 64))]),
2448
+ d(Dn, {
2378
2449
  replies: n.replies,
2379
2450
  "is-expanded": n.expanded
2380
2451
  }, null, 8, ["replies", "is-expanded"]),
2381
- n.expanded ? (v(), o(Sn, {
2452
+ n.expanded ? (v(), o(jn, {
2382
2453
  key: 0,
2383
2454
  onSubmit: r[0] ||= (e) => t.$emit("reply", n.change.revisionId, e)
2384
2455
  })) : s("", !0)
2385
2456
  ], 34));
2386
2457
  }
2387
- }), [["__scopeId", "data-v-49909590"]]), ar = ["onKeydown"], or = { class: "add-comment-card__actions" }, sr = ["disabled"], cr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2458
+ }), [["__scopeId", "data-v-aba5ffb2"]]), mr = ["onKeydown"], hr = { class: "add-comment-card__actions" }, gr = ["disabled"], _r = /* @__PURE__ */ n(/* @__PURE__ */ f({
2388
2459
  __name: "AddCommentCard",
2389
2460
  emits: ["submit", "cancel"],
2390
2461
  setup(e, { emit: t }) {
@@ -2413,16 +2484,16 @@ var ze = {
2413
2484
  j(M(s, ["exact", "prevent"]), ["enter"]),
2414
2485
  j(u, ["esc"])
2415
2486
  ]
2416
- }, null, 40, ar), [[D, r.value]]), l("div", or, [l("button", {
2487
+ }, null, 40, mr), [[D, r.value]]), l("div", hr, [l("button", {
2417
2488
  class: "add-comment-card__cancel",
2418
2489
  onClick: u
2419
2490
  }, "Cancel"), l("button", {
2420
2491
  class: m(["add-comment-card__submit", { "add-comment-card__submit--active": o.value }]),
2421
2492
  disabled: !o.value,
2422
2493
  onClick: s
2423
- }, "Comment", 10, sr)])], 32));
2494
+ }, "Comment", 10, gr)])], 32));
2424
2495
  }
2425
- }), [["__scopeId", "data-v-cc70979b"]]), lr = q, ur = ["data-card-id"], dr = 16, fr = 300, pr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2496
+ }), [["__scopeId", "data-v-ddb8719d"]]), vr = Y, yr = ["data-card-id"], br = 16, xr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2426
2497
  __name: "UnifiedSidebar",
2427
2498
  props: {
2428
2499
  isOpen: { type: Boolean },
@@ -2457,27 +2528,30 @@ var ze = {
2457
2528
  let t = p.value === e ? null : e;
2458
2529
  f.value = t, d("update:activeItemId", t);
2459
2530
  }
2460
- let y = r({
2531
+ function y(e) {
2532
+ e.stopPropagation(), !e.target.closest(".unified-sidebar__card-slot") && p.value !== null && (f.value = null, d("update:activeItemId", null));
2533
+ }
2534
+ let S = r({
2461
2535
  comments: a(() => n.comments),
2462
2536
  trackedChanges: a(() => n.trackedChanges),
2463
2537
  showResolved: a(() => n.showResolved ?? !1),
2464
2538
  isAddingComment: a(() => n.isAddingComment ?? !1),
2465
2539
  addCommentYPosition: a(() => n.addCommentYPosition ?? null)
2466
- }), S = b(null), E = b(/* @__PURE__ */ new Map()), D = /* @__PURE__ */ new Map(), A = null, j = null, N = /* @__PURE__ */ new Set();
2540
+ }), E = b(null), D = b(/* @__PURE__ */ new Map()), A = /* @__PURE__ */ new Map(), j = null, M = null, N = /* @__PURE__ */ new Set();
2467
2541
  function P() {
2468
- let e = S.value;
2469
- if (!e || !j) return;
2542
+ let e = E.value;
2543
+ if (!e || !M) return;
2470
2544
  let t = new Set(e.querySelectorAll("[data-card-id]"));
2471
2545
  if (!(t.size === N.size && [...t].every((e) => N.has(e)))) {
2472
- j.disconnect();
2473
- for (let e of t) j.observe(e);
2546
+ M.disconnect();
2547
+ for (let e of t) M.observe(e);
2474
2548
  N = t;
2475
2549
  }
2476
2550
  }
2477
2551
  function F() {
2478
- let e = n.pagesContainer, t = y.value;
2552
+ let e = n.pagesContainer, t = S.value;
2479
2553
  if (!e || t.length === 0) {
2480
- E.value = /* @__PURE__ */ new Map();
2554
+ D.value = /* @__PURE__ */ new Map();
2481
2555
  return;
2482
2556
  }
2483
2557
  let r = e.getBoundingClientRect(), i = /* @__PURE__ */ new Map();
@@ -2512,18 +2586,18 @@ var ze = {
2512
2586
  }
2513
2587
  t && s.set(e.anchorKey, c(t));
2514
2588
  }
2515
- let l = /* @__PURE__ */ new Map(), u = S.value;
2589
+ let l = /* @__PURE__ */ new Map(), u = E.value;
2516
2590
  if (u) for (let e of u.querySelectorAll("[data-card-id]")) {
2517
2591
  let t = e.dataset.cardId;
2518
2592
  t && l.set(t, e.offsetHeight);
2519
2593
  }
2520
2594
  let d = /* @__PURE__ */ new Map();
2521
- for (let { item: e, y: n } of lr(t, s, null, 1, l, D)) d.set(e.id, n);
2522
- E.value = d, P();
2595
+ for (let { item: e, y: n } of vr(t, s, null, 1, l, A)) d.set(e.id, n);
2596
+ D.value = d, P();
2523
2597
  }
2524
2598
  let I = a(() => {
2525
2599
  let e = 0;
2526
- for (let t of E.value.values()) e = Math.max(e, t);
2600
+ for (let t of D.value.values()) e = Math.max(e, t);
2527
2601
  return e + 200;
2528
2602
  }), L = a(() => {
2529
2603
  let e = p.value;
@@ -2532,23 +2606,23 @@ var ze = {
2532
2606
  if (e.startsWith("tc-")) {
2533
2607
  let t = e.split("-")[1];
2534
2608
  return `
2535
- .paged-editor__pages .docx-insertion[data-revision-id="${y.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; }
2609
+ .paged-editor__pages .docx-insertion[data-revision-id="${S.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; }
2536
2610
  .paged-editor__pages .docx-deletion[data-revision-id="${t}"] { background-color: rgba(211, 47, 47, 0.2) !important; text-decoration-thickness: 2px !important; }
2537
2611
  `;
2538
2612
  }
2539
2613
  return "";
2540
2614
  }), R = a(() => {
2541
- let e = n.pageWidthPx / 2 + dr - J, t = E.value.size > 0 || y.value.length === 0;
2615
+ let e = n.pageWidthPx / 2 + br - X, t = D.value.size > 0 || S.value.length === 0;
2542
2616
  return {
2543
2617
  position: "absolute",
2544
2618
  top: "0",
2545
2619
  left: `calc(50% + ${e}px)`,
2546
- width: fr + "px",
2620
+ width: te + "px",
2547
2621
  opacity: +!!t
2548
2622
  };
2549
2623
  });
2550
2624
  function ee(e) {
2551
- let t = E.value.get(e);
2625
+ let t = D.value.get(e);
2552
2626
  return t == null ? {
2553
2627
  position: "static",
2554
2628
  marginBottom: "8px"
@@ -2567,7 +2641,7 @@ var ze = {
2567
2641
  }));
2568
2642
  }
2569
2643
  O(() => [
2570
- y.value.length,
2644
+ S.value.length,
2571
2645
  p.value,
2572
2646
  n.pagesContainer,
2573
2647
  n.pageWidthPx,
@@ -2589,38 +2663,38 @@ var ze = {
2589
2663
  H && H.removeEventListener("scroll", B), H = V(n.pagesContainer), H && H.addEventListener("scroll", B, { passive: !0 });
2590
2664
  }
2591
2665
  return _(() => {
2592
- j = new ResizeObserver(() => B()), B(), n.pagesContainer && (A = new ResizeObserver(() => B()), A.observe(n.pagesContainer), U());
2666
+ M = new ResizeObserver(() => B()), B(), n.pagesContainer && (j = new ResizeObserver(() => B()), j.observe(n.pagesContainer), U());
2593
2667
  }), O(() => n.pagesContainer, (e) => {
2594
- A?.disconnect(), A = null, e && (A = new ResizeObserver(() => B()), A.observe(e), U());
2668
+ j?.disconnect(), j = null, e && (j = new ResizeObserver(() => B()), j.observe(e), U());
2595
2669
  }), g(() => {
2596
- A?.disconnect(), j?.disconnect(), H && H.removeEventListener("scroll", B);
2670
+ j?.disconnect(), M?.disconnect(), H && H.removeEventListener("scroll", B);
2597
2671
  }), (t, n) => (v(), c(i, null, [L.value ? (v(), o(C("style"), { key: 0 }, {
2598
2672
  default: k(() => [u(w(L.value), 1)]),
2599
2673
  _: 1
2600
2674
  })) : s("", !0), e.isOpen ? (v(), c("aside", {
2601
2675
  key: 1,
2602
2676
  ref_key: "rootRef",
2603
- ref: S,
2677
+ ref: E,
2604
2678
  class: "unified-sidebar",
2605
2679
  style: h(R.value),
2606
- onMousedown: n[11] ||= M(() => {}, ["stop"])
2680
+ onMousedown: y
2607
2681
  }, [l("div", {
2608
2682
  class: "unified-sidebar__inner",
2609
2683
  style: h({ minHeight: I.value + "px" })
2610
- }, [(v(!0), c(i, null, x(T(y), (e) => (v(), c("div", {
2684
+ }, [(v(!0), c(i, null, x(T(S), (e) => (v(), c("div", {
2611
2685
  key: e.id,
2612
2686
  class: "unified-sidebar__card-slot",
2613
2687
  "data-card-id": e.id,
2614
2688
  style: h(ee(e.id))
2615
- }, [e.kind === "add-comment" ? (v(), o(cr, {
2689
+ }, [e.kind === "add-comment" ? (v(), o(_r, {
2616
2690
  key: 0,
2617
2691
  onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
2618
2692
  onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
2619
- })) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (v(), o(Pn, {
2693
+ })) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (v(), o(Un, {
2620
2694
  key: 1,
2621
2695
  comment: e.comment,
2622
2696
  onToggleExpand: (t) => m(e.id)
2623
- }, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (v(), o(Mn, {
2697
+ }, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (v(), o(Vn, {
2624
2698
  key: 2,
2625
2699
  comment: e.comment,
2626
2700
  replies: e.replies,
@@ -2635,7 +2709,7 @@ var ze = {
2635
2709
  "replies",
2636
2710
  "expanded",
2637
2711
  "onClick"
2638
- ])) : e.kind === "tracked-change" ? (v(), o(ir, {
2712
+ ])) : e.kind === "tracked-change" ? (v(), o(pr, {
2639
2713
  key: 3,
2640
2714
  change: e.change,
2641
2715
  replies: e.replies ?? [],
@@ -2651,9 +2725,9 @@ var ze = {
2651
2725
  "replies",
2652
2726
  "expanded",
2653
2727
  "onClick"
2654
- ])) : s("", !0)], 12, ur))), 128))], 4)], 36)) : s("", !0)], 64));
2728
+ ])) : s("", !0)], 12, yr))), 128))], 4)], 36)) : s("", !0)], 64));
2655
2729
  }
2656
- }), [["__scopeId", "data-v-9e5ec80f"]]), mr = ["title", "onClick"], hr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2730
+ }), [["__scopeId", "data-v-b5509735"]]), Sr = ["title", "onClick"], Cr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2657
2731
  __name: "CommentMarginMarkers",
2658
2732
  props: {
2659
2733
  comments: {},
@@ -2708,9 +2782,9 @@ var ze = {
2708
2782
  }, [d(e, {
2709
2783
  name: r.isResolved ? "chat_bubble_check" : "chat_bubble_outline",
2710
2784
  size: 18
2711
- }, null, 8, ["name"])], 12, mr))), 128))], 36)) : s("", !0);
2785
+ }, null, 8, ["name"])], 12, Sr))), 128))], 36)) : s("", !0);
2712
2786
  }
2713
- }), [["__scopeId", "data-v-a20c82d9"]]), gr = ["aria-valuemax"], _r = { class: "docx-horizontal-ruler__ticks" }, vr = ["title", "onDblclick"], yr = 12240, br = 1440, xr = 1440, Sr = 567, Cr = 22, wr = "#4285f4", Tr = "#3367d6", Er = "#2a56c6", $ = 5, Dr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2787
+ }), [["__scopeId", "data-v-b6c7e425"]]), wr = ["aria-valuemax"], Tr = { class: "docx-horizontal-ruler__ticks" }, Er = ["title", "onDblclick"], Dr = 12240, Or = 1440, kr = 1440, Ar = 567, jr = 22, Mr = "var(--doc-primary)", Nr = "var(--doc-primary)", Pr = "var(--doc-primary-hover)", $ = 5, Fr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2714
2788
  __name: "HorizontalRuler",
2715
2789
  props: {
2716
2790
  sectionProps: {},
@@ -2744,15 +2818,15 @@ var ze = {
2744
2818
  setup(e, { emit: t }) {
2745
2819
  let n = e, r = t, o = Math.round($ * 1.6), u = b(null), d = b(null), f = b(null), p = b(0), m = b("");
2746
2820
  function _(e) {
2747
- return Y(e) * n.zoom;
2821
+ return re(e) * n.zoom;
2748
2822
  }
2749
2823
  function y(e) {
2750
- return Math.round(te(e / n.zoom));
2824
+ return Math.round(ne(e / n.zoom));
2751
2825
  }
2752
- let S = a(() => n.sectionProps?.pageWidth ?? yr), C = a(() => n.sectionProps?.marginLeft ?? br), T = a(() => n.sectionProps?.marginRight ?? br), E = a(() => S.value - C.value - T.value), D = a(() => _(S.value)), O = a(() => _(C.value)), k = a(() => _(T.value)), A = a(() => _(n.indentLeft)), j = a(() => _(n.indentRight)), N = a(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), P = a(() => _(N.value)), F = a(() => O.value + A.value), I = a(() => D.value - k.value - j.value), L = a(() => O.value + A.value + P.value), R = a(() => ({
2826
+ let S = a(() => n.sectionProps?.pageWidth ?? Dr), C = a(() => n.sectionProps?.marginLeft ?? Or), T = a(() => n.sectionProps?.marginRight ?? Or), E = a(() => S.value - C.value - T.value), D = a(() => _(S.value)), O = a(() => _(C.value)), k = a(() => _(T.value)), A = a(() => _(n.indentLeft)), j = a(() => _(n.indentRight)), N = a(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), P = a(() => _(N.value)), F = a(() => O.value + A.value), I = a(() => D.value - k.value - j.value), L = a(() => O.value + A.value + P.value), R = a(() => ({
2753
2827
  position: "relative",
2754
2828
  width: D.value + "px",
2755
- height: Cr + "px",
2829
+ height: jr + "px",
2756
2830
  backgroundColor: "transparent",
2757
2831
  overflow: "visible",
2758
2832
  userSelect: "none",
@@ -2762,9 +2836,9 @@ var ze = {
2762
2836
  top: 0,
2763
2837
  left: 0,
2764
2838
  width: O.value + "px",
2765
- height: Cr + "px",
2766
- backgroundColor: "rgba(0, 0, 0, 0.02)",
2767
- borderRight: "1px solid rgba(0,0,0,0.06)",
2839
+ height: jr + "px",
2840
+ backgroundColor: "var(--doc-shadow-subtle)",
2841
+ borderRight: "1px solid var(--doc-shadow-subtle)",
2768
2842
  cursor: n.editable ? "ew-resize" : "default",
2769
2843
  zIndex: 1
2770
2844
  })), z = a(() => ({
@@ -2772,15 +2846,15 @@ var ze = {
2772
2846
  top: 0,
2773
2847
  right: 0,
2774
2848
  width: k.value + "px",
2775
- height: Cr + "px",
2776
- backgroundColor: "rgba(0, 0, 0, 0.02)",
2777
- borderLeft: "1px solid rgba(0,0,0,0.06)",
2849
+ height: jr + "px",
2850
+ backgroundColor: "var(--doc-shadow-subtle)",
2851
+ borderLeft: "1px solid var(--doc-shadow-subtle)",
2778
2852
  cursor: n.editable ? "ew-resize" : "default",
2779
2853
  zIndex: 1
2780
2854
  })), B = a(() => {
2781
2855
  let e = [];
2782
2856
  if (n.unit === "inch") {
2783
- let t = xr / 8, n = Math.ceil(S.value / t);
2857
+ let t = kr / 8, n = Math.ceil(S.value / t);
2784
2858
  for (let r = 0; r <= n; r++) {
2785
2859
  let n = r * t;
2786
2860
  if (n > S.value) break;
@@ -2801,7 +2875,7 @@ var ze = {
2801
2875
  });
2802
2876
  }
2803
2877
  } else {
2804
- let t = Sr / 10, n = Math.ceil(S.value / t);
2878
+ let t = Ar / 10, n = Math.ceil(S.value / t);
2805
2879
  for (let r = 0; r <= n; r++) {
2806
2880
  let n = r * t;
2807
2881
  if (n > S.value) break;
@@ -2829,10 +2903,10 @@ var ze = {
2829
2903
  };
2830
2904
  }) : []);
2831
2905
  function H(e) {
2832
- return n.unit === "cm" ? (e / Sr).toFixed(1) + " cm" : (e / xr).toFixed(2) + "\"";
2906
+ return n.unit === "cm" ? (e / Ar).toFixed(1) + " cm" : (e / kr).toFixed(2) + "\"";
2833
2907
  }
2834
2908
  function U(e) {
2835
- return d.value === e ? Er : f.value === e ? Tr : wr;
2909
+ return d.value === e ? Pr : f.value === e ? Nr : Mr;
2836
2910
  }
2837
2911
  function W(e, t, r) {
2838
2912
  return {
@@ -2870,7 +2944,7 @@ var ze = {
2870
2944
  }
2871
2945
  let K = 0;
2872
2946
  function q(e, t) {
2873
- n.editable && (d.value = e, t.clientX, e === "leftMargin" ? K = C.value : e === "rightMargin" ? K = T.value : e === "leftIndent" ? K = n.indentLeft : e === "rightIndent" ? K = n.indentRight : e === "firstLineIndent" && (K = n.firstLineIndent), p.value = t.clientX - (u.value?.getBoundingClientRect().left ?? 0), m.value = H(K), document.addEventListener("mousemove", J), document.addEventListener("mouseup", ne));
2947
+ n.editable && (d.value = e, t.clientX, e === "leftMargin" ? K = C.value : e === "rightMargin" ? K = T.value : e === "leftIndent" ? K = n.indentLeft : e === "rightIndent" ? K = n.indentRight : e === "firstLineIndent" && (K = n.firstLineIndent), p.value = t.clientX - (u.value?.getBoundingClientRect().left ?? 0), m.value = H(K), document.addEventListener("mousemove", J), document.addEventListener("mouseup", Y));
2874
2948
  }
2875
2949
  function J(e) {
2876
2950
  if (!d.value || !u.value) return;
@@ -2878,13 +2952,13 @@ var ze = {
2878
2952
  if (!t) return;
2879
2953
  let n = e.clientX - t.left;
2880
2954
  p.value = n;
2881
- let r = y(n), i = re(d.value, r);
2882
- m.value = H(i), X(d.value, i);
2955
+ let r = y(n), i = X(d.value, r);
2956
+ m.value = H(i), te(d.value, i);
2883
2957
  }
2884
- function ne(e) {
2885
- d.value = null, document.removeEventListener("mousemove", J), document.removeEventListener("mouseup", ne);
2958
+ function Y(e) {
2959
+ d.value = null, document.removeEventListener("mousemove", J), document.removeEventListener("mouseup", Y);
2886
2960
  }
2887
- function re(e, t) {
2961
+ function X(e, t) {
2888
2962
  if (e === "leftMargin") {
2889
2963
  let e = S.value - T.value - 720;
2890
2964
  return Math.round(Math.max(0, Math.min(t, e)));
@@ -2904,7 +2978,7 @@ var ze = {
2904
2978
  let r = S.value - T.value - t, i = E.value - n.indentLeft - 720;
2905
2979
  return Math.round(Math.max(0, Math.min(r, i)));
2906
2980
  }
2907
- function X(e, t) {
2981
+ function te(e, t) {
2908
2982
  switch (e) {
2909
2983
  case "leftMargin":
2910
2984
  r("left-margin-change", t);
@@ -2924,7 +2998,7 @@ var ze = {
2924
2998
  }
2925
2999
  }
2926
3000
  return g(() => {
2927
- document.removeEventListener("mousemove", J), document.removeEventListener("mouseup", ne);
3001
+ document.removeEventListener("mousemove", J), document.removeEventListener("mouseup", Y);
2928
3002
  }), (t, n) => (v(), c("div", {
2929
3003
  ref_key: "rulerRef",
2930
3004
  ref: u,
@@ -2945,7 +3019,7 @@ var ze = {
2945
3019
  style: h(z.value),
2946
3020
  onMousedown: n[1] ||= M((t) => e.editable ? q("rightMargin", t) : null, ["prevent", "stop"])
2947
3021
  }, null, 36),
2948
- l("div", _r, [(v(!0), c(i, null, x(B.value, (e, t) => (v(), c(i, { key: t }, [l("div", {
3022
+ l("div", Tr, [(v(!0), c(i, null, x(B.value, (e, t) => (v(), c(i, { key: t }, [l("div", {
2949
3023
  class: "docx-horizontal-ruler__tick-line",
2950
3024
  style: h({
2951
3025
  left: e.position + "px",
@@ -2986,15 +3060,15 @@ var ze = {
2986
3060
  style: h({ left: e.px + "px" }),
2987
3061
  title: `${e.label}`,
2988
3062
  onDblclick: M((n) => t.$emit("tab-stop-remove", e.twips), ["prevent"])
2989
- }, "L", 44, vr))), 128)),
3063
+ }, "L", 44, Er))), 128)),
2990
3064
  d.value && m.value ? (v(), c("div", {
2991
3065
  key: 3,
2992
3066
  class: "docx-horizontal-ruler__tooltip",
2993
3067
  style: h({ left: p.value + "px" })
2994
3068
  }, w(m.value), 5)) : s("", !0)
2995
- ], 12, gr));
3069
+ ], 12, wr));
2996
3070
  }
2997
- }), [["__scopeId", "data-v-5644874e"]]), Or = { class: "docx-vertical-ruler__ticks" }, kr = 15840, Ar = 1440, jr = 1440, Mr = 567, Nr = 20, Pr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3071
+ }), [["__scopeId", "data-v-e917c826"]]), Ir = { class: "docx-vertical-ruler__ticks" }, Lr = 15840, Rr = 1440, zr = 1440, Br = 567, Vr = 20, Hr = /* @__PURE__ */ n(/* @__PURE__ */ f({
2998
3072
  __name: "VerticalRuler",
2999
3073
  props: {
3000
3074
  sectionProps: {},
@@ -3009,14 +3083,14 @@ var ze = {
3009
3083
  setup(e, { emit: t }) {
3010
3084
  let n = e, r = t, o = b(null), u = b(null), d = b(null);
3011
3085
  function f(e) {
3012
- return Y(e) * n.zoom;
3086
+ return re(e) * n.zoom;
3013
3087
  }
3014
3088
  function p(e) {
3015
- return Math.round(te(e / n.zoom));
3089
+ return Math.round(ne(e / n.zoom));
3016
3090
  }
3017
- let m = a(() => n.sectionProps?.pageHeight ?? kr), _ = a(() => n.sectionProps?.marginTop ?? Ar), y = a(() => n.sectionProps?.marginBottom ?? Ar), S = a(() => f(m.value)), C = a(() => f(_.value)), T = a(() => f(y.value)), E = a(() => ({
3091
+ let m = a(() => n.sectionProps?.pageHeight ?? Lr), _ = a(() => n.sectionProps?.marginTop ?? Rr), y = a(() => n.sectionProps?.marginBottom ?? Rr), S = a(() => f(m.value)), C = a(() => f(_.value)), T = a(() => f(y.value)), E = a(() => ({
3018
3092
  position: "relative",
3019
- width: Nr + "px",
3093
+ width: Vr + "px",
3020
3094
  height: S.value + "px",
3021
3095
  backgroundColor: "transparent",
3022
3096
  overflow: "visible",
@@ -3025,7 +3099,7 @@ var ze = {
3025
3099
  })), D = a(() => {
3026
3100
  let e = [];
3027
3101
  if (n.unit === "inch") {
3028
- let t = jr / 8, n = Math.ceil(m.value / t);
3102
+ let t = zr / 8, n = Math.ceil(m.value / t);
3029
3103
  for (let r = 0; r <= n; r++) {
3030
3104
  let n = r * t;
3031
3105
  if (n > m.value) break;
@@ -3046,7 +3120,7 @@ var ze = {
3046
3120
  });
3047
3121
  }
3048
3122
  } else {
3049
- let t = Mr / 10, n = Math.ceil(m.value / t);
3123
+ let t = Br / 10, n = Math.ceil(m.value / t);
3050
3124
  for (let r = 0; r <= n; r++) {
3051
3125
  let n = r * t;
3052
3126
  if (n > m.value) break;
@@ -3071,7 +3145,7 @@ var ze = {
3071
3145
  position: "absolute",
3072
3146
  top: e - 5 + "px",
3073
3147
  right: 0,
3074
- width: Nr + "px",
3148
+ width: Vr + "px",
3075
3149
  height: "10px",
3076
3150
  cursor: n.editable ? "ns-resize" : "default",
3077
3151
  zIndex: u.value === null ? 1 : 10
@@ -3087,7 +3161,7 @@ var ze = {
3087
3161
  height: "0",
3088
3162
  borderTop: "5px solid transparent",
3089
3163
  borderBottom: "5px solid transparent",
3090
- borderRight: `8px solid ${t ? "var(--doc-primary-hover, #1557b0)" : "var(--doc-primary, #1a73e8)"}`,
3164
+ borderRight: `8px solid ${t ? "var(--doc-primary-hover)" : "var(--doc-primary)"}`,
3091
3165
  transition: "border-right-color 0.1s"
3092
3166
  };
3093
3167
  }
@@ -3114,7 +3188,7 @@ var ze = {
3114
3188
  "aria-label": "Vertical ruler",
3115
3189
  "aria-orientation": "vertical"
3116
3190
  }, [
3117
- l("div", Or, [(v(!0), c(i, null, x(D.value, (e, t) => (v(), c(i, { key: t }, [l("div", {
3191
+ l("div", Ir, [(v(!0), c(i, null, x(D.value, (e, t) => (v(), c(i, { key: t }, [l("div", {
3118
3192
  class: "docx-vertical-ruler__tick-line",
3119
3193
  style: h({
3120
3194
  top: e.position + "px",
@@ -3143,10 +3217,10 @@ var ze = {
3143
3217
  }, [l("div", { style: h(k("bottomMargin")) }, null, 4)], 36)) : s("", !0)
3144
3218
  ], 4));
3145
3219
  }
3146
- }), [["__scopeId", "data-v-6e1bbe22"]]), Fr = { class: "doc-name" }, Ir = ["value"], Lr = {
3220
+ }), [["__scopeId", "data-v-42fc6ef7"]]), Ur = { class: "doc-name" }, Wr = ["value"], Gr = {
3147
3221
  key: 1,
3148
3222
  class: "doc-name__text"
3149
- }, Rr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3223
+ }, Kr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3150
3224
  __name: "DocumentName",
3151
3225
  props: {
3152
3226
  modelValue: {},
@@ -3165,28 +3239,28 @@ var ze = {
3165
3239
  function s(e) {
3166
3240
  e.target.value.trim() || r("update:modelValue", "Untitled document.docx");
3167
3241
  }
3168
- return (t, n) => (v(), c("div", Fr, [e.editable ? (v(), c("input", {
3242
+ return (t, n) => (v(), c("div", Ur, [e.editable ? (v(), c("input", {
3169
3243
  key: 0,
3170
3244
  class: "doc-name__input",
3171
3245
  value: i.value,
3172
3246
  onInput: o,
3173
3247
  onBlur: s,
3174
3248
  placeholder: "Untitled document"
3175
- }, null, 40, Ir)) : (v(), c("span", Lr, w(i.value || "Untitled document"), 1))]));
3249
+ }, null, 40, Wr)) : (v(), c("span", Gr, w(i.value || "Untitled document"), 1))]));
3176
3250
  }
3177
- }), [["__scopeId", "data-v-d78ee2fa"]]), zr = ["disabled", "onClick"], Br = {
3251
+ }), [["__scopeId", "data-v-3f4b57cc"]]), qr = ["disabled", "onClick"], Jr = {
3178
3252
  key: 0,
3179
3253
  class: "docx-menu-dropdown__separator"
3180
- }, Vr = ["onMouseenter", "onMouseleave"], Hr = ["disabled", "onClick"], Ur = { class: "docx-menu-dropdown__label" }, Wr = {
3254
+ }, Yr = ["onMouseenter", "onMouseleave"], Xr = ["disabled", "onClick"], Zr = { class: "docx-menu-dropdown__label" }, Qr = {
3181
3255
  key: 1,
3182
3256
  class: "docx-menu-dropdown__shortcut"
3183
- }, Gr = {
3257
+ }, $r = {
3184
3258
  key: 2,
3185
3259
  class: "docx-menu-dropdown__chevron"
3186
- }, Kr = {
3260
+ }, ei = {
3187
3261
  key: 0,
3188
3262
  class: "docx-menu-dropdown__submenu"
3189
- }, qr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3263
+ }, ti = /* @__PURE__ */ n(/* @__PURE__ */ f({
3190
3264
  __name: "MenuDropdown",
3191
3265
  props: {
3192
3266
  label: {},
@@ -3223,11 +3297,11 @@ var ze = {
3223
3297
  key: 0,
3224
3298
  name: "arrow_drop_down",
3225
3299
  size: 16
3226
- })) : s("", !0)], 42, zr)]),
3300
+ })) : s("", !0)], 42, qr)]),
3227
3301
  panel: k(() => [l("div", {
3228
3302
  class: "docx-menu-dropdown__menu",
3229
3303
  onMousedown: g[1] ||= M(() => {}, ["prevent"])
3230
- }, [(v(!0), c(i, null, x(t.items, (t, r) => (v(), c(i, { key: r }, [n(t) ? (v(), c("div", Br)) : (v(), c("div", {
3304
+ }, [(v(!0), c(i, null, x(t.items, (t, r) => (v(), c(i, { key: r }, [n(t) ? (v(), c("div", Jr)) : (v(), c("div", {
3231
3305
  key: 1,
3232
3306
  class: "docx-menu-dropdown__wrap",
3233
3307
  onMouseenter: (e) => t.submenu ? a.value = r : void 0,
@@ -3243,20 +3317,20 @@ var ze = {
3243
3317
  name: t.icon,
3244
3318
  size: 18
3245
3319
  }, null, 8, ["name"])) : s("", !0),
3246
- l("span", Ur, w(t.label), 1),
3247
- t.shortcut ? (v(), c("span", Wr, w(t.shortcut), 1)) : s("", !0),
3248
- t.submenu ? (v(), c("span", Gr, [d(e, {
3320
+ l("span", Zr, w(t.label), 1),
3321
+ t.shortcut ? (v(), c("span", Qr, w(t.shortcut), 1)) : s("", !0),
3322
+ t.submenu ? (v(), c("span", $r, [d(e, {
3249
3323
  name: "keyboard_arrow_right",
3250
3324
  size: 16
3251
3325
  })])) : s("", !0)
3252
- ], 10, Hr), t.submenu && a.value === r ? (v(), c("div", Kr, [S(h.$slots, "submenu", {
3326
+ ], 10, Xr), t.submenu && a.value === r ? (v(), c("div", ei, [S(h.$slots, "submenu", {
3253
3327
  item: t,
3254
3328
  closeMenu: f
3255
- }, void 0, !0)])) : s("", !0)], 40, Vr))], 64))), 128))], 32)]),
3329
+ }, void 0, !0)])) : s("", !0)], 40, Yr))], 64))), 128))], 32)]),
3256
3330
  _: 3
3257
3331
  }, 8, ["open"]));
3258
3332
  }
3259
- }), [["__scopeId", "data-v-65cffcb2"]]), Jr = ["aria-selected", "onMouseenter"], Yr = { class: "docx-table-grid-inline__label" }, Xr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3333
+ }), [["__scopeId", "data-v-f87b9133"]]), ni = ["aria-selected", "onMouseenter"], ri = { class: "docx-table-grid-inline__label" }, ii = /* @__PURE__ */ n(/* @__PURE__ */ f({
3260
3334
  __name: "TableGridInline",
3261
3335
  props: {
3262
3336
  gridRows: { default: 6 },
@@ -3292,105 +3366,135 @@ var ze = {
3292
3366
  o.value = e.r, s.value = e.c;
3293
3367
  },
3294
3368
  onClick: M(d, ["prevent"])
3295
- }, null, 42, Jr))), 128))], 36), l("div", Yr, w(o.value > 0 && s.value > 0 ? `${s.value} × ${o.value}` : "Select size"), 1)]));
3369
+ }, null, 42, ni))), 128))], 36), l("div", ri, w(o.value > 0 && s.value > 0 ? `${s.value} × ${o.value}` : "Select size"), 1)]));
3296
3370
  }
3297
- }), [["__scopeId", "data-v-ecd8fc63"]]), Zr = {
3371
+ }), [["__scopeId", "data-v-62b10375"]]), ai = {
3298
3372
  class: "menu-bar",
3299
3373
  role: "menubar"
3300
- }, Qr = /* @__PURE__ */ n(/* @__PURE__ */ f({
3374
+ }, oi = {
3375
+ key: 1,
3376
+ class: "menu-bar__break-submenu"
3377
+ }, si = ["onClick"], ci = /* @__PURE__ */ n(/* @__PURE__ */ f({
3301
3378
  __name: "MenuBar",
3302
3379
  emits: ["action", "insert-table"],
3303
- setup(e, { emit: n }) {
3304
- let r = n, { t: i } = t();
3305
- function l(e) {
3306
- return () => r("action", e);
3380
+ setup(n, { emit: r }) {
3381
+ let u = r, { t: f } = t();
3382
+ function p(e) {
3383
+ return () => u("action", e);
3307
3384
  }
3308
- let u = a(() => [
3385
+ let m = a(() => [
3309
3386
  {
3310
3387
  icon: "file_upload",
3311
- label: i("toolbar.open"),
3312
- shortcut: i("toolbar.openShortcut"),
3313
- onClick: l("open")
3388
+ label: f("toolbar.open"),
3389
+ shortcut: f("toolbar.openShortcut"),
3390
+ onClick: p("open")
3314
3391
  },
3315
3392
  {
3316
3393
  icon: "file_download",
3317
- label: i("toolbar.save"),
3318
- shortcut: i("toolbar.saveShortcut"),
3319
- onClick: l("save")
3394
+ label: f("toolbar.save"),
3395
+ shortcut: f("toolbar.saveShortcut"),
3396
+ onClick: p("save")
3320
3397
  },
3321
3398
  { type: "separator" },
3322
3399
  {
3323
3400
  icon: "settings",
3324
- label: i("toolbar.pageSetup"),
3325
- onClick: l("pageSetup")
3401
+ label: f("toolbar.pageSetup"),
3402
+ onClick: p("pageSetup")
3326
3403
  }
3327
- ]), f = a(() => [{
3404
+ ]), h = a(() => [{
3328
3405
  icon: "format_textdirection_l_to_r",
3329
- label: i("toolbar.leftToRight"),
3330
- onClick: l("dirLTR")
3406
+ label: f("toolbar.leftToRight"),
3407
+ onClick: p("dirLTR")
3331
3408
  }, {
3332
3409
  icon: "format_textdirection_r_to_l",
3333
- label: i("toolbar.rightToLeft"),
3334
- onClick: l("dirRTL")
3335
- }]), p = a(() => [
3410
+ label: f("toolbar.rightToLeft"),
3411
+ onClick: p("dirRTL")
3412
+ }]), g = a(() => [
3336
3413
  {
3337
3414
  icon: "image",
3338
- label: i("toolbar.image"),
3339
- onClick: l("insertImage")
3415
+ label: f("toolbar.image"),
3416
+ onClick: p("insertImage")
3340
3417
  },
3341
3418
  {
3342
3419
  icon: "grid_on",
3343
- label: i("toolbar.table"),
3420
+ label: f("toolbar.table"),
3344
3421
  key: "table",
3345
3422
  submenu: !0
3346
3423
  },
3347
3424
  { type: "separator" },
3348
3425
  {
3349
3426
  icon: "page_break",
3350
- label: i("toolbar.pageBreak"),
3351
- onClick: l("insertPageBreak")
3427
+ label: f("toolbar.break"),
3428
+ key: "break",
3429
+ submenu: !0
3352
3430
  },
3353
3431
  {
3354
3432
  icon: "format_list_numbered",
3355
- label: i("toolbar.tableOfContents"),
3356
- onClick: l("insertTOC")
3433
+ label: f("toolbar.tableOfContents"),
3434
+ onClick: p("insertTOC")
3357
3435
  },
3358
3436
  {
3359
3437
  icon: "branding_watermark",
3360
- label: i("toolbar.watermark"),
3361
- onClick: l("watermark")
3438
+ label: f("toolbar.watermark"),
3439
+ onClick: p("watermark")
3440
+ }
3441
+ ]), _ = a(() => [
3442
+ {
3443
+ icon: "page_break",
3444
+ label: f("toolbar.pageBreak"),
3445
+ action: "insertPageBreak"
3446
+ },
3447
+ {
3448
+ icon: "horizontal_rule",
3449
+ label: f("toolbar.sectionBreakNextPage"),
3450
+ action: "insertSectionBreakNextPage"
3451
+ },
3452
+ {
3453
+ icon: "border_horizontal",
3454
+ label: f("toolbar.sectionBreakContinuous"),
3455
+ action: "insertSectionBreakContinuous"
3362
3456
  }
3363
- ]), m = a(() => [{
3364
- label: i("toolbar.reportIssue"),
3365
- onClick: l("reportIssue")
3457
+ ]), y = a(() => [{
3458
+ label: f("toolbar.reportIssue"),
3459
+ onClick: p("reportIssue")
3366
3460
  }]);
3367
- return (e, t) => (v(), c("div", Zr, [
3368
- d(qr, {
3369
- label: T(i)("toolbar.file"),
3370
- items: u.value
3461
+ return (t, n) => (v(), c("div", ai, [
3462
+ d(ti, {
3463
+ label: T(f)("toolbar.file"),
3464
+ items: m.value
3371
3465
  }, null, 8, ["label", "items"]),
3372
- d(qr, {
3373
- label: T(i)("toolbar.format"),
3374
- items: f.value
3466
+ d(ti, {
3467
+ label: T(f)("toolbar.format"),
3468
+ items: h.value
3375
3469
  }, null, 8, ["label", "items"]),
3376
- d(qr, {
3377
- label: T(i)("toolbar.insert"),
3378
- items: p.value
3470
+ d(ti, {
3471
+ label: T(f)("toolbar.insert"),
3472
+ items: g.value
3379
3473
  }, {
3380
- submenu: k(({ item: e, closeMenu: t }) => [e.key === "table" ? (v(), o(Xr, {
3474
+ submenu: k(({ item: t, closeMenu: n }) => [t.key === "table" ? (v(), o(ii, {
3381
3475
  key: 0,
3382
- onInsert: (e, n) => {
3383
- r("insert-table", e, n), t();
3476
+ onInsert: (e, t) => {
3477
+ u("insert-table", e, t), n();
3384
3478
  }
3385
- }, null, 8, ["onInsert"])) : s("", !0)]),
3479
+ }, null, 8, ["onInsert"])) : t.key === "break" ? (v(), c("div", oi, [(v(!0), c(i, null, x(_.value, (t) => (v(), c("button", {
3480
+ key: t.action,
3481
+ type: "button",
3482
+ class: "menu-bar__break-item",
3483
+ onClick: M(() => {
3484
+ u("action", t.action), n();
3485
+ }, ["prevent"])
3486
+ }, [d(e, {
3487
+ name: t.icon,
3488
+ size: 18
3489
+ }, null, 8, ["name"]), l("span", null, w(t.label), 1)], 8, si))), 128))])) : s("", !0)]),
3386
3490
  _: 1
3387
3491
  }, 8, ["label", "items"]),
3388
- d(qr, {
3389
- label: T(i)("toolbar.help"),
3390
- items: m.value
3492
+ d(ti, {
3493
+ label: T(f)("toolbar.help"),
3494
+ items: y.value
3391
3495
  }, null, 8, ["label", "items"])
3392
3496
  ]));
3393
3497
  }
3394
- }), [["__scopeId", "data-v-6fc03bf3"]]);
3498
+ }), [["__scopeId", "data-v-14562b7b"]]);
3395
3499
  //#endregion
3396
- export { je as C, _e as D, Q as E, Me as S, Ee as T, kt as _, Pr as a, yt as b, pr as c, Pn as d, Mn as f, ln as g, un as h, Rr as i, cr as l, vn as m, Xr as n, Dr as o, Sn as p, qr as r, hr as s, Qr as t, ir as u, wt as v, Ae as w, vt as x, Ct as y };
3500
+ export { Pe as C, be as D, Q as E, Fe as S, ke as T, Rt as _, Hr as a, Ot as b, xr as c, Un as d, Vn as f, vn as g, yn as h, Kr as i, _r as l, Dn as m, ii as n, Fr as o, jn as p, ti as r, Cr as s, ci as t, pr as u, Nt as v, Ne as w, Dt as x, Mt as y };