@univerjs/docs-drawing-ui 0.13.0 → 0.14.0-insiders.20251222-4efcfbb

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/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  var Pn = Object.defineProperty;
2
2
  var xn = (r, e, t) => e in r ? Pn(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
3
  var me = (r, e, t) => xn(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { CommandType as q, ICommandService as j, IUniverInstanceService as z, TextX as _t, JSONX as $, MemoryCursor as Nn, TextXActionType as Y, IUndoRedoService as Kt, BuildTextUtils as Un, ArrangeTypeEnum as Ze, Tools as Ae, Inject as Z, IContextService as Yt, LocaleService as lt, Disposable as xe, WrapTextType as $e, PositionedObjectLayoutType as k, BooleanNumber as se, DrawingTypeEnum as Pe, ObjectRelativeFromV as W, ObjectRelativeFromH as J, FOCUSING_COMMON_DRAWINGS as nt, UniverInstanceType as ve, Direction as he, DisposableCollection as Ln, toDisposable as ze, fromEventSubject as Zt, generateRandomId as Qt, DocumentFlavor as pt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as St, FOCUSING_UNIVER_EDITOR as Bn, UndoCommand as Fn, RedoCommand as kn, Injector as Jt, DOC_DRAWING_PRINTING_COMPONENT_KEY as Wn, throttle as Et, COLORS as Gn, RxDisposable as Hn, LifecycleService as jn, LifecycleStages as Rt, DependentOn as Vn, IConfigService as $n, Plugin as zn, merge as Xn } from "@univerjs/core";
4
+ import { CommandType as q, ICommandService as j, IUniverInstanceService as z, TextX as _t, JSONX as $, MemoryCursor as Nn, TextXActionType as Y, IUndoRedoService as Kt, BuildTextUtils as Un, ArrangeTypeEnum as Ze, Tools as Ae, Inject as Z, IContextService as Yt, LocaleService as lt, Disposable as xe, WrapTextType as $e, PositionedObjectLayoutType as k, BooleanNumber as se, DrawingTypeEnum as Pe, ObjectRelativeFromV as W, ObjectRelativeFromH as J, FOCUSING_COMMON_DRAWINGS as nt, UniverInstanceType as ve, Direction as he, DisposableCollection as Ln, toDisposable as ze, fromEventSubject as Zt, generateRandomId as Qt, DocumentFlavor as pt, DOCS_ZEN_EDITOR_UNIT_ID_KEY as St, FOCUSING_UNIVER_EDITOR as Bn, UndoCommand as Fn, RedoCommand as kn, Injector as Jt, DOC_DRAWING_PRINTING_COMPONENT_KEY as Wn, throttle as Et, COLORS as Hn, RxDisposable as Gn, LifecycleService as jn, LifecycleStages as Rt, DependentOn as Vn, IConfigService as $n, Plugin as zn, merge as Xn } from "@univerjs/core";
5
5
  import { IDocDrawingService as Ne, UniverDocsDrawingPlugin as qn } from "@univerjs/docs-drawing";
6
6
  import { RichTextEditingMutation as ee, DocSelectionManagerService as Dt, DocSkeletonManagerService as te } from "@univerjs/docs";
7
7
  import { DocSelectionRenderService as Me, getRichTextEditPath as Xe, getCustomBlockIdsInSelections as Kn, docDrawingPositionToTransform as en, VIEWPORT_KEY as tn, SetDocZoomRatioOperation as nn, DocPrintInterceptorService as Yn, NodePositionConvertToCursor as At, getOneTextSelectionRange as Pt, getAnchorBounding as Zn, TEXT_RANGE_LAYER_INDEX as Qn, getDocObject as Jn, DocCanvasPopManagerService as ei, IEditorService as ti } from "@univerjs/docs-ui";
8
8
  import { IRenderManagerService as Q, DocumentEditArea as Fe, getCurrentTypeOfRenderer as ni, CURSOR_TYPE as xt, Liquid as rn, PageLayoutType as Nt, DocumentSkeletonPageType as Ut, Vector2 as ii, Rect as ri, getColor as si, TRANSFORM_CHANGE_OBSERVABLE_TYPE as oi } from "@univerjs/engine-render";
9
9
  import { MessageType as Lt, clsx as sn, InputNumber as Be, Select as Bt, Checkbox as ai, RadioGroup as Ft, Radio as Te, render as ci, unmount as di } from "@univerjs/design";
10
- import { IImageIoService as gi, IDrawingManagerService as fe, DRAWING_IMAGE_ALLOW_IMAGE_LIST as li, DRAWING_IMAGE_COUNT_LIMIT as kt, ImageUploadStatusType as mt, DRAWING_IMAGE_ALLOW_SIZE as ui, getImageSize as hi, getDrawingShapeKeyByDrawingSearch as fi, DRAWING_IMAGE_WIDTH_LIMIT as Wt, DRAWING_IMAGE_HEIGHT_LIMIT as Gt, UniverDrawingPlugin as pi } from "@univerjs/drawing";
10
+ import { IImageIoService as gi, IDrawingManagerService as fe, DRAWING_IMAGE_ALLOW_IMAGE_LIST as li, DRAWING_IMAGE_COUNT_LIMIT as kt, ImageUploadStatusType as mt, DRAWING_IMAGE_ALLOW_SIZE as ui, getImageSize as hi, getDrawingShapeKeyByDrawingSearch as fi, DRAWING_IMAGE_WIDTH_LIMIT as Wt, DRAWING_IMAGE_HEIGHT_LIMIT as Ht, UniverDrawingPlugin as pi } from "@univerjs/drawing";
11
11
  import { IMessageService as mi, ILocalFileService as wi, ISidebarService as vi, CanvasFloatDomService as Ii, useDependency as we, getMenuHiddenObservable as on, MenuItemType as an, RibbonInsertGroup as _i, KeyCode as ke, ComponentManager as cn, IMenuManagerService as Si, IShortcutService as Di, PrintFloatDomSingle as Oi, connectInjector as Ti, UniverUIPlugin as Mi } from "@univerjs/ui";
12
- import { BehaviorSubject as Ot, debounceTime as dn, map as Ht, switchMap as yi, of as bi, Observable as Ci, takeUntil as jt, filter as Vt } from "rxjs";
12
+ import { BehaviorSubject as Ot, debounceTime as dn, map as Gt, switchMap as yi, of as bi, Observable as Ci, takeUntil as jt, filter as Vt } from "rxjs";
13
13
  import { DrawingRenderService as gn, DrawingCommonPanel as Ei, ImageCropperObject as Ri, COMPONENT_IMAGE_POPUP_MENU as Ai, OpenImageCropOperation as Pi, ImageResetSizeOperation as xi, UniverDrawingUIPlugin as Ni } from "@univerjs/drawing-ui";
14
14
  import { jsxs as X, jsx as M } from "react/jsx-runtime";
15
15
  import { useState as re, useEffect as Tt, useMemo as Ui } from "react";
@@ -50,8 +50,8 @@ const Mt = {
50
50
  const S = Xe(s, d);
51
51
  D.push(g.editOp(a.serialize(), S));
52
52
  for (const R of l) {
53
- const { blockId: v } = R, N = ((L = s.getDrawings()) != null ? L : {})[v], x = s.getDrawingsOrder().indexOf(v), H = g.removeOp(["drawings", v], N), I = g.removeOp(["drawingsOrder", x], v);
54
- D.push(H), D.push(I);
53
+ const { blockId: v } = R, N = ((L = s.getDrawings()) != null ? L : {})[v], x = s.getDrawingsOrder().indexOf(v), G = g.removeOp(["drawings", v], N), I = g.removeOp(["drawingsOrder", x], v);
54
+ D.push(G), D.push(I);
55
55
  }
56
56
  return w.params.actions = D.reduce((R, v) => $.compose(R, v), null), !!t.syncExecuteCommand(w.id, w.params);
57
57
  }
@@ -116,10 +116,10 @@ const Mt = {
116
116
  else {
117
117
  const v = Un.selection.delete([s], l, 0, null, !1);
118
118
  f.push(...v);
119
- const N = Kn(l, [s]), G = (L = o.getDrawings()) != null ? L : {}, x = (R = o.getDrawingsOrder()) != null ? R : [], H = N.sort((I, _) => x.indexOf(I) > x.indexOf(_) ? -1 : x.indexOf(I) < x.indexOf(_) ? 1 : 0);
120
- if (H.length > 0)
121
- for (const I of H) {
122
- const _ = G[I], E = x.indexOf(I);
119
+ const N = Kn(l, [s]), H = (L = o.getDrawings()) != null ? L : {}, x = (R = o.getDrawingsOrder()) != null ? R : [], G = N.sort((I, _) => x.indexOf(I) > x.indexOf(_) ? -1 : x.indexOf(I) < x.indexOf(_) ? 1 : 0);
120
+ if (G.length > 0)
121
+ for (const I of G) {
122
+ const _ = H[I], E = x.indexOf(I);
123
123
  if (_ == null || E < 0)
124
124
  continue;
125
125
  const T = h.removeOp(["drawings", I], _), U = h.removeOp(["drawingsOrder", E], I);
@@ -140,8 +140,8 @@ const Mt = {
140
140
  const D = Xe(o, u), S = h.editOp(f.serialize(), D);
141
141
  m.push(S);
142
142
  for (const v of d) {
143
- const { drawingId: N } = v, G = h.insertOp(["drawings", N], v), x = h.insertOp(["drawingsOrder", p - w], N);
144
- m.push(G), m.push(x);
143
+ const { drawingId: N } = v, H = h.insertOp(["drawings", N], v), x = h.insertOp(["drawingsOrder", p - w], N);
144
+ m.push(H), m.push(x);
145
145
  }
146
146
  const O = {
147
147
  id: ee.id,
@@ -261,8 +261,8 @@ let it = class extends xe {
261
261
  const { imageId: s, imageSourceType: o, source: c, base64Cache: d } = i, { width: a, height: g, image: u } = await hi(d || "");
262
262
  this._imageIoService.addImageSourceCache(s, o, u);
263
263
  let l = 1;
264
- if (a > Wt || g > Gt) {
265
- const p = Wt / a, w = Gt / g;
264
+ if (a > Wt || g > Ht) {
265
+ const p = Wt / a, w = Ht / g;
266
266
  l = Math.min(p, w);
267
267
  }
268
268
  const f = this._getImagePosition(a * l, g * l);
@@ -571,9 +571,9 @@ const wn = {
571
571
  return !1;
572
572
  const f = g.getEditArea(), h = u.getTransformerByCreate(), { pages: m, skeHeaders: p, skeFooters: w } = a, D = $.getInstance(), S = [], { drawings: O = {} } = l.getSnapshot();
573
573
  for (const R of t) {
574
- const { drawingId: v } = R, N = O[v].layoutType, G = Fi[n];
575
- if (N !== G) {
576
- const _ = D.replaceOp(["drawings", v, "layoutType"], N, G);
574
+ const { drawingId: v } = R, N = O[v].layoutType, H = Fi[n];
575
+ if (N !== H) {
576
+ const _ = D.replaceOp(["drawings", v, "layoutType"], N, H);
577
577
  S.push(_);
578
578
  }
579
579
  if (n === "behindText" || n === "inFrontOfText") {
@@ -585,22 +585,22 @@ const wn = {
585
585
  }
586
586
  if (n === "inline")
587
587
  continue;
588
- let x = null, H = 0, I = 0;
588
+ let x = null, G = 0, I = 0;
589
589
  for (const _ of m) {
590
590
  const { headerId: E, footerId: T, marginTop: U, marginLeft: B, marginBottom: b, pageWidth: P, pageHeight: V } = _;
591
591
  switch (f) {
592
592
  case Fe.HEADER: {
593
593
  const F = (A = p.get(E)) == null ? void 0 : A.get(P);
594
- F != null && F.skeDrawings.has(v) && (x = F.skeDrawings.get(v), H = F.marginTop, I = B);
594
+ F != null && F.skeDrawings.has(v) && (x = F.skeDrawings.get(v), G = F.marginTop, I = B);
595
595
  break;
596
596
  }
597
597
  case Fe.FOOTER: {
598
598
  const F = (L = w.get(T)) == null ? void 0 : L.get(P);
599
- F != null && F.skeDrawings.has(v) && (x = F.skeDrawings.get(v), H = V - b + F.marginTop, I = B);
599
+ F != null && F.skeDrawings.has(v) && (x = F.skeDrawings.get(v), G = V - b + F.marginTop, I = B);
600
600
  break;
601
601
  }
602
602
  case Fe.BODY: {
603
- _.skeDrawings.has(v) && (x = _.skeDrawings.get(v), H = U, I = B);
603
+ _.skeDrawings.has(v) && (x = _.skeDrawings.get(v), G = U, I = B);
604
604
  break;
605
605
  }
606
606
  }
@@ -621,7 +621,7 @@ const wn = {
621
621
  }
622
622
  const b = O[v].docTransform.positionV;
623
623
  let P = _;
624
- b.relativeFrom === W.PAGE ? P += H : b.relativeFrom === W.LINE ? P -= x.lineTop : b.relativeFrom === W.PARAGRAPH && (P -= x.blockAnchorTop);
624
+ b.relativeFrom === W.PAGE ? P += G : b.relativeFrom === W.LINE ? P -= x.lineTop : b.relativeFrom === W.PARAGRAPH && (P -= x.blockAnchorTop);
625
625
  const V = {
626
626
  relativeFrom: b.relativeFrom,
627
627
  posOffset: P
@@ -779,7 +779,7 @@ const wn = {
779
779
  type: q.COMMAND,
780
780
  // eslint-disable-next-line max-lines-per-function
781
781
  handler: (r, e) => {
782
- var x, H;
782
+ var x, G;
783
783
  if (e == null)
784
784
  return !1;
785
785
  const t = r.get(Q), n = (x = t.getRenderById(e.unitId)) == null ? void 0 : x.with(Me), i = t.getRenderById(e.unitId), s = i == null ? void 0 : i.scene;
@@ -788,7 +788,7 @@ const wn = {
788
788
  const o = s.getTransformerByCreate(), c = r.get(j), a = r.get(z).getCurrentUniverDocInstance();
789
789
  if (a == null)
790
790
  return !1;
791
- const { drawing: g, unitId: u, offset: l, docTransform: f, segmentId: h, segmentPage: m } = e, p = [], { drawingId: w } = g, D = (H = n.getSegment()) != null ? H : "", S = mn(
791
+ const { drawing: g, unitId: u, offset: l, docTransform: f, segmentId: h, segmentPage: m } = e, p = [], { drawingId: w } = g, D = (G = n.getSegment()) != null ? G : "", S = mn(
792
792
  h,
793
793
  D,
794
794
  m,
@@ -827,8 +827,8 @@ const wn = {
827
827
  }
828
828
  };
829
829
  N.params.actions = p.reduce((I, _) => $.compose(I, _), null);
830
- const G = c.syncExecuteCommand(N.id, N.params);
831
- return o.refreshControls(), !!G;
830
+ const H = c.syncExecuteCommand(N.id, N.params);
831
+ return o.refreshControls(), !!H;
832
832
  }
833
833
  }, Ke = {
834
834
  id: "doc.command.move-drawing",
@@ -902,7 +902,7 @@ const wn = {
902
902
  return e == null ? !1 : (t.focusDrawing([e]), n.executeCommand(On.id, { value: "open" }), !0);
903
903
  }
904
904
  };
905
- var Wi = Object.getOwnPropertyDescriptor, Gi = (r, e, t, n) => {
905
+ var Wi = Object.getOwnPropertyDescriptor, Hi = (r, e, t, n) => {
906
906
  for (var i = n > 1 ? void 0 : n ? Wi(e, t) : e, s = r.length - 1, o; s >= 0; s--)
907
907
  (o = r[s]) && (i = o(i) || i);
908
908
  return i;
@@ -1049,13 +1049,13 @@ let rt = class extends xe {
1049
1049
  };
1050
1050
  this.disposeWithMe(
1051
1051
  this._univerInstanceService.getCurrentTypeOfUnit$(ve.UNIVER_DOC).pipe(
1052
- Ht((t) => {
1052
+ Gt((t) => {
1053
1053
  if (!t) return null;
1054
1054
  const n = t.getUnitId(), i = this._renderManagerService.getRenderById(n);
1055
1055
  return i ? { render: i, unitId: n } : null;
1056
1056
  }),
1057
1057
  yi(
1058
- (t) => t ? Zt(t.render.scene.getViewport(tn.VIEW_MAIN).onScrollAfter$).pipe(Ht(() => ({ unitId: t.unitId }))) : bi(null)
1058
+ (t) => t ? Zt(t.render.scene.getViewport(tn.VIEW_MAIN).onScrollAfter$).pipe(Gt(() => ({ unitId: t.unitId }))) : bi(null)
1059
1059
  )
1060
1060
  ).subscribe((t) => {
1061
1061
  if (!t) return;
@@ -1111,7 +1111,7 @@ let rt = class extends xe {
1111
1111
  return this._commandService.syncExecuteCommand(yt.id, h), f;
1112
1112
  }
1113
1113
  };
1114
- rt = Gi([
1114
+ rt = Hi([
1115
1115
  Le(0, Q),
1116
1116
  Le(1, fe),
1117
1117
  Le(2, Z(gn)),
@@ -1119,7 +1119,7 @@ rt = Gi([
1119
1119
  Le(4, z),
1120
1120
  Le(5, j)
1121
1121
  ], rt);
1122
- const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1122
+ const Gi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1123
1123
  const e = we(j), t = we(lt), n = we(fe), i = we(Q), s = we(z), { drawings: o } = r, c = o[0];
1124
1124
  if (c == null)
1125
1125
  return;
@@ -1221,7 +1221,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1221
1221
  };
1222
1222
  v("positionH", ne);
1223
1223
  }
1224
- function G(_) {
1224
+ function H(_) {
1225
1225
  var De, be, Ce, Oe, de, ge;
1226
1226
  const E = O.relativeFrom, T = O.posOffset, U = Number(_);
1227
1227
  if (E === U)
@@ -1254,15 +1254,15 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1254
1254
  } = T.docTransform;
1255
1255
  S(B), C(b), w(U === k.INLINE), A(b.relativeFrom === W.PARAGRAPH || b.relativeFrom === W.LINE);
1256
1256
  }
1257
- function H() {
1257
+ function G() {
1258
1258
  const _ = n.getFocusDrawings();
1259
1259
  _.length !== 0 && x(_[0]);
1260
1260
  }
1261
1261
  function I(_) {
1262
- A(_), G(String(_ ? W.PARAGRAPH : W.PAGE));
1262
+ A(_), H(String(_ ? W.PARAGRAPH : W.PAGE));
1263
1263
  }
1264
1264
  return Tt(() => {
1265
- H();
1265
+ G();
1266
1266
  const _ = n.focus$.subscribe((T) => {
1267
1267
  if (T.length === 0) {
1268
1268
  R(!1);
@@ -1270,7 +1270,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1270
1270
  }
1271
1271
  R(!0), x(T[0]);
1272
1272
  }), E = e.onCommandExecuted(async (T) => {
1273
- T.id === ee.id && H();
1273
+ T.id === ee.id && G();
1274
1274
  });
1275
1275
  return () => {
1276
1276
  _.unsubscribe(), E.dispose();
@@ -1374,7 +1374,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1374
1374
  disabled: p,
1375
1375
  value: String(O.relativeFrom),
1376
1376
  options: m,
1377
- onChange: G
1377
+ onChange: H
1378
1378
  }
1379
1379
  )
1380
1380
  ] })
@@ -1447,7 +1447,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1447
1447
  wrapText: I
1448
1448
  });
1449
1449
  }
1450
- function G(I, _) {
1450
+ function H(I, _) {
1451
1451
  if (I == null)
1452
1452
  return;
1453
1453
  const E = { ...y, [_]: I };
@@ -1471,9 +1471,9 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1471
1471
  }
1472
1472
  function x() {
1473
1473
  const I = n.getFocusDrawings();
1474
- I.length !== 0 && H(I[0]);
1474
+ I.length !== 0 && G(I[0]);
1475
1475
  }
1476
- function H(I) {
1476
+ function G(I) {
1477
1477
  var K, oe;
1478
1478
  const _ = (oe = (K = a == null ? void 0 : a.getSnapshot()) == null ? void 0 : K.drawings) == null ? void 0 : oe[I.drawingId];
1479
1479
  if (_ == null)
@@ -1516,7 +1516,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1516
1516
  R(!1);
1517
1517
  return;
1518
1518
  }
1519
- R(!0), H(E[0]);
1519
+ R(!0), G(E[0]);
1520
1520
  }), _ = e.onCommandExecuted(async (E) => {
1521
1521
  E.id === ee.id && x();
1522
1522
  });
@@ -1586,7 +1586,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1586
1586
  precision: 1,
1587
1587
  value: y.distT,
1588
1588
  onChange: (I) => {
1589
- G(I, "distT");
1589
+ H(I, "distT");
1590
1590
  }
1591
1591
  }
1592
1592
  )
@@ -1602,7 +1602,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1602
1602
  precision: 1,
1603
1603
  value: y.distL,
1604
1604
  onChange: (I) => {
1605
- G(I, "distL");
1605
+ H(I, "distL");
1606
1606
  }
1607
1607
  }
1608
1608
  )
@@ -1626,7 +1626,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1626
1626
  precision: 1,
1627
1627
  value: y.distB,
1628
1628
  onChange: (I) => {
1629
- G(I, "distB");
1629
+ H(I, "distB");
1630
1630
  }
1631
1631
  }
1632
1632
  )
@@ -1642,7 +1642,7 @@ const Hi = "docs-drawing-ui.config", $t = {}, zt = -1e3, Xt = 1e3, ji = (r) => {
1642
1642
  precision: 1,
1643
1643
  value: y.distR,
1644
1644
  onChange: (I) => {
1645
- G(I, "distR");
1645
+ H(I, "distR");
1646
1646
  }
1647
1647
  }
1648
1648
  )
@@ -1836,7 +1836,7 @@ var ir = Object.getOwnPropertyDescriptor, rr = (r, e, t, n) => {
1836
1836
  for (var i = n > 1 ? void 0 : n ? ir(e, t) : e, s = r.length - 1, o; s >= 0; s--)
1837
1837
  (o = r[s]) && (i = o(i) || i);
1838
1838
  return i;
1839
- }, He = (r, e) => (t, n) => e(t, n, r);
1839
+ }, Ge = (r, e) => (t, n) => e(t, n, r);
1840
1840
  function sr(r) {
1841
1841
  var n, i, s, o;
1842
1842
  if ($.isNoop(r) || !Array.isArray(r))
@@ -1944,11 +1944,11 @@ let ot = class extends xe {
1944
1944
  }
1945
1945
  };
1946
1946
  ot = rr([
1947
- He(0, z),
1948
- He(1, j),
1949
- He(2, fe),
1950
- He(3, Ne),
1951
- He(4, Q)
1947
+ Ge(0, z),
1948
+ Ge(1, j),
1949
+ Ge(2, fe),
1950
+ Ge(3, Ne),
1951
+ Ge(4, Q)
1952
1952
  ], ot);
1953
1953
  const ar = (r) => {
1954
1954
  const { floatDomInfos: e, scene: t, offset: n, bound: i } = r, s = i.right - i.left, o = i.bottom - i.top, c = Ui(() => e.map((d) => {
@@ -2240,7 +2240,7 @@ let ct = class extends xe {
2240
2240
  i != null && this._createOrUpdateInlineAnchor(e.unitId, i);
2241
2241
  }
2242
2242
  _getInlineDrawingAnchor(e, t, n) {
2243
- var x, H;
2243
+ var x, G;
2244
2244
  const i = this._renderManagerService.getRenderById(e.unitId), s = i == null ? void 0 : i.with(te).getSkeleton();
2245
2245
  if (i == null)
2246
2246
  return;
@@ -2273,9 +2273,9 @@ let ct = class extends xe {
2273
2273
  const A = {
2274
2274
  ...C,
2275
2275
  isBack: h
2276
- }, L = y.document.getOffsetConfig(), R = new At(L, s), { cursorList: v, contentBoxPointGroup: N } = R.getRangePointData(A, A), { startOffset: G } = (H = Pt(v)) != null ? H : {};
2277
- if (G != null)
2278
- return { offset: G, contentBoxPointGroup: N, segmentId: p, segmentPage: m };
2276
+ }, L = y.document.getOffsetConfig(), R = new At(L, s), { cursorList: v, contentBoxPointGroup: N } = R.getRangePointData(A, A), { startOffset: H } = (G = Pt(v)) != null ? G : {};
2277
+ if (H != null)
2278
+ return { offset: H, contentBoxPointGroup: N, segmentId: p, segmentPage: m };
2279
2279
  }
2280
2280
  // eslint-disable-next-line max-lines-per-function, complexity
2281
2281
  _getDrawingAnchor(e, t) {
@@ -2287,8 +2287,8 @@ let ct = class extends xe {
2287
2287
  let { width: C, height: y } = t;
2288
2288
  const { positionV: A, positionH: L } = e.docTransform, { width: R, height: v } = this._getPageContentSize(e);
2289
2289
  C = Math.min(C, R), y = Math.min(y, v);
2290
- let N = null, G = "", x = -1;
2291
- const H = !1, I = {
2290
+ let N = null, H = "", x = -1;
2291
+ const G = !1, I = {
2292
2292
  ...e.docTransform,
2293
2293
  size: {
2294
2294
  width: C,
@@ -2308,7 +2308,7 @@ let ct = class extends xe {
2308
2308
  });
2309
2309
  if (B) {
2310
2310
  const { node: pe, segmentPage: ht, segmentId: ft } = B;
2311
- N = pe, x = ht, G = ft;
2311
+ N = pe, x = ht, H = ft;
2312
2312
  }
2313
2313
  if (N == null)
2314
2314
  return;
@@ -2322,10 +2322,10 @@ let ct = class extends xe {
2322
2322
  if (x > -1 && An === x) {
2323
2323
  switch (K) {
2324
2324
  case Ut.HEADER: {
2325
- const Ge = (De = c.get(ht)) == null ? void 0 : De.get(bt);
2326
- if (Ge)
2325
+ const He = (De = c.get(ht)) == null ? void 0 : De.get(bt);
2326
+ if (He)
2327
2327
  this._liquid.translatePagePadding({
2328
- marginTop: Ge.marginTop,
2328
+ marginTop: He.marginTop,
2329
2329
  marginLeft: Ct
2330
2330
  });
2331
2331
  else
@@ -2333,10 +2333,10 @@ let ct = class extends xe {
2333
2333
  break;
2334
2334
  }
2335
2335
  case Ut.FOOTER: {
2336
- const Ge = (be = d.get(ft)) == null ? void 0 : be.get(bt);
2337
- if (Ge)
2336
+ const He = (be = d.get(ft)) == null ? void 0 : be.get(bt);
2337
+ if (He)
2338
2338
  this._liquid.translatePagePadding({
2339
- marginTop: En - Rn + Ge.marginTop,
2339
+ marginTop: En - Rn + He.marginTop,
2340
2340
  marginLeft: Ct
2341
2341
  });
2342
2342
  else
@@ -2387,10 +2387,10 @@ let ct = class extends xe {
2387
2387
  return;
2388
2388
  const ye = {
2389
2389
  ...oe,
2390
- isBack: H
2390
+ isBack: G
2391
2391
  }, We = Ue.document.getOffsetConfig(), ae = new At(We, i), { cursorList: ne } = ae.getRangePointData(ye, ye), { startOffset: ie } = (Ee = Pt(ne)) != null ? Ee : {};
2392
2392
  if (ie != null)
2393
- return { offset: ie, docTransform: I, segmentId: G, segmentPage: x };
2393
+ return { offset: ie, docTransform: I, segmentId: H, segmentPage: x };
2394
2394
  }
2395
2395
  // Update drawing when use transformer to resize it.
2396
2396
  _updateDrawingSize(e, t) {
@@ -2511,7 +2511,7 @@ let ct = class extends xe {
2511
2511
  top: h,
2512
2512
  height: l,
2513
2513
  strokeWidth: 2,
2514
- stroke: si(Gn.darkGray, 1),
2514
+ stroke: si(Hn.darkgray, 1),
2515
2515
  evented: !1
2516
2516
  });
2517
2517
  this._anchorShape = p, s.addObject(p, Qn);
@@ -2559,7 +2559,7 @@ var hr = Object.getOwnPropertyDescriptor, fr = (r, e, t, n) => {
2559
2559
  (o = r[s]) && (i = o(i) || i);
2560
2560
  return i;
2561
2561
  }, Ve = (r, e) => (t, n) => e(t, n, r);
2562
- let dt = class extends Hn {
2562
+ let dt = class extends Gn {
2563
2563
  constructor(e, t, n, i, s) {
2564
2564
  super();
2565
2565
  me(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
@@ -2860,7 +2860,7 @@ let gt = class extends zn {
2860
2860
  $t,
2861
2861
  this._config
2862
2862
  );
2863
- this._configService.setConfig(Hi, i);
2863
+ this._configService.setConfig(Gi, i);
2864
2864
  }
2865
2865
  onStarting() {
2866
2866
  [