@univerjs/docs-ui 0.13.0 → 0.14.0-insiders.20251227-b250a8d

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,16 +1,16 @@
1
1
  var Bc = Object.defineProperty;
2
2
  var Mc = (n, e, t) => e in n ? Bc(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var O = (n, e, t) => Mc(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { IUniverInstanceService as L, Inject as j, Disposable as me, toDisposable as Mn, UniverInstanceType as _, BuildTextUtils as ce, JSONX as W, ObjectRelativeFromV as gt, ObjectRelativeFromH as Co, CommandType as D, sequenceExecuteAsync as wr, ICommandService as T, DataStreamTreeTokenType as V, TextX as Ie, TextXActionType as G, PresetListType as xe, UpdateDocsAttributeType as nn, Tools as ue, generateRandomId as ge, TableRowHeightRule as _c, TableSizeType as Yi, TableTextWrapType as Dc, TableAlignmentType as Pc, MemoryCursor as Nt, SHEET_EDITOR_UNITS as En, PositionedObjectLayoutType as Ro, BlockType as wc, LRUMap as Nc, BaselineOffset as Ve, BooleanNumber as z, ColorKit as Qs, DrawingTypeEnum as Nr, skipParseTagNames as Lc, CustomRangeType as Lr, DataStreamTreeNodeType as sn, createIdentifier as Ki, ILogService as Qr, SliceBodyType as ir, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as bo, DOC_RANGE_TYPE as He, normalizeBody as Qc, getBodySlice as qi, FOCUSING_DOC as _n, EDITOR_ACTIVATED as eo, DashStyleType as Uc, RxDisposable as Ct, ThemeService as Ur, IUndoRedoService as xo, PRESET_LIST_TYPE as Fc, HorizontalAlign as Ue, NamedStyleType as K, RANGE_DIRECTION as De, COLORS as gn, Rectangle as Hc, DocumentFlavor as we, LocaleService as Ye, isInternalEditorID as Rt, IContextService as Fr, Injector as Dn, FOCUSING_EDITOR_STANDALONE as Us, FOCUSING_COMMENT_EDITOR as Fs, isCommentEditorID as kc, VerticalAlign as Vc, DEFAULT_EMPTY_DOCUMENT_VALUE as Xi, PageOrientType as Wc, PAPER_TYPES as jc, PAGE_SIZE as ar, DOCS_ZEN_EDITOR_UNIT_ID_KEY as nt, DEFAULT_STYLES as yo, NAMED_STYLE_MAP as zc, DisposableCollection as In, fromEventSubject as Mt, deepCompare as Gc, FOCUSING_UNIVER_EDITOR as Hr, FOCUSING_COMMON_DRAWINGS as Zi, getPlainText as to, debounce as kr, SpacingRule as Xt, IConfigService as Vr, QuickListTypeMap as jo, Direction as le, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Yc, checkForSubstrings as Kc, createInterceptorKey as Ji, InterceptorManager as qc, UndoCommandId as Hs, RedoCommandId as ks, DependentOn as Xc, Plugin as Zc, merge as Jc, touchDependencies as Vs, mergeOverrideWithDependencies as $c, createInternalEditorID as el } from "@univerjs/core";
4
+ import { IUniverInstanceService as L, Inject as z, Disposable as me, toDisposable as Mn, UniverInstanceType as _, BuildTextUtils as ce, JSONX as W, ObjectRelativeFromV as gt, ObjectRelativeFromH as Ro, CommandType as D, sequenceExecuteAsync as wr, ICommandService as T, DataStreamTreeTokenType as V, TextX as Ie, TextXActionType as G, PresetListType as xe, UpdateDocsAttributeType as nn, Tools as ue, generateRandomId as ge, TableRowHeightRule as _c, TableSizeType as Yi, TableTextWrapType as Dc, TableAlignmentType as Pc, MemoryCursor as Nt, SHEET_EDITOR_UNITS as En, PositionedObjectLayoutType as bo, BlockType as wc, LRUMap as Nc, BaselineOffset as Ve, BooleanNumber as j, ColorKit as Qs, DrawingTypeEnum as Nr, skipParseTagNames as Lc, CustomRangeType as Lr, DataStreamTreeNodeType as sn, createIdentifier as Ki, ILogService as Qr, SliceBodyType as ar, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as xo, DOC_RANGE_TYPE as He, normalizeBody as Qc, getBodySlice as qi, FOCUSING_DOC as _n, EDITOR_ACTIVATED as eo, DashStyleType as Uc, RxDisposable as Ct, ThemeService as Ur, IUndoRedoService as yo, PRESET_LIST_TYPE as Fc, HorizontalAlign as Ue, NamedStyleType as K, RANGE_DIRECTION as De, COLORS as gn, Rectangle as Hc, DocumentFlavor as we, LocaleService as Ye, IConfirmService as Xi, isInternalEditorID as Rt, IContextService as Fr, Injector as Dn, FOCUSING_EDITOR_STANDALONE as Us, FOCUSING_COMMENT_EDITOR as Fs, isCommentEditorID as kc, VerticalAlign as Vc, DEFAULT_EMPTY_DOCUMENT_VALUE as Zi, PageOrientType as Wc, PAPER_TYPES as zc, PAGE_SIZE as to, DOCS_ZEN_EDITOR_UNIT_ID_KEY as nt, DEFAULT_STYLES as Oo, NAMED_STYLE_MAP as jc, DisposableCollection as In, fromEventSubject as Mt, deepCompare as Gc, FOCUSING_UNIVER_EDITOR as Hr, FOCUSING_COMMON_DRAWINGS as Ji, getPlainText as no, debounce as kr, SpacingRule as Xt, IConfigService as Vr, QuickListTypeMap as jo, Direction as le, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Yc, checkForSubstrings as Kc, createInterceptorKey as $i, InterceptorManager as qc, UndoCommandId as Hs, RedoCommandId as ks, DependentOn as Xc, Plugin as Zc, merge as Jc, touchDependencies as Vs, mergeOverrideWithDependencies as $c, createInternalEditorID as el } from "@univerjs/core";
5
5
  import { DocSelectionManagerService as Y, RichTextEditingMutation as X, DocSkeletonManagerService as de, SetTextSelectionsOperation as Le, DocStateEmitService as tl, DocInterceptorService as nl } from "@univerjs/docs";
6
- import { IRenderManagerService as pe, DocumentEditArea as ve, hasListGlyph as ol, isIndentByGlyph as rl, isFirstGlyph as sl, getParagraphByGlyph as il, pixelToPt as al, ptToPixel as Ws, parseDataStreamToTree as cl, Liquid as $i, GlyphType as ea, DocumentSkeletonPageType as Oe, getPageFromPath as cr, getTableIdAndSliceIndex as js, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as Sn, getColor as fn, RegularPolygon as ta, Rect as Kn, getOffsetRectForDom as ll, ScrollTimer as dl, CURSOR_TYPE as Dt, getSystemHighlightColor as Al, Vector2 as vn, PageLayoutType as Cn, Shape as ul, Path as zs, pxToNum as na, TRANSFORM_CHANGE_OBSERVABLE_TYPE as oa, getNumberUnitValue as on, Viewport as hl, ScrollBar as lr, Layer as Gs, Documents as gl, DocBackground as fl, getLastLine as pl, lineIterator as ml, getLastColumn as El, UniverRenderEnginePlugin as Il, DeviceInputEventType as ra } from "@univerjs/engine-render";
7
- import { IClipboardInterfaceService as sa, FILE_PNG_CLIPBOARD_MIME_TYPE as Sl, FILE__WEBP_CLIPBOARD_MIME_TYPE as vl, FILE__JPEG_CLIPBOARD_MIME_TYPE as Cl, FILE__BMP_CLIPBOARD_MIME_TYPE as Rl, HTML_CLIPBOARD_MIME_TYPE as ia, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as aa, CopyCommand as bl, CutCommand as xl, PasteCommand as yl, ILayoutService as Oo, KeyCode as q, IConfirmService as ca, useDependency as J, ComponentManager as rn, ISidebarService as la, getMenuHiddenObservable as se, MenuItemType as Z, COLOR_PICKER_COMPONENT as da, FONT_FAMILY_ITEM_COMPONENT as Ol, FONT_FAMILY_COMPONENT as Tl, FONT_SIZE_LIST as Bl, FONT_SIZE_COMPONENT as Ml, HEADING_LIST as Ys, COMMON_LABEL_COMPONENT as _l, HEADING_ITEM_COMPONENT as Dl, ICanvasPopupService as Pl, IMenuManagerService as Aa, ToolbarItem as wl, MenuManagerPosition as Nl, useObservable as et, RectPopup as Ll, DesktopMenu as Ql, ContextMenuPosition as no, MetaKeys as te, Slider as Ul, useConfigValue as ua, useEvent as mn, ContextMenuGroup as an, RibbonInsertGroup as Fl, RibbonStartGroup as Ks, IUIPartsService as Hl, IShortcutService as To, BuiltInUIPart as qs, connectInjector as Xs, imageMimeTypeSet as kl, IContextMenuService as Vl } from "@univerjs/ui";
6
+ import { IRenderManagerService as pe, DocumentEditArea as ve, hasListGlyph as ol, isIndentByGlyph as rl, isFirstGlyph as sl, getParagraphByGlyph as il, pixelToPt as al, ptToPixel as Ws, parseDataStreamToTree as cl, Liquid as ea, GlyphType as ta, DocumentSkeletonPageType as Oe, getPageFromPath as cr, getTableIdAndSliceIndex as zs, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as Sn, getColor as fn, RegularPolygon as na, Rect as Kn, getOffsetRectForDom as ll, ScrollTimer as dl, CURSOR_TYPE as Dt, getSystemHighlightColor as Al, Vector2 as vn, PageLayoutType as Cn, Shape as ul, Path as js, pxToNum as oa, TRANSFORM_CHANGE_OBSERVABLE_TYPE as ra, getNumberUnitValue as on, Viewport as hl, ScrollBar as lr, Layer as Gs, Documents as gl, DocBackground as fl, getLastLine as pl, lineIterator as ml, getLastColumn as El, UniverRenderEnginePlugin as Il, DeviceInputEventType as sa } from "@univerjs/engine-render";
7
+ import { IClipboardInterfaceService as ia, FILE_PNG_CLIPBOARD_MIME_TYPE as Sl, FILE__WEBP_CLIPBOARD_MIME_TYPE as vl, FILE__JPEG_CLIPBOARD_MIME_TYPE as Cl, FILE__BMP_CLIPBOARD_MIME_TYPE as Rl, HTML_CLIPBOARD_MIME_TYPE as aa, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as ca, CopyCommand as bl, CutCommand as xl, PasteCommand as yl, ILayoutService as To, KeyCode as q, useDependency as J, ComponentManager as rn, ISidebarService as la, getMenuHiddenObservable as se, MenuItemType as Z, COLOR_PICKER_COMPONENT as da, FONT_FAMILY_ITEM_COMPONENT as Ol, FONT_FAMILY_COMPONENT as Tl, FONT_SIZE_LIST as Bl, FONT_SIZE_COMPONENT as Ml, HEADING_LIST as Ys, COMMON_LABEL_COMPONENT as _l, HEADING_ITEM_COMPONENT as Dl, ICanvasPopupService as Pl, IMenuManagerService as Aa, ToolbarItem as wl, MenuManagerPosition as Nl, useObservable as et, RectPopup as Ll, DesktopMenu as Ql, ContextMenuPosition as oo, MetaKeys as te, Slider as Ul, useConfigValue as ua, useEvent as mn, ContextMenuGroup as an, RibbonInsertGroup as Fl, RibbonStartGroup as Ks, IUIPartsService as Hl, IShortcutService as Bo, BuiltInUIPart as qs, connectInjector as Xs, imageMimeTypeSet as kl, IContextMenuService as Vl } from "@univerjs/ui";
8
8
  import { ImageSourceType as Wr } from "@univerjs/drawing";
9
- import { Subject as be, BehaviorSubject as Fe, merge as ha, filter as oo, takeUntil as ft, fromEvent as je, Observable as fe, map as Pn, combineLatest as wn, distinctUntilChanged as Wt, throttleTime as Rn, switchMap as Wl, take as jl, first as zl, of as Gl, animationFrameScheduler as Yl } from "rxjs";
9
+ import { Subject as be, BehaviorSubject as Fe, merge as ha, filter as ro, takeUntil as ft, fromEvent as ze, Observable as fe, map as Pn, combineLatest as wn, distinctUntilChanged as Wt, throttleTime as Rn, switchMap as Wl, take as zl, first as jl, of as Gl, animationFrameScheduler as Yl } from "rxjs";
10
10
  import { useRef as ke, createElement as Be, forwardRef as Me, useState as Ee, useEffect as Ce, useMemo as Te, useCallback as ga, useImperativeHandle as Kl, useLayoutEffect as fa } from "react";
11
11
  import { filter as dr, bufferTime as ql, map as Xl } from "rxjs/operators";
12
12
  import { jsxs as re, jsx as Q, Fragment as Zl } from "react/jsx-runtime";
13
- import { Checkbox as Zs, InputNumber as it, Button as Jl, clsx as ze, borderClassName as Nn, Select as pa, scrollbarClassName as $l, Tooltip as ed } from "@univerjs/design";
13
+ import { Checkbox as Zs, InputNumber as it, Button as Jl, clsx as je, borderClassName as Nn, Select as pa, scrollbarClassName as $l, Tooltip as ed } from "@univerjs/design";
14
14
  var td = Object.getOwnPropertyDescriptor, nd = (n, e, t, o) => {
15
15
  for (var r = o > 1 ? void 0 : o ? td(e, t) : e, s = n.length - 1, i; s >= 0; s--)
16
16
  (i = n[s]) && (r = i(r) || r);
@@ -55,7 +55,7 @@ let Pt = class extends me {
55
55
  };
56
56
  Pt = nd([
57
57
  Js(0, L),
58
- Js(1, j(Y))
58
+ Js(1, z(Y))
59
59
  ], Pt);
60
60
  const od = {
61
61
  undo: !0,
@@ -100,7 +100,7 @@ const od = {
100
100
  toolbar: !0
101
101
  }, sd = "DOC_UI_PLUGIN";
102
102
  var $e = /* @__PURE__ */ ((n) => (n.MAIN = "__Document_Render_Main__", n.BACKGROUND = "__Document_Render_Background__", n))($e || {}), We = /* @__PURE__ */ ((n) => (n.VIEW_MAIN = "viewMain", n.VIEW_TOP = "viewTop", n.VIEW_LEFT = "viewLeft", n.VIEW_LEFT_TOP = "viewLeftTop", n))(We || {});
103
- const id = 0, zo = 2, ad = 4, $s = 10, jf = "normalTextSelectionPluginName";
103
+ const id = 0, Go = 2, ad = 4, $s = 10, zf = "normalTextSelectionPluginName";
104
104
  function pt(n) {
105
105
  const { mainComponent: e, scene: t, engine: o, components: r } = n, s = e, i = r.get($e.BACKGROUND);
106
106
  return {
@@ -125,7 +125,7 @@ function cd(n, e) {
125
125
  engine: a
126
126
  };
127
127
  }
128
- function zf(n, e) {
128
+ function jf(n, e) {
129
129
  const t = e.getRenderById(n);
130
130
  if (t == null)
131
131
  return;
@@ -187,7 +187,7 @@ function Yf(n, e) {
187
187
  function Kf(n, e) {
188
188
  return e.some((t) => n.startIndex > t.startIndex && n.startIndex < t.endIndex);
189
189
  }
190
- function Bo(n, e, t, o, r) {
190
+ function Mo(n, e, t, o, r) {
191
191
  const { textRuns: s = [], dataStream: i } = n, a = r && i.startsWith("="), c = {
192
192
  st: 0,
193
193
  ed: 0,
@@ -214,7 +214,7 @@ function Bo(n, e, t, o, r) {
214
214
  ...o
215
215
  }), c;
216
216
  }
217
- function jr(n, e, t) {
217
+ function zr(n, e, t) {
218
218
  if (t) {
219
219
  const r = n.find((s) => e >= s.startIndex && e <= s.endIndex + 1);
220
220
  return r != null && r.wholeEntity ? null : r;
@@ -222,7 +222,7 @@ function jr(n, e, t) {
222
222
  const o = n.find((r) => e > r.startIndex && e <= r.endIndex);
223
223
  return o != null && o.wholeEntity ? null : o;
224
224
  }
225
- function zr(n, e) {
225
+ function jr(n, e) {
226
226
  return n.filter((t) => e > t.startIndex && e <= t.endIndex);
227
227
  }
228
228
  function qf(n) {
@@ -240,7 +240,7 @@ function Xf(n, e = 0, t = 0) {
240
240
  height: n.height
241
241
  },
242
242
  positionH: {
243
- relativeFrom: Co.MARGIN,
243
+ relativeFrom: Ro.MARGIN,
244
244
  posOffset: (n.left || 0) - e
245
245
  },
246
246
  positionV: {
@@ -257,11 +257,11 @@ const dd = "doc.command.tab", Jt = {
257
257
  const o = n.get(Pt).onAutoFormat(Jt.id, e);
258
258
  return (await wr(o, n.get(T))).result;
259
259
  }
260
- }, Ad = "doc.command.after-space", Mo = {
260
+ }, Ad = "doc.command.after-space", _o = {
261
261
  id: Ad,
262
262
  type: D.COMMAND,
263
263
  async handler(n) {
264
- const t = n.get(Pt).onAutoFormat(Mo.id);
264
+ const t = n.get(Pt).onAutoFormat(_o.id);
265
265
  return (await wr(t, n.get(T))).result;
266
266
  }
267
267
  }, bn = {
@@ -276,7 +276,7 @@ var ud = Object.getOwnPropertyDescriptor, hd = (n, e, t, o) => {
276
276
  for (var r = o > 1 ? void 0 : o ? ud(e, t) : e, s = n.length - 1, i; s >= 0; s--)
277
277
  (i = n[s]) && (r = i(r) || r);
278
278
  return r;
279
- }, Go = (n, e) => (t, o) => e(t, o, n);
279
+ }, Yo = (n, e) => (t, o) => e(t, o, n);
280
280
  const gd = 11, fd = 9, kn = {
281
281
  /**
282
282
  * fontFamily
@@ -334,9 +334,9 @@ let at = class extends me {
334
334
  }
335
335
  };
336
336
  at = hd([
337
- Go(0, j(Y)),
338
- Go(1, L),
339
- Go(2, pe)
337
+ Yo(0, z(Y)),
338
+ Yo(1, L),
339
+ Yo(2, pe)
340
340
  ], at);
341
341
  function Ke(n, e) {
342
342
  var o;
@@ -390,7 +390,7 @@ const Gr = {
390
390
  const h = l.getUnitId(), { startOffset: u, endOffset: g } = i, p = ((ee = A.paragraphs) != null ? ee : []).find((k) => k.startIndex >= u);
391
391
  if (!p)
392
392
  return !1;
393
- const m = u === p.startIndex, I = p.startIndex, S = s.getDefaultStyle(), v = s.getStyleCache(), R = Bo(A, g, S, v), E = {
393
+ const m = u === p.startIndex, I = p.startIndex, S = s.getDefaultStyle(), v = s.getStyleCache(), R = Mo(A, g, S, v), E = {
394
394
  dataStream: V.PARAGRAPH,
395
395
  paragraphs: ma(
396
396
  V.PARAGRAPH,
@@ -475,7 +475,7 @@ const Gr = {
475
475
  return y.params.actions = P.editOp(M.serialize(), F), !!r.syncExecuteCommand(y.id, y.params);
476
476
  }
477
477
  };
478
- var _o = /* @__PURE__ */ ((n) => (n[n.ABOVE = 0] = "ABOVE", n[n.BELLOW = 1] = "BELLOW", n))(_o || {}), Yr = /* @__PURE__ */ ((n) => (n[n.LEFT = 0] = "LEFT", n[n.RIGHT = 1] = "RIGHT", n))(Yr || {});
478
+ var Do = /* @__PURE__ */ ((n) => (n[n.ABOVE = 0] = "ABOVE", n[n.BELLOW = 1] = "BELLOW", n))(Do || {}), Yr = /* @__PURE__ */ ((n) => (n[n.LEFT = 0] = "LEFT", n[n.RIGHT = 1] = "RIGHT", n))(Yr || {});
479
479
  function pd(n, e) {
480
480
  let t = V.TABLE_START;
481
481
  const o = [], r = [];
@@ -552,7 +552,7 @@ function Ea(n, e, t) {
552
552
  textWrap: Dc.NONE,
553
553
  position: {
554
554
  positionH: {
555
- relativeFrom: Co.PAGE,
555
+ relativeFrom: Ro.PAGE,
556
556
  posOffset: 0
557
557
  },
558
558
  positionV: {
@@ -993,7 +993,7 @@ const yd = En, va = {
993
993
  v.push(At), v.push(Je);
994
994
  }
995
995
  }
996
- const ne = jr((P = g.customRanges) != null ? P : [], $, yd.includes(f)), ie = zr((F = g.customDecorations) != null ? F : [], $);
996
+ const ne = zr((P = g.customRanges) != null ? P : [], $, yd.includes(f)), ie = jr((F = g.customDecorations) != null ? F : [], $);
997
997
  if (ne && (k.customRanges = [{
998
998
  ...ne,
999
999
  startIndex: 0,
@@ -1454,7 +1454,7 @@ function $r(n, e) {
1454
1454
  }
1455
1455
  return t;
1456
1456
  }
1457
- const Do = {
1457
+ const Po = {
1458
1458
  id: "doc.command.delete-left",
1459
1459
  type: D.COMMAND,
1460
1460
  // eslint-disable-next-line max-lines-per-function, complexity
@@ -1539,7 +1539,7 @@ const Do = {
1539
1539
  if (w == null)
1540
1540
  return !0;
1541
1541
  const N = (F = (P = s.getBody()) == null ? void 0 : P.customBlocks) == null ? void 0 : F.find(($) => $.blockId === b.drawingId);
1542
- if (w.layoutType === Ro.INLINE || (N == null ? void 0 : N.blockType) === wc.CUSTOM) {
1542
+ if (w.layoutType === bo.INLINE || (N == null ? void 0 : N.blockType) === wc.CUSTOM) {
1543
1543
  const $ = s.getUnitId();
1544
1544
  r = await o.executeCommand(Zr.id, {
1545
1545
  direction: Ne.LEFT,
@@ -1634,7 +1634,7 @@ const Do = {
1634
1634
  const b = (v = o.getSnapshot().drawings) == null ? void 0 : v[(S = R.drawingId) != null ? S : ""];
1635
1635
  if (b == null)
1636
1636
  return !0;
1637
- if (b.layoutType === Ro.INLINE) {
1637
+ if (b.layoutType === bo.INLINE) {
1638
1638
  const C = o.getUnitId();
1639
1639
  I = await s.executeCommand(Zr.id, {
1640
1640
  direction: Ne.RIGHT,
@@ -1762,30 +1762,30 @@ class Ld {
1762
1762
  this._cache.clear();
1763
1763
  }
1764
1764
  }
1765
- const Yo = new Ld();
1765
+ const Ko = new Ld();
1766
1766
  function ts(n) {
1767
1767
  const e = n.style, t = {}, o = n.tagName.toLowerCase();
1768
1768
  switch (o) {
1769
1769
  case "b":
1770
1770
  case "em":
1771
1771
  case "strong": {
1772
- t.bl = z.TRUE;
1772
+ t.bl = j.TRUE;
1773
1773
  break;
1774
1774
  }
1775
1775
  case "s": {
1776
1776
  t.st = {
1777
- s: z.TRUE
1777
+ s: j.TRUE
1778
1778
  };
1779
1779
  break;
1780
1780
  }
1781
1781
  case "u": {
1782
1782
  t.ul = {
1783
- s: z.TRUE
1783
+ s: j.TRUE
1784
1784
  };
1785
1785
  break;
1786
1786
  }
1787
1787
  case "i": {
1788
- t.it = z.TRUE;
1788
+ t.it = j.TRUE;
1789
1789
  break;
1790
1790
  }
1791
1791
  case "sub":
@@ -1807,20 +1807,20 @@ function ts(n) {
1807
1807
  break;
1808
1808
  }
1809
1809
  case "font-style": {
1810
- i === "italic" && (t.it = z.TRUE);
1810
+ i === "italic" && (t.it = j.TRUE);
1811
1811
  break;
1812
1812
  }
1813
1813
  case "font-weight": {
1814
- (Number(i) > 400 || String(i) === "bold") && (t.bl = z.TRUE);
1814
+ (Number(i) > 400 || String(i) === "bold") && (t.bl = j.TRUE);
1815
1815
  break;
1816
1816
  }
1817
1817
  case "text-decoration": {
1818
1818
  /underline/.test(i) ? t.ul = {
1819
- s: z.TRUE
1819
+ s: j.TRUE
1820
1820
  } : /overline/.test(i) ? t.ol = {
1821
- s: z.TRUE
1821
+ s: j.TRUE
1822
1822
  } : /line-through/.test(i) && (t.st = {
1823
- s: z.TRUE
1823
+ s: j.TRUE
1824
1824
  });
1825
1825
  break;
1826
1826
  }
@@ -1853,7 +1853,7 @@ function ti(n, e) {
1853
1853
  const t = n.tagName.toLowerCase();
1854
1854
  return typeof e == "string" ? t === e : Array.isArray(e) ? e.some((o) => o === t) : e(n);
1855
1855
  }
1856
- const ni = 660, vo = class vo {
1856
+ const ni = 660, Co = class Co {
1857
1857
  constructor() {
1858
1858
  O(this, "_tableCache", []);
1859
1859
  O(this, "_styleCache", /* @__PURE__ */ new Map());
@@ -1867,7 +1867,7 @@ const ni = 660, vo = class vo {
1867
1867
  }
1868
1868
  convert(e, t = {}) {
1869
1869
  var a;
1870
- const o = vo._pluginList.find((c) => c.checkPasteType(e)), r = Qd(e), i = {
1870
+ const o = Co._pluginList.find((c) => c.checkPasteType(e)), r = Qd(e), i = {
1871
1871
  body: {
1872
1872
  dataStream: "",
1873
1873
  paragraphs: [],
@@ -1911,7 +1911,7 @@ const ni = 660, vo = class vo {
1911
1911
  size: { width: f, height: p },
1912
1912
  angle: 0,
1913
1913
  positionH: {
1914
- relativeFrom: Co.PAGE,
1914
+ relativeFrom: Ro.PAGE,
1915
1915
  posOffset: 0
1916
1916
  },
1917
1917
  positionV: {
@@ -1919,7 +1919,7 @@ const ni = 660, vo = class vo {
1919
1919
  posOffset: 0
1920
1920
  }
1921
1921
  },
1922
- layoutType: Ro.INLINE,
1922
+ layoutType: bo.INLINE,
1923
1923
  drawingType: Nr.DRAWING_IMAGE,
1924
1924
  unitId: o.id || "",
1925
1925
  subUnitId: o.id || ""
@@ -2012,8 +2012,8 @@ ${V.TABLE_CELL_END}`;
2012
2012
  }));
2013
2013
  }
2014
2014
  };
2015
- O(vo, "_pluginList", []);
2016
- let en = vo;
2015
+ O(Co, "_pluginList", []);
2016
+ let en = Co;
2017
2017
  const Ud = {
2018
2018
  name: "univer-doc-paste-plugin-lark",
2019
2019
  checkPasteType(n) {
@@ -2027,7 +2027,7 @@ const Ud = {
2027
2027
  const e = ts(n);
2028
2028
  return {
2029
2029
  st: {
2030
- s: z.TRUE
2030
+ s: j.TRUE
2031
2031
  },
2032
2032
  ...e
2033
2033
  };
@@ -2103,7 +2103,7 @@ const Fd = {
2103
2103
  filter: ["b"],
2104
2104
  getStyle(n) {
2105
2105
  const e = ts(n);
2106
- return { bl: z.TRUE, ...e };
2106
+ return { bl: j.TRUE, ...e };
2107
2107
  }
2108
2108
  }
2109
2109
  ],
@@ -2145,9 +2145,9 @@ function oi(n, e) {
2145
2145
  const { st: t, ed: o, ts: r = {} } = e, { ff: s, fs: i, it: a, bl: c, ul: d, st: l, ol: A, bg: h, cl: u, va: g } = r;
2146
2146
  let f = n.slice(t, o);
2147
2147
  const p = [];
2148
- return a === z.TRUE && (f = `<i>${f}</i>`), g === Ve.SUPERSCRIPT ? f = `<sup>${f}</sup>` : g === Ve.SUBSCRIPT && (f = `<sub>${f}</sub>`), (d == null ? void 0 : d.s) === z.TRUE && (f = `<u>${f}</u>`), (l == null ? void 0 : l.s) === z.TRUE && (f = `<s>${f}</s>`), c === z.TRUE && (f = `<strong>${f}</strong>`), s && p.push(`font-family: ${s}`), u && p.push(`color: ${u.rgb}`), i && p.push(`font-size: ${i}pt`), A && p.push("text-decoration: overline"), h && p.push(`background: ${h.rgb}`), p.length ? `<span style="${p.join("; ")};">${f}</span>` : f;
2148
+ return a === j.TRUE && (f = `<i>${f}</i>`), g === Ve.SUPERSCRIPT ? f = `<sup>${f}</sup>` : g === Ve.SUBSCRIPT && (f = `<sub>${f}</sub>`), (d == null ? void 0 : d.s) === j.TRUE && (f = `<u>${f}</u>`), (l == null ? void 0 : l.s) === j.TRUE && (f = `<s>${f}</s>`), c === j.TRUE && (f = `<strong>${f}</strong>`), s && p.push(`font-family: ${s}`), u && p.push(`color: ${u.rgb}`), i && p.push(`font-size: ${i}pt`), A && p.push("text-decoration: overline"), h && p.push(`background: ${h.rgb}`), p.length ? `<span style="${p.join("; ")};">${f}</span>` : f;
2149
2149
  }
2150
- function Ko(n, e, t) {
2150
+ function qo(n, e, t) {
2151
2151
  const { dataStream: o, textRuns: r = [] } = n;
2152
2152
  if (e === t)
2153
2153
  return "";
@@ -2172,38 +2172,21 @@ function Vd(n, e, t) {
2172
2172
  const A = (u, g) => {
2173
2173
  let f = "", p = 0, m = u, I = a.findIndex((S) => u <= S.startIndex && g >= S.startIndex);
2174
2174
  if (I === -1)
2175
- return f = Ko(o, u, g), { sliceHtml: f, customBlockLength: p };
2175
+ return f = qo(o, u, g), { sliceHtml: f, customBlockLength: p };
2176
2176
  for (; I !== -1; ) {
2177
2177
  const S = a[I];
2178
- a.splice(I, 1), f += Ko(o, m, S.startIndex);
2178
+ a.splice(I, 1), f += qo(o, m, S.startIndex);
2179
2179
  const v = r[S.blockId];
2180
- if (v)
2181
- switch (v.drawingType) {
2182
- case Nr.DRAWING_IMAGE: {
2183
- f += kd(v), p++;
2184
- break;
2185
- }
2186
- }
2187
- m = S.startIndex + 1, I = a.findIndex((R) => m <= R.startIndex && g >= R.startIndex);
2180
+ v && v.drawingType === Nr.DRAWING_IMAGE && (f += kd(v), p++), m = S.startIndex + 1, I = a.findIndex((R) => m <= R.startIndex && g >= R.startIndex);
2188
2181
  }
2189
- return f = f + Ko(o, m, g + 1), { sliceHtml: f, customBlockLength: p };
2182
+ return f = f + qo(o, m, g + 1), { sliceHtml: f, customBlockLength: p };
2190
2183
  };
2191
2184
  c.forEach((u) => {
2192
2185
  var v, R;
2193
2186
  const { startIndex: g, endIndex: f, rangeType: p, rangeId: m } = u, I = A(d, g);
2194
2187
  l += I.sliceHtml;
2195
2188
  const S = A(g, f + 1);
2196
- switch (p) {
2197
- case Lr.HYPERLINK: {
2198
- l += `<a data-rangeid="${m}" href="${(R = (v = u.properties) == null ? void 0 : v.url) != null ? R : ""}">${S.sliceHtml}</a>`;
2199
- break;
2200
- }
2201
- default: {
2202
- l += S.sliceHtml;
2203
- break;
2204
- }
2205
- }
2206
- d = f + 1 + (I.customBlockLength + S.customBlockLength);
2189
+ p === Lr.HYPERLINK ? l += `<a data-rangeid="${m}" href="${(R = (v = u.properties) == null ? void 0 : v.url) != null ? R : ""}">${S.sliceHtml}</a>` : l += S.sliceHtml, d = f + 1 + (I.customBlockLength + S.customBlockLength);
2207
2190
  });
2208
2191
  const h = A(d, t);
2209
2192
  return l += h.sliceHtml, l;
@@ -2267,7 +2250,7 @@ function Kt(n, e, t) {
2267
2250
  throw new Error(`Unknown node type: ${n.nodeType}`);
2268
2251
  }
2269
2252
  }
2270
- class jd {
2253
+ class zd {
2271
2254
  convert(e) {
2272
2255
  if (e.length === 0)
2273
2256
  throw new Error("The bodyList length at least to be 1");
@@ -2277,8 +2260,8 @@ class jd {
2277
2260
  return t;
2278
2261
  }
2279
2262
  }
2280
- var zd = Object.getOwnPropertyDescriptor, Gd = (n, e, t, o) => {
2281
- for (var r = o > 1 ? void 0 : o ? zd(e, t) : e, s = n.length - 1, i; s >= 0; s--)
2263
+ var jd = Object.getOwnPropertyDescriptor, Gd = (n, e, t, o) => {
2264
+ for (var r = o > 1 ? void 0 : o ? jd(e, t) : e, s = n.length - 1, i; s >= 0; s--)
2282
2265
  (i = n[s]) && (r = i(r) || r);
2283
2266
  return r;
2284
2267
  }, cn = (n, e) => (t, o) => e(t, o, n);
@@ -2305,10 +2288,10 @@ let ur = class extends me {
2305
2288
  super();
2306
2289
  O(this, "_clipboardHooks", []);
2307
2290
  O(this, "_htmlToUDM", new en());
2308
- O(this, "_umdToHtml", new jd());
2291
+ O(this, "_umdToHtml", new zd());
2309
2292
  this._univerInstanceService = e, this._logService = t, this._commandService = o, this._clipboardInterfaceService = r, this._docSelectionManagerService = s;
2310
2293
  }
2311
- async copy(e = ir.copy, t) {
2294
+ async copy(e = ar.copy, t) {
2312
2295
  var a, c;
2313
2296
  const { newSnapshotList: o = [], needCache: r = !1, snapshot: s, ranges: i } = (a = this._getDocumentBodyInRanges(e, t)) != null ? a : {};
2314
2297
  if (o.length === 0 || s == null)
@@ -2334,7 +2317,7 @@ let ur = class extends me {
2334
2317
  if (!t && !o && r.length && (t = await this._createImagePasteHtml(r)), !t && !o)
2335
2318
  return this._logService.warn("[DocClipboardController] html and text cannot be both empty!"), !1;
2336
2319
  const a = this._genDocDataFromHtmlAndText(t, o, i);
2337
- if (i === bo)
2320
+ if (i === xo)
2338
2321
  if (o) {
2339
2322
  const c = ce.transform.fromPlainText(o);
2340
2323
  return this._paste({ body: c });
@@ -2351,7 +2334,7 @@ let ur = class extends me {
2351
2334
  } = (A = t[0]) != null ? A : {};
2352
2335
  if (r == null && this._logService.error("[DocClipboardController] segmentId is not existed"), t.length === 0 && o.length === 0)
2353
2336
  return !1;
2354
- this.copy(ir.cut, e);
2337
+ this.copy(ar.cut, e);
2355
2338
  try {
2356
2339
  let h = 0;
2357
2340
  if (o.length > 0)
@@ -2447,7 +2430,7 @@ let ur = class extends me {
2447
2430
  }
2448
2431
  }
2449
2432
  }
2450
- Yo.set(o, A);
2433
+ Ko.set(o, A);
2451
2434
  }
2452
2435
  return this._clipboardInterfaceService.write(r, s);
2453
2436
  }
@@ -2494,11 +2477,11 @@ let ur = class extends me {
2494
2477
  for (const s of e)
2495
2478
  for (const i of s.types)
2496
2479
  switch (i) {
2497
- case aa: {
2480
+ case ca: {
2498
2481
  o = await s.getType(i).then((a) => a && a.text());
2499
2482
  break;
2500
2483
  }
2501
- case ia: {
2484
+ case aa: {
2502
2485
  t = await s.getType(i).then((a) => a && a.text());
2503
2486
  break;
2504
2487
  }
@@ -2524,7 +2507,7 @@ let ur = class extends me {
2524
2507
  }
2525
2508
  const r = Nd(e);
2526
2509
  if (r) {
2527
- const i = Yo.get(r);
2510
+ const i = Ko.get(r);
2528
2511
  if (i)
2529
2512
  return i;
2530
2513
  }
@@ -2533,7 +2516,7 @@ let ur = class extends me {
2533
2516
  o = (i == null ? void 0 : i.getUnitId()) || "";
2534
2517
  }
2535
2518
  const s = this._htmlToUDM.convert(e, { unitId: o });
2536
- return r && Yo.set(r, s), s;
2519
+ return r && Ko.set(r, s), s;
2537
2520
  }
2538
2521
  async _createImagePasteHtml(e) {
2539
2522
  var a, c;
@@ -2578,7 +2561,7 @@ let ur = class extends me {
2578
2561
  title: "",
2579
2562
  source: A.source,
2580
2563
  description: "",
2581
- layoutType: Ro.INLINE,
2564
+ layoutType: bo.INLINE,
2582
2565
  drawingType: Nr.DRAWING_IMAGE,
2583
2566
  transform: {
2584
2567
  width: h,
@@ -2588,7 +2571,7 @@ let ur = class extends me {
2588
2571
  docTransform: {
2589
2572
  angle: 0,
2590
2573
  size: { width: h, height: u },
2591
- positionH: { relativeFrom: Co.CHARACTER, posOffset: 0 },
2574
+ positionH: { relativeFrom: Ro.CHARACTER, posOffset: 0 },
2592
2575
  positionV: { relativeFrom: gt.LINE, posOffset: 0 }
2593
2576
  }
2594
2577
  };
@@ -2599,19 +2582,19 @@ ur = Gd([
2599
2582
  cn(0, L),
2600
2583
  cn(1, Qr),
2601
2584
  cn(2, T),
2602
- cn(3, sa),
2603
- cn(4, j(Y))
2585
+ cn(3, ia),
2586
+ cn(4, z(Y))
2604
2587
  ], ur);
2605
- function Po(n) {
2588
+ function wo(n) {
2606
2589
  return n.getContextValue(_n) || n.getContextValue(eo);
2607
2590
  }
2608
- const ns = 999, ro = {
2591
+ const ns = 999, so = {
2609
2592
  id: bl.id,
2610
2593
  name: "doc.command.copy",
2611
2594
  type: D.COMMAND,
2612
2595
  multi: !0,
2613
2596
  priority: ns,
2614
- preconditions: Po,
2597
+ preconditions: wo,
2615
2598
  handler: async (n) => n.get(Lt).copy()
2616
2599
  }, os = {
2617
2600
  id: "doc.command.copy-current-paragraph",
@@ -2619,7 +2602,7 @@ const ns = 999, ro = {
2619
2602
  handler: async (n) => {
2620
2603
  const e = n.get(Lt), t = Qn(n);
2621
2604
  return t ? e.copy(
2622
- ir.copy,
2605
+ ar.copy,
2623
2606
  [{
2624
2607
  startOffset: t.paragraphStart,
2625
2608
  endOffset: t.paragraphEnd + 1,
@@ -2633,7 +2616,7 @@ const ns = 999, ro = {
2633
2616
  type: D.COMMAND,
2634
2617
  multi: !0,
2635
2618
  priority: ns,
2636
- preconditions: Po,
2619
+ preconditions: wo,
2637
2620
  handler: async (n) => n.get(Lt).cut()
2638
2621
  }, ss = {
2639
2622
  id: "doc.command.cut-current-paragraph",
@@ -2655,12 +2638,12 @@ const ns = 999, ro = {
2655
2638
  type: D.COMMAND,
2656
2639
  multi: !0,
2657
2640
  priority: ns,
2658
- preconditions: Po,
2641
+ preconditions: wo,
2659
2642
  handler: async (n) => {
2660
- const e = n.get(Lt), o = await n.get(sa).read();
2643
+ const e = n.get(Lt), o = await n.get(ia).read();
2661
2644
  return o.length === 0 ? !1 : e.paste(o);
2662
2645
  }
2663
- }, wo = {
2646
+ }, No = {
2664
2647
  id: "doc.command.horizontal-line",
2665
2648
  type: D.COMMAND,
2666
2649
  handler: (n, e) => n.get(T).syncExecuteCommand(Gr.id, {
@@ -2679,7 +2662,7 @@ const ns = 999, ro = {
2679
2662
  type: D.COMMAND,
2680
2663
  handler: (n) => {
2681
2664
  const e = n.get(T), t = Qn(n);
2682
- return t ? e.syncExecuteCommand(wo.id, {
2665
+ return t ? e.syncExecuteCommand(No.id, {
2683
2666
  insertRange: {
2684
2667
  startOffset: t.startIndex + 1,
2685
2668
  endOffset: t.startIndex + 1
@@ -2727,7 +2710,7 @@ const ns = 999, ro = {
2727
2710
  }, !1), !0;
2728
2711
  }
2729
2712
  };
2730
- class No extends Ct {
2713
+ class Lo extends Ct {
2731
2714
  constructor(t) {
2732
2715
  super();
2733
2716
  O(this, "_previousActiveRange", null);
@@ -2782,7 +2765,7 @@ const Ba = {
2782
2765
  // eslint-disable-next-line max-lines-per-function
2783
2766
  handler: async (n, e) => {
2784
2767
  var N, ee, $;
2785
- const { unitId: t, newText: o, oldTextLen: r, isCompositionEnd: s, isCompositionStart: i } = e, a = n.get(T), c = n.get(pe), d = n.get(L), l = n.get(at), A = (N = c.getRenderById(t)) == null ? void 0 : N.with(No), h = d.getUnit(t, _.UNIVER_DOC);
2768
+ const { unitId: t, newText: o, oldTextLen: r, isCompositionEnd: s, isCompositionStart: i } = e, a = n.get(T), c = n.get(pe), d = n.get(L), l = n.get(at), A = (N = c.getRenderById(t)) == null ? void 0 : N.with(Lo), h = d.getUnit(t, _.UNIVER_DOC);
2786
2769
  if (h == null || A == null)
2787
2770
  return !1;
2788
2771
  const u = A.getActiveRange();
@@ -2806,13 +2789,13 @@ const Ba = {
2806
2789
  actions: [],
2807
2790
  textRanges: R
2808
2791
  }
2809
- }, b = l.getDefaultStyle(), x = l.getStyleCache(), C = jr((ee = p.customRanges) != null ? ee : [], I + r, En.includes(t)), B = Bo(
2792
+ }, b = l.getDefaultStyle(), x = l.getStyleCache(), C = zr((ee = p.customRanges) != null ? ee : [], I + r, En.includes(t)), B = Mo(
2810
2793
  p,
2811
2794
  i ? S : I + r,
2812
2795
  b,
2813
2796
  x,
2814
2797
  En.includes(t)
2815
- ), y = zr(($ = p.customDecorations) != null ? $ : [], I + r), M = new Ie(), P = W.getInstance();
2798
+ ), y = jr(($ = p.customDecorations) != null ? $ : [], I + r), M = new Ie(), P = W.getInstance();
2816
2799
  if (!u.collapsed && i) {
2817
2800
  const U = ce.selection.delete([u], p, 0, null, !1);
2818
2801
  M.push(...U), E.params.textRanges = [{
@@ -3112,12 +3095,12 @@ function Yd(n) {
3112
3095
  }
3113
3096
  function Ma(n, e, t) {
3114
3097
  if (/bl|it/.test(e))
3115
- return (n == null ? void 0 : n[e]) === z.TRUE ? z.FALSE : z.TRUE;
3098
+ return (n == null ? void 0 : n[e]) === j.TRUE ? j.FALSE : j.TRUE;
3116
3099
  if (/ul|st/.test(e))
3117
- return Yd(n == null ? void 0 : n[e]) && (n == null ? void 0 : n[e]).s === z.TRUE ? {
3118
- s: z.FALSE
3100
+ return Yd(n == null ? void 0 : n[e]) && (n == null ? void 0 : n[e]).s === j.TRUE ? {
3101
+ s: j.FALSE
3119
3102
  } : {
3120
- s: z.TRUE
3103
+ s: j.TRUE
3121
3104
  };
3122
3105
  if (/va/.test(e))
3123
3106
  return t === bt.id ? (n == null ? void 0 : n[e]) === Ve.SUBSCRIPT ? Ve.NORMAL : Ve.SUBSCRIPT : (n == null ? void 0 : n[e]) === Ve.SUPERSCRIPT ? Ve.NORMAL : Ve.SUPERSCRIPT;
@@ -3146,16 +3129,16 @@ function _a(n, e, t) {
3146
3129
  return ((C = x.ts) == null ? void 0 : C.ff) != null;
3147
3130
  })) == null ? void 0 : A.ts) == null ? void 0 : h.ff) != null ? u : a.ff, a.it = i.length && i.every((x) => {
3148
3131
  var C;
3149
- return ((C = x.ts) == null ? void 0 : C.it) === z.TRUE;
3150
- }) ? z.TRUE : z.FALSE, a.bl = i.length && i.every((x) => {
3132
+ return ((C = x.ts) == null ? void 0 : C.it) === j.TRUE;
3133
+ }) ? j.TRUE : j.FALSE, a.bl = i.length && i.every((x) => {
3151
3134
  var C;
3152
- return ((C = x.ts) == null ? void 0 : C.bl) === z.TRUE;
3153
- }) ? z.TRUE : z.FALSE, a.ul = i.length && i.every((x) => {
3135
+ return ((C = x.ts) == null ? void 0 : C.bl) === j.TRUE;
3136
+ }) ? j.TRUE : j.FALSE, a.ul = i.length && i.every((x) => {
3154
3137
  var C, B;
3155
- return ((B = (C = x.ts) == null ? void 0 : C.ul) == null ? void 0 : B.s) === z.TRUE;
3138
+ return ((B = (C = x.ts) == null ? void 0 : C.ul) == null ? void 0 : B.s) === j.TRUE;
3156
3139
  }) ? (g = i[0].ts) == null ? void 0 : g.ul : a.ul, a.st = i.length && i.every((x) => {
3157
3140
  var C, B;
3158
- return ((B = (C = x.ts) == null ? void 0 : C.st) == null ? void 0 : B.s) === z.TRUE;
3141
+ return ((B = (C = x.ts) == null ? void 0 : C.st) == null ? void 0 : B.s) === j.TRUE;
3159
3142
  }) ? (f = i[0].ts) == null ? void 0 : f.st : a.st, a.bg = (I = (m = (p = i.find((x) => {
3160
3143
  var C;
3161
3144
  return ((C = x.ts) == null ? void 0 : C.bg) != null;
@@ -3269,7 +3252,7 @@ const Da = {
3269
3252
  id: "doc.command-cover-content",
3270
3253
  type: D.COMMAND,
3271
3254
  handler: (n, e) => {
3272
- const { unitId: t, body: o, segmentId: r = "", textRanges: s } = e, i = n.get(L), a = n.get(T), c = n.get(xo), d = i.getUniverDocInstance(t), l = d == null ? void 0 : d.getSnapshot().body;
3255
+ const { unitId: t, body: o, segmentId: r = "", textRanges: s } = e, i = n.get(L), a = n.get(T), c = n.get(yo), d = i.getUniverDocInstance(t), l = d == null ? void 0 : d.getSnapshot().body;
3273
3256
  if (d == null || l == null)
3274
3257
  return !1;
3275
3258
  const A = Pa(t, r, d, l, o);
@@ -3408,7 +3391,7 @@ const wa = {
3408
3391
  }), m = W.getInstance(), I = Ae(i, c);
3409
3392
  return g.params.actions = m.editOp(p.serialize(), I), !!r.syncExecuteCommand(g.id, g.params);
3410
3393
  }
3411
- }, Lo = {
3394
+ }, Qo = {
3412
3395
  id: "doc.command.change-list-type",
3413
3396
  type: D.COMMAND,
3414
3397
  handler: (n, e) => {
@@ -3474,7 +3457,7 @@ const gr = {
3474
3457
  type: D.COMMAND,
3475
3458
  handler: (n, e) => {
3476
3459
  const t = n.get(T);
3477
- return e != null && e.value ? t.syncExecuteCommand(Lo.id, {
3460
+ return e != null && e.value ? t.syncExecuteCommand(Qo.id, {
3478
3461
  listType: e.value,
3479
3462
  docRange: e.docRange
3480
3463
  }) : t.syncExecuteCommand(Fn.id, {
@@ -3482,12 +3465,12 @@ const gr = {
3482
3465
  docRange: e == null ? void 0 : e.docRange
3483
3466
  });
3484
3467
  }
3485
- }, so = {
3468
+ }, io = {
3486
3469
  id: "doc.command.check-list",
3487
3470
  type: D.COMMAND,
3488
3471
  handler: (n, e) => {
3489
3472
  const t = n.get(T);
3490
- return e != null && e.value ? t.syncExecuteCommand(Lo.id, {
3473
+ return e != null && e.value ? t.syncExecuteCommand(Qo.id, {
3491
3474
  listType: e.value,
3492
3475
  docRange: e.docRange
3493
3476
  }) : t.syncExecuteCommand(Fn.id, {
@@ -3529,7 +3512,7 @@ const gr = {
3529
3512
  type: D.COMMAND,
3530
3513
  handler: (n, e) => {
3531
3514
  const t = n.get(T);
3532
- return e != null && e.value ? t.syncExecuteCommand(Lo.id, {
3515
+ return e != null && e.value ? t.syncExecuteCommand(Qo.id, {
3533
3516
  listType: e.value
3534
3517
  }) : t.syncExecuteCommand(Fn.id, {
3535
3518
  listType: xe.ORDER_LIST
@@ -3724,25 +3707,25 @@ const ls = {
3724
3707
  const S = Ae(i, c);
3725
3708
  return f.params.actions = I.editOp(m.serialize(), S), !!r.syncExecuteCommand(f.id, f.params);
3726
3709
  }
3727
- }, Qo = {
3710
+ }, Uo = {
3728
3711
  id: "doc.command.align-left",
3729
3712
  type: D.COMMAND,
3730
3713
  handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
3731
3714
  alignType: Ue.LEFT
3732
3715
  })
3733
- }, Uo = {
3716
+ }, Fo = {
3734
3717
  id: "doc.command.align-center",
3735
3718
  type: D.COMMAND,
3736
3719
  handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
3737
3720
  alignType: Ue.CENTER
3738
3721
  })
3739
- }, Fo = {
3722
+ }, Ho = {
3740
3723
  id: "doc.command.align-right",
3741
3724
  type: D.COMMAND,
3742
3725
  handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
3743
3726
  alignType: Ue.RIGHT
3744
3727
  })
3745
- }, Ho = {
3728
+ }, ko = {
3746
3729
  id: "doc.command.align-justify",
3747
3730
  type: D.COMMAND,
3748
3731
  handler: (n) => n.get(T).syncExecuteCommand(lt.id, {
@@ -3763,7 +3746,7 @@ const ls = {
3763
3746
  id: "doc.command.set-zoom-ratio",
3764
3747
  handler: async (n, e) => {
3765
3748
  var A, h, u;
3766
- const t = n.get(T), o = n.get(xo), r = n.get(L);
3749
+ const t = n.get(T), o = n.get(yo), r = n.get(L);
3767
3750
  let s = (A = r.getCurrentUniverDocInstance()) == null ? void 0 : A.getUnitId();
3768
3751
  if (!s) return !1;
3769
3752
  let i = 1;
@@ -3858,7 +3841,7 @@ const ls = {
3858
3841
  const S = Ae(i, c);
3859
3842
  return I.params.actions = p.editOp(f.serialize(), S), !!s.syncExecuteCommand(I.id, I.params);
3860
3843
  }
3861
- }, qo = {
3844
+ }, Xo = {
3862
3845
  "#": K.HEADING_1,
3863
3846
  "##": K.HEADING_2,
3864
3847
  "###": K.HEADING_3,
@@ -3894,7 +3877,7 @@ const ls = {
3894
3877
  handler: (n) => n.get(T).syncExecuteCommand(Xe.id, {
3895
3878
  value: K.HEADING_5
3896
3879
  })
3897
- }, io = {
3880
+ }, ao = {
3898
3881
  id: "doc.command.normal-text-heading",
3899
3882
  type: D.COMMAND,
3900
3883
  handler: (n) => n.get(T).syncExecuteCommand(Xe.id, {
@@ -3977,7 +3960,7 @@ function pr(n) {
3977
3960
  }
3978
3961
  class It {
3979
3962
  constructor(e, t) {
3980
- O(this, "_liquid", new $i());
3963
+ O(this, "_liquid", new ea());
3981
3964
  O(this, "_currentStartState", {
3982
3965
  page: 0,
3983
3966
  section: 0,
@@ -4020,7 +4003,7 @@ class It {
4020
4003
  return;
4021
4004
  const { x: E, y: b } = this._liquid;
4022
4005
  let x, C;
4023
- const B = v[d], y = v[l], M = v[d - 1], P = (B == null ? void 0 : B.left) || 0, F = (B == null ? void 0 : B.width) || 0, w = (y == null ? void 0 : y.left) || 0, N = (y == null ? void 0 : y.width) || 0, ee = (B == null ? void 0 : B.glyphType) === ea.LIST, { startOffset: $, endOffset: U } = tA(v, d, l, R), H = a.glyph === d && A ? a.isBack : !0, k = c.glyph === l && h ? c.isBack : !1, ne = a === c, ie = H && M != null ? M : B;
4006
+ const B = v[d], y = v[l], M = v[d - 1], P = (B == null ? void 0 : B.left) || 0, F = (B == null ? void 0 : B.width) || 0, w = (y == null ? void 0 : y.left) || 0, N = (y == null ? void 0 : y.width) || 0, ee = (B == null ? void 0 : B.glyphType) === ta.LIST, { startOffset: $, endOffset: U } = tA(v, d, l, R), H = a.glyph === d && A ? a.isBack : !0, k = c.glyph === l && h ? c.isBack : !1, ne = a === c, ie = H && M != null ? M : B;
4024
4007
  if (d === 0 && l === v.length - 1)
4025
4008
  x = {
4026
4009
  startX: E + P + (ee ? F : 0),
@@ -4198,9 +4181,9 @@ class It {
4198
4181
  );
4199
4182
  this._liquid.translateSave(), this._liquid.translateLine(he, !0, !1);
4200
4183
  for (let Je = Ze; Je <= At; Je++) {
4201
- const Wo = Pe[Je];
4202
- this._liquid.translateSave(), this._liquid.translateDivide(Wo);
4203
- const { glyphGroup: yc } = Wo, { start_next: Oc, end_next: Tc } = this._getSelectionRuler(
4184
+ const zo = Pe[Je];
4185
+ this._liquid.translateSave(), this._liquid.translateDivide(zo);
4186
+ const { glyphGroup: yc } = zo, { start_next: Oc, end_next: Tc } = this._getSelectionRuler(
4204
4187
  qt.divide,
4205
4188
  e,
4206
4189
  t,
@@ -4208,7 +4191,7 @@ class It {
4208
4191
  Je
4209
4192
  );
4210
4193
  let Ns = !1, Ls = !1;
4211
- E === I && w === P && H === $ && oe === ie && Je === Ze && (Ns = !0), E === S && w === F && H === U && oe === ae && Je === At && (Ls = !0), o && o(Oc, Tc, Ns, Ls, Wo, he, k, N, y), this._liquid.translateRestore();
4194
+ E === I && w === P && H === $ && oe === ie && Je === Ze && (Ns = !0), E === S && w === F && H === U && oe === ae && Je === At && (Ls = !0), o && o(Oc, Tc, Ns, Ls, zo, he, k, N, y), this._liquid.translateRestore();
4212
4195
  }
4213
4196
  this._liquid.translateRestore();
4214
4197
  }
@@ -4222,7 +4205,7 @@ function nA(n, e) {
4222
4205
  const { path: t } = n, { path: o } = e;
4223
4206
  if (t.length !== o.length || t.indexOf("cells") === -1)
4224
4207
  return !1;
4225
- const r = t.indexOf("skeTables") + 1, s = t.indexOf("rows") + 1, i = t.indexOf("cells") + 1, { tableId: a, sliceIndex: c } = js(t[r]), { tableId: d, sliceIndex: l } = js(o[r]);
4208
+ const r = t.indexOf("skeTables") + 1, s = t.indexOf("rows") + 1, i = t.indexOf("cells") + 1, { tableId: a, sliceIndex: c } = zs(t[r]), { tableId: d, sliceIndex: l } = zs(o[r]);
4226
4209
  if (a !== d)
4227
4210
  return !1;
4228
4211
  const A = t[s], h = o[s], u = t[i], g = o[i];
@@ -4243,7 +4226,7 @@ function ka(n, e, t) {
4243
4226
  const d = a.parent, l = c.parent, A = d.cells.indexOf(a), h = l.cells.indexOf(c);
4244
4227
  return A === h && d.index === l.index;
4245
4228
  }
4246
- function Xo(n, e) {
4229
+ function Zo(n, e) {
4247
4230
  if (Ha(n, e))
4248
4231
  return ms(n, e);
4249
4232
  const { path: t } = n, { path: o } = e, r = t[t.length - 5], s = o[o.length - 5];
@@ -4254,19 +4237,19 @@ function Xo(n, e) {
4254
4237
  const i = t[t.length - 3], a = o[o.length - 3], c = t[t.length - 1], d = o[o.length - 1];
4255
4238
  return i < a ? !0 : i > a ? !1 : c <= d;
4256
4239
  }
4257
- function jt(n) {
4240
+ function zt(n) {
4258
4241
  return n.sections[0].columns[0].lines.length === 0;
4259
4242
  }
4260
4243
  function oA(n, e, t) {
4261
4244
  let o = e, r = t, s = n[o], i = n[r];
4262
- for (; o < r && (jt(s) || jt(i)); )
4263
- jt(s) ? (o++, s = n[o]) : jt(i) && (r--, i = n[r]);
4264
- if (!jt(s) && !jt(i))
4245
+ for (; o < r && (zt(s) || zt(i)); )
4246
+ zt(s) ? (o++, s = n[o]) : zt(i) && (r--, i = n[r]);
4247
+ if (!zt(s) && !zt(i))
4265
4248
  return [s, i];
4266
4249
  }
4267
4250
  class Va {
4268
4251
  constructor(e, t) {
4269
- O(this, "_liquid", new $i());
4252
+ O(this, "_liquid", new ea());
4270
4253
  this._documentOffsetConfig = e, this._docSkeleton = t;
4271
4254
  }
4272
4255
  // eslint-disable-next-line max-lines-per-function
@@ -4376,7 +4359,7 @@ class Va {
4376
4359
  };
4377
4360
  }
4378
4361
  }
4379
- const rA = "__TestSelectionRange__", sA = "__TestSelectionAnchor__", mi = 6, Zo = 500, iA = 500, mr = 3;
4362
+ const rA = "__TestSelectionRange__", sA = "__TestSelectionAnchor__", mi = 6, Jo = 500, iA = 500, mr = 3;
4380
4363
  function Jn(n) {
4381
4364
  const e = n[0], t = e[0], o = e[2], { x: r, y: s } = t, { x: i, y: a } = o;
4382
4365
  return {
@@ -4415,11 +4398,11 @@ class Zt {
4415
4398
  _anchorBlink() {
4416
4399
  setTimeout(() => {
4417
4400
  this._anchorShape && this._anchorShape.visible && this.deactivateStatic();
4418
- }, Zo), this._anchorBlinkTimer = setInterval(() => {
4401
+ }, Jo), this._anchorBlinkTimer = setInterval(() => {
4419
4402
  this._anchorShape && this._anchorShape.visible && (this.activeStatic(), setTimeout(() => {
4420
4403
  this.deactivateStatic();
4421
- }, Zo));
4422
- }, iA + Zo);
4404
+ }, Jo));
4405
+ }, iA + Jo);
4423
4406
  }
4424
4407
  // The start position of the range
4425
4408
  get startOffset() {
@@ -4568,7 +4551,7 @@ class Zt {
4568
4551
  this._rangeShape.translate(t, o), this._rangeShape.updatePointGroup(e), this._rangeShape.show();
4569
4552
  return;
4570
4553
  }
4571
- const r = 0.3, s = new ta(rA + ge(mi), {
4554
+ const r = 0.3, s = new na(rA + ge(mi), {
4572
4555
  pointsGroup: e,
4573
4556
  fill: ((i = this.style) == null ? void 0 : i.fill) || fn(gn.black, r),
4574
4557
  left: t,
@@ -4586,7 +4569,7 @@ class Zt {
4586
4569
  c < d && (a -= d - c, c = d);
4587
4570
  const l = 12;
4588
4571
  let A = i + t;
4589
- const h = a + o, u = ((f = r == null ? void 0 : r.ts) == null ? void 0 : f.it) === z.TRUE;
4572
+ const h = a + o, u = ((f = r == null ? void 0 : r.ts) == null ? void 0 : f.it) === j.TRUE;
4590
4573
  if (u && (A += c * Math.tan(l * Math.PI / 180) / 2), this._anchorShape) {
4591
4574
  this._anchorShape.transformByState({ left: A, top: h, height: c }), this._anchorShape.show(), u ? this._anchorShape.skew(-l, 0) : this._anchorShape.skew(0, 0);
4592
4575
  return;
@@ -4606,7 +4589,7 @@ class Zt {
4606
4589
  }
4607
4590
  }
4608
4591
  const aA = "__DocTableRectRange__", cA = 6;
4609
- function Jo(n, e, t, o, r, s = Sn, i = "", a = -1) {
4592
+ function $o(n, e, t, o, r, s = Sn, i = "", a = -1) {
4610
4593
  const c = e.getOffsetConfig(), l = new Va(c, t).getNodePositionGroup(o, r);
4611
4594
  return (l != null ? l : []).map((A) => new Wa(
4612
4595
  n,
@@ -4691,15 +4674,15 @@ class Wa {
4691
4674
  }
4692
4675
  get startNodePosition() {
4693
4676
  const { anchorNodePosition: e, focusNodePosition: t } = this;
4694
- return Xo(e, t) ? e : t;
4677
+ return Zo(e, t) ? e : t;
4695
4678
  }
4696
4679
  get endNodePosition() {
4697
4680
  const { anchorNodePosition: e, focusNodePosition: t } = this;
4698
- return Xo(e, t) ? t : e;
4681
+ return Zo(e, t) ? t : e;
4699
4682
  }
4700
4683
  get direction() {
4701
4684
  const { anchorNodePosition: e, focusNodePosition: t } = this;
4702
- return Xo(e, t) ? De.FORWARD : De.BACKWARD;
4685
+ return Zo(e, t) ? De.FORWARD : De.BACKWARD;
4703
4686
  }
4704
4687
  isActive() {
4705
4688
  return this._current === !0;
@@ -4746,7 +4729,7 @@ class Wa {
4746
4729
  this._rangeShape.translate(t, o), this._rangeShape.updatePointGroup(e), this._rangeShape.show();
4747
4730
  return;
4748
4731
  }
4749
- const r = 0.3, s = new ta(aA + ge(cA), {
4732
+ const r = 0.3, s = new na(aA + ge(cA), {
4750
4733
  pointsGroup: e,
4751
4734
  fill: ((i = this.style) == null ? void 0 : i.fill) || fn(gn.black, r),
4752
4735
  left: t,
@@ -4790,7 +4773,7 @@ function Er(n, e, t, o, r, s, i, a) {
4790
4773
  rectRanges: d
4791
4774
  };
4792
4775
  {
4793
- const S = Jo(
4776
+ const S = $o(
4794
4777
  ...l
4795
4778
  );
4796
4779
  return d.push(...S), {
@@ -4800,7 +4783,7 @@ function Er(n, e, t, o, r, s, i, a) {
4800
4783
  }
4801
4784
  }
4802
4785
  if (nA(n, e)) {
4803
- const S = Jo(
4786
+ const S = $o(
4804
4787
  ...l
4805
4788
  );
4806
4789
  return d.push(...S), {
@@ -4834,7 +4817,7 @@ function Er(n, e, t, o, r, s, i, a) {
4834
4817
  }
4835
4818
  if (w && N) {
4836
4819
  const U = g === De.FORWARD ? w : N, H = g === De.FORWARD ? N : w;
4837
- d.push(...Jo(
4820
+ d.push(...$o(
4838
4821
  t,
4839
4822
  o,
4840
4823
  r,
@@ -4951,7 +4934,7 @@ let Re = class extends Ct {
4951
4934
  O(this, "onSelectionStart$", this._onSelectionStart$.asObservable());
4952
4935
  O(this, "onChangeByEvent$", ha(
4953
4936
  this._onInput$,
4954
- this._onKeydown$.pipe(oo((e) => e.event.keyCode === q.BACKSPACE)),
4937
+ this._onKeydown$.pipe(ro((e) => e.event.keyCode === q.BACKSPACE)),
4955
4938
  this._onCompositionend$
4956
4939
  ));
4957
4940
  O(this, "_onPaste$", new be());
@@ -5342,7 +5325,7 @@ let Re = class extends Ct {
5342
5325
  if (i == null)
5343
5326
  return;
5344
5327
  let c = o < 0.5;
5345
- return t.glyphType === ea.LIST && (c = !0), {
5328
+ return t.glyphType === ta.LIST && (c = !0), {
5346
5329
  ...i,
5347
5330
  isBack: c
5348
5331
  };
@@ -5531,13 +5514,13 @@ let Re = class extends Ct {
5531
5514
  // eslint-disable-next-line max-lines-per-function
5532
5515
  _initInputEvents() {
5533
5516
  this.disposeWithMe(
5534
- je(this._input, "keydown").subscribe((e) => {
5517
+ ze(this._input, "keydown").subscribe((e) => {
5535
5518
  this._isIMEInputApply || this._eventHandle(e, (t) => {
5536
5519
  this._onKeydown$.next(t);
5537
5520
  });
5538
5521
  })
5539
5522
  ), this.disposeWithMe(
5540
- je(this._input, "input").subscribe((e) => {
5523
+ ze(this._input, "input").subscribe((e) => {
5541
5524
  if (!(e.inputType === "historyUndo" || e.inputType === "historyRedo")) {
5542
5525
  if (this._rectRangeList.length > 0)
5543
5526
  return e.stopPropagation(), e.preventDefault();
@@ -5547,7 +5530,7 @@ let Re = class extends Ct {
5547
5530
  }
5548
5531
  })
5549
5532
  ), this.disposeWithMe(
5550
- je(this._input, "compositionstart").subscribe((e) => {
5533
+ ze(this._input, "compositionstart").subscribe((e) => {
5551
5534
  if (this._rectRangeList.length > 0)
5552
5535
  return e.stopPropagation(), e.preventDefault();
5553
5536
  this._isIMEInputApply = !0, this._eventHandle(e, (t) => {
@@ -5555,31 +5538,31 @@ let Re = class extends Ct {
5555
5538
  });
5556
5539
  })
5557
5540
  ), this.disposeWithMe(
5558
- je(this._input, "compositionend").subscribe((e) => {
5541
+ ze(this._input, "compositionend").subscribe((e) => {
5559
5542
  this._isIMEInputApply = !1, this._eventHandle(e, (t) => {
5560
5543
  this._onCompositionend$.next(t);
5561
5544
  });
5562
5545
  })
5563
5546
  ), this.disposeWithMe(
5564
- je(this._input, "compositionupdate").subscribe((e) => {
5547
+ ze(this._input, "compositionupdate").subscribe((e) => {
5565
5548
  this._eventHandle(e, (t) => {
5566
5549
  this._onInputBefore$.next(t), this._onCompositionupdate$.next(t);
5567
5550
  });
5568
5551
  })
5569
5552
  ), this.disposeWithMe(
5570
- je(this._input, "paste").subscribe((e) => {
5553
+ ze(this._input, "paste").subscribe((e) => {
5571
5554
  this._eventHandle(e, (t) => {
5572
5555
  this._onPaste$.next(t);
5573
5556
  });
5574
5557
  })
5575
5558
  ), this.disposeWithMe(
5576
- je(this._input, "focus").subscribe((e) => {
5559
+ ze(this._input, "focus").subscribe((e) => {
5577
5560
  this._eventHandle(e, (t) => {
5578
5561
  this._onFocus$.next(t);
5579
5562
  });
5580
5563
  })
5581
5564
  ), this.disposeWithMe(
5582
- je(this._input, "blur").subscribe((e) => {
5565
+ ze(this._input, "blur").subscribe((e) => {
5583
5566
  this._eventHandle(e, (t) => {
5584
5567
  this._onBlur$.next(t);
5585
5568
  });
@@ -5627,12 +5610,12 @@ let Re = class extends Ct {
5627
5610
  }
5628
5611
  };
5629
5612
  Re = gA([
5630
- Vn(1, Oo),
5613
+ Vn(1, To),
5631
5614
  Vn(2, Qr),
5632
5615
  Vn(3, L),
5633
- Vn(4, j(de))
5616
+ Vn(4, z(de))
5634
5617
  ], Re);
5635
- const ko = {
5618
+ const Vo = {
5636
5619
  id: "doc.command.switch-mode",
5637
5620
  type: D.COMMAND,
5638
5621
  // eslint-disable-next-line max-lines-per-function, complexity
@@ -5681,7 +5664,7 @@ const ko = {
5681
5664
  }
5682
5665
  return u.params.actions = f.reduce((b, x) => W.compose(b, x), null), !!e.syncExecuteCommand(u.id, u.params);
5683
5666
  }
5684
- }, fA = "doc.command.create-table", ja = {
5667
+ }, fA = "doc.command.create-table", za = {
5685
5668
  id: fA,
5686
5669
  type: D.COMMAND,
5687
5670
  // eslint-disable-next-line max-lines-per-function
@@ -5722,7 +5705,7 @@ const ko = {
5722
5705
  },
5723
5706
  len: 1
5724
5707
  });
5725
- const B = a.getDefaultStyle(), y = a.getStyleCache(), M = Bo(
5708
+ const B = a.getDefaultStyle(), y = a.getStyleCache(), M = Mo(
5726
5709
  h,
5727
5710
  p,
5728
5711
  B,
@@ -5903,11 +5886,11 @@ const ko = {
5903
5886
  }, vs = "doc.command.table-insert-row", Cs = "doc.command.table-insert-column", pA = "doc.command.table-insert-row-above", mA = "doc.command.table-insert-row-bellow", EA = "doc.command.table-insert-column-left", IA = "doc.command.table-insert-column-right", Rs = {
5904
5887
  id: pA,
5905
5888
  type: D.COMMAND,
5906
- handler: async (n) => n.get(T).executeCommand(vs, { position: _o.ABOVE })
5889
+ handler: async (n) => n.get(T).executeCommand(vs, { position: Do.ABOVE })
5907
5890
  }, bs = {
5908
5891
  id: mA,
5909
5892
  type: D.COMMAND,
5910
- handler: async (n) => n.get(T).executeCommand(vs, { position: _o.BELLOW })
5893
+ handler: async (n) => n.get(T).executeCommand(vs, { position: Do.BELLOW })
5911
5894
  }, xs = {
5912
5895
  id: EA,
5913
5896
  type: D.COMMAND,
@@ -5916,7 +5899,7 @@ const ko = {
5916
5899
  id: IA,
5917
5900
  type: D.COMMAND,
5918
5901
  handler: async (n) => n.get(T).executeCommand(Cs, { position: Yr.RIGHT })
5919
- }, za = {
5902
+ }, ja = {
5920
5903
  id: vs,
5921
5904
  type: D.COMMAND,
5922
5905
  // eslint-disable-next-line max-lines-per-function
@@ -6035,22 +6018,22 @@ const ko = {
6035
6018
  }];
6036
6019
  return o.replaceDocRanges(m), !0;
6037
6020
  }
6038
- return t === !1 ? await s.executeCommand(za.id, {
6039
- position: _o.BELLOW
6021
+ return t === !1 ? await s.executeCommand(ja.id, {
6022
+ position: Do.BELLOW
6040
6023
  }) : !0;
6041
6024
  }
6042
- }, Ya = "COMPONENT_DOC_CREATE_TABLE_CONFIRM", $o = "doc.component.create-table-confirm", Os = {
6025
+ }, Ya = "COMPONENT_DOC_CREATE_TABLE_CONFIRM", er = "doc.component.create-table-confirm", Os = {
6043
6026
  id: "doc.operation.create-table",
6044
6027
  type: D.COMMAND,
6045
6028
  handler: async (n) => {
6046
- const e = n.get(Ye), t = n.get(ca), o = n.get(T), r = {
6029
+ const e = n.get(Ye), t = n.get(Xi), o = n.get(T), r = {
6047
6030
  rowCount: 3,
6048
6031
  colCount: 5
6049
6032
  }, s = (i, a) => {
6050
6033
  r.rowCount = i, r.colCount = a;
6051
6034
  };
6052
6035
  return await t.open({
6053
- id: $o,
6036
+ id: er,
6054
6037
  children: {
6055
6038
  label: {
6056
6039
  name: Ya,
@@ -6063,10 +6046,10 @@ const ko = {
6063
6046
  width: "auto",
6064
6047
  title: { title: e.t("toolbar.table.insert") },
6065
6048
  onConfirm: () => {
6066
- o.executeCommand(ja.id, r), t.close($o);
6049
+ o.executeCommand(za.id, r), t.close(er);
6067
6050
  },
6068
6051
  onClose: () => {
6069
- t.close($o);
6052
+ t.close(er);
6070
6053
  }
6071
6054
  }), !0;
6072
6055
  }
@@ -7050,7 +7033,7 @@ let Sr = class extends me {
7050
7033
  // I moved from the layout service. https://github.com/dream-num/univer-pro/issues/1708
7051
7034
  _initUniverFocusListener() {
7052
7035
  this.disposeWithMe(
7053
- je(window, "focusin").subscribe((e) => {
7036
+ ze(window, "focusin").subscribe((e) => {
7054
7037
  const t = e.target;
7055
7038
  this._blurSheetEditor(t);
7056
7039
  })
@@ -7141,7 +7124,7 @@ let Sr = class extends me {
7141
7124
  return {
7142
7125
  id: e,
7143
7126
  body: {
7144
- dataStream: `${Xi}`,
7127
+ dataStream: `${Zi}`,
7145
7128
  textRuns: [],
7146
7129
  paragraphs: [
7147
7130
  {
@@ -7164,14 +7147,14 @@ let Sr = class extends me {
7164
7147
  Sr = VA([
7165
7148
  Ot(0, L),
7166
7149
  Ot(1, pe),
7167
- Ot(2, j(Y)),
7150
+ Ot(2, z(Y)),
7168
7151
  Ot(3, Fr),
7169
7152
  Ot(4, T),
7170
- Ot(5, xo),
7171
- Ot(6, j(Dn))
7153
+ Ot(5, yo),
7154
+ Ot(6, z(Dn))
7172
7155
  ], Sr);
7173
7156
  const Ge = Ki("univer.editor.service"), vr = "COMPONENT_DOC_HEADER_FOOTER_PANEL";
7174
- function jA(n, e, t) {
7157
+ function zA(n, e, t) {
7175
7158
  const {
7176
7159
  useFirstPageHeaderFooter: o,
7177
7160
  evenAndOddHeaders: r,
@@ -7182,14 +7165,14 @@ function jA(n, e, t) {
7182
7165
  evenPageHeaderId: d,
7183
7166
  evenPageFooterId: l
7184
7167
  } = n;
7185
- return e === ve.HEADER ? o === z.TRUE ? t === 0 ? a : r === z.TRUE && t % 2 === 1 ? d : s : r === z.TRUE && t % 2 === 1 ? d : s : o === z.TRUE ? t === 0 ? c : r === z.TRUE && t % 2 === 1 ? l : i : r === z.TRUE && t % 2 === 1 ? l : i;
7168
+ return e === ve.HEADER ? o === j.TRUE ? t === 0 ? a : r === j.TRUE && t % 2 === 1 ? d : s : r === j.TRUE && t % 2 === 1 ? d : s : o === j.TRUE ? t === 0 ? c : r === j.TRUE && t % 2 === 1 ? l : i : r === j.TRUE && t % 2 === 1 ? l : i;
7186
7169
  }
7187
- const zA = (n) => {
7188
- const e = J(Ye), t = J(L), o = J(pe), r = J(T), s = J(Oo), { unitId: i } = n, a = o.getRenderById(i).with(Re), [c, d] = Ee({}), l = (u, g) => {
7170
+ const jA = (n) => {
7171
+ const e = J(Ye), t = J(L), o = J(pe), r = J(T), s = J(To), { unitId: i } = n, a = o.getRenderById(i).with(Re), [c, d] = Ee({}), l = (u, g) => {
7189
7172
  var b;
7190
7173
  d((x) => ({
7191
7174
  ...x,
7192
- [g]: u ? z.TRUE : z.FALSE
7175
+ [g]: u ? j.TRUE : j.FALSE
7193
7176
  }));
7194
7177
  const f = t.getUniverDocInstance(i), p = f == null ? void 0 : f.getSnapshot().documentStyle, m = (b = o.getRenderById(i)) == null ? void 0 : b.with(de), I = m == null ? void 0 : m.getViewModel();
7195
7178
  if (p == null || I == null)
@@ -7204,14 +7187,14 @@ const zA = (n) => {
7204
7187
  unitId: i,
7205
7188
  segmentId: C,
7206
7189
  headerFooterProps: {
7207
- [g]: u ? z.TRUE : z.FALSE
7190
+ [g]: u ? j.TRUE : j.FALSE
7208
7191
  }
7209
7192
  });
7210
7193
  } else {
7211
- const x = a.getSegmentPage(), C = a.getSegment(), B = jA(
7194
+ const x = a.getSegmentPage(), C = a.getSegment(), B = zA(
7212
7195
  {
7213
7196
  ...p,
7214
- [g]: u ? z.TRUE : z.FALSE
7197
+ [g]: u ? j.TRUE : j.FALSE
7215
7198
  },
7216
7199
  S,
7217
7200
  x
@@ -7219,7 +7202,7 @@ const zA = (n) => {
7219
7202
  B && B !== C && a.setSegment(B), r.executeCommand($n, {
7220
7203
  unitId: i,
7221
7204
  headerFooterProps: {
7222
- [g]: u ? z.TRUE : z.FALSE
7205
+ [g]: u ? j.TRUE : j.FALSE
7223
7206
  }
7224
7207
  });
7225
7208
  }
@@ -7245,8 +7228,8 @@ const zA = (n) => {
7245
7228
  const {
7246
7229
  marginHeader: f = 0,
7247
7230
  marginFooter: p = 0,
7248
- useFirstPageHeaderFooter: m = z.FALSE,
7249
- evenAndOddHeaders: I = z.FALSE
7231
+ useFirstPageHeaderFooter: m = j.FALSE,
7232
+ evenAndOddHeaders: I = j.FALSE
7250
7233
  } = g;
7251
7234
  d({
7252
7235
  marginHeader: f,
@@ -7260,7 +7243,7 @@ const zA = (n) => {
7260
7243
  /* @__PURE__ */ Q("div", { children: /* @__PURE__ */ Q(
7261
7244
  Zs,
7262
7245
  {
7263
- checked: c.useFirstPageHeaderFooter === z.TRUE,
7246
+ checked: c.useFirstPageHeaderFooter === j.TRUE,
7264
7247
  onChange: (u) => {
7265
7248
  l(u, "useFirstPageHeaderFooter");
7266
7249
  },
@@ -7270,7 +7253,7 @@ const zA = (n) => {
7270
7253
  /* @__PURE__ */ Q("div", { children: /* @__PURE__ */ Q(
7271
7254
  Zs,
7272
7255
  {
7273
- checked: c.evenAndOddHeaders === z.TRUE,
7256
+ checked: c.evenAndOddHeaders === j.TRUE,
7274
7257
  onChange: (u) => {
7275
7258
  l(u, "evenAndOddHeaders");
7276
7259
  },
@@ -7326,15 +7309,15 @@ const zA = (n) => {
7326
7309
  return () => {
7327
7310
  A.unsubscribe();
7328
7311
  };
7329
- }, []), /* @__PURE__ */ Q("div", { className: "univer-text-sm", children: a ? /* @__PURE__ */ Q(zA, { unitId: r }) : /* @__PURE__ */ Q("div", { className: "univer-text-gray-400", children: n.t("headerFooter.disableText") }) });
7330
- }, Si = 18, vi = 200, er = 6, YA = 4;
7312
+ }, []), /* @__PURE__ */ Q("div", { className: "univer-text-sm", children: a ? /* @__PURE__ */ Q(jA, { unitId: r }) : /* @__PURE__ */ Q("div", { className: "univer-text-gray-400", children: n.t("headerFooter.disableText") }) });
7313
+ }, Si = 18, vi = 200, tr = 6, YA = 4;
7331
7314
  function KA(n, e) {
7332
7315
  let { radius: t, width: o, height: r } = e;
7333
7316
  t = t != null ? t : 0, o = o != null ? o : 30, r = r != null ? r : 30;
7334
7317
  let s = 0;
7335
7318
  s = Math.min(t, o / 2, r / 2), n.beginPath(), n.moveTo(0, 0), n.lineTo(o, 0), n.lineTo(o, r - s), n.arc(o - s, r - s, s, 0, Math.PI / 2, !1), n.lineTo(0, r), n.lineTo(0, 0), n.closePath(), e.fill && (n.save(), n.fillStyle = e.fill, e.fillRule === "evenodd" ? n.fill("evenodd") : n.fill(), n.restore());
7336
7319
  }
7337
- class ao extends ul {
7320
+ class co extends ul {
7338
7321
  constructor(t, o) {
7339
7322
  super(t, o);
7340
7323
  O(this, "color");
@@ -7345,7 +7328,7 @@ class ao extends ul {
7345
7328
  const { text: r, color: s } = o;
7346
7329
  t.save(), t.font = "13px Source Han Sans CN";
7347
7330
  const i = t.measureText(r).width, a = Math.min(
7348
- i + 2 * er,
7331
+ i + 2 * tr,
7349
7332
  vi
7350
7333
  );
7351
7334
  KA(t, {
@@ -7354,7 +7337,7 @@ class ao extends ul {
7354
7337
  radius: 4,
7355
7338
  fill: s
7356
7339
  }), t.fillStyle = "rgba(58, 96, 247, 1)";
7357
- const c = er, d = Si - YA, l = vi - 2 * er;
7340
+ const c = tr, d = Si - YA, l = vi - 2 * tr;
7358
7341
  if (i > l) {
7359
7342
  let A = "", h = 0;
7360
7343
  for (const u of r) {
@@ -7372,7 +7355,7 @@ class ao extends ul {
7372
7355
  t.restore();
7373
7356
  }
7374
7357
  _draw(t) {
7375
- ao.drawWith(t, this);
7358
+ co.drawWith(t, this);
7376
7359
  }
7377
7360
  }
7378
7361
  var qA = Object.getOwnPropertyDescriptor, XA = (n, e, t, o) => {
@@ -7400,10 +7383,10 @@ function ZA(n, e, t) {
7400
7383
  headerFooterId: null
7401
7384
  };
7402
7385
  case ve.HEADER:
7403
- return A === z.TRUE && !c ? {
7386
+ return A === j.TRUE && !c ? {
7404
7387
  createType: 0,
7405
7388
  headerFooterId: null
7406
- } : l === z.TRUE && t % 2 === 0 && !i ? {
7389
+ } : l === j.TRUE && t % 2 === 0 && !i ? {
7407
7390
  createType: 4,
7408
7391
  headerFooterId: null
7409
7392
  } : r ? {
@@ -7414,10 +7397,10 @@ function ZA(n, e, t) {
7414
7397
  headerFooterId: null
7415
7398
  };
7416
7399
  case ve.FOOTER:
7417
- return A === z.TRUE && !d ? {
7400
+ return A === j.TRUE && !d ? {
7418
7401
  createType: 1,
7419
7402
  headerFooterId: null
7420
- } : l === z.TRUE && t % 2 === 0 && !a ? {
7403
+ } : l === j.TRUE && t % 2 === 0 && !a ? {
7421
7404
  createType: 5,
7422
7405
  headerFooterId: null
7423
7406
  } : s ? {
@@ -7562,10 +7545,10 @@ let Cr = class extends me {
7562
7545
  strokeWidth: 1,
7563
7546
  stroke: Ci
7564
7547
  };
7565
- zs.drawWith(g, S), zs.drawWith(g, v), g.translate(0, m + 1), ao.drawWith(g, {
7548
+ js.drawWith(g, S), js.drawWith(g, v), g.translate(0, m + 1), co.drawWith(g, {
7566
7549
  text: e.t("headerFooter.header"),
7567
7550
  color: Ri
7568
- }), g.translate(0, p - m - I), ao.drawWith(g, {
7551
+ }), g.translate(0, p - m - I), co.drawWith(g, {
7569
7552
  text: e.t("headerFooter.footer"),
7570
7553
  color: Ri
7571
7554
  });
@@ -7590,32 +7573,23 @@ Cr = XA([
7590
7573
  ut(2, Ge),
7591
7574
  ut(3, L),
7592
7575
  ut(4, pe),
7593
- ut(5, j(de)),
7594
- ut(6, j(Re)),
7595
- ut(7, j(Ye)),
7596
- ut(8, j(rn))
7576
+ ut(5, z(de)),
7577
+ ut(6, z(Re)),
7578
+ ut(7, z(Ye)),
7579
+ ut(8, z(rn))
7597
7580
  ], Cr);
7598
7581
  const Ts = {
7599
7582
  id: "sidebar.operation.doc-header-footer-panel",
7600
7583
  type: D.OPERATION,
7601
7584
  handler: async (n, e) => {
7602
7585
  const t = n.get(la), o = n.get(Ye);
7603
- switch (e.value) {
7604
- case "open":
7605
- t.open({
7606
- header: { title: o.t("headerFooter.panel") },
7607
- children: { label: vr },
7608
- onClose: () => {
7609
- },
7610
- width: 400
7611
- });
7612
- break;
7613
- case "close":
7614
- default:
7615
- t.close();
7616
- break;
7617
- }
7618
- return !0;
7586
+ return e.value === "open" ? t.open({
7587
+ header: { title: o.t("headerFooter.panel") },
7588
+ children: { label: vr },
7589
+ onClose: () => {
7590
+ },
7591
+ width: 400
7592
+ }) : t.close(), !0;
7619
7593
  }
7620
7594
  };
7621
7595
  function bi() {
@@ -7648,7 +7622,7 @@ function bi() {
7648
7622
  ]
7649
7623
  };
7650
7624
  }
7651
- function tr(n, e, t, o) {
7625
+ function nr(n, e, t, o) {
7652
7626
  const r = W.getInstance(), s = 6, i = n != null ? n : ge(s), a = e === Qe.DEFAULT_HEADER || e === Qe.FIRST_PAGE_HEADER || e === Qe.EVEN_PAGE_HEADER, c = r.insertOp([a ? "headers" : "footers", i], {
7653
7627
  [a ? "headerId" : "footerId"]: i,
7654
7628
  body: bi()
@@ -7716,17 +7690,17 @@ const $n = "doc.command.core-header-footer", Ac = {
7716
7690
  };
7717
7691
  g && (p.params.noNeedSetTextRange = !0);
7718
7692
  const m = W.getInstance(), I = [];
7719
- return a != null && tr(i, a, u, I), c != null && Object.keys(c).forEach((R) => {
7693
+ return a != null && nr(i, a, u, I), c != null && Object.keys(c).forEach((R) => {
7720
7694
  const E = c[R], b = u[R];
7721
7695
  if (E === b)
7722
7696
  return;
7723
7697
  let x;
7724
- if (b === void 0 ? x = m.insertOp(["documentStyle", R], E) : x = m.replaceOp(["documentStyle", R], b, E), I.push(x), R === "useFirstPageHeaderFooter" && E === z.TRUE && !u.firstPageHeaderId) {
7698
+ if (b === void 0 ? x = m.insertOp(["documentStyle", R], E) : x = m.replaceOp(["documentStyle", R], b, E), I.push(x), R === "useFirstPageHeaderFooter" && E === j.TRUE && !u.firstPageHeaderId) {
7725
7699
  const C = h === ve.HEADER ? Qe.FIRST_PAGE_HEADER : Qe.FIRST_PAGE_FOOTER;
7726
- tr(i, C, u, I);
7727
- } else if (R === "evenAndOddHeaders" && E === z.TRUE && !u.evenPageHeaderId) {
7700
+ nr(i, C, u, I);
7701
+ } else if (R === "evenAndOddHeaders" && E === j.TRUE && !u.evenPageHeaderId) {
7728
7702
  const C = h === ve.HEADER ? Qe.EVEN_PAGE_HEADER : Qe.EVEN_PAGE_FOOTER;
7729
- tr(i, C, u, I);
7703
+ nr(i, C, u, I);
7730
7704
  }
7731
7705
  }), I.length === 0 ? !1 : (p.params.actions = I.reduce((R, E) => W.compose(R, E), null), !!t.syncExecuteCommand(p.id, p.params));
7732
7706
  }
@@ -7761,7 +7735,7 @@ const $n = "doc.command.core-header-footer", Ac = {
7761
7735
  return /* @__PURE__ */ Q("div", { className: "univer-grid univer-grid-cols-3 univer-gap-2 univer-p-1.5", children: o.map((r) => /* @__PURE__ */ Q(
7762
7736
  "a",
7763
7737
  {
7764
- className: ze("univer-block univer-h-20 univer-w-[72px] univer-cursor-pointer univer-overflow-hidden univer-rounded univer-transition-all hover:univer-border-primary-500", Nn, {
7738
+ className: je("univer-block univer-h-20 univer-w-[72px] univer-cursor-pointer univer-overflow-hidden univer-rounded univer-transition-all hover:univer-border-primary-500", Nn, {
7765
7739
  "univer-border-primary-500": e === r.value
7766
7740
  }),
7767
7741
  onClick: () => {
@@ -7841,23 +7815,27 @@ const $n = "doc.command.core-header-footer", Ac = {
7841
7815
  options: eu
7842
7816
  }
7843
7817
  ), gc = `${uc}_ORDER_LIST_TYPE_COMPONENT`, fc = `${uc}_BULLET_LIST_TYPE_COMPONENT`, nu = (n) => {
7844
- const t = Object.keys(ar).find((o) => {
7845
- const { width: r, height: s } = ar[o];
7818
+ const t = Object.keys(to).find((o) => {
7819
+ const { width: r, height: s } = to[o];
7846
7820
  return n.width === r && n.height === s;
7847
7821
  });
7848
7822
  return t != null ? t : "A4";
7849
7823
  };
7850
7824
  function ou(n) {
7851
7825
  const { hooks: e } = n, r = J(L).getCurrentUnitOfType(_.UNIVER_DOC).getDocumentStyle(), s = J(Ye), [i, a] = Ee(() => {
7852
- var l, A, h, u, g;
7826
+ var l, A, h, u, g, f, p, m, I;
7853
7827
  return {
7854
7828
  paperSize: nu(r.pageSize),
7855
- orientation: (l = r.pageOrient) != null ? l : Wc.PORTRAIT,
7829
+ pageSise: {
7830
+ width: (A = (l = r.pageSize) == null ? void 0 : l.width) != null ? A : 0,
7831
+ height: (u = (h = r.pageSize) == null ? void 0 : h.height) != null ? u : 0
7832
+ },
7833
+ orientation: (g = r.pageOrient) != null ? g : Wc.PORTRAIT,
7856
7834
  margins: {
7857
- top: (A = r.marginTop) != null ? A : 0,
7858
- bottom: (h = r.marginBottom) != null ? h : 0,
7859
- left: (u = r.marginLeft) != null ? u : 0,
7860
- right: (g = r.marginRight) != null ? g : 0
7835
+ top: (f = r.marginTop) != null ? f : 0,
7836
+ bottom: (p = r.marginBottom) != null ? p : 0,
7837
+ left: (m = r.marginLeft) != null ? m : 0,
7838
+ right: (I = r.marginRight) != null ? I : 0
7861
7839
  }
7862
7840
  };
7863
7841
  });
@@ -7865,7 +7843,7 @@ function ou(n) {
7865
7843
  e.beforeClose = () => i, e.beforeConfirm = () => i;
7866
7844
  }, [i]);
7867
7845
  const c = (l) => {
7868
- a((A) => ({ ...A, paperSize: l }));
7846
+ a((A) => ({ ...A, paperSize: l, pageSise: to[l] }));
7869
7847
  }, d = (l, A) => {
7870
7848
  a((h) => ({
7871
7849
  ...h,
@@ -7889,7 +7867,7 @@ function ou(n) {
7889
7867
  {
7890
7868
  value: i.paperSize,
7891
7869
  onChange: c,
7892
- options: jc.map((l) => ({
7870
+ options: zc.map((l) => ({
7893
7871
  label: s.t(`page-settings.page-size.${l.toLocaleLowerCase()}`),
7894
7872
  value: l
7895
7873
  }))
@@ -7911,6 +7889,8 @@ function ou(n) {
7911
7889
  /* @__PURE__ */ Q(
7912
7890
  it,
7913
7891
  {
7892
+ precision: 2,
7893
+ max: i.pageSise.height / 2,
7914
7894
  value: i.margins.top,
7915
7895
  onChange: (l) => d("top", l)
7916
7896
  }
@@ -7921,6 +7901,8 @@ function ou(n) {
7921
7901
  /* @__PURE__ */ Q(
7922
7902
  it,
7923
7903
  {
7904
+ precision: 2,
7905
+ max: i.pageSise.height / 2,
7924
7906
  value: i.margins.bottom,
7925
7907
  onChange: (l) => d("bottom", l)
7926
7908
  }
@@ -7933,6 +7915,8 @@ function ou(n) {
7933
7915
  /* @__PURE__ */ Q(
7934
7916
  it,
7935
7917
  {
7918
+ precision: 2,
7919
+ max: i.pageSise.width / 2,
7936
7920
  value: i.margins.left,
7937
7921
  onChange: (l) => d("left", l)
7938
7922
  }
@@ -7943,6 +7927,8 @@ function ou(n) {
7943
7927
  /* @__PURE__ */ Q(
7944
7928
  it,
7945
7929
  {
7930
+ precision: 2,
7931
+ max: i.pageSise.width / 2,
7946
7932
  value: i.margins.right,
7947
7933
  onChange: (l) => d("right", l)
7948
7934
  }
@@ -8025,7 +8011,7 @@ const Rr = "docs.component.page-setting", pc = {
8025
8011
  id: "docs.operation.open-page-setting",
8026
8012
  type: D.OPERATION,
8027
8013
  handler: (n) => {
8028
- const e = n.get(ca), t = n.get(T), o = n.get(Ye), r = e.open({
8014
+ const e = n.get(Xi), t = n.get(T), o = n.get(Ye), r = e.open({
8029
8015
  id: Rr,
8030
8016
  title: {
8031
8017
  label: o.t("page-settings.document-setting")
@@ -8039,7 +8025,7 @@ const Rr = "docs.component.page-setting", pc = {
8039
8025
  },
8040
8026
  onConfirm: (s) => {
8041
8027
  if (r.dispose(), !s) return;
8042
- const i = ar[s.paperSize];
8028
+ const i = to[s.paperSize];
8043
8029
  t.executeCommand(pc.id, {
8044
8030
  pageOrient: s.orientation,
8045
8031
  marginTop: s.margins.top,
@@ -8177,7 +8163,7 @@ function au(n) {
8177
8163
  return;
8178
8164
  }
8179
8165
  const i = (a = s.ts) == null ? void 0 : a.bl;
8180
- t.next(i === z.TRUE);
8166
+ t.next(i === j.TRUE);
8181
8167
  }, r = e.onCommandExecuted((s) => {
8182
8168
  const i = s.id;
8183
8169
  (i === Le.id || i === xt.id) && o();
@@ -8205,7 +8191,7 @@ function cu(n) {
8205
8191
  return;
8206
8192
  }
8207
8193
  const i = (a = s.ts) == null ? void 0 : a.it;
8208
- t.next(i === z.TRUE);
8194
+ t.next(i === j.TRUE);
8209
8195
  }, r = e.onCommandExecuted((s) => {
8210
8196
  const i = s.id;
8211
8197
  (i === Le.id || i === xt.id) && o();
@@ -8233,7 +8219,7 @@ function lu(n) {
8233
8219
  return;
8234
8220
  }
8235
8221
  const i = (a = s.ts) == null ? void 0 : a.ul;
8236
- t.next((i == null ? void 0 : i.s) === z.TRUE);
8222
+ t.next((i == null ? void 0 : i.s) === j.TRUE);
8237
8223
  }, r = e.onCommandExecuted((s) => {
8238
8224
  const i = s.id;
8239
8225
  (i === Le.id || i === xt.id) && o();
@@ -8261,7 +8247,7 @@ function du(n) {
8261
8247
  return;
8262
8248
  }
8263
8249
  const i = (a = s.ts) == null ? void 0 : a.st;
8264
- t.next((i == null ? void 0 : i.s) === z.TRUE);
8250
+ t.next((i == null ? void 0 : i.s) === j.TRUE);
8265
8251
  }, r = e.onCommandExecuted((s) => {
8266
8252
  const i = s.id;
8267
8253
  (i === Le.id || i === xt.id) && o();
@@ -8345,7 +8331,7 @@ function hu(n) {
8345
8331
  }],
8346
8332
  // disabled$: getCurrentSheetDisabled$(accessor),
8347
8333
  value$: new fe((t) => {
8348
- const o = yo.ff, r = () => {
8334
+ const o = Oo.ff, r = () => {
8349
8335
  var c;
8350
8336
  const i = ot(n);
8351
8337
  if (i == null) {
@@ -8381,7 +8367,7 @@ function gu(n) {
8381
8367
  selections: Bl,
8382
8368
  // disabled$,
8383
8369
  value$: new fe((t) => {
8384
- const o = yo.fs, r = () => {
8370
+ const o = Oo.fs, r = () => {
8385
8371
  var c;
8386
8372
  const i = ot(n);
8387
8373
  if (i == null) {
@@ -8457,7 +8443,7 @@ function pu(n) {
8457
8443
  selectable: !1
8458
8444
  },
8459
8445
  value$: new fe((o) => {
8460
- const r = yo.cl.rgb, s = () => {
8446
+ const r = Oo.cl.rgb, s = () => {
8461
8447
  var d, l;
8462
8448
  const a = ot(n);
8463
8449
  if (!a) {
@@ -8519,7 +8505,7 @@ function Su(n) {
8519
8505
  function vu(n) {
8520
8506
  const e = n.get(T);
8521
8507
  return {
8522
- id: Qo.id,
8508
+ id: Uo.id,
8523
8509
  type: Z.BUTTON,
8524
8510
  icon: "LeftJustifyingIcon",
8525
8511
  tooltip: "toolbar.alignLeft",
@@ -8544,7 +8530,7 @@ function vu(n) {
8544
8530
  function Cu(n) {
8545
8531
  const e = n.get(T);
8546
8532
  return {
8547
- id: Uo.id,
8533
+ id: Fo.id,
8548
8534
  type: Z.BUTTON,
8549
8535
  icon: "HorizontallyIcon",
8550
8536
  tooltip: "toolbar.alignCenter",
@@ -8569,7 +8555,7 @@ function Cu(n) {
8569
8555
  function Ru(n) {
8570
8556
  const e = n.get(T);
8571
8557
  return {
8572
- id: Fo.id,
8558
+ id: Ho.id,
8573
8559
  type: Z.BUTTON,
8574
8560
  icon: "RightJustifyingIcon",
8575
8561
  tooltip: "toolbar.alignRight",
@@ -8594,7 +8580,7 @@ function Ru(n) {
8594
8580
  function bu(n) {
8595
8581
  const e = n.get(T);
8596
8582
  return {
8597
- id: Ho.id,
8583
+ id: ko.id,
8598
8584
  type: Z.BUTTON,
8599
8585
  icon: "AlignTextBothIcon",
8600
8586
  tooltip: "toolbar.alignJustify",
@@ -8618,7 +8604,7 @@ function bu(n) {
8618
8604
  }
8619
8605
  function xu(n) {
8620
8606
  return {
8621
- id: wo.id,
8607
+ id: No.id,
8622
8608
  type: Z.BUTTON,
8623
8609
  icon: "ReduceIcon",
8624
8610
  tooltip: "toolbar.horizontalLine",
@@ -8700,7 +8686,7 @@ function yi(n) {
8700
8686
  }
8701
8687
  function Oi(n) {
8702
8688
  return {
8703
- id: so.id,
8689
+ id: io.id,
8704
8690
  type: Z.BUTTON,
8705
8691
  icon: "TodoListDoubleIcon",
8706
8692
  tooltip: "toolbar.checklist",
@@ -8712,7 +8698,7 @@ function Oi(n) {
8712
8698
  function yu(n) {
8713
8699
  const e = n.get(T), t = n.get(L);
8714
8700
  return {
8715
- id: ko.id,
8701
+ id: Vo.id,
8716
8702
  type: Z.BUTTON,
8717
8703
  icon: "KeyboardIcon",
8718
8704
  tooltip: "toolbar.documentFlavor",
@@ -8753,7 +8739,7 @@ function Tu(n) {
8753
8739
  selectable: !1
8754
8740
  },
8755
8741
  value$: new fe((o) => {
8756
- const r = yo.bg.rgb, s = () => {
8742
+ const r = Oo.bg.rgb, s = () => {
8757
8743
  var d, l;
8758
8744
  const a = ot(n);
8759
8745
  if (!a) {
@@ -8784,7 +8770,7 @@ function Tu(n) {
8784
8770
  }
8785
8771
  function ot(n) {
8786
8772
  var g, f, p, m;
8787
- const e = n.get(L), t = n.get(Y), o = n.get(at), r = e.getCurrentUnitForType(_.UNIVER_DOC), s = t.getDocRanges(), i = (g = s.find((I) => I.isActive)) != null ? g : s[0], a = o.getDefaultStyle(), c = (f = o.getStyleCache()) != null ? f : {}, d = Vt(n), l = (p = d == null ? void 0 : d.paragraphStyle) != null && p.namedStyleType ? zc[(m = d == null ? void 0 : d.paragraphStyle) == null ? void 0 : m.namedStyleType] : null;
8773
+ const e = n.get(L), t = n.get(Y), o = n.get(at), r = e.getCurrentUnitForType(_.UNIVER_DOC), s = t.getDocRanges(), i = (g = s.find((I) => I.isActive)) != null ? g : s[0], a = o.getDefaultStyle(), c = (f = o.getStyleCache()) != null ? f : {}, d = Vt(n), l = (p = d == null ? void 0 : d.paragraphStyle) != null && p.namedStyleType ? jc[(m = d == null ? void 0 : d.paragraphStyle) == null ? void 0 : m.namedStyleType] : null;
8788
8774
  if (r == null || i == null)
8789
8775
  return {
8790
8776
  ts: {
@@ -8844,10 +8830,10 @@ const Mu = {
8844
8830
  [K.HEADING_3]: gs,
8845
8831
  [K.HEADING_4]: fs,
8846
8832
  [K.HEADING_5]: ps,
8847
- [K.NORMAL_TEXT]: io,
8833
+ [K.NORMAL_TEXT]: ao,
8848
8834
  [K.TITLE]: Ua,
8849
8835
  [K.SUBTITLE]: Fa,
8850
- [K.NAMED_STYLE_TYPE_UNSPECIFIED]: io
8836
+ [K.NAMED_STYLE_TYPE_UNSPECIFIED]: ao
8851
8837
  }, Ec = {
8852
8838
  [K.HEADING_1]: { key: "H1Icon", component: ec },
8853
8839
  [K.HEADING_2]: { key: "H2Icon", component: tc },
@@ -8923,7 +8909,7 @@ const Qu = (n) => ({
8923
8909
  icon: "ReduceIcon",
8924
8910
  title: "toolbar.horizontalLine"
8925
8911
  }), Ic = "doc.menu.insert-bellow";
8926
- function ju(n) {
8912
+ function zu(n) {
8927
8913
  return {
8928
8914
  id: Ic,
8929
8915
  type: Z.SUBITEMS,
@@ -8931,8 +8917,8 @@ function ju(n) {
8931
8917
  };
8932
8918
  }
8933
8919
  const Ti = 4;
8934
- var zu = Object.getOwnPropertyDescriptor, Gu = (n, e, t, o) => {
8935
- for (var r = o > 1 ? void 0 : o ? zu(e, t) : e, s = n.length - 1, i; s >= 0; s--)
8920
+ var ju = Object.getOwnPropertyDescriptor, Gu = (n, e, t, o) => {
8921
+ for (var r = o > 1 ? void 0 : o ? ju(e, t) : e, s = n.length - 1, i; s >= 0; s--)
8936
8922
  (i = n[s]) && (r = i(r) || r);
8937
8923
  return r;
8938
8924
  }, Wn = (n, e) => (t, o) => e(t, o, n);
@@ -8971,11 +8957,11 @@ function Mi(n, e, t) {
8971
8957
  y: d
8972
8958
  };
8973
8959
  }
8974
- const nr = (n, e) => {
8960
+ const or = (n, e) => {
8975
8961
  const { scene: t, mainComponent: o, engine: r } = e, s = e.with(de).getSkeleton(), i = s.findNodePositionByCharIndex(n.startOffset, !0, n.segmentId, n.segmentPage), a = n.collapsed ? n.startOffset : n.endOffset - 1, c = s.findNodePositionByCharIndex(a, !0, n.segmentId, n.segmentPage), d = o;
8976
8962
  if (!c || !i)
8977
8963
  return;
8978
- const l = d.getOffsetConfig(), { docsLeft: A, docsTop: h } = l, u = r.getCanvasElement(), g = u.getBoundingClientRect(), f = na(u.style.width), { top: p, left: m, width: I } = g, S = I / f, { scaleX: v, scaleY: R } = t.getAncestorScale(), E = new It(l, s), { borderBoxPointGroup: b } = E.getRangePointData(i, c);
8964
+ const l = d.getOffsetConfig(), { docsLeft: A, docsTop: h } = l, u = r.getCanvasElement(), g = u.getBoundingClientRect(), f = oa(u.style.width), { top: p, left: m, width: I } = g, S = I / f, { scaleX: v, scaleY: R } = t.getAncestorScale(), E = new It(l, s), { borderBoxPointGroup: b } = E.getRangePointData(i, c);
8979
8965
  return Es(b).map((B) => Sc(B, t)).map((B) => ({
8980
8966
  left: (B.left + A * v) * S + m,
8981
8967
  right: (B.right + A * v) * S + m,
@@ -8989,7 +8975,7 @@ let Bn = class extends me {
8989
8975
  }
8990
8976
  _createRectPositionObserver(n, e) {
8991
8977
  const t = () => {
8992
- const { scene: a, engine: c } = e, d = typeof n == "function" ? n() : n, l = c.getCanvasElement(), A = l.getBoundingClientRect(), h = na(l.style.width), u = Sc(d, a), { top: g, left: f, width: p } = A, m = p / h;
8978
+ const { scene: a, engine: c } = e, d = typeof n == "function" ? n() : n, l = c.getCanvasElement(), A = l.getBoundingClientRect(), h = oa(l.style.width), u = Sc(d, a), { top: g, left: f, width: p } = A, m = p / h;
8993
8979
  return {
8994
8980
  left: u.left * m + f,
8995
8981
  right: u.right * m + f,
@@ -9026,16 +9012,16 @@ let Bn = class extends me {
9026
9012
  }
9027
9013
  _createRangePositionObserver(n, e) {
9028
9014
  var i;
9029
- const t = (i = nr(n, e)) != null ? i : [], o = new Fe(t), r = new In();
9015
+ const t = (i = or(n, e)) != null ? i : [], o = new Fe(t), r = new In();
9030
9016
  r.add(this._commandService.onCommandExecuted((a) => {
9031
9017
  if ((a.id === tt.id || a.id === X.id) && a.params.unitId === e.unitId) {
9032
- const d = nr(n, e);
9018
+ const d = or(n, e);
9033
9019
  d && o.next(d);
9034
9020
  }
9035
9021
  }));
9036
9022
  const s = e.scene.getViewport(We.VIEW_MAIN);
9037
9023
  return s && r.add(s.onScrollAfter$.subscribeEvent(() => {
9038
- const a = nr(n, e);
9024
+ const a = or(n, e);
9039
9025
  a && o.next(a);
9040
9026
  })), {
9041
9027
  positions: t,
@@ -9124,7 +9110,7 @@ let Bn = class extends me {
9124
9110
  // #endregion
9125
9111
  };
9126
9112
  Bn = Gu([
9127
- Wn(0, j(Pl)),
9113
+ Wn(0, z(Pl)),
9128
9114
  Wn(1, pe),
9129
9115
  Wn(2, L),
9130
9116
  Wn(3, T)
@@ -9278,7 +9264,7 @@ let wt = class extends me {
9278
9264
  this._customRangeDirty = !0, this._bulletDirty = !0, this._paragraphDirty = !0;
9279
9265
  })), this.disposeWithMe(
9280
9266
  Mt(this._context.engine.onTransformChange$).pipe(
9281
- oo((e) => e.type === oa.resize)
9267
+ ro((e) => e.type === ra.resize)
9282
9268
  ).subscribe(() => {
9283
9269
  this._customRangeDirty = !0, this._bulletDirty = !0, this._paragraphDirty = !0;
9284
9270
  })
@@ -9305,8 +9291,8 @@ let wt = class extends me {
9305
9291
  }));
9306
9292
  const e = Mt(this._context.mainComponent.onPointerDown$), t = Mt(this._context.scene.onPointerUp$);
9307
9293
  this.disposeWithMe(e.pipe(
9308
- Wl((o) => t.pipe(jl(1), Pn((r) => ({ down: o, up: r })))),
9309
- oo(({ down: o, up: r }) => o.target === r.target && r.timeStamp - o.timeStamp < 300)
9294
+ Wl((o) => t.pipe(zl(1), Pn((r) => ({ down: o, up: r })))),
9295
+ ro(({ down: o, up: r }) => o.target === r.target && r.timeStamp - o.timeStamp < 300)
9310
9296
  ).subscribe(({ down: o }) => {
9311
9297
  if (o.button === 2)
9312
9298
  return;
@@ -9552,7 +9538,7 @@ let wt = class extends me {
9552
9538
  }
9553
9539
  };
9554
9540
  wt = Ku([
9555
- qu(1, j(de))
9541
+ qu(1, z(de))
9556
9542
  ], wt);
9557
9543
  const Ju = [
9558
9544
  ct.id,
@@ -9584,7 +9570,7 @@ function $u(n) {
9584
9570
  }, [t]), /* @__PURE__ */ Q(
9585
9571
  "div",
9586
9572
  {
9587
- className: ze("univer-box-border univer-flex univer-rounded univer-bg-white univer-py-1.5 univer-shadow-sm dark:!univer-border-gray-700 dark:!univer-bg-gray-900", Nn),
9573
+ className: je("univer-box-border univer-flex univer-rounded univer-bg-white univer-py-1.5 univer-shadow-sm dark:!univer-border-gray-700 dark:!univer-bg-gray-900", Nn),
9588
9574
  children: o.map((s) => s.item && /* @__PURE__ */ Q("div", { className: "univer-flex univer-flex-nowrap univer-gap-2 univer-px-2", children: /* @__PURE__ */ Q(wl, { ...s.item }, s.key) }, s.key))
9589
9575
  }
9590
9576
  );
@@ -9605,7 +9591,7 @@ const oh = [
9605
9591
  V.CUSTOM_BLOCK,
9606
9592
  V.PARAGRAPH
9607
9593
  ];
9608
- let co = class extends me {
9594
+ let lo = class extends me {
9609
9595
  constructor(e, t, o, r, s, i) {
9610
9596
  super();
9611
9597
  O(this, "_floatMenu", null);
@@ -9666,19 +9652,19 @@ let co = class extends me {
9666
9652
  }, Mn(() => this._hideFloatMenu());
9667
9653
  }
9668
9654
  };
9669
- co = th([
9670
- ln(1, j(Y)),
9671
- ln(2, j(Bn)),
9672
- ln(3, j(rn)),
9673
- ln(4, j(L)),
9674
- ln(5, j(Re))
9675
- ], co);
9655
+ lo = th([
9656
+ ln(1, z(Y)),
9657
+ ln(2, z(Bn)),
9658
+ ln(3, z(rn)),
9659
+ ln(4, z(L)),
9660
+ ln(5, z(Re))
9661
+ ], lo);
9676
9662
  var rh = Object.getOwnPropertyDescriptor, sh = (n, e, t, o) => {
9677
9663
  for (var r = o > 1 ? void 0 : o ? rh(e, t) : e, s = n.length - 1, i; s >= 0; s--)
9678
9664
  (i = n[s]) && (r = i(r) || r);
9679
9665
  return r;
9680
9666
  }, dn = (n, e) => (t, o) => e(t, o, n);
9681
- let lo = class extends me {
9667
+ let Ao = class extends me {
9682
9668
  constructor(e, t, o, r, s, i) {
9683
9669
  super();
9684
9670
  O(this, "_paragrahMenu", null);
@@ -9740,7 +9726,7 @@ let lo = class extends me {
9740
9726
  componentKey: "doc.paragraph.menu",
9741
9727
  direction: "left-center",
9742
9728
  onClickOutside: () => {
9743
- this._docSelectionManagerService.textSelection$.pipe(zl()).subscribe(() => {
9729
+ this._docSelectionManagerService.textSelection$.pipe(jl()).subscribe(() => {
9744
9730
  this._isCursorInActiveParagraph() || this.hideParagraphMenu(!0);
9745
9731
  });
9746
9732
  },
@@ -9758,16 +9744,16 @@ let lo = class extends me {
9758
9744
  this._paragrahMenu && (this._paragrahMenu.disposable.canDispose() || e) && (this._paragrahMenu.disposable.dispose(), this._paragrahMenu = null);
9759
9745
  }
9760
9746
  };
9761
- lo = sh([
9762
- dn(1, j(Y)),
9763
- dn(2, j(wt)),
9764
- dn(3, j(Bn)),
9765
- dn(4, j(de)),
9766
- dn(5, j(co))
9767
- ], lo);
9747
+ Ao = sh([
9748
+ dn(1, z(Y)),
9749
+ dn(2, z(wt)),
9750
+ dn(3, z(Bn)),
9751
+ dn(4, z(de)),
9752
+ dn(5, z(lo))
9753
+ ], Ao);
9768
9754
  const ih = ({ popup: n }) => {
9769
9755
  var E, b;
9770
- const [e, t] = Ee(!1), o = ke(null), r = J(T), s = J(Oo), i = ke(null), a = ke(!1), c = J(pe), d = J(L), l = c.getRenderById(n.unitId), A = d.getUnit(n.unitId, _.UNIVER_DOC), h = l == null ? void 0 : l.with(lo), u = l == null ? void 0 : l.with(wt), g = et(u == null ? void 0 : u.hoverParagraph$), f = et(u == null ? void 0 : u.hoverParagraphLeft$), p = (E = g != null ? g : f) == null ? void 0 : E.startIndex, m = Te(() => {
9756
+ const [e, t] = Ee(!1), o = ke(null), r = J(T), s = J(To), i = ke(null), a = ke(!1), c = J(pe), d = J(L), l = c.getRenderById(n.unitId), A = d.getUnit(n.unitId, _.UNIVER_DOC), h = l == null ? void 0 : l.with(Ao), u = l == null ? void 0 : l.with(wt), g = et(u == null ? void 0 : u.hoverParagraph$), f = et(u == null ? void 0 : u.hoverParagraphLeft$), p = (E = g != null ? g : f) == null ? void 0 : E.startIndex, m = Te(() => {
9771
9757
  var x, C;
9772
9758
  return (C = (x = A == null ? void 0 : A.getBody()) == null ? void 0 : x.paragraphs) == null ? void 0 : C.find((B) => B.startIndex === p);
9773
9759
  }, [A, g]), I = (b = m == null ? void 0 : m.paragraphStyle) == null ? void 0 : b.namedStyleType, S = Ec[I != null ? I : K.NORMAL_TEXT], v = Te(() => new Fe({
@@ -9784,7 +9770,7 @@ const ih = ({ popup: n }) => {
9784
9770
  {
9785
9771
  "data-u-comp": "paragraph-menu",
9786
9772
  ref: i,
9787
- className: ze("univer-mr-1 univer-inline-flex univer-h-7 univer-cursor-pointer univer-items-center univer-gap-1 univer-rounded-full univer-px-2.5 univer-py-0 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-600", Nn, {
9773
+ className: je("univer-mr-1 univer-inline-flex univer-h-7 univer-cursor-pointer univer-items-center univer-gap-1 univer-rounded-full univer-px-2.5 univer-py-0 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-600", Nn, {
9788
9774
  "univer-bg-gray-100 dark:!univer-bg-gray-700": e,
9789
9775
  "univer-bg-white dark:!univer-bg-gray-700": !e
9790
9776
  }),
@@ -9845,7 +9831,7 @@ const ih = ({ popup: n }) => {
9845
9831
  Ql,
9846
9832
  {
9847
9833
  style: { width: 212 },
9848
- menuType: no.PARAGRAPH,
9834
+ menuType: oo.PARAGRAPH,
9849
9835
  onOptionSelect: (x) => {
9850
9836
  const { label: C, commandId: B, value: y } = x;
9851
9837
  r && r.executeCommand(B != null ? B : C, { value: y }), s.focus(), R();
@@ -9859,10 +9845,10 @@ const ih = ({ popup: n }) => {
9859
9845
  ] });
9860
9846
  };
9861
9847
  function Se(n) {
9862
- return n.getContextValue(_n) && n.getContextValue(Hr) && !n.getContextValue(Zi);
9848
+ return n.getContextValue(_n) && n.getContextValue(Hr) && !n.getContextValue(Ji);
9863
9849
  }
9864
9850
  function ah(n) {
9865
- return n.getContextValue(_n) && n.getContextValue(Hr) && !n.getContextValue(Zi);
9851
+ return n.getContextValue(_n) && n.getContextValue(Hr) && !n.getContextValue(Ji);
9866
9852
  }
9867
9853
  const ch = {
9868
9854
  id: Jt.id,
@@ -9900,19 +9886,19 @@ const ch = {
9900
9886
  binding: q.PERIOD | te.CTRL_COMMAND,
9901
9887
  preconditions: Se
9902
9888
  }, ph = {
9903
- id: Qo.id,
9889
+ id: Uo.id,
9904
9890
  binding: q.L | te.CTRL_COMMAND | te.SHIFT,
9905
9891
  preconditions: Se
9906
9892
  }, mh = {
9907
- id: Fo.id,
9893
+ id: Ho.id,
9908
9894
  binding: q.R | te.CTRL_COMMAND | te.SHIFT,
9909
9895
  preconditions: Se
9910
9896
  }, Eh = {
9911
- id: Uo.id,
9897
+ id: Fo.id,
9912
9898
  binding: q.E | te.CTRL_COMMAND | te.SHIFT,
9913
9899
  preconditions: Se
9914
9900
  }, Ih = {
9915
- id: Ho.id,
9901
+ id: ko.id,
9916
9902
  binding: q.J | te.CTRL_COMMAND | te.SHIFT,
9917
9903
  preconditions: Se
9918
9904
  }, Sh = {
@@ -9923,7 +9909,7 @@ const ch = {
9923
9909
  id: yn.id,
9924
9910
  binding: q.Digit8 | te.CTRL_COMMAND | te.SHIFT,
9925
9911
  preconditions: Se
9926
- }, Vo = "docs-ui.config", Pi = {
9912
+ }, Wo = "docs-ui.config", Pi = {
9927
9913
  layout: {
9928
9914
  docContainerConfig: rd,
9929
9915
  toolbarConfig: od
@@ -9966,7 +9952,7 @@ function xh(n) {
9966
9952
  }
9967
9953
  function yh() {
9968
9954
  var r, s, i;
9969
- const n = J(L), e = ua(Vo), t = et(() => n.getCurrentTypeOfUnit$(_.UNIVER_SHEET), void 0, void 0, []), o = (i = (s = (r = e == null ? void 0 : e.layout) == null ? void 0 : r.docContainerConfig) == null ? void 0 : s.footer) != null ? i : !0;
9955
+ const n = J(L), e = ua(Wo), t = et(() => n.getCurrentTypeOfUnit$(_.UNIVER_SHEET), void 0, void 0, []), o = (i = (s = (r = e == null ? void 0 : e.layout) == null ? void 0 : r.docContainerConfig) == null ? void 0 : s.footer) != null ? i : !0;
9970
9956
  return t ? null : o && /* @__PURE__ */ re(
9971
9957
  "div",
9972
9958
  {
@@ -9996,12 +9982,12 @@ const Oh = "univer-font-[500] univer-truncate univer-h-[24px] univer-mb-2 univer
9996
9982
  }), []);
9997
9983
  return Kl(e, () => S), Ce(() => {
9998
9984
  c && S.scrollTo(c);
9999
- }, [c, S]), /* @__PURE__ */ re("div", { className: ze("univer-relative", h), style: u, children: [
9985
+ }, [c, S]), /* @__PURE__ */ re("div", { className: je("univer-relative", h), style: u, children: [
10000
9986
  /* @__PURE__ */ Q(
10001
9987
  "div",
10002
9988
  {
10003
9989
  onClick: () => l == null ? void 0 : l(!d),
10004
- className: ze("univer-absolute univer-left-5 univer-top-4 univer-z-[100] univer-flex univer-h-8 univer-w-8 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-full univer-bg-white univer-text-gray-800 univer-shadow-sm dark:!univer-bg-gray-600 dark:!univer-text-gray-200", g),
9990
+ className: je("univer-absolute univer-left-5 univer-top-4 univer-z-[100] univer-flex univer-h-8 univer-w-8 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-full univer-bg-white univer-text-gray-800 univer-shadow-sm dark:!univer-bg-gray-600 dark:!univer-text-gray-200", g),
10005
9991
  style: f,
10006
9992
  children: d ? /* @__PURE__ */ Q(ic, {}) : /* @__PURE__ */ Q(Xa, {})
10007
9993
  }
@@ -10009,7 +9995,7 @@ const Oh = "univer-font-[500] univer-truncate univer-h-[24px] univer-mb-2 univer
10009
9995
  /* @__PURE__ */ Q(
10010
9996
  "div",
10011
9997
  {
10012
- className: ze(
9998
+ className: je(
10013
9999
  r,
10014
10000
  `
10015
10001
  univer-absolute univer-left-0 univer-top-0 univer-box-border univer-flex univer-min-w-[180px]
@@ -10031,12 +10017,12 @@ const Oh = "univer-font-[500] univer-truncate univer-h-[24px] univer-mb-2 univer
10031
10017
  "div",
10032
10018
  {
10033
10019
  ref: m,
10034
- className: ze("univer-flex-1 univer-overflow-y-auto univer-overflow-x-hidden", $l),
10020
+ className: je("univer-flex-1 univer-overflow-y-auto univer-overflow-x-hidden", $l),
10035
10021
  children: t == null ? void 0 : t.map((v) => /* @__PURE__ */ Q(
10036
10022
  "div",
10037
10023
  {
10038
10024
  id: `univer-side-menu-${v.id}`,
10039
- className: ze(
10025
+ className: je(
10040
10026
  Oh,
10041
10027
  {
10042
10028
  [Th]: v.isTitle,
@@ -10100,7 +10086,7 @@ function Ph(n, e, t, o) {
10100
10086
  const wi = "__title";
10101
10087
  function wh() {
10102
10088
  var e, t, o;
10103
- const n = ua(Vo);
10089
+ const n = ua(Wo);
10104
10090
  return (o = (t = (e = n == null ? void 0 : n.layout) == null ? void 0 : e.docContainerConfig) == null ? void 0 : t.sideMenu) == null || o ? /* @__PURE__ */ Q(Nh, {}) : null;
10105
10091
  }
10106
10092
  function Nh() {
@@ -10124,7 +10110,7 @@ function Nh() {
10124
10110
  const { paragraphStart: ne, paragraphEnd: ie } = k;
10125
10111
  return {
10126
10112
  id: U.paragraphStyle.headingId,
10127
- text: to(r.slice(ne, ie)),
10113
+ text: no(r.slice(ne, ie)),
10128
10114
  level: H,
10129
10115
  isTitle: ((ae = U.paragraphStyle) == null ? void 0 : ae.namedStyleType) === K.TITLE
10130
10116
  };
@@ -10307,7 +10293,7 @@ const rt = {
10307
10293
  return [t, (s) => (o(s), e.executeCommand(rt.id, {
10308
10294
  paragraph: { spaceAbove: { v: s } }
10309
10295
  }))];
10310
- }, jh = (n) => {
10296
+ }, zh = (n) => {
10311
10297
  const e = J(T), [t, o] = Ee(() => {
10312
10298
  var i;
10313
10299
  const s = n[0];
@@ -10316,7 +10302,7 @@ const rt = {
10316
10302
  return [t, (s) => (o(s), e.executeCommand(rt.id, {
10317
10303
  paragraph: { spaceBelow: { v: s } }
10318
10304
  }))];
10319
- }, zh = (n) => {
10305
+ }, jh = (n) => {
10320
10306
  const e = J(T), t = J(pe), o = J(L), r = Te(() => {
10321
10307
  var g;
10322
10308
  const u = o.getCurrentUnitForType(_.UNIVER_DOC);
@@ -10387,17 +10373,17 @@ function Gh() {
10387
10373
  { label: n.t("toolbar.alignCenter"), value: String(Ue.CENTER), icon: /* @__PURE__ */ Q(sc, {}) },
10388
10374
  { label: n.t("toolbar.alignRight"), value: String(Ue.RIGHT), icon: /* @__PURE__ */ Q(cc, {}) },
10389
10375
  { label: n.t("toolbar.alignJustify"), value: String(Ue.JUSTIFIED), icon: /* @__PURE__ */ Q(qa, {}) }
10390
- ], []), t = Qh(), [o, r] = Uh(t, e[0].value), [s, i] = Fh(t), [a, c] = Hh(t), [d, l] = kh(t), [A, h] = Vh(t), [u, g] = Wh(t), [f, p] = jh(t), { lineSpacing: [m, I], spacingRule: [S, v] } = zh(t), R = Te(() => S === Xt.AUTO ? { min: 1, max: 5, step: m < 2 ? 0.5 : 1 } : { min: 1, max: 100 }, [S, m]);
10376
+ ], []), t = Qh(), [o, r] = Uh(t, e[0].value), [s, i] = Fh(t), [a, c] = Hh(t), [d, l] = kh(t), [A, h] = Vh(t), [u, g] = Wh(t), [f, p] = zh(t), { lineSpacing: [m, I], spacingRule: [S, v] } = jh(t), R = Te(() => S === Xt.AUTO ? { min: 1, max: 5, step: m < 2 ? 0.5 : 1 } : { min: 1, max: 100 }, [S, m]);
10391
10377
  return /* @__PURE__ */ re("div", { children: [
10392
10378
  /* @__PURE__ */ Q("div", { className: "univer-t-4 univer-text-sm univer-font-medium", children: n.t("doc.paragraphSetting.alignment") }),
10393
10379
  /* @__PURE__ */ Q(
10394
10380
  "div",
10395
10381
  {
10396
- className: ze("univer-mt-4 univer-box-border univer-flex univer-w-full univer-items-center univer-justify-between univer-gap-1 univer-rounded-md univer-p-1", Nn),
10382
+ className: je("univer-mt-4 univer-box-border univer-flex univer-w-full univer-items-center univer-justify-between univer-gap-1 univer-rounded-md univer-p-1", Nn),
10397
10383
  children: e.map((E) => /* @__PURE__ */ Q(ed, { title: E.label, placement: "bottom", children: /* @__PURE__ */ Q(
10398
10384
  "span",
10399
10385
  {
10400
- className: ze("hover:univer-bg-black/60 univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-rounded univer-bg-none univer-px-3 univer-py-1", {
10386
+ className: je("hover:univer-bg-black/60 univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-rounded univer-bg-none univer-px-3 univer-py-1", {
10401
10387
  "univer-bg-blend-color-dodge/90": o === E.value
10402
10388
  }),
10403
10389
  onClick: () => r(E.value),
@@ -10506,7 +10492,7 @@ var qh = Object.getOwnPropertyDescriptor, Xh = (n, e, t, o) => {
10506
10492
  for (var r = o > 1 ? void 0 : o ? qh(e, t) : e, s = n.length - 1, i; s >= 0; s--)
10507
10493
  (i = n[s]) && (r = i(r) || r);
10508
10494
  return r;
10509
- }, or = (n, e) => (t, o) => e(t, o, n);
10495
+ }, rr = (n, e) => (t, o) => e(t, o, n);
10510
10496
  const Ni = "doc_ui_paragraph-setting-panel";
10511
10497
  let tn = class extends me {
10512
10498
  constructor(e, t, o) {
@@ -10533,9 +10519,9 @@ let tn = class extends me {
10533
10519
  }
10534
10520
  };
10535
10521
  tn = Xh([
10536
- or(0, T),
10537
- or(1, j(rn)),
10538
- or(2, j(la))
10522
+ rr(0, T),
10523
+ rr(1, z(rn)),
10524
+ rr(2, z(la))
10539
10525
  ], tn);
10540
10526
  const Ds = {
10541
10527
  id: "sidebar.operation.doc-paragraph-setting-panel",
@@ -10584,8 +10570,8 @@ const dt = (n) => {
10584
10570
  return Li(o, e, t), () => r.unsubscribe();
10585
10571
  });
10586
10572
  }, Jh = (n) => ({
10587
- id: ro.name,
10588
- commandId: ro.id,
10573
+ id: so.name,
10574
+ commandId: so.id,
10589
10575
  type: Z.BUTTON,
10590
10576
  icon: "CopyDoubleIcon",
10591
10577
  title: "rightClick.copy",
@@ -10611,7 +10597,7 @@ const dt = (n) => {
10611
10597
  title: "rightClick.paste",
10612
10598
  hidden$: se(n, _.UNIVER_DOC)
10613
10599
  }), ng = (n) => ({
10614
- id: Do.id,
10600
+ id: Po.id,
10615
10601
  type: Z.BUTTON,
10616
10602
  icon: "PasteSpecialDoubleIcon",
10617
10603
  title: "rightClick.delete",
@@ -10759,23 +10745,23 @@ const ug = {
10759
10745
  }
10760
10746
  },
10761
10747
  [Ks.LAYOUT]: {
10762
- [Qo.id]: {
10748
+ [Uo.id]: {
10763
10749
  order: 2,
10764
10750
  menuItemFactory: vu
10765
10751
  },
10766
- [Uo.id]: {
10752
+ [Fo.id]: {
10767
10753
  order: 3,
10768
10754
  menuItemFactory: Cu
10769
10755
  },
10770
- [Fo.id]: {
10756
+ [Ho.id]: {
10771
10757
  order: 4,
10772
10758
  menuItemFactory: Ru
10773
10759
  },
10774
- [Ho.id]: {
10760
+ [ko.id]: {
10775
10761
  order: 5,
10776
10762
  menuItemFactory: bu
10777
10763
  },
10778
- [wo.id]: {
10764
+ [No.id]: {
10779
10765
  order: 6,
10780
10766
  menuItemFactory: xu
10781
10767
  },
@@ -10787,7 +10773,7 @@ const ug = {
10787
10773
  order: 8,
10788
10774
  menuItemFactory: yi
10789
10775
  },
10790
- [so.id]: {
10776
+ [io.id]: {
10791
10777
  order: 9,
10792
10778
  menuItemFactory: Oi
10793
10779
  },
@@ -10795,7 +10781,7 @@ const ug = {
10795
10781
  order: 10,
10796
10782
  menuItemFactory: mu
10797
10783
  },
10798
- [ko.id]: {
10784
+ [Vo.id]: {
10799
10785
  order: 11,
10800
10786
  menuItemFactory: yu
10801
10787
  },
@@ -10814,9 +10800,9 @@ const ug = {
10814
10800
  }
10815
10801
  }
10816
10802
  },
10817
- [no.MAIN_AREA]: {
10803
+ [oo.MAIN_AREA]: {
10818
10804
  [an.FORMAT]: {
10819
- [ro.name]: {
10805
+ [so.name]: {
10820
10806
  order: 0,
10821
10807
  menuItemFactory: Jh
10822
10808
  },
@@ -10828,7 +10814,7 @@ const ug = {
10828
10814
  order: 2,
10829
10815
  menuItemFactory: tg
10830
10816
  },
10831
- [Do.id]: {
10817
+ [Po.id]: {
10832
10818
  order: 3,
10833
10819
  menuItemFactory: ng
10834
10820
  }
@@ -10876,7 +10862,7 @@ const ug = {
10876
10862
  }
10877
10863
  }
10878
10864
  },
10879
- [no.PARAGRAPH]: {
10865
+ [oo.PARAGRAPH]: {
10880
10866
  [an.QUICK]: {
10881
10867
  [us.id]: {
10882
10868
  order: 0,
@@ -10898,7 +10884,7 @@ const ug = {
10898
10884
  order: 4,
10899
10885
  menuItemFactory: Nu
10900
10886
  },
10901
- [io.id]: {
10887
+ [ao.id]: {
10902
10888
  order: 5,
10903
10889
  menuItemFactory: Lu
10904
10890
  },
@@ -10910,7 +10896,7 @@ const ug = {
10910
10896
  order: 7,
10911
10897
  menuItemFactory: yi
10912
10898
  },
10913
- [so.id]: {
10899
+ [io.id]: {
10914
10900
  order: 8,
10915
10901
  menuItemFactory: Oi
10916
10902
  }
@@ -10932,7 +10918,7 @@ const ug = {
10932
10918
  [an.LAYOUT]: {
10933
10919
  // title: 'rightClick.insertBellow',
10934
10920
  [Ic]: {
10935
- menuItemFactory: ju,
10921
+ menuItemFactory: zu,
10936
10922
  [ls.id]: {
10937
10923
  order: 0,
10938
10924
  menuItemFactory: Hu
@@ -10958,7 +10944,7 @@ var hg = Object.getOwnPropertyDescriptor, gg = (n, e, t, o) => {
10958
10944
  (i = n[s]) && (r = i(r) || r);
10959
10945
  return r;
10960
10946
  }, st = (n, e) => (t, o) => e(t, o, n);
10961
- let Ao = class extends me {
10947
+ let uo = class extends me {
10962
10948
  constructor(n, e, t, o, r, s, i, a, c) {
10963
10949
  super(), this._injector = n, this._componentManager = e, this._commandService = t, this._layoutService = o, this._menuManagerService = r, this._uiPartsService = s, this._univerInstanceService = i, this._shortcutService = a, this._configService = c, this._init();
10964
10950
  }
@@ -11020,24 +11006,24 @@ let Ao = class extends me {
11020
11006
  );
11021
11007
  }
11022
11008
  };
11023
- Ao = gg([
11024
- st(0, j(Dn)),
11025
- st(1, j(rn)),
11009
+ uo = gg([
11010
+ st(0, z(Dn)),
11011
+ st(1, z(rn)),
11026
11012
  st(2, T),
11027
- st(3, Oo),
11013
+ st(3, To),
11028
11014
  st(4, Aa),
11029
11015
  st(5, Hl),
11030
11016
  st(6, L),
11031
- st(7, To),
11017
+ st(7, Bo),
11032
11018
  st(8, Vr)
11033
- ], Ao);
11019
+ ], uo);
11034
11020
  var fg = Object.getOwnPropertyDescriptor, pg = (n, e, t, o) => {
11035
11021
  for (var r = o > 1 ? void 0 : o ? fg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11036
11022
  (i = n[s]) && (r = i(r) || r);
11037
11023
  return r;
11038
- }, rr = (n, e) => (t, o) => e(t, o, n);
11024
+ }, sr = (n, e) => (t, o) => e(t, o, n);
11039
11025
  const Qi = 1.5;
11040
- let uo = class extends Ct {
11026
+ let ho = class extends Ct {
11041
11027
  constructor(n, e, t, o) {
11042
11028
  super(), this._context = n, this._textSelectionManagerService = e, this._editorService = t, this._docSkeletonManagerService = o, this._init();
11043
11029
  }
@@ -11046,7 +11032,7 @@ let uo = class extends Ct {
11046
11032
  if (n == null)
11047
11033
  return;
11048
11034
  const { isEditing: e, unitId: t } = n;
11049
- t !== this._context.unitId || !e || this._context.unitId !== bo && this._scrollToSelection();
11035
+ t !== this._context.unitId || !e || this._context.unitId !== xo && this._scrollToSelection();
11050
11036
  });
11051
11037
  }
11052
11038
  scrollToRange(n) {
@@ -11085,16 +11071,16 @@ let uo = class extends Ct {
11085
11071
  e && this.scrollToNode(t);
11086
11072
  }
11087
11073
  };
11088
- uo = pg([
11089
- rr(1, j(Y)),
11090
- rr(2, Ge),
11091
- rr(3, j(de))
11092
- ], uo);
11074
+ ho = pg([
11075
+ sr(1, z(Y)),
11076
+ sr(2, Ge),
11077
+ sr(3, z(de))
11078
+ ], ho);
11093
11079
  var mg = Object.getOwnPropertyDescriptor, Eg = (n, e, t, o) => {
11094
11080
  for (var r = o > 1 ? void 0 : o ? mg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11095
11081
  (i = n[s]) && (r = i(r) || r);
11096
11082
  return r;
11097
- }, zt = (n, e) => (t, o) => e(t, o, n);
11083
+ }, jt = (n, e) => (t, o) => e(t, o, n);
11098
11084
  let br = class extends Ct {
11099
11085
  constructor(n, e, t, o, r, s, i) {
11100
11086
  super(), this._context = n, this._commandService = e, this._docSelectionRenderService = t, this._docSkeletonManagerService = o, this._editorService = r, this._renderManagerService = s, this._univerInstanceService = i, this._addNewRender(), this._initRenderRefresh(), this._initCommandListener();
@@ -11132,7 +11118,7 @@ let br = class extends Ct {
11132
11118
  } else
11133
11119
  t.onMouseWheel(a, s);
11134
11120
  }), new lr(t), n.addLayer(
11135
- new Gs(n, [], zo),
11121
+ new Gs(n, [], Go),
11136
11122
  new Gs(n, [], ad)
11137
11123
  ), this._addComponent();
11138
11124
  const o = () => n.render();
@@ -11147,7 +11133,7 @@ let br = class extends Ct {
11147
11133
  }, i = new gl($e.MAIN, void 0, s);
11148
11134
  i.zIndex = $s;
11149
11135
  const a = new fl($e.BACKGROUND, void 0, s);
11150
- a.zIndex = $s, this._context.mainComponent = i, t.set($e.MAIN, i), t.set($e.BACKGROUND, a), n.addObjects([i], zo), n.addObjects([a], id), this._editorService.getEditor(e.getUnitId()) == null && n.enableLayerCache(zo);
11136
+ a.zIndex = $s, this._context.mainComponent = i, t.set($e.MAIN, i), t.set($e.BACKGROUND, a), n.addObjects([i], Go), n.addObjects([a], id), this._editorService.getEditor(e.getUnitId()) == null && n.enableLayerCache(Go);
11151
11137
  }
11152
11138
  _initRenderRefresh() {
11153
11139
  this._docSkeletonManagerService.currentSkeletonBefore$.pipe(ft(this.dispose$)).subscribe((n) => {
@@ -11198,12 +11184,12 @@ let br = class extends Ct {
11198
11184
  }
11199
11185
  };
11200
11186
  br = Eg([
11201
- zt(1, T),
11202
- zt(2, j(Re)),
11203
- zt(3, j(de)),
11204
- zt(4, Ge),
11205
- zt(5, pe),
11206
- zt(6, L)
11187
+ jt(1, T),
11188
+ jt(2, z(Re)),
11189
+ jt(3, z(de)),
11190
+ jt(4, Ge),
11191
+ jt(5, pe),
11192
+ jt(6, L)
11207
11193
  ], br);
11208
11194
  function Ig(n) {
11209
11195
  let { pageWidth: e, pageHeight: t } = n;
@@ -11219,7 +11205,7 @@ var Sg = Object.getOwnPropertyDescriptor, vg = (n, e, t, o) => {
11219
11205
  for (var r = o > 1 ? void 0 : o ? Sg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11220
11206
  (i = n[s]) && (r = i(r) || r);
11221
11207
  return r;
11222
- }, sr = (n, e) => (t, o) => e(t, o, n);
11208
+ }, ir = (n, e) => (t, o) => e(t, o, n);
11223
11209
  let xr = class {
11224
11210
  constructor(n, e, t) {
11225
11211
  O(this, "_docContainer");
@@ -11243,7 +11229,7 @@ let xr = class {
11243
11229
  getUIConfig() {
11244
11230
  return {
11245
11231
  injector: this._injector,
11246
- config: this._configService.getConfig(Vo),
11232
+ config: this._configService.getConfig(Wo),
11247
11233
  changeLocale: this.changeLocale,
11248
11234
  getComponent: this.getComponent
11249
11235
  };
@@ -11260,31 +11246,31 @@ let xr = class {
11260
11246
  }
11261
11247
  };
11262
11248
  xr = vg([
11263
- sr(0, j(Ye)),
11264
- sr(1, j(Dn)),
11265
- sr(2, Vr)
11249
+ ir(0, z(Ye)),
11250
+ ir(1, z(Dn)),
11251
+ ir(2, Vr)
11266
11252
  ], xr);
11267
11253
  var Cg = Object.getOwnPropertyDescriptor, Rg = (n, e, t, o) => {
11268
11254
  for (var r = o > 1 ? void 0 : o ? Cg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11269
11255
  (i = n[s]) && (r = i(r) || r);
11270
11256
  return r;
11271
11257
  }, bg = (n, e) => (t, o) => e(t, o, n);
11272
- let ho = class extends Ct {
11258
+ let go = class extends Ct {
11273
11259
  constructor(e) {
11274
11260
  super();
11275
11261
  O(this, "_docContainerController");
11276
11262
  this._injector = e, this._docContainerController = this._injector.createInstance(xr);
11277
11263
  }
11278
11264
  };
11279
- ho = Rg([
11280
- bg(0, j(Dn))
11281
- ], ho);
11265
+ go = Rg([
11266
+ bg(0, z(Dn))
11267
+ ], go);
11282
11268
  var xg = Object.getOwnPropertyDescriptor, yg = (n, e, t, o) => {
11283
11269
  for (var r = o > 1 ? void 0 : o ? xg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11284
11270
  (i = n[s]) && (r = i(r) || r);
11285
11271
  return r;
11286
11272
  }, Ui = (n, e) => (t, o) => e(t, o, n);
11287
- let go = class extends me {
11273
+ let fo = class extends me {
11288
11274
  constructor(n, e) {
11289
11275
  super(), this._docAutoFormatService = n, this._renderManagerService = e, this._initListTabAutoFormat(), this._initSpaceAutoFormat(), this._initDefaultEnterFormat(), this._initExitListAutoFormat();
11290
11276
  }
@@ -11340,14 +11326,14 @@ let go = class extends me {
11340
11326
  _initSpaceAutoFormat() {
11341
11327
  this.disposeWithMe(
11342
11328
  this._docAutoFormatService.registerAutoFormat({
11343
- id: Mo.id,
11329
+ id: _o.id,
11344
11330
  match: (n) => {
11345
11331
  var s;
11346
11332
  const { selection: e, paragraphs: t, unit: o } = n;
11347
11333
  if (!e.collapsed || t.length !== 1 || !e.collapsed)
11348
11334
  return !1;
11349
11335
  const r = (s = o.getBody()) == null ? void 0 : s.dataStream.slice(t[0].paragraphStart, e.startOffset - 1);
11350
- return !!(r && (Object.keys(jo).includes(r) || Object.keys(qo).includes(r)));
11336
+ return !!(r && (Object.keys(jo).includes(r) || Object.keys(Xo).includes(r)));
11351
11337
  },
11352
11338
  getMutations(n) {
11353
11339
  var s;
@@ -11362,8 +11348,8 @@ let go = class extends me {
11362
11348
  }
11363
11349
  }];
11364
11350
  }
11365
- if (r && Object.keys(qo).includes(r)) {
11366
- const i = qo[r];
11351
+ if (r && Object.keys(Xo).includes(r)) {
11352
+ const i = Xo[r];
11367
11353
  return [{
11368
11354
  id: Qa.id,
11369
11355
  params: {
@@ -11416,10 +11402,10 @@ let go = class extends me {
11416
11402
  );
11417
11403
  }
11418
11404
  };
11419
- go = yg([
11420
- Ui(0, j(Pt)),
11405
+ fo = yg([
11406
+ Ui(0, z(Pt)),
11421
11407
  Ui(1, pe)
11422
- ], go);
11408
+ ], fo);
11423
11409
  function Og(n) {
11424
11410
  return n.rows[0].cells[0].sections[0].columns[0].lines[0];
11425
11411
  }
@@ -11529,8 +11515,8 @@ var Pg = Object.getOwnPropertyDescriptor, wg = (n, e, t, o) => {
11529
11515
  for (var r = o > 1 ? void 0 : o ? Pg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11530
11516
  (i = n[s]) && (r = i(r) || r);
11531
11517
  return r;
11532
- }, jn = (n, e) => (t, o) => e(t, o, n);
11533
- let fo = class extends me {
11518
+ }, zn = (n, e) => (t, o) => e(t, o, n);
11519
+ let po = class extends me {
11534
11520
  constructor(e, t, o, r) {
11535
11521
  super();
11536
11522
  O(this, "_onInputSubscription");
@@ -11820,7 +11806,7 @@ let fo = class extends me {
11820
11806
  }
11821
11807
  _scrollToFocusNodePosition(e, t) {
11822
11808
  var r;
11823
- const o = (r = this._renderManagerService.getRenderById(e)) == null ? void 0 : r.with(uo);
11809
+ const o = (r = this._renderManagerService.getRenderById(e)) == null ? void 0 : r.with(ho);
11824
11810
  o != null && o.scrollToRange({
11825
11811
  startOffset: t,
11826
11812
  endOffset: t,
@@ -11831,12 +11817,12 @@ let fo = class extends me {
11831
11817
  return cd(this._univerInstanceService, this._renderManagerService);
11832
11818
  }
11833
11819
  };
11834
- fo = wg([
11835
- jn(0, L),
11836
- jn(1, pe),
11837
- jn(2, j(Y)),
11838
- jn(3, T)
11839
- ], fo);
11820
+ po = wg([
11821
+ zn(0, L),
11822
+ zn(1, pe),
11823
+ zn(2, z(Y)),
11824
+ zn(3, T)
11825
+ ], po);
11840
11826
  function Hi(n, e) {
11841
11827
  var o, r;
11842
11828
  let t = null;
@@ -11909,7 +11895,7 @@ var Lg = Object.getOwnPropertyDescriptor, Qg = (n, e, t, o) => {
11909
11895
  (i = n[s]) && (r = i(r) || r);
11910
11896
  return r;
11911
11897
  }, ki = (n, e) => (t, o) => e(t, o, n);
11912
- let po = class extends me {
11898
+ let mo = class extends me {
11913
11899
  constructor(n, e) {
11914
11900
  super(), this._commandService = n, this._componentManager = e, this._initialize();
11915
11901
  }
@@ -11928,15 +11914,15 @@ let po = class extends me {
11928
11914
  _init() {
11929
11915
  }
11930
11916
  };
11931
- po = Qg([
11917
+ mo = Qg([
11932
11918
  ki(0, T),
11933
- ki(1, j(rn))
11934
- ], po);
11919
+ ki(1, z(rn))
11920
+ ], mo);
11935
11921
  var Ug = Object.getOwnPropertyDescriptor, Fg = (n, e, t, o) => {
11936
11922
  for (var r = o > 1 ? void 0 : o ? Ug(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11937
11923
  (i = n[s]) && (r = i(r) || r);
11938
11924
  return r;
11939
- }, zn = (n, e) => (t, o) => e(t, o, n);
11925
+ }, jn = (n, e) => (t, o) => e(t, o, n);
11940
11926
  let yr = class extends me {
11941
11927
  constructor(n, e, t, o, r) {
11942
11928
  super(), this._context = n, this._docSkeletonManagerService = e, this._commandService = t, this._docEventManagerService = o, this._textSelectionManagerService = r, this._initPointerDownObserver(), this._initHoverCursor();
@@ -11965,17 +11951,17 @@ let yr = class extends me {
11965
11951
  }
11966
11952
  };
11967
11953
  yr = Fg([
11968
- zn(1, j(de)),
11969
- zn(2, T),
11970
- zn(3, j(wt)),
11971
- zn(4, j(Y))
11954
+ jn(1, z(de)),
11955
+ jn(2, T),
11956
+ jn(3, z(wt)),
11957
+ jn(4, z(Y))
11972
11958
  ], yr);
11973
11959
  var Hg = Object.getOwnPropertyDescriptor, kg = (n, e, t, o) => {
11974
11960
  for (var r = o > 1 ? void 0 : o ? Hg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11975
11961
  (i = n[s]) && (r = i(r) || r);
11976
11962
  return r;
11977
11963
  }, An = (n, e) => (t, o) => e(t, o, n);
11978
- let mo = class extends Ct {
11964
+ let Eo = class extends Ct {
11979
11965
  constructor(n, e, t, o, r, s) {
11980
11966
  super(), this._context = n, this._commandService = e, this._docClipboardService = t, this._docSelectionRenderService = o, this._contextService = r, this._editorService = s, this._init();
11981
11967
  }
@@ -11986,42 +11972,42 @@ let mo = class extends Ct {
11986
11972
  var n;
11987
11973
  (n = this._docSelectionRenderService) == null || n.onPaste$.pipe(ft(this.dispose$)).subscribe((e) => {
11988
11974
  var a, c, d;
11989
- if (!Po(this._contextService))
11975
+ if (!wo(this._contextService))
11990
11976
  return;
11991
11977
  e.event.preventDefault();
11992
11978
  const t = e.event;
11993
- let o = (a = t.clipboardData) == null ? void 0 : a.getData(ia);
11994
- const r = (c = t.clipboardData) == null ? void 0 : c.getData(aa), s = [...((d = t.clipboardData) == null ? void 0 : d.items) || []].filter((l) => kl.has(l.type)).map((l) => l.getAsFile()).filter((l) => !!l);
11979
+ let o = (a = t.clipboardData) == null ? void 0 : a.getData(aa);
11980
+ const r = (c = t.clipboardData) == null ? void 0 : c.getData(ca), s = [...((d = t.clipboardData) == null ? void 0 : d.items) || []].filter((l) => kl.has(l.type)).map((l) => l.getAsFile()).filter((l) => !!l);
11995
11981
  this._editorService.getEditor(this._context.unitId) && (o != null ? o : "").indexOf("</table>") > -1 && (o = ""), this._docClipboardService.legacyPaste({ html: o, text: r, files: s });
11996
11982
  });
11997
11983
  }
11998
11984
  };
11999
- mo = kg([
11985
+ Eo = kg([
12000
11986
  An(1, T),
12001
11987
  An(2, Lt),
12002
- An(3, j(Re)),
11988
+ An(3, z(Re)),
12003
11989
  An(4, Fr),
12004
11990
  An(5, Ge)
12005
- ], mo);
11991
+ ], Eo);
12006
11992
  var Vg = Object.getOwnPropertyDescriptor, Wg = (n, e, t, o) => {
12007
11993
  for (var r = o > 1 ? void 0 : o ? Vg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
12008
11994
  (i = n[s]) && (r = i(r) || r);
12009
11995
  return r;
12010
11996
  }, Vi = (n, e) => (t, o) => e(t, o, n);
12011
- const jg = [
12012
- Xi,
11997
+ const zg = [
11998
+ Zi,
12013
11999
  Yc,
12014
- bo,
12000
+ xo,
12015
12001
  nt
12016
12002
  ];
12017
12003
  let Or = class extends me {
12018
12004
  constructor(n, e, t) {
12019
- super(), this._context = n, this._contextMenuService = e, this._commandService = t, jg.includes(this._context.unitId) || (this._initPointerDown(), this._initEditChange());
12005
+ super(), this._context = n, this._contextMenuService = e, this._commandService = t, zg.includes(this._context.unitId) || (this._initPointerDown(), this._initEditChange());
12020
12006
  }
12021
12007
  _initPointerDown() {
12022
12008
  var t, o;
12023
12009
  const e = ((o = (t = this._context) == null ? void 0 : t.mainComponent) == null ? void 0 : o.onPointerDown$).subscribeEvent((r) => {
12024
- r.button === 2 && this._contextMenuService.triggerContextMenu(r, no.MAIN_AREA);
12010
+ r.button === 2 && this._contextMenuService.triggerContextMenu(r, oo.MAIN_AREA);
12025
12011
  });
12026
12012
  this.disposeWithMe(e);
12027
12013
  }
@@ -12037,12 +12023,12 @@ Or = Wg([
12037
12023
  Vi(1, Vl),
12038
12024
  Vi(2, T)
12039
12025
  ], Or);
12040
- var zg = Object.getOwnPropertyDescriptor, Gg = (n, e, t, o) => {
12041
- for (var r = o > 1 ? void 0 : o ? zg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
12026
+ var jg = Object.getOwnPropertyDescriptor, Gg = (n, e, t, o) => {
12027
+ for (var r = o > 1 ? void 0 : o ? jg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
12042
12028
  (i = n[s]) && (r = i(r) || r);
12043
12029
  return r;
12044
12030
  }, Gt = (n, e) => (t, o) => e(t, o, n);
12045
- let Eo = class extends me {
12031
+ let Io = class extends me {
12046
12032
  constructor(e, t, o, r, s, i, a) {
12047
12033
  super();
12048
12034
  O(this, "_initialEditors", /* @__PURE__ */ new Set());
@@ -12096,7 +12082,7 @@ let Eo = class extends me {
12096
12082
  "univer-formula-help-param"
12097
12083
  ];
12098
12084
  this.disposeWithMe(
12099
- je(window, "mousedown").subscribe((o) => {
12085
+ ze(window, "mousedown").subscribe((o) => {
12100
12086
  const s = o.target.classList[0] || "";
12101
12087
  Kc(s, e) && o.stopPropagation();
12102
12088
  })
@@ -12109,7 +12095,7 @@ let Eo = class extends me {
12109
12095
  const r = o.getUnitId(), s = this._renderManagerService.getRenderById(r), i = s == null ? void 0 : s.engine.getCanvas().getCanvasEle();
12110
12096
  if (i == null)
12111
12097
  return;
12112
- const a = je(i, "mousedown").subscribe((c) => {
12098
+ const a = ze(i, "mousedown").subscribe((c) => {
12113
12099
  c.stopPropagation();
12114
12100
  });
12115
12101
  t.add(a);
@@ -12134,14 +12120,14 @@ let Eo = class extends me {
12134
12120
  );
12135
12121
  }
12136
12122
  };
12137
- Eo = Gg([
12123
+ Io = Gg([
12138
12124
  Gt(1, L),
12139
12125
  Gt(2, Ge),
12140
12126
  Gt(3, T),
12141
- Gt(4, j(Re)),
12142
- Gt(5, j(de)),
12127
+ Gt(4, z(Re)),
12128
+ Gt(5, z(de)),
12143
12129
  Gt(6, pe)
12144
- ], Eo);
12130
+ ], Io);
12145
12131
  var Yg = Object.getOwnPropertyDescriptor, Kg = (n, e, t, o) => {
12146
12132
  for (var r = o > 1 ? void 0 : o ? Yg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
12147
12133
  (i = n[s]) && (r = i(r) || r);
@@ -12203,9 +12189,9 @@ let Tr = class extends me {
12203
12189
  }
12204
12190
  };
12205
12191
  Tr = Kg([
12206
- Gn(1, j(Re)),
12207
- Gn(2, j(No)),
12208
- Gn(3, j(de)),
12192
+ Gn(1, z(Re)),
12193
+ Gn(2, z(Lo)),
12194
+ Gn(3, z(de)),
12209
12195
  Gn(4, T)
12210
12196
  ], Tr);
12211
12197
  var qg = Object.getOwnPropertyDescriptor, Xg = (n, e, t, o) => {
@@ -12234,7 +12220,7 @@ let Br = class extends me {
12234
12220
  const { unitId: t } = this._context, { event: o, content: r = "", activeRange: s } = e, i = o, a = this._docSkeletonManagerService.getSkeleton();
12235
12221
  if (i.data == null || a == null || s == null)
12236
12222
  return;
12237
- const { segmentId: c } = s, l = this._context.unit.getSelfOrHeaderFooterModel(c).getBody(), A = this._docMenuStyleService.getDefaultStyle(), h = this._docMenuStyleService.getStyleCache(), u = jr((p = l == null ? void 0 : l.customRanges) != null ? p : [], s.endOffset, En.includes(t)), g = Bo(l, s.endOffset, A, h, En.includes(t)), f = zr((m = l == null ? void 0 : l.customDecorations) != null ? m : [], s.endOffset);
12223
+ const { segmentId: c } = s, l = this._context.unit.getSelfOrHeaderFooterModel(c).getBody(), A = this._docMenuStyleService.getDefaultStyle(), h = this._docMenuStyleService.getStyleCache(), u = zr((p = l == null ? void 0 : l.customRanges) != null ? p : [], s.endOffset, En.includes(t)), g = Mo(l, s.endOffset, A, h, En.includes(t)), f = jr((m = l == null ? void 0 : l.customDecorations) != null ? m : [], s.endOffset);
12238
12224
  await this._commandService.executeCommand(Ca.id, {
12239
12225
  unitId: t,
12240
12226
  body: {
@@ -12259,15 +12245,15 @@ let Br = class extends me {
12259
12245
  },
12260
12246
  range: s,
12261
12247
  segmentId: c
12262
- }), r === " " && await this._commandService.executeCommand(Mo.id);
12248
+ }), r === " " && await this._commandService.executeCommand(_o.id);
12263
12249
  });
12264
12250
  }
12265
12251
  };
12266
12252
  Br = Xg([
12267
- Yn(1, j(Re)),
12268
- Yn(2, j(de)),
12253
+ Yn(1, z(Re)),
12254
+ Yn(2, z(de)),
12269
12255
  Yn(3, T),
12270
- Yn(4, j(at))
12256
+ Yn(4, z(at))
12271
12257
  ], Br);
12272
12258
  class ws extends me {
12273
12259
  constructor(e) {
@@ -12302,7 +12288,7 @@ let Mr = class extends me {
12302
12288
  _initResize() {
12303
12289
  this.disposeWithMe(
12304
12290
  Mt(this._context.engine.onTransformChange$).pipe(
12305
- oo((n) => n.type === oa.resize),
12291
+ ro((n) => n.type === ra.resize),
12306
12292
  Rn(0, Yl)
12307
12293
  ).subscribe(() => {
12308
12294
  this._docPageLayoutService.calculatePagePosition(), this._textSelectionManagerService.refreshSelection();
@@ -12311,8 +12297,8 @@ let Mr = class extends me {
12311
12297
  }
12312
12298
  };
12313
12299
  Mr = Jg([
12314
- Wi(1, j(ws)),
12315
- Wi(2, j(Y))
12300
+ Wi(1, z(ws)),
12301
+ Wi(2, z(Y))
12316
12302
  ], Mr);
12317
12303
  var $g = Object.getOwnPropertyDescriptor, ef = (n, e, t, o) => {
12318
12304
  for (var r = o > 1 ? void 0 : o ? $g(e, t) : e, s = n.length - 1, i; s >= 0; s--)
@@ -12444,9 +12430,9 @@ _r = ef([
12444
12430
  Yt(1, T),
12445
12431
  Yt(2, Ge),
12446
12432
  Yt(3, L),
12447
- Yt(4, j(Re)),
12448
- Yt(5, j(de)),
12449
- Yt(6, j(Y))
12433
+ Yt(4, z(Re)),
12434
+ Yt(5, z(de)),
12435
+ Yt(6, z(Y))
12450
12436
  ], _r);
12451
12437
  var tf = Object.getOwnPropertyDescriptor, nf = (n, e, t, o) => {
12452
12438
  for (var r = o > 1 ? void 0 : o ? tf(e, t) : e, s = n.length - 1, i; s >= 0; s--)
@@ -12457,7 +12443,7 @@ let Dr = class extends me {
12457
12443
  constructor(e, t, o, r, s, i, a, c, d) {
12458
12444
  super();
12459
12445
  O(this, "_isSheetEditor", !1);
12460
- this._context = e, this._contextService = t, this._docSkeletonManagerService = o, this._univerInstanceService = r, this._commandService = s, this._textSelectionManagerService = i, this._editorService = a, this._docPageLayoutService = c, this._renderManagerService = d, this._initSkeletonListener(), this._initCommandExecutedListener(), this._initRenderRefresher(), this._isSheetEditor = this._context.unitId === bo;
12446
+ this._context = e, this._contextService = t, this._docSkeletonManagerService = o, this._univerInstanceService = r, this._commandService = s, this._textSelectionManagerService = i, this._editorService = a, this._docPageLayoutService = c, this._renderManagerService = d, this._initSkeletonListener(), this._initCommandExecutedListener(), this._initRenderRefresher(), this._isSheetEditor = this._context.unitId === xo;
12461
12447
  const l = this._univerInstanceService.getCurrentUnitOfType(_.UNIVER_SHEET), A = l && this._renderManagerService.getRenderById(l.getUnitId());
12462
12448
  setTimeout(() => this.updateViewZoom(A && this._isSheetEditor ? A.scene.scaleX : 1, !0), 20), Rt(this._context.unitId) || this._initZoomEventListener();
12463
12449
  }
@@ -12507,7 +12493,7 @@ let Dr = class extends me {
12507
12493
  }
12508
12494
  })), this.disposeWithMe(
12509
12495
  this._commandService.beforeCommandExecuted((t) => {
12510
- t.id === ko.id && this._commandService.executeCommand(Xn.id, {
12496
+ t.id === Vo.id && this._commandService.executeCommand(Xn.id, {
12511
12497
  zoomRatio: 1,
12512
12498
  unitId: this._context.unitId
12513
12499
  });
@@ -12541,15 +12527,15 @@ let Dr = class extends me {
12541
12527
  };
12542
12528
  Dr = nf([
12543
12529
  ht(1, Fr),
12544
- ht(2, j(de)),
12530
+ ht(2, z(de)),
12545
12531
  ht(3, L),
12546
12532
  ht(4, T),
12547
- ht(5, j(Y)),
12533
+ ht(5, z(Y)),
12548
12534
  ht(6, Ge),
12549
- ht(7, j(ws)),
12535
+ ht(7, z(ws)),
12550
12536
  ht(8, pe)
12551
12537
  ], Dr);
12552
- const of = Ji("PRINTING_COMPONENT_COLLECT"), rf = Ji("PRINTING_DOM_COLLECT");
12538
+ const of = $i("PRINTING_COMPONENT_COLLECT"), rf = $i("PRINTING_DOM_COLLECT");
12553
12539
  class sf extends me {
12554
12540
  constructor() {
12555
12541
  super();
@@ -12578,8 +12564,8 @@ var af = Object.getOwnPropertyDescriptor, cf = (n, e, t, o) => {
12578
12564
  (i = n[s]) && (r = i(r) || r);
12579
12565
  return r;
12580
12566
  }, un = (n, e) => (t, o) => e(t, o, n);
12581
- const ji = 300;
12582
- let Io = class extends Ct {
12567
+ const zi = 300;
12568
+ let So = class extends Ct {
12583
12569
  constructor(e, t, o, r, s) {
12584
12570
  super();
12585
12571
  O(this, "_docStateChange$", new Fe(null));
@@ -12623,7 +12609,7 @@ let Io = class extends Ct {
12623
12609
  var a;
12624
12610
  if (e == null)
12625
12611
  return;
12626
- const { isCompositionEnd: t, isSync: o, syncer: r, ...s } = e, i = (a = this._renderManagerService.getRenderById(o ? r : e.unitId)) == null ? void 0 : a.with(No);
12612
+ const { isCompositionEnd: t, isSync: o, syncer: r, ...s } = e, i = (a = this._renderManagerService.getRenderById(o ? r : e.unitId)) == null ? void 0 : a.with(Lo);
12627
12613
  if (i != null) {
12628
12614
  if (t) {
12629
12615
  const c = i.fetchComposedUndoRedoMutationParams();
@@ -12648,9 +12634,9 @@ let Io = class extends Ct {
12648
12634
  a.set(r, [e]);
12649
12635
  i ? t === "history" ? (this._historyTimer && clearTimeout(this._historyTimer), this._historyTimer = setTimeout(() => {
12650
12636
  c(r);
12651
- }, ji)) : (this._changeStateCacheTimer && clearTimeout(this._changeStateCacheTimer), this._changeStateCacheTimer = setTimeout(() => {
12637
+ }, zi)) : (this._changeStateCacheTimer && clearTimeout(this._changeStateCacheTimer), this._changeStateCacheTimer = setTimeout(() => {
12652
12638
  c(r);
12653
- }, ji)) : c(r);
12639
+ }, zi)) : c(r);
12654
12640
  }
12655
12641
  _pushHistory(e) {
12656
12642
  const t = this._undoRedoService, o = this._historyStateCache.get(e);
@@ -12698,20 +12684,20 @@ let Io = class extends Ct {
12698
12684
  t.length = 0, this._docStateChange$.next(u);
12699
12685
  }
12700
12686
  };
12701
- Io = cf([
12702
- un(0, j(xo)),
12687
+ So = cf([
12688
+ un(0, z(yo)),
12703
12689
  un(1, T),
12704
12690
  un(2, L),
12705
- un(3, j(tl)),
12691
+ un(3, z(tl)),
12706
12692
  un(4, pe)
12707
- ], Io);
12693
+ ], So);
12708
12694
  var lf = Object.getOwnPropertyDescriptor, df = (n, e, t, o) => {
12709
12695
  for (var r = o > 1 ? void 0 : o ? lf(e, t) : e, s = n.length - 1, i; s >= 0; s--)
12710
12696
  (i = n[s]) && (r = i(r) || r);
12711
12697
  return r;
12712
- }, zi = (n, e) => (t, o) => e(t, o, n);
12698
+ }, ji = (n, e) => (t, o) => e(t, o, n);
12713
12699
  const Gi = "univer-doc-main-canvas";
12714
- let So = class extends Ct {
12700
+ let vo = class extends Ct {
12715
12701
  constructor(n, e) {
12716
12702
  super(), this._instanceSrv = n, this._renderManagerService = e, this._init();
12717
12703
  }
@@ -12733,16 +12719,16 @@ let So = class extends Ct {
12733
12719
  this._renderManagerService.removeRender(e);
12734
12720
  }
12735
12721
  };
12736
- So = df([
12737
- zi(0, L),
12738
- zi(1, pe)
12739
- ], So);
12722
+ vo = df([
12723
+ ji(0, L),
12724
+ ji(1, pe)
12725
+ ], vo);
12740
12726
  const Af = {
12741
12727
  id: bn.id,
12742
12728
  preconditions: ah,
12743
12729
  binding: q.ENTER
12744
12730
  }, uf = {
12745
- id: Do.id,
12731
+ id: Po.id,
12746
12732
  preconditions: Se,
12747
12733
  binding: q.BACKSPACE
12748
12734
  }, hf = {
@@ -12824,29 +12810,29 @@ let Pr = class extends Zc {
12824
12810
  Pi,
12825
12811
  this._config
12826
12812
  );
12827
- i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Vo, a), this._initDependencies(e), this._initializeShortcut(), this._initCommand();
12813
+ i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Wo, a), this._initDependencies(e), this._initializeShortcut(), this._initCommand();
12828
12814
  }
12829
12815
  onReady() {
12830
12816
  this._initRenderBasics(), this._markDocAsFocused(), Vs(this._injector, [
12831
- [Io],
12832
- [So]
12817
+ [So],
12818
+ [vo]
12833
12819
  ]);
12834
12820
  }
12835
12821
  onRendered() {
12836
12822
  this._initUI(), this._initRenderModules(), Vs(this._injector, [
12837
- [go],
12838
12823
  [fo],
12839
- [tn],
12840
12824
  [po],
12825
+ [tn],
12826
+ [mo],
12841
12827
  // FIXME: LifecycleStages.Rendered must be used, otherwise the menu cannot be added to the DOM, but the sheet ui
12842
12828
  // plugin can be added in LifecycleStages.Ready
12843
- [Ao]
12829
+ [uo]
12844
12830
  ]);
12845
12831
  }
12846
12832
  // eslint-disable-next-line max-lines-per-function
12847
12833
  _initCommand() {
12848
12834
  [
12849
- Do,
12835
+ Po,
12850
12836
  xa,
12851
12837
  Qt,
12852
12838
  Ut,
@@ -12871,14 +12857,14 @@ let Pr = class extends Zc {
12871
12857
  On,
12872
12858
  yn,
12873
12859
  Fn,
12874
- Qo,
12875
12860
  Uo,
12876
12861
  Fo,
12877
- lt,
12878
12862
  Ho,
12879
- wo,
12880
- ja,
12863
+ lt,
12864
+ ko,
12865
+ No,
12881
12866
  za,
12867
+ ja,
12882
12868
  Rs,
12883
12869
  bs,
12884
12870
  SA,
@@ -12890,15 +12876,15 @@ let Pr = class extends Zc {
12890
12876
  Ms,
12891
12877
  Ga,
12892
12878
  Jt,
12893
- Mo,
12879
+ _o,
12894
12880
  bn,
12895
12881
  gr,
12896
- Lo,
12897
- so,
12882
+ Qo,
12883
+ io,
12898
12884
  Na,
12899
12885
  La,
12900
12886
  Ba,
12901
- ko,
12887
+ Vo,
12902
12888
  rt,
12903
12889
  va,
12904
12890
  $t,
@@ -12923,7 +12909,7 @@ let Pr = class extends Zc {
12923
12909
  gs,
12924
12910
  fs,
12925
12911
  ps,
12926
- io,
12912
+ ao,
12927
12913
  Ua,
12928
12914
  Fa,
12929
12915
  ls,
@@ -12934,7 +12920,7 @@ let Pr = class extends Zc {
12934
12920
  _s
12935
12921
  ].forEach((n) => {
12936
12922
  this.disposeWithMe(this._commandService.registerCommand(n));
12937
- }), [ro, rs, is].forEach((n) => this.disposeWithMe(this._commandService.registerMultipleCommand(n)));
12923
+ }), [so, rs, is].forEach((n) => this.disposeWithMe(this._commandService.registerMultipleCommand(n)));
12938
12924
  }
12939
12925
  _initializeShortcut() {
12940
12926
  [
@@ -12952,25 +12938,25 @@ let Pr = class extends Zc {
12952
12938
  Af,
12953
12939
  lh
12954
12940
  ].forEach((n) => {
12955
- this._injector.get(To).registerShortcut(n);
12941
+ this._injector.get(Bo).registerShortcut(n);
12956
12942
  });
12957
12943
  }
12958
12944
  _initDependencies(n) {
12959
12945
  $c([
12960
12946
  [sf],
12961
- [mo],
12962
12947
  [Eo],
12963
- [Ao],
12964
- [go],
12965
- [po],
12948
+ [Io],
12949
+ [uo],
12966
12950
  [fo],
12967
- [ho],
12951
+ [mo],
12952
+ [po],
12953
+ [go],
12968
12954
  [tn],
12969
12955
  [Ge, { useClass: Sr }],
12970
12956
  [Lt, { useClass: ur }],
12971
12957
  [Bn],
12958
+ [vo],
12972
12959
  [So],
12973
- [Io],
12974
12960
  [Pt],
12975
12961
  [at]
12976
12962
  ], this._config.override).forEach((t) => n.add(t));
@@ -12987,7 +12973,7 @@ let Pr = class extends Zc {
12987
12973
  }
12988
12974
  }
12989
12975
  _initUI() {
12990
- this._injector.get(ho);
12976
+ this._injector.get(go);
12991
12977
  }
12992
12978
  _initRenderBasics() {
12993
12979
  [
@@ -12995,7 +12981,7 @@ let Pr = class extends Zc {
12995
12981
  [Re],
12996
12982
  [nl],
12997
12983
  [ws],
12998
- [No],
12984
+ [Lo],
12999
12985
  [br],
13000
12986
  [Dr]
13001
12987
  ].forEach((n) => {
@@ -13005,18 +12991,18 @@ let Pr = class extends Zc {
13005
12991
  _initRenderModules() {
13006
12992
  [
13007
12993
  [wt],
13008
- [co],
13009
12994
  [lo],
13010
- [uo],
12995
+ [Ao],
12996
+ [ho],
13011
12997
  [_r],
13012
12998
  [Cr],
13013
12999
  [Mr],
13014
13000
  [Or],
13015
13001
  [yr],
13016
- [mo],
13002
+ [Eo],
13017
13003
  [Br],
13018
13004
  [Tr],
13019
- [Eo]
13005
+ [Io]
13020
13006
  ].forEach((n) => {
13021
13007
  this._renderManagerSrv.registerRenderModule(_.UNIVER_DOC, n);
13022
13008
  });
@@ -13025,14 +13011,14 @@ let Pr = class extends Zc {
13025
13011
  Of(Pr, "pluginName", sd);
13026
13012
  Pr = yf([
13027
13013
  Xc(Il),
13028
- hn(1, j(Dn)),
13014
+ hn(1, z(Dn)),
13029
13015
  hn(2, pe),
13030
13016
  hn(3, T),
13031
13017
  hn(4, Qr),
13032
13018
  hn(5, Vr)
13033
13019
  ], Pr);
13034
13020
  function Tf(n, e, t) {
13035
- const o = J(T), r = J(To), s = Te(() => ge(4), []);
13021
+ const o = J(T), r = J(Bo), s = Te(() => ge(4), []);
13036
13022
  Ce(() => {
13037
13023
  if (!t || !n || !e)
13038
13024
  return;
@@ -13050,7 +13036,7 @@ function Tf(n, e, t) {
13050
13036
  preconditions: () => !0,
13051
13037
  priority: 901,
13052
13038
  staticParameters: {
13053
- eventType: ra.Keyboard,
13039
+ eventType: sa.Keyboard,
13054
13040
  keyCode: d.keyCode,
13055
13041
  metaKey: d.metaKey
13056
13042
  }
@@ -13159,7 +13145,7 @@ function Mf(n) {
13159
13145
  }, []), a;
13160
13146
  }
13161
13147
  const _f = (n, e, t, o) => {
13162
- const r = J(T), s = J(To), i = ke(e);
13148
+ const r = J(T), s = J(Bo), i = ke(e);
13163
13149
  i.current = e;
13164
13150
  const a = ke(o);
13165
13151
  a.current = o, Ce(() => {
@@ -13207,7 +13193,7 @@ const _f = (n, e, t, o) => {
13207
13193
  preconditions: () => !0,
13208
13194
  priority: 900,
13209
13195
  staticParameters: {
13210
- eventType: ra.Keyboard,
13196
+ eventType: sa.Keyboard,
13211
13197
  keyCode: u
13212
13198
  }
13213
13199
  })).forEach((u) => {
@@ -13226,7 +13212,7 @@ function Df(n, e) {
13226
13212
  if (r.id === X.id) {
13227
13213
  if (r.params.unitId !== n.getEditorId()) return;
13228
13214
  const c = n.getDocumentData();
13229
- e(c, to((i = (s = c.body) == null ? void 0 : s.dataStream) != null ? i : ""));
13215
+ e(c, no((i = (s = c.body) == null ? void 0 : s.dataStream) != null ? i : ""));
13230
13216
  }
13231
13217
  });
13232
13218
  return () => {
@@ -13276,7 +13262,7 @@ const Zf = (n) => {
13276
13262
  const U = mn((k) => {
13277
13263
  var ae, oe;
13278
13264
  const ne = y == null ? void 0 : y.with(de), ie = ne == null ? void 0 : ne.getSkeleton().getActualSize();
13279
- ie && (A == null || A(ie.actualHeight), E(Math.max(u, Math.min(ie.actualHeight + 10, g)))), h == null || h(k, to((oe = (ae = k.body) == null ? void 0 : ae.dataStream) != null ? oe : "")), $();
13265
+ ie && (A == null || A(ie.actualHeight), E(Math.max(u, Math.min(ie.actualHeight + 10, g)))), h == null || h(k, no((oe = (ae = k.body) == null ? void 0 : ae.dataStream) != null ? oe : "")), $();
13280
13266
  });
13281
13267
  return Ce(() => {
13282
13268
  var ne, ie;
@@ -13289,7 +13275,7 @@ const Zf = (n) => {
13289
13275
  }, [C]), et(C == null ? void 0 : C.blur$), et(C == null ? void 0 : C.focus$), Ce(() => {
13290
13276
  var ne, ie;
13291
13277
  const k = C == null ? void 0 : C.getDocumentData();
13292
- S == null || S(F, to((ie = (ne = k == null ? void 0 : k.body) == null ? void 0 : ne.dataStream) != null ? ie : ""));
13278
+ S == null || S(F, no((ie = (ne = k == null ? void 0 : k.body) == null ? void 0 : ne.dataStream) != null ? ie : ""));
13293
13279
  }, [F, S]), Ce(() => {
13294
13280
  const k = (ie) => {
13295
13281
  var oe, he;
@@ -13303,7 +13289,7 @@ const Zf = (n) => {
13303
13289
  }, [C, x, I, v]), _f(F && a, !1, C), Tf(F, i, C), Df(C, U), /* @__PURE__ */ Q("div", { className: e, style: c, children: /* @__PURE__ */ re(
13304
13290
  "div",
13305
13291
  {
13306
- className: ze("univer-relative univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-around univer-gap-2 univer-rounded-md univer-pb-0.5 univer-pl-1.5 univer-pr-2 univer-pt-1.5", Nn, {
13292
+ className: je("univer-relative univer-box-border univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-around univer-gap-2 univer-rounded-md univer-pb-0.5 univer-pl-1.5 univer-pr-2 univer-pt-1.5", Nn, {
13307
13293
  "univer-border-primary-500": F
13308
13294
  }),
13309
13295
  style: { height: R },
@@ -13330,25 +13316,25 @@ const Zf = (n) => {
13330
13316
  ) });
13331
13317
  };
13332
13318
  export {
13333
- Mo as AfterSpaceCommand,
13334
- Uo as AlignCenterCommand,
13335
- Ho as AlignJustifyCommand,
13336
- Qo as AlignLeftCommand,
13319
+ _o as AfterSpaceCommand,
13320
+ Fo as AlignCenterCommand,
13321
+ ko as AlignJustifyCommand,
13322
+ Uo as AlignLeftCommand,
13337
13323
  lt as AlignOperationCommand,
13338
- Fo as AlignRightCommand,
13324
+ Ho as AlignRightCommand,
13339
13325
  Gr as BreakLineCommand,
13340
13326
  yn as BulletListCommand,
13341
13327
  gr as ChangeListNestingLevelCommand,
13342
13328
  qn as ChangeListNestingLevelType,
13343
- Lo as ChangeListTypeCommand,
13344
- so as CheckListCommand,
13329
+ Qo as ChangeListTypeCommand,
13330
+ io as CheckListCommand,
13345
13331
  Xd as CoverContentCommand,
13346
- ja as CreateDocTableCommand,
13332
+ za as CreateDocTableCommand,
13347
13333
  $t as CutContentCommand,
13348
13334
  id as DOCS_COMPONENT_BACKGROUND_LAYER_INDEX,
13349
13335
  $s as DOCS_COMPONENT_DEFAULT_Z_INDEX,
13350
13336
  ad as DOCS_COMPONENT_HEADER_LAYER_INDEX,
13351
- zo as DOCS_COMPONENT_MAIN_LAYER_INDEX,
13337
+ Go as DOCS_COMPONENT_MAIN_LAYER_INDEX,
13352
13338
  $e as DOCS_VIEW_KEY,
13353
13339
  sd as DOC_UI_PLUGIN_NAME,
13354
13340
  Ti as DOC_VERTICAL_PADDING,
@@ -13356,22 +13342,22 @@ export {
13356
13342
  od as DefaultToolbarConfig,
13357
13343
  xn as DeleteCommand,
13358
13344
  Zr as DeleteCustomBlockCommand,
13359
- Do as DeleteLeftCommand,
13345
+ Po as DeleteLeftCommand,
13360
13346
  xa as DeleteRightCommand,
13361
13347
  Pt as DocAutoFormatService,
13362
- uo as DocBackScrollRenderController,
13348
+ ho as DocBackScrollRenderController,
13363
13349
  Bn as DocCanvasPopManagerService,
13364
- ro as DocCopyCommand,
13350
+ so as DocCopyCommand,
13365
13351
  Os as DocCreateTableOperation,
13366
13352
  rs as DocCutCommand,
13367
13353
  wt as DocEventManagerService,
13368
- No as DocIMEInputManagerService,
13354
+ Lo as DocIMEInputManagerService,
13369
13355
  is as DocPasteCommand,
13370
13356
  sf as DocPrintInterceptorService,
13371
13357
  br as DocRenderController,
13372
13358
  Ta as DocSelectAllCommand,
13373
13359
  Re as DocSelectionRenderService,
13374
- Io as DocStateChangeManagerService,
13360
+ So as DocStateChangeManagerService,
13375
13361
  Ss as DocTableDeleteColumnsCommand,
13376
13362
  Is as DocTableDeleteRowsCommand,
13377
13363
  Hn as DocTableDeleteTableCommand,
@@ -13380,16 +13366,16 @@ export {
13380
13366
  ys as DocTableInsertColumnRightCommand,
13381
13367
  Rs as DocTableInsertRowAboveCommand,
13382
13368
  bs as DocTableInsertRowBellowCommand,
13383
- za as DocTableInsertRowCommand,
13369
+ ja as DocTableInsertRowCommand,
13384
13370
  Ga as DocTableTabCommand,
13385
- Ao as DocUIController,
13386
- So as DocsRenderService,
13371
+ uo as DocUIController,
13372
+ vo as DocsRenderService,
13387
13373
  ug as DocsUIMenuSchema,
13388
13374
  HA as Editor,
13389
13375
  _d as EditorInsertTextCommandId,
13390
13376
  Sr as EditorService,
13391
13377
  bn as EnterCommand,
13392
- wo as HorizontalLineCommand,
13378
+ No as HorizontalLineCommand,
13393
13379
  Lt as IDocClipboardService,
13394
13380
  Ge as IEditorService,
13395
13381
  Ba as IMEInputCommand,
@@ -13400,7 +13386,7 @@ export {
13400
13386
  Jr as MergeTwoParagraphCommand,
13401
13387
  St as MoveCursorOperation,
13402
13388
  vt as MoveSelectionOperation,
13403
- jf as NORMAL_TEXT_SELECTION_PLUGIN_NAME,
13389
+ zf as NORMAL_TEXT_SELECTION_PLUGIN_NAME,
13404
13390
  It as NodePositionConvertToCursor,
13405
13391
  Va as NodePositionConvertToRectRange,
13406
13392
  On as OrderListCommand,
@@ -13429,7 +13415,7 @@ export {
13429
13415
  mt as SetInlineFormatTextColorCommand,
13430
13416
  Ft as SetInlineFormatUnderlineCommand,
13431
13417
  Xe as SetParagraphNamedStyleCommand,
13432
- ko as SwitchDocModeCommand,
13418
+ Vo as SwitchDocModeCommand,
13433
13419
  mr as TEXT_RANGE_LAYER_INDEX,
13434
13420
  Jt as TabCommand,
13435
13421
  Zt as TextRange,
@@ -13439,9 +13425,9 @@ export {
13439
13425
  We as VIEWPORT_KEY,
13440
13426
  Gf as addCustomDecorationBySelectionFactory,
13441
13427
  ld as addCustomDecorationFactory,
13442
- nr as calcDocRangePositions,
13428
+ or as calcDocRangePositions,
13443
13429
  Wd as convertBodyToHtml,
13444
- Jo as convertPositionsToRectRanges,
13430
+ $o as convertPositionsToRectRanges,
13445
13431
  Yf as deleteCustomDecorationFactory,
13446
13432
  qf as docDrawingPositionToTransform,
13447
13433
  Ea as genTableSource,
@@ -13453,7 +13439,7 @@ export {
13453
13439
  bd as getCustomBlockIdsInSelections,
13454
13440
  Md as getCutActionsFromDocRanges,
13455
13441
  cd as getDocObject,
13456
- zf as getDocObjectById,
13442
+ jf as getDocObjectById,
13457
13443
  Kr as getEmptyTableCell,
13458
13444
  qr as getEmptyTableRow,
13459
13445
  Es as getLineBounding,