@univerjs/drawing-ui 0.1.13 → 0.1.14

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,21 +1,102 @@
1
- var yt = Object.defineProperty;
2
- var Et = (a, n, t) => n in a ? yt(a, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[n] = t;
3
- var ne = (a, n, t) => (Et(a, typeof n != "symbol" ? n + "" : n, t), t);
4
- import { DrawingTypeEnum as oe, IDrawingManagerService as se, ArrangeTypeEnum as Pe, getDrawingShapeKeyByDrawingSearch as V, ImageSourceType as Rt, IImageIoService as Mt } from "@univerjs/drawing";
5
- import { CommandType as be, LocaleService as J, debounce as ye, ICommandService as le, Tools as Ot, UniverInstanceType as xe, Disposable as He, checkIfMove as tt, toDisposable as K, OnLifecycle as Le, LifecycleStages as Ae, IUniverInstanceService as ze, Plugin as Nt } from "@univerjs/core";
1
+ var Mt = Object.defineProperty;
2
+ var Ot = (a, n, e) => n in a ? Mt(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e;
3
+ var ee = (a, n, e) => (Ot(a, typeof n != "symbol" ? n + "" : n, e), e);
4
+ import { getDrawingShapeKeyByDrawingSearch as G, DrawingTypeEnum as ne, ImageSourceType as Nt, IDrawingManagerService as re, IImageIoService as nt, ArrangeTypeEnum as Ie } from "@univerjs/drawing";
5
+ import { Group as Ce, DRAWING_OBJECT_LAYER_INDEX as $e, Image as We, IRenderManagerService as ue, getGroupState as Dt, transformObjectOutOfGroup as Tt, RENDER_CLASS_TYPE as Ye, Shape as Bt, Rect as jt, Canvas as Ut, precisionTo as be, CURSOR_TYPE as Te, Vector2 as xe, degToRad as Xe } from "@univerjs/engine-render";
6
+ import { UniverInstanceType as Ge, CommandType as ve, LocaleService as X, debounce as Pe, ICommandService as le, Tools as Ht, Disposable as Ue, checkIfMove as rt, toDisposable as F, OnLifecycle as He, LifecycleStages as Ae, IUniverInstanceService as ze, Plugin as At } from "@univerjs/core";
6
7
  import { useDependency as x } from "@wendellhu/redi/react-bindings";
7
- import l, { forwardRef as q, useRef as nt, createElement as Q, useState as A, useEffect as Ie } from "react";
8
- import { IRenderManagerService as fe, getGroupState as Dt, transformObjectOutOfGroup as Tt, Group as _e, DRAWING_OBJECT_LAYER_INDEX as $e, RENDER_CLASS_TYPE as Ye, Shape as Bt, Rect as jt, Canvas as Ut, Image as We, precisionTo as Ee, CURSOR_TYPE as je, Vector2 as Ve, degToRad as Xe } from "@univerjs/engine-render";
9
- import { Button as ie, InputNumber as Ce, Checkbox as Ht, Select as rt, Dropdown as Lt, MessageType as Je } from "@univerjs/design";
10
- import D from "clsx";
11
- import { Inject as de, Injector as at } from "@wendellhu/redi";
12
- import { ComponentManager as At, IMenuService as xt, IMessageService as Vt, IDialogService as Gt } from "@univerjs/ui";
13
- function Se(a, n) {
14
- const t = [];
15
- return a.forEach((e) => {
16
- const { oKey: r, left: o, top: i, height: s, width: c, angle: g } = e, u = n.getDrawingOKey(r);
8
+ import l, { forwardRef as J, useRef as at, createElement as q, useState as L, useEffect as _e } from "react";
9
+ import { Button as oe, InputNumber as he, Checkbox as Lt, Select as it, Dropdown as xt, MessageType as Je } from "@univerjs/design";
10
+ import T from "clsx";
11
+ import { Inject as se, Injector as ot } from "@wendellhu/redi";
12
+ import { ComponentManager as Gt, IMenuService as Vt, IMessageService as Wt, IDialogService as kt } from "@univerjs/ui";
13
+ function $t(a, n, e, t) {
14
+ const r = t.getDrawingByParam(a);
15
+ if (r == null)
16
+ return;
17
+ const o = G(a), i = e.getObject(o);
18
+ if (i && !(i instanceof Ce))
19
+ return;
20
+ if (i != null) {
21
+ i.addObject(n);
22
+ return;
23
+ }
24
+ const s = new Ce(o);
25
+ e.addObject(s, $e).attachTransformerTo(s), s.addObject(n);
26
+ const { transform: c } = r;
27
+ c && s.transformByState(
28
+ {
29
+ left: c.left,
30
+ top: c.top,
31
+ angle: c.angle
32
+ }
33
+ );
34
+ }
35
+ function st(a) {
36
+ const n = a.getFocusedUnit();
37
+ if (n == null)
38
+ return;
39
+ const e = n.getUnitId();
40
+ let t;
41
+ return n.type === Ge.UNIVER_SHEET ? t = n.getActiveSheet().getSheetId() : (n.type === Ge.UNIVER_DOC || n.type === Ge.UNIVER_SLIDE) && (t = e), { unitId: e, subUnitId: t };
42
+ }
43
+ var zt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, Kt = (a, n, e, t) => {
44
+ for (var r = t > 1 ? void 0 : t ? Ft(n, e) : n, o = a.length - 1, i; o >= 0; o--)
45
+ (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
46
+ return t && r && zt(n, e, r), r;
47
+ }, qe = (a, n) => (e, t) => n(e, t, a);
48
+ let Be = class {
49
+ constructor(a, n) {
50
+ this._drawingManagerService = a, this._imageIoService = n;
51
+ }
52
+ async renderImage(a, n) {
53
+ const { transform: e, drawingType: t, source: r, imageSourceType: o, srcRect: i, prstGeom: s, groupId: c, unitId: g, subUnitId: u, drawingId: d } = a;
54
+ if (t !== ne.DRAWING_IMAGE || e == null)
55
+ return;
56
+ const { left: h, top: f, width: v, height: w, angle: p, flipX: R, flipY: _, skewX: O, skewY: S } = e, P = G({ unitId: g, subUnitId: u, drawingId: d }), I = n.getObject(P);
57
+ if (I != null) {
58
+ I.transformByState({ left: h, top: f, width: v, height: w, angle: p, flipX: R, flipY: _, skewX: O, skewY: S });
59
+ return;
60
+ }
61
+ const E = this._drawingManagerService.getDrawingOrder(g, u), y = E.indexOf(d), b = { ...e, zIndex: y === -1 ? E.length - 1 : y }, M = this._imageIoService.getImageSourceCache(r, o);
62
+ let j = !1;
63
+ if (M != null)
64
+ b.image = M;
65
+ else {
66
+ if (o === Nt.UUID)
67
+ try {
68
+ b.url = await this._imageIoService.getImage(r);
69
+ } catch (ce) {
70
+ console.error(ce);
71
+ return;
72
+ }
73
+ else
74
+ b.url = r;
75
+ j = !0;
76
+ }
77
+ b.printable = !0;
78
+ const D = new We(P, b);
79
+ return j && this._imageIoService.addImageSourceCache(r, o, D.getNative()), n.addObject(D, $e).attachTransformerTo(D), c && $t({ drawingId: c, unitId: g, subUnitId: u }, D, n, this._drawingManagerService), s != null && D.setPrstGeom(s), i != null && D.setSrcRect(i), D;
80
+ }
81
+ renderDrawing(a, n) {
82
+ const e = this._drawingManagerService.getDrawingByParam(a);
83
+ if (e != null)
84
+ switch (e.drawingType) {
85
+ case ne.DRAWING_IMAGE:
86
+ return this.renderImage(e, n);
87
+ }
88
+ }
89
+ };
90
+ Be = Kt([
91
+ qe(0, re),
92
+ qe(1, nt)
93
+ ], Be);
94
+ function we(a, n) {
95
+ const e = [];
96
+ return a.forEach((t) => {
97
+ const { oKey: r, left: o, top: i, height: s, width: c, angle: g } = t, u = n.getDrawingOKey(r);
17
98
  if (u == null)
18
- return t.push(null), !0;
99
+ return e.push(null), !0;
19
100
  const { unitId: d, subUnitId: h, drawingId: f, drawingType: v } = u, w = {
20
101
  unitId: d,
21
102
  subUnitId: h,
@@ -29,169 +110,169 @@ function Se(a, n) {
29
110
  angle: g
30
111
  }
31
112
  };
32
- v === oe.DRAWING_IMAGE && (w.srcRect = e.srcRect), t.push(w);
33
- }), t;
113
+ v === ne.DRAWING_IMAGE && (w.srcRect = t.srcRect), e.push(w);
114
+ }), e;
34
115
  }
35
- const it = {
116
+ const lt = {
36
117
  id: "sheet.operation.image-reset-size",
37
- type: be.OPERATION,
118
+ type: ve.OPERATION,
38
119
  handler: (a, n) => !0
39
120
  }, ke = {
40
121
  id: "sheet.operation.open-image-crop",
41
- type: be.OPERATION,
122
+ type: ve.OPERATION,
42
123
  handler: (a, n) => !0
43
- }, he = {
124
+ }, ge = {
44
125
  id: "sheet.operation.close-image-crop",
45
- type: be.OPERATION,
126
+ type: ve.OPERATION,
46
127
  handler: (a, n) => !0
47
128
  };
48
129
  var H = /* @__PURE__ */ ((a) => (a.FREE = "0", a.R1_1 = "1", a.R16_9 = "2", a.R9_16 = "3", a.R5_4 = "4", a.R4_5 = "5", a.R4_3 = "6", a.R3_4 = "7", a.R3_2 = "8", a.R2_3 = "9", a))(H || {});
49
- const Ue = {
130
+ const je = {
50
131
  id: "sheet.operation.Auto-image-crop",
51
- type: be.OPERATION,
132
+ type: ve.OPERATION,
52
133
  handler: (a, n) => !0
53
134
  };
54
- var z = function() {
55
- return z = Object.assign || function(a) {
56
- for (var n, t = 1, e = arguments.length; t < e; t++) {
57
- n = arguments[t];
135
+ var k = function() {
136
+ return k = Object.assign || function(a) {
137
+ for (var n, e = 1, t = arguments.length; e < t; e++) {
138
+ n = arguments[e];
58
139
  for (var r in n)
59
140
  Object.prototype.hasOwnProperty.call(n, r) && (a[r] = n[r]);
60
141
  }
61
142
  return a;
62
- }, z.apply(this, arguments);
63
- }, Wt = function(a, n) {
64
- var t = {};
65
- for (var e in a)
66
- Object.prototype.hasOwnProperty.call(a, e) && n.indexOf(e) < 0 && (t[e] = a[e]);
143
+ }, k.apply(this, arguments);
144
+ }, Zt = function(a, n) {
145
+ var e = {};
146
+ for (var t in a)
147
+ Object.prototype.hasOwnProperty.call(a, t) && n.indexOf(t) < 0 && (e[t] = a[t]);
67
148
  if (a != null && typeof Object.getOwnPropertySymbols == "function")
68
- for (var r = 0, e = Object.getOwnPropertySymbols(a); r < e.length; r++)
69
- n.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(a, e[r]) && (t[e[r]] = a[e[r]]);
70
- return t;
71
- }, ee = q(function(a, n) {
72
- var t = a.icon, e = a.id, r = a.className, o = a.extend, i = Wt(a, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(e, " ").concat(r || "").trim(), c = nt("_".concat($t()));
73
- return ot(t, "".concat(e), { defIds: t.defIds, idSuffix: c.current }, z({ ref: n, className: s }, i), o);
149
+ for (var r = 0, t = Object.getOwnPropertySymbols(a); r < t.length; r++)
150
+ n.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(a, t[r]) && (e[t[r]] = a[t[r]]);
151
+ return e;
152
+ }, Q = J(function(a, n) {
153
+ var e = a.icon, t = a.id, r = a.className, o = a.extend, i = Zt(a, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(t, " ").concat(r || "").trim(), c = at("_".concat(Jt()));
154
+ return ct(e, "".concat(t), { defIds: e.defIds, idSuffix: c.current }, k({ ref: n, className: s }, i), o);
74
155
  });
75
- function ot(a, n, t, e, r) {
76
- return Q(a.tag, z(z({ key: n }, kt(a, t, r)), e), (zt(a, t).children || []).map(function(o, i) {
77
- return ot(o, "".concat(n, "-").concat(a.tag, "-").concat(i), t, void 0, r);
156
+ function ct(a, n, e, t, r) {
157
+ return q(a.tag, k(k({ key: n }, Yt(a, e, r)), t), (Xt(a, e).children || []).map(function(o, i) {
158
+ return ct(o, "".concat(n, "-").concat(a.tag, "-").concat(i), e, void 0, r);
78
159
  }));
79
160
  }
80
- function kt(a, n, t) {
81
- var e = z({}, a.attrs);
82
- t != null && t.colorChannel1 && e.fill === "colorChannel1" && (e.fill = t.colorChannel1);
161
+ function Yt(a, n, e) {
162
+ var t = k({}, a.attrs);
163
+ e != null && e.colorChannel1 && t.fill === "colorChannel1" && (t.fill = e.colorChannel1);
83
164
  var r = n.defIds;
84
- return !r || r.length === 0 || (a.tag === "use" && e["xlink:href"] && (e["xlink:href"] = e["xlink:href"] + n.idSuffix), Object.entries(e).forEach(function(o) {
165
+ return !r || r.length === 0 || (a.tag === "use" && t["xlink:href"] && (t["xlink:href"] = t["xlink:href"] + n.idSuffix), Object.entries(t).forEach(function(o) {
85
166
  var i = o[0], s = o[1];
86
- typeof s == "string" && (e[i] = s.replace(/url\(#(.*)\)/, "url(#$1".concat(n.idSuffix, ")")));
87
- })), e;
167
+ typeof s == "string" && (t[i] = s.replace(/url\(#(.*)\)/, "url(#$1".concat(n.idSuffix, ")")));
168
+ })), t;
88
169
  }
89
- function zt(a, n) {
90
- var t, e = n.defIds;
91
- return !e || e.length === 0 ? a : a.tag === "defs" && (!((t = a.children) === null || t === void 0) && t.length) ? z(z({}, a), { children: a.children.map(function(r) {
92
- return typeof r.attrs.id == "string" && e && e.indexOf(r.attrs.id) > -1 ? z(z({}, r), { attrs: z(z({}, r.attrs), { id: r.attrs.id + n.idSuffix }) }) : r;
170
+ function Xt(a, n) {
171
+ var e, t = n.defIds;
172
+ return !t || t.length === 0 ? a : a.tag === "defs" && (!((e = a.children) === null || e === void 0) && e.length) ? k(k({}, a), { children: a.children.map(function(r) {
173
+ return typeof r.attrs.id == "string" && t && t.indexOf(r.attrs.id) > -1 ? k(k({}, r), { attrs: k(k({}, r.attrs), { id: r.attrs.id + n.idSuffix }) }) : r;
93
174
  }) }) : a;
94
175
  }
95
- function $t() {
176
+ function Jt() {
96
177
  return Math.random().toString(36).substring(2, 8);
97
178
  }
98
- ee.displayName = "UniverIcon";
99
- var Ft = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M11.0363 12.2367V14.0367C11.0363 14.3681 11.3049 14.6367 11.6363 14.6367C11.9676 14.6367 12.2363 14.3681 12.2363 14.0367V12.2367H14.0364C14.3677 12.2367 14.6364 11.9681 14.6364 11.6367C14.6364 11.3054 14.3677 11.0367 14.0364 11.0367H12.2363V9.23672C12.2363 8.90535 11.9676 8.63672 11.6363 8.63672C11.3049 8.63672 11.0363 8.90535 11.0363 9.23672V11.0367H9.23635C8.90498 11.0367 8.63635 11.3054 8.63635 11.6367C8.63635 11.9681 8.90498 12.2367 9.23635 12.2367H11.0363Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365zM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377zM2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365zM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647zM9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635zM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635z", fillRule: "evenodd", clipRule: "evenodd" } }] }, st = q(function(a, n) {
100
- return Q(ee, Object.assign({}, a, {
179
+ Q.displayName = "UniverIcon";
180
+ var qt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M11.0363 12.2367V14.0367C11.0363 14.3681 11.3049 14.6367 11.6363 14.6367C11.9676 14.6367 12.2363 14.3681 12.2363 14.0367V12.2367H14.0364C14.3677 12.2367 14.6364 11.9681 14.6364 11.6367C14.6364 11.3054 14.3677 11.0367 14.0364 11.0367H12.2363V9.23672C12.2363 8.90535 11.9676 8.63672 11.6363 8.63672C11.3049 8.63672 11.0363 8.90535 11.0363 9.23672V11.0367H9.23635C8.90498 11.0367 8.63635 11.3054 8.63635 11.6367C8.63635 11.9681 8.90498 12.2367 9.23635 12.2367H11.0363Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365zM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377zM2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365zM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647zM9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635zM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635z", fillRule: "evenodd", clipRule: "evenodd" } }] }, mt = J(function(a, n) {
181
+ return q(Q, Object.assign({}, a, {
101
182
  id: "autofill",
102
183
  ref: n,
103
- icon: Ft
184
+ icon: qt
104
185
  }));
105
186
  });
106
- st.displayName = "Autofill";
107
- const Kt = st;
108
- var Zt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334 15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334 2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045zM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334 3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334zM14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999 15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999 2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544zM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999 3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421 6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641 9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421 11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946 8.64077 14.6502 8.70566 14.6923 8.77482 14.7209 8.84557 14.7502 8.92314 14.7664 9.00449 14.7664 9.08585 14.7664 9.16342 14.7502 9.23416 14.7209 9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, lt = q(function(a, n) {
109
- return Q(ee, Object.assign({}, a, {
187
+ mt.displayName = "Autofill";
188
+ const Qt = mt;
189
+ var en = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334 15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334 2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045zM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334 3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334zM14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999 15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999 2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544zM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999 3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421 6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641 9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421 11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946 8.64077 14.6502 8.70566 14.6923 8.77482 14.7209 8.84557 14.7502 8.92314 14.7664 9.00449 14.7664 9.08585 14.7664 9.16342 14.7502 9.23416 14.7209 9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, gt = J(function(a, n) {
190
+ return q(Q, Object.assign({}, a, {
110
191
  id: "bottom-single",
111
192
  ref: n,
112
- icon: Zt
193
+ icon: en
113
194
  }));
114
195
  });
115
- lt.displayName = "BottomSingle";
116
- const Yt = lt;
117
- var Xt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.97705 7.51296C5.97705 7.18159 6.24568 6.91296 6.57705 6.91296H8.48632C8.81769 6.91296 9.08632 7.18159 9.08632 7.51296 9.08632 7.84433 8.81769 8.11296 8.48632 8.11296H6.57705C6.24568 8.11296 5.97705 7.84433 5.97705 7.51296zM6.57705 9.41028C6.24568 9.41028 5.97705 9.67891 5.97705 10.0103 5.97705 10.3416 6.24568 10.6103 6.57705 10.6103H10.8199C11.1512 10.6103 11.4199 10.3416 11.4199 10.0103 11.4199 9.67891 11.1512 9.41028 10.8199 9.41028H6.57705z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.51074 2.37063C3.51074 1.48697 4.22709 0.77063 5.11074 0.77063H9.80318L9.81294 0.770708C9.97168 0.768161 10.1311 0.82824 10.2511 0.95055L14.4317 5.21408C14.5165 5.30049 14.5697 5.406 14.5917 5.51645C14.6041 5.5644 14.6106 5.61467 14.6106 5.66648V11.6406C14.6106 12.5243 13.8943 13.2406 13.0106 13.2406H5.11074C4.22709 13.2406 3.51074 12.5243 3.51074 11.6406V2.37063ZM10.4032 4.66648V2.81964L12.6063 5.06648H10.8032C10.5823 5.06648 10.4032 4.88739 10.4032 4.66648ZM5.11074 1.97063C4.88983 1.97063 4.71074 2.14972 4.71074 2.37063V11.6406C4.71074 11.8615 4.88983 12.0406 5.11074 12.0406H13.0106C13.2316 12.0406 13.4106 11.8615 13.4106 11.6406V6.26648H10.8032C9.91953 6.26648 9.20318 5.55013 9.20318 4.66648V1.97063H5.11074Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.58916 6.6741C2.58916 6.34273 2.32053 6.0741 1.98916 6.0741C1.65779 6.0741 1.38916 6.34273 1.38916 6.6741V12.6294C1.38916 14.0653 2.55322 15.2294 3.98916 15.2294H9.41408C9.74545 15.2294 10.0141 14.9607 10.0141 14.6294C10.0141 14.298 9.74545 14.0294 9.41408 14.0294H3.98916C3.21596 14.0294 2.58916 13.4026 2.58916 12.6294V6.6741Z" } }] }, ct = q(function(a, n) {
118
- return Q(ee, Object.assign({}, a, {
196
+ gt.displayName = "BottomSingle";
197
+ const tn = gt;
198
+ var nn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.97705 7.51296C5.97705 7.18159 6.24568 6.91296 6.57705 6.91296H8.48632C8.81769 6.91296 9.08632 7.18159 9.08632 7.51296 9.08632 7.84433 8.81769 8.11296 8.48632 8.11296H6.57705C6.24568 8.11296 5.97705 7.84433 5.97705 7.51296zM6.57705 9.41028C6.24568 9.41028 5.97705 9.67891 5.97705 10.0103 5.97705 10.3416 6.24568 10.6103 6.57705 10.6103H10.8199C11.1512 10.6103 11.4199 10.3416 11.4199 10.0103 11.4199 9.67891 11.1512 9.41028 10.8199 9.41028H6.57705z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.51074 2.37063C3.51074 1.48697 4.22709 0.77063 5.11074 0.77063H9.80318L9.81294 0.770708C9.97168 0.768161 10.1311 0.82824 10.2511 0.95055L14.4317 5.21408C14.5165 5.30049 14.5697 5.406 14.5917 5.51645C14.6041 5.5644 14.6106 5.61467 14.6106 5.66648V11.6406C14.6106 12.5243 13.8943 13.2406 13.0106 13.2406H5.11074C4.22709 13.2406 3.51074 12.5243 3.51074 11.6406V2.37063ZM10.4032 4.66648V2.81964L12.6063 5.06648H10.8032C10.5823 5.06648 10.4032 4.88739 10.4032 4.66648ZM5.11074 1.97063C4.88983 1.97063 4.71074 2.14972 4.71074 2.37063V11.6406C4.71074 11.8615 4.88983 12.0406 5.11074 12.0406H13.0106C13.2316 12.0406 13.4106 11.8615 13.4106 11.6406V6.26648H10.8032C9.91953 6.26648 9.20318 5.55013 9.20318 4.66648V1.97063H5.11074Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.58916 6.6741C2.58916 6.34273 2.32053 6.0741 1.98916 6.0741C1.65779 6.0741 1.38916 6.34273 1.38916 6.6741V12.6294C1.38916 14.0653 2.55322 15.2294 3.98916 15.2294H9.41408C9.74545 15.2294 10.0141 14.9607 10.0141 14.6294C10.0141 14.298 9.74545 14.0294 9.41408 14.0294H3.98916C3.21596 14.0294 2.58916 13.4026 2.58916 12.6294V6.6741Z" } }] }, ut = J(function(a, n) {
199
+ return q(Q, Object.assign({}, a, {
119
200
  id: "create-copy-single",
120
201
  ref: n,
121
- icon: Xt
202
+ icon: nn
122
203
  }));
123
204
  });
124
- ct.displayName = "CreateCopySingle";
125
- const Jt = ct;
126
- var qt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.38125 1.16211C6.49759 1.16211 5.78125 1.87845 5.78125 2.76211V5.6377H2.87783C1.99418 5.6377 1.27783 6.35404 1.27783 7.2377V13.2377C1.27783 14.1214 1.99418 14.8377 2.87783 14.8377H8.87783C9.76149 14.8377 10.4778 14.1214 10.4778 13.2377V10.3621H13.3813C14.2649 10.3621 14.9813 9.64577 14.9813 8.76211V2.76211C14.9813 1.87845 14.2649 1.16211 13.3813 1.16211H7.38125ZM10.4778 9.16211H13.3813C13.6022 9.16211 13.7812 8.98302 13.7812 8.76211V2.76211C13.7812 2.5412 13.6022 2.36211 13.3813 2.36211H7.38125C7.16034 2.36211 6.98125 2.5412 6.98125 2.76211V5.6377H8.87783C9.76149 5.6377 10.4778 6.35404 10.4778 7.2377V9.16211ZM6.98125 6.8377H8.87783C9.09875 6.8377 9.27783 7.01678 9.27783 7.2377V9.16211H7.38125C7.16034 9.16211 6.98125 8.98302 6.98125 8.76211V6.8377ZM5.78125 6.8377V8.76211C5.78125 9.64577 6.49759 10.3621 7.38125 10.3621H9.27783V13.2377C9.27783 13.4586 9.09875 13.6377 8.87783 13.6377H2.87783C2.65692 13.6377 2.47783 13.4586 2.47783 13.2377V7.2377C2.47783 7.01678 2.65692 6.8377 2.87783 6.8377H5.78125Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, mt = q(function(a, n) {
127
- return Q(ee, Object.assign({}, a, {
205
+ ut.displayName = "CreateCopySingle";
206
+ const rn = ut;
207
+ var an = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.38125 1.16211C6.49759 1.16211 5.78125 1.87845 5.78125 2.76211V5.6377H2.87783C1.99418 5.6377 1.27783 6.35404 1.27783 7.2377V13.2377C1.27783 14.1214 1.99418 14.8377 2.87783 14.8377H8.87783C9.76149 14.8377 10.4778 14.1214 10.4778 13.2377V10.3621H13.3813C14.2649 10.3621 14.9813 9.64577 14.9813 8.76211V2.76211C14.9813 1.87845 14.2649 1.16211 13.3813 1.16211H7.38125ZM10.4778 9.16211H13.3813C13.6022 9.16211 13.7812 8.98302 13.7812 8.76211V2.76211C13.7812 2.5412 13.6022 2.36211 13.3813 2.36211H7.38125C7.16034 2.36211 6.98125 2.5412 6.98125 2.76211V5.6377H8.87783C9.76149 5.6377 10.4778 6.35404 10.4778 7.2377V9.16211ZM6.98125 6.8377H8.87783C9.09875 6.8377 9.27783 7.01678 9.27783 7.2377V9.16211H7.38125C7.16034 9.16211 6.98125 8.98302 6.98125 8.76211V6.8377ZM5.78125 6.8377V8.76211C5.78125 9.64577 6.49759 10.3621 7.38125 10.3621H9.27783V13.2377C9.27783 13.4586 9.09875 13.6377 8.87783 13.6377H2.87783C2.65692 13.6377 2.47783 13.4586 2.47783 13.2377V7.2377C2.47783 7.01678 2.65692 6.8377 2.87783 6.8377H5.78125Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, dt = J(function(a, n) {
208
+ return q(Q, Object.assign({}, a, {
128
209
  id: "group-single",
129
210
  ref: n,
130
- icon: qt
211
+ icon: an
131
212
  }));
132
213
  });
133
- mt.displayName = "GroupSingle";
134
- const Qt = mt;
135
- var en = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, gt = q(function(a, n) {
136
- return Q(ee, Object.assign({}, a, {
214
+ dt.displayName = "GroupSingle";
215
+ const on = dt;
216
+ var sn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ht = J(function(a, n) {
217
+ return q(Q, Object.assign({}, a, {
137
218
  id: "more-down-single",
138
219
  ref: n,
139
- icon: en
220
+ icon: sn
140
221
  }));
141
222
  });
142
- gt.displayName = "MoreDownSingle";
143
- const tn = gt;
144
- var nn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] }, ut = q(function(a, n) {
145
- return Q(ee, Object.assign({}, a, {
223
+ ht.displayName = "MoreDownSingle";
224
+ const ln = ht;
225
+ var cn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] }, ft = J(function(a, n) {
226
+ return q(Q, Object.assign({}, a, {
146
227
  id: "move-down-single",
147
228
  ref: n,
148
- icon: nn
229
+ icon: cn
149
230
  }));
150
231
  });
151
- ut.displayName = "MoveDownSingle";
152
- const rn = ut;
153
- var an = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 13.036C1.25 12.1523 1.96634 11.436 2.85 11.436H13.15C14.0337 11.436 14.75 12.1523 14.75 13.036C14.75 13.9196 14.0337 14.636 13.15 14.636H2.85C1.96635 14.636 1.25 13.9196 1.25 13.036ZM2.85 12.636C2.62909 12.636 2.45 12.8151 2.45 13.036C2.45 13.2569 2.62909 13.436 2.85 13.436H13.15C13.3709 13.436 13.55 13.2569 13.55 13.036C13.55 12.8151 13.3709 12.636 13.15 12.636H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 4.38825C5.80995 4.62256 6.18985 4.62256 6.42417 4.38825L7.3999 3.41251V9.63049C7.3999 9.96186 7.66853 10.2305 7.9999 10.2305C8.33127 10.2305 8.5999 9.96186 8.5999 9.63049V3.41251L9.57564 4.38825C9.80995 4.62256 10.1899 4.62256 10.4242 4.38825C10.6585 4.15393 10.6585 3.77403 10.4242 3.53972L8.4324 1.54796C8.32324 1.43445 8.16982 1.36382 7.9999 1.36382C7.82998 1.36382 7.67655 1.43446 7.56739 1.54797L5.57564 3.53972C5.34132 3.77403 5.34132 4.15393 5.57564 4.38825Z" } }] }, dt = q(function(a, n) {
154
- return Q(ee, Object.assign({}, a, {
232
+ ft.displayName = "MoveDownSingle";
233
+ const mn = ft;
234
+ var gn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 13.036C1.25 12.1523 1.96634 11.436 2.85 11.436H13.15C14.0337 11.436 14.75 12.1523 14.75 13.036C14.75 13.9196 14.0337 14.636 13.15 14.636H2.85C1.96635 14.636 1.25 13.9196 1.25 13.036ZM2.85 12.636C2.62909 12.636 2.45 12.8151 2.45 13.036C2.45 13.2569 2.62909 13.436 2.85 13.436H13.15C13.3709 13.436 13.55 13.2569 13.55 13.036C13.55 12.8151 13.3709 12.636 13.15 12.636H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 4.38825C5.80995 4.62256 6.18985 4.62256 6.42417 4.38825L7.3999 3.41251V9.63049C7.3999 9.96186 7.66853 10.2305 7.9999 10.2305C8.33127 10.2305 8.5999 9.96186 8.5999 9.63049V3.41251L9.57564 4.38825C9.80995 4.62256 10.1899 4.62256 10.4242 4.38825C10.6585 4.15393 10.6585 3.77403 10.4242 3.53972L8.4324 1.54796C8.32324 1.43445 8.16982 1.36382 7.9999 1.36382C7.82998 1.36382 7.67655 1.43446 7.56739 1.54797L5.57564 3.53972C5.34132 3.77403 5.34132 4.15393 5.57564 4.38825Z" } }] }, pt = J(function(a, n) {
235
+ return q(Q, Object.assign({}, a, {
155
236
  id: "move-up-single",
156
237
  ref: n,
157
- icon: an
238
+ icon: gn
158
239
  }));
159
240
  });
160
- dt.displayName = "MoveUpSingle";
161
- const on = dt;
162
- var sn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.82994 1.40913C7.88746 1.35161 7.95376 1.30821 8.02453 1.27893C8.09527 1.24959 8.17285 1.2334 8.2542 1.2334C8.33555 1.2334 8.41313 1.24959 8.48387 1.27893C8.55464 1.30821 8.62094 1.35161 8.67846 1.40913L10.6785 3.40913C10.9128 3.64345 10.9128 4.02335 10.6785 4.25766C10.4441 4.49198 10.0642 4.49198 9.82994 4.25766L8.8542 3.28193V5.8334C8.8542 6.16477 8.58557 6.4334 8.2542 6.4334C7.92283 6.4334 7.6542 6.16477 7.6542 5.8334V3.28193L6.67846 4.25766C6.44415 4.49198 6.06425 4.49198 5.82994 4.25766C5.59562 4.02335 5.59562 3.64345 5.82994 3.40913L7.82994 1.40913Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9 15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9zM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9 2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9 13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439zM1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665 15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665zM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665 2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665 13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ht = q(function(a, n) {
163
- return Q(ee, Object.assign({}, a, {
241
+ pt.displayName = "MoveUpSingle";
242
+ const un = pt;
243
+ var dn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.82994 1.40913C7.88746 1.35161 7.95376 1.30821 8.02453 1.27893C8.09527 1.24959 8.17285 1.2334 8.2542 1.2334C8.33555 1.2334 8.41313 1.24959 8.48387 1.27893C8.55464 1.30821 8.62094 1.35161 8.67846 1.40913L10.6785 3.40913C10.9128 3.64345 10.9128 4.02335 10.6785 4.25766C10.4441 4.49198 10.0642 4.49198 9.82994 4.25766L8.8542 3.28193V5.8334C8.8542 6.16477 8.58557 6.4334 8.2542 6.4334C7.92283 6.4334 7.6542 6.16477 7.6542 5.8334V3.28193L6.67846 4.25766C6.44415 4.49198 6.06425 4.49198 5.82994 4.25766C5.59562 4.02335 5.59562 3.64345 5.82994 3.40913L7.82994 1.40913Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9 15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9zM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9 2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9 13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439zM1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665 15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665zM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665 2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665 13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ct = J(function(a, n) {
244
+ return q(Q, Object.assign({}, a, {
164
245
  id: "topmost-single",
165
246
  ref: n,
166
- icon: sn
247
+ icon: dn
167
248
  }));
168
249
  });
169
- ht.displayName = "TopmostSingle";
170
- const ln = ht;
171
- var cn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.46855 2.83731C7.46855 2.61639 7.64764 2.4373 7.86855 2.4373H13.8603C14.0812 2.4373 14.2603 2.61639 14.2603 2.8373V9.5049C14.2603 9.72581 14.0812 9.90489 13.8603 9.90489H12.866C12.5346 9.90489 12.266 10.1735 12.266 10.5049C12.266 10.8363 12.5346 11.1049 12.866 11.1049H13.8603C14.7439 11.1049 15.4603 10.3886 15.4603 9.5049V2.8373C15.4603 1.95365 14.7439 1.2373 13.8603 1.2373H7.86855C6.9849 1.2373 6.26855 1.95365 6.26855 2.83731V3.48688C6.26855 3.81825 6.53718 4.08688 6.86855 4.08688C7.19993 4.08688 7.46855 3.81825 7.46855 3.48688V2.83731Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.19888 5.56299C2.31522 5.56299 1.59888 6.27933 1.59888 7.16299V13.163C1.59888 14.0466 2.31522 14.763 3.19888 14.763H9.19888C10.0825 14.763 10.7989 14.0466 10.7989 13.163V7.16299C10.7989 6.27933 10.0825 5.56299 9.19888 5.56299H3.19888ZM2.79888 7.16299C2.79888 6.94207 2.97796 6.76299 3.19888 6.76299H9.19888C9.41979 6.76299 9.59888 6.94207 9.59888 7.16299V13.163C9.59888 13.3839 9.41979 13.563 9.19888 13.563H3.19888C2.97796 13.563 2.79888 13.3839 2.79888 13.163V7.16299Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, ft = q(function(a, n) {
172
- return Q(ee, Object.assign({}, a, {
250
+ Ct.displayName = "TopmostSingle";
251
+ const hn = Ct;
252
+ var fn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.46855 2.83731C7.46855 2.61639 7.64764 2.4373 7.86855 2.4373H13.8603C14.0812 2.4373 14.2603 2.61639 14.2603 2.8373V9.5049C14.2603 9.72581 14.0812 9.90489 13.8603 9.90489H12.866C12.5346 9.90489 12.266 10.1735 12.266 10.5049C12.266 10.8363 12.5346 11.1049 12.866 11.1049H13.8603C14.7439 11.1049 15.4603 10.3886 15.4603 9.5049V2.8373C15.4603 1.95365 14.7439 1.2373 13.8603 1.2373H7.86855C6.9849 1.2373 6.26855 1.95365 6.26855 2.83731V3.48688C6.26855 3.81825 6.53718 4.08688 6.86855 4.08688C7.19993 4.08688 7.46855 3.81825 7.46855 3.48688V2.83731Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.19888 5.56299C2.31522 5.56299 1.59888 6.27933 1.59888 7.16299V13.163C1.59888 14.0466 2.31522 14.763 3.19888 14.763H9.19888C10.0825 14.763 10.7989 14.0466 10.7989 13.163V7.16299C10.7989 6.27933 10.0825 5.56299 9.19888 5.56299H3.19888ZM2.79888 7.16299C2.79888 6.94207 2.97796 6.76299 3.19888 6.76299H9.19888C9.41979 6.76299 9.59888 6.94207 9.59888 7.16299V13.163C9.59888 13.3839 9.41979 13.563 9.19888 13.563H3.19888C2.97796 13.563 2.79888 13.3839 2.79888 13.163V7.16299Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, wt = J(function(a, n) {
253
+ return q(Q, Object.assign({}, a, {
173
254
  id: "ungroup-single",
174
255
  ref: n,
175
- icon: cn
256
+ icon: fn
176
257
  }));
177
258
  });
178
- ft.displayName = "UngroupSingle";
179
- const mn = ft, gn = "univer-image-common-panel", un = "univer-image-common-panel-grid", dn = "univer-image-common-panel-border", hn = "univer-image-common-panel-title", fn = "univer-image-common-panel-row", pn = "univer-image-common-panel-row-vertical", Cn = "univer-image-common-panel-column", wn = "univer-image-common-panel-column-center", vn = "univer-image-common-panel-inline", _n = "univer-image-common-panel-span2", Sn = "univer-image-common-panel-span3", bn = "univer-image-common-panel-input", m = {
180
- imageCommonPanel: gn,
181
- imageCommonPanelGrid: un,
182
- imageCommonPanelBorder: dn,
183
- imageCommonPanelTitle: hn,
184
- imageCommonPanelRow: fn,
185
- imageCommonPanelRowVertical: pn,
186
- imageCommonPanelColumn: Cn,
187
- imageCommonPanelColumnCenter: wn,
188
- imageCommonPanelInline: vn,
189
- imageCommonPanelSpan2: _n,
190
- imageCommonPanelSpan3: Sn,
191
- imageCommonPanelInput: bn
192
- }, In = (a) => {
193
- const { arrangeShow: n, drawings: t } = a, e = x(J), r = x(se), o = (g) => g ? "block" : "none", [i, s] = A(t);
194
- Ie(() => {
259
+ wt.displayName = "UngroupSingle";
260
+ const pn = wt, Cn = "univer-image-common-panel", wn = "univer-image-common-panel-grid", vn = "univer-image-common-panel-border", _n = "univer-image-common-panel-title", Sn = "univer-image-common-panel-row", In = "univer-image-common-panel-row-vertical", bn = "univer-image-common-panel-column", Pn = "univer-image-common-panel-column-center", yn = "univer-image-common-panel-inline", En = "univer-image-common-panel-span2", Rn = "univer-image-common-panel-span3", Mn = "univer-image-common-panel-input", m = {
261
+ imageCommonPanel: Cn,
262
+ imageCommonPanelGrid: wn,
263
+ imageCommonPanelBorder: vn,
264
+ imageCommonPanelTitle: _n,
265
+ imageCommonPanelRow: Sn,
266
+ imageCommonPanelRowVertical: In,
267
+ imageCommonPanelColumn: bn,
268
+ imageCommonPanelColumnCenter: Pn,
269
+ imageCommonPanelInline: yn,
270
+ imageCommonPanelSpan2: En,
271
+ imageCommonPanelSpan3: Rn,
272
+ imageCommonPanelInput: Mn
273
+ }, On = (a) => {
274
+ const { arrangeShow: n, drawings: e } = a, t = x(X), r = x(re), o = (g) => g ? "block" : "none", [i, s] = L(e);
275
+ _e(() => {
195
276
  const g = r.focus$.subscribe((u) => {
196
277
  s(u);
197
278
  });
@@ -203,24 +284,24 @@ const mn = ft, gn = "univer-image-common-panel", un = "univer-image-common-panel
203
284
  const u = i[0].unitId, d = i[0].subUnitId, h = i.map((f) => f.drawingId);
204
285
  r.featurePluginOrderUpdateNotification({ unitId: u, subUnitId: d, drawingIds: h, arrangeType: g });
205
286
  };
206
- return /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelGrid, style: { display: o(n) } }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ l.createElement("div", null, e.t("image-panel.arrange.title")))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(ie, { size: "small", onClick: () => {
207
- c(Pe.forward);
208
- } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(on, null), e.t("image-panel.arrange.forward")))), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(ie, { size: "small", onClick: () => {
209
- c(Pe.backward);
210
- } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(rn, null), e.t("image-panel.arrange.backward"))))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(ie, { size: "small", onClick: () => {
211
- c(Pe.front);
212
- } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(ln, null), e.t("image-panel.arrange.front")))), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(ie, { size: "small", onClick: () => {
213
- c(Pe.back);
214
- } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(Yt, null), e.t("image-panel.arrange.back"))))));
215
- }, ae = 20, Pn = 20, yn = [-3600, 3600], Re = 300, En = (a) => {
287
+ return /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelGrid, style: { display: o(n) } }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ l.createElement("div", null, t.t("image-panel.arrange.title")))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(oe, { size: "small", onClick: () => {
288
+ c(Ie.forward);
289
+ } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(un, null), t.t("image-panel.arrange.forward")))), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(oe, { size: "small", onClick: () => {
290
+ c(Ie.backward);
291
+ } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(mn, null), t.t("image-panel.arrange.backward"))))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(oe, { size: "small", onClick: () => {
292
+ c(Ie.front);
293
+ } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(hn, null), t.t("image-panel.arrange.front")))), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(oe, { size: "small", onClick: () => {
294
+ c(Ie.back);
295
+ } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(tn, null), t.t("image-panel.arrange.back"))))));
296
+ }, ae = 20, Nn = 20, Dn = [-3600, 3600], ye = 300, Tn = (a) => {
216
297
  var Ze;
217
- const n = x(J), t = x(se), e = x(fe), { drawings: r, transformShow: o } = a, i = r[0];
298
+ const n = x(X), e = x(re), t = x(ue), { drawings: r, transformShow: o } = a, i = r[0];
218
299
  if (i == null)
219
300
  return;
220
301
  const s = i.transform;
221
302
  if (s == null)
222
303
  return;
223
- const { unitId: c, subUnitId: g, drawingId: u, drawingType: d } = i, h = e.getRenderById(c), f = h == null ? void 0 : h.scene;
304
+ const { unitId: c, subUnitId: g, drawingId: u, drawingType: d } = i, h = t.getRenderById(c), f = h == null ? void 0 : h.scene;
224
305
  if (f == null)
225
306
  return;
226
307
  const v = (Ze = f.getEngine()) == null ? void 0 : Ze.activeScene;
@@ -228,146 +309,146 @@ const mn = ft, gn = "univer-image-common-panel", un = "univer-image-common-panel
228
309
  return;
229
310
  const w = f.getTransformerByCreate(), {
230
311
  width: p = 0,
231
- height: E = 0,
312
+ height: R = 0,
232
313
  left: _ = 0,
233
314
  top: O = 0,
234
315
  angle: S = 0
235
- } = s, [I, b] = A(p), [R, P] = A(E), [y, M] = A(_), [B, U] = A(O), [te, G] = A(S), [ce, Z] = A(w.keepRatio), me = (C, L, j, T) => {
236
- const { width: Y, height: X } = v, { ancestorLeft: W, ancestorTop: k } = f;
237
- let $ = C, F = L, re = j, pe = T;
238
- return C + W < 0 && ($ = -W), L + k < 0 && (F = -k), $ + j + W > Y && (re = Y - $ - W), re < ae && (re = ae), F + T + k > X && (pe = X - F - k), pe < ae && (pe = ae), C + re + W > Y && ($ = Y - j - W), L + pe + k > X && (F = X - T - k), {
316
+ } = s, [P, I] = L(p), [E, y] = L(R), [b, M] = L(_), [j, D] = L(O), [ce, K] = L(S), [Le, _t] = L(w.keepRatio), Se = (C, A, U, B) => {
317
+ const { width: Z, height: Y } = v, { ancestorLeft: V, ancestorTop: W } = f;
318
+ let $ = C, z = A, te = U, de = B;
319
+ return C + V < 0 && ($ = -V), A + W < 0 && (z = -W), $ + U + V > Z && (te = Z - $ - V), te < ae && (te = ae), z + B + W > Y && (de = Y - z - W), de < ae && (de = ae), C + te + V > Z && ($ = Z - U - V), A + de + W > Y && (z = Y - B - W), {
239
320
  limitLeft: $,
240
- limitTop: F,
241
- limitWidth: re,
242
- limitHeight: pe
321
+ limitTop: z,
322
+ limitWidth: te,
323
+ limitHeight: de
243
324
  };
244
325
  }, Ke = (C) => {
245
- const { objects: L } = C, j = Se(L, t);
246
- if (j.length !== 1)
326
+ const { objects: A } = C, U = we(A, e);
327
+ if (U.length !== 1)
247
328
  return;
248
- const T = j[0];
249
- if (T == null)
329
+ const B = U[0];
330
+ if (B == null)
250
331
  return;
251
- const Y = T.transform;
252
- if (Y == null)
332
+ const Z = B.transform;
333
+ if (Z == null)
253
334
  return;
254
335
  const {
255
- width: X,
256
- height: W,
257
- left: k,
336
+ width: Y,
337
+ height: V,
338
+ left: W,
258
339
  top: $,
259
- angle: F
260
- } = Y;
261
- X != null && b(X), W != null && P(W), k != null && M(k), $ != null && U($), F != null && G(F);
340
+ angle: z
341
+ } = Z;
342
+ Y != null && I(Y), V != null && y(V), W != null && M(W), $ != null && D($), z != null && K(z);
262
343
  };
263
- Ie(() => {
264
- const C = w.onChangeStartObservable.add((T) => {
265
- Ke(T);
266
- }), L = w.onChangingObservable.add((T) => {
267
- Ke(T);
268
- }), j = t.focus$.subscribe((T) => {
269
- if (T.length !== 1)
344
+ _e(() => {
345
+ const C = w.onChangeStartObservable.add((B) => {
346
+ Ke(B);
347
+ }), A = w.onChangingObservable.add((B) => {
348
+ Ke(B);
349
+ }), U = e.focus$.subscribe((B) => {
350
+ if (B.length !== 1)
270
351
  return;
271
- const Y = t.getDrawingByParam(T[0]);
272
- if (Y == null)
352
+ const Z = e.getDrawingByParam(B[0]);
353
+ if (Z == null)
273
354
  return;
274
- const X = Y.transform;
275
- if (X == null)
355
+ const Y = Z.transform;
356
+ if (Y == null)
276
357
  return;
277
358
  const {
278
- width: W,
279
- height: k,
359
+ width: V,
360
+ height: W,
280
361
  left: $,
281
- top: F,
282
- angle: re
283
- } = X;
284
- W != null && b(W), k != null && P(k), $ != null && M($), F != null && U(F), re != null && G(re);
362
+ top: z,
363
+ angle: te
364
+ } = Y;
365
+ V != null && I(V), W != null && y(W), $ != null && M($), z != null && D(z), te != null && K(te);
285
366
  });
286
367
  return () => {
287
- L == null || L.dispose(), C == null || C.dispose(), j == null || j.unsubscribe();
368
+ A == null || A.dispose(), C == null || C.dispose(), U == null || U.unsubscribe();
288
369
  };
289
370
  }, []);
290
- const wt = ye((C) => {
371
+ const St = Pe((C) => {
291
372
  if (C == null)
292
373
  return;
293
374
  C = Math.max(C, ae);
294
- const { limitWidth: L } = me(y, B, C, R);
295
- C = L;
296
- const j = { unitId: c, subUnitId: g, drawingId: u, drawingType: d, transform: { width: C } };
297
- if (ce) {
298
- let T = C / I * R;
299
- T = Math.max(T, Pn), P(T), j.transform.height = T;
375
+ const { limitWidth: A } = Se(b, j, C, E);
376
+ C = A;
377
+ const U = { unitId: c, subUnitId: g, drawingId: u, drawingType: d, transform: { width: C } };
378
+ if (Le) {
379
+ let B = C / P * E;
380
+ B = Math.max(B, Nn), y(B), U.transform.height = B;
300
381
  }
301
- b(C), t.featurePluginUpdateNotification([j]), w.refreshControls().changeNotification();
302
- }, Re), vt = ye((C) => {
382
+ I(C), e.featurePluginUpdateNotification([U]), w.refreshControls().changeNotification();
383
+ }, ye), It = Pe((C) => {
303
384
  if (C == null)
304
385
  return;
305
386
  C = Math.max(C, ae);
306
- const { limitHeight: L } = me(y, B, I, C);
307
- C = L;
308
- const j = { unitId: c, subUnitId: g, drawingId: u, drawingType: d, transform: { height: C } };
309
- if (ce) {
310
- let T = C / R * I;
311
- T = Math.max(T, ae), b(T), j.transform.width = T;
387
+ const { limitHeight: A } = Se(b, j, P, C);
388
+ C = A;
389
+ const U = { unitId: c, subUnitId: g, drawingId: u, drawingType: d, transform: { height: C } };
390
+ if (Le) {
391
+ let B = C / E * P;
392
+ B = Math.max(B, ae), I(B), U.transform.width = B;
312
393
  }
313
- P(C), t.featurePluginUpdateNotification([j]), w.refreshControls().changeNotification();
314
- }, Re), _t = ye((C) => {
394
+ y(C), e.featurePluginUpdateNotification([U]), w.refreshControls().changeNotification();
395
+ }, ye), bt = Pe((C) => {
315
396
  if (C == null)
316
397
  return;
317
- const { limitLeft: L } = me(C, B, I, R);
318
- C = L;
319
- const j = { unitId: c, subUnitId: g, drawingId: u, drawingType: d, transform: { left: C } };
320
- M(C), t.featurePluginUpdateNotification([j]), w.refreshControls().changeNotification();
321
- }, Re), St = ye((C) => {
398
+ const { limitLeft: A } = Se(C, j, P, E);
399
+ C = A;
400
+ const U = { unitId: c, subUnitId: g, drawingId: u, drawingType: d, transform: { left: C } };
401
+ M(C), e.featurePluginUpdateNotification([U]), w.refreshControls().changeNotification();
402
+ }, ye), Pt = Pe((C) => {
322
403
  if (C == null)
323
404
  return;
324
- const { limitTop: L } = me(y, C, I, R);
325
- C = L;
326
- const j = { unitId: c, subUnitId: g, drawingId: u, drawingType: d, transform: { top: C } };
327
- U(C), t.featurePluginUpdateNotification([j]), w.refreshControls().changeNotification();
328
- }, Re), bt = (C) => {
405
+ const { limitTop: A } = Se(b, C, P, E);
406
+ C = A;
407
+ const U = { unitId: c, subUnitId: g, drawingId: u, drawingType: d, transform: { top: C } };
408
+ D(C), e.featurePluginUpdateNotification([U]), w.refreshControls().changeNotification();
409
+ }, ye), yt = (C) => {
329
410
  if (C == null)
330
411
  return;
331
- const [L, j] = yn;
332
- C < L && (C = L), C > j && (C = j);
333
- const T = { unitId: c, subUnitId: g, drawingId: u, drawingType: d, transform: { angle: C } };
334
- G(C), t.featurePluginUpdateNotification([T]), w.refreshControls().changeNotification();
335
- }, It = (C) => {
336
- Z(C), w.keepRatio = C;
337
- }, Pt = (C) => C ? "block" : "none";
338
- return /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: Pt(o) } }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ l.createElement("div", null, n.t("image-panel.transform.title")))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.width"))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(Ce, { precision: 1, value: I, onChange: (C) => {
339
- wt(C);
340
- }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.height"))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(Ce, { precision: 1, value: R, onChange: (C) => {
341
- vt(C);
342
- }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.lock"))), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelRow, m.imageCommonPanelRowVertical) }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(Ht, { checked: ce, onChange: It })))))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.x"))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(Ce, { precision: 1, value: y, onChange: (C) => {
343
- _t(C);
344
- }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.y"))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(Ce, { precision: 1, value: B, onChange: (C) => {
412
+ const [A, U] = Dn;
413
+ C < A && (C = A), C > U && (C = U);
414
+ const B = { unitId: c, subUnitId: g, drawingId: u, drawingType: d, transform: { angle: C } };
415
+ K(C), e.featurePluginUpdateNotification([B]), w.refreshControls().changeNotification();
416
+ }, Et = (C) => {
417
+ _t(C), w.keepRatio = C;
418
+ }, Rt = (C) => C ? "block" : "none";
419
+ return /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: Rt(o) } }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ l.createElement("div", null, n.t("image-panel.transform.title")))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.width"))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(he, { precision: 1, value: P, onChange: (C) => {
345
420
  St(C);
346
- }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.rotate"))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(Ce, { precision: 1, value: te, onChange: bt, className: m.imageCommonPanelInput })))))));
421
+ }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.height"))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(he, { precision: 1, value: E, onChange: (C) => {
422
+ It(C);
423
+ }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.lock"))), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelRow, m.imageCommonPanelRowVertical) }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(Lt, { checked: Le, onChange: Et })))))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.x"))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(he, { precision: 1, value: b, onChange: (C) => {
424
+ bt(C);
425
+ }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.y"))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(he, { precision: 1, value: j, onChange: (C) => {
426
+ Pt(C);
427
+ }, className: m.imageCommonPanelInput }))))), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan3) }, /* @__PURE__ */ l.createElement("label", null, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, n.t("image-panel.transform.rotate"))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelColumn }, /* @__PURE__ */ l.createElement(he, { precision: 1, value: ce, onChange: yt, className: m.imageCommonPanelInput })))))));
347
428
  };
348
429
  var N = /* @__PURE__ */ ((a) => (a.default = "0", a.left = "1", a.center = "2", a.right = "3", a.top = "4", a.middle = "5", a.bottom = "6", a.horizon = "7", a.vertical = "8", a))(N || {});
349
430
  const Fe = {
350
431
  id: "sheet.operation.set-image-align",
351
- type: be.OPERATION,
432
+ type: ve.OPERATION,
352
433
  handler: (a, n) => !0
353
- }, Rn = (a) => {
354
- const n = x(le), t = x(J), { alignShow: e } = a, [r, o] = A(N.default), i = [
434
+ }, Bn = (a) => {
435
+ const n = x(le), e = x(X), { alignShow: t } = a, [r, o] = L(N.default), i = [
355
436
  {
356
- label: t.t("image-panel.align.default"),
437
+ label: e.t("image-panel.align.default"),
357
438
  value: N.default
358
439
  },
359
440
  {
360
441
  options: [
361
442
  {
362
- label: t.t("image-panel.align.left"),
443
+ label: e.t("image-panel.align.left"),
363
444
  value: N.left
364
445
  },
365
446
  {
366
- label: t.t("image-panel.align.center"),
447
+ label: e.t("image-panel.align.center"),
367
448
  value: N.center
368
449
  },
369
450
  {
370
- label: t.t("image-panel.align.right"),
451
+ label: e.t("image-panel.align.right"),
371
452
  value: N.right
372
453
  }
373
454
  ]
@@ -375,15 +456,15 @@ const Fe = {
375
456
  {
376
457
  options: [
377
458
  {
378
- label: t.t("image-panel.align.top"),
459
+ label: e.t("image-panel.align.top"),
379
460
  value: N.top
380
461
  },
381
462
  {
382
- label: t.t("image-panel.align.middle"),
463
+ label: e.t("image-panel.align.middle"),
383
464
  value: N.middle
384
465
  },
385
466
  {
386
- label: t.t("image-panel.align.bottom"),
467
+ label: e.t("image-panel.align.bottom"),
387
468
  value: N.bottom
388
469
  }
389
470
  ]
@@ -391,11 +472,11 @@ const Fe = {
391
472
  {
392
473
  options: [
393
474
  {
394
- label: t.t("image-panel.align.horizon"),
475
+ label: e.t("image-panel.align.horizon"),
395
476
  value: N.horizon
396
477
  },
397
478
  {
398
- label: t.t("image-panel.align.vertical"),
479
+ label: e.t("image-panel.align.vertical"),
399
480
  value: N.vertical
400
481
  }
401
482
  ]
@@ -407,14 +488,14 @@ const Fe = {
407
488
  });
408
489
  }
409
490
  const c = (g) => g ? "block" : "none";
410
- return /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: c(e) } }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ l.createElement("div", null, t.t("image-panel.align.title")))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn) }, /* @__PURE__ */ l.createElement(rt, { value: r, options: i, onChange: s }))));
411
- }, Mn = (a) => {
412
- const n = x(le), t = x(J), { drawings: e, cropperShow: r } = a;
413
- if (e[0] == null)
491
+ return /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: c(t) } }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ l.createElement("div", null, e.t("image-panel.align.title")))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn) }, /* @__PURE__ */ l.createElement(it, { value: r, options: i, onChange: s }))));
492
+ }, jn = (a) => {
493
+ const n = x(le), e = x(X), { drawings: t, cropperShow: r } = a;
494
+ if (t[0] == null)
414
495
  return;
415
- const [i, s] = A(H.FREE), c = nt(!1), g = [
496
+ const [i, s] = L(H.FREE), c = at(!1), g = [
416
497
  {
417
- label: t.t("image-panel.crop.mode"),
498
+ label: e.t("image-panel.crop.mode"),
418
499
  value: H.FREE
419
500
  },
420
501
  {
@@ -454,9 +535,9 @@ const Fe = {
454
535
  value: H.R2_3
455
536
  }
456
537
  ];
457
- Ie(() => {
538
+ _e(() => {
458
539
  const f = n.onCommandExecuted((v) => {
459
- if (v.id === he.id) {
540
+ if (v.id === ge.id) {
460
541
  const w = v.params;
461
542
  w != null && w.isAuto || (c.current = !1);
462
543
  }
@@ -466,140 +547,140 @@ const Fe = {
466
547
  };
467
548
  }, []);
468
549
  function u(f) {
469
- s(f), c.current && n.executeCommand(Ue.id, {
550
+ s(f), c.current && n.executeCommand(je.id, {
470
551
  cropType: f
471
552
  });
472
553
  }
473
554
  const d = (f) => f ? "block" : "none", h = (f) => {
474
- n.executeCommand(Ue.id, {
555
+ n.executeCommand(je.id, {
475
556
  cropType: f
476
557
  }), c.current = !0;
477
558
  };
478
- return /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: d(r) } }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ l.createElement("div", null, t.t("image-panel.crop.title")))), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelRow, m.imageCommonPanelRowVertical) }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(ie, { size: "small", onClick: () => {
559
+ return /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: d(r) } }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ l.createElement("div", null, e.t("image-panel.crop.title")))), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelRow, m.imageCommonPanelRowVertical) }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(oe, { size: "small", onClick: () => {
479
560
  h(i);
480
- } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(Jt, null), t.t("image-panel.crop.start")))), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(rt, { value: i, options: g, onChange: u }))));
481
- }, On = (a) => {
482
- const n = x(J), t = x(fe), e = x(se), { hasGroup: r, drawings: o } = a, [i, s] = A(!1), [c, g] = A(!0), [u, d] = A(!0), h = (p) => p ? "block" : "none", f = () => {
483
- const p = e.getFocusDrawings(), { unitId: E, subUnitId: _ } = p[0], O = Ot.generateRandomId(10), S = Dt(0, 0, p.map((R) => R.transform || {})), I = {
484
- unitId: E,
561
+ } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(rn, null), e.t("image-panel.crop.start")))), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2) }, /* @__PURE__ */ l.createElement(it, { value: i, options: g, onChange: u }))));
562
+ }, Un = (a) => {
563
+ const n = x(X), e = x(ue), t = x(re), { hasGroup: r, drawings: o } = a, [i, s] = L(!1), [c, g] = L(!0), [u, d] = L(!0), h = (p) => p ? "block" : "none", f = () => {
564
+ const p = t.getFocusDrawings(), { unitId: R, subUnitId: _ } = p[0], O = Ht.generateRandomId(10), S = Dt(0, 0, p.map((E) => E.transform || {})), P = {
565
+ unitId: R,
485
566
  subUnitId: _,
486
567
  drawingId: O,
487
- drawingType: oe.DRAWING_GROUP,
568
+ drawingType: ne.DRAWING_GROUP,
488
569
  transform: S
489
- }, b = p.map((R) => {
490
- const P = R.transform || { left: 0, top: 0 }, { unitId: y, subUnitId: M, drawingId: B } = R;
570
+ }, I = p.map((E) => {
571
+ const y = E.transform || { left: 0, top: 0 }, { unitId: b, subUnitId: M, drawingId: j } = E;
491
572
  return {
492
- unitId: y,
573
+ unitId: b,
493
574
  subUnitId: M,
494
- drawingId: B,
575
+ drawingId: j,
495
576
  transform: {
496
- ...P,
497
- left: P.left - S.left,
498
- top: P.top - S.top
577
+ ...y,
578
+ left: y.left - S.left,
579
+ top: y.top - S.top
499
580
  },
500
581
  groupId: O
501
582
  };
502
583
  });
503
- e.featurePluginGroupUpdateNotification([{
504
- parent: I,
505
- children: b
584
+ t.featurePluginGroupUpdateNotification([{
585
+ parent: P,
586
+ children: I
506
587
  }]);
507
588
  }, v = (p) => {
508
- if (p.drawingType !== oe.DRAWING_GROUP)
589
+ if (p.drawingType !== ne.DRAWING_GROUP)
509
590
  return;
510
- const { unitId: E, subUnitId: _, drawingId: O, transform: S = { width: 0, height: 0 } } = p;
591
+ const { unitId: R, subUnitId: _, drawingId: O, transform: S = { width: 0, height: 0 } } = p;
511
592
  if (S == null)
512
593
  return;
513
- const I = e.getDrawingsByGroup({ unitId: E, subUnitId: _, drawingId: O });
514
- if (I.length === 0)
594
+ const P = t.getDrawingsByGroup({ unitId: R, subUnitId: _, drawingId: O });
595
+ if (P.length === 0)
515
596
  return;
516
- const b = I.map((R) => {
517
- const { transform: P } = R, { unitId: y, subUnitId: M, drawingId: B } = R, U = Tt(P || {}, S, S.width || 0, S.height || 0);
597
+ const I = P.map((E) => {
598
+ const { transform: y } = E, { unitId: b, subUnitId: M, drawingId: j } = E, D = Tt(y || {}, S, S.width || 0, S.height || 0);
518
599
  return {
519
- unitId: y,
600
+ unitId: b,
520
601
  subUnitId: M,
521
- drawingId: B,
602
+ drawingId: j,
522
603
  transform: {
523
- ...P,
524
- ...U
604
+ ...y,
605
+ ...D
525
606
  },
526
607
  groupId: void 0
527
608
  };
528
609
  });
529
610
  return {
530
611
  parent: p,
531
- children: b
612
+ children: I
532
613
  };
533
614
  }, w = () => {
534
- const E = e.getFocusDrawings().map(
615
+ const R = t.getFocusDrawings().map(
535
616
  (_) => v(_)
536
617
  ).filter((_) => _ != null);
537
- E.length !== 0 && e.featurePluginUngroupUpdateNotification(E);
618
+ R.length !== 0 && t.featurePluginUngroupUpdateNotification(R);
538
619
  };
539
- return Ie(() => {
620
+ return _e(() => {
540
621
  const p = o[0];
541
622
  if (p == null)
542
623
  return;
543
- const { unitId: E } = p, _ = t.getRenderById(E), O = _ == null ? void 0 : _.scene;
624
+ const { unitId: R } = p, _ = e.getRenderById(R), O = _ == null ? void 0 : _.scene;
544
625
  if (O == null)
545
626
  return;
546
- const S = O.getTransformerByCreate(), I = S.onClearControlObservable.add((R) => {
547
- R === !0 && s(!1);
548
- }), b = S.onChangeStartObservable.add((R) => {
549
- const { objects: P } = R, y = Se(P, e), M = y.filter((G) => (G == null ? void 0 : G.drawingType) === oe.DRAWING_GROUP);
550
- let B = !1, U = !1;
551
- y.length > 1 && (B = !0), M.length > 0 && (U = !0), s(B || U), g(B), d(U);
627
+ const S = O.getTransformerByCreate(), P = S.onClearControlObservable.add((E) => {
628
+ E === !0 && s(!1);
629
+ }), I = S.onChangeStartObservable.add((E) => {
630
+ const { objects: y } = E, b = we(y, t), M = b.filter((K) => (K == null ? void 0 : K.drawingType) === ne.DRAWING_GROUP);
631
+ let j = !1, D = !1;
632
+ b.length > 1 && (j = !0), M.length > 0 && (D = !0), s(j || D), g(j), d(D);
552
633
  });
553
634
  return () => {
554
- b == null || b.dispose(), I == null || I.dispose();
635
+ I == null || I.dispose(), P == null || P.dispose();
555
636
  };
556
- }, []), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: h(r === !0 ? i : !1) } }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ l.createElement("div", null, n.t("image-panel.group.title")))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan2, m.imageCommonPanelColumnCenter) }, /* @__PURE__ */ l.createElement(ie, { size: "small", onClick: () => {
637
+ }, []), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelGrid, m.imageCommonPanelBorder), style: { display: h(r === !0 ? i : !1) } }, /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelTitle) }, /* @__PURE__ */ l.createElement("div", null, n.t("image-panel.group.title")))), /* @__PURE__ */ l.createElement("div", { className: m.imageCommonPanelRow }, /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2, m.imageCommonPanelColumnCenter) }, /* @__PURE__ */ l.createElement(oe, { size: "small", onClick: () => {
557
638
  f();
558
- }, style: { display: h(c) } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(Qt, null), n.t("image-panel.group.group")))), /* @__PURE__ */ l.createElement("div", { className: D(m.imageCommonPanelColumn, m.imageCommonPanelSpan2, m.imageCommonPanelColumnCenter) }, /* @__PURE__ */ l.createElement(ie, { size: "small", onClick: () => {
639
+ }, style: { display: h(c) } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(on, null), n.t("image-panel.group.group")))), /* @__PURE__ */ l.createElement("div", { className: T(m.imageCommonPanelColumn, m.imageCommonPanelSpan2, m.imageCommonPanelColumnCenter) }, /* @__PURE__ */ l.createElement(oe, { size: "small", onClick: () => {
559
640
  w();
560
- }, style: { display: h(u) } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(mn, null), n.t("image-panel.group.unGroup"))))));
561
- }, dr = (a) => {
562
- const n = x(se), t = x(fe), e = x(J), { drawings: r, hasArrange: o = !0, hasTransform: i = !0, hasAlign: s = !0, hasCropper: c = !0, hasGroup: g = !0 } = a, u = r[0];
641
+ }, style: { display: h(u) } }, /* @__PURE__ */ l.createElement("span", { className: m.imageCommonPanelInline }, /* @__PURE__ */ l.createElement(pn, null), n.t("image-panel.group.unGroup"))))));
642
+ }, wr = (a) => {
643
+ const n = x(re), e = x(ue), t = x(X), { drawings: r, hasArrange: o = !0, hasTransform: i = !0, hasAlign: s = !0, hasCropper: c = !0, hasGroup: g = !0 } = a, u = r[0];
563
644
  if (u == null)
564
645
  return;
565
- const { unitId: d } = u, h = t.getRenderById(d), f = h == null ? void 0 : h.scene;
646
+ const { unitId: d } = u, h = e.getRenderById(d), f = h == null ? void 0 : h.scene;
566
647
  if (f == null)
567
648
  return;
568
- const v = f.getTransformerByCreate(), [w, p] = A(!0), [E, _] = A(!0), [O, S] = A(!1), [I, b] = A(!0), [R, P] = A(!1);
569
- return Ie(() => {
570
- const y = v.onClearControlObservable.add((U) => {
571
- U === !0 && (p(!1), _(!1), S(!1), b(!1), P(!0));
572
- }), M = v.onChangeStartObservable.add((U) => {
573
- const { objects: te } = U, G = Se(te, n);
574
- G.length === 0 ? (p(!1), _(!1), S(!1), b(!1), P(!0)) : G.length === 1 ? (p(!0), _(!0), S(!1), b(!0), P(!1)) : (p(!0), _(!1), S(!0), b(!1), P(!1));
575
- }), B = n.focus$.subscribe((U) => {
576
- U.length === 0 ? (p(!1), _(!1), S(!1), b(!1), P(!0)) : U.length === 1 ? (p(!0), _(!0), S(!1), b(!0), P(!1)) : (p(!0), _(!1), S(!0), b(!1), P(!1));
649
+ const v = f.getTransformerByCreate(), [w, p] = L(!0), [R, _] = L(!0), [O, S] = L(!1), [P, I] = L(!0), [E, y] = L(!1);
650
+ return _e(() => {
651
+ const b = v.onClearControlObservable.add((D) => {
652
+ D === !0 && (p(!1), _(!1), S(!1), I(!1), y(!0));
653
+ }), M = v.onChangeStartObservable.add((D) => {
654
+ const { objects: ce } = D, K = we(ce, n);
655
+ K.length === 0 ? (p(!1), _(!1), S(!1), I(!1), y(!0)) : K.length === 1 ? (p(!0), _(!0), S(!1), I(!0), y(!1)) : (p(!0), _(!1), S(!0), I(!1), y(!1));
656
+ }), j = n.focus$.subscribe((D) => {
657
+ D.length === 0 ? (p(!1), _(!1), S(!1), I(!1), y(!0)) : D.length === 1 ? (p(!0), _(!0), S(!1), I(!0), y(!1)) : (p(!0), _(!1), S(!0), I(!1), y(!1));
577
658
  });
578
659
  return () => {
579
- M == null || M.dispose(), y == null || y.dispose(), B == null || B.unsubscribe();
660
+ M == null || M.dispose(), b == null || b.dispose(), j == null || j.unsubscribe();
580
661
  };
581
- }, []), /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("div", { style: { display: R === !0 ? "block" : "none", height: "100%" } }, /* @__PURE__ */ l.createElement("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", top: "50%", marginTop: "-100px" } }, /* @__PURE__ */ l.createElement("span", null, e.t("image-panel.null")))), /* @__PURE__ */ l.createElement(In, { arrangeShow: o === !0 ? w : !1, drawings: r }), /* @__PURE__ */ l.createElement(En, { transformShow: i === !0 ? E : !1, drawings: r }), /* @__PURE__ */ l.createElement(Rn, { alignShow: s === !0 ? O : !1, drawings: r }), /* @__PURE__ */ l.createElement(Mn, { cropperShow: c === !0 ? I : !1, drawings: r }), /* @__PURE__ */ l.createElement(On, { hasGroup: g, drawings: r }));
582
- }, Nn = "univer-image-popup-menu", Dn = "univer-image-popup-menu-item", Tn = "univer-image-popup-menu-item-icon", Bn = "univer-image-popup-menu-item-title", jn = "univer-image-popup-menu-item-hide", Un = "univer-btn-container", Hn = "univer-btn-container-expand", we = {
583
- imagePopupMenu: Nn,
584
- imagePopupMenuItem: Dn,
585
- imagePopupMenuItemIcon: Tn,
586
- imagePopupMenuItemTitle: Bn,
587
- imagePopupMenuItemHide: jn,
588
- btnContainer: Un,
589
- btnContainerExpand: Hn
590
- }, Ln = (a) => {
662
+ }, []), /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement("div", { style: { display: E === !0 ? "block" : "none", height: "100%" } }, /* @__PURE__ */ l.createElement("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", top: "50%", marginTop: "-100px" } }, /* @__PURE__ */ l.createElement("span", null, t.t("image-panel.null")))), /* @__PURE__ */ l.createElement(On, { arrangeShow: o === !0 ? w : !1, drawings: r }), /* @__PURE__ */ l.createElement(Tn, { transformShow: i === !0 ? R : !1, drawings: r }), /* @__PURE__ */ l.createElement(Bn, { alignShow: s === !0 ? O : !1, drawings: r }), /* @__PURE__ */ l.createElement(jn, { cropperShow: c === !0 ? P : !1, drawings: r }), /* @__PURE__ */ l.createElement(Un, { hasGroup: g, drawings: r }));
663
+ }, Hn = "univer-image-popup-menu", An = "univer-image-popup-menu-item", Ln = "univer-image-popup-menu-item-icon", xn = "univer-image-popup-menu-item-title", Gn = "univer-image-popup-menu-item-hide", Vn = "univer-btn-container", Wn = "univer-btn-container-expand", fe = {
664
+ imagePopupMenu: Hn,
665
+ imagePopupMenuItem: An,
666
+ imagePopupMenuItemIcon: Ln,
667
+ imagePopupMenuItemTitle: xn,
668
+ imagePopupMenuItemHide: Gn,
669
+ btnContainer: Vn,
670
+ btnContainerExpand: Wn
671
+ }, kn = (a) => {
591
672
  var v, w;
592
673
  const n = (w = (v = a.popup) == null ? void 0 : v.extraProps) == null ? void 0 : w.menuItems;
593
674
  if (!n)
594
675
  return null;
595
- const t = x(le), e = x(J), [r, o] = A(!1), [i, s] = A(!1), c = () => {
676
+ const e = x(le), t = x(X), [r, o] = L(!1), [i, s] = L(!1), c = () => {
596
677
  s(!0);
597
678
  }, g = () => {
598
679
  s(!1);
599
680
  }, u = (p) => {
600
681
  o(p);
601
682
  }, d = (p) => {
602
- t.executeCommand(p.commandId, p.commandParams), o(!1);
683
+ e.executeCommand(p.commandId, p.commandParams), o(!1);
603
684
  }, h = r || i, f = n.filter((p) => !p.disable);
604
685
  return /* @__PURE__ */ l.createElement(
605
686
  "div",
@@ -608,18 +689,18 @@ const Fe = {
608
689
  onMouseLeave: g
609
690
  },
610
691
  /* @__PURE__ */ l.createElement(
611
- Lt,
692
+ xt,
612
693
  {
613
694
  placement: "bottomLeft",
614
695
  trigger: ["click"],
615
- overlay: /* @__PURE__ */ l.createElement("ul", { className: we.imagePopupMenu }, f.map((p) => /* @__PURE__ */ l.createElement(
696
+ overlay: /* @__PURE__ */ l.createElement("ul", { className: fe.imagePopupMenu }, f.map((p) => /* @__PURE__ */ l.createElement(
616
697
  "li",
617
698
  {
618
699
  key: p.index,
619
700
  onClick: () => d(p),
620
- className: we.imagePopupMenuItem
701
+ className: fe.imagePopupMenuItem
621
702
  },
622
- /* @__PURE__ */ l.createElement("span", { className: we.imagePopupMenuItemTitle }, e.t(p.label))
703
+ /* @__PURE__ */ l.createElement("span", { className: fe.imagePopupMenuItemTitle }, t.t(p.label))
623
704
  ))),
624
705
  visible: r,
625
706
  onVisibleChange: u
@@ -627,62 +708,32 @@ const Fe = {
627
708
  /* @__PURE__ */ l.createElement(
628
709
  "div",
629
710
  {
630
- className: D(we.btnContainer, {
631
- [we.btnContainerExpand]: r
711
+ className: T(fe.btnContainer, {
712
+ [fe.btnContainerExpand]: r
632
713
  })
633
714
  },
634
715
  /* @__PURE__ */ l.createElement(
635
- Kt,
716
+ Qt,
636
717
  {
637
718
  style: { color: "#35322B" },
638
719
  extend: { colorChannel1: "rgb(var(--green-700, #409f11))" }
639
720
  }
640
721
  ),
641
- h && /* @__PURE__ */ l.createElement(tn, { style: { color: "#CCCCCC", fontSize: "8px", marginLeft: "8px" } })
722
+ h && /* @__PURE__ */ l.createElement(ln, { style: { color: "#CCCCCC", fontSize: "8px", marginLeft: "8px" } })
642
723
  )
643
724
  )
644
725
  );
645
- }, An = "COMPONENT_IMAGE_POPUP_MENU";
646
- function xn(a, n, t, e) {
647
- const r = e.getDrawingByParam(a);
648
- if (r == null)
649
- return;
650
- const o = V(a), i = t.getObject(o);
651
- if (i && !(i instanceof _e))
652
- return;
653
- if (i != null) {
654
- i.addObject(n);
655
- return;
656
- }
657
- const s = new _e(o);
658
- t.addObject(s, $e).attachTransformerTo(s), s.addObject(n);
659
- const { transform: c } = r;
660
- c && s.transformByState(
661
- {
662
- left: c.left,
663
- top: c.top,
664
- angle: c.angle
665
- }
666
- );
667
- }
668
- function pt(a) {
669
- const n = a.getFocusedUnit();
670
- if (n == null)
671
- return;
672
- const t = n.getUnitId();
673
- let e;
674
- return n.type === xe.UNIVER_SHEET ? e = n.getActiveSheet().getSheetId() : (n.type === xe.UNIVER_DOC || n.type === xe.UNIVER_SLIDE) && (e = t), { unitId: t, subUnitId: e };
675
- }
676
- var Vn = Object.defineProperty, Gn = Object.getOwnPropertyDescriptor, Wn = (a, n, t, e) => {
677
- for (var r = e > 1 ? void 0 : e ? Gn(n, t) : n, o = a.length - 1, i; o >= 0; o--)
678
- (i = a[o]) && (r = (e ? i(n, t, r) : i(r)) || r);
679
- return e && r && Vn(n, t, r), r;
680
- }, Me = (a, n) => (t, e) => n(t, e, a);
681
- let Ne = class extends He {
682
- constructor(n, t, e, r) {
726
+ }, $n = "COMPONENT_IMAGE_POPUP_MENU";
727
+ var zn = Object.defineProperty, Fn = Object.getOwnPropertyDescriptor, Kn = (a, n, e, t) => {
728
+ for (var r = t > 1 ? void 0 : t ? Fn(n, e) : n, o = a.length - 1, i; o >= 0; o--)
729
+ (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
730
+ return t && r && zn(n, e, r), r;
731
+ }, Ee = (a, n) => (e, t) => n(e, t, a);
732
+ let Me = class extends Ue {
733
+ constructor(n, e, t, r) {
683
734
  super();
684
- ne(this, "_sceneListenerOnDrawingMap", /* @__PURE__ */ new WeakSet());
685
- this._currentUniverService = n, this._commandService = t, this._renderManagerService = e, this._drawingManagerService = r, this._initialize();
735
+ ee(this, "_sceneListenerOnDrawingMap", /* @__PURE__ */ new WeakSet());
736
+ this._currentUniverService = n, this._commandService = e, this._renderManagerService = t, this._drawingManagerService = r, this._initialize();
686
737
  }
687
738
  dispose() {
688
739
  super.dispose();
@@ -691,14 +742,14 @@ let Ne = class extends He {
691
742
  this._recoveryImages(), this._drawingAddListener(), this._drawingRemoveListener(), this._drawingUpdateListener(), this._commandExecutedListener(), this._drawingArrangeListener(), this._drawingGroupListener(), this._drawingRefreshListener(), this._drawingVisibleListener();
692
743
  }
693
744
  _recoveryImages() {
694
- const n = this._drawingManagerService.drawingManagerData, t = pt(this._currentUniverService);
695
- if (t == null)
745
+ const n = this._drawingManagerService.drawingManagerData, e = st(this._currentUniverService);
746
+ if (e == null)
696
747
  return;
697
- const { unitId: e, subUnitId: r } = t;
748
+ const { unitId: t, subUnitId: r } = e;
698
749
  Object.keys(n).forEach((o) => {
699
750
  Object.keys(n[o]).forEach((i) => {
700
751
  const s = n[o][i].data;
701
- s == null || o !== e || i !== r || Object.keys(s).forEach((c) => {
752
+ s == null || o !== t || i !== r || Object.keys(s).forEach((c) => {
702
753
  s[c] && this._insertDrawing([{ unitId: o, subUnitId: i, drawingId: c }]);
703
754
  });
704
755
  });
@@ -708,10 +759,10 @@ let Ne = class extends He {
708
759
  this.disposeWithMe(
709
760
  this._commandService.onCommandExecuted((n) => {
710
761
  if (n.id === Fe.id) {
711
- const t = n.params;
712
- if (t == null)
762
+ const e = n.params;
763
+ if (e == null)
713
764
  return;
714
- this._drawingAlign(t);
765
+ this._drawingAlign(e);
715
766
  }
716
767
  })
717
768
  );
@@ -750,26 +801,26 @@ let Ne = class extends He {
750
801
  _getSceneAndTransformerByDrawingSearch(n) {
751
802
  if (n == null)
752
803
  return;
753
- const t = this._renderManagerService.getRenderById(n), e = t == null ? void 0 : t.scene;
754
- if (e == null)
804
+ const e = this._renderManagerService.getRenderById(n), t = e == null ? void 0 : e.scene;
805
+ if (t == null)
755
806
  return null;
756
- const r = e.getTransformerByCreate();
757
- return { scene: e, transformer: r };
807
+ const r = t.getTransformerByCreate();
808
+ return { scene: t, transformer: r };
758
809
  }
759
810
  _groupDrawings(n) {
760
- n.forEach((t) => {
761
- this._groupDrawing(t);
811
+ n.forEach((e) => {
812
+ this._groupDrawing(e);
762
813
  });
763
814
  }
764
815
  _groupDrawing(n) {
765
- const { parent: t, children: e } = n, { unitId: r, subUnitId: o, drawingId: i } = t, s = this._getSceneAndTransformerByDrawingSearch(t.unitId);
816
+ const { parent: e, children: t } = n, { unitId: r, subUnitId: o, drawingId: i } = e, s = this._getSceneAndTransformerByDrawingSearch(e.unitId);
766
817
  if (s == null)
767
818
  return;
768
819
  const { scene: c, transformer: g } = s;
769
- this._commandService.syncExecuteCommand(he.id);
820
+ this._commandService.syncExecuteCommand(ge.id);
770
821
  const u = [];
771
- if (e.forEach((f) => {
772
- const v = V(f), w = c.getObjectIncludeInGroup(v);
822
+ if (t.forEach((f) => {
823
+ const v = G(f), w = c.getObjectIncludeInGroup(v);
773
824
  if (w == null || u.includes(w))
774
825
  return;
775
826
  u.push(w);
@@ -777,8 +828,8 @@ let Ne = class extends He {
777
828
  p != null && (w.classType === Ye.GROUP ? w.transformByState({ left: p.left, top: p.top }) : w.transformByState(p));
778
829
  }), u.length === 0)
779
830
  return;
780
- const d = V({ unitId: r, subUnitId: o, drawingId: i }), h = new _e(d);
781
- c.addObject(h, $e).attachTransformerTo(h), h.addObjects(...u), t.transform && h.transformByState({ left: t.transform.left, top: t.transform.top }), g.clearSelectedObjects(), g.setSelectedControl(h);
831
+ const d = G({ unitId: r, subUnitId: o, drawingId: i }), h = new Ce(d);
832
+ c.addObject(h, $e).attachTransformerTo(h), h.addObjects(...u), e.transform && h.transformByState({ left: e.transform.left, top: e.transform.top }), g.clearSelectedObjects(), g.setSelectedControl(h);
782
833
  }
783
834
  // private _regroupDrawings(drawings: IDrawingSearch[]) {
784
835
  // const renderObject = this._getSceneAndTransformerByDrawingSearch(drawings[0].unitId);
@@ -815,17 +866,17 @@ let Ne = class extends He {
815
866
  // transformer.setSelectedControl(firstGroup);
816
867
  // }
817
868
  _ungroupDrawings(n) {
818
- n.forEach((t) => {
819
- this._ungroupDrawing(t);
869
+ n.forEach((e) => {
870
+ this._ungroupDrawing(e);
820
871
  });
821
872
  }
822
873
  _ungroupDrawing(n) {
823
- const { parent: t, children: e } = n, r = this._getSceneAndTransformerByDrawingSearch(t.unitId);
874
+ const { parent: e, children: t } = n, r = this._getSceneAndTransformerByDrawingSearch(e.unitId);
824
875
  if (r == null)
825
876
  return;
826
877
  const { scene: o, transformer: i } = r;
827
- e.forEach((d) => {
828
- const h = V(d), f = o.getObjectIncludeInGroup(h);
878
+ t.forEach((d) => {
879
+ const h = G(d), f = o.getObjectIncludeInGroup(h);
829
880
  if (f == null)
830
881
  return !0;
831
882
  if (f == null)
@@ -833,18 +884,18 @@ let Ne = class extends He {
833
884
  const { transform: v } = d;
834
885
  v != null && (f.classType === Ye.GROUP ? f.transformByState({ left: v.left, top: v.top }) : f.transformByState(v));
835
886
  });
836
- const s = V(t), c = o.getObject(s), { width: g, height: u } = c;
887
+ const s = G(e), c = o.getObject(s), { width: g, height: u } = c;
837
888
  c.getObjects().forEach((d) => {
838
889
  c.removeSelfObjectAndTransform(d.oKey, g, u);
839
890
  }), c.dispose(), i.clearSelectedObjects();
840
891
  }
841
892
  _drawingAlign(n) {
842
- const { alignType: t } = n, e = this._drawingManagerService.getFocusDrawings();
843
- if (t === N.default)
893
+ const { alignType: e } = n, t = this._drawingManagerService.getFocusDrawings();
894
+ if (e === N.default)
844
895
  return;
845
896
  const r = [];
846
897
  let o = Number.POSITIVE_INFINITY, i = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY, c = Number.NEGATIVE_INFINITY, g = 0;
847
- e.forEach((u) => {
898
+ t.forEach((u) => {
848
899
  const { unitId: d, subUnitId: h, drawingId: f, drawingType: v } = u, w = this._drawingManagerService.getDrawingByParam({ unitId: d, subUnitId: h, drawingId: f });
849
900
  if (w == null || w.transform == null)
850
901
  return;
@@ -855,59 +906,59 @@ let Ne = class extends He {
855
906
  drawingType: v,
856
907
  transform: w.transform
857
908
  });
858
- const { left: p = 0, top: E = 0, width: _ = 0, height: O = 0 } = w.transform;
859
- o = Math.min(o, p), i = Math.min(i, E), s = Math.max(s, p + _), c = Math.max(c, E + O), g++;
860
- }), g !== 0 && (this._sortDrawingTransform(r, t), this._applyAlignType(r, t, o, i, s, c, g));
909
+ const { left: p = 0, top: R = 0, width: _ = 0, height: O = 0 } = w.transform;
910
+ o = Math.min(o, p), i = Math.min(i, R), s = Math.max(s, p + _), c = Math.max(c, R + O), g++;
911
+ }), g !== 0 && (this._sortDrawingTransform(r, e), this._applyAlignType(r, e, o, i, s, c, g));
861
912
  }
862
- _applyAlignType(n, t, e, r, o, i, s) {
863
- const c = Math.round((o - e) / s * 10) / 10, g = Math.round((i - r) / s * 10) / 10, u = [], d = this._getSceneAndTransformerByDrawingSearch(n[0].unitId);
913
+ _applyAlignType(n, e, t, r, o, i, s) {
914
+ const c = Math.round((o - t) / s * 10) / 10, g = Math.round((i - r) / s * 10) / 10, u = [], d = this._getSceneAndTransformerByDrawingSearch(n[0].unitId);
864
915
  if (d == null)
865
916
  return;
866
917
  const { scene: h, transformer: f } = d;
867
918
  n.forEach((v, w) => {
868
- const { unitId: p, subUnitId: E, drawingId: _, transform: O, drawingType: S } = v, { left: I = 0, top: b = 0, width: R = 0, height: P = 0 } = O;
869
- let y = I, M = b;
870
- switch (t) {
919
+ const { unitId: p, subUnitId: R, drawingId: _, transform: O, drawingType: S } = v, { left: P = 0, top: I = 0, width: E = 0, height: y = 0 } = O;
920
+ let b = P, M = I;
921
+ switch (e) {
871
922
  case N.left:
872
- y = e;
923
+ b = t;
873
924
  break;
874
925
  case N.center:
875
- y = e + (o - e) / 2 - R / 2;
926
+ b = t + (o - t) / 2 - E / 2;
876
927
  break;
877
928
  case N.right:
878
- y = o - R;
929
+ b = o - E;
879
930
  break;
880
931
  case N.top:
881
932
  M = r;
882
933
  break;
883
934
  case N.middle:
884
- M = r + (i - r) / 2 - P / 2;
935
+ M = r + (i - r) / 2 - y / 2;
885
936
  break;
886
937
  case N.bottom:
887
- M = i - P;
938
+ M = i - y;
888
939
  break;
889
940
  case N.horizon:
890
- y = e + c * w;
941
+ b = t + c * w;
891
942
  break;
892
943
  case N.vertical:
893
944
  M = r + g * w;
894
945
  break;
895
946
  }
896
- (y !== I || M !== b) && u.push({
947
+ (b !== P || M !== I) && u.push({
897
948
  unitId: p,
898
- subUnitId: E,
949
+ subUnitId: R,
899
950
  drawingId: _,
900
951
  drawingType: S,
901
952
  transform: {
902
- left: y,
953
+ left: b,
903
954
  top: M
904
955
  }
905
956
  });
906
957
  }), this._drawingManagerService.featurePluginUpdateNotification(u), f.refreshControls().changeNotification();
907
958
  }
908
- _sortDrawingTransform(n, t) {
909
- n.sort((e, r) => {
910
- const o = e.transform, i = r.transform, {
959
+ _sortDrawingTransform(n, e) {
960
+ n.sort((t, r) => {
961
+ const o = t.transform, i = r.transform, {
911
962
  left: s = 0,
912
963
  top: c = 0,
913
964
  width: g = 0,
@@ -918,7 +969,7 @@ let Ne = class extends He {
918
969
  width: f = 0,
919
970
  height: v = 0
920
971
  } = i;
921
- switch (t) {
972
+ switch (e) {
922
973
  case N.left:
923
974
  return s - d;
924
975
  case N.center:
@@ -948,15 +999,15 @@ let Ne = class extends He {
948
999
  );
949
1000
  }
950
1001
  _drawingArrange(n) {
951
- const { unitId: t, subUnitId: e, drawingIds: r } = n, o = this._getSceneAndTransformerByDrawingSearch(t);
1002
+ const { unitId: e, subUnitId: t, drawingIds: r } = n, o = this._getSceneAndTransformerByDrawingSearch(e);
952
1003
  if (o == null)
953
1004
  return;
954
1005
  const { scene: i, transformer: s } = o;
955
1006
  r.forEach((c) => {
956
- const g = V({ unitId: t, subUnitId: e, drawingId: c }), u = i.getObject(g);
1007
+ const g = G({ unitId: e, subUnitId: t, drawingId: c }), u = i.getObject(g);
957
1008
  if (u == null)
958
1009
  return;
959
- const d = this._drawingManagerService.getDrawingOrder(t, e).indexOf(c);
1010
+ const d = this._drawingManagerService.getDrawingOrder(e, t).indexOf(c);
960
1011
  u.setProps({ zIndex: d }), u.makeDirty();
961
1012
  });
962
1013
  }
@@ -968,29 +1019,29 @@ let Ne = class extends He {
968
1019
  );
969
1020
  }
970
1021
  _insertDrawing(n) {
971
- const t = [];
972
- n.forEach((e) => {
973
- const { unitId: r, subUnitId: o, drawingId: i } = e;
974
- if (this._drawingManagerService.getDrawingByParam(e) == null)
1022
+ const e = [];
1023
+ n.forEach((t) => {
1024
+ const { unitId: r, subUnitId: o, drawingId: i } = t;
1025
+ if (this._drawingManagerService.getDrawingByParam(t) == null)
975
1026
  return;
976
1027
  const c = this._getSceneAndTransformerByDrawingSearch(r);
977
1028
  if (c == null)
978
1029
  return;
979
1030
  const { scene: g, transformer: u } = c;
980
- t.includes(g) || t.push(g);
981
- }), t.forEach((e) => {
982
- this._sceneListenerOnDrawingMap.has(e) || (this._addListenerOnDrawing(e), this._sceneListenerOnDrawingMap.add(e));
1031
+ e.includes(g) || e.push(g);
1032
+ }), e.forEach((t) => {
1033
+ this._sceneListenerOnDrawingMap.has(t) || (this._addListenerOnDrawing(t), this._sceneListenerOnDrawingMap.add(t));
983
1034
  });
984
1035
  }
985
1036
  _drawingRemoveListener() {
986
1037
  this.disposeWithMe(
987
1038
  this._drawingManagerService.remove$.subscribe((n) => {
988
- n.forEach((t) => {
1039
+ n.forEach((e) => {
989
1040
  var d;
990
- const { unitId: e, subUnitId: r, drawingId: o } = t, i = this._getSceneAndTransformerByDrawingSearch(e);
1041
+ const { unitId: t, subUnitId: r, drawingId: o } = e, i = this._getSceneAndTransformerByDrawingSearch(t);
991
1042
  if (i == null)
992
1043
  return;
993
- const { scene: s, transformer: c } = i, g = V({ unitId: e, subUnitId: r, drawingId: o }), u = s.getObject(g);
1044
+ const { scene: s, transformer: c } = i, g = G({ unitId: t, subUnitId: r, drawingId: o }), u = s.getObject(g);
994
1045
  u != null && (u.dispose(), (d = s.getTransformer()) == null || d.clearSelectedObjects());
995
1046
  });
996
1047
  })
@@ -999,20 +1050,20 @@ let Ne = class extends He {
999
1050
  _drawingUpdateListener() {
1000
1051
  this.disposeWithMe(
1001
1052
  this._drawingManagerService.update$.subscribe((n) => {
1002
- n.forEach((t) => {
1003
- const { unitId: e, subUnitId: r, drawingId: o } = t, i = this._drawingManagerService.getDrawingByParam(t);
1053
+ n.forEach((e) => {
1054
+ const { unitId: t, subUnitId: r, drawingId: o } = e, i = this._drawingManagerService.getDrawingByParam(e);
1004
1055
  if (i == null)
1005
1056
  return;
1006
- const { transform: s, drawingType: c } = i, g = this._getSceneAndTransformerByDrawingSearch(e);
1057
+ const { transform: s, drawingType: c } = i, g = this._getSceneAndTransformerByDrawingSearch(t);
1007
1058
  if (g == null)
1008
1059
  return;
1009
1060
  const { scene: u, transformer: d } = g;
1010
1061
  if (s == null)
1011
1062
  return !0;
1012
- const { left: h = 0, top: f = 0, width: v = 0, height: w = 0, angle: p = 0, flipX: E = !1, flipY: _ = !1, skewX: O = 0, skewY: S = 0 } = s, I = V({ unitId: e, subUnitId: r, drawingId: o }), b = u.getObject(I);
1013
- if (b == null)
1063
+ const { left: h = 0, top: f = 0, width: v = 0, height: w = 0, angle: p = 0, flipX: R = !1, flipY: _ = !1, skewX: O = 0, skewY: S = 0 } = s, P = G({ unitId: t, subUnitId: r, drawingId: o }), I = u.getObject(P);
1064
+ if (I == null)
1014
1065
  return !0;
1015
- b.transformByState({ left: h, top: f, width: v, height: w, angle: p, flipX: E, flipY: _, skewX: O, skewY: S });
1066
+ I.transformByState({ left: h, top: f, width: v, height: w, angle: p, flipX: R, flipY: _, skewX: O, skewY: S });
1016
1067
  });
1017
1068
  })
1018
1069
  );
@@ -1020,20 +1071,20 @@ let Ne = class extends He {
1020
1071
  _drawingRefreshListener() {
1021
1072
  this.disposeWithMe(
1022
1073
  this._drawingManagerService.refreshTransform$.subscribe((n) => {
1023
- n.forEach((t) => {
1024
- const { unitId: e, subUnitId: r, drawingId: o } = t, i = this._getSceneAndTransformerByDrawingSearch(e);
1074
+ n.forEach((e) => {
1075
+ const { unitId: t, subUnitId: r, drawingId: o } = e, i = this._getSceneAndTransformerByDrawingSearch(t);
1025
1076
  if (i == null)
1026
1077
  return;
1027
- const { scene: s, transformer: c } = i, g = V({ unitId: e, subUnitId: r, drawingId: o }), u = s.getObject(g), d = this._drawingManagerService.getDrawingByParam(t);
1078
+ const { scene: s, transformer: c } = i, g = G({ unitId: t, subUnitId: r, drawingId: o }), u = s.getObject(g), d = this._drawingManagerService.getDrawingByParam(e);
1028
1079
  if (d == null)
1029
1080
  return;
1030
1081
  const { transform: h } = d;
1031
1082
  if (h == null)
1032
1083
  return !0;
1033
- const { left: f = 0, top: v = 0, width: w = 0, height: p = 0, angle: E = 0, flipX: _ = !1, flipY: O = !1, skewX: S = 0, skewY: I = 0 } = h;
1084
+ const { left: f = 0, top: v = 0, width: w = 0, height: p = 0, angle: R = 0, flipX: _ = !1, flipY: O = !1, skewX: S = 0, skewY: P = 0 } = h;
1034
1085
  if (u == null)
1035
1086
  return !0;
1036
- u.transformByState({ left: f, top: v, width: w, height: p, angle: E, flipX: _, flipY: O, skewX: S, skewY: I });
1087
+ u.transformByState({ left: f, top: v, width: w, height: p, angle: R, flipX: _, flipY: O, skewX: S, skewY: P });
1037
1088
  });
1038
1089
  })
1039
1090
  );
@@ -1041,11 +1092,11 @@ let Ne = class extends He {
1041
1092
  _drawingVisibleListener() {
1042
1093
  this.disposeWithMe(
1043
1094
  this._drawingManagerService.visible$.subscribe((n) => {
1044
- n.forEach((t) => {
1045
- const { unitId: e, subUnitId: r, drawingId: o, visible: i } = t, s = this._getSceneAndTransformerByDrawingSearch(e);
1095
+ n.forEach((e) => {
1096
+ const { unitId: t, subUnitId: r, drawingId: o, visible: i } = e, s = this._getSceneAndTransformerByDrawingSearch(t);
1046
1097
  if (s == null)
1047
1098
  return;
1048
- const { scene: c, transformer: g } = s, u = V({ unitId: e, subUnitId: r, drawingId: o }), d = c.getObject(u);
1099
+ const { scene: c, transformer: g } = s, u = G({ unitId: t, subUnitId: r, drawingId: o }), d = c.getObject(u);
1049
1100
  if (d == null)
1050
1101
  return !0;
1051
1102
  i ? d.show() : d.hide();
@@ -1053,12 +1104,12 @@ let Ne = class extends He {
1053
1104
  })
1054
1105
  );
1055
1106
  }
1056
- _filterUpdateParams(n, t) {
1057
- return n.filter((e, r) => {
1058
- if (e == null)
1107
+ _filterUpdateParams(n, e) {
1108
+ return n.filter((t, r) => {
1109
+ if (t == null)
1059
1110
  return !1;
1060
- const { transform: o } = e;
1061
- return tt(o, t == null ? void 0 : t[r]);
1111
+ const { transform: o } = t;
1112
+ return rt(o, e == null ? void 0 : e[r]);
1062
1113
  });
1063
1114
  }
1064
1115
  // group?.getObjects().forEach((o) => {
@@ -1069,27 +1120,27 @@ let Ne = class extends He {
1069
1120
  // }
1070
1121
  // });
1071
1122
  _addListenerOnDrawing(n) {
1072
- const t = n.getTransformerByCreate();
1073
- let e = null;
1123
+ const e = n.getTransformerByCreate();
1124
+ let t = null;
1074
1125
  this.disposeWithMe(
1075
- K(
1076
- t.onChangeStartObservable.add((r) => {
1126
+ F(
1127
+ e.onChangeStartObservable.add((r) => {
1077
1128
  const { objects: o } = r, i = Array.from(o.values()), s = [];
1078
- e = i.map((c) => {
1079
- const { left: g, top: u, height: d, width: h, angle: f, oKey: v, groupKey: w, isInGroup: p } = c, E = this._drawingManagerService.getDrawingOKey(v);
1080
- if (p || c instanceof _e) {
1129
+ t = i.map((c) => {
1130
+ const { left: g, top: u, height: d, width: h, angle: f, oKey: v, groupKey: w, isInGroup: p } = c, R = this._drawingManagerService.getDrawingOKey(v);
1131
+ if (p || c instanceof Ce) {
1081
1132
  let _ = c.ancestorGroup;
1082
- if (_ == null && c instanceof _e && (_ = c), _ == null)
1133
+ if (_ == null && c instanceof Ce && (_ = c), _ == null)
1083
1134
  return null;
1084
1135
  const O = this._drawingManagerService.getDrawingOKey(_.oKey);
1085
1136
  if (O) {
1086
- const { unitId: S, subUnitId: I, drawingId: b } = O;
1087
- s.push({ unitId: S, subUnitId: I, drawingId: b });
1088
- const { left: R, top: P, height: y, width: M, angle: B } = _;
1089
- return { left: R, top: P, height: y, width: M, angle: B };
1137
+ const { unitId: S, subUnitId: P, drawingId: I } = O;
1138
+ s.push({ unitId: S, subUnitId: P, drawingId: I });
1139
+ const { left: E, top: y, height: b, width: M, angle: j } = _;
1140
+ return { left: E, top: y, height: b, width: M, angle: j };
1090
1141
  }
1091
- } else if (E != null) {
1092
- const { unitId: _, subUnitId: O, drawingId: S } = E;
1142
+ } else if (R != null) {
1143
+ const { unitId: _, subUnitId: O, drawingId: S } = R;
1093
1144
  return s.push({ unitId: _, subUnitId: O, drawingId: S }), { left: g, top: u, height: d, width: h, angle: f };
1094
1145
  }
1095
1146
  return null;
@@ -1097,108 +1148,108 @@ let Ne = class extends He {
1097
1148
  })
1098
1149
  )
1099
1150
  ), this.disposeWithMe(
1100
- K(
1101
- t.onChangingObservable.add((r) => {
1151
+ F(
1152
+ e.onChangingObservable.add((r) => {
1102
1153
  const { objects: o } = r;
1103
- Se(o, this._drawingManagerService).length > 0;
1154
+ we(o, this._drawingManagerService).length > 0;
1104
1155
  })
1105
1156
  )
1106
1157
  ), this.disposeWithMe(
1107
- K(
1108
- t.onChangeEndObservable.add((r) => {
1109
- const { objects: o } = r, i = this._filterUpdateParams(Se(o, this._drawingManagerService), e);
1158
+ F(
1159
+ e.onChangeEndObservable.add((r) => {
1160
+ const { objects: o } = r, i = this._filterUpdateParams(we(o, this._drawingManagerService), t);
1110
1161
  i.length > 0 && this._drawingManagerService.featurePluginUpdateNotification(i);
1111
1162
  })
1112
1163
  )
1113
1164
  );
1114
1165
  }
1115
1166
  };
1116
- Ne = Wn([
1117
- Le(Ae.Rendered, Ne),
1118
- Me(0, ze),
1119
- Me(1, le),
1120
- Me(2, fe),
1121
- Me(3, se)
1122
- ], Ne);
1123
- const kn = (a) => {
1167
+ Me = Kn([
1168
+ He(Ae.Rendered, Me),
1169
+ Ee(0, ze),
1170
+ Ee(1, le),
1171
+ Ee(2, ue),
1172
+ Ee(3, re)
1173
+ ], Me);
1174
+ const Zn = (a) => {
1124
1175
  const { src: n } = a;
1125
1176
  return n ? /* @__PURE__ */ l.createElement("div", null, /* @__PURE__ */ l.createElement("img", { src: n, alt: "Univer Image Viewer", style: { width: "100%", height: "100%", position: "relative" } })) : null;
1126
- }, Ct = "COMPONENT_IMAGE_VIEWER";
1127
- var zn = Object.defineProperty, $n = Object.getOwnPropertyDescriptor, Fn = (a, n, t, e) => {
1128
- for (var r = e > 1 ? void 0 : e ? $n(n, t) : n, o = a.length - 1, i; o >= 0; o--)
1129
- (i = a[o]) && (r = (e ? i(n, t, r) : i(r)) || r);
1130
- return e && r && zn(n, t, r), r;
1131
- }, ve = (a, n) => (t, e) => n(t, e, a);
1132
- let De = class extends He {
1133
- constructor(a, n, t, e, r) {
1134
- super(), this._injector = a, this._componentManager = n, this._menuService = t, this._commandService = e, this._localeService = r, this._init();
1177
+ }, vt = "COMPONENT_IMAGE_VIEWER";
1178
+ var Yn = Object.defineProperty, Xn = Object.getOwnPropertyDescriptor, Jn = (a, n, e, t) => {
1179
+ for (var r = t > 1 ? void 0 : t ? Xn(n, e) : n, o = a.length - 1, i; o >= 0; o--)
1180
+ (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
1181
+ return t && r && Yn(n, e, r), r;
1182
+ }, pe = (a, n) => (e, t) => n(e, t, a);
1183
+ let Oe = class extends Ue {
1184
+ constructor(a, n, e, t, r) {
1185
+ super(), this._injector = a, this._componentManager = n, this._menuService = e, this._commandService = t, this._localeService = r, this._init();
1135
1186
  }
1136
1187
  _initCustomComponents() {
1137
1188
  const a = this._componentManager;
1138
- this.disposeWithMe(a.register(An, Ln)), this.disposeWithMe(a.register(Ct, kn));
1189
+ this.disposeWithMe(a.register($n, kn)), this.disposeWithMe(a.register(vt, Zn));
1139
1190
  }
1140
1191
  _initMenus() {
1141
1192
  }
1142
1193
  _initCommands() {
1143
1194
  [
1144
1195
  ke,
1145
- he,
1146
- it,
1196
+ ge,
1197
+ lt,
1147
1198
  Fe,
1148
- Ue
1199
+ je
1149
1200
  ].forEach((a) => this.disposeWithMe(this._commandService.registerCommand(a)));
1150
1201
  }
1151
1202
  _init() {
1152
1203
  this._initCommands(), this._initCustomComponents(), this._initMenus();
1153
1204
  }
1154
1205
  };
1155
- De = Fn([
1156
- Le(Ae.Rendered, De),
1157
- ve(0, de(at)),
1158
- ve(1, de(At)),
1159
- ve(2, xt),
1160
- ve(3, le),
1161
- ve(4, de(J))
1162
- ], De);
1163
- class Oe extends Bt {
1164
- constructor(t, e) {
1165
- e == null && (e = {}), e.transformerConfig = {
1206
+ Oe = Jn([
1207
+ He(Ae.Rendered, Oe),
1208
+ pe(0, se(ot)),
1209
+ pe(1, se(Gt)),
1210
+ pe(2, Vt),
1211
+ pe(3, le),
1212
+ pe(4, se(X))
1213
+ ], Oe);
1214
+ class Re extends Bt {
1215
+ constructor(e, t) {
1216
+ t == null && (t = {}), t.transformerConfig = {
1166
1217
  keepRatio: !1,
1167
1218
  isCropper: !0,
1168
1219
  anchorFill: "rgb(0, 0, 0)",
1169
1220
  anchorStroke: "rgb(255, 255, 255)",
1170
1221
  anchorSize: 24
1171
1222
  };
1172
- super(t, e);
1173
- ne(this, "_srcRect");
1174
- ne(this, "_prstGeom");
1175
- ne(this, "_applyTransform");
1176
- ne(this, "_dragPadding", 8);
1177
- ne(this, "_cacheCanvas");
1178
- e != null && e.srcRect && (this._srcRect = e.srcRect), e != null && e.prstGeom && (this._prstGeom = e.prstGeom), e != null && e.applyTransform && (this._applyTransform = e.applyTransform), e != null && e.dragPadding && (this._dragPadding = e.dragPadding), this._applyProps();
1223
+ super(e, t);
1224
+ ee(this, "_srcRect");
1225
+ ee(this, "_prstGeom");
1226
+ ee(this, "_applyTransform");
1227
+ ee(this, "_dragPadding", 8);
1228
+ ee(this, "_cacheCanvas");
1229
+ t != null && t.srcRect && (this._srcRect = t.srcRect), t != null && t.prstGeom && (this._prstGeom = t.prstGeom), t != null && t.applyTransform && (this._applyTransform = t.applyTransform), t != null && t.dragPadding && (this._dragPadding = t.dragPadding), this._applyProps();
1179
1230
  }
1180
- refreshSrcRect(t, e) {
1181
- this._srcRect = t, this._applyTransform = e, this._applyProps();
1231
+ refreshSrcRect(e, t) {
1232
+ this._srcRect = e, this._applyTransform = t, this._applyProps();
1182
1233
  }
1183
1234
  get srcRect() {
1184
1235
  return this._srcRect;
1185
1236
  }
1186
1237
  dispose() {
1187
- var t;
1188
- super.dispose(), (t = this._cacheCanvas) == null || t.dispose(), this._srcRect = null;
1238
+ var e;
1239
+ super.dispose(), (e = this._cacheCanvas) == null || e.dispose(), this._srcRect = null;
1189
1240
  }
1190
- isHit(t) {
1191
- const e = this.getInverseCoord(t);
1192
- return e.x >= -this.strokeWidth / 2 && e.x <= this.width + this.strokeWidth / 2 && e.y >= -this.strokeWidth / 2 && e.y <= this.height + this.strokeWidth / 2 && !this._inSurround(e);
1241
+ isHit(e) {
1242
+ const t = this.getInverseCoord(e);
1243
+ return t.x >= -this.strokeWidth / 2 && t.x <= this.width + this.strokeWidth / 2 && t.y >= -this.strokeWidth / 2 && t.y <= this.height + this.strokeWidth / 2 && !this._inSurround(t);
1193
1244
  }
1194
- _inSurround(t) {
1195
- const e = this._dragPadding;
1196
- return t.x >= e - this.strokeWidth / 2 && t.x <= this.width + this.strokeWidth / 2 - e && t.y >= e - this.strokeWidth / 2 && t.y <= this.height + this.strokeWidth / 2 - e;
1245
+ _inSurround(e) {
1246
+ const t = this._dragPadding;
1247
+ return e.x >= t - this.strokeWidth / 2 && e.x <= this.width + this.strokeWidth / 2 - t && e.y >= t - this.strokeWidth / 2 && e.y <= this.height + this.strokeWidth / 2 - t;
1197
1248
  }
1198
- render(t, e) {
1199
- return this.visible ? (t.save(), this._draw(t), t.restore(), this.makeDirty(!1), this) : (this.makeDirty(!1), this);
1249
+ render(e, t) {
1250
+ return this.visible ? (e.save(), this._draw(e), e.restore(), this.makeDirty(!1), this) : (this.makeDirty(!1), this);
1200
1251
  }
1201
- _draw(t) {
1252
+ _draw(e) {
1202
1253
  var c, g;
1203
1254
  const r = this.getScene().getEngine(), { width: o, height: i } = r;
1204
1255
  this._initialCacheCanvas(), (c = this._cacheCanvas) == null || c.clear();
@@ -1209,25 +1260,25 @@ class Oe extends Bt {
1209
1260
  width: o,
1210
1261
  height: i,
1211
1262
  fill: "rgba(0, 0, 0, 0.5)"
1212
- }), s.setTransform(t.getTransform()), this._clipForApplyObject(s), this._applyCache(t), s.restore());
1263
+ }), s.setTransform(e.getTransform()), this._clipForApplyObject(s), this._applyCache(e), s.restore());
1213
1264
  }
1214
- _clipForApplyObject(t) {
1215
- let e = 0;
1216
- if (this._prstGeom != null && (e = 1), t.globalCompositeOperation = "destination-out", t.beginPath(), e === 0) {
1265
+ _clipForApplyObject(e) {
1266
+ let t = 0;
1267
+ if (this._prstGeom != null && (t = 1), e.globalCompositeOperation = "destination-out", e.beginPath(), t === 0) {
1217
1268
  const r = this.transform.getMatrix();
1218
- t.transform(r[0], r[1], r[2], r[3], r[4], r[5]), t.rect(0, 0, this.width, this.height), t.fill();
1269
+ e.transform(r[0], r[1], r[2], r[3], r[4], r[5]), e.rect(0, 0, this.width, this.height), e.fill();
1219
1270
  }
1220
1271
  }
1221
1272
  _applyProps() {
1222
1273
  if (this._applyTransform == null)
1223
1274
  return;
1224
- let t = 0, e = 0, r = 0, o = 0;
1275
+ let e = 0, t = 0, r = 0, o = 0;
1225
1276
  const { left: i = 0, top: s = 0, width: c = 0, height: g = 0, angle: u } = this._applyTransform;
1226
1277
  if (this._srcRect != null) {
1227
1278
  const { left: f = 0, top: v = 0, right: w = 0, bottom: p = 0 } = this._srcRect;
1228
- t = f, e = v, r = w, o = p;
1279
+ e = f, t = v, r = w, o = p;
1229
1280
  }
1230
- const d = i + t, h = s + e;
1281
+ const d = i + e, h = s + t;
1231
1282
  this.transformByState({
1232
1283
  left: d,
1233
1284
  top: h,
@@ -1236,33 +1287,33 @@ class Oe extends Bt {
1236
1287
  angle: u
1237
1288
  });
1238
1289
  }
1239
- _applyCache(t) {
1240
- if (!t || this._cacheCanvas == null)
1290
+ _applyCache(e) {
1291
+ if (!e || this._cacheCanvas == null)
1241
1292
  return;
1242
- const e = this._cacheCanvas.getContext();
1243
- e.save(), t.save(), t.setTransform(1, 0, 0, 1, 0, 0), e.setTransform(1, 0, 0, 1, 0, 0), t.drawImage(this._cacheCanvas.getCanvasEle(), 0, 0), t.restore(), e.restore();
1293
+ const t = this._cacheCanvas.getContext();
1294
+ t.save(), e.save(), e.setTransform(1, 0, 0, 1, 0, 0), t.setTransform(1, 0, 0, 1, 0, 0), e.drawImage(this._cacheCanvas.getCanvasEle(), 0, 0), e.restore(), t.restore();
1244
1295
  }
1245
1296
  _initialCacheCanvas() {
1246
1297
  if (this._cacheCanvas != null)
1247
1298
  return;
1248
1299
  this._cacheCanvas = new Ut();
1249
- const t = this.getScene().getEngine();
1250
- this._cacheCanvas.setSize(t.width, t.height), this.getScene().getEngine().onTransformChangeObservable.add(() => {
1251
- var e;
1252
- (e = this._cacheCanvas) == null || e.setSize(t.width, t.height), this.makeDirty(!0);
1300
+ const e = this.getScene().getEngine();
1301
+ this._cacheCanvas.setSize(e.width, e.height), this.getScene().getEngine().onTransformChangeObservable.add(() => {
1302
+ var t;
1303
+ (t = this._cacheCanvas) == null || t.setSize(e.width, e.height), this.makeDirty(!0);
1253
1304
  });
1254
1305
  }
1255
1306
  }
1256
- var Kn = Object.defineProperty, Zn = Object.getOwnPropertyDescriptor, Yn = (a, n, t, e) => {
1257
- for (var r = e > 1 ? void 0 : e ? Zn(n, t) : n, o = a.length - 1, i; o >= 0; o--)
1258
- (i = a[o]) && (r = (e ? i(n, t, r) : i(r)) || r);
1259
- return e && r && Kn(n, t, r), r;
1260
- }, ge = (a, n) => (t, e) => n(t, e, a);
1261
- let Te = class extends He {
1262
- constructor(n, t, e, r, o, i) {
1307
+ var qn = Object.defineProperty, Qn = Object.getOwnPropertyDescriptor, er = (a, n, e, t) => {
1308
+ for (var r = t > 1 ? void 0 : t ? Qn(n, e) : n, o = a.length - 1, i; o >= 0; o--)
1309
+ (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
1310
+ return t && r && qn(n, e, r), r;
1311
+ }, me = (a, n) => (e, t) => n(e, t, a);
1312
+ let Ne = class extends Ue {
1313
+ constructor(n, e, t, r, o, i) {
1263
1314
  super();
1264
- ne(this, "_sceneListenerOnImageMap", /* @__PURE__ */ new WeakSet());
1265
- this._commandService = n, this._drawingManagerService = t, this._renderManagerService = e, this._univerInstanceService = r, this._messageService = o, this._localeService = i, this._init();
1315
+ ee(this, "_sceneListenerOnImageMap", /* @__PURE__ */ new WeakSet());
1316
+ this._commandService = n, this._drawingManagerService = e, this._renderManagerService = t, this._univerInstanceService = r, this._messageService = o, this._localeService = i, this._init();
1266
1317
  }
1267
1318
  _init() {
1268
1319
  this._initOpenCrop(), this._initCloseCrop(), this._initAutoCrop();
@@ -1270,19 +1321,19 @@ let Te = class extends He {
1270
1321
  _initAutoCrop() {
1271
1322
  this.disposeWithMe(
1272
1323
  this._commandService.onCommandExecuted((n) => {
1273
- if (n.id !== Ue.id)
1324
+ if (n.id !== je.id)
1274
1325
  return;
1275
- const t = n.params;
1276
- if (t == null)
1326
+ const e = n.params;
1327
+ if (e == null)
1277
1328
  return;
1278
- const { cropType: e } = t, r = this._drawingManagerService.getFocusDrawings();
1329
+ const { cropType: t } = e, r = this._drawingManagerService.getFocusDrawings();
1279
1330
  if (r.length !== 1)
1280
1331
  return;
1281
1332
  const o = r[0], { unitId: i, subUnitId: s, drawingId: c } = o, g = this._renderManagerService.getRenderById(i), u = g == null ? void 0 : g.scene;
1282
1333
  if (u == null)
1283
1334
  return !0;
1284
- this._searchCropObject(u) != null && this._commandService.syncExecuteCommand(he.id, { isAuto: !0 });
1285
- const h = V({ unitId: i, subUnitId: s, drawingId: c }), f = u.getObject(h);
1335
+ this._searchCropObject(u) != null && this._commandService.syncExecuteCommand(ge.id, { isAuto: !0 });
1336
+ const h = G({ unitId: i, subUnitId: s, drawingId: c }), f = u.getObject(h);
1286
1337
  if (!(f instanceof We)) {
1287
1338
  this._messageService.show({
1288
1339
  type: Je.Error,
@@ -1290,61 +1341,61 @@ let Te = class extends He {
1290
1341
  });
1291
1342
  return;
1292
1343
  }
1293
- f != null && (this._updateCropperObject(e, f), this._commandService.executeCommand(ke.id, { unitId: i, subUnitId: s, drawingId: c }));
1344
+ f != null && (this._updateCropperObject(t, f), this._commandService.executeCommand(ke.id, { unitId: i, subUnitId: s, drawingId: c }));
1294
1345
  })
1295
1346
  );
1296
1347
  }
1297
- _calculateSrcRectByRatio(n, t, e, r, o, i) {
1298
- const s = e / r, c = o / i;
1299
- let g = e, u = r;
1300
- s > c ? g = r * c : u = e / c;
1301
- const d = (e - g) / 2, h = (r - u) / 2;
1348
+ _calculateSrcRectByRatio(n, e, t, r, o, i) {
1349
+ const s = t / r, c = o / i;
1350
+ let g = t, u = r;
1351
+ s > c ? g = r * c : u = t / c;
1352
+ const d = (t - g) / 2, h = (r - u) / 2;
1302
1353
  return {
1303
- left: Ee(d, 1),
1304
- top: Ee(h, 1),
1305
- right: Ee(e - (d + g), 1),
1306
- bottom: Ee(r - (h + u), 1)
1354
+ left: be(d, 1),
1355
+ top: be(h, 1),
1356
+ right: be(t - (d + g), 1),
1357
+ bottom: be(r - (h + u), 1)
1307
1358
  };
1308
1359
  }
1309
- _updateCropperObject(n, t) {
1310
- const { left: e, top: r, width: o, height: i } = t.calculateTransformWithSrcRect();
1360
+ _updateCropperObject(n, e) {
1361
+ const { left: t, top: r, width: o, height: i } = e.calculateTransformWithSrcRect();
1311
1362
  let s;
1312
1363
  switch (n) {
1313
1364
  case H.R1_1:
1314
- s = this._calculateSrcRectByRatio(e, r, o, i, 1, 1);
1365
+ s = this._calculateSrcRectByRatio(t, r, o, i, 1, 1);
1315
1366
  break;
1316
1367
  case H.R16_9:
1317
- s = this._calculateSrcRectByRatio(e, r, o, i, 16, 9);
1368
+ s = this._calculateSrcRectByRatio(t, r, o, i, 16, 9);
1318
1369
  break;
1319
1370
  case H.R9_16:
1320
- s = this._calculateSrcRectByRatio(e, r, o, i, 9, 16);
1371
+ s = this._calculateSrcRectByRatio(t, r, o, i, 9, 16);
1321
1372
  break;
1322
1373
  case H.R5_4:
1323
- s = this._calculateSrcRectByRatio(e, r, o, i, 5, 4);
1374
+ s = this._calculateSrcRectByRatio(t, r, o, i, 5, 4);
1324
1375
  break;
1325
1376
  case H.R4_5:
1326
- s = this._calculateSrcRectByRatio(e, r, o, i, 4, 5);
1377
+ s = this._calculateSrcRectByRatio(t, r, o, i, 4, 5);
1327
1378
  break;
1328
1379
  case H.R4_3:
1329
- s = this._calculateSrcRectByRatio(e, r, o, i, 4, 3);
1380
+ s = this._calculateSrcRectByRatio(t, r, o, i, 4, 3);
1330
1381
  break;
1331
1382
  case H.R3_4:
1332
- s = this._calculateSrcRectByRatio(e, r, o, i, 3, 4);
1383
+ s = this._calculateSrcRectByRatio(t, r, o, i, 3, 4);
1333
1384
  break;
1334
1385
  case H.R3_2:
1335
- s = this._calculateSrcRectByRatio(e, r, o, i, 3, 2);
1386
+ s = this._calculateSrcRectByRatio(t, r, o, i, 3, 2);
1336
1387
  break;
1337
1388
  case H.R2_3:
1338
- s = this._calculateSrcRectByRatio(e, r, o, i, 2, 3);
1389
+ s = this._calculateSrcRectByRatio(t, r, o, i, 2, 3);
1339
1390
  break;
1340
1391
  case H.FREE:
1341
1392
  }
1342
1393
  if (s == null)
1343
1394
  return;
1344
- t.setSrcRect(s);
1395
+ e.setSrcRect(s);
1345
1396
  const { left: c = 0, top: g = 0, bottom: u = 0, right: d = 0 } = s;
1346
- t.transformByStateCloseCropper({
1347
- left: e + c,
1397
+ e.transformByStateCloseCropper({
1398
+ left: t + c,
1348
1399
  top: r + g,
1349
1400
  width: o - d - c,
1350
1401
  height: i - u - g
@@ -1355,15 +1406,15 @@ let Te = class extends He {
1355
1406
  this._commandService.onCommandExecuted((n) => {
1356
1407
  if (n.id !== ke.id)
1357
1408
  return;
1358
- const t = n.params;
1359
- if (t == null)
1409
+ const e = n.params;
1410
+ if (e == null)
1360
1411
  return;
1361
- const { unitId: e, subUnitId: r, drawingId: o } = t, i = this._renderManagerService.getRenderById(e), s = i == null ? void 0 : i.scene;
1412
+ const { unitId: t, subUnitId: r, drawingId: o } = e, i = this._renderManagerService.getRenderById(t), s = i == null ? void 0 : i.scene;
1362
1413
  if (s == null)
1363
1414
  return !0;
1364
- if (this._sceneListenerOnImageMap.has(s) || (this._addListenerOnImage(s), this._sceneListenerOnImageMap.add(s)), this._drawingManagerService.getDrawingByParam({ unitId: e, subUnitId: r, drawingId: o }) == null)
1415
+ if (this._sceneListenerOnImageMap.has(s) || (this._addListenerOnImage(s), this._sceneListenerOnImageMap.add(s)), this._drawingManagerService.getDrawingByParam({ unitId: t, subUnitId: r, drawingId: o }) == null)
1365
1416
  return;
1366
- const g = V({ unitId: e, subUnitId: r, drawingId: o }), u = s.getObject(g);
1417
+ const g = G({ unitId: t, subUnitId: r, drawingId: o }), u = s.getObject(g);
1367
1418
  if (u == null)
1368
1419
  return;
1369
1420
  if (!(u instanceof We)) {
@@ -1375,30 +1426,30 @@ let Te = class extends He {
1375
1426
  }
1376
1427
  const d = s.getTransformer();
1377
1428
  d == null || d.clearControls();
1378
- const h = new Oe(`${g}-crop`, {
1429
+ const h = new Re(`${g}-crop`, {
1379
1430
  srcRect: u.srcRect,
1380
1431
  prstGeom: u.prstGeom,
1381
1432
  applyTransform: u.calculateTransformWithSrcRect()
1382
1433
  });
1383
- s.addObject(h, u.getLayerIndex() + 1).attachTransformerTo(h), d == null || d.createControlForCopper(h), this._addHoverForImageCopper(h), u.openRenderByCropper(), d == null || d.refreshControls(), h.makeDirty(!0), this._drawingManagerService.focusDrawing([{ unitId: e, subUnitId: r, drawingId: o }]);
1434
+ s.addObject(h, u.getLayerIndex() + 1).attachTransformerTo(h), d == null || d.createControlForCopper(h), this._addHoverForImageCopper(h), u.openRenderByCropper(), d == null || d.refreshControls(), h.makeDirty(!0), this._drawingManagerService.focusDrawing([{ unitId: t, subUnitId: r, drawingId: o }]);
1384
1435
  })
1385
1436
  );
1386
1437
  }
1387
1438
  _searchCropObject(n) {
1388
- const t = n.getAllObjects();
1389
- for (const e of t)
1390
- if (e instanceof Oe)
1391
- return e;
1439
+ const e = n.getAllObjects();
1440
+ for (const t of e)
1441
+ if (t instanceof Re)
1442
+ return t;
1392
1443
  }
1393
1444
  _initCloseCrop() {
1394
1445
  this.disposeWithMe(
1395
1446
  this._commandService.onCommandExecuted((n) => {
1396
- if (n.id !== he.id)
1447
+ if (n.id !== ge.id)
1397
1448
  return;
1398
- const t = this._univerInstanceService.getFocusedUnit();
1399
- if (t == null)
1449
+ const e = this._univerInstanceService.getFocusedUnit();
1450
+ if (e == null)
1400
1451
  return;
1401
- const e = t.getUnitId(), r = this._renderManagerService.getRenderById(e), o = r == null ? void 0 : r.scene;
1452
+ const t = e.getUnitId(), r = this._renderManagerService.getRenderById(t), o = r == null ? void 0 : r.scene;
1402
1453
  if (o == null)
1403
1454
  return !0;
1404
1455
  const i = this._searchCropObject(o);
@@ -1429,104 +1480,104 @@ let Te = class extends He {
1429
1480
  );
1430
1481
  }
1431
1482
  _getApplyObjectByCropObject(n) {
1432
- const t = n.oKey, e = t.slice(0, t.length - 5), r = n.getScene().getObject(e);
1483
+ const e = n.oKey, t = e.slice(0, e.length - 5), r = n.getScene().getObject(t);
1433
1484
  return r == null ? null : r;
1434
1485
  }
1435
1486
  _addListenerOnImage(n) {
1436
- const t = n.getTransformerByCreate();
1437
- let e = null;
1487
+ const e = n.getTransformerByCreate();
1488
+ let t = null;
1438
1489
  this.disposeWithMe(
1439
- K(
1440
- t.onChangeStartObservable.add((r) => {
1490
+ F(
1491
+ e.onChangeStartObservable.add((r) => {
1441
1492
  const { objects: o } = r, i = o.values().next().value;
1442
- if (i == null || !(i instanceof Oe))
1493
+ if (i == null || !(i instanceof Re))
1443
1494
  return;
1444
1495
  const { left: s, top: c, height: g, width: u, angle: d } = i;
1445
- e = { left: s, top: c, height: g, width: u, angle: d }, t.clearCopperControl();
1496
+ t = { left: s, top: c, height: g, width: u, angle: d }, e.clearCopperControl();
1446
1497
  })
1447
1498
  )
1448
1499
  ), this.disposeWithMe(
1449
- K(
1450
- t.onChangeEndObservable.add((r) => {
1500
+ F(
1501
+ e.onChangeEndObservable.add((r) => {
1451
1502
  const { objects: o } = r, i = o.values().next().value;
1452
- if (i == null || !(i instanceof Oe))
1503
+ if (i == null || !(i instanceof Re))
1453
1504
  return;
1454
1505
  const { left: s, top: c, height: g, width: u, angle: d } = i;
1455
- if (!tt({ left: s, top: c, height: g, width: u, angle: d }, e))
1506
+ if (!rt({ left: s, top: c, height: g, width: u, angle: d }, t))
1456
1507
  return;
1457
1508
  const h = this._getApplyObjectByCropObject(i);
1458
1509
  if (h == null)
1459
1510
  return;
1460
1511
  const f = this._getSrcRectByTransformState(h, i);
1461
- i.refreshSrcRect(f.srcRect, h.getState()), t.createControlForCopper(i);
1512
+ i.refreshSrcRect(f.srcRect, h.getState()), e.createControlForCopper(i);
1462
1513
  })
1463
1514
  )
1464
1515
  ), this._endCropListener(n);
1465
1516
  }
1466
1517
  _addHoverForImageCopper(n) {
1467
1518
  this.disposeWithMe(
1468
- K(
1519
+ F(
1469
1520
  n.onPointerEnterObserver.add(() => {
1470
- n.cursor = je.MOVE;
1521
+ n.cursor = Te.MOVE;
1471
1522
  })
1472
1523
  )
1473
1524
  ), this.disposeWithMe(
1474
- K(
1525
+ F(
1475
1526
  n.onPointerLeaveObserver.add(() => {
1476
- n.cursor = je.DEFAULT;
1527
+ n.cursor = Te.DEFAULT;
1477
1528
  })
1478
1529
  )
1479
1530
  );
1480
1531
  }
1481
1532
  _endCropListener(n) {
1482
- const t = n.getTransformerByCreate();
1533
+ const e = n.getTransformerByCreate();
1483
1534
  this.disposeWithMe(
1484
- K(
1485
- t.onClearControlObservable.add((e) => {
1486
- e === !0 && this._commandService.syncExecuteCommand(he.id);
1535
+ F(
1536
+ e.onClearControlObservable.add((t) => {
1537
+ t === !0 && this._commandService.syncExecuteCommand(ge.id);
1487
1538
  })
1488
1539
  )
1489
1540
  );
1490
1541
  }
1491
- _getSrcRectByTransformState(n, t) {
1492
- const { left: e, top: r, height: o, width: i, strokeWidth: s, angle: c } = t, { left: g, top: u, width: d, height: h, angle: f, strokeWidth: v } = n, w = e - g, p = r - u, E = {
1542
+ _getSrcRectByTransformState(n, e) {
1543
+ const { left: t, top: r, height: o, width: i, strokeWidth: s, angle: c } = e, { left: g, top: u, width: d, height: h, angle: f, strokeWidth: v } = n, w = t - g, p = r - u, R = {
1493
1544
  left: w,
1494
1545
  top: p,
1495
1546
  right: d - w - i,
1496
1547
  bottom: h - p - o
1497
- }, _ = { ...E };
1548
+ }, _ = { ...R };
1498
1549
  if (f !== 0) {
1499
- const O = e + i / 2, S = r + o / 2, I = new Ve(O, S), b = d / 2 + g, R = h / 2 + u, P = new Ve(b, R), y = new Ve(g, u);
1500
- y.rotateByPoint(Xe(f), P);
1501
- const M = y.clone();
1502
- M.rotateByPoint(Xe(-f), I);
1503
- const B = e - M.x, U = r - M.y;
1504
- _.left = B, _.top = U, _.right = d - B - i, _.bottom = h - U - o;
1550
+ const O = t + i / 2, S = r + o / 2, P = new xe(O, S), I = d / 2 + g, E = h / 2 + u, y = new xe(I, E), b = new xe(g, u);
1551
+ b.rotateByPoint(Xe(f), y);
1552
+ const M = b.clone();
1553
+ M.rotateByPoint(Xe(-f), P);
1554
+ const j = t - M.x, D = r - M.y;
1555
+ _.left = j, _.top = D, _.right = d - j - i, _.bottom = h - D - o;
1505
1556
  }
1506
1557
  return {
1507
- srcRect: E,
1558
+ srcRect: R,
1508
1559
  srcRectAngle: _
1509
1560
  };
1510
1561
  }
1511
1562
  };
1512
- Te = Yn([
1513
- Le(Ae.Rendered, Te),
1514
- ge(0, le),
1515
- ge(1, se),
1516
- ge(2, fe),
1517
- ge(3, ze),
1518
- ge(4, Vt),
1519
- ge(5, de(J))
1520
- ], Te);
1521
- var Xn = Object.defineProperty, Jn = Object.getOwnPropertyDescriptor, qn = (a, n, t, e) => {
1522
- for (var r = e > 1 ? void 0 : e ? Jn(n, t) : n, o = a.length - 1, i; o >= 0; o--)
1523
- (i = a[o]) && (r = (e ? i(n, t, r) : i(r)) || r);
1524
- return e && r && Xn(n, t, r), r;
1525
- }, ue = (a, n) => (t, e) => n(t, e, a);
1526
- const qe = 50;
1527
- let Be = class extends He {
1528
- constructor(a, n, t, e, r, o) {
1529
- super(), this._commandService = a, this._renderManagerService = n, this._drawingManagerService = t, this._dialogService = e, this._imageIoService = r, this._currentUniverService = o, this._initialize();
1563
+ Ne = er([
1564
+ He(Ae.Rendered, Ne),
1565
+ me(0, le),
1566
+ me(1, re),
1567
+ me(2, ue),
1568
+ me(3, ze),
1569
+ me(4, Wt),
1570
+ me(5, se(X))
1571
+ ], Ne);
1572
+ var tr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, rr = (a, n, e, t) => {
1573
+ for (var r = t > 1 ? void 0 : t ? nr(n, e) : n, o = a.length - 1, i; o >= 0; o--)
1574
+ (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
1575
+ return t && r && tr(n, e, r), r;
1576
+ }, ie = (a, n) => (e, t) => n(e, t, a);
1577
+ const Qe = 50;
1578
+ let De = class extends Ue {
1579
+ constructor(a, n, e, t, r, o, i) {
1580
+ super(), this._commandService = a, this._renderManagerService = n, this._drawingManagerService = e, this._dialogService = t, this._imageIoService = r, this._currentUniverService = o, this._drawingRenderService = i, this._initialize();
1530
1581
  }
1531
1582
  dispose() {
1532
1583
  super.dispose();
@@ -1535,14 +1586,14 @@ let Be = class extends He {
1535
1586
  this._recoveryImages(), this._drawingAddListener(), this._commandExecutedListener(), this._imageUpdateListener();
1536
1587
  }
1537
1588
  _recoveryImages() {
1538
- const a = this._drawingManagerService.drawingManagerData, n = pt(this._currentUniverService);
1589
+ const a = this._drawingManagerService.drawingManagerData, n = st(this._currentUniverService);
1539
1590
  if (n == null)
1540
1591
  return;
1541
- const { unitId: t, subUnitId: e } = n;
1592
+ const { unitId: e, subUnitId: t } = n;
1542
1593
  Object.keys(a).forEach((r) => {
1543
1594
  Object.keys(a[r]).forEach((o) => {
1544
1595
  const i = a[r][o].data;
1545
- i == null || r !== t || o !== e || Object.keys(i).forEach((s) => {
1596
+ i == null || r !== e || o !== t || Object.keys(i).forEach((s) => {
1546
1597
  i[s] && this._insertImages([{ unitId: r, subUnitId: o, drawingId: s }]);
1547
1598
  });
1548
1599
  });
@@ -1551,7 +1602,7 @@ let Be = class extends He {
1551
1602
  _commandExecutedListener() {
1552
1603
  this.disposeWithMe(
1553
1604
  this._commandService.onCommandExecuted((a) => {
1554
- if (a.id === it.id) {
1605
+ if (a.id === lt.id) {
1555
1606
  const n = a.params;
1556
1607
  if (n == null)
1557
1608
  return;
@@ -1563,29 +1614,29 @@ let Be = class extends He {
1563
1614
  _getSceneAndTransformerByDrawingSearch(a) {
1564
1615
  if (a == null)
1565
1616
  return;
1566
- const n = this._renderManagerService.getRenderById(a), t = n == null ? void 0 : n.scene;
1567
- if (t == null)
1617
+ const n = this._renderManagerService.getRenderById(a), e = n == null ? void 0 : n.scene;
1618
+ if (e == null)
1568
1619
  return null;
1569
- const e = t.getTransformerByCreate();
1570
- return { scene: t, transformer: e };
1620
+ const t = e.getTransformerByCreate();
1621
+ return { scene: e, transformer: t };
1571
1622
  }
1572
1623
  _resetImageSize(a) {
1573
- const n = [], t = [];
1574
- a.forEach((e) => {
1575
- const { unitId: r, subUnitId: o, drawingId: i } = e, s = this._getSceneAndTransformerByDrawingSearch(r);
1624
+ const n = [], e = [];
1625
+ a.forEach((t) => {
1626
+ const { unitId: r, subUnitId: o, drawingId: i } = t, s = this._getSceneAndTransformerByDrawingSearch(r);
1576
1627
  if (s == null)
1577
1628
  return;
1578
- const { scene: c, transformer: g } = s, u = V({ unitId: r, subUnitId: o, drawingId: i }), d = c.getObject(u);
1629
+ const { scene: c, transformer: g } = s, u = G({ unitId: r, subUnitId: o, drawingId: i }), d = c.getObject(u);
1579
1630
  if (d == null)
1580
1631
  return !0;
1581
- const h = this._drawingManagerService.getDrawingByParam(e);
1632
+ const h = this._drawingManagerService.getDrawingByParam(t);
1582
1633
  if (h == null)
1583
1634
  return !0;
1584
- if (h.drawingType !== oe.DRAWING_IMAGE)
1635
+ if (h.drawingType !== ne.DRAWING_IMAGE)
1585
1636
  return;
1586
1637
  d.resetSize();
1587
1638
  const { width: f, height: v } = d.getNativeSize();
1588
- t.includes(c) === !1 && t.push(c), n.push({
1639
+ e.includes(c) === !1 && e.push(c), n.push({
1589
1640
  ...h,
1590
1641
  transform: {
1591
1642
  ...h.transform,
@@ -1596,8 +1647,8 @@ let Be = class extends He {
1596
1647
  srcRect: null,
1597
1648
  prstGeom: null
1598
1649
  });
1599
- }), this._drawingManagerService.featurePluginUpdateNotification(n), t.forEach((e) => {
1600
- e.getTransformerByCreate().refreshControls().changeNotification();
1650
+ }), this._drawingManagerService.featurePluginUpdateNotification(n), e.forEach((t) => {
1651
+ t.getTransformerByCreate().refreshControls().changeNotification();
1601
1652
  }), this._drawingManagerService.focusDrawing(a);
1602
1653
  }
1603
1654
  _drawingAddListener() {
@@ -1609,60 +1660,33 @@ let Be = class extends He {
1609
1660
  }
1610
1661
  _insertImages(a) {
1611
1662
  a.forEach(async (n) => {
1612
- const { unitId: t, subUnitId: e, drawingId: r } = n, o = this._drawingManagerService.getDrawingByParam(n);
1663
+ const { unitId: e, subUnitId: t, drawingId: r } = n, o = this._getSceneAndTransformerByDrawingSearch(e);
1613
1664
  if (o == null)
1614
1665
  return;
1615
- const { transform: i, drawingType: s, source: c, imageSourceType: g, srcRect: u, prstGeom: d, groupId: h } = o;
1616
- if (s !== oe.DRAWING_IMAGE)
1617
- return;
1618
- const f = this._getSceneAndTransformerByDrawingSearch(t);
1619
- if (f == null)
1620
- return;
1621
- const { scene: v, transformer: w } = f;
1666
+ const i = this._drawingManagerService.getDrawingByParam(n);
1622
1667
  if (i == null)
1623
- return !0;
1624
- const { left: p, top: E, width: _, height: O, angle: S, flipX: I, flipY: b, skewX: R, skewY: P } = i, y = V({ unitId: t, subUnitId: e, drawingId: r }), M = v.getObject(y);
1625
- if (M != null) {
1626
- M.transformByState({ left: p, top: E, width: _, height: O, angle: S, flipX: I, flipY: b, skewX: R, skewY: P });
1627
1668
  return;
1628
- }
1629
- const B = this._drawingManagerService.getDrawingOrder(t, e), U = B.indexOf(r), te = { ...i, zIndex: U === -1 ? B.length - 1 : U }, G = this._imageIoService.getImageSourceCache(c, g);
1630
- let ce = !1;
1631
- if (G != null)
1632
- te.image = G;
1633
- else {
1634
- if (g === Rt.UUID)
1635
- try {
1636
- te.url = await this._imageIoService.getImage(c);
1637
- } catch (me) {
1638
- console.error(me);
1639
- return;
1640
- }
1641
- else
1642
- te.url = c;
1643
- ce = !0;
1644
- }
1645
- const Z = new We(y, te);
1646
- ce && this._imageIoService.addImageSourceCache(c, g, Z.getNative()), v.addObject(Z, $e).attachTransformerTo(Z), h && xn({ drawingId: h, unitId: t, subUnitId: e }, Z, v, this._drawingManagerService), d != null && Z.setPrstGeom(d), u != null && Z.setSrcRect(u), this._addHoverForImage(Z), this._addDialogForImage(Z);
1669
+ const s = await this._drawingRenderService.renderImage(i, o.scene);
1670
+ s && (this._addHoverForImage(s), this._addDialogForImage(s));
1647
1671
  });
1648
1672
  }
1649
1673
  _imageUpdateListener() {
1650
1674
  this.disposeWithMe(
1651
1675
  this._drawingManagerService.update$.subscribe((a) => {
1652
1676
  a.forEach((n) => {
1653
- const { unitId: t, subUnitId: e, drawingId: r } = n, o = this._drawingManagerService.getDrawingByParam(n);
1677
+ const { unitId: e, subUnitId: t, drawingId: r } = n, o = this._drawingManagerService.getDrawingByParam(n);
1654
1678
  if (o == null)
1655
1679
  return;
1656
1680
  const { transform: i, drawingType: s, srcRect: c, prstGeom: g, source: u, imageSourceType: d } = o;
1657
- if (s !== oe.DRAWING_IMAGE)
1681
+ if (s !== ne.DRAWING_IMAGE)
1658
1682
  return;
1659
- const h = this._getSceneAndTransformerByDrawingSearch(t);
1683
+ const h = this._getSceneAndTransformerByDrawingSearch(e);
1660
1684
  if (h == null)
1661
1685
  return;
1662
1686
  const { scene: f, transformer: v } = h;
1663
1687
  if (i == null)
1664
1688
  return !0;
1665
- const w = V({ unitId: t, subUnitId: e, drawingId: r }), p = f.getObject(w);
1689
+ const w = G({ unitId: e, subUnitId: t, drawingId: r }), p = f.getObject(w);
1666
1690
  if (p == null)
1667
1691
  return !0;
1668
1692
  p.setSrcRect(c), p.setPrstGeom(g);
@@ -1672,31 +1696,31 @@ let Be = class extends He {
1672
1696
  }
1673
1697
  _addHoverForImage(a) {
1674
1698
  this.disposeWithMe(
1675
- K(
1699
+ F(
1676
1700
  a.onPointerEnterObserver.add(() => {
1677
- a.cursor = je.GRAB;
1701
+ a.cursor = Te.GRAB;
1678
1702
  })
1679
1703
  )
1680
1704
  ), this.disposeWithMe(
1681
- K(
1705
+ F(
1682
1706
  a.onPointerLeaveObserver.add(() => {
1683
- a.cursor = je.DEFAULT;
1707
+ a.cursor = Te.DEFAULT;
1684
1708
  })
1685
1709
  )
1686
1710
  );
1687
1711
  }
1688
1712
  _addDialogForImage(a) {
1689
1713
  this.disposeWithMe(
1690
- K(
1714
+ F(
1691
1715
  a.onDblclickObserver.add(() => {
1692
1716
  var s;
1693
- const n = `${a.oKey}-viewer-dialog`, t = a.getNativeSize(), e = window.innerWidth - qe, r = window.innerHeight - qe, o = this._adjustImageSize(t.width, t.height, e, r), i = this._dialogService.open({
1717
+ const n = `${a.oKey}-viewer-dialog`, e = a.getNativeSize(), t = window.innerWidth - Qe, r = window.innerHeight - Qe, o = this._adjustImageSize(e.width, e.height, t, r), i = this._dialogService.open({
1694
1718
  width: o.width,
1695
1719
  id: n,
1696
1720
  style: { margin: "0", top: "50%", left: "50%", transform: "translate(-50%, -50%)" },
1697
1721
  children: {
1698
1722
  label: {
1699
- name: Ct,
1723
+ name: vt,
1700
1724
  props: {
1701
1725
  src: (s = a.getNative()) == null ? void 0 : s.src,
1702
1726
  width: o.width,
@@ -1714,38 +1738,39 @@ let Be = class extends He {
1714
1738
  )
1715
1739
  );
1716
1740
  }
1717
- _adjustImageSize(a, n, t, e) {
1718
- if (a <= t && n <= e)
1741
+ _adjustImageSize(a, n, e, t) {
1742
+ if (a <= e && n <= t)
1719
1743
  return {
1720
1744
  width: a,
1721
1745
  height: n
1722
1746
  };
1723
- const r = t / a, o = e / n, i = Math.min(r, o);
1747
+ const r = e / a, o = t / n, i = Math.min(r, o);
1724
1748
  return {
1725
1749
  width: Math.floor(a * i),
1726
1750
  height: Math.floor(n * i)
1727
1751
  };
1728
1752
  }
1729
1753
  };
1730
- Be = qn([
1731
- Le(Ae.Rendered, Be),
1732
- ue(0, le),
1733
- ue(1, fe),
1734
- ue(2, se),
1735
- ue(3, Gt),
1736
- ue(4, Mt),
1737
- ue(5, ze)
1738
- ], Be);
1739
- var Qn = Object.defineProperty, er = Object.getOwnPropertyDescriptor, tr = (a, n, t, e) => {
1740
- for (var r = e > 1 ? void 0 : e ? er(n, t) : n, o = a.length - 1, i; o >= 0; o--)
1741
- (i = a[o]) && (r = (e ? i(n, t, r) : i(r)) || r);
1742
- return e && r && Qn(n, t, r), r;
1743
- }, Qe = (a, n) => (t, e) => n(t, e, a);
1744
- const nr = "IMAGE_UI_PLUGIN";
1745
- var Ge;
1746
- let et = (Ge = class extends Nt {
1747
- constructor(a, n, t) {
1748
- super(), this._injector = n, this._localeService = t;
1754
+ De = rr([
1755
+ He(Ae.Rendered, De),
1756
+ ie(0, le),
1757
+ ie(1, ue),
1758
+ ie(2, re),
1759
+ ie(3, kt),
1760
+ ie(4, nt),
1761
+ ie(5, ze),
1762
+ ie(6, se(Be))
1763
+ ], De);
1764
+ var ar = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, or = (a, n, e, t) => {
1765
+ for (var r = t > 1 ? void 0 : t ? ir(n, e) : n, o = a.length - 1, i; o >= 0; o--)
1766
+ (i = a[o]) && (r = (t ? i(n, e, r) : i(r)) || r);
1767
+ return t && r && ar(n, e, r), r;
1768
+ }, et = (a, n) => (e, t) => n(e, t, a);
1769
+ const sr = "DRAWING_UI_PLUGIN";
1770
+ var Ve;
1771
+ let tt = (Ve = class extends At {
1772
+ constructor(a, n, e) {
1773
+ super(), this._injector = n, this._localeService = e;
1749
1774
  }
1750
1775
  onStarting(a) {
1751
1776
  this._initDependencies(a);
@@ -1753,26 +1778,28 @@ let et = (Ge = class extends Nt {
1753
1778
  _initDependencies(a) {
1754
1779
  [
1755
1780
  // services
1781
+ [Be],
1756
1782
  // controllers
1783
+ [Me],
1784
+ [Oe],
1757
1785
  [Ne],
1758
- [De],
1759
- [Te],
1760
- [Be]
1761
- ].forEach((t) => a.add(t));
1762
- }
1763
- }, ne(Ge, "pluginName", nr), Ge);
1764
- et = tr([
1765
- Qe(1, de(at)),
1766
- Qe(2, de(J))
1767
- ], et);
1786
+ [De]
1787
+ ].forEach((e) => a.add(e));
1788
+ }
1789
+ }, ee(Ve, "pluginName", sr), Ve);
1790
+ tt = or([
1791
+ et(1, se(ot)),
1792
+ et(2, se(X))
1793
+ ], tt);
1768
1794
  export {
1769
- An as COMPONENT_IMAGE_POPUP_MENU,
1770
- he as CloseImageCropOperation,
1771
- dr as DrawingCommonPanel,
1772
- Oe as ImageCropperObject,
1773
- Ln as ImagePopupMenu,
1774
- it as ImageResetSizeOperation,
1795
+ $n as COMPONENT_IMAGE_POPUP_MENU,
1796
+ ge as CloseImageCropOperation,
1797
+ wr as DrawingCommonPanel,
1798
+ Be as DrawingRenderService,
1799
+ Re as ImageCropperObject,
1800
+ kn as ImagePopupMenu,
1801
+ lt as ImageResetSizeOperation,
1775
1802
  ke as OpenImageCropOperation,
1776
- et as UniverDrawingUIPlugin,
1777
- Se as getUpdateParams
1803
+ tt as UniverDrawingUIPlugin,
1804
+ we as getUpdateParams
1778
1805
  };