@univerjs/sheets-drawing-ui 0.5.0-nightly.202411111606 → 0.5.0-nightly.202411120616

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,20 +1,20 @@
1
- var gn = Object.defineProperty;
2
- var mn = (i, e, n) => e in i ? gn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
- var V = (i, e, n) => mn(i, typeof e != "symbol" ? e + "" : e, n);
4
- import { CommandType as H, ICommandService as W, IUndoRedoService as ue, sequenceExecute as It, LocaleService as We, IUniverInstanceService as fe, useDependency as oe, Inject as x, Injector as Ct, IContextService as Rt, RxDisposable as fn, UniverInstanceType as Y, connectInjector as pn, toDisposable as wn, FOCUSING_COMMON_DRAWINGS as me, Disposable as re, Direction as te, FOCUSING_FX_BAR_EDITOR as _n, EDITOR_ACTIVATED as vn, FOCUSING_PANEL_EDITOR as Sn, Tools as ge, UserManagerService as In, IPermissionService as Cn, Rectangle as Rn, LifecycleService as Dn, LifecycleStages as Mn, DisposableCollection as bn, fromEventSubject as yn, generateRandomId as On, DependentOn as Pn, Plugin as Tn, registerDependencies as En, touchDependencies as Xe, IConfigService as Un } from "@univerjs/core";
5
- import { IDrawingManagerService as K, IImageIoService as Dt, DrawingTypeEnum as k, ArrangeTypeEnum as ve, DRAWING_IMAGE_ALLOW_IMAGE_LIST as An, DRAWING_IMAGE_COUNT_LIMIT as mt, ImageUploadStatusType as He, DRAWING_IMAGE_ALLOW_SIZE as Nn, getImageSize as jn, DRAWING_IMAGE_WIDTH_LIMIT as ft, DRAWING_IMAGE_HEIGHT_LIMIT as pt, getDrawingShapeKeyByDrawingSearch as ze, UniverDrawingPlugin as xn } from "@univerjs/drawing";
6
- import { ImageCropperObject as Ln, COMPONENT_IMAGE_POPUP_MENU as $n, OpenImageCropOperation as Bn, ImageResetSizeOperation as Wn, DrawingCommonPanel as Gn, DrawingRenderService as Vn, UniverDrawingUIPlugin as kn } from "@univerjs/drawing-ui";
7
- import { IRenderManagerService as J, precisionTo as ne, getGroupState as Yn, transformObjectOutOfGroup as Fn, RENDER_CLASS_TYPE as de, Rect as wt, ObjectType as Xn, DRAWING_OBJECT_LAYER_INDEX as Hn, SHEET_VIEWPORT_KEY as zn } from "@univerjs/engine-render";
8
- import { ISheetDrawingService as F, SetDrawingApplyMutation as P, DrawingApplyType as T, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Kn } from "@univerjs/sheets-drawing";
9
- import { SheetCanvasPopManagerService as Jn, attachRangeWithCoord as Te, ISheetSelectionRenderService as pe, SheetSkeletonManagerService as q, getCurrentRangeDisable$ as Zn, COPY_TYPE as _t, PREDEFINED_HOOK_NAME as Se, virtualizeDiscreteRanges as qn, ISheetClipboardService as Qn, SheetPrintInterceptorService as er, VIEWPORT_KEY as tr, SetZoomRatioOperation as nr } from "@univerjs/sheets-ui";
10
- import { ISidebarService as rr, IUIPartsService as ir, BuiltInUIPart as sr, ILocalFileService as or, IMessageService as ar, MenuItemType as Mt, getMenuHiddenObservable as bt, RibbonStartGroup as cr, KeyCode as le, ComponentManager as dr, IMenuManagerService as lr, IShortcutService as ur, CanvasFloatDomService as hr } from "@univerjs/ui";
11
- import { takeUntil as vt, combineLatest as Ie, map as Ee, filter as ae, distinctUntilChanged as Ce, Subject as Ke, take as gr, BehaviorSubject as mr, switchMap as fr } from "rxjs";
12
- import { SheetInterceptorService as at, getSheetCommandTarget as ce, SheetsSelectionsService as pr, WorkbookEditablePermission as tt, WorksheetEditPermission as Pe, RangeProtectionPermissionEditPoint as wr, WorkbookViewPermission as St, WorksheetViewPermission as Je, InsertRowCommand as yt, InsertColCommand as Ot, RemoveRowCommand as Pt, RemoveColCommand as Tt, DeleteRangeMoveLeftCommand as Et, DeleteRangeMoveUpCommand as Ut, InsertRangeMoveDownCommand as At, InsertRangeMoveRightCommand as Nt, DeltaRowHeightCommand as nt, SetRowHeightCommand as rt, DeltaColumnWidthCommand as jt, SetColWidthCommand as xt, SetRowHiddenCommand as Lt, SetSpecificRowsVisibleCommand as $t, SetSpecificColsVisibleCommand as Bt, SetColHiddenCommand as Wt, MoveColsCommand as Gt, MoveRowsCommand as Vt, MoveRangeCommand as kt, SetRowVisibleMutation as _r, SetRowHiddenMutation as vr, SetColVisibleMutation as Sr, SetColHiddenMutation as Ir, SetWorksheetRowHeightMutation as Cr, SetWorksheetColWidthMutation as Rr, SetWorksheetActiveOperation as Dr, SetFrozenMutation as Mr } from "@univerjs/sheets";
13
- import Yt, { useEffect as ct, forwardRef as Ft, useRef as br, createElement as Xt, useState as it } from "react";
14
- import { MessageType as Re, RadioGroup as yr, Radio as Ze } from "@univerjs/design";
15
- const Or = "sheets-drawing-ui.config", Pr = {}, j = {
1
+ var mn = Object.defineProperty;
2
+ var fn = (i, e, n) => e in i ? mn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n;
3
+ var G = (i, e, n) => fn(i, typeof e != "symbol" ? e + "" : e, n);
4
+ import { CommandType as X, ICommandService as W, IUndoRedoService as he, sequenceExecute as Ct, LocaleService as Ge, IUniverInstanceService as pe, useDependency as oe, Inject as x, Injector as Rt, IContextService as Dt, RxDisposable as pn, UniverInstanceType as k, connectInjector as wn, toDisposable as _n, FOCUSING_COMMON_DRAWINGS as fe, Disposable as re, Direction as te, FOCUSING_FX_BAR_EDITOR as vn, EDITOR_ACTIVATED as Sn, FOCUSING_PANEL_EDITOR as In, Tools as me, UserManagerService as Cn, IPermissionService as Rn, Rectangle as Dn, LifecycleService as Mn, LifecycleStages as bn, DisposableCollection as yn, fromEventSubject as On, generateRandomId as Pn, DependentOn as Tn, Plugin as En, registerDependencies as Un, touchDependencies as He, IConfigService as An } from "@univerjs/core";
5
+ import { IDrawingManagerService as z, IImageIoService as Mt, DrawingTypeEnum as V, ArrangeTypeEnum as Se, DRAWING_IMAGE_ALLOW_IMAGE_LIST as Nn, DRAWING_IMAGE_COUNT_LIMIT as ft, ImageUploadStatusType as ze, DRAWING_IMAGE_ALLOW_SIZE as jn, getImageSize as xn, DRAWING_IMAGE_WIDTH_LIMIT as pt, DRAWING_IMAGE_HEIGHT_LIMIT as wt, getDrawingShapeKeyByDrawingSearch as Ke, UniverDrawingPlugin as Ln } from "@univerjs/drawing";
6
+ import { ImageCropperObject as $n, COMPONENT_IMAGE_POPUP_MENU as Bn, OpenImageCropOperation as Wn, ImageResetSizeOperation as Gn, DrawingCommonPanel as Vn, DrawingRenderService as kn, UniverDrawingUIPlugin as Yn } from "@univerjs/drawing-ui";
7
+ import { IRenderManagerService as J, precisionTo as ne, getGroupState as Fn, transformObjectOutOfGroup as Xn, RENDER_CLASS_TYPE as le, Rect as _t, ObjectType as Hn, DRAWING_OBJECT_LAYER_INDEX as zn, copyPointEvent as Kn, SHEET_VIEWPORT_KEY as Jn } from "@univerjs/engine-render";
8
+ import { ISheetDrawingService as Y, SetDrawingApplyMutation as P, DrawingApplyType as T, SheetDrawingAnchorType as y, UniverSheetsDrawingPlugin as Zn } from "@univerjs/sheets-drawing";
9
+ import { SheetCanvasPopManagerService as qn, attachRangeWithCoord as Ee, ISheetSelectionRenderService as we, SheetSkeletonManagerService as q, getCurrentRangeDisable$ as Qn, COPY_TYPE as vt, PREDEFINED_HOOK_NAME as Ie, virtualizeDiscreteRanges as er, ISheetClipboardService as tr, SheetPrintInterceptorService as nr, VIEWPORT_KEY as rr, SetZoomRatioOperation as ir } from "@univerjs/sheets-ui";
10
+ import { ISidebarService as sr, IUIPartsService as or, BuiltInUIPart as ar, ILocalFileService as cr, IMessageService as dr, MenuItemType as bt, getMenuHiddenObservable as yt, RibbonStartGroup as lr, KeyCode as ue, ComponentManager as ur, IMenuManagerService as hr, IShortcutService as gr, CanvasFloatDomService as mr } from "@univerjs/ui";
11
+ import { takeUntil as St, combineLatest as Ce, map as Ue, filter as ae, distinctUntilChanged as Re, Subject as Je, take as fr, BehaviorSubject as pr, switchMap as wr } from "rxjs";
12
+ import { SheetInterceptorService as ct, getSheetCommandTarget as ce, SheetsSelectionsService as _r, WorkbookEditablePermission as nt, WorksheetEditPermission as Te, RangeProtectionPermissionEditPoint as vr, WorkbookViewPermission as It, WorksheetViewPermission as Ze, InsertRowCommand as Ot, InsertColCommand as Pt, RemoveRowCommand as Tt, RemoveColCommand as Et, DeleteRangeMoveLeftCommand as Ut, DeleteRangeMoveUpCommand as At, InsertRangeMoveDownCommand as Nt, InsertRangeMoveRightCommand as jt, DeltaRowHeightCommand as rt, SetRowHeightCommand as it, DeltaColumnWidthCommand as xt, SetColWidthCommand as Lt, SetRowHiddenCommand as $t, SetSpecificRowsVisibleCommand as Bt, SetSpecificColsVisibleCommand as Wt, SetColHiddenCommand as Gt, MoveColsCommand as Vt, MoveRowsCommand as kt, MoveRangeCommand as Yt, SetRowVisibleMutation as Sr, SetRowHiddenMutation as Ir, SetColVisibleMutation as Cr, SetColHiddenMutation as Rr, SetWorksheetRowHeightMutation as Dr, SetWorksheetColWidthMutation as Mr, SetWorksheetActiveOperation as br, SetFrozenMutation as yr } from "@univerjs/sheets";
13
+ import Ft, { useEffect as dt, forwardRef as Xt, useRef as Or, createElement as Ht, useState as st } from "react";
14
+ import { MessageType as De, RadioGroup as Pr, Radio as qe } from "@univerjs/design";
15
+ const Tr = "sheets-drawing-ui.config", Er = {}, j = {
16
16
  id: "sheet.operation.clear-drawing-transformer",
17
- type: H.MUTATION,
17
+ type: X.MUTATION,
18
18
  handler: (i, e) => {
19
19
  const n = i.get(J);
20
20
  return e.forEach((t) => {
@@ -22,20 +22,20 @@ const Or = "sheets-drawing-ui.config", Pr = {}, j = {
22
22
  (s = (r = n.getRenderById(t)) == null ? void 0 : r.scene.getTransformer()) == null || s.debounceRefreshControls();
23
23
  }), !0;
24
24
  }
25
- }, Ge = {
25
+ }, Ve = {
26
26
  id: "sheet.command.remove-sheet-image",
27
- type: H.COMMAND,
27
+ type: X.COMMAND,
28
28
  handler: (i, e) => {
29
29
  var S, v, R;
30
- const n = i.get(W), t = i.get(ue), r = i.get(at), s = i.get(F);
30
+ const n = i.get(W), t = i.get(he), r = i.get(ct), s = i.get(Y);
31
31
  if (!e) return !1;
32
32
  const { drawings: o } = e, d = [];
33
33
  o.forEach((_) => {
34
34
  const { unitId: C } = _;
35
35
  d.push(C);
36
36
  });
37
- const l = s.getBatchRemoveOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = r.onCommandExecute({ id: Ge.id, params: e }), f = { id: P.id, params: { unitId: g, subUnitId: c, op: h, objects: u, type: T.REMOVE } }, p = { id: P.id, params: { unitId: g, subUnitId: c, op: a, objects: u, type: T.INSERT } };
38
- return It([...(S = m.preRedos) != null ? S : [], f, ...m.redos], n) ? (t.pushUndoRedo({
37
+ const l = s.getBatchRemoveOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = r.onCommandExecute({ id: Ve.id, params: e }), f = { id: P.id, params: { unitId: g, subUnitId: c, op: h, objects: u, type: T.REMOVE } }, p = { id: P.id, params: { unitId: g, subUnitId: c, op: a, objects: u, type: T.INSERT } };
38
+ return Ct([...(S = m.preRedos) != null ? S : [], f, ...m.redos], n) ? (t.pushUndoRedo({
39
39
  unitID: g,
40
40
  undoMutations: [
41
41
  ...(v = m.preUndos) != null ? v : [],
@@ -51,17 +51,17 @@ const Or = "sheets-drawing-ui.config", Pr = {}, j = {
51
51
  ]
52
52
  }), !0) : !1;
53
53
  }
54
- }, Ht = "COMPONENT_SHEET_DRAWING_PANEL", zt = {
54
+ }, zt = "COMPONENT_SHEET_DRAWING_PANEL", Kt = {
55
55
  id: "sidebar.operation.sheet-image",
56
- type: H.COMMAND,
56
+ type: X.COMMAND,
57
57
  handler: async (i, e) => {
58
- const n = i.get(rr), t = i.get(We), r = i.get(fe), s = i.get(K);
58
+ const n = i.get(sr), t = i.get(Ge), r = i.get(pe), s = i.get(z);
59
59
  if (!ce(r)) return !1;
60
60
  switch (e.value) {
61
61
  case "open":
62
62
  n.open({
63
63
  header: { title: t.t("sheetImage.panel.title") },
64
- children: { label: Ht },
64
+ children: { label: zt },
65
65
  onClose: () => {
66
66
  s.focusDrawing(null);
67
67
  },
@@ -75,15 +75,15 @@ const Or = "sheets-drawing-ui.config", Pr = {}, j = {
75
75
  }
76
76
  return !0;
77
77
  }
78
- }, Kt = {
78
+ }, Jt = {
79
79
  id: "sheet.operation.edit-sheet-image",
80
- type: H.OPERATION,
80
+ type: X.OPERATION,
81
81
  handler: (i, e) => {
82
- const n = i.get(K), t = i.get(W);
83
- return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(zt.id, { value: "open" }), !0);
82
+ const n = i.get(z), t = i.get(W);
83
+ return e == null ? !1 : (n.focusDrawing([e]), t.executeCommand(Kt.id, { value: "open" }), !0);
84
84
  }
85
85
  };
86
- var Jt = { exports: {} }, Ve = {};
86
+ var Zt = { exports: {} }, ke = {};
87
87
  /**
88
88
  * @license React
89
89
  * react-jsx-runtime.production.min.js
@@ -93,52 +93,52 @@ var Jt = { exports: {} }, Ve = {};
93
93
  * This source code is licensed under the MIT license found in the
94
94
  * LICENSE file in the root directory of this source tree.
95
95
  */
96
- var Tr = Yt, Er = Symbol.for("react.element"), Ur = Symbol.for("react.fragment"), Ar = Object.prototype.hasOwnProperty, Nr = Tr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, jr = { key: !0, ref: !0, __self: !0, __source: !0 };
97
- function Zt(i, e, n) {
96
+ var Ur = Ft, Ar = Symbol.for("react.element"), Nr = Symbol.for("react.fragment"), jr = Object.prototype.hasOwnProperty, xr = Ur.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Lr = { key: !0, ref: !0, __self: !0, __source: !0 };
97
+ function qt(i, e, n) {
98
98
  var t, r = {}, s = null, o = null;
99
99
  n !== void 0 && (s = "" + n), e.key !== void 0 && (s = "" + e.key), e.ref !== void 0 && (o = e.ref);
100
- for (t in e) Ar.call(e, t) && !jr.hasOwnProperty(t) && (r[t] = e[t]);
100
+ for (t in e) jr.call(e, t) && !Lr.hasOwnProperty(t) && (r[t] = e[t]);
101
101
  if (i && i.defaultProps) for (t in e = i.defaultProps, e) r[t] === void 0 && (r[t] = e[t]);
102
- return { $$typeof: Er, type: i, key: s, ref: o, props: r, _owner: Nr.current };
102
+ return { $$typeof: Ar, type: i, key: s, ref: o, props: r, _owner: xr.current };
103
103
  }
104
- Ve.Fragment = Ur;
105
- Ve.jsx = Zt;
106
- Ve.jsxs = Zt;
107
- Jt.exports = Ve;
108
- var $ = Jt.exports;
109
- const xr = "univer-upload-loading", Lr = "univer-upload-loading-body", $r = "univer-upload-loading-body-animation", Br = "univer-UniverCircleAnimation", Wr = "univer-upload-loading-body-text", De = {
110
- uploadLoading: xr,
111
- uploadLoadingBody: Lr,
112
- uploadLoadingBodyAnimation: $r,
113
- univerCircleAnimation: Br,
114
- uploadLoadingBodyText: Wr
115
- }, Gr = () => {
116
- const i = oe(Dt), e = oe(We), [n, t] = Yt.useState(0);
117
- return ct(() => {
104
+ ke.Fragment = Nr;
105
+ ke.jsx = qt;
106
+ ke.jsxs = qt;
107
+ Zt.exports = ke;
108
+ var $ = Zt.exports;
109
+ const $r = "univer-upload-loading", Br = "univer-upload-loading-body", Wr = "univer-upload-loading-body-animation", Gr = "univer-UniverCircleAnimation", Vr = "univer-upload-loading-body-text", Me = {
110
+ uploadLoading: $r,
111
+ uploadLoadingBody: Br,
112
+ uploadLoadingBodyAnimation: Wr,
113
+ univerCircleAnimation: Gr,
114
+ uploadLoadingBodyText: Vr
115
+ }, kr = () => {
116
+ const i = oe(Mt), e = oe(Ge), [n, t] = Ft.useState(0);
117
+ return dt(() => {
118
118
  const r = i.change$.subscribe((s) => {
119
119
  t(s);
120
120
  });
121
121
  return () => {
122
122
  r.unsubscribe();
123
123
  };
124
- }, [i]), /* @__PURE__ */ $.jsx("div", { style: { display: n > 0 ? "block" : "none" }, className: De.uploadLoading, children: /* @__PURE__ */ $.jsxs("div", { className: De.uploadLoadingBody, children: [
125
- /* @__PURE__ */ $.jsx("div", { className: De.uploadLoadingBodyAnimation }),
126
- /* @__PURE__ */ $.jsx("div", { className: De.uploadLoadingBodyText, children: `${e.t("uploadLoading.loading")}: ${n}` })
124
+ }, [i]), /* @__PURE__ */ $.jsx("div", { style: { display: n > 0 ? "block" : "none" }, className: Me.uploadLoading, children: /* @__PURE__ */ $.jsxs("div", { className: Me.uploadLoadingBody, children: [
125
+ /* @__PURE__ */ $.jsx("div", { className: Me.uploadLoadingBodyAnimation }),
126
+ /* @__PURE__ */ $.jsx("div", { className: Me.uploadLoadingBodyText, children: `${e.t("uploadLoading.loading")}: ${n}` })
127
127
  ] }) });
128
128
  };
129
- var Vr = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, Yr = (i, e, n, t) => {
130
- for (var r = t > 1 ? void 0 : t ? kr(e, n) : e, s = i.length - 1, o; s >= 0; s--)
129
+ var Yr = Object.defineProperty, Fr = Object.getOwnPropertyDescriptor, Xr = (i, e, n, t) => {
130
+ for (var r = t > 1 ? void 0 : t ? Fr(e, n) : e, s = i.length - 1, o; s >= 0; s--)
131
131
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
132
- return t && r && Vr(e, n, r), r;
132
+ return t && r && Yr(e, n, r), r;
133
133
  }, ie = (i, e) => (n, t) => e(n, t, i);
134
- let Ue = class extends fn {
134
+ let Ae = class extends pn {
135
135
  constructor(e, n, t, r, s, o, d) {
136
136
  super();
137
- V(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
137
+ G(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
138
138
  this._injector = e, this._drawingManagerService = n, this._canvasPopManagerService = t, this._renderManagerService = r, this._univerInstanceService = s, this._contextService = o, this._uiPartsService = d, this._init();
139
139
  }
140
140
  _init() {
141
- this._univerInstanceService.getCurrentTypeOfUnit$(Y.UNIVER_SHEET).pipe(vt(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(Y.UNIVER_SHEET).pipe(vt(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(Y.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(sr.CONTENT, () => pn(Gr, this._injector));
141
+ this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET).pipe(St(this.dispose$)).subscribe((e) => this._create(e)), this._univerInstanceService.getTypeOfUnitDisposed$(k.UNIVER_SHEET).pipe(St(this.dispose$)).subscribe((e) => this._dispose(e)), this._univerInstanceService.getAllUnitsForType(k.UNIVER_SHEET).forEach((e) => this._create(e)), this._uiPartsService.registerComponent(ar.CONTENT, () => wn(kr, this._injector));
142
142
  }
143
143
  _dispose(e) {
144
144
  const n = e.getUnitId();
@@ -153,7 +153,7 @@ let Ue = class extends fn {
153
153
  _hasCropObject(e) {
154
154
  const n = e.getAllObjectsByOrder();
155
155
  for (const t of n)
156
- if (t instanceof Ln)
156
+ if (t instanceof $n)
157
157
  return !0;
158
158
  return !1;
159
159
  }
@@ -167,9 +167,9 @@ let Ue = class extends fn {
167
167
  return;
168
168
  let r;
169
169
  this.disposeWithMe(
170
- wn(
170
+ _n(
171
171
  t.createControl$.subscribe(() => {
172
- if (this._contextService.setContextValue(me, !0), this._hasCropObject(n))
172
+ if (this._contextService.setContextValue(fe, !0), this._hasCropObject(n))
173
173
  return;
174
174
  const o = t.getSelectedObjectMap();
175
175
  if (o.size > 1) {
@@ -184,7 +184,7 @@ let Ue = class extends fn {
184
184
  return;
185
185
  const { unitId: c, subUnitId: a, drawingId: h, drawingType: u } = g, m = g.data;
186
186
  m && m.disablePopup || (r == null || r.dispose(), r = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
187
- componentKey: $n,
187
+ componentKey: Bn,
188
188
  direction: "horizontal",
189
189
  offset: [2, 0],
190
190
  extraProps: {
@@ -199,7 +199,7 @@ let Ue = class extends fn {
199
199
  )
200
200
  ), this.disposeWithMe(
201
201
  t.clearControl$.subscribe(() => {
202
- r == null || r.dispose(), this._contextService.setContextValue(me, !1), this._drawingManagerService.focusDrawing(null);
202
+ r == null || r.dispose(), this._contextService.setContextValue(fe, !1), this._drawingManagerService.focusDrawing(null);
203
203
  })
204
204
  ), this.disposeWithMe(
205
205
  t.changing$.subscribe(() => {
@@ -212,45 +212,45 @@ let Ue = class extends fn {
212
212
  {
213
213
  label: "image-popup.edit",
214
214
  index: 0,
215
- commandId: Kt.id,
215
+ commandId: Jt.id,
216
216
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
217
- disable: r === k.DRAWING_DOM
217
+ disable: r === V.DRAWING_DOM
218
218
  },
219
219
  {
220
220
  label: "image-popup.delete",
221
221
  index: 1,
222
- commandId: Ge.id,
222
+ commandId: Ve.id,
223
223
  commandParams: { unitId: e, drawings: [{ unitId: e, subUnitId: n, drawingId: t }] },
224
224
  disable: !1
225
225
  },
226
226
  {
227
227
  label: "image-popup.crop",
228
228
  index: 2,
229
- commandId: Bn.id,
229
+ commandId: Wn.id,
230
230
  commandParams: { unitId: e, subUnitId: n, drawingId: t },
231
- disable: r === k.DRAWING_DOM
231
+ disable: r === V.DRAWING_DOM
232
232
  },
233
233
  {
234
234
  label: "image-popup.reset",
235
235
  index: 3,
236
- commandId: Wn.id,
236
+ commandId: Gn.id,
237
237
  commandParams: [{ unitId: e, subUnitId: n, drawingId: t }],
238
- disable: r === k.DRAWING_DOM
238
+ disable: r === V.DRAWING_DOM
239
239
  }
240
240
  ];
241
241
  }
242
242
  };
243
- Ue = Yr([
244
- ie(0, x(Ct)),
245
- ie(1, K),
246
- ie(2, x(Jn)),
243
+ Ae = Xr([
244
+ ie(0, x(Rt)),
245
+ ie(1, z),
246
+ ie(2, x(qn)),
247
247
  ie(3, J),
248
- ie(4, fe),
249
- ie(5, Rt),
250
- ie(6, x(ir))
251
- ], Ue);
248
+ ie(4, pe),
249
+ ie(5, Dt),
250
+ ie(6, x(or))
251
+ ], Ae);
252
252
  function B(i, e, n) {
253
- const { from: t, to: r, flipY: s = !1, flipX: o = !1, angle: d = 0, skewX: l = 0, skewY: g = 0 } = i, { column: c, columnOffset: a, row: h, rowOffset: u } = t, { column: m, columnOffset: f, row: p, rowOffset: I } = r, S = n.getCurrentSkeleton(), v = Te(S, {
253
+ const { from: t, to: r, flipY: s = !1, flipX: o = !1, angle: d = 0, skewX: l = 0, skewY: g = 0 } = i, { column: c, columnOffset: a, row: h, rowOffset: u } = t, { column: m, columnOffset: f, row: p, rowOffset: I } = r, S = n.getCurrentSkeleton(), v = Ee(S, {
254
254
  startColumn: c,
255
255
  endColumn: c,
256
256
  startRow: h,
@@ -258,7 +258,7 @@ function B(i, e, n) {
258
258
  });
259
259
  if (v == null)
260
260
  return;
261
- const R = Te(S, {
261
+ const R = Ee(S, {
262
262
  startColumn: m,
263
263
  endColumn: m,
264
264
  startRow: p,
@@ -310,12 +310,12 @@ function N(i, e) {
310
310
  to: m
311
311
  };
312
312
  }
313
- var Fr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, Hr = (i, e, n, t) => {
314
- for (var r = t > 1 ? void 0 : t ? Xr(e, n) : e, s = i.length - 1, o; s >= 0; s--)
313
+ var Hr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, Kr = (i, e, n, t) => {
314
+ for (var r = t > 1 ? void 0 : t ? zr(e, n) : e, s = i.length - 1, o; s >= 0; s--)
315
315
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
316
- return t && r && Fr(e, n, r), r;
317
- }, Me = (i, e) => (n, t) => e(n, t, i);
318
- let st = class extends re {
316
+ return t && r && Hr(e, n, r), r;
317
+ }, be = (i, e) => (n, t) => e(n, t, i);
318
+ let ot = class extends re {
319
319
  constructor(i, e, n, t, r) {
320
320
  super(), this._context = i, this._sheetDrawingService = e, this._drawingManagerService = n, this._sheetSelectionRenderService = t, this._sheetSkeletonManagerService = r, this._init();
321
321
  }
@@ -335,38 +335,38 @@ let st = class extends re {
335
335
  this._drawingManagerService.registerDrawingData(this._context.unitId, this._sheetDrawingService.getDrawingDataForUnit(this._context.unitId)), this._drawingManagerService.initializeNotification(this._context.unitId);
336
336
  }
337
337
  };
338
- st = Hr([
339
- Me(1, F),
340
- Me(2, K),
341
- Me(3, x(pe)),
342
- Me(4, x(q))
343
- ], st);
344
- var X = function() {
345
- return X = Object.assign || function(i) {
338
+ ot = Kr([
339
+ be(1, Y),
340
+ be(2, z),
341
+ be(3, x(we)),
342
+ be(4, x(q))
343
+ ], ot);
344
+ var F = function() {
345
+ return F = Object.assign || function(i) {
346
346
  for (var e, n = 1, t = arguments.length; n < t; n++) {
347
347
  e = arguments[n];
348
348
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (i[r] = e[r]);
349
349
  }
350
350
  return i;
351
- }, X.apply(this, arguments);
352
- }, zr = function(i, e) {
351
+ }, F.apply(this, arguments);
352
+ }, Jr = function(i, e) {
353
353
  var n = {};
354
354
  for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && e.indexOf(t) < 0 && (n[t] = i[t]);
355
355
  if (i != null && typeof Object.getOwnPropertySymbols == "function")
356
356
  for (var r = 0, t = Object.getOwnPropertySymbols(i); r < t.length; r++)
357
357
  e.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, t[r]) && (n[t[r]] = i[t[r]]);
358
358
  return n;
359
- }, qt = Ft(function(i, e) {
360
- var n = i.icon, t = i.id, r = i.className, s = i.extend, o = zr(i, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = br("_".concat(Zr()));
361
- return Qt(n, "".concat(t), { defIds: n.defIds, idSuffix: l.current }, X({ ref: e, className: d }, o), s);
359
+ }, Qt = Xt(function(i, e) {
360
+ var n = i.icon, t = i.id, r = i.className, s = i.extend, o = Jr(i, ["icon", "id", "className", "extend"]), d = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), l = Or("_".concat(Qr()));
361
+ return en(n, "".concat(t), { defIds: n.defIds, idSuffix: l.current }, F({ ref: e, className: d }, o), s);
362
362
  });
363
- function Qt(i, e, n, t, r) {
364
- return Xt(i.tag, X(X({ key: e }, Kr(i, n, r)), t), (Jr(i, n).children || []).map(function(s, o) {
365
- return Qt(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
363
+ function en(i, e, n, t, r) {
364
+ return Ht(i.tag, F(F({ key: e }, Zr(i, n, r)), t), (qr(i, n).children || []).map(function(s, o) {
365
+ return en(s, "".concat(e, "-").concat(i.tag, "-").concat(o), n, void 0, r);
366
366
  }));
367
367
  }
368
- function Kr(i, e, n) {
369
- var t = X({}, i.attrs);
368
+ function Zr(i, e, n) {
369
+ var t = F({}, i.attrs);
370
370
  n != null && n.colorChannel1 && t.fill === "colorChannel1" && (t.fill = n.colorChannel1);
371
371
  var r = e.defIds;
372
372
  return !r || r.length === 0 || (i.tag === "use" && t["xlink:href"] && (t["xlink:href"] = t["xlink:href"] + e.idSuffix), Object.entries(t).forEach(function(s) {
@@ -374,29 +374,29 @@ function Kr(i, e, n) {
374
374
  typeof d == "string" && (t[o] = d.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
375
375
  })), t;
376
376
  }
377
- function Jr(i, e) {
377
+ function qr(i, e) {
378
378
  var n, t = e.defIds;
379
- return !t || t.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? X(X({}, i), { children: i.children.map(function(r) {
380
- return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? X(X({}, r), { attrs: X(X({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
379
+ return !t || t.length === 0 ? i : i.tag === "defs" && (!((n = i.children) === null || n === void 0) && n.length) ? F(F({}, i), { children: i.children.map(function(r) {
380
+ return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? F(F({}, r), { attrs: F(F({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
381
381
  }) }) : i;
382
382
  }
383
- function Zr() {
383
+ function Qr() {
384
384
  return Math.random().toString(36).substring(2, 8);
385
385
  }
386
- qt.displayName = "UniverIcon";
387
- var qr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, en = Ft(function(i, e) {
388
- return Xt(qt, Object.assign({}, i, {
386
+ Qt.displayName = "UniverIcon";
387
+ var ei = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, tn = Xt(function(i, e) {
388
+ return Ht(Qt, Object.assign({}, i, {
389
389
  id: "add-image-single",
390
390
  ref: e,
391
- icon: qr
391
+ icon: ei
392
392
  }));
393
393
  });
394
- en.displayName = "AddImageSingle";
395
- const tn = {
394
+ tn.displayName = "AddImageSingle";
395
+ const nn = {
396
396
  id: "sheet.command.delete-drawing",
397
- type: H.COMMAND,
397
+ type: X.COMMAND,
398
398
  handler: (i) => {
399
- const e = i.get(W), t = i.get(F).getFocusDrawings();
399
+ const e = i.get(W), t = i.get(Y).getFocusDrawings();
400
400
  if (t.length === 0)
401
401
  return !1;
402
402
  const r = t[0].unitId, s = t.map((o) => {
@@ -408,16 +408,16 @@ const tn = {
408
408
  drawingType: c
409
409
  };
410
410
  });
411
- return e.executeCommand(Ge.id, {
411
+ return e.executeCommand(Ve.id, {
412
412
  unitId: r,
413
413
  drawings: s
414
414
  });
415
415
  }
416
416
  };
417
- function Qr(i) {
417
+ function ti(i) {
418
418
  const e = [];
419
419
  return i.forEach((n) => {
420
- const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d } = t, l = Yn(0, 0, r.map((a) => a.transform || {})), g = r.map((a) => {
420
+ const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d } = t, l = Fn(0, 0, r.map((a) => a.transform || {})), g = r.map((a) => {
421
421
  const h = a.transform || { left: 0, top: 0 }, { unitId: u, subUnitId: m, drawingId: f } = a;
422
422
  return {
423
423
  unitId: u,
@@ -434,7 +434,7 @@ function Qr(i) {
434
434
  unitId: s,
435
435
  subUnitId: o,
436
436
  drawingId: d,
437
- drawingType: k.DRAWING_GROUP,
437
+ drawingType: V.DRAWING_GROUP,
438
438
  transform: l
439
439
  };
440
440
  e.push({
@@ -443,14 +443,14 @@ function Qr(i) {
443
443
  });
444
444
  }), e;
445
445
  }
446
- function ei(i) {
446
+ function ni(i) {
447
447
  const e = [];
448
448
  return i.forEach((n) => {
449
449
  const { parent: t, children: r } = n, { unitId: s, subUnitId: o, drawingId: d, transform: l = { width: 0, height: 0 } } = t;
450
450
  if (l == null)
451
451
  return;
452
452
  const g = r.map((a) => {
453
- const { transform: h } = a, { unitId: u, subUnitId: m, drawingId: f } = a, p = Fn(h || {}, l, l.width || 0, l.height || 0);
453
+ const { transform: h } = a, { unitId: u, subUnitId: m, drawingId: f } = a, p = Xn(h || {}, l, l.width || 0, l.height || 0);
454
454
  return {
455
455
  unitId: u,
456
456
  subUnitId: m,
@@ -462,7 +462,7 @@ function ei(i) {
462
462
  unitId: s,
463
463
  subUnitId: o,
464
464
  drawingId: d,
465
- drawingType: k.DRAWING_GROUP,
465
+ drawingType: V.DRAWING_GROUP,
466
466
  transform: {
467
467
  left: 0,
468
468
  top: 0
@@ -474,11 +474,11 @@ function ei(i) {
474
474
  });
475
475
  }), e;
476
476
  }
477
- const nn = {
477
+ const rn = {
478
478
  id: "sheet.command.group-sheet-image",
479
- type: H.COMMAND,
479
+ type: X.COMMAND,
480
480
  handler: (i, e) => {
481
- const n = i.get(W), t = i.get(ue), r = i.get(F);
481
+ const n = i.get(W), t = i.get(he), r = i.get(Y);
482
482
  if (!e) return !1;
483
483
  const s = [];
484
484
  e.forEach(({ parent: u, children: m }) => {
@@ -490,7 +490,7 @@ const nn = {
490
490
  return n.syncExecuteCommand(P.id, { op: c, unitId: d, subUnitId: l, objects: a, type: T.GROUP }) ? (t.pushUndoRedo({
491
491
  unitID: d,
492
492
  undoMutations: [
493
- { id: P.id, params: { op: g, unitId: d, subUnitId: l, objects: ei(a), type: T.UNGROUP } },
493
+ { id: P.id, params: { op: g, unitId: d, subUnitId: l, objects: ni(a), type: T.UNGROUP } },
494
494
  { id: j.id, params: s }
495
495
  ],
496
496
  redoMutations: [
@@ -499,15 +499,15 @@ const nn = {
499
499
  ]
500
500
  }), !0) : !1;
501
501
  }
502
- }, ke = {
502
+ }, Ye = {
503
503
  id: "sheet.command.insert-sheet-image",
504
- type: H.COMMAND,
504
+ type: X.COMMAND,
505
505
  handler: (i, e) => {
506
506
  var S, v, R;
507
- const n = i.get(W), t = i.get(ue), r = i.get(F), s = i.get(at);
507
+ const n = i.get(W), t = i.get(he), r = i.get(Y), s = i.get(ct);
508
508
  if (!e) return !1;
509
- const o = e.drawings, d = o.map((_) => _.unitId), l = r.getBatchAddOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = s.onCommandExecute({ id: ke.id, params: e }), f = { id: P.id, params: { op: h, unitId: g, subUnitId: c, objects: u, type: T.INSERT } }, p = { id: P.id, params: { op: a, unitId: g, subUnitId: c, objects: u, type: T.REMOVE } };
510
- return It([...(S = m.preRedos) != null ? S : [], f, ...m.redos], n) ? (t.pushUndoRedo({
509
+ const o = e.drawings, d = o.map((_) => _.unitId), l = r.getBatchAddOp(o), { unitId: g, subUnitId: c, undo: a, redo: h, objects: u } = l, m = s.onCommandExecute({ id: Ye.id, params: e }), f = { id: P.id, params: { op: h, unitId: g, subUnitId: c, objects: u, type: T.INSERT } }, p = { id: P.id, params: { op: a, unitId: g, subUnitId: c, objects: u, type: T.REMOVE } };
510
+ return Ct([...(S = m.preRedos) != null ? S : [], f, ...m.redos], n) ? (t.pushUndoRedo({
511
511
  unitID: g,
512
512
  undoMutations: [
513
513
  ...(v = m.preUndos) != null ? v : [],
@@ -523,15 +523,15 @@ const nn = {
523
523
  ]
524
524
  }), !0) : !1;
525
525
  }
526
- }, rn = {
526
+ }, sn = {
527
527
  id: "sheet.command.set-drawing-arrange",
528
- type: H.COMMAND,
528
+ type: X.COMMAND,
529
529
  handler: (i, e) => {
530
- const n = i.get(W), t = i.get(ue);
530
+ const n = i.get(W), t = i.get(he);
531
531
  if (!e) return !1;
532
- const r = i.get(F), { unitId: s, subUnitId: o, drawingIds: d, arrangeType: l } = e, g = { unitId: s, subUnitId: o, drawingIds: d };
532
+ const r = i.get(Y), { unitId: s, subUnitId: o, drawingIds: d, arrangeType: l } = e, g = { unitId: s, subUnitId: o, drawingIds: d };
533
533
  let c;
534
- if (l === ve.forward ? c = r.getForwardDrawingsOp(g) : l === ve.backward ? c = r.getBackwardDrawingOp(g) : l === ve.front ? c = r.getFrontDrawingsOp(g) : l === ve.back && (c = r.getBackDrawingsOp(g)), c == null)
534
+ if (l === Se.forward ? c = r.getForwardDrawingsOp(g) : l === Se.backward ? c = r.getBackwardDrawingOp(g) : l === Se.front ? c = r.getFrontDrawingsOp(g) : l === Se.back && (c = r.getBackDrawingsOp(g)), c == null)
535
535
  return !1;
536
536
  const { objects: a, redo: h, undo: u } = c;
537
537
  return n.syncExecuteCommand(P.id, { op: h, unitId: s, subUnitId: o, objects: a, type: T.ARRANGE }) ? (t.pushUndoRedo({
@@ -544,11 +544,11 @@ const nn = {
544
544
  ]
545
545
  }), !0) : !1;
546
546
  }
547
- }, Ye = {
547
+ }, Fe = {
548
548
  id: "sheet.command.set-sheet-image",
549
- type: H.COMMAND,
549
+ type: X.COMMAND,
550
550
  handler: (i, e) => {
551
- const n = i.get(W), t = i.get(ue), r = i.get(F);
551
+ const n = i.get(W), t = i.get(he), r = i.get(Y);
552
552
  if (!e) return !1;
553
553
  const { drawings: s } = e, o = r.getBatchUpdateOp(s), { unitId: d, subUnitId: l, undo: g, redo: c, objects: a } = o;
554
554
  return n.syncExecuteCommand(P.id, { unitId: d, subUnitId: l, op: c, objects: a, type: T.UPDATE }) ? (t.pushUndoRedo({
@@ -563,11 +563,11 @@ const nn = {
563
563
  ]
564
564
  }), !0) : !1;
565
565
  }
566
- }, sn = {
566
+ }, on = {
567
567
  id: "sheet.command.ungroup-sheet-image",
568
- type: H.COMMAND,
568
+ type: X.COMMAND,
569
569
  handler: (i, e) => {
570
- const n = i.get(W), t = i.get(ue), r = i.get(F);
570
+ const n = i.get(W), t = i.get(he), r = i.get(Y);
571
571
  if (!e) return !1;
572
572
  const s = [];
573
573
  e.forEach(({ parent: u, children: m }) => {
@@ -579,7 +579,7 @@ const nn = {
579
579
  return n.syncExecuteCommand(P.id, { op: c, unitId: d, subUnitId: l, objects: a, type: T.UNGROUP }) ? (t.pushUndoRedo({
580
580
  unitID: d,
581
581
  undoMutations: [
582
- { id: P.id, params: { op: g, unitId: d, subUnitId: l, objects: Qr(a), type: T.GROUP } },
582
+ { id: P.id, params: { op: g, unitId: d, subUnitId: l, objects: ti(a), type: T.GROUP } },
583
583
  { id: j.id, params: s }
584
584
  ],
585
585
  redoMutations: [
@@ -589,25 +589,25 @@ const nn = {
589
589
  }), !0) : !1;
590
590
  }
591
591
  };
592
- var ti = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ri = (i, e, n, t) => {
593
- for (var r = t > 1 ? void 0 : t ? ni(e, n) : e, s = i.length - 1, o; s >= 0; s--)
592
+ var ri = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, si = (i, e, n, t) => {
593
+ for (var r = t > 1 ? void 0 : t ? ii(e, n) : e, s = i.length - 1, o; s >= 0; s--)
594
594
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
595
- return t && r && ti(e, n, r), r;
596
- }, z = (i, e) => (n, t) => e(n, t, i);
597
- let Ae = class extends re {
595
+ return t && r && ri(e, n, r), r;
596
+ }, H = (i, e) => (n, t) => e(n, t, i);
597
+ let Ne = class extends re {
598
598
  constructor(e, n, t, r, s, o, d, l, g, c, a, h) {
599
599
  super();
600
- V(this, "_workbookSelections");
600
+ G(this, "_workbookSelections");
601
601
  this._context = e, this._skeletonManagerService = n, this._commandService = t, this._selectionRenderService = r, this._imageIoService = s, this._fileOpenerService = o, this._sheetDrawingService = d, this._drawingManagerService = l, this._contextService = g, this._messageService = c, this._localeService = a, this._workbookSelections = h.getWorkbookSelections(this._context.unitId), this._updateImageListener(), this._updateOrderListener(), this._groupDrawingListener(), this._focusDrawingListener();
602
602
  }
603
603
  async insertFloatImage() {
604
604
  const e = await this._fileOpenerService.openFile({
605
605
  multiple: !0,
606
- accept: An.map((t) => `.${t.replace("image/", "")}`).join(",")
606
+ accept: Nn.map((t) => `.${t.replace("image/", "")}`).join(",")
607
607
  }), n = e.length;
608
- return n > mt ? (this._messageService.show({
609
- type: Re.Error,
610
- content: this._localeService.t("update-status.exceedMaxCount", String(mt))
608
+ return n > ft ? (this._messageService.show({
609
+ type: De.Error,
610
+ content: this._localeService.t("update-status.exceedMaxCount", String(ft))
611
611
  }), !1) : n === 0 ? !1 : (e.forEach(async (t) => await this._insertFloatImage(t)), !0);
612
612
  }
613
613
  async _insertFloatImage(e) {
@@ -616,24 +616,24 @@ let Ae = class extends re {
616
616
  n = await this._imageIoService.saveImage(e);
617
617
  } catch (S) {
618
618
  const v = S.message;
619
- v === He.ERROR_EXCEED_SIZE ? this._messageService.show({
620
- type: Re.Error,
621
- content: this._localeService.t("update-status.exceedMaxSize", String(Nn / (1024 * 1024)))
622
- }) : v === He.ERROR_IMAGE_TYPE ? this._messageService.show({
623
- type: Re.Error,
619
+ v === ze.ERROR_EXCEED_SIZE ? this._messageService.show({
620
+ type: De.Error,
621
+ content: this._localeService.t("update-status.exceedMaxSize", String(jn / (1024 * 1024)))
622
+ }) : v === ze.ERROR_IMAGE_TYPE ? this._messageService.show({
623
+ type: De.Error,
624
624
  content: this._localeService.t("update-status.invalidImageType")
625
- }) : v === He.ERROR_IMAGE && this._messageService.show({
626
- type: Re.Error,
625
+ }) : v === ze.ERROR_IMAGE && this._messageService.show({
626
+ type: De.Error,
627
627
  content: this._localeService.t("update-status.invalidImage")
628
628
  });
629
629
  }
630
630
  if (n == null)
631
631
  return;
632
- const t = this._getUnitInfo(), { unitId: r, subUnitId: s } = t, { imageId: o, imageSourceType: d, source: l, base64Cache: g } = n, { width: c, height: a, image: h } = await jn(g || ""), { width: u, height: m } = this._context.scene;
632
+ const t = this._getUnitInfo(), { unitId: r, subUnitId: s } = t, { imageId: o, imageSourceType: d, source: l, base64Cache: g } = n, { width: c, height: a, image: h } = await xn(g || ""), { width: u, height: m } = this._context.scene;
633
633
  this._imageIoService.addImageSourceCache(l, d, h);
634
634
  let f = 1;
635
- if (c > ft || a > pt) {
636
- const S = ft / c, v = pt / a;
635
+ if (c > pt || a > wt) {
636
+ const S = pt / c, v = wt / a;
637
637
  f = Math.max(S, v);
638
638
  }
639
639
  const p = this._getImagePosition(c * f, a * f, u, m);
@@ -643,13 +643,13 @@ let Ae = class extends re {
643
643
  unitId: r,
644
644
  subUnitId: s,
645
645
  drawingId: o,
646
- drawingType: k.DRAWING_IMAGE,
646
+ drawingType: V.DRAWING_IMAGE,
647
647
  imageSourceType: d,
648
648
  source: l,
649
649
  transform: B(p, this._selectionRenderService, this._skeletonManagerService),
650
650
  sheetTransform: p
651
651
  };
652
- this._commandService.executeCommand(ke.id, {
652
+ this._commandService.executeCommand(Ye.id, {
653
653
  unitId: r,
654
654
  drawings: [I]
655
655
  });
@@ -670,7 +670,7 @@ let Ae = class extends re {
670
670
  endColumn: 0
671
671
  };
672
672
  s && s.length > 0 && (o = s[s.length - 1].range);
673
- const d = Te(this._skeletonManagerService.getCurrent().skeleton, o);
673
+ const d = Ee(this._skeletonManagerService.getCurrent().skeleton, o);
674
674
  if (d == null)
675
675
  return;
676
676
  let { startColumn: l, startRow: g, startX: c, startY: a } = d, h = !1;
@@ -702,7 +702,7 @@ let Ae = class extends re {
702
702
  _updateOrderListener() {
703
703
  this._drawingManagerService.featurePluginOrderUpdate$.subscribe((e) => {
704
704
  const { unitId: n, subUnitId: t, drawingIds: r, arrangeType: s } = e;
705
- this._commandService.executeCommand(rn.id, {
705
+ this._commandService.executeCommand(sn.id, {
706
706
  unitId: n,
707
707
  subUnitId: t,
708
708
  drawingIds: r,
@@ -729,7 +729,7 @@ let Ae = class extends re {
729
729
  sheetTransform: { ...c }
730
730
  };
731
731
  n.push(a);
732
- }), n.length > 0 && this._commandService.executeCommand(Ye.id, {
732
+ }), n.length > 0 && this._commandService.executeCommand(Fe.id, {
733
733
  unitId: e[0].unitId,
734
734
  drawings: n
735
735
  }));
@@ -737,46 +737,46 @@ let Ae = class extends re {
737
737
  }
738
738
  _groupDrawingListener() {
739
739
  this._drawingManagerService.featurePluginGroupUpdate$.subscribe((e) => {
740
- this._commandService.executeCommand(nn.id, e);
740
+ this._commandService.executeCommand(rn.id, e);
741
741
  const { unitId: n, subUnitId: t, drawingId: r } = e[0].parent;
742
742
  this._drawingManagerService.focusDrawing([{ unitId: n, subUnitId: t, drawingId: r }]);
743
743
  }), this._drawingManagerService.featurePluginUngroupUpdate$.subscribe((e) => {
744
- this._commandService.executeCommand(sn.id, e);
744
+ this._commandService.executeCommand(on.id, e);
745
745
  });
746
746
  }
747
747
  _focusDrawingListener() {
748
748
  this.disposeWithMe(
749
749
  this._drawingManagerService.focus$.subscribe((e) => {
750
- e == null || e.length === 0 ? (this._contextService.setContextValue(me, !1), this._sheetDrawingService.focusDrawing([])) : (this._contextService.setContextValue(me, !0), this._sheetDrawingService.focusDrawing(e));
750
+ e == null || e.length === 0 ? (this._contextService.setContextValue(fe, !1), this._sheetDrawingService.focusDrawing([])) : (this._contextService.setContextValue(fe, !0), this._sheetDrawingService.focusDrawing(e));
751
751
  })
752
752
  );
753
753
  }
754
754
  };
755
- Ae = ri([
756
- z(1, x(q)),
757
- z(2, W),
758
- z(3, pe),
759
- z(4, Dt),
760
- z(5, or),
761
- z(6, F),
762
- z(7, K),
763
- z(8, Rt),
764
- z(9, ar),
765
- z(10, x(We)),
766
- z(11, x(pr))
767
- ], Ae);
768
- const dt = {
755
+ Ne = si([
756
+ H(1, x(q)),
757
+ H(2, W),
758
+ H(3, we),
759
+ H(4, Mt),
760
+ H(5, cr),
761
+ H(6, Y),
762
+ H(7, z),
763
+ H(8, Dt),
764
+ H(9, dr),
765
+ H(10, x(Ge)),
766
+ H(11, x(_r))
767
+ ], Ne);
768
+ const lt = {
769
769
  id: "sheet.command.insert-float-image",
770
- type: H.COMMAND,
770
+ type: X.COMMAND,
771
771
  handler: (i) => {
772
772
  var n, t;
773
- return (t = (n = i.get(J).getCurrentTypeOfRenderer(Y.UNIVER_SHEET)) == null ? void 0 : n.with(Ae).insertFloatImage()) != null ? t : !1;
773
+ return (t = (n = i.get(J).getCurrentTypeOfRenderer(k.UNIVER_SHEET)) == null ? void 0 : n.with(Ne).insertFloatImage()) != null ? t : !1;
774
774
  }
775
- }, we = {
775
+ }, _e = {
776
776
  id: "sheet.command.move-drawing",
777
- type: H.COMMAND,
777
+ type: X.COMMAND,
778
778
  handler: (i, e) => {
779
- const n = i.get(W), t = i.get(F), r = i.get(pe), { direction: s } = e, o = t.getFocusDrawings();
779
+ const n = i.get(W), t = i.get(Y), r = i.get(we), { direction: s } = e, o = t.getFocusDrawings();
780
780
  if (o.length === 0)
781
781
  return !1;
782
782
  const d = o[0].unitId, l = o.map((c) => {
@@ -790,69 +790,69 @@ const dt = {
790
790
  sheetTransform: N(h, r)
791
791
  };
792
792
  }).filter((c) => c != null);
793
- return n.syncExecuteCommand(Ye.id, {
793
+ return n.syncExecuteCommand(Fe.id, {
794
794
  unitId: d,
795
795
  drawings: l
796
796
  }) ? (n.syncExecuteCommand(j.id, [d]), !0) : !1;
797
797
  }
798
- }, on = "addition-and-subtraction-single", an = "sheet.menu.image";
799
- function ii(i) {
798
+ }, an = "addition-and-subtraction-single", cn = "sheet.menu.image";
799
+ function oi(i) {
800
800
  return {
801
- id: an,
802
- type: Mt.SUBITEMS,
803
- icon: on,
801
+ id: cn,
802
+ type: bt.SUBITEMS,
803
+ icon: an,
804
804
  tooltip: "sheetImage.title",
805
- hidden$: bt(i, Y.UNIVER_SHEET),
806
- disabled$: Zn(i, { workbookTypes: [tt], worksheetTypes: [Pe], rangeTypes: [wr] })
805
+ hidden$: yt(i, k.UNIVER_SHEET),
806
+ disabled$: Qn(i, { workbookTypes: [nt], worksheetTypes: [Te], rangeTypes: [vr] })
807
807
  };
808
808
  }
809
- function si(i) {
809
+ function ai(i) {
810
810
  return {
811
- id: dt.id,
811
+ id: lt.id,
812
812
  title: "sheetImage.upload.float",
813
- type: Mt.BUTTON,
814
- hidden$: bt(i, Y.UNIVER_SHEET)
813
+ type: bt.BUTTON,
814
+ hidden$: yt(i, k.UNIVER_SHEET)
815
815
  };
816
816
  }
817
- const oi = "univer-image-common-panel", ai = "univer-image-common-panel-grid", ci = "univer-image-common-panel-border", di = "univer-image-common-panel-title", li = "univer-image-common-panel-subtitle", ui = "univer-image-common-panel-row", hi = "univer-image-common-panel-row-vertical", gi = "univer-image-common-panel-column", mi = "univer-image-common-panel-column-center", fi = "univer-image-common-panel-inline", pi = "univer-image-common-panel-span2", wi = "univer-image-common-panel-span3", _i = "univer-image-common-panel-input", vi = "univer-sheet-image-menu", Si = "univer-sheet-image-menu-input", ee = {
818
- imageCommonPanel: oi,
819
- imageCommonPanelGrid: ai,
820
- imageCommonPanelBorder: ci,
821
- imageCommonPanelTitle: di,
822
- imageCommonPanelSubtitle: li,
823
- imageCommonPanelRow: ui,
824
- imageCommonPanelRowVertical: hi,
825
- imageCommonPanelColumn: gi,
826
- imageCommonPanelColumnCenter: mi,
827
- imageCommonPanelInline: fi,
828
- imageCommonPanelSpan2: pi,
829
- imageCommonPanelSpan3: wi,
830
- imageCommonPanelInput: _i,
831
- sheetImageMenu: vi,
832
- sheetImageMenuInput: Si
817
+ const ci = "univer-image-common-panel", di = "univer-image-common-panel-grid", li = "univer-image-common-panel-border", ui = "univer-image-common-panel-title", hi = "univer-image-common-panel-subtitle", gi = "univer-image-common-panel-row", mi = "univer-image-common-panel-row-vertical", fi = "univer-image-common-panel-column", pi = "univer-image-common-panel-column-center", wi = "univer-image-common-panel-inline", _i = "univer-image-common-panel-span2", vi = "univer-image-common-panel-span3", Si = "univer-image-common-panel-input", Ii = "univer-sheet-image-menu", Ci = "univer-sheet-image-menu-input", ee = {
818
+ imageCommonPanel: ci,
819
+ imageCommonPanelGrid: di,
820
+ imageCommonPanelBorder: li,
821
+ imageCommonPanelTitle: ui,
822
+ imageCommonPanelSubtitle: hi,
823
+ imageCommonPanelRow: gi,
824
+ imageCommonPanelRowVertical: mi,
825
+ imageCommonPanelColumn: fi,
826
+ imageCommonPanelColumnCenter: pi,
827
+ imageCommonPanelInline: wi,
828
+ imageCommonPanelSpan2: _i,
829
+ imageCommonPanelSpan3: vi,
830
+ imageCommonPanelInput: Si,
831
+ sheetImageMenu: Ii,
832
+ sheetImageMenuInput: Ci
833
833
  };
834
- function cn(i) {
834
+ function dn(i) {
835
835
  var e, n, t = "";
836
836
  if (typeof i == "string" || typeof i == "number") t += i;
837
837
  else if (typeof i == "object") if (Array.isArray(i)) {
838
838
  var r = i.length;
839
- for (e = 0; e < r; e++) i[e] && (n = cn(i[e])) && (t && (t += " "), t += n);
839
+ for (e = 0; e < r; e++) i[e] && (n = dn(i[e])) && (t && (t += " "), t += n);
840
840
  } else for (n in i) i[n] && (t && (t += " "), t += n);
841
841
  return t;
842
842
  }
843
- function be() {
844
- for (var i, e, n = 0, t = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (e = cn(i)) && (t && (t += " "), t += e);
843
+ function ye() {
844
+ for (var i, e, n = 0, t = "", r = arguments.length; n < r; n++) (i = arguments[n]) && (e = dn(i)) && (t && (t += " "), t += e);
845
845
  return t;
846
846
  }
847
- const Ii = (i) => {
847
+ const Ri = (i) => {
848
848
  var v;
849
- const e = oe(W), n = oe(We), t = oe(K), r = oe(J), { drawings: s } = i, o = s[0];
849
+ const e = oe(W), n = oe(Ge), t = oe(z), r = oe(J), { drawings: s } = i, o = s[0];
850
850
  if (o == null)
851
851
  return;
852
852
  const { unitId: d } = o, l = r.getRenderById(d), g = l == null ? void 0 : l.scene;
853
853
  if (g == null)
854
854
  return;
855
- const c = g.getTransformerByCreate(), [a, h] = it(!0), u = (v = o.anchorType) != null ? v : y.Position, [m, f] = it(u);
855
+ const c = g.getTransformerByCreate(), [a, h] = st(!0), u = (v = o.anchorType) != null ? v : y.Position, [m, f] = st(u);
856
856
  function p(R, _) {
857
857
  const C = [];
858
858
  return R.forEach((w) => {
@@ -870,7 +870,7 @@ const Ii = (i) => {
870
870
  });
871
871
  }), C;
872
872
  }
873
- ct(() => {
873
+ dt(() => {
874
874
  const R = c.clearControl$.subscribe((C) => {
875
875
  C === !0 && h(!1);
876
876
  }), _ = c.changeStart$.subscribe((C) => {
@@ -899,23 +899,23 @@ const Ii = (i) => {
899
899
  drawingId: w.drawingId,
900
900
  anchorType: R
901
901
  }));
902
- e.executeCommand(Ye.id, {
902
+ e.executeCommand(Fe.id, {
903
903
  unitId: _[0].unitId,
904
904
  drawings: C
905
905
  });
906
906
  }
907
907
  const S = (R) => R ? "block" : "none";
908
- return /* @__PURE__ */ $.jsxs("div", { className: be(ee.imageCommonPanelGrid, ee.imageCommonPanelBorder), style: { display: S(a) }, children: [
909
- /* @__PURE__ */ $.jsx("div", { className: ee.imageCommonPanelRow, children: /* @__PURE__ */ $.jsx("div", { className: be(ee.imageCommonPanelColumn, ee.imageCommonPanelTitle), children: /* @__PURE__ */ $.jsx("div", { children: n.t("drawing-anchor.title") }) }) }),
910
- /* @__PURE__ */ $.jsx("div", { className: be(ee.imageCommonPanelRow), children: /* @__PURE__ */ $.jsx("div", { className: be(ee.imageCommonPanelColumn), children: /* @__PURE__ */ $.jsxs(yr, { value: m, onChange: I, direction: "vertical", children: [
911
- /* @__PURE__ */ $.jsx(Ze, { value: y.Both, children: n.t("drawing-anchor.both") }),
912
- /* @__PURE__ */ $.jsx(Ze, { value: y.Position, children: n.t("drawing-anchor.position") }),
913
- /* @__PURE__ */ $.jsx(Ze, { value: y.None, children: n.t("drawing-anchor.none") })
908
+ return /* @__PURE__ */ $.jsxs("div", { className: ye(ee.imageCommonPanelGrid, ee.imageCommonPanelBorder), style: { display: S(a) }, children: [
909
+ /* @__PURE__ */ $.jsx("div", { className: ee.imageCommonPanelRow, children: /* @__PURE__ */ $.jsx("div", { className: ye(ee.imageCommonPanelColumn, ee.imageCommonPanelTitle), children: /* @__PURE__ */ $.jsx("div", { children: n.t("drawing-anchor.title") }) }) }),
910
+ /* @__PURE__ */ $.jsx("div", { className: ye(ee.imageCommonPanelRow), children: /* @__PURE__ */ $.jsx("div", { className: ye(ee.imageCommonPanelColumn), children: /* @__PURE__ */ $.jsxs(Pr, { value: m, onChange: I, direction: "vertical", children: [
911
+ /* @__PURE__ */ $.jsx(qe, { value: y.Both, children: n.t("drawing-anchor.both") }),
912
+ /* @__PURE__ */ $.jsx(qe, { value: y.Position, children: n.t("drawing-anchor.position") }),
913
+ /* @__PURE__ */ $.jsx(qe, { value: y.None, children: n.t("drawing-anchor.none") })
914
914
  ] }) }) })
915
915
  ] });
916
- }, Ci = () => {
917
- const i = oe(K), e = i.getFocusDrawings(), [n, t] = it(e);
918
- return ct(() => {
916
+ }, Di = () => {
917
+ const i = oe(z), e = i.getFocusDrawings(), [n, t] = st(e);
918
+ return dt(() => {
919
919
  const r = i.focus$.subscribe((s) => {
920
920
  t(s);
921
921
  });
@@ -923,113 +923,113 @@ const Ii = (i) => {
923
923
  r.unsubscribe();
924
924
  };
925
925
  }, []), !!(n != null && n.length) && /* @__PURE__ */ $.jsxs("div", { className: ee.imageCommonPanel, children: [
926
- /* @__PURE__ */ $.jsx(Gn, { drawings: n }),
927
- /* @__PURE__ */ $.jsx(Ii, { drawings: n })
926
+ /* @__PURE__ */ $.jsx(Vn, { drawings: n }),
927
+ /* @__PURE__ */ $.jsx(Ri, { drawings: n })
928
928
  ] });
929
- }, Ri = {
930
- [cr.FORMULAS_INSERT]: {
931
- [an]: {
929
+ }, Mi = {
930
+ [lr.FORMULAS_INSERT]: {
931
+ [cn]: {
932
932
  order: 3,
933
- menuItemFactory: ii,
934
- [dt.id]: {
933
+ menuItemFactory: oi,
934
+ [lt.id]: {
935
935
  order: 0,
936
- menuItemFactory: si
936
+ menuItemFactory: ai
937
937
  }
938
938
  }
939
939
  }
940
940
  };
941
- function _e(i) {
942
- return !i.getContextValue(_n) && !i.getContextValue(vn) && !i.getContextValue(Sn) && i.getContextValue(me);
941
+ function ve(i) {
942
+ return !i.getContextValue(vn) && !i.getContextValue(Sn) && !i.getContextValue(In) && i.getContextValue(fe);
943
943
  }
944
- const Di = {
945
- id: we.id,
944
+ const bi = {
945
+ id: _e.id,
946
946
  description: "shortcut.sheet.drawing-move-down",
947
947
  group: "4_sheet-drawing-view",
948
- binding: le.ARROW_DOWN,
948
+ binding: ue.ARROW_DOWN,
949
949
  priority: 100,
950
- preconditions: _e,
950
+ preconditions: ve,
951
951
  staticParameters: {
952
952
  direction: te.DOWN
953
953
  }
954
- }, Mi = {
955
- id: we.id,
954
+ }, yi = {
955
+ id: _e.id,
956
956
  description: "shortcut.sheet.drawing-move-up",
957
957
  group: "4_sheet-drawing-view",
958
- binding: le.ARROW_UP,
958
+ binding: ue.ARROW_UP,
959
959
  priority: 100,
960
- preconditions: _e,
960
+ preconditions: ve,
961
961
  staticParameters: {
962
962
  direction: te.UP
963
963
  }
964
- }, bi = {
965
- id: we.id,
964
+ }, Oi = {
965
+ id: _e.id,
966
966
  description: "shortcut.sheet.drawing-move-left",
967
967
  group: "4_sheet-drawing-view",
968
- binding: le.ARROW_LEFT,
968
+ binding: ue.ARROW_LEFT,
969
969
  priority: 100,
970
- preconditions: _e,
970
+ preconditions: ve,
971
971
  staticParameters: {
972
972
  direction: te.LEFT
973
973
  }
974
- }, yi = {
975
- id: we.id,
974
+ }, Pi = {
975
+ id: _e.id,
976
976
  description: "shortcut.sheet.drawing-move-right",
977
977
  group: "4_sheet-drawing-view",
978
- binding: le.ARROW_RIGHT,
978
+ binding: ue.ARROW_RIGHT,
979
979
  priority: 100,
980
- preconditions: _e,
980
+ preconditions: ve,
981
981
  staticParameters: {
982
982
  direction: te.RIGHT
983
983
  }
984
- }, Oi = {
985
- id: tn.id,
984
+ }, Ti = {
985
+ id: nn.id,
986
986
  description: "shortcut.sheet.drawing-delete",
987
987
  group: "4_sheet-drawing-view",
988
988
  // when focusing on any other input tag do not trigger this shortcut
989
- preconditions: _e,
990
- binding: le.DELETE,
991
- mac: le.BACKSPACE
989
+ preconditions: ve,
990
+ binding: ue.DELETE,
991
+ mac: ue.BACKSPACE
992
992
  };
993
- var Pi = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, Ei = (i, e, n, t) => {
994
- for (var r = t > 1 ? void 0 : t ? Ti(e, n) : e, s = i.length - 1, o; s >= 0; s--)
993
+ var Ei = Object.defineProperty, Ui = Object.getOwnPropertyDescriptor, Ai = (i, e, n, t) => {
994
+ for (var r = t > 1 ? void 0 : t ? Ui(e, n) : e, s = i.length - 1, o; s >= 0; s--)
995
995
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
996
- return t && r && Pi(e, n, r), r;
997
- }, ye = (i, e) => (n, t) => e(n, t, i);
998
- let Ne = class extends re {
996
+ return t && r && Ei(e, n, r), r;
997
+ }, Oe = (i, e) => (n, t) => e(n, t, i);
998
+ let je = class extends re {
999
999
  constructor(i, e, n, t) {
1000
1000
  super(), this._componentManager = i, this._menuManagerService = e, this._commandService = n, this._shortcutService = t, this._init();
1001
1001
  }
1002
1002
  _initCustomComponents() {
1003
1003
  const i = this._componentManager;
1004
- this.disposeWithMe(i.register(on, en)), this.disposeWithMe(i.register(Ht, Ci));
1004
+ this.disposeWithMe(i.register(an, tn)), this.disposeWithMe(i.register(zt, Di));
1005
1005
  }
1006
1006
  _initMenus() {
1007
- this._menuManagerService.mergeMenu(Ri);
1007
+ this._menuManagerService.mergeMenu(Mi);
1008
1008
  }
1009
1009
  _initCommands() {
1010
1010
  [
1011
- dt,
1012
- ke,
1013
- Ge,
1011
+ lt,
1014
1012
  Ye,
1015
- zt,
1016
- j,
1013
+ Ve,
1014
+ Fe,
1017
1015
  Kt,
1016
+ j,
1017
+ Jt,
1018
+ rn,
1019
+ on,
1020
+ _e,
1018
1021
  nn,
1019
- sn,
1020
- we,
1021
- tn,
1022
- rn
1022
+ sn
1023
1023
  ].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
1024
1024
  }
1025
1025
  _initShortcuts() {
1026
1026
  [
1027
1027
  // sheet drawing shortcuts
1028
- Di,
1029
- Mi,
1030
1028
  bi,
1031
1029
  yi,
1032
- Oi
1030
+ Oi,
1031
+ Pi,
1032
+ Ti
1033
1033
  ].forEach((i) => {
1034
1034
  this.disposeWithMe(this._shortcutService.registerShortcut(i));
1035
1035
  });
@@ -1038,21 +1038,21 @@ let Ne = class extends re {
1038
1038
  this._initCommands(), this._initCustomComponents(), this._initMenus(), this._initShortcuts();
1039
1039
  }
1040
1040
  };
1041
- Ne = Ei([
1042
- ye(0, x(dr)),
1043
- ye(1, lr),
1044
- ye(2, W),
1045
- ye(3, ur)
1046
- ], Ne);
1047
- var Ui = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, Ni = (i, e, n, t) => {
1048
- for (var r = t > 1 ? void 0 : t ? Ai(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1041
+ je = Ai([
1042
+ Oe(0, x(ur)),
1043
+ Oe(1, hr),
1044
+ Oe(2, W),
1045
+ Oe(3, gr)
1046
+ ], je);
1047
+ var Ni = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, xi = (i, e, n, t) => {
1048
+ for (var r = t > 1 ? void 0 : t ? ji(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1049
1049
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1050
- return t && r && Ui(e, n, r), r;
1051
- }, qe = (i, e) => (n, t) => e(n, t, i);
1052
- let je = class extends re {
1050
+ return t && r && Ni(e, n, r), r;
1051
+ }, Qe = (i, e) => (n, t) => e(n, t, i);
1052
+ let xe = class extends re {
1053
1053
  constructor(e, n, t) {
1054
1054
  super();
1055
- V(this, "_copyInfo");
1055
+ G(this, "_copyInfo");
1056
1056
  this._sheetClipboardService = e, this._renderManagerService = n, this._sheetDrawingService = t, this._initCopyPaste();
1057
1057
  }
1058
1058
  _initCopyPaste() {
@@ -1060,7 +1060,7 @@ let je = class extends re {
1060
1060
  id: "SHEET_IMAGE_UI_PLUGIN",
1061
1061
  onBeforeCopy: (e, n, t) => this._collect(e, n, t),
1062
1062
  onPasteCells: (e, n, t, r) => {
1063
- const { copyType: s = _t.COPY, pasteType: o } = r, { range: d } = e || {}, { range: l, unitId: g, subUnitId: c } = n;
1063
+ const { copyType: s = vt.COPY, pasteType: o } = r, { range: d } = e || {}, { range: l, unitId: g, subUnitId: c } = n;
1064
1064
  return this._generateMutations(l, { copyType: s, pasteType: o, copyRange: d, unitId: g, subUnitId: c });
1065
1065
  },
1066
1066
  onPastePlainText: (e, n) => ({ undos: [], redos: [] })
@@ -1097,10 +1097,10 @@ let je = class extends re {
1097
1097
  if (!this._copyInfo)
1098
1098
  return { redos: [], undos: [] };
1099
1099
  if ([
1100
- Se.SPECIAL_PASTE_COL_WIDTH,
1101
- Se.SPECIAL_PASTE_VALUE,
1102
- Se.SPECIAL_PASTE_FORMAT,
1103
- Se.SPECIAL_PASTE_FORMULA
1100
+ Ie.SPECIAL_PASTE_COL_WIDTH,
1101
+ Ie.SPECIAL_PASTE_VALUE,
1102
+ Ie.SPECIAL_PASTE_FORMAT,
1103
+ Ie.SPECIAL_PASTE_FORMULA
1104
1104
  ].includes(
1105
1105
  n.pasteType
1106
1106
  ))
@@ -1108,7 +1108,7 @@ let je = class extends re {
1108
1108
  const { copyRange: t } = n;
1109
1109
  if (!t)
1110
1110
  return { redos: [], undos: [] };
1111
- const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [d, l], mapFunc: g } = qn([t, e]), { row: c, col: a } = g(d.startRow, d.startColumn), { row: h, col: u } = g(l.startRow, l.startColumn), m = (b = this._renderManagerService.getRenderById(s)) == null ? void 0 : b.with(q);
1111
+ const { drawings: r, unitId: s, subUnitId: o } = this._copyInfo, { ranges: [d, l], mapFunc: g } = er([t, e]), { row: c, col: a } = g(d.startRow, d.startColumn), { row: h, col: u } = g(l.startRow, l.startColumn), m = (b = this._renderManagerService.getRenderById(s)) == null ? void 0 : b.with(q);
1112
1112
  if (!m)
1113
1113
  return { redos: [], undos: [] };
1114
1114
  const f = m.attachRangeWithCoord({
@@ -1124,7 +1124,7 @@ let je = class extends re {
1124
1124
  });
1125
1125
  if (!f || !p)
1126
1126
  return { redos: [], undos: [] };
1127
- const I = [], S = [], v = p.startX - f.startX, R = p.startY - f.startY, _ = h - c, C = u - a, w = n.copyType === _t.CUT, { _sheetDrawingService: O } = this;
1127
+ const I = [], S = [], v = p.startX - f.startX, R = p.startY - f.startY, _ = h - c, C = u - a, w = n.copyType === vt.CUT, { _sheetDrawingService: O } = this;
1128
1128
  return r.forEach((A) => {
1129
1129
  const { transform: E, sheetTransform: M } = A;
1130
1130
  if (!E)
@@ -1133,7 +1133,7 @@ let je = class extends re {
1133
1133
  ...A,
1134
1134
  unitId: s,
1135
1135
  subUnitId: o,
1136
- drawingId: w ? A.drawingId : ge.generateRandomId(),
1136
+ drawingId: w ? A.drawingId : me.generateRandomId(),
1137
1137
  transform: {
1138
1138
  ...E,
1139
1139
  left: E.left + v,
@@ -1175,24 +1175,24 @@ let je = class extends re {
1175
1175
  };
1176
1176
  }
1177
1177
  };
1178
- je = Ni([
1179
- qe(0, Qn),
1180
- qe(1, J),
1181
- qe(2, F)
1182
- ], je);
1183
- var ji = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, Li = (i, e, n, t) => {
1184
- for (var r = t > 1 ? void 0 : t ? xi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1178
+ xe = xi([
1179
+ Qe(0, tr),
1180
+ Qe(1, J),
1181
+ Qe(2, Y)
1182
+ ], xe);
1183
+ var Li = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, Bi = (i, e, n, t) => {
1184
+ for (var r = t > 1 ? void 0 : t ? $i(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1185
1185
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1186
- return t && r && ji(e, n, r), r;
1187
- }, he = (i, e) => (n, t) => e(n, t, i);
1188
- let xe = class extends re {
1186
+ return t && r && Li(e, n, r), r;
1187
+ }, ge = (i, e) => (n, t) => e(n, t, i);
1188
+ let Le = class extends re {
1189
1189
  constructor(i, e, n, t, r) {
1190
1190
  super(), this._drawingManagerService = i, this._renderManagerService = e, this._permissionService = n, this._univerInstanceService = t, this._userManagerService = r, this._initDrawingVisible(), this._initDrawingEditable(), this._initViewPermissionChange(), this._initEditPermissionChange();
1191
1191
  }
1192
1192
  _initDrawingVisible() {
1193
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(Y.UNIVER_SHEET);
1193
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET);
1194
1194
  this.disposeWithMe(
1195
- Ie([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1195
+ Ce([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1196
1196
  if (!e) {
1197
1197
  this._drawingManagerService.setDrawingVisible(!1);
1198
1198
  return;
@@ -1203,7 +1203,7 @@ let xe = class extends re {
1203
1203
  return;
1204
1204
  }
1205
1205
  const r = e.getUnitId(), s = t.getSheetId();
1206
- if (this._permissionService.composePermission([new St(r).id, new Je(r, s).id]).every((d) => d.value))
1206
+ if (this._permissionService.composePermission([new It(r).id, new Ze(r, s).id]).every((d) => d.value))
1207
1207
  this._drawingManagerService.setDrawingVisible(!0);
1208
1208
  else {
1209
1209
  this._drawingManagerService.setDrawingVisible(!1);
@@ -1211,7 +1211,7 @@ let xe = class extends re {
1211
1211
  if (h == null)
1212
1212
  return;
1213
1213
  h.getAllObjectsByOrder().forEach((m) => {
1214
- m.classType === de.IMAGE && c.some((f) => m.oKey.includes(f.drawingId)) && h.removeObject(m);
1214
+ m.classType === le.IMAGE && c.some((f) => m.oKey.includes(f.drawingId)) && h.removeObject(m);
1215
1215
  });
1216
1216
  }
1217
1217
  });
@@ -1219,9 +1219,9 @@ let xe = class extends re {
1219
1219
  );
1220
1220
  }
1221
1221
  _initDrawingEditable() {
1222
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(Y.UNIVER_SHEET);
1222
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET);
1223
1223
  this.disposeWithMe(
1224
- Ie([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1224
+ Ce([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1225
1225
  if (!e) {
1226
1226
  this._drawingManagerService.setDrawingEditable(!1);
1227
1227
  return;
@@ -1232,7 +1232,7 @@ let xe = class extends re {
1232
1232
  return;
1233
1233
  }
1234
1234
  const r = e.getUnitId(), s = t.getSheetId();
1235
- if (this._permissionService.composePermission([new tt(r).id, new Pe(r, s).id]).every((d) => d.value))
1235
+ if (this._permissionService.composePermission([new nt(r).id, new Te(r, s).id]).every((d) => d.value))
1236
1236
  this._drawingManagerService.setDrawingEditable(!0);
1237
1237
  else {
1238
1238
  this._drawingManagerService.setDrawingEditable(!1);
@@ -1240,7 +1240,7 @@ let xe = class extends re {
1240
1240
  if (h == null)
1241
1241
  return;
1242
1242
  h.getAllObjectsByOrder().forEach((m) => {
1243
- m.classType === de.IMAGE && c.some((f) => m.oKey.includes(f.drawingId)) && h.detachTransformerFrom(m);
1243
+ m.classType === le.IMAGE && c.some((f) => m.oKey.includes(f.drawingId)) && h.detachTransformerFrom(m);
1244
1244
  });
1245
1245
  }
1246
1246
  });
@@ -1248,9 +1248,9 @@ let xe = class extends re {
1248
1248
  );
1249
1249
  }
1250
1250
  _initViewPermissionChange() {
1251
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(Y.UNIVER_SHEET);
1251
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET);
1252
1252
  this.disposeWithMe(
1253
- Ie([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1253
+ Ce([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1254
1254
  e && e.activeSheet$.subscribe((t) => {
1255
1255
  var a;
1256
1256
  if (!t)
@@ -1260,21 +1260,21 @@ let xe = class extends re {
1260
1260
  const d = this._renderManagerService.getRenderById(r), l = d == null ? void 0 : d.scene;
1261
1261
  if (l == null)
1262
1262
  return;
1263
- const g = l.getTransformerByCreate(), c = this._permissionService.composePermission$([new St(r).id, new Je(r, s).id]).pipe(Ee((h) => h.every((u) => u.value)));
1263
+ const g = l.getTransformerByCreate(), c = this._permissionService.composePermission$([new It(r).id, new Ze(r, s).id]).pipe(Ue((h) => h.every((u) => u.value)));
1264
1264
  c == null || c.pipe(
1265
1265
  ae((h) => h !== o),
1266
- Ce()
1266
+ Re()
1267
1267
  ).subscribe({
1268
1268
  next: (h) => {
1269
1269
  o = h, this._drawingManagerService.setDrawingVisible(h);
1270
1270
  const u = l.getAllObjectsByOrder(), m = this._drawingManagerService.getDrawingData(r, s), f = Object.values(m);
1271
1271
  h ? this._drawingManagerService.addNotification(f) : (u.forEach((p) => {
1272
- p.classType === de.IMAGE && f.some((I) => p.oKey.includes(I.drawingId)) && l.removeObject(p);
1272
+ p.classType === le.IMAGE && f.some((I) => p.oKey.includes(I.drawingId)) && l.removeObject(p);
1273
1273
  }), g.clearSelectedObjects());
1274
1274
  }
1275
- }), (a = this._permissionService.getPermissionPoint$(new Je(r, s).id)) == null || a.pipe(
1275
+ }), (a = this._permissionService.getPermissionPoint$(new Ze(r, s).id)) == null || a.pipe(
1276
1276
  ae((h) => h.value !== o),
1277
- Ce()
1277
+ Re()
1278
1278
  ).subscribe({
1279
1279
  complete: () => {
1280
1280
  o = !0, this._drawingManagerService.setDrawingVisible(!0);
@@ -1287,9 +1287,9 @@ let xe = class extends re {
1287
1287
  );
1288
1288
  }
1289
1289
  _initEditPermissionChange() {
1290
- const i = this._univerInstanceService.getCurrentTypeOfUnit$(Y.UNIVER_SHEET);
1290
+ const i = this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET);
1291
1291
  this.disposeWithMe(
1292
- Ie([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1292
+ Ce([i, this._userManagerService.currentUser$]).subscribe(([e, n]) => {
1293
1293
  e && e.activeSheet$.subscribe((t) => {
1294
1294
  var a;
1295
1295
  if (!t)
@@ -1299,23 +1299,23 @@ let xe = class extends re {
1299
1299
  const d = this._renderManagerService.getRenderById(r), l = d == null ? void 0 : d.scene;
1300
1300
  if (l == null)
1301
1301
  return;
1302
- const g = l.getTransformerByCreate(), c = this._permissionService.composePermission$([new tt(r).id, new Pe(r, s).id]).pipe(Ee((h) => h.every((u) => u.value)));
1302
+ const g = l.getTransformerByCreate(), c = this._permissionService.composePermission$([new nt(r).id, new Te(r, s).id]).pipe(Ue((h) => h.every((u) => u.value)));
1303
1303
  c == null || c.pipe(
1304
1304
  ae((h) => h !== o),
1305
- Ce()
1305
+ Re()
1306
1306
  ).subscribe({
1307
1307
  next: (h) => {
1308
1308
  o = h, this._drawingManagerService.setDrawingEditable(h);
1309
1309
  const u = l.getAllObjectsByOrder(), m = this._drawingManagerService.getDrawingData(r, s), f = Object.values(m);
1310
1310
  h ? (u.forEach((p) => {
1311
- p.classType === de.IMAGE && f.some((I) => p.oKey.includes(I.drawingId)) && l.attachTransformerTo(p);
1311
+ p.classType === le.IMAGE && f.some((I) => p.oKey.includes(I.drawingId)) && l.attachTransformerTo(p);
1312
1312
  }), this._drawingManagerService.addNotification(f)) : (u.forEach((p) => {
1313
- p.classType === de.IMAGE && f.some((I) => p.oKey.includes(I.drawingId)) && l.detachTransformerFrom(p);
1313
+ p.classType === le.IMAGE && f.some((I) => p.oKey.includes(I.drawingId)) && l.detachTransformerFrom(p);
1314
1314
  }), g.clearSelectedObjects());
1315
1315
  }
1316
- }), (a = this._permissionService.getPermissionPoint$(new Pe(r, s).id)) == null || a.pipe(
1316
+ }), (a = this._permissionService.getPermissionPoint$(new Te(r, s).id)) == null || a.pipe(
1317
1317
  ae((h) => h.value !== o),
1318
- Ce()
1318
+ Re()
1319
1319
  ).subscribe({
1320
1320
  complete: () => {
1321
1321
  o = !0;
@@ -1323,7 +1323,7 @@ let xe = class extends re {
1323
1323
  if (I == null)
1324
1324
  return;
1325
1325
  this._drawingManagerService.setDrawingEditable(!0), I.getAllObjectsByOrder().forEach((v) => {
1326
- v.classType === de.IMAGE && f.some((R) => v.oKey.includes(R.drawingId)) && I.detachTransformerFrom(v);
1326
+ v.classType === le.IMAGE && f.some((R) => v.oKey.includes(R.drawingId)) && I.detachTransformerFrom(v);
1327
1327
  });
1328
1328
  }
1329
1329
  });
@@ -1332,19 +1332,19 @@ let xe = class extends re {
1332
1332
  );
1333
1333
  }
1334
1334
  };
1335
- xe = Li([
1336
- he(0, K),
1337
- he(1, J),
1338
- he(2, Cn),
1339
- he(3, fe),
1340
- he(4, x(In))
1341
- ], xe);
1342
- var $i = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, Wi = (i, e, n, t) => {
1343
- for (var r = t > 1 ? void 0 : t ? Bi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1335
+ Le = Bi([
1336
+ ge(0, z),
1337
+ ge(1, J),
1338
+ ge(2, Rn),
1339
+ ge(3, pe),
1340
+ ge(4, x(Cn))
1341
+ ], Le);
1342
+ var Wi = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, Vi = (i, e, n, t) => {
1343
+ for (var r = t > 1 ? void 0 : t ? Gi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1344
1344
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1345
- return t && r && $i(e, n, r), r;
1346
- }, Oe = (i, e) => (n, t) => e(n, t, i);
1347
- let Le = class extends re {
1345
+ return t && r && Wi(e, n, r), r;
1346
+ }, Pe = (i, e) => (n, t) => e(n, t, i);
1347
+ let $e = class extends re {
1348
1348
  constructor(i, e, n, t) {
1349
1349
  super(), this._sheetPrintInterceptorService = i, this._drawingRenderService = e, this._drawingManagerService = n, this._renderManagerService = t, this._initPrinting();
1350
1350
  }
@@ -1375,9 +1375,9 @@ let Le = class extends re {
1375
1375
  const d = this._drawingManagerService.getDrawingDataForUnit(t), l = d == null ? void 0 : d[e.subUnitId];
1376
1376
  if (!l)
1377
1377
  return n(i);
1378
- const { scaleX: g, scaleY: c } = s.scene, a = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, h = l.order.map((u) => l.data[u]).filter((u) => u.drawingType !== k.DRAWING_DOM);
1378
+ const { scaleX: g, scaleY: c } = s.scene, a = i ? { ...i } : { startColumn: 0, endColumn: 0, endRow: 0, startRow: 0 }, h = l.order.map((u) => l.data[u]).filter((u) => u.drawingType !== V.DRAWING_DOM);
1379
1379
  return h.length ? (h.forEach((u) => {
1380
- if (!u.groupId && u.transform && ge.isDefine(u.transform.left) && ge.isDefine(u.transform.top) && ge.isDefine(u.transform.width) && ge.isDefine(u.transform.height)) {
1380
+ if (!u.groupId && u.transform && me.isDefine(u.transform.left) && me.isDefine(u.transform.top) && me.isDefine(u.transform.width) && me.isDefine(u.transform.height)) {
1381
1381
  const m = o.skeleton.getCellPositionByOffset(u.transform.left, u.transform.top, g, c, { x: 0, y: 0 }), f = o.skeleton.getCellPositionByOffset(u.transform.left + u.transform.width, u.transform.top + u.transform.height, g, c, { x: 0, y: 0 });
1382
1382
  m.column < a.startColumn && (a.startColumn = m.column), m.row < a.startRow && (a.startRow = m.row), a.endRow < f.row && (a.endRow = f.row), a.endColumn < f.column && (a.endColumn = f.column);
1383
1383
  }
@@ -1388,19 +1388,18 @@ let Le = class extends re {
1388
1388
  );
1389
1389
  }
1390
1390
  };
1391
- Le = Wi([
1392
- Oe(0, x(er)),
1393
- Oe(1, x(Vn)),
1394
- Oe(2, K),
1395
- Oe(3, J)
1396
- ], Le);
1397
- var Gi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, ki = (i, e, n, t) => {
1398
- for (var r = t > 1 ? void 0 : t ? Vi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1391
+ $e = Vi([
1392
+ Pe(0, x(nr)),
1393
+ Pe(1, x(kn)),
1394
+ Pe(2, z),
1395
+ Pe(3, J)
1396
+ ], $e);
1397
+ var ki = Object.defineProperty, Yi = Object.getOwnPropertyDescriptor, Fi = (i, e, n, t) => {
1398
+ for (var r = t > 1 ? void 0 : t ? Yi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
1399
1399
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
1400
- return t && r && Gi(e, n, r), r;
1400
+ return t && r && ki(e, n, r), r;
1401
1401
  }, Q = (i, e) => (n, t) => e(n, t, i);
1402
- const Yi = [
1403
- yt.id,
1402
+ const Xi = [
1404
1403
  Ot.id,
1405
1404
  Pt.id,
1406
1405
  Tt.id,
@@ -1408,9 +1407,9 @@ const Yi = [
1408
1407
  Ut.id,
1409
1408
  At.id,
1410
1409
  Nt.id,
1411
- nt.id,
1412
- rt.id,
1413
1410
  jt.id,
1411
+ rt.id,
1412
+ it.id,
1414
1413
  xt.id,
1415
1414
  Lt.id,
1416
1415
  $t.id,
@@ -1418,16 +1417,17 @@ const Yi = [
1418
1417
  Wt.id,
1419
1418
  Gt.id,
1420
1419
  Vt.id,
1421
- kt.id
1422
- ], Fi = [
1423
- _r.id,
1424
- vr.id,
1420
+ kt.id,
1421
+ Yt.id
1422
+ ], Hi = [
1425
1423
  Sr.id,
1426
1424
  Ir.id,
1427
1425
  Cr.id,
1428
- Rr.id
1426
+ Rr.id,
1427
+ Dr.id,
1428
+ Mr.id
1429
1429
  ];
1430
- let ot = class extends re {
1430
+ let at = class extends re {
1431
1431
  constructor(i, e, n, t, r, s, o, d, l) {
1432
1432
  super(), this._context = i, this._renderManagerService = e, this._commandService = n, this._selectionRenderService = t, this._skeletonManagerService = r, this._sheetInterceptorService = s, this._sheetDrawingService = o, this._drawingManagerService = d, this._univerInstanceService = l, this._sheetInterceptorListener(), this._commandListener(), this._sheetRefreshListener();
1433
1433
  }
@@ -1435,57 +1435,57 @@ let ot = class extends re {
1435
1435
  this.disposeWithMe(
1436
1436
  this._sheetInterceptorService.interceptCommand({
1437
1437
  getMutations: (i) => {
1438
- if (!Yi.includes(i.id))
1438
+ if (!Xi.includes(i.id))
1439
1439
  return { redos: [], undos: [] };
1440
1440
  if (i.params == null)
1441
1441
  return { redos: [], undos: [] };
1442
1442
  const e = i.id;
1443
- if (e === yt.id)
1443
+ if (e === Ot.id)
1444
1444
  return this._moveRowInterceptor(i.params, "insert");
1445
- if ([Gt.id, Vt.id, kt.id].includes(e))
1445
+ if ([Vt.id, kt.id, Yt.id].includes(e))
1446
1446
  return this._moveRangeInterceptor(i.params);
1447
- if (e === Ot.id)
1448
- return this._moveColInterceptor(i.params, "insert");
1449
1447
  if (e === Pt.id)
1450
- return this._moveRowInterceptor(i.params, "remove");
1448
+ return this._moveColInterceptor(i.params, "insert");
1451
1449
  if (e === Tt.id)
1450
+ return this._moveRowInterceptor(i.params, "remove");
1451
+ if (e === Et.id)
1452
1452
  return this._moveColInterceptor(i.params, "remove");
1453
- if (e === Et.id) {
1453
+ if (e === Ut.id) {
1454
1454
  const { range: n } = i.params;
1455
1455
  return this._getRangeMoveUndo(
1456
1456
  n,
1457
1457
  0
1458
1458
  /* deleteLeft */
1459
1459
  );
1460
- } else if (e === Ut.id) {
1460
+ } else if (e === At.id) {
1461
1461
  const { range: n } = i.params;
1462
1462
  return this._getRangeMoveUndo(
1463
1463
  n,
1464
1464
  1
1465
1465
  /* deleteUp */
1466
1466
  );
1467
- } else if (e === At.id) {
1467
+ } else if (e === Nt.id) {
1468
1468
  const { range: n } = i.params;
1469
1469
  return this._getRangeMoveUndo(
1470
1470
  n,
1471
1471
  2
1472
1472
  /* insertDown */
1473
1473
  );
1474
- } else if (e === Nt.id) {
1474
+ } else if (e === jt.id) {
1475
1475
  const { range: n } = i.params;
1476
1476
  return this._getRangeMoveUndo(
1477
1477
  n,
1478
1478
  3
1479
1479
  /* insertRight */
1480
1480
  );
1481
- } else if (e === Lt.id || e === $t.id) {
1481
+ } else if (e === $t.id || e === Bt.id) {
1482
1482
  const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n;
1483
1483
  return this._getDrawingUndoForRowVisible(t, r, s);
1484
- } else if (e === Bt.id || e === Wt.id) {
1484
+ } else if (e === Wt.id || e === Gt.id) {
1485
1485
  const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n;
1486
1486
  return this._getDrawingUndoForColVisible(t, r, s);
1487
- } else if (e === nt.id || e === rt.id || e === jt.id || e === xt.id) {
1488
- const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n, o = e === nt.id || e === rt.id;
1487
+ } else if (e === rt.id || e === it.id || e === xt.id || e === Lt.id) {
1488
+ const n = i.params, { unitId: t, subUnitId: r, ranges: s } = n, o = e === rt.id || e === it.id;
1489
1489
  return this._getDrawingUndoForRowAndColSize(t, r, s, o);
1490
1490
  }
1491
1491
  return { redos: [], undos: [] };
@@ -1786,7 +1786,7 @@ let ot = class extends re {
1786
1786
  const { unitId: r, subUnitId: s } = t, o = (R = (v = this._renderManagerService.getRenderById(r)) == null ? void 0 : v.with(q)) == null ? void 0 : R.getCurrentSkeleton();
1787
1787
  if (!o)
1788
1788
  return { redos: [], undos: [] };
1789
- const d = Te(o, n);
1789
+ const d = Ee(o, n);
1790
1790
  if (!d)
1791
1791
  return { redos: [], undos: [] };
1792
1792
  const { startX: l, endX: g, startY: c, endY: a } = d, h = this._sheetDrawingService.getDrawingData(r, s), u = [];
@@ -2076,7 +2076,7 @@ let ot = class extends re {
2076
2076
  _commandListener() {
2077
2077
  this.disposeWithMe(
2078
2078
  this._commandService.onCommandExecuted((i) => {
2079
- i.id === Dr.id && setTimeout(() => {
2079
+ i.id === br.id && setTimeout(() => {
2080
2080
  const e = i.params, { unitId: n, subUnitId: t } = e, r = this._drawingManagerService.drawingManagerData, s = [], o = [];
2081
2081
  Object.keys(r).forEach((d) => {
2082
2082
  const l = r[d];
@@ -2098,7 +2098,7 @@ let ot = class extends re {
2098
2098
  _sheetRefreshListener() {
2099
2099
  this.disposeWithMe(
2100
2100
  this._commandService.onCommandExecuted((i) => {
2101
- Fi.includes(i.id) && requestIdleCallback(() => {
2101
+ Hi.includes(i.id) && requestIdleCallback(() => {
2102
2102
  const e = i.params, { unitId: n, subUnitId: t, ranges: r } = e;
2103
2103
  this._refreshDrawingTransform(n, t, r);
2104
2104
  });
@@ -2114,7 +2114,7 @@ let ot = class extends re {
2114
2114
  const { from: c, to: a } = d, { row: h, column: u } = c, { row: m, column: f } = a;
2115
2115
  for (let p = 0; p < n.length; p++) {
2116
2116
  const I = n[p], { startRow: S, endRow: v, startColumn: R, endColumn: _ } = I;
2117
- if (Rn.intersects(
2117
+ if (Dn.intersects(
2118
2118
  {
2119
2119
  startRow: S,
2120
2120
  endRow: v,
@@ -2143,23 +2143,23 @@ let ot = class extends re {
2143
2143
  }), r.length !== 0 && (this._drawingManagerService.refreshTransform(r), this._commandService.syncExecuteCommand(j.id, [i]));
2144
2144
  }
2145
2145
  };
2146
- ot = ki([
2146
+ at = Fi([
2147
2147
  Q(1, J),
2148
2148
  Q(2, W),
2149
- Q(3, pe),
2149
+ Q(3, we),
2150
2150
  Q(4, x(q)),
2151
- Q(5, x(at)),
2152
- Q(6, F),
2153
- Q(7, K),
2154
- Q(8, fe)
2155
- ], ot);
2156
- var Xi = Object.defineProperty, Hi = Object.getOwnPropertyDescriptor, zi = (i, e, n, t) => {
2157
- for (var r = t > 1 ? void 0 : t ? Hi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2151
+ Q(5, x(ct)),
2152
+ Q(6, Y),
2153
+ Q(7, z),
2154
+ Q(8, pe)
2155
+ ], at);
2156
+ var zi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, Ji = (i, e, n, t) => {
2157
+ for (var r = t > 1 ? void 0 : t ? Ki(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2158
2158
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2159
- return t && r && Xi(e, n, r), r;
2159
+ return t && r && zi(e, n, r), r;
2160
2160
  }, se = (i, e) => (n, t) => e(n, t, i);
2161
- function Ki(i, e, n, t) {
2162
- const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(zn.VIEW_MAIN), d = {
2161
+ function Zi(i, e, n, t) {
2162
+ const { scaleX: r, scaleY: s } = e.getAncestorScale(), o = e.getViewport(Jn.VIEW_MAIN), d = {
2163
2163
  left: !0,
2164
2164
  top: !0
2165
2165
  };
@@ -2192,13 +2192,13 @@ function Ki(i, e, n, t) {
2192
2192
  absolute: d
2193
2193
  };
2194
2194
  }
2195
- const Qe = (i, e, n, t) => {
2195
+ const et = (i, e, n, t) => {
2196
2196
  const { scene: r } = e, { left: s, top: o, width: d, height: l, angle: g } = i, c = {
2197
2197
  left: s,
2198
2198
  right: s + d,
2199
2199
  top: o,
2200
2200
  bottom: o + l
2201
- }, a = Ki(c, r, n, t), { scaleX: h, scaleY: u } = r.getAncestorScale();
2201
+ }, a = Zi(c, r, n, t), { scaleX: h, scaleY: u } = r.getAncestorScale();
2202
2202
  return {
2203
2203
  startX: a.left,
2204
2204
  endX: a.right,
@@ -2210,22 +2210,22 @@ const Qe = (i, e, n, t) => {
2210
2210
  absolute: a.absolute
2211
2211
  };
2212
2212
  };
2213
- let $e = class extends re {
2213
+ let Be = class extends re {
2214
2214
  constructor(e, n, t, r, s, o, d) {
2215
2215
  super();
2216
- V(this, "_domLayerMap", /* @__PURE__ */ new Map());
2217
- V(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
2218
- V(this, "_transformChange$", new Ke());
2219
- V(this, "transformChange$", this._transformChange$.asObservable());
2220
- V(this, "_add$", new Ke());
2221
- V(this, "add$", this._add$.asObservable());
2222
- V(this, "_remove$", new Ke());
2223
- V(this, "remove$", this._remove$.asObservable());
2224
- V(this, "_hooks", []);
2216
+ G(this, "_domLayerMap", /* @__PURE__ */ new Map());
2217
+ G(this, "_domLayerInfoMap", /* @__PURE__ */ new Map());
2218
+ G(this, "_transformChange$", new Je());
2219
+ G(this, "transformChange$", this._transformChange$.asObservable());
2220
+ G(this, "_add$", new Je());
2221
+ G(this, "add$", this._add$.asObservable());
2222
+ G(this, "_remove$", new Je());
2223
+ G(this, "remove$", this._remove$.asObservable());
2224
+ G(this, "_hooks", []);
2225
2225
  this._renderManagerService = e, this._univerInstanceService = n, this._commandService = t, this._drawingManagerService = r, this._canvasFloatDomService = s, this._sheetDrawingService = o, this._lifecycleService = d, this._drawingAddListener(), this._featureUpdateListener(), this._deleteListener(), this._bindScrollEvent();
2226
2226
  }
2227
2227
  _bindScrollEvent() {
2228
- this._lifecycleService.lifecycle$.pipe(ae((e) => e === Mn.Rendered), gr(1)).subscribe(() => {
2228
+ this._lifecycleService.lifecycle$.pipe(ae((e) => e === bn.Rendered), fr(1)).subscribe(() => {
2229
2229
  this._scrollUpdateListener();
2230
2230
  });
2231
2231
  }
@@ -2259,18 +2259,18 @@ let $e = class extends re {
2259
2259
  // eslint-disable-next-line max-lines-per-function
2260
2260
  this._drawingManagerService.add$.subscribe((e) => {
2261
2261
  e.forEach((n) => {
2262
- var ut, ht, gt;
2262
+ var ht, gt, mt;
2263
2263
  const { unitId: t, subUnitId: r, drawingId: s } = n, o = ce(this._univerInstanceService, { unitId: t, subUnitId: r }), d = this._drawingManagerService.getDrawingByParam(n), l = this._univerInstanceService.getUnit(t);
2264
2264
  if (!l)
2265
2265
  return;
2266
2266
  const g = l.getActiveSheet().getSheetId();
2267
2267
  if (!d || !o)
2268
2268
  return;
2269
- const c = (ut = this._renderManagerService.getRenderById(t)) == null ? void 0 : ut.with(q).getWorksheetSkeleton(r);
2269
+ const c = (ht = this._renderManagerService.getRenderById(t)) == null ? void 0 : ht.with(q).getWorksheetSkeleton(r);
2270
2270
  if (!c)
2271
2271
  return;
2272
2272
  const { transform: a, drawingType: h, data: u } = d;
2273
- if (h !== k.DRAWING_DOM && h !== k.DRAWING_CHART)
2273
+ if (h !== V.DRAWING_DOM && h !== V.DRAWING_CHART)
2274
2274
  return;
2275
2275
  const m = this._getSceneAndTransformerByDrawingSearch(t);
2276
2276
  if (m == null)
@@ -2280,7 +2280,7 @@ let $e = class extends re {
2280
2280
  return !0;
2281
2281
  if (g !== r)
2282
2282
  return;
2283
- const { left: I, top: S, width: v, height: R, angle: _, flipX: C, flipY: w, skewX: O, skewY: b } = a, A = ze({ unitId: t, subUnitId: r, drawingId: s }), E = f.getObject(A);
2283
+ const { left: I, top: S, width: v, height: R, angle: _, flipX: C, flipY: w, skewX: O, skewY: b } = a, A = Ke({ unitId: t, subUnitId: r, drawingId: s }), E = f.getObject(A);
2284
2284
  if (E != null) {
2285
2285
  E.transformByState({ left: I, top: S, width: v, height: R, angle: _, flipX: C, flipY: w, skewX: O, skewY: b });
2286
2286
  return;
@@ -2291,46 +2291,49 @@ let $e = class extends re {
2291
2291
  width: v,
2292
2292
  height: R,
2293
2293
  zIndex: this._drawingManagerService.getDrawingOrder(t, r).length - 1
2294
- }, D = h === k.DRAWING_CHART;
2294
+ }, D = h === V.DRAWING_CHART;
2295
2295
  D && (M.fill = "white", M.rotateEnabled = !1, u && u.border && (M.stroke = u.border), M.paintFirst = "stroke", M.strokeWidth = 1, M.borderEnabled = !1, M.radius = 8);
2296
- const U = new wt(A, M);
2297
- D && U.setObjectType(Xn.CHART), f.addObject(U, Hn), d.allowTransform !== !1 && f.attachTransformerTo(U);
2298
- const L = this._ensureMap(t, r), Z = new bn(), un = Qe(U, m.renderObject, c.skeleton, o.worksheet), Fe = new mr(un), hn = {
2296
+ const U = new _t(A, M);
2297
+ D && U.setObjectType(Hn.CHART), f.addObject(U, zn), d.allowTransform !== !1 && f.attachTransformerTo(U);
2298
+ const L = this._ensureMap(t, r), Z = new yn(), hn = et(U, m.renderObject, c.skeleton, o.worksheet), Xe = new pr(hn), gn = {
2299
2299
  dispose: Z,
2300
2300
  rect: U,
2301
- position$: Fe,
2301
+ position$: Xe,
2302
2302
  unitId: t,
2303
2303
  subUnitId: r
2304
2304
  };
2305
2305
  this._canvasFloatDomService.addFloatDom({
2306
- position$: Fe,
2306
+ position$: Xe,
2307
2307
  id: s,
2308
2308
  componentKey: d.componentKey,
2309
- onPointerDown: (G) => {
2310
- p.dispatchEvent(new PointerEvent(G.type, G));
2309
+ onPointerDown: (K) => {
2310
+ const de = this._createNewEvent(K);
2311
+ p.dispatchEvent(new PointerEvent(de.type, de));
2311
2312
  },
2312
- onPointerMove: (G) => {
2313
- p.dispatchEvent(new PointerEvent(G.type, G));
2313
+ onPointerMove: (K) => {
2314
+ const de = this._createNewEvent(K);
2315
+ p.dispatchEvent(de);
2314
2316
  },
2315
- onPointerUp: (G) => {
2316
- p.dispatchEvent(new PointerEvent(G.type, G));
2317
+ onPointerUp: (K) => {
2318
+ const de = this._createNewEvent(K);
2319
+ p.dispatchEvent(de);
2317
2320
  },
2318
- onWheel: (G) => {
2319
- p.dispatchEvent(new WheelEvent(G.type, G));
2321
+ onWheel: (K) => {
2322
+ p.dispatchEvent(new WheelEvent(K.type, K));
2320
2323
  },
2321
- props: (gt = (ht = L.get(s)) == null ? void 0 : ht.props) != null ? gt : this._getFloatDomProps(s),
2324
+ props: (mt = (gt = L.get(s)) == null ? void 0 : gt.props) != null ? mt : this._getFloatDomProps(s),
2322
2325
  data: u,
2323
2326
  unitId: t
2324
2327
  });
2325
- const lt = U.onTransformChange$.subscribeEvent(() => {
2326
- const G = Qe(U, m.renderObject, c.skeleton, o.worksheet);
2327
- Fe.next(
2328
- G
2328
+ const ut = U.onTransformChange$.subscribeEvent(() => {
2329
+ const K = et(U, m.renderObject, c.skeleton, o.worksheet);
2330
+ Xe.next(
2331
+ K
2329
2332
  );
2330
2333
  });
2331
2334
  Z.add(() => {
2332
2335
  this._canvasFloatDomService.removeFloatDom(s);
2333
- }), lt && Z.add(lt), this._domLayerInfoMap.set(s, hn), L.set(s, {
2336
+ }), ut && Z.add(ut), this._domLayerInfoMap.set(s, gn), L.set(s, {
2334
2337
  ...L.get(s)
2335
2338
  });
2336
2339
  });
@@ -2338,7 +2341,7 @@ let $e = class extends re {
2338
2341
  ), this.disposeWithMe(
2339
2342
  this._drawingManagerService.remove$.subscribe((e) => {
2340
2343
  e.forEach((n) => {
2341
- const { unitId: t, subUnitId: r, drawingId: s } = n, o = ze({ unitId: t, subUnitId: r, drawingId: s }), d = this._getSceneAndTransformerByDrawingSearch(t);
2344
+ const { unitId: t, subUnitId: r, drawingId: s } = n, o = Ke({ unitId: t, subUnitId: r, drawingId: s }), d = this._getSceneAndTransformerByDrawingSearch(t);
2342
2345
  if (d == null)
2343
2346
  return;
2344
2347
  const { transformer: l, scene: g } = d, c = g.getObject(o);
@@ -2347,6 +2350,10 @@ let $e = class extends re {
2347
2350
  })
2348
2351
  );
2349
2352
  }
2353
+ _createNewEvent(e) {
2354
+ const n = Kn(e);
2355
+ return new PointerEvent(e.type, n);
2356
+ }
2350
2357
  _scrollUpdateListener() {
2351
2358
  const e = (n, t) => {
2352
2359
  var g;
@@ -2354,33 +2361,33 @@ let $e = class extends re {
2354
2361
  !r || !d || !l || o.forEach((c) => {
2355
2362
  const a = this._domLayerInfoMap.get(c);
2356
2363
  if (a) {
2357
- const h = Qe(a.rect, r.renderObject, l.skeleton, d.worksheet);
2364
+ const h = et(a.rect, r.renderObject, l.skeleton, d.worksheet);
2358
2365
  a.position$.next(h);
2359
2366
  }
2360
2367
  });
2361
2368
  };
2362
2369
  this.disposeWithMe(
2363
- this._univerInstanceService.getCurrentTypeOfUnit$(Y.UNIVER_SHEET).pipe(
2370
+ this._univerInstanceService.getCurrentTypeOfUnit$(k.UNIVER_SHEET).pipe(
2364
2371
  ae((n) => !!n),
2365
- Ee((n) => {
2372
+ Ue((n) => {
2366
2373
  const t = this._renderManagerService.getRenderById(n.getUnitId());
2367
2374
  return t ? { render: t, unitId: n.getUnitId(), subUnitId: n.getActiveSheet().getSheetId() } : null;
2368
2375
  }),
2369
2376
  ae((n) => !!n),
2370
- fr(
2371
- (n) => yn(n.render.scene.getViewport(tr.VIEW_MAIN).onScrollAfter$).pipe(Ee(() => ({ unitId: n.unitId, subUnitId: n.subUnitId })))
2377
+ wr(
2378
+ (n) => On(n.render.scene.getViewport(rr.VIEW_MAIN).onScrollAfter$).pipe(Ue(() => ({ unitId: n.unitId, subUnitId: n.subUnitId })))
2372
2379
  )
2373
2380
  ).subscribe(({ unitId: n, subUnitId: t }) => {
2374
2381
  e(n, t);
2375
2382
  })
2376
2383
  ), this.disposeWithMe(this._commandService.onCommandExecuted((n) => {
2377
2384
  var t, r;
2378
- if (n.id === nr.id) {
2385
+ if (n.id === ir.id) {
2379
2386
  const s = n.params, { unitId: o } = s;
2380
2387
  Array.from((r = (t = this._domLayerMap.get(o)) == null ? void 0 : t.keys()) != null ? r : []).forEach((l) => {
2381
2388
  e(o, l);
2382
2389
  });
2383
- } else if (n.id === Mr.id) {
2390
+ } else if (n.id === yr.id) {
2384
2391
  const { unitId: s, subUnitId: o } = n.params;
2385
2392
  e(s, o);
2386
2393
  }
@@ -2388,7 +2395,7 @@ let $e = class extends re {
2388
2395
  }
2389
2396
  _getPosition(e, n) {
2390
2397
  var h;
2391
- const { startX: t, endX: r, startY: s, endY: o } = e, d = (h = this._renderManagerService.getRenderById(n)) == null ? void 0 : h.with(pe);
2398
+ const { startX: t, endX: r, startY: s, endY: o } = e, d = (h = this._renderManagerService.getRenderById(n)) == null ? void 0 : h.with(we);
2392
2399
  if (d == null)
2393
2400
  return;
2394
2401
  const l = d.getSelectionCellByPosition(t, s);
@@ -2418,7 +2425,7 @@ let $e = class extends re {
2418
2425
  this._drawingManagerService.update$.subscribe((e) => {
2419
2426
  e.forEach((n) => {
2420
2427
  const t = this._drawingManagerService.getDrawingByParam(n);
2421
- if (!t || t.drawingType !== k.DRAWING_DOM && t.drawingType !== k.DRAWING_CHART)
2428
+ if (!t || t.drawingType !== V.DRAWING_DOM && t.drawingType !== V.DRAWING_CHART)
2422
2429
  return;
2423
2430
  const r = {
2424
2431
  ...t.transform
@@ -2440,8 +2447,8 @@ let $e = class extends re {
2440
2447
  updateFloatDomProps(e, n, t, r) {
2441
2448
  const s = this._domLayerInfoMap.get(t), o = this._getSceneAndTransformerByDrawingSearch(e);
2442
2449
  if (s && o) {
2443
- const { scene: d } = o, l = ze({ unitId: e, subUnitId: n, drawingId: t }), g = d.getObject(l);
2444
- g && g instanceof wt && g.setProps(r);
2450
+ const { scene: d } = o, l = Ke({ unitId: e, subUnitId: n, drawingId: t }), g = d.getObject(l);
2451
+ g && g instanceof _t && g.setProps(r);
2445
2452
  }
2446
2453
  }
2447
2454
  addFloatDomToPosition(e, n) {
@@ -2451,7 +2458,7 @@ let $e = class extends re {
2451
2458
  });
2452
2459
  if (!t)
2453
2460
  throw new Error("cannot find current target!");
2454
- const { unitId: r, subUnitId: s } = t, { initPosition: o, componentKey: d, data: l, allowTransform: g = !0 } = e, c = n != null ? n : On(), a = this._getPosition(o, r);
2461
+ const { unitId: r, subUnitId: s } = t, { initPosition: o, componentKey: d, data: l, allowTransform: g = !0 } = e, c = n != null ? n : Pn(), a = this._getPosition(o, r);
2455
2462
  if (a == null)
2456
2463
  return;
2457
2464
  this._ensureMap(r, s).set(c, e);
@@ -2459,7 +2466,7 @@ let $e = class extends re {
2459
2466
  unitId: r,
2460
2467
  subUnitId: s,
2461
2468
  drawingId: c,
2462
- drawingType: e.type || k.DRAWING_DOM,
2469
+ drawingType: e.type || V.DRAWING_DOM,
2463
2470
  componentKey: d,
2464
2471
  sheetTransform: a,
2465
2472
  transform: {
@@ -2471,7 +2478,7 @@ let $e = class extends re {
2471
2478
  data: l,
2472
2479
  allowTransform: g
2473
2480
  };
2474
- return this._commandService.executeCommand(ke.id, {
2481
+ return this._commandService.executeCommand(Ye.id, {
2475
2482
  unitId: r,
2476
2483
  drawings: [u]
2477
2484
  }), this._add$.next({ unitId: r, subUnitId: s, id: c }), {
@@ -2506,86 +2513,86 @@ let $e = class extends re {
2506
2513
  };
2507
2514
  }
2508
2515
  };
2509
- $e = zi([
2516
+ Be = Ji([
2510
2517
  se(0, x(J)),
2511
- se(1, fe),
2518
+ se(1, pe),
2512
2519
  se(2, x(W)),
2513
- se(3, K),
2514
- se(4, x(hr)),
2515
- se(5, F),
2516
- se(6, x(Dn))
2517
- ], $e);
2518
- var dn = Object.defineProperty, Ji = Object.getOwnPropertyDescriptor, Zi = (i, e, n) => e in i ? dn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, qi = (i, e, n, t) => {
2519
- for (var r = t > 1 ? void 0 : t ? Ji(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2520
+ se(3, z),
2521
+ se(4, x(mr)),
2522
+ se(5, Y),
2523
+ se(6, x(Mn))
2524
+ ], Be);
2525
+ var ln = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, Qi = (i, e, n) => e in i ? ln(i, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[e] = n, es = (i, e, n, t) => {
2526
+ for (var r = t > 1 ? void 0 : t ? qi(e, n) : e, s = i.length - 1, o; s >= 0; s--)
2520
2527
  (o = i[s]) && (r = (t ? o(e, n, r) : o(r)) || r);
2521
- return t && r && dn(e, n, r), r;
2522
- }, et = (i, e) => (n, t) => e(n, t, i), ln = (i, e, n) => Zi(i, typeof e != "symbol" ? e + "" : e, n);
2523
- const Qi = "SHEET_IMAGE_UI_PLUGIN";
2524
- let Be = class extends Tn {
2525
- constructor(i = Pr, e, n, t) {
2528
+ return t && r && ln(e, n, r), r;
2529
+ }, tt = (i, e) => (n, t) => e(n, t, i), un = (i, e, n) => Qi(i, typeof e != "symbol" ? e + "" : e, n);
2530
+ const ts = "SHEET_IMAGE_UI_PLUGIN";
2531
+ let We = class extends En {
2532
+ constructor(i = Er, e, n, t) {
2526
2533
  super(), this._config = i, this._injector = e, this._renderManagerService = n, this._configService = t;
2527
2534
  const { menu: r, ...s } = this._config;
2528
- r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(Or, s);
2535
+ r && this._configService.setConfig("menu", r, { merge: !0 }), this._configService.setConfig(Tr, s);
2529
2536
  }
2530
2537
  onStarting() {
2531
- En(this._injector, [
2538
+ Un(this._injector, [
2539
+ [Be],
2540
+ [je],
2541
+ [Ae],
2532
2542
  [$e],
2533
- [Ne],
2534
- [Ue],
2535
2543
  [Le],
2536
- [xe],
2537
- [je]
2538
- ]), Xe(this._injector, [
2539
- [$e]
2544
+ [xe]
2545
+ ]), He(this._injector, [
2546
+ [Be]
2540
2547
  ]);
2541
2548
  }
2542
2549
  onReady() {
2543
- Xe(this._injector, [
2544
- [je]
2550
+ He(this._injector, [
2551
+ [xe]
2545
2552
  ]);
2546
2553
  }
2547
2554
  onRendered() {
2548
- this._registerRenderModules(), Xe(this._injector, [
2549
- [xe],
2555
+ this._registerRenderModules(), He(this._injector, [
2550
2556
  [Le],
2551
- [Ne]
2557
+ [$e],
2558
+ [je]
2552
2559
  ]);
2553
2560
  }
2554
2561
  onSteady() {
2555
- this._injector.get(Ue);
2562
+ this._injector.get(Ae);
2556
2563
  }
2557
2564
  _registerRenderModules() {
2558
2565
  [
2559
- [Ae],
2560
- [ot],
2561
- [st]
2566
+ [Ne],
2567
+ [at],
2568
+ [ot]
2562
2569
  ].forEach((i) => {
2563
- this.disposeWithMe(this._renderManagerService.registerRenderModule(Y.UNIVER_SHEET, i));
2570
+ this.disposeWithMe(this._renderManagerService.registerRenderModule(k.UNIVER_SHEET, i));
2564
2571
  });
2565
2572
  }
2566
2573
  };
2567
- ln(Be, "type", Y.UNIVER_SHEET);
2568
- ln(Be, "pluginName", Qi);
2569
- Be = qi([
2570
- Pn(xn, kn, Kn),
2571
- et(1, x(Ct)),
2572
- et(2, J),
2573
- et(3, Un)
2574
- ], Be);
2574
+ un(We, "type", k.UNIVER_SHEET);
2575
+ un(We, "pluginName", ts);
2576
+ We = es([
2577
+ Tn(Ln, Yn, Zn),
2578
+ tt(1, x(Rt)),
2579
+ tt(2, J),
2580
+ tt(3, An)
2581
+ ], We);
2575
2582
  export {
2576
2583
  j as ClearSheetDrawingTransformerOperation,
2577
- tn as DeleteDrawingsCommand,
2578
- Kt as EditSheetDrawingOperation,
2579
- nn as GroupSheetDrawingCommand,
2580
- an as IMAGE_MENU_ID,
2581
- dt as InsertFloatImageCommand,
2582
- ke as InsertSheetDrawingCommand,
2583
- we as MoveDrawingsCommand,
2584
- Ge as RemoveSheetDrawingCommand,
2585
- rn as SetDrawingArrangeCommand,
2586
- Ye as SetSheetDrawingCommand,
2587
- $e as SheetCanvasFloatDomManagerService,
2588
- zt as SidebarSheetDrawingOperation,
2589
- sn as UngroupSheetDrawingCommand,
2590
- Be as UniverSheetsDrawingUIPlugin
2584
+ nn as DeleteDrawingsCommand,
2585
+ Jt as EditSheetDrawingOperation,
2586
+ rn as GroupSheetDrawingCommand,
2587
+ cn as IMAGE_MENU_ID,
2588
+ lt as InsertFloatImageCommand,
2589
+ Ye as InsertSheetDrawingCommand,
2590
+ _e as MoveDrawingsCommand,
2591
+ Ve as RemoveSheetDrawingCommand,
2592
+ sn as SetDrawingArrangeCommand,
2593
+ Fe as SetSheetDrawingCommand,
2594
+ Be as SheetCanvasFloatDomManagerService,
2595
+ Kt as SidebarSheetDrawingOperation,
2596
+ on as UngroupSheetDrawingCommand,
2597
+ We as UniverSheetsDrawingUIPlugin
2591
2598
  };