@univerjs/docs-ui 0.2.4-alpha.0 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,12 +1,14 @@
1
1
  var Sn = Object.defineProperty;
2
2
  var vn = (t, e, n) => e in t ? Sn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var C = (t, e, n) => vn(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { FOCUSING_DOC as Ue, FOCUSING_UNIVER_EDITOR as dt, FOCUSING_COMMON_DRAWINGS as Xt, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Rn, Tools as j, LRUMap as On, BaselineOffset as ae, BooleanNumber as S, ColorKit as ft, DataStreamTreeTokenType as Pe, CustomRangeType as Kt, skipParseTagNames as Cn, createIdentifier as En, Inject as E, IUniverInstanceService as w, ILogService as Zt, ICommandService as O, Disposable as Q, SliceBodyType as mt, normalizeBody as Tn, UniverInstanceType as v, toDisposable as Jt, RxDisposable as Se, Direction as K, EDITOR_ACTIVATED as qt, LocaleService as le, Injector as Le, Optional as In, useDependency as z, CommandType as de, DocumentFlavor as bn, JSONX as Qe, ThemeService as Qt, HorizontalAlign as we, OnLifecycle as Be, LifecycleStages as $e, IContextService as Mn, checkForSubstrings as yn, IConfigService as xn, isInternalEditorID as Pn, DisposableCollection as St, Plugin as Dn, ObjectRelativeFromH as An, ObjectRelativeFromV as Nn } from "@univerjs/core";
5
- import { IClipboardInterfaceService as ut, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as Fn, HTML_CLIPBOARD_MIME_TYPE as Un, IEditorService as ee, KeyCode as H, MetaKeys as ve, ILayoutService as en, ISidebarService as Ln, ComponentManager as tn, MenuGroup as x, MenuItemType as y, MenuPosition as P, getMenuHiddenObservable as D, FONT_FAMILY_LIST as vt, FONT_SIZE_LIST as wn, getHeaderFooterMenuHiddenObservable as Bn, FontFamily as $n, FontFamilyItem as Hn, FontSize as Vn, IMenuService as jn, CopyCommand as Wn, CutCommand as kn, PasteCommand as Gn, SetEditorResizeOperation as zn, ICanvasPopupService as Yn, IShortcutService as Xn } from "@univerjs/ui";
6
- import { TextSelectionManagerService as te, DocCustomRangeService as Kn, CutContentCommand as nn, InnerPasteCommand as on, getDeleteSelection as Zn, DocSkeletonManagerService as L, VIEWPORT_KEY as q, getDocObject as Jn, MoveCursorOperation as He, MoveSelectionOperation as Ve, SelectAllOperation as qn, neoGetDocObject as J, RichTextEditingMutation as ht, SetInlineFormatBoldCommand as Qn, SetTextSelectionsOperation as V, SetInlineFormatCommand as ue, SetInlineFormatItalicCommand as eo, SetInlineFormatUnderlineCommand as to, SetInlineFormatStrikethroughCommand as no, SetInlineFormatSubscriptCommand as oo, SetInlineFormatSuperscriptCommand as ro, SetInlineFormatFontFamilyCommand as Rt, SetInlineFormatFontSizeCommand as Ot, SetInlineFormatTextColorCommand as Ct, AlignLeftCommand as io, AlignOperationCommand as je, AlignCenterCommand as so, AlignRightCommand as ao, AlignJustifyCommand as co, OrderListCommand as lo, BulletListCommand as uo, ResetInlineFormatTextBackgroundColorCommand as ho, SetInlineFormatTextBackgroundColorCommand as et, BreakLineCommand as go, DeleteLeftCommand as po, DeleteRightCommand as _o, CoverContentCommand as fo, DOCS_COMPONENT_MAIN_LAYER_INDEX as Ye, DOCS_COMPONENT_HEADER_LAYER_INDEX as mo, DOCS_VIEW_KEY as oe, DOCS_COMPONENT_DEFAULT_Z_INDEX as Et, DOCS_COMPONENT_BACKGROUND_LAYER_INDEX as So, SetDocZoomRatioCommand as vo, SetDocZoomRatioOperation as De, DocInterceptorService as Ro } from "@univerjs/docs";
3
+ var T = (t, e, n) => vn(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { FOCUSING_DOC as Ue, FOCUSING_UNIVER_EDITOR as dt, FOCUSING_COMMON_DRAWINGS as Xt, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Rn, Tools as j, LRUMap as On, BaselineOffset as ae, BooleanNumber as S, ColorKit as _t, DataStreamTreeTokenType as Pe, CustomRangeType as Kt, skipParseTagNames as Cn, IUniverInstanceService as w, ILogService as Zt, ICommandService as O, Disposable as Q, SliceBodyType as mt, normalizeBody as En, UniverInstanceType as v, toDisposable as Jt, RxDisposable as Se, Direction as K, EDITOR_ACTIVATED as qt, LocaleService as le, CommandType as de, DocumentFlavor as Tn, JSONX as Qe, ThemeService as Qt, HorizontalAlign as Le, OnLifecycle as we, LifecycleStages as Be, IContextService as In, checkForSubstrings as bn, IConfigService as Mn, isInternalEditorID as yn, DisposableCollection as St, Plugin as xn, ObjectRelativeFromH as Pn, ObjectRelativeFromV as Dn } from "@univerjs/core";
5
+ import { IClipboardInterfaceService as ut, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as An, HTML_CLIPBOARD_MIME_TYPE as Nn, IEditorService as ee, KeyCode as H, MetaKeys as ve, ILayoutService as en, ISidebarService as Fn, ComponentManager as tn, MenuGroup as x, MenuItemType as y, MenuPosition as P, getMenuHiddenObservable as D, FONT_FAMILY_LIST as vt, FONT_SIZE_LIST as Un, getHeaderFooterMenuHiddenObservable as Ln, FontFamily as wn, FontFamilyItem as Bn, FontSize as $n, IMenuService as Hn, CopyCommand as Vn, CutCommand as jn, PasteCommand as Wn, SetEditorResizeOperation as kn, ICanvasPopupService as Gn, IShortcutService as zn } from "@univerjs/ui";
6
+ import { createIdentifier as Yn, Inject as I, Injector as $e, Optional as Xn } from "@wendellhu/redi";
7
+ import { TextSelectionManagerService as te, DocCustomRangeService as Kn, CutContentCommand as nn, InnerPasteCommand as on, getDeleteSelection as Zn, DocSkeletonManagerService as L, VIEWPORT_KEY as q, getDocObject as Jn, MoveCursorOperation as He, MoveSelectionOperation as Ve, SelectAllOperation as qn, neoGetDocObject as J, RichTextEditingMutation as ht, SetInlineFormatBoldCommand as Qn, SetTextSelectionsOperation as V, SetInlineFormatCommand as ue, SetInlineFormatItalicCommand as eo, SetInlineFormatUnderlineCommand as to, SetInlineFormatStrikethroughCommand as no, SetInlineFormatSubscriptCommand as oo, SetInlineFormatSuperscriptCommand as ro, SetInlineFormatFontFamilyCommand as Rt, SetInlineFormatFontSizeCommand as Ot, SetInlineFormatTextColorCommand as Ct, AlignLeftCommand as io, AlignOperationCommand as je, AlignCenterCommand as so, AlignRightCommand as ao, AlignJustifyCommand as co, OrderListCommand as lo, BulletListCommand as uo, ResetInlineFormatTextBackgroundColorCommand as ho, SetInlineFormatTextBackgroundColorCommand as et, BreakLineCommand as go, DeleteLeftCommand as po, DeleteRightCommand as fo, CoverContentCommand as _o, DOCS_COMPONENT_MAIN_LAYER_INDEX as Ye, DOCS_COMPONENT_HEADER_LAYER_INDEX as mo, DOCS_VIEW_KEY as oe, DOCS_COMPONENT_DEFAULT_Z_INDEX as Et, DOCS_COMPONENT_BACKGROUND_LAYER_INDEX as So, SetDocZoomRatioCommand as vo, SetDocZoomRatioOperation as De, DocInterceptorService as Ro } from "@univerjs/docs";
7
8
  import { pixelToPt as Oo, ptToPixel as Tt, NodePositionConvertToCursor as rn, getAnchorBounding as Co, IRenderManagerService as W, ITextSelectionRenderManager as ne, Shape as Eo, DocumentEditArea as F, PageLayoutType as Ae, Vector2 as sn, Rect as Xe, Path as It, ScrollBar as tt, Viewport as To, Layer as bt, Documents as Io, DocBackground as bo, CURSOR_TYPE as Mt, getLineBounding as Mo } from "@univerjs/engine-render";
8
9
  import { takeUntil as se, Observable as B, combineLatest as yo, fromEvent as yt, BehaviorSubject as xt, map as xo } from "rxjs";
9
10
  import Po, { useState as an, useEffect as cn } from "react";
11
+ import { useDependency as z } from "@wendellhu/redi/react-bindings";
10
12
  import { Checkbox as Pt, InputNumber as Dt, Button as Do, ColorPicker as Ao } from "@univerjs/design";
11
13
  import No from "clsx";
12
14
  function k(t) {
@@ -25,7 +27,7 @@ function Bo(t) {
25
27
  }
26
28
  class $o {
27
29
  constructor() {
28
- C(this, "_cache", new On(Uo));
30
+ T(this, "_cache", new On(Uo));
29
31
  }
30
32
  set(e, n) {
31
33
  this._cache.set(e, n);
@@ -100,14 +102,14 @@ function gt(t) {
100
102
  break;
101
103
  }
102
104
  case "color": {
103
- const a = new ft(s);
105
+ const a = new _t(s);
104
106
  a.isValid && (n.cl = {
105
107
  rgb: a.toRgbString()
106
108
  });
107
109
  break;
108
110
  }
109
111
  case "background-color": {
110
- const a = new ft(s);
112
+ const a = new _t(s);
111
113
  a.isValid && (n.bg = {
112
114
  rgb: a.toRgbString()
113
115
  });
@@ -127,9 +129,9 @@ function Nt(t, e) {
127
129
  }
128
130
  const Fe = class Fe {
129
131
  constructor() {
130
- C(this, "_styleCache", /* @__PURE__ */ new Map());
131
- C(this, "_styleRules", []);
132
- C(this, "_afterProcessRules", []);
132
+ T(this, "_styleCache", /* @__PURE__ */ new Map());
133
+ T(this, "_styleRules", []);
134
+ T(this, "_afterProcessRules", []);
133
135
  }
134
136
  static use(e) {
135
137
  if (this._pluginList.includes(e))
@@ -186,7 +188,7 @@ const Fe = class Fe {
186
188
  }
187
189
  }
188
190
  };
189
- C(Fe, "_pluginList", []);
191
+ T(Fe, "_pluginList", []);
190
192
  let ce = Fe;
191
193
  const Vo = {
192
194
  name: "univer-doc-paste-plugin-lark",
@@ -295,10 +297,10 @@ const Wo = {
295
297
  ]
296
298
  }, zo = Go;
297
299
  function Ft(t, e) {
298
- const { st: n, ed: o, ts: r = {} } = e, { ff: i, fs: s, it: a, bl: c, ul: d, st: g, ol: h, bg: p, cl: l, va: _ } = r;
300
+ const { st: n, ed: o, ts: r = {} } = e, { ff: i, fs: s, it: a, bl: c, ul: d, st: g, ol: h, bg: p, cl: l, va: f } = r;
299
301
  let u = t.slice(n, o);
300
- const f = [];
301
- return a === S.TRUE && (u = `<i>${u}</i>`), _ === ae.SUPERSCRIPT ? u = `<sup>${u}</sup>` : _ === ae.SUBSCRIPT && (u = `<sub>${u}</sub>`), (d == null ? void 0 : d.s) === S.TRUE && (u = `<u>${u}</u>`), (g == null ? void 0 : g.s) === S.TRUE && (u = `<s>${u}</s>`), c === S.TRUE && (u = `<strong>${u}</strong>`), i && f.push(`font-family: ${i}`), l && f.push(`color: ${l.rgb}`), s && f.push(`font-size: ${s}pt`), h && f.push("text-decoration: overline"), p && f.push(`background: ${p.rgb}`), f.length ? `<span style="${f.join("; ")};">${u}</span>` : u;
302
+ const _ = [];
303
+ return a === S.TRUE && (u = `<i>${u}</i>`), f === ae.SUPERSCRIPT ? u = `<sup>${u}</sup>` : f === ae.SUBSCRIPT && (u = `<sub>${u}</sub>`), (d == null ? void 0 : d.s) === S.TRUE && (u = `<u>${u}</u>`), (g == null ? void 0 : g.s) === S.TRUE && (u = `<s>${u}</s>`), c === S.TRUE && (u = `<strong>${u}</strong>`), i && _.push(`font-family: ${i}`), l && _.push(`color: ${l.rgb}`), s && _.push(`font-size: ${s}pt`), h && _.push("text-decoration: overline"), p && _.push(`background: ${p.rgb}`), _.length ? `<span style="${_.join("; ")};">${u}</span>` : u;
302
304
  }
303
305
  function Ke(t, e, n) {
304
306
  const { dataStream: o, textRuns: r = [] } = t;
@@ -350,13 +352,13 @@ var Xo = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, Zo = (t, e
350
352
  ce.use(ko);
351
353
  ce.use(jo);
352
354
  ce.use(zo);
353
- const Re = En("doc.clipboard-service");
355
+ const Re = Yn("doc.clipboard-service");
354
356
  let nt = class extends Q {
355
357
  constructor(e, n, o, r, i, s) {
356
358
  super();
357
- C(this, "_clipboardHooks", []);
358
- C(this, "_htmlToUDM", new ce());
359
- C(this, "_umdToHtml", new Yo());
359
+ T(this, "_clipboardHooks", []);
360
+ T(this, "_htmlToUDM", new ce());
361
+ T(this, "_umdToHtml", new Yo());
360
362
  this._univerInstanceService = e, this._logService = n, this._commandService = o, this._clipboardInterfaceService = r, this._textSelectionManagerService = i, this._docCustomRangeService = s;
361
363
  }
362
364
  async copy(e = mt.copy) {
@@ -412,7 +414,7 @@ let nt = class extends Q {
412
414
  }
413
415
  async _paste(e) {
414
416
  var d, g;
415
- let n = Tn(e);
417
+ let n = En(e);
416
418
  const o = (d = this._univerInstanceService.getCurrentUnitForType(v.UNIVER_DOC)) == null ? void 0 : d.getUnitId();
417
419
  if (!o)
418
420
  return !1;
@@ -425,8 +427,8 @@ let nt = class extends Q {
425
427
  try {
426
428
  let h = s;
427
429
  for (const l of c) {
428
- const { startOffset: _, endOffset: u } = l;
429
- _ == null || u == null || u <= s && (h += n.dataStream.length - (u - _));
430
+ const { startOffset: f, endOffset: u } = l;
431
+ f == null || u == null || u <= s && (h += n.dataStream.length - (u - f));
430
432
  }
431
433
  const p = [
432
434
  {
@@ -464,14 +466,14 @@ let nt = class extends Q {
464
466
  const p = Zn({ startOffset: d, endOffset: g, collapsed: h }, s), l = r.getSelfOrHeaderFooterModel(a).sliceBody(p.startOffset, p.endOffset, e);
465
467
  if (l != null) {
466
468
  if (l.customRanges) {
467
- const _ = [];
469
+ const f = [];
468
470
  l.customRanges.forEach((m) => {
469
- m.startIndex === m.endIndex && _.push(m);
470
- }), l.customRanges = l.customRanges.filter((m) => _.indexOf(m) === -1);
471
- let u = "", f = 0;
472
- _.forEach((m) => {
473
- u += l.dataStream.slice(f, m.endIndex), f = m.endIndex + 1;
474
- }), u += l.dataStream.slice(f, l.dataStream.length), l.dataStream = u;
471
+ m.startIndex === m.endIndex && f.push(m);
472
+ }), l.customRanges = l.customRanges.filter((m) => f.indexOf(m) === -1);
473
+ let u = "", _ = 0;
474
+ f.forEach((m) => {
475
+ u += l.dataStream.slice(_, m.endIndex), _ = m.endIndex + 1;
476
+ }), u += l.dataStream.slice(_, l.dataStream.length), l.dataStream = u;
475
477
  }
476
478
  i.push(l);
477
479
  }
@@ -483,7 +485,7 @@ let nt = class extends Q {
483
485
  let n = "", o = "";
484
486
  for (const r of e)
485
487
  for (const i of r.types)
486
- i === Fn ? o = await r.getType(i).then((s) => s && s.text()) : i === Un && (n = await r.getType(i).then((s) => s && s.text()));
488
+ i === An ? o = await r.getType(i).then((s) => s && s.text()) : i === Nn && (n = await r.getType(i).then((s) => s && s.text()));
487
489
  return this._generateBodyFromHtmlAndText(n, o);
488
490
  } catch (n) {
489
491
  return Promise.reject(n);
@@ -535,8 +537,8 @@ nt = Zo([
535
537
  re(1, Zt),
536
538
  re(2, O),
537
539
  re(3, ut),
538
- re(4, E(te)),
539
- re(5, E(Kn))
540
+ re(4, I(te)),
541
+ re(5, I(Kn))
540
542
  ], nt);
541
543
  var Jo = Object.defineProperty, qo = Object.getOwnPropertyDescriptor, Qo = (t, e, n, o) => {
542
544
  for (var r = o > 1 ? void 0 : o ? qo(e, n) : e, i = t.length - 1, s; i >= 0; i--)
@@ -569,19 +571,19 @@ let ot = class extends Se {
569
571
  const n = this._getDocObject(), o = (G = this._renderManagerService.getRenderById(t)) == null ? void 0 : G.with(L), r = o == null ? void 0 : o.getSkeleton();
570
572
  if (n == null || r == null)
571
573
  return;
572
- const i = n.document.getOffsetConfig(), { docsLeft: s, docsTop: a } = i, c = new rn(i, r), { contentBoxPointGroup: d } = c.getRangePointData(e, e), { left: g, top: h, height: p } = Co(d), l = g + s, _ = h + a, u = n.scene.getViewport(q.VIEW_MAIN), f = !!this._editorService.getEditor(t);
574
+ const i = n.document.getOffsetConfig(), { docsLeft: s, docsTop: a } = i, c = new rn(i, r), { contentBoxPointGroup: d } = c.getRangePointData(e, e), { left: g, top: h, height: p } = Co(d), l = g + s, f = h + a, u = n.scene.getViewport(q.VIEW_MAIN), _ = !!this._editorService.getEditor(t);
573
575
  if (u == null)
574
576
  return;
575
577
  const {
576
578
  left: m,
577
579
  top: R,
578
- right: I,
579
- bottom: b
580
+ right: C,
581
+ bottom: E
580
582
  } = u.getBounding().viewBound;
581
- let T = 0, A = 0;
582
- const N = f ? 0 : 100;
583
- _ < R ? T = _ - R - N : _ > b - p && (T = _ - b + p + N), l < m ? A = l - m : l > I - Lt && (A = l - I + Lt);
584
- const Y = u.transViewportScroll2ScrollValue(A, T);
583
+ let b = 0, A = 0;
584
+ const N = _ ? 0 : 100;
585
+ f < R ? b = f - R - N : f > E - p && (b = f - E + p + N), l < m ? A = l - m : l > C - Lt && (A = l - C + Lt);
586
+ const Y = u.transViewportScroll2ScrollValue(A, b);
585
587
  u.scrollBy(Y);
586
588
  }
587
589
  // Let the selection show on the current screen.
@@ -597,9 +599,9 @@ let ot = class extends Se {
597
599
  }
598
600
  };
599
601
  ot = Qo([
600
- Oe(1, E(te)),
602
+ Oe(1, I(te)),
601
603
  Oe(2, ee),
602
- Oe(3, E(w)),
604
+ Oe(3, I(w)),
603
605
  Oe(4, W)
604
606
  ], ot);
605
607
  const er = {
@@ -709,16 +711,16 @@ const er = {
709
711
  binding: H.A | ve.CTRL_COMMAND,
710
712
  preconditions: (t) => t.getContextValue(dt) && (t.getContextValue(Ue) || t.getContextValue(qt))
711
713
  };
712
- var gr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, _r = (t, e, n, o) => {
714
+ var gr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, fr = (t, e, n, o) => {
713
715
  for (var r = o > 1 ? void 0 : o ? pr(e, n) : e, i = t.length - 1, s; i >= 0; i--)
714
716
  (s = t[i]) && (r = (o ? s(e, n, r) : s(r)) || r);
715
717
  return o && r && gr(e, n, r), r;
716
718
  }, wt = (t, e) => (n, o) => e(n, o, t);
717
719
  let rt = class {
718
720
  constructor(t, e, n) {
719
- C(this, "_docContainer");
721
+ T(this, "_docContainer");
720
722
  // 获取SheetContainer组件
721
- C(this, "getComponent", (t) => {
723
+ T(this, "getComponent", (t) => {
722
724
  if (this._docContainer = t, !t.getContentRef().current)
723
725
  throw new Error("container is not ready");
724
726
  });
@@ -729,7 +731,7 @@ let rt = class {
729
731
  * e: {target: HTMLSelectElement } reference from https://stackoverflow.com/a/48443771
730
732
  *
731
733
  */
732
- C(this, "changeLocale", (t) => {
734
+ T(this, "changeLocale", (t) => {
733
735
  this._localeService.setLocale(t);
734
736
  });
735
737
  this._config = t, this._localeService = e, this._injector = n;
@@ -753,19 +755,19 @@ let rt = class {
753
755
  return this._docContainer;
754
756
  }
755
757
  };
756
- rt = _r([
757
- wt(1, E(le)),
758
- wt(2, E(Le))
758
+ rt = fr([
759
+ wt(1, I(le)),
760
+ wt(2, I($e))
759
761
  ], rt);
760
- var fr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, Sr = (t, e, n, o) => {
762
+ var _r = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, Sr = (t, e, n, o) => {
761
763
  for (var r = o > 1 ? void 0 : o ? mr(e, n) : e, i = t.length - 1, s; i >= 0; i--)
762
764
  (s = t[i]) && (r = (o ? s(e, n, r) : s(r)) || r);
763
- return o && r && fr(e, n, r), r;
765
+ return o && r && _r(e, n, r), r;
764
766
  }, Ce = (t, e) => (n, o) => e(n, o, t);
765
- let fe = class extends Se {
767
+ let _e = class extends Se {
766
768
  constructor(e, n, o, r, i) {
767
769
  super();
768
- C(this, "_docContainerController");
770
+ T(this, "_docContainerController");
769
771
  /**
770
772
  * Change language
771
773
  * @param {string} locale new language
@@ -773,7 +775,7 @@ let fe = class extends Se {
773
775
  * e: {target: HTMLSelectElement } reference from https://stackoverflow.com/a/48443771
774
776
  *
775
777
  */
776
- C(this, "changeLocale", (e) => {
778
+ T(this, "changeLocale", (e) => {
777
779
  this._localeService.setLocale(e);
778
780
  });
779
781
  this._localeService = n, this._injector = o, this._textSelectionRenderManager = r, this._layoutService = i, this._docContainerController = this._injector.createInstance(rt, e), this._registerContainer();
@@ -788,12 +790,12 @@ let fe = class extends Se {
788
790
  return this._docContainerController;
789
791
  }
790
792
  };
791
- fe = Sr([
792
- Ce(1, E(le)),
793
- Ce(2, E(Le)),
793
+ _e = Sr([
794
+ Ce(1, I(le)),
795
+ Ce(2, I($e)),
794
796
  Ce(3, ne),
795
- Ce(4, In(en))
796
- ], fe);
797
+ Ce(4, Xn(en))
798
+ ], _e);
797
799
  const We = "UI_PLUGIN_DOCS", pt = `${We}_COLOR_PICKER_COMPONENT`, dn = `${We}_FONT_FAMILY_COMPONENT`, un = `${We}_FONT_FAMILY_ITEM_COMPONENT`, hn = `${We}_FONT_SIZE_COMPONENT`, Bt = 18, $t = 200, Ze = 6, vr = 4;
798
800
  function Rr(t, e) {
799
801
  let { radius: n, width: o, height: r } = e;
@@ -804,8 +806,8 @@ function Rr(t, e) {
804
806
  class Ne extends Eo {
805
807
  constructor(n, o) {
806
808
  super(n, o);
807
- C(this, "color");
808
- C(this, "text");
809
+ T(this, "color");
810
+ T(this, "text");
809
811
  this.color = o == null ? void 0 : o.color, this.text = o == null ? void 0 : o.text;
810
812
  }
811
813
  static drawWith(n, o) {
@@ -826,9 +828,9 @@ class Ne extends Eo {
826
828
  if (s > g) {
827
829
  let h = "", p = 0;
828
830
  for (const l of r) {
829
- const _ = n.measureText(l).width;
830
- if (p + _ <= g - n.measureText("...").width)
831
- h += l, p += _;
831
+ const f = n.measureText(l).width;
832
+ if (p + f <= g - n.measureText("...").width)
833
+ h += l, p += f;
832
834
  else {
833
835
  h += "...";
834
836
  break;
@@ -855,7 +857,7 @@ var pn = { exports: {} }, ke = {};
855
857
  * LICENSE file in the root directory of this source tree.
856
858
  */
857
859
  var Or = Po, Cr = Symbol.for("react.element"), Er = Symbol.for("react.fragment"), Tr = Object.prototype.hasOwnProperty, Ir = Or.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, br = { key: !0, ref: !0, __self: !0, __source: !0 };
858
- function _n(t, e, n) {
860
+ function fn(t, e, n) {
859
861
  var o, r = {}, i = null, s = null;
860
862
  n !== void 0 && (i = "" + n), e.key !== void 0 && (i = "" + e.key), e.ref !== void 0 && (s = e.ref);
861
863
  for (o in e) Tr.call(e, o) && !br.hasOwnProperty(o) && (r[o] = e[o]);
@@ -863,8 +865,8 @@ function _n(t, e, n) {
863
865
  return { $$typeof: Cr, type: t, key: i, ref: s, props: r, _owner: Ir.current };
864
866
  }
865
867
  ke.Fragment = Er;
866
- ke.jsx = _n;
867
- ke.jsxs = _n;
868
+ ke.jsx = fn;
869
+ ke.jsxs = fn;
868
870
  pn.exports = ke;
869
871
  var M = pn.exports;
870
872
  const Mr = "univer-panel", yr = "univer-options-section", xr = "univer-options-form-item", Pr = "univer-options-input", Dr = "univer-options-margin-setting", $ = {
@@ -874,57 +876,60 @@ const Mr = "univer-panel", yr = "univer-options-section", xr = "univer-options-f
874
876
  optionsInput: Pr,
875
877
  optionsMarginSetting: Dr
876
878
  }, Ar = (t) => {
877
- const e = z(le), n = z(w), o = z(W), r = z(O), i = z(ne), s = z(te), { unitId: a } = t, [c, d] = an({}), g = (l, _) => {
879
+ const e = z(le), n = z(w), o = z(W), r = z(O), i = z(ne), s = z(te), { unitId: a } = t, [c, d] = an({}), g = (l, f) => {
878
880
  var N;
879
881
  d((Y) => ({
880
882
  ...Y,
881
- [_]: l ? S.TRUE : S.FALSE
883
+ [f]: l ? S.TRUE : S.FALSE
882
884
  }));
883
- const u = n.getUniverDocInstance(a), f = u == null ? void 0 : u.getSnapshot().documentStyle, m = (N = o.getRenderById(a)) == null ? void 0 : N.with(L), R = m == null ? void 0 : m.getViewModel();
884
- if (f == null || R == null)
885
+ const u = n.getUniverDocInstance(a), _ = u == null ? void 0 : u.getSnapshot().documentStyle, m = (N = o.getRenderById(a)) == null ? void 0 : N.with(L), R = m == null ? void 0 : m.getViewModel();
886
+ if (_ == null || R == null)
885
887
  return;
886
- const I = R.getEditArea();
887
- let b = !1;
888
- const T = i.getSegmentPage();
888
+ const C = R.getEditArea();
889
+ let E = !1;
890
+ const b = i.getSegmentPage();
889
891
  let A = !1;
890
- if (_ === "useFirstPageHeaderFooter" && l === !0 && ((I === F.HEADER && !f.firstPageHeaderId || I === F.FOOTER && !f.firstPageFooterId) && (b = !0), b && T === 0 && (A = !0)), _ === "evenAndOddHeaders" && l === !0 && ((I === F.HEADER && !f.evenPageHeaderId || I === F.FOOTER && !f.evenPageFooterId) && (b = !0), b && T % 2 === 1 && (A = !0)), b) {
892
+ if (f === "useFirstPageHeaderFooter" && l === !0 && ((C === F.HEADER && !_.firstPageHeaderId || C === F.FOOTER && !_.firstPageFooterId) && (E = !0), E && b === 0 && (A = !0)), f === "evenAndOddHeaders" && l === !0 && ((C === F.HEADER && !_.evenPageHeaderId || C === F.FOOTER && !_.evenPageFooterId) && (E = !0), E && b % 2 === 1 && (A = !0)), E) {
891
893
  const G = j.generateRandomId(6);
892
894
  A && i.setSegment(G), r.executeCommand(be, {
893
895
  unitId: a,
894
896
  segmentId: G,
895
897
  headerFooterProps: {
896
- [_]: l ? S.TRUE : S.FALSE
898
+ [f]: l ? S.TRUE : S.FALSE
897
899
  }
898
900
  });
899
901
  } else
900
902
  r.executeCommand(be, {
901
903
  unitId: a,
902
904
  headerFooterProps: {
903
- [_]: l ? S.TRUE : S.FALSE
905
+ [f]: l ? S.TRUE : S.FALSE
904
906
  }
905
907
  });
906
- }, h = async (l, _) => {
908
+ }, h = async (l, f) => {
907
909
  d((u) => ({
908
910
  ...u,
909
- [_]: l
911
+ [f]: l
910
912
  })), await r.executeCommand(be, {
911
913
  unitId: a,
912
914
  headerFooterProps: {
913
- [_]: l
915
+ [f]: l
914
916
  }
915
917
  }), i.removeAllTextRanges(), i.blur();
916
918
  }, p = () => {
917
- var m, R;
918
- const l = (m = o.getRenderById(a)) == null ? void 0 : m.with(L), _ = l == null ? void 0 : l.getSkeleton(), u = l == null ? void 0 : l.getViewModel(), f = o.getRenderById(a);
919
- f == null || u == null || _ == null || (s.replaceTextRanges([]), i.setSegment(""), i.setSegmentPage(-1), u.setEditArea(F.BODY), _.calculate(), (R = f.mainComponent) == null || R.makeDirty(!0));
919
+ var E;
920
+ const l = o.getRenderById(a);
921
+ if (l == null)
922
+ return;
923
+ const { scene: f } = l, u = f.getTransformerByCreate(), _ = l.with(L), m = _ == null ? void 0 : _.getSkeleton(), R = _ == null ? void 0 : _.getViewModel(), C = o.getRenderById(a);
924
+ C == null || R == null || m == null || (s.replaceTextRanges([]), u.clearSelectedObjects(), i.setSegment(""), i.setSegmentPage(-1), R.setEditArea(F.BODY), m.calculate(), (E = C.mainComponent) == null || E.makeDirty(!0));
920
925
  };
921
926
  return cn(() => {
922
- const l = n.getUniverDocInstance(a), _ = l == null ? void 0 : l.getSnapshot().documentStyle;
923
- if (_) {
924
- const { marginHeader: u, marginFooter: f, useFirstPageHeaderFooter: m, evenAndOddHeaders: R } = _;
927
+ const l = n.getUniverDocInstance(a), f = l == null ? void 0 : l.getSnapshot().documentStyle;
928
+ if (f) {
929
+ const { marginHeader: u, marginFooter: _, useFirstPageHeaderFooter: m, evenAndOddHeaders: R } = f;
925
930
  d({
926
931
  marginHeader: u,
927
- marginFooter: f,
932
+ marginFooter: _,
928
933
  useFirstPageHeaderFooter: m,
929
934
  evenAndOddHeaders: R
930
935
  });
@@ -1001,11 +1006,11 @@ const Mr = "univer-panel", yr = "univer-options-section", xr = "univer-options-f
1001
1006
  h.unsubscribe();
1002
1007
  };
1003
1008
  }, []), /* @__PURE__ */ M.jsx("div", { className: $.panel, children: a ? /* @__PURE__ */ M.jsx(Ar, { unitId: r }) : /* @__PURE__ */ M.jsx("div", { className: $.panelDisableText, children: t.t("headerFooter.disableText") }) });
1004
- }, fn = {
1009
+ }, _n = {
1005
1010
  id: "sidebar.operation.doc-header-footer-panel",
1006
1011
  type: de.COMMAND,
1007
1012
  handler: async (t, e) => {
1008
- const n = t.get(Ln), o = t.get(le);
1013
+ const n = t.get(Fn), o = t.get(le);
1009
1014
  switch (e.value) {
1010
1015
  case "open":
1011
1016
  n.open({
@@ -1083,17 +1088,17 @@ function wr(t, e, n) {
1083
1088
  let it = class extends Q {
1084
1089
  constructor(e, n, o, r, i, s, a, c, d) {
1085
1090
  super();
1086
- C(this, "_loadedMap", /* @__PURE__ */ new WeakSet());
1091
+ T(this, "_loadedMap", /* @__PURE__ */ new WeakSet());
1087
1092
  this._context = e, this._commandService = n, this._editorService = o, this._instanceSrv = r, this._renderManagerService = i, this._docSkeletonManagerService = s, this._textSelectionRenderManager = a, this._localeService = c, this._componentManager = d, this._initialize();
1088
1093
  }
1089
1094
  _initialize() {
1090
- this._context.unit.getSnapshot().documentStyle.documentFlavor === bn.TRADITIONAL && (this._init(), this._drawHeaderFooterLabel(), this._registerCommands(), this._initCustomComponents());
1095
+ this._context.unit.getSnapshot().documentStyle.documentFlavor === Tn.TRADITIONAL && (this._init(), this._drawHeaderFooterLabel(), this._registerCommands(), this._initCustomComponents());
1091
1096
  }
1092
1097
  _registerCommands() {
1093
1098
  [
1094
1099
  Wt,
1095
1100
  mn,
1096
- fn
1101
+ _n
1097
1102
  ].forEach((e) => this.disposeWithMe(this._commandService.registerCommand(e)));
1098
1103
  }
1099
1104
  _initCustomComponents() {
@@ -1116,24 +1121,24 @@ let it = class extends Q {
1116
1121
  } = o.getOffsetConfig(), g = this._getTransformCoordForDocumentOffset(i, s);
1117
1122
  if (g == null)
1118
1123
  return;
1119
- const h = this._docSkeletonManagerService.getViewModel(), p = this._docSkeletonManagerService.getSkeleton(), l = h.getEditArea(), { editArea: _, pageNumber: u } = p.findEditAreaByCoord(
1124
+ const h = this._docSkeletonManagerService.getViewModel(), p = this._docSkeletonManagerService.getSkeleton(), l = h.getEditArea(), { editArea: f, pageNumber: u } = p.findEditAreaByCoord(
1120
1125
  g,
1121
1126
  a,
1122
1127
  c,
1123
1128
  d
1124
1129
  );
1125
- if (l === _)
1130
+ if (l === f)
1126
1131
  return;
1127
- h.setEditArea(_);
1128
- const { createType: f, headerFooterId: m } = wr(h, _, u);
1129
- if (_ === F.BODY)
1132
+ h.setEditArea(f);
1133
+ const { createType: _, headerFooterId: m } = wr(h, f, u);
1134
+ if (f === F.BODY)
1130
1135
  this._textSelectionRenderManager.setSegment(""), this._textSelectionRenderManager.setSegmentPage(-1), this._textSelectionRenderManager.setCursorManually(i, s);
1131
- else if (f != null) {
1132
- const I = j.generateRandomId(6);
1133
- this._textSelectionRenderManager.setSegment(I), this._textSelectionRenderManager.setSegmentPage(u), await this._commandService.executeCommand(Wt.id, {
1136
+ else if (_ != null) {
1137
+ const C = j.generateRandomId(6);
1138
+ this._textSelectionRenderManager.setSegment(C), this._textSelectionRenderManager.setSegmentPage(u), await this._commandService.executeCommand(Wt.id, {
1134
1139
  unitId: e,
1135
- createType: f,
1136
- segmentId: I
1140
+ createType: _,
1141
+ segmentId: C
1137
1142
  });
1138
1143
  } else m != null && (this._textSelectionRenderManager.setSegment(m), this._textSelectionRenderManager.setSegmentPage(u), this._textSelectionRenderManager.setCursorManually(i, s));
1139
1144
  }));
@@ -1161,51 +1166,51 @@ let it = class extends Q {
1161
1166
  i.pageRender$.subscribe((s) => {
1162
1167
  if (this._editorService.isEditor(n))
1163
1168
  return;
1164
- const d = this._docSkeletonManagerService.getViewModel().getEditArea() === F.BODY, { page: g, pageLeft: h, pageTop: p, ctx: l } = s, { pageWidth: _, pageHeight: u, marginTop: f, marginBottom: m } = g;
1169
+ const d = this._docSkeletonManagerService.getViewModel().getEditArea() === F.BODY, { page: g, pageLeft: h, pageTop: p, ctx: l } = s, { pageWidth: f, pageHeight: u, marginTop: _, marginBottom: m } = g;
1165
1170
  if (l.save(), l.translate(h - 0.5, p - 0.5), d ? (Xe.drawWith(l, {
1166
1171
  left: 0,
1167
1172
  top: 0,
1168
- width: _,
1169
- height: f,
1173
+ width: f,
1174
+ height: _,
1170
1175
  fill: "rgba(255, 255, 255, 0.5)"
1171
1176
  }), l.save(), l.translate(0, u - m), Xe.drawWith(l, {
1172
1177
  left: 0,
1173
1178
  top: 0,
1174
- width: _,
1179
+ width: f,
1175
1180
  height: m,
1176
1181
  fill: "rgba(255, 255, 255, 0.5)"
1177
- }), l.restore()) : (l.save(), l.translate(0, f), Xe.drawWith(l, {
1182
+ }), l.restore()) : (l.save(), l.translate(0, _), Xe.drawWith(l, {
1178
1183
  left: 0,
1179
- top: f,
1180
- width: _,
1181
- height: u - f - m,
1184
+ top: _,
1185
+ width: f,
1186
+ height: u - _ - m,
1182
1187
  fill: "rgba(255, 255, 255, 0.5)"
1183
1188
  }), l.restore()), !d) {
1184
1189
  const R = {
1185
1190
  dataArray: [{
1186
1191
  command: "M",
1187
- points: [0, f]
1192
+ points: [0, _]
1188
1193
  }, {
1189
1194
  command: "L",
1190
- points: [_, f]
1195
+ points: [f, _]
1191
1196
  }],
1192
1197
  strokeWidth: 1,
1193
1198
  stroke: Ht
1194
- }, I = {
1199
+ }, C = {
1195
1200
  dataArray: [{
1196
1201
  command: "M",
1197
1202
  points: [0, u - m]
1198
1203
  }, {
1199
1204
  command: "L",
1200
- points: [_, u - m]
1205
+ points: [f, u - m]
1201
1206
  }],
1202
1207
  strokeWidth: 1,
1203
1208
  stroke: Ht
1204
1209
  };
1205
- It.drawWith(l, R), It.drawWith(l, I), l.translate(0, f + 1), Ne.drawWith(l, {
1210
+ It.drawWith(l, R), It.drawWith(l, C), l.translate(0, _ + 1), Ne.drawWith(l, {
1206
1211
  text: e.t("headerFooter.header"),
1207
1212
  color: Vt
1208
- }), l.translate(0, u - f - m), Ne.drawWith(l, {
1213
+ }), l.translate(0, u - _ - m), Ne.drawWith(l, {
1209
1214
  text: e.t("headerFooter.footer"),
1210
1215
  color: Vt
1211
1216
  });
@@ -1229,10 +1234,10 @@ it = Lr([
1229
1234
  X(2, ee),
1230
1235
  X(3, w),
1231
1236
  X(4, W),
1232
- X(5, E(L)),
1237
+ X(5, I(L)),
1233
1238
  X(6, ne),
1234
- X(7, E(le)),
1235
- X(8, E(tn))
1239
+ X(7, I(le)),
1240
+ X(8, I(tn))
1236
1241
  ], it);
1237
1242
  function jt() {
1238
1243
  return {
@@ -1298,12 +1303,12 @@ function Je(t, e, n, o) {
1298
1303
  default:
1299
1304
  throw new Error(`Unknown header footer type: ${e}`);
1300
1305
  }
1301
- for (const [l, _] of [[h, s], [p, d]])
1306
+ for (const [l, f] of [[h, s], [p, d]])
1302
1307
  if (n[l] != null) {
1303
- const u = r.replaceOp(["documentStyle", l], n[l], _);
1308
+ const u = r.replaceOp(["documentStyle", l], n[l], f);
1304
1309
  o.push(u);
1305
1310
  } else {
1306
- const u = r.insertOp(["documentStyle", l], _);
1311
+ const u = r.insertOp(["documentStyle", l], f);
1307
1312
  o.push(u);
1308
1313
  }
1309
1314
  return o;
@@ -1313,15 +1318,15 @@ const be = "doc.command.core-header-footer", Wt = {
1313
1318
  type: de.COMMAND,
1314
1319
  // eslint-disable-next-line max-lines-per-function
1315
1320
  handler: async (t, e) => {
1316
- var b;
1317
- const n = t.get(O), o = t.get(w), r = t.get(W), { unitId: i, segmentId: s, createType: a, headerFooterProps: c } = e, d = (b = r.getRenderById(i)) == null ? void 0 : b.with(L), g = o.getUniverDocInstance(i), h = d == null ? void 0 : d.getViewModel();
1321
+ var E;
1322
+ const n = t.get(O), o = t.get(w), r = t.get(W), { unitId: i, segmentId: s, createType: a, headerFooterProps: c } = e, d = (E = r.getRenderById(i)) == null ? void 0 : E.with(L), g = o.getUniverDocInstance(i), h = d == null ? void 0 : d.getViewModel();
1318
1323
  if (g == null || h == null)
1319
1324
  return !1;
1320
- const p = h.getEditArea(), { documentStyle: l } = g.getSnapshot(), _ = (c == null ? void 0 : c.marginFooter) != null || (c == null ? void 0 : c.marginHeader) != null, u = [{
1325
+ const p = h.getEditArea(), { documentStyle: l } = g.getSnapshot(), f = (c == null ? void 0 : c.marginFooter) != null || (c == null ? void 0 : c.marginHeader) != null, u = [{
1321
1326
  startOffset: 0,
1322
1327
  endOffset: 0,
1323
1328
  collapsed: !0
1324
- }], f = {
1329
+ }], _ = {
1325
1330
  id: ht.id,
1326
1331
  params: {
1327
1332
  unitId: i,
@@ -1330,26 +1335,26 @@ const be = "doc.command.core-header-footer", Wt = {
1330
1335
  debounce: !0
1331
1336
  }
1332
1337
  };
1333
- _ && (f.params.noNeedSetTextRange = !0);
1338
+ f && (_.params.noNeedSetTextRange = !0);
1334
1339
  const m = Qe.getInstance(), R = [];
1335
- return a != null && Je(s, a, l, R), c != null && Object.keys(c).forEach((T) => {
1336
- const A = c[T], N = l[T];
1340
+ return a != null && Je(s, a, l, R), c != null && Object.keys(c).forEach((b) => {
1341
+ const A = c[b], N = l[b];
1337
1342
  if (A === N)
1338
1343
  return;
1339
1344
  let Y;
1340
- if (N === void 0 ? Y = m.insertOp(["documentStyle", T], A) : Y = m.replaceOp(["documentStyle", T], N, A), R.push(Y), T === "useFirstPageHeaderFooter" && A === S.TRUE && !l.firstPageHeaderId) {
1345
+ if (N === void 0 ? Y = m.insertOp(["documentStyle", b], A) : Y = m.replaceOp(["documentStyle", b], N, A), R.push(Y), b === "useFirstPageHeaderFooter" && A === S.TRUE && !l.firstPageHeaderId) {
1341
1346
  const G = p === F.HEADER ? U.FIRST_PAGE_HEADER : U.FIRST_PAGE_FOOTER;
1342
1347
  Je(s, G, l, R);
1343
- } else if (T === "evenAndOddHeaders" && A === S.TRUE && !l.evenPageHeaderId) {
1348
+ } else if (b === "evenAndOddHeaders" && A === S.TRUE && !l.evenPageHeaderId) {
1344
1349
  const G = p === F.HEADER ? U.EVEN_PAGE_HEADER : U.EVEN_PAGE_FOOTER;
1345
1350
  Je(s, G, l, R);
1346
1351
  }
1347
- }), R.length === 0 ? !1 : (f.params.actions = R.reduce((T, A) => Qe.compose(T, A), null), !!n.syncExecuteCommand(f.id, f.params));
1352
+ }), R.length === 0 ? !1 : (_.params.actions = R.reduce((b, A) => Qe.compose(b, A), null), !!n.syncExecuteCommand(_.id, _.params));
1348
1353
  }
1349
1354
  }, mn = {
1350
1355
  id: "doc.command.open-header-footer-panel",
1351
1356
  type: de.COMMAND,
1352
- handler: async (t, e) => t.get(O).executeCommand(fn.id, { value: "open" })
1357
+ handler: async (t, e) => t.get(O).executeCommand(_n.id, { value: "open" })
1353
1358
  };
1354
1359
  function Br(t) {
1355
1360
  const e = t.get(O);
@@ -1561,7 +1566,7 @@ function Gr(t) {
1561
1566
  }
1562
1567
  },
1563
1568
  positions: [P.TOOLBAR_START],
1564
- selections: wn,
1569
+ selections: Un,
1565
1570
  // disabled$,
1566
1571
  value$: new B((n) => {
1567
1572
  const r = e.onCommandExecuted((i) => {
@@ -1618,7 +1623,7 @@ function Yr(t) {
1618
1623
  icon: "FreezeRowSingle",
1619
1624
  tooltip: "toolbar.headerFooter",
1620
1625
  positions: [P.TOOLBAR_START],
1621
- hidden$: yo(D(t, v.UNIVER_DOC), Bn(t), (e, n) => e || n)
1626
+ hidden$: yo(D(t, v.UNIVER_DOC), Ln(t), (e, n) => e || n)
1622
1627
  };
1623
1628
  }
1624
1629
  function Xr(t) {
@@ -1639,7 +1644,7 @@ function Xr(t) {
1639
1644
  if (a == null)
1640
1645
  return;
1641
1646
  const c = (s = a.paragraphStyle) == null ? void 0 : s.horizontalAlign;
1642
- n.next(c === we.LEFT);
1647
+ n.next(c === Le.LEFT);
1643
1648
  }
1644
1649
  });
1645
1650
  return n.next(!1), o.dispose;
@@ -1665,7 +1670,7 @@ function Kr(t) {
1665
1670
  if (a == null)
1666
1671
  return;
1667
1672
  const c = (s = a.paragraphStyle) == null ? void 0 : s.horizontalAlign;
1668
- n.next(c === we.CENTER);
1673
+ n.next(c === Le.CENTER);
1669
1674
  }
1670
1675
  });
1671
1676
  return n.next(!1), o.dispose;
@@ -1691,7 +1696,7 @@ function Zr(t) {
1691
1696
  if (a == null)
1692
1697
  return;
1693
1698
  const c = (s = a.paragraphStyle) == null ? void 0 : s.horizontalAlign;
1694
- n.next(c === we.RIGHT);
1699
+ n.next(c === Le.RIGHT);
1695
1700
  }
1696
1701
  });
1697
1702
  return n.next(!1), o.dispose;
@@ -1717,7 +1722,7 @@ function Jr(t) {
1717
1722
  if (a == null)
1718
1723
  return;
1719
1724
  const c = (s = a.paragraphStyle) == null ? void 0 : s.horizontalAlign;
1720
- n.next(c === we.JUSTIFIED);
1725
+ n.next(c === Le.JUSTIFIED);
1721
1726
  }
1722
1727
  });
1723
1728
  return n.next(!1), o.dispose;
@@ -1835,7 +1840,7 @@ let me = class extends Q {
1835
1840
  }
1836
1841
  _initCustomComponents() {
1837
1842
  const t = this._componentManager;
1838
- this.disposeWithMe(t.register(pt, Ao)), this.disposeWithMe(t.register(dn, $n)), this.disposeWithMe(t.register(un, Hn)), this.disposeWithMe(t.register(hn, Vn));
1843
+ this.disposeWithMe(t.register(pt, Ao)), this.disposeWithMe(t.register(dn, wn)), this.disposeWithMe(t.register(un, Bn)), this.disposeWithMe(t.register(hn, $n));
1839
1844
  }
1840
1845
  _initMenus() {
1841
1846
  const { menu: t = {} } = this._config;
@@ -1874,11 +1879,11 @@ let me = class extends Q {
1874
1879
  }
1875
1880
  };
1876
1881
  me = ri([
1877
- Be($e.Rendered, me),
1878
- Ee(1, E(Le)),
1879
- Ee(2, E(tn)),
1882
+ we(Be.Rendered, me),
1883
+ Ee(1, I($e)),
1884
+ Ee(2, I(tn)),
1880
1885
  Ee(3, en),
1881
- Ee(4, jn)
1886
+ Ee(4, Hn)
1882
1887
  ], me);
1883
1888
  const ii = {
1884
1889
  id: go.id,
@@ -1889,35 +1894,35 @@ const ii = {
1889
1894
  preconditions: k,
1890
1895
  binding: H.BACKSPACE
1891
1896
  }, ai = {
1892
- id: _o.id,
1897
+ id: fo.id,
1893
1898
  preconditions: k,
1894
1899
  binding: H.DELETE
1895
1900
  };
1896
1901
  function ze(t) {
1897
1902
  return t.getContextValue(Ue) || t.getContextValue(qt);
1898
1903
  }
1899
- const _t = 999, ci = {
1900
- id: Wn.id,
1904
+ const ft = 999, ci = {
1905
+ id: Vn.id,
1901
1906
  name: "doc.command.copy",
1902
1907
  type: de.COMMAND,
1903
1908
  multi: !0,
1904
- priority: _t,
1909
+ priority: ft,
1905
1910
  preconditions: ze,
1906
1911
  handler: async (t) => t.get(Re).copy()
1907
1912
  }, li = {
1908
- id: kn.id,
1913
+ id: jn.id,
1909
1914
  name: "doc.command.cut",
1910
1915
  type: de.COMMAND,
1911
1916
  multi: !0,
1912
- priority: _t,
1917
+ priority: ft,
1913
1918
  preconditions: ze,
1914
1919
  handler: async (t) => t.get(Re).cut()
1915
1920
  }, di = {
1916
- id: Gn.id,
1921
+ id: Wn.id,
1917
1922
  name: "doc.command.paste",
1918
1923
  type: de.COMMAND,
1919
1924
  multi: !0,
1920
- priority: _t,
1925
+ priority: ft,
1921
1926
  preconditions: ze,
1922
1927
  handler: async (t) => {
1923
1928
  const e = t.get(Re), o = await t.get(ut).read();
@@ -1949,22 +1954,22 @@ let Me = class extends Se {
1949
1954
  }
1950
1955
  };
1951
1956
  Me = gi([
1952
- Be($e.Rendered, Me),
1957
+ we(Be.Rendered, Me),
1953
1958
  he(0, O),
1954
1959
  he(1, ut),
1955
1960
  he(2, Re),
1956
1961
  he(3, ne),
1957
- he(4, Mn)
1962
+ he(4, In)
1958
1963
  ], Me);
1959
- var pi = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, fi = (t, e, n, o) => {
1960
- for (var r = o > 1 ? void 0 : o ? _i(e, n) : e, i = t.length - 1, s; i >= 0; i--)
1964
+ var pi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, _i = (t, e, n, o) => {
1965
+ for (var r = o > 1 ? void 0 : o ? fi(e, n) : e, i = t.length - 1, s; i >= 0; i--)
1961
1966
  (s = t[i]) && (r = (o ? s(e, n, r) : s(r)) || r);
1962
1967
  return o && r && pi(e, n, r), r;
1963
1968
  }, ge = (t, e) => (n, o) => e(n, o, t);
1964
1969
  let ye = class extends Q {
1965
1970
  constructor(e, n, o, r, i) {
1966
1971
  super();
1967
- C(this, "_initialEditors", /* @__PURE__ */ new Set());
1972
+ T(this, "_initialEditors", /* @__PURE__ */ new Set());
1968
1973
  this._univerInstanceService = e, this._editorService = n, this._commandService = o, this._textSelectionRenderManager = r, this._renderManagerService = i, this._initialize();
1969
1974
  }
1970
1975
  _initialize() {
@@ -1978,7 +1983,7 @@ let ye = class extends Q {
1978
1983
  }), this._commandExecutedListener(), this._initialSetValue(), this._initialBlur(), this._initialFocus(), this._initialValueChange();
1979
1984
  }
1980
1985
  _resize(e) {
1981
- var I, b, T;
1986
+ var C, E, b;
1982
1987
  if (e == null)
1983
1988
  return;
1984
1989
  const n = this._editorService.getEditor(e);
@@ -1987,25 +1992,25 @@ let ye = class extends Q {
1987
1992
  const o = this._univerInstanceService.getUniverDocInstance(e);
1988
1993
  if (!o)
1989
1994
  return;
1990
- const r = (I = this._renderManagerService.getRenderById(o.getUnitId())) == null ? void 0 : I.with(L).getSkeleton();
1995
+ const r = (C = this._renderManagerService.getRenderById(o.getUnitId())) == null ? void 0 : C.with(L).getSkeleton();
1991
1996
  if (n == null || n.render == null || r == null || o == null)
1992
1997
  return;
1993
1998
  r.calculate();
1994
1999
  const { marginTop: i = 0, marginBottom: s = 0, marginLeft: a = 0, marginRight: c = 0 } = o.getSnapshot().documentStyle, { scene: d, mainComponent: g } = n.render;
1995
2000
  let { actualHeight: h, actualWidth: p } = r.getActualSize();
1996
2001
  h += i + s, p += a + c;
1997
- const { width: l, height: _ } = n.getBoundingClientRect(), u = d.getViewport(q.VIEW_MAIN);
1998
- let f = u == null ? void 0 : u.getScrollBar();
1999
- const m = Math.max(p, l), R = Math.max(h, _);
2002
+ const { width: l, height: f } = n.getBoundingClientRect(), u = d.getViewport(q.VIEW_MAIN);
2003
+ let _ = u == null ? void 0 : u.getScrollBar();
2004
+ const m = Math.max(p, l), R = Math.max(h, f);
2000
2005
  d.transformByState({
2001
2006
  width: m,
2002
2007
  height: R
2003
- }), g == null || g.resize(m, R), n.isSingle() ? p > l ? f == null ? u && new tt(u, { barSize: 8, enableVertical: !1 }) : u == null || u.resetCanvasSizeAndUpdateScrollBar() : (f = null, u == null || u.scrollTo({ x: 0, y: 0 }), (T = u == null ? void 0 : u.getScrollBar()) == null || T.dispose()) : h > _ ? f == null ? u && new tt(u, { enableHorizontal: !1, barSize: 8 }) : u == null || u.resetCanvasSizeAndUpdateScrollBar() : (f = null, u == null || u.scrollTo({ x: 0, y: 0 }), (b = u == null ? void 0 : u.getScrollBar()) == null || b.dispose());
2008
+ }), g == null || g.resize(m, R), n.isSingle() ? p > l ? _ == null ? u && new tt(u, { barSize: 8, enableVertical: !1 }) : u == null || u.resetCanvasSizeAndUpdateScrollBar() : (_ = null, u == null || u.scrollTo({ x: 0, y: 0 }), (b = u == null ? void 0 : u.getScrollBar()) == null || b.dispose()) : h > f ? _ == null ? u && new tt(u, { enableHorizontal: !1, barSize: 8 }) : u == null || u.resetCanvasSizeAndUpdateScrollBar() : (_ = null, u == null || u.scrollTo({ x: 0, y: 0 }), (E = u == null ? void 0 : u.getScrollBar()) == null || E.dispose());
2004
2009
  }
2005
2010
  _initialSetValue() {
2006
2011
  this.disposeWithMe(
2007
2012
  this._editorService.setValue$.subscribe((e) => {
2008
- this._commandService.executeCommand(fo.id, {
2013
+ this._commandService.executeCommand(_o.id, {
2009
2014
  unitId: e.editorUnitId,
2010
2015
  body: e.body,
2011
2016
  segmentId: null
@@ -2044,7 +2049,7 @@ let ye = class extends Q {
2044
2049
  this.disposeWithMe(
2045
2050
  yt(window, "mousedown").subscribe((o) => {
2046
2051
  const i = o.target.classList[0] || "";
2047
- if (yn(i, e)) {
2052
+ if (bn(i, e)) {
2048
2053
  this._editorService.changeSpreadsheetFocusState(!0), o.stopPropagation();
2049
2054
  return;
2050
2055
  }
@@ -2080,7 +2085,7 @@ let ye = class extends Q {
2080
2085
  * Listen to document edits to refresh the size of the formula editor.
2081
2086
  */
2082
2087
  _commandExecutedListener() {
2083
- const e = [ht.id, zn.id];
2088
+ const e = [ht.id, kn.id];
2084
2089
  this.disposeWithMe(
2085
2090
  this._commandService.onCommandExecuted((n) => {
2086
2091
  if (e.includes(n.id)) {
@@ -2093,8 +2098,8 @@ let ye = class extends Q {
2093
2098
  );
2094
2099
  }
2095
2100
  };
2096
- ye = fi([
2097
- Be($e.Rendered, ye),
2101
+ ye = _i([
2102
+ we(Be.Rendered, ye),
2098
2103
  ge(0, w),
2099
2104
  ge(1, ee),
2100
2105
  ge(2, O),
@@ -2182,16 +2187,16 @@ let st = class extends Se {
2182
2187
  return;
2183
2188
  let c = 0, d = 0;
2184
2189
  for (let h = 0, p = a.length; h < p; h++) {
2185
- const l = a[h], { pageWidth: _, pageHeight: u } = l;
2186
- i.pageLayoutType === Ae.VERTICAL ? (d += u, d += i.pageMarginTop, h === p - 1 && (d += i.pageMarginTop), c = Math.max(c, _)) : i.pageLayoutType === Ae.HORIZONTAL && (c += _, h !== p - 1 && (c += i.pageMarginLeft), d = Math.max(d, u));
2190
+ const l = a[h], { pageWidth: f, pageHeight: u } = l;
2191
+ i.pageLayoutType === Ae.VERTICAL ? (d += u, d += i.pageMarginTop, h === p - 1 && (d += i.pageMarginTop), c = Math.max(c, f)) : i.pageLayoutType === Ae.HORIZONTAL && (c += f, h !== p - 1 && (c += i.pageMarginLeft), d = Math.max(d, u));
2187
2192
  }
2188
2193
  i.resize(c, d), s.resize(c, d), this._editorService.isEditor(o) || n.resize(c, d);
2189
2194
  }
2190
2195
  };
2191
2196
  st = vi([
2192
2197
  pe(1, O),
2193
- pe(2, E(L)),
2194
- pe(3, xn),
2198
+ pe(2, I(L)),
2199
+ pe(3, Mn),
2195
2200
  pe(4, ee),
2196
2201
  pe(5, W)
2197
2202
  ], st);
@@ -2199,7 +2204,7 @@ var Ri = Object.defineProperty, Oi = Object.getOwnPropertyDescriptor, Ci = (t, e
2199
2204
  for (var r = o > 1 ? void 0 : o ? Oi(e, n) : e, i = t.length - 1, s; i >= 0; i--)
2200
2205
  (s = t[i]) && (r = (o ? s(e, n, r) : s(r)) || r);
2201
2206
  return o && r && Ri(e, n, r), r;
2202
- }, _e = (t, e) => (n, o) => e(n, o, t);
2207
+ }, fe = (t, e) => (n, o) => e(n, o, t);
2203
2208
  let at = class extends Q {
2204
2209
  constructor(t, e, n, o, r, i) {
2205
2210
  super(), this._context = t, this._docSkeletonManagerService = e, this._univerInstanceService = n, this._commandService = o, this._textSelectionManagerService = r, this._editorService = i, this._init();
@@ -2264,11 +2269,11 @@ let at = class extends Q {
2264
2269
  if (i == null || s === Number.POSITIVE_INFINITY || a === Number.POSITIVE_INFINITY)
2265
2270
  return;
2266
2271
  const { width: g, height: h } = i;
2267
- let p = 0, l = 0, _ = 0, u = 0, f = Number.POSITIVE_INFINITY;
2268
- g > (s + c * 2) * e ? (p = g / 2 - s * e / 2, p /= e, _ = (g - c * 2) / e, f = 0) : (p = c, _ = s + c * 2, f = (_ - g / e) / 2), h > a ? (l = h / 2 - a / 2, u = (h - d * 2) / e) : (l = d, u = a + d * 2), o.resize(_, u + 200), n.translate(p, l), r.translate(p, l);
2272
+ let p = 0, l = 0, f = 0, u = 0, _ = Number.POSITIVE_INFINITY;
2273
+ g > (s + c * 2) * e ? (p = g / 2 - s * e / 2, p /= e, f = (g - c * 2) / e, _ = 0) : (p = c, f = s + c * 2, _ = (f - g / e) / 2), h > a ? (l = h / 2 - a / 2, u = (h - d * 2) / e) : (l = d, u = a + d * 2), o.resize(f, u + 200), n.translate(p, l), r.translate(p, l);
2269
2274
  const m = o.getViewport(q.VIEW_MAIN);
2270
- if (f !== Number.POSITIVE_INFINITY && m != null) {
2271
- const R = m.transViewportScroll2ScrollValue(f, 0).x;
2275
+ if (_ !== Number.POSITIVE_INFINITY && m != null) {
2276
+ const R = m.transViewportScroll2ScrollValue(_, 0).x;
2272
2277
  m.scrollTo({
2273
2278
  x: R
2274
2279
  });
@@ -2277,11 +2282,11 @@ let at = class extends Q {
2277
2282
  }
2278
2283
  };
2279
2284
  at = Ci([
2280
- _e(1, E(L)),
2281
- _e(2, w),
2282
- _e(3, O),
2283
- _e(4, E(te)),
2284
- _e(5, ee)
2285
+ fe(1, I(L)),
2286
+ fe(2, w),
2287
+ fe(3, O),
2288
+ fe(4, I(te)),
2289
+ fe(5, ee)
2285
2290
  ], at);
2286
2291
  var Ei = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, Ii = (t, e, n, o) => {
2287
2292
  for (var r = o > 1 ? void 0 : o ? Ti(e, n) : e, i = t.length - 1, s; i >= 0; i--)
@@ -2291,7 +2296,7 @@ var Ei = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, Ii = (t, e
2291
2296
  let ct = class extends Q {
2292
2297
  constructor(e, n, o, r, i, s, a) {
2293
2298
  super();
2294
- C(this, "_loadedMap", /* @__PURE__ */ new WeakSet());
2299
+ T(this, "_loadedMap", /* @__PURE__ */ new WeakSet());
2295
2300
  this._context = e, this._commandService = n, this._editorService = o, this._instanceSrv = r, this._textSelectionRenderManager = i, this._docSkeletonManagerService = s, this._textSelectionManagerService = a, this._initialize();
2296
2301
  }
2297
2302
  _initialize() {
@@ -2318,14 +2323,14 @@ let ct = class extends Q {
2318
2323
  const {
2319
2324
  pageLayoutType: p = Ae.VERTICAL,
2320
2325
  pageMarginLeft: l,
2321
- pageMarginTop: _
2326
+ pageMarginTop: f
2322
2327
  } = o.getOffsetConfig(), { editArea: u } = c.findEditAreaByCoord(
2323
2328
  h,
2324
2329
  p,
2325
2330
  l,
2326
- _
2327
- ), f = this._docSkeletonManagerService.getViewModel(), m = f.getEditArea();
2328
- m !== F.BODY && u !== F.BODY && u !== m && f.setEditArea(u);
2331
+ f
2332
+ ), _ = this._docSkeletonManagerService.getViewModel(), m = _.getEditArea();
2333
+ m !== F.BODY && u !== F.BODY && u !== m && _.setEditArea(u);
2329
2334
  }
2330
2335
  if (this._textSelectionRenderManager.eventTrigger(i), this._editorService.getEditor(e)) {
2331
2336
  this._setEditorFocus(e);
@@ -2378,7 +2383,7 @@ let ct = class extends Q {
2378
2383
  this._textSelectionRenderManager.changeRuntime(e, n, o), this._textSelectionManagerService.setCurrentSelectionNotRefresh({
2379
2384
  unitId: r,
2380
2385
  subUnitId: ""
2381
- }), Pn(r) || this._textSelectionManagerService.replaceTextRanges([
2386
+ }), yn(r) || this._textSelectionManagerService.replaceTextRanges([
2382
2387
  {
2383
2388
  startOffset: 0,
2384
2389
  endOffset: 0
@@ -2393,8 +2398,8 @@ ct = Ii([
2393
2398
  ie(2, ee),
2394
2399
  ie(3, w),
2395
2400
  ie(4, ne),
2396
- ie(5, E(L)),
2397
- ie(6, E(te))
2401
+ ie(5, I(L)),
2402
+ ie(6, I(te))
2398
2403
  ], ct);
2399
2404
  var bi = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, yi = (t, e, n, o) => {
2400
2405
  for (var r = o > 1 ? void 0 : o ? Mi(e, n) : e, i = t.length - 1, s; i >= 0; i--)
@@ -2435,12 +2440,12 @@ let lt = class extends Q {
2435
2440
  right: d + h,
2436
2441
  top: g,
2437
2442
  bottom: g + p
2438
- }, _ = kt(l, a), u = c.getCanvasElement().getBoundingClientRect().top;
2443
+ }, f = kt(l, a), u = c.getCanvasElement().getBoundingClientRect().top;
2439
2444
  return {
2440
- left: _.left,
2441
- right: _.right,
2442
- top: _.top + u,
2443
- bottom: _.bottom + u
2445
+ left: f.left,
2446
+ right: f.right,
2447
+ top: f.top + u,
2448
+ bottom: f.bottom + u
2444
2449
  };
2445
2450
  }, o = n(), r = new xt(o), i = new St();
2446
2451
  i.add(this._commandService.onCommandExecuted((a) => {
@@ -2458,13 +2463,13 @@ let lt = class extends Q {
2458
2463
  _createRangePositionObserver(t, e) {
2459
2464
  var a;
2460
2465
  const n = () => {
2461
- const { scene: c, mainComponent: d, engine: g } = e, h = e.with(L).getSkeleton(), p = h.findNodePositionByCharIndex(t.startOffset), l = h.findNodePositionByCharIndex(t.endOffset), _ = d;
2466
+ const { scene: c, mainComponent: d, engine: g } = e, h = e.with(L).getSkeleton(), p = h.findNodePositionByCharIndex(t.startOffset), l = h.findNodePositionByCharIndex(t.endOffset), f = d;
2462
2467
  if (!l || !p)
2463
2468
  return;
2464
- const u = _.getOffsetConfig(), { docsLeft: f, docsTop: m } = u, R = g.getCanvasElement().getBoundingClientRect().top, I = new rn(u, h), { borderBoxPointGroup: b } = I.getRangePointData(p, l);
2465
- return Mo(b).map((N) => kt(N, c)).map((N) => ({
2466
- left: N.left + f,
2467
- right: N.right + f,
2469
+ const u = f.getOffsetConfig(), { docsLeft: _, docsTop: m } = u, R = g.getCanvasElement().getBoundingClientRect().top, C = new rn(u, h), { borderBoxPointGroup: E } = C.getRangePointData(p, l);
2470
+ return Mo(E).map((N) => kt(N, c)).map((N) => ({
2471
+ left: N.left + _,
2472
+ right: N.right + _,
2468
2473
  top: N.top + m + R,
2469
2474
  bottom: N.bottom + m + R
2470
2475
  }));
@@ -2536,7 +2541,7 @@ let lt = class extends Q {
2536
2541
  }
2537
2542
  };
2538
2543
  lt = yi([
2539
- Te(0, E(Yn)),
2544
+ Te(0, I(Gn)),
2540
2545
  Te(1, W),
2541
2546
  Te(2, w),
2542
2547
  Te(3, O)
@@ -2566,7 +2571,7 @@ let xe = class extends Se {
2566
2571
  }
2567
2572
  };
2568
2573
  xe = Di([
2569
- Be($e.Ready, xe),
2574
+ we(Be.Ready, xe),
2570
2575
  zt(0, w),
2571
2576
  zt(1, W)
2572
2577
  ], xe);
@@ -2575,7 +2580,7 @@ var Ai = Object.defineProperty, Ni = Object.getOwnPropertyDescriptor, Fi = (t, e
2575
2580
  (s = t[i]) && (r = (o ? s(e, n, r) : s(r)) || r);
2576
2581
  return o && r && Ai(e, n, r), r;
2577
2582
  }, qe = (t, e) => (n, o) => e(n, o, t), Ie;
2578
- let Yt = (Ie = class extends Dn {
2583
+ let Yt = (Ie = class extends xn {
2579
2584
  constructor(t, e, n, o) {
2580
2585
  super(), this._config = t, this._injector = e, this._renderManagerSrv = n, this._logService = o, this._config = j.deepMerge({}, nr, this._config), this._initDependencies(e), this._initializeCommands();
2581
2586
  }
@@ -2600,7 +2605,7 @@ let Yt = (Ie = class extends Dn {
2600
2605
  ai,
2601
2606
  ii
2602
2607
  ].forEach((t) => {
2603
- this._injector.get(Xn).registerShortcut(t);
2608
+ this._injector.get(zn).registerShortcut(t);
2604
2609
  });
2605
2610
  }
2606
2611
  _initDependencies(t) {
@@ -2609,7 +2614,7 @@ let Yt = (Ie = class extends Dn {
2609
2614
  [Me],
2610
2615
  [ye],
2611
2616
  [xe],
2612
- [fe, { useFactory: () => this._injector.createInstance(fe, this._config) }],
2617
+ [_e, { useFactory: () => this._injector.createInstance(_e, this._config) }],
2613
2618
  [Re, { useClass: nt }],
2614
2619
  [lt]
2615
2620
  ].forEach((n) => t.add(n));
@@ -2626,7 +2631,7 @@ let Yt = (Ie = class extends Dn {
2626
2631
  }
2627
2632
  }
2628
2633
  _initUI() {
2629
- this._injector.get(fe);
2634
+ this._injector.get(_e);
2630
2635
  }
2631
2636
  _initRenderBasics() {
2632
2637
  [
@@ -2647,13 +2652,13 @@ let Yt = (Ie = class extends Dn {
2647
2652
  this._renderManagerSrv.registerRenderModule(v.UNIVER_DOC, t);
2648
2653
  });
2649
2654
  }
2650
- }, C(Ie, "pluginName", or), C(Ie, "type", v.UNIVER_DOC), Ie);
2655
+ }, T(Ie, "pluginName", or), T(Ie, "type", v.UNIVER_DOC), Ie);
2651
2656
  Yt = Fi([
2652
- qe(1, E(Le)),
2657
+ qe(1, I($e)),
2653
2658
  qe(2, W),
2654
2659
  qe(3, Zt)
2655
2660
  ], Yt);
2656
- function ki(t) {
2661
+ function zi(t) {
2657
2662
  return {
2658
2663
  left: t.positionH.posOffset,
2659
2664
  top: t.positionV.posOffset,
@@ -2661,18 +2666,18 @@ function ki(t) {
2661
2666
  height: t.size.height
2662
2667
  };
2663
2668
  }
2664
- function Gi(t, e = 0, n = 0) {
2669
+ function Yi(t, e = 0, n = 0) {
2665
2670
  return {
2666
2671
  size: {
2667
2672
  width: t.width,
2668
2673
  height: t.height
2669
2674
  },
2670
2675
  positionH: {
2671
- relativeFrom: An.MARGIN,
2676
+ relativeFrom: Pn.MARGIN,
2672
2677
  posOffset: (t.left || 0) - e
2673
2678
  },
2674
2679
  positionV: {
2675
- relativeFrom: Nn.PAGE,
2680
+ relativeFrom: Dn.PAGE,
2676
2681
  posOffset: (t.top || 0) - n
2677
2682
  },
2678
2683
  angle: t.angle || 0
@@ -2695,7 +2700,7 @@ export {
2695
2700
  zo as PastePluginUniver,
2696
2701
  ko as PastePluginWord,
2697
2702
  Yt as UniverDocsUIPlugin,
2698
- ki as docDrawingPositionToTransform,
2699
- Gi as transformToDocDrawingPosition,
2703
+ zi as docDrawingPositionToTransform,
2704
+ Yi as transformToDocDrawingPosition,
2700
2705
  k as whenDocAndEditorFocused
2701
2706
  };