@mlightcad/cad-simple-viewer 1.0.21 → 1.0.23

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/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { AcDbLayout as tt, AcCmEventManager as M, AcGePoint2d as S, AcGeBox2d as L, AcCmColor as Re, AcGeBox3d as it, AcDbDatabase as vt, AcDbFileType as ve, AcGeMathUtil as re, AcGeVector3d as be, AcGeGeometryUtil as St, AcGeVector2d as Te, acdbHostApplicationServices as nt, AcDbViewport as st, AcDbRasterImage as rt, AcDbRay as ot, AcDbXline as at, AcDbHatch as De, AcGePolyline2d as ct, AcDbLine as ht, AcDbTextStyleTableRecord as lt, AcDbMText as dt, AcGiMTextAttachmentPoint as It, AcGePoint3d as ze, AcGeLoop2d as ut, AcGeCircArc2d as mt, AcGeLine2d as gt, AcDbArc as pt, AcGeLine3d as K, AcDbDatabaseConverter as Bt, createWorkerApi as Mt, AcDbLinetypeTableRecord as At, AcDbDimStyleTableRecord as Ct, AcDbLayerTableRecord as Lt, AcDbViewportTableRecord as Et, AcDbBlockTableRecord as Tt, AcDbBatchProcessing as Dt, AcDbRasterImageDef as zt, AcDbCircle as Pt, AcDbEllipse as Rt, AcDbSpline as Ge, AcDbPoint as Ot, AcDbTrace as Vt, AcDbPolyline as ke, AcGeEllipseArc2d as jt, AcGeSpline3d as Fe, AcDbTable as Gt, AcDbText as kt, AcDbLeader as Ft, AcDbAlignedDimension as Nt, AcDb3PointAngularDimension as Ut, AcDbOrdinateDimension as Wt, AcDbRadialDimension as Xt, AcDbDiametricDimension as $t, AcDbBlockReference as Yt, AcDbDxfConverter as Ht, AcDbDatabaseConverterManager as Ne } from "@mlightcad/data-model";
1
+ import { AcDbLayout as qe, AcCmEventManager as M, AcGePoint2d as S, AcGeBox2d as L, AcCmColor as Qe, AcGeBox3d as Ze, AcDbDatabase as ht, AcDbFileType as _e, AcGeMathUtil as lt, AcGeVector3d as fe, AcGeGeometryUtil as dt, AcGeVector2d as Ce, acdbHostApplicationServices as Je, AcDbViewport as Ke, AcDbRasterImage as et, AcDbRay as tt, AcDbXline as it, AcDbDatabaseConverter as ut, createWorkerApi as mt, AcDbLinetypeTableRecord as gt, AcDbTextStyleTableRecord as pt, AcDbDimStyleTableRecord as yt, AcDbLayerTableRecord as ft, AcDbViewportTableRecord as xt, AcDbBlockTableRecord as _t, AcDbBatchProcessing as bt, AcDbRasterImageDef as wt, AcDbArc as vt, AcDbCircle as St, AcDbEllipse as It, AcDbLine as Bt, AcGePoint3d as ze, AcDbSpline as Pe, AcDbPoint as Mt, AcDbTrace as At, AcDbPolyline as Oe, AcDbHatch as Ct, AcGePolyline2d as Lt, AcGeLoop2d as Et, AcGeLine2d as Tt, AcGeCircArc2d as Dt, AcGeEllipseArc2d as zt, AcGeSpline3d as Re, AcDbTable as Pt, AcDbText as Ot, AcDbMText as Rt, AcDbLeader as Vt, AcDbAlignedDimension as jt, AcDb3PointAngularDimension as Gt, AcDbOrdinateDimension as kt, AcDbRadialDimension as Nt, AcDbDiametricDimension as Ft, AcDbBlockReference as Ut, AcDbDxfConverter as Wt, AcDbDatabaseConverterManager as Ve } from "@mlightcad/data-model";
2
2
  import * as d from "three";
3
- import { UnifiedRenderer as qt, FontManager as ee } from "@mlightcad/mtext-renderer";
4
- import { mergeGeometries as Qt } from "three/examples/jsm/utils/BufferGeometryUtils.js";
5
- import { OrbitControls as Zt } from "three/examples/jsm/controls/OrbitControls";
6
- import { find as Jt, findIndex as Kt, defaults as ei } from "lodash-es";
7
- import ti from "three/examples/jsm/libs/stats.module";
8
- class ii {
3
+ import { UnifiedRenderer as Xt, FontManager as J } from "@mlightcad/mtext-renderer";
4
+ import { mergeGeometries as $t } from "three/examples/jsm/utils/BufferGeometryUtils.js";
5
+ import { OrbitControls as Yt } from "three/examples/jsm/controls/OrbitControls";
6
+ import { find as Ht, findIndex as qt, defaults as Qt } from "lodash-es";
7
+ import Zt from "three/examples/jsm/libs/stats.module";
8
+ class Jt {
9
9
  /**
10
10
  * Creates a new application context that binds a document with its view.
11
11
  *
@@ -28,7 +28,7 @@ class ii {
28
28
  }), t.database.events.headerSysVarChanged.addEventListener((i) => {
29
29
  i.name == "pdmode" && this._view.rerenderPoints(i.database.pdmode);
30
30
  }), t.database.events.dictObjetSet.addEventListener((i) => {
31
- i.object instanceof tt && this._view.addLayout(i.object);
31
+ i.object instanceof qe && this._view.addLayout(i.object);
32
32
  }), e.selectionSet.events.selectionAdded.addEventListener((i) => {
33
33
  e.highlight(i.ids);
34
34
  }), e.selectionSet.events.selectionRemoved.addEventListener((i) => {
@@ -155,7 +155,7 @@ class j {
155
155
  execute(e) {
156
156
  }
157
157
  }
158
- class ni {
158
+ class Kt {
159
159
  constructor(e) {
160
160
  this._index = 0, this._commands = [], e.forEach((t) => {
161
161
  const i = t.groupName;
@@ -272,7 +272,7 @@ const z = class z {
272
272
  * stack.
273
273
  */
274
274
  iterator() {
275
- return new ni(this._commandsByGroup);
275
+ return new Kt(this._commandsByGroup);
276
276
  }
277
277
  /**
278
278
  * Search through all of the global and untranslated names in all of the command groups in the command
@@ -336,7 +336,7 @@ const z = class z {
336
336
  };
337
337
  z.SYSTEMT_COMMAND_GROUP_NAME = "ACAD", z.DEFAUT_COMMAND_GROUP_NAME = "USER";
338
338
  let A = z;
339
- function si(c) {
339
+ function ei(c) {
340
340
  return { all: c = c || /* @__PURE__ */ new Map(), on: function(e, t) {
341
341
  var i = c.get(e);
342
342
  i ? i.push(t) : c.set(e, [t]);
@@ -352,15 +352,15 @@ function si(c) {
352
352
  });
353
353
  } };
354
354
  }
355
- const V = si();
356
- function zn(c) {
355
+ const V = ei();
356
+ function Ln(c) {
357
357
  V.emit("message", {
358
358
  message: c,
359
359
  type: "warning"
360
360
  });
361
361
  }
362
- var de = /* @__PURE__ */ ((c) => (c[c.NoSpecialCursor = -1] = "NoSpecialCursor", c[c.Crosshair = 0] = "Crosshair", c[c.RectCursor = 1] = "RectCursor", c[c.RubberBand = 2] = "RubberBand", c[c.NotRotated = 3] = "NotRotated", c[c.TargetBox = 4] = "TargetBox", c[c.RotatedCrosshair = 5] = "RotatedCrosshair", c[c.CrosshairNoRotate = 6] = "CrosshairNoRotate", c[c.Invisible = 7] = "Invisible", c[c.EntitySelect = 8] = "EntitySelect", c[c.Parallelogram = 9] = "Parallelogram", c[c.EntitySelectNoPersp = 10] = "EntitySelectNoPersp", c[c.PkfirstOrGrips = 11] = "PkfirstOrGrips", c[c.CrosshairDashed = 12] = "CrosshairDashed", c[c.Grab = 13] = "Grab", c))(de || {});
363
- class ri {
362
+ var ce = /* @__PURE__ */ ((c) => (c[c.NoSpecialCursor = -1] = "NoSpecialCursor", c[c.Crosshair = 0] = "Crosshair", c[c.RectCursor = 1] = "RectCursor", c[c.RubberBand = 2] = "RubberBand", c[c.NotRotated = 3] = "NotRotated", c[c.TargetBox = 4] = "TargetBox", c[c.RotatedCrosshair = 5] = "RotatedCrosshair", c[c.CrosshairNoRotate = 6] = "CrosshairNoRotate", c[c.Invisible = 7] = "Invisible", c[c.EntitySelect = 8] = "EntitySelect", c[c.Parallelogram = 9] = "Parallelogram", c[c.EntitySelectNoPersp = 10] = "EntitySelectNoPersp", c[c.PkfirstOrGrips = 11] = "PkfirstOrGrips", c[c.CrosshairDashed = 12] = "CrosshairDashed", c[c.Grab = 13] = "Grab", c))(ce || {});
363
+ class ti {
364
364
  /**
365
365
  * Creates a new cursor manager instance.
366
366
  *
@@ -443,7 +443,7 @@ class ri {
443
443
  );
444
444
  }
445
445
  }
446
- class Oe {
446
+ class Ee {
447
447
  /**
448
448
  * Creates a new base input instance.
449
449
  *
@@ -509,7 +509,7 @@ class Oe {
509
509
  });
510
510
  }
511
511
  }
512
- class oi extends Oe {
512
+ class ii extends Ee {
513
513
  /**
514
514
  * Creates a new jig loop instance.
515
515
  *
@@ -540,7 +540,7 @@ class oi extends Oe {
540
540
  super.deactivate(), this.view.canvas.removeEventListener("mousemove", this.onMouseMove);
541
541
  }
542
542
  }
543
- class ai {
543
+ class ni {
544
544
  /**
545
545
  * Creates a new jig instance for the specified view.
546
546
  *
@@ -551,7 +551,7 @@ class ai {
551
551
  constructor(e) {
552
552
  this.onUpdate = () => {
553
553
  this.update();
554
- }, this._view = e, this._jigLoop = new oi(e), this._jigLoop.events.update.addEventListener(this.onUpdate);
554
+ }, this._view = e, this._jigLoop = new ii(e), this._jigLoop.events.update.addEventListener(this.onUpdate);
555
555
  }
556
556
  /**
557
557
  * Gets the view associated with this jig.
@@ -678,8 +678,8 @@ class ai {
678
678
  update() {
679
679
  }
680
680
  }
681
- const ci = 16777215, hi = "1px";
682
- class li extends Oe {
681
+ const si = 16777215, ri = "1px";
682
+ class oi extends Ee {
683
683
  /**
684
684
  * Creates a new box selector instance.
685
685
  *
@@ -719,7 +719,7 @@ class li extends Oe {
719
719
  this.resolve(this.toWcs(r));
720
720
  }
721
721
  this.mouseDown = !1, this.mouseMove = !1, this.mouseDownPositionX = -1, this.mouseDownPositionY = -1;
722
- }, this.container = e.canvas, this.color = ci;
722
+ }, this.container = e.canvas, this.color = si;
723
723
  }
724
724
  /**
725
725
  * Activates the box selector.
@@ -756,8 +756,8 @@ class li extends Oe {
756
756
  */
757
757
  drawRect(e, t) {
758
758
  if (!this.boxDom) {
759
- const s = new Re();
760
- s.color = this.color, this.boxDom = document.createElement("div"), this.boxDom.style.cssText = `position: absolute;border: ${hi} solid ${s.cssColor};`, document.body.appendChild(this.boxDom);
759
+ const s = new Qe();
760
+ s.color = this.color, this.boxDom = document.createElement("div"), this.boxDom.style.cssText = `position: absolute;border: ${ri} solid ${s.cssColor};`, document.body.appendChild(this.boxDom);
761
761
  }
762
762
  this.setRectDomVisible(!0), e.x <= 0 && (e.x = 0), e.y <= 0 && (e.y = 0), t.x >= this.container.clientWidth - 2 && (t.x = this.container.clientWidth - 2), t.y >= this.container.clientHeight - 2 && (t.y = this.container.clientHeight - 2), this.boxDom.style.left = `${e.x}px`, this.boxDom.style.top = `${e.y}px`;
763
763
  const i = Math.abs(t.x - e.x), n = Math.abs(t.y - e.y);
@@ -784,7 +784,7 @@ class li extends Oe {
784
784
  return t.expandByPoint(this.view.cwcs2Wcs(i)), t.expandByPoint(this.view.cwcs2Wcs(n)), t;
785
785
  }
786
786
  }
787
- class di extends Oe {
787
+ class ai extends Ee {
788
788
  /**
789
789
  * Creates a new point input instance.
790
790
  *
@@ -812,14 +812,14 @@ class di extends Oe {
812
812
  super.deactivate(), this.view.canvas.removeEventListener("click", this.onClick);
813
813
  }
814
814
  }
815
- class ui {
815
+ class ci {
816
816
  /**
817
817
  * Creates a new editor instance for the specified view.
818
818
  *
819
819
  * @param view - The view that this editor will handle input for
820
820
  */
821
821
  constructor(e) {
822
- this._view = e, this._cursorManager = new ri();
822
+ this._view = e, this._cursorManager = new ti();
823
823
  }
824
824
  /**
825
825
  * Gets the currently active cursor type.
@@ -870,7 +870,7 @@ class ui {
870
870
  * ```
871
871
  */
872
872
  async getPoint() {
873
- return await new di(this._view).start();
873
+ return await new ai(this._view).start();
874
874
  }
875
875
  /**
876
876
  * Prompts the user to select entities using box selection.
@@ -894,10 +894,10 @@ class ui {
894
894
  * ```
895
895
  */
896
896
  async getSelection() {
897
- return await new li(this._view).start();
897
+ return await new oi(this._view).start();
898
898
  }
899
899
  }
900
- class mi {
900
+ class hi {
901
901
  /**
902
902
  * Creates a new selection set.
903
903
  *
@@ -1009,8 +1009,8 @@ class mi {
1009
1009
  }
1010
1010
  }
1011
1011
  }
1012
- var O = /* @__PURE__ */ ((c) => (c[c.SELECTION = 0] = "SELECTION", c[c.PAN = 1] = "PAN", c))(O || {});
1013
- class gi {
1012
+ var R = /* @__PURE__ */ ((c) => (c[c.SELECTION = 0] = "SELECTION", c[c.PAN = 1] = "PAN", c))(R || {});
1013
+ class li {
1014
1014
  /**
1015
1015
  * Creates a new base view instance.
1016
1016
  *
@@ -1031,8 +1031,8 @@ class gi {
1031
1031
  unhover: new M()
1032
1032
  }, this._canvas = e;
1033
1033
  const t = e.getBoundingClientRect();
1034
- this._bbox = new it(), this._width = t.width, this._height = t.height, this._curPos = new S(), this._curScreenPos = new S(), this._selectionSet = new mi(), this._editor = new ui(this), this._canvas.addEventListener("mousemove", (i) => this.onMouseMove(i)), this._canvas.addEventListener("mousedown", (i) => {
1035
- i.button === 1 && this._editor.setCursor(de.Grab);
1034
+ this._bbox = new Ze(), this._width = t.width, this._height = t.height, this._curPos = new S(), this._curScreenPos = new S(), this._selectionSet = new hi(), this._editor = new ci(this), this._canvas.addEventListener("mousemove", (i) => this.onMouseMove(i)), this._canvas.addEventListener("mousedown", (i) => {
1035
+ i.button === 1 && this._editor.setCursor(ce.Grab);
1036
1036
  }), this._canvas.addEventListener("mouseup", (i) => {
1037
1037
  i.button === 1 && this._editor.restoreCursor();
1038
1038
  }), window.addEventListener("resize", this.onWindowResize.bind(this)), this._selectionBoxSize = 4, this._hoverTimer = null, this._pauseTimer = null, this._hoveredObjectId = null;
@@ -1184,14 +1184,14 @@ class gi {
1184
1184
  }, 500);
1185
1185
  }
1186
1186
  }
1187
- class pi {
1187
+ class di {
1188
1188
  /**
1189
1189
  * Creates a new document instance with an empty database.
1190
1190
  *
1191
1191
  * The document is initialized with an "Untitled" title and read-only mode enabled.
1192
1192
  */
1193
1193
  constructor() {
1194
- this._fileName = "", this._docTitle = "", this._isReadOnly = !0, this._database = new vt(), this.docTitle = "Untitled";
1194
+ this._fileName = "", this._docTitle = "", this._isReadOnly = !0, this._database = new ht(), this.docTitle = "Untitled";
1195
1195
  }
1196
1196
  /**
1197
1197
  * Opens a CAD document from a URI.
@@ -1242,7 +1242,7 @@ class pi {
1242
1242
  await this._database.read(
1243
1243
  t,
1244
1244
  i,
1245
- r == "dwg" ? ve.DWG : ve.DXF
1245
+ r == "dwg" ? _e.DWG : _e.DXF
1246
1246
  ), this.docTitle = this._fileName;
1247
1247
  } catch (r) {
1248
1248
  n = !1, V.emit("failed-to-open-file", { fileName: e }), console.error(r);
@@ -1307,7 +1307,7 @@ class pi {
1307
1307
  }
1308
1308
  }
1309
1309
  }
1310
- class Me {
1310
+ class Se {
1311
1311
  constructor() {
1312
1312
  this._objectId = "", this._ownerId = "", this._layerName = "", this._visible = !0, this._userData = {}, this._box = new L(), this._svg = "";
1313
1313
  }
@@ -1401,7 +1401,7 @@ class Me {
1401
1401
  return this;
1402
1402
  }
1403
1403
  }
1404
- class yi extends Me {
1404
+ class ui extends Se {
1405
1405
  constructor(e) {
1406
1406
  if (super(), e.closed)
1407
1407
  this.svg = `
@@ -1415,14 +1415,14 @@ class yi extends Me {
1415
1415
  this._box.min.copy(t.min), this._box.max.copy(t.max);
1416
1416
  }
1417
1417
  }
1418
- class fi extends Me {
1418
+ class mi extends Se {
1419
1419
  constructor(e) {
1420
1420
  if (super(), e.closed)
1421
1421
  this.svg = `
1422
1422
  <epllise cx="${e.center.x}" cy="${e.center.y}" rx="${e.majorAxisRadius}" ry="${e.minorAxisRadius}"/>`;
1423
1423
  else {
1424
- const i = e.startPoint, n = e.endPoint, s = re.radToDeg(
1425
- e.majorAxis.angleTo(be.X_AXIS)
1424
+ const i = e.startPoint, n = e.endPoint, s = lt.radToDeg(
1425
+ e.majorAxis.angleTo(fe.X_AXIS)
1426
1426
  ), r = e.clockwise ? 0 : 1;
1427
1427
  this.svg = `
1428
1428
  <path d="M${i.x},${i.y} A${e.majorAxisRadius},${e.minorAxisRadius} ${s} ${e.isLargeArc},${r} ${n.x},${n.y}"/>`;
@@ -1431,7 +1431,7 @@ class fi extends Me {
1431
1431
  this._box.min.copy(t.min), this._box.max.copy(t.max);
1432
1432
  }
1433
1433
  }
1434
- class xi extends Me {
1434
+ class gi extends Se {
1435
1435
  constructor(e) {
1436
1436
  super();
1437
1437
  const t = e.reduce(
@@ -1441,7 +1441,7 @@ class xi extends Me {
1441
1441
  t && (this.svg = `<path d="${t}" />`);
1442
1442
  }
1443
1443
  }
1444
- class _i {
1444
+ class pi {
1445
1445
  constructor() {
1446
1446
  this._container = new Array(), this._bbox = new L();
1447
1447
  }
@@ -1466,21 +1466,21 @@ class _i {
1466
1466
  * @inheritdoc
1467
1467
  */
1468
1468
  circularArc(e) {
1469
- const t = new yi(e);
1469
+ const t = new ui(e);
1470
1470
  return this._container.push(t.svg), this._bbox.union(t.box), t;
1471
1471
  }
1472
1472
  /**
1473
1473
  * @inheritdoc
1474
1474
  */
1475
1475
  ellipticalArc(e) {
1476
- const t = new fi(e);
1476
+ const t = new mi(e);
1477
1477
  return this._container.push(t.svg), this._bbox.union(t.box), t;
1478
1478
  }
1479
1479
  /**
1480
1480
  * @inheritdoc
1481
1481
  */
1482
1482
  lines(e, t) {
1483
- const i = new xi(e);
1483
+ const i = new gi(e);
1484
1484
  return this._container.push(i.svg), this._bbox.union(i.box), i;
1485
1485
  }
1486
1486
  /**
@@ -1534,8 +1534,8 @@ class _i {
1534
1534
  </svg>`;
1535
1535
  }
1536
1536
  }
1537
- const k = /* @__PURE__ */ new Me();
1538
- class bi {
1537
+ const k = /* @__PURE__ */ new Se();
1538
+ class yi {
1539
1539
  /**
1540
1540
  * Converts the current CAD drawing to SVG format and initiates download.
1541
1541
  *
@@ -1552,7 +1552,7 @@ class bi {
1552
1552
  * ```
1553
1553
  */
1554
1554
  convert() {
1555
- const e = C.instance.curDocument.database.tables.blockTable.modelSpace.newIterator(), t = new _i();
1555
+ const e = C.instance.curDocument.database.tables.blockTable.modelSpace.newIterator(), t = new pi();
1556
1556
  for (const i of e)
1557
1557
  i.draw(t);
1558
1558
  this.createFileAndDownloadIt(t.export());
@@ -1576,7 +1576,7 @@ class bi {
1576
1576
  n.href = i, n.download = "example.svg", document.body.appendChild(n), n.click();
1577
1577
  }
1578
1578
  }
1579
- class wi extends j {
1579
+ class fi extends j {
1580
1580
  /**
1581
1581
  * Executes the SVG conversion command.
1582
1582
  *
@@ -1586,10 +1586,10 @@ class wi extends j {
1586
1586
  * @param _context - The application context (unused in this command)
1587
1587
  */
1588
1588
  execute(e) {
1589
- new bi().convert();
1589
+ new yi().convert();
1590
1590
  }
1591
1591
  }
1592
- class vi extends j {
1592
+ class xi extends j {
1593
1593
  /**
1594
1594
  * Executes the open file command.
1595
1595
  *
@@ -1603,7 +1603,7 @@ class vi extends j {
1603
1603
  V.emit("open-file", {});
1604
1604
  }
1605
1605
  }
1606
- class Si extends j {
1606
+ class _i extends j {
1607
1607
  /**
1608
1608
  * Executes the quick new command.
1609
1609
  *
@@ -1616,7 +1616,7 @@ class Si extends j {
1616
1616
  C.instance.openUrl("https://cdn.jsdelivr.net/gh/mlight-lee/cad-data/templates/" + "acadiso.dxf");
1617
1617
  }
1618
1618
  }
1619
- class Ii extends j {
1619
+ class bi extends j {
1620
1620
  /**
1621
1621
  * Executes the select command.
1622
1622
  *
@@ -1626,10 +1626,10 @@ class Ii extends j {
1626
1626
  * @param context - The application context containing the view
1627
1627
  */
1628
1628
  execute(e) {
1629
- e.view.mode = O.SELECTION, e.view.setCursor(de.Crosshair);
1629
+ e.view.mode = R.SELECTION, e.view.setCursor(ce.Crosshair);
1630
1630
  }
1631
1631
  }
1632
- class Bi extends j {
1632
+ class wi extends j {
1633
1633
  /**
1634
1634
  * Executes the zoom to fit command.
1635
1635
  *
@@ -1643,7 +1643,7 @@ class Bi extends j {
1643
1643
  e.view.zoomTo(new L(t.extmin, t.extmax), 1.1);
1644
1644
  }
1645
1645
  }
1646
- class Mi extends ai {
1646
+ class vi extends ni {
1647
1647
  /**
1648
1648
  * Creates a new zoom-to-box jig.
1649
1649
  *
@@ -1664,7 +1664,7 @@ class Mi extends ai {
1664
1664
  await C.instance.editor.getSelection().then((e) => this.view.zoomTo(e, 1));
1665
1665
  }
1666
1666
  }
1667
- class Ai extends j {
1667
+ class Si extends j {
1668
1668
  /**
1669
1669
  * Executes the zoom-to-box command.
1670
1670
  *
@@ -1675,10 +1675,10 @@ class Ai extends j {
1675
1675
  * @returns Promise that resolves when the zoom operation completes
1676
1676
  */
1677
1677
  async execute(e) {
1678
- await new Mi(e.view).drag();
1678
+ await new vi(e.view).drag();
1679
1679
  }
1680
1680
  }
1681
- class Ci extends j {
1681
+ class Ii extends j {
1682
1682
  /**
1683
1683
  * Executes the pan command.
1684
1684
  *
@@ -1688,14 +1688,14 @@ class Ci extends j {
1688
1688
  * @param context - The application context containing the view
1689
1689
  */
1690
1690
  execute(e) {
1691
- e.view.mode = O.PAN, e.view.setCursor(de.Grab);
1691
+ e.view.mode = R.PAN, e.view.setCursor(ce.Grab);
1692
1692
  }
1693
1693
  }
1694
1694
  var B;
1695
1695
  (function(c) {
1696
1696
  c[c.BeforeStart = 0] = "BeforeStart", c[c.EqualStart = 1] = "EqualStart", c[c.BetweenStartAndEnd = 2] = "BetweenStartAndEnd", c[c.EqualEnd = 3] = "EqualEnd", c[c.AfterEnd = 4] = "AfterEnd";
1697
1697
  })(B || (B = {}));
1698
- class Li {
1698
+ class Bi {
1699
1699
  pointsSame(e, t) {
1700
1700
  return this.pointsSameX(e, t) && this.pointsSameY(e, t);
1701
1701
  }
@@ -1703,7 +1703,7 @@ class Li {
1703
1703
  return this.pointsSameX(e, t) ? this.pointsSameY(e, t) ? 0 : e[1] < t[1] ? -1 : 1 : e[0] < t[0] ? -1 : 1;
1704
1704
  }
1705
1705
  }
1706
- class yt extends Li {
1706
+ class nt extends Bi {
1707
1707
  constructor(e = 1e-10) {
1708
1708
  super(), this.epsilon = e;
1709
1709
  }
@@ -1740,7 +1740,7 @@ class yt extends Li {
1740
1740
  };
1741
1741
  }
1742
1742
  }
1743
- class Ue {
1743
+ class je {
1744
1744
  constructor() {
1745
1745
  this.nodes = [];
1746
1746
  }
@@ -1778,7 +1778,7 @@ class Ue {
1778
1778
  };
1779
1779
  }
1780
1780
  }
1781
- class Z {
1781
+ class Q {
1782
1782
  constructor(e, t, i, n) {
1783
1783
  var s;
1784
1784
  this.otherFill = null, this.id = (s = n == null ? void 0 : n.segmentId()) !== null && s !== void 0 ? s : -1, this.start = e, this.end = t, this.myFill = {
@@ -1787,14 +1787,14 @@ class Z {
1787
1787
  };
1788
1788
  }
1789
1789
  }
1790
- class We {
1790
+ class Ge {
1791
1791
  constructor(e, t, i, n) {
1792
1792
  this.status = null, this.isStart = e, this.p = t, this.seg = i, this.primary = n;
1793
1793
  }
1794
1794
  }
1795
- class Xe {
1795
+ class ke {
1796
1796
  constructor(e, t, i = null) {
1797
- this.events = new Ue(), this.status = new Ue(), this.selfIntersection = e, this.geo = t, this.log = i;
1797
+ this.events = new je(), this.status = new je(), this.selfIntersection = e, this.geo = t, this.log = i;
1798
1798
  }
1799
1799
  compareEvents(e, t, i, n, s, r) {
1800
1800
  const o = this.geo.pointsCompare(t, s);
@@ -1810,15 +1810,15 @@ class Xe {
1810
1810
  }
1811
1811
  divideEvent(e, t) {
1812
1812
  var i;
1813
- const n = new Z(t, e.seg.end, e.seg, this.log);
1813
+ const n = new Q(t, e.seg.end, e.seg, this.log);
1814
1814
  return (i = this.log) === null || i === void 0 || i.segmentChop(e.seg, t), this.events.remove(e.other), e.seg.end = t, e.other.p = t, this.addEvent(e.other), this.addSegment(n, e.primary);
1815
1815
  }
1816
1816
  newSegment(e, t) {
1817
1817
  const i = this.geo.pointsCompare(e, t);
1818
- return i === 0 ? null : i < 0 ? new Z(e, t, null, this.log) : new Z(t, e, null, this.log);
1818
+ return i === 0 ? null : i < 0 ? new Q(e, t, null, this.log) : new Q(t, e, null, this.log);
1819
1819
  }
1820
1820
  addSegment(e, t) {
1821
- const i = new We(!0, e.start, e, t), n = new We(!1, e.end, e, t);
1821
+ const i = new Ge(!0, e.start, e, t), n = new Ge(!1, e.end, e, t);
1822
1822
  return i.other = n, n.other = i, this.addEvent(i), this.addEvent(n), i;
1823
1823
  }
1824
1824
  addRegion(e) {
@@ -1925,35 +1925,35 @@ class Xe {
1925
1925
  return (l = this.log) === null || l === void 0 || l.done(), m;
1926
1926
  }
1927
1927
  }
1928
- function te(c, e, t) {
1928
+ function K(c, e, t) {
1929
1929
  const i = [];
1930
1930
  for (const n of c) {
1931
1931
  const s = (n.myFill.above ? 8 : 0) + (n.myFill.below ? 4 : 0) + (n.otherFill && n.otherFill.above ? 2 : 0) + (n.otherFill && n.otherFill.below ? 1 : 0);
1932
1932
  if (e[s] !== 0) {
1933
- const r = new Z(n.start, n.end, null, t);
1933
+ const r = new Q(n.start, n.end, null, t);
1934
1934
  r.myFill.above = e[s] === 1, r.myFill.below = e[s] === 2, i.push(r);
1935
1935
  }
1936
1936
  }
1937
1937
  return t == null || t.selected(i), i;
1938
1938
  }
1939
- class ie {
1939
+ class ee {
1940
1940
  static union(e, t) {
1941
- return te(e, [0, 2, 1, 0, 2, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0], t);
1941
+ return K(e, [0, 2, 1, 0, 2, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0], t);
1942
1942
  }
1943
1943
  static intersect(e, t) {
1944
- return te(e, [0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 1, 1, 0, 2, 1, 0], t);
1944
+ return K(e, [0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 1, 1, 0, 2, 1, 0], t);
1945
1945
  }
1946
1946
  static difference(e, t) {
1947
- return te(e, [0, 0, 0, 0, 2, 0, 2, 0, 1, 1, 0, 0, 0, 1, 2, 0], t);
1947
+ return K(e, [0, 0, 0, 0, 2, 0, 2, 0, 1, 1, 0, 0, 0, 1, 2, 0], t);
1948
1948
  }
1949
1949
  static differenceRev(e, t) {
1950
- return te(e, [0, 2, 1, 0, 0, 0, 1, 1, 0, 2, 0, 2, 0, 0, 0, 0], t);
1950
+ return K(e, [0, 2, 1, 0, 0, 0, 1, 1, 0, 2, 0, 2, 0, 0, 0, 0], t);
1951
1951
  }
1952
1952
  static xor(e, t) {
1953
- return te(e, [0, 2, 1, 0, 2, 0, 0, 1, 1, 0, 0, 2, 0, 1, 2, 0], t);
1953
+ return K(e, [0, 2, 1, 0, 2, 0, 0, 1, 1, 0, 0, 2, 0, 1, 2, 0], t);
1954
1954
  }
1955
1955
  }
1956
- function Ei(c, e, t) {
1956
+ function Mi(c, e, t) {
1957
1957
  const i = [], n = [];
1958
1958
  for (const s of c) {
1959
1959
  let m = function(_, x, w) {
@@ -2019,7 +2019,7 @@ function Ei(c, e, t) {
2019
2019
  }
2020
2020
  return n;
2021
2021
  }
2022
- class Ti {
2022
+ class Ai {
2023
2023
  constructor() {
2024
2024
  this.list = [], this.nextSegmentId = 0, this.curVert = NaN;
2025
2025
  }
@@ -2099,16 +2099,16 @@ class Ti {
2099
2099
  this.push("done", null);
2100
2100
  }
2101
2101
  }
2102
- class ft {
2102
+ class st {
2103
2103
  constructor(e) {
2104
2104
  this.log = null, this.geo = e;
2105
2105
  }
2106
2106
  buildLog(e) {
2107
2107
  var t;
2108
- return this.log = e ? new Ti() : null, (t = this.log) === null || t === void 0 ? void 0 : t.list;
2108
+ return this.log = e ? new Ai() : null, (t = this.log) === null || t === void 0 ? void 0 : t.list;
2109
2109
  }
2110
2110
  segments(e) {
2111
- const t = new Xe(!0, this.geo, this.log);
2111
+ const t = new ke(!0, this.geo, this.log);
2112
2112
  for (const i of e.regions)
2113
2113
  t.addRegion(i);
2114
2114
  return {
@@ -2117,11 +2117,11 @@ class ft {
2117
2117
  };
2118
2118
  }
2119
2119
  combine(e, t) {
2120
- const i = new Xe(!1, this.geo, this.log);
2120
+ const i = new ke(!1, this.geo, this.log);
2121
2121
  for (const n of e.segments)
2122
- i.addSegment(new Z(n.start, n.end, n, this.log), !0);
2122
+ i.addSegment(new Q(n.start, n.end, n, this.log), !0);
2123
2123
  for (const n of t.segments)
2124
- i.addSegment(new Z(n.start, n.end, n, this.log), !1);
2124
+ i.addSegment(new Q(n.start, n.end, n, this.log), !1);
2125
2125
  return {
2126
2126
  combined: i.calculate(e.inverted, t.inverted),
2127
2127
  inverted1: e.inverted,
@@ -2130,37 +2130,37 @@ class ft {
2130
2130
  }
2131
2131
  selectUnion(e) {
2132
2132
  return {
2133
- segments: ie.union(e.combined, this.log),
2133
+ segments: ee.union(e.combined, this.log),
2134
2134
  inverted: e.inverted1 || e.inverted2
2135
2135
  };
2136
2136
  }
2137
2137
  selectIntersect(e) {
2138
2138
  return {
2139
- segments: ie.intersect(e.combined, this.log),
2139
+ segments: ee.intersect(e.combined, this.log),
2140
2140
  inverted: e.inverted1 && e.inverted2
2141
2141
  };
2142
2142
  }
2143
2143
  selectDifference(e) {
2144
2144
  return {
2145
- segments: ie.difference(e.combined, this.log),
2145
+ segments: ee.difference(e.combined, this.log),
2146
2146
  inverted: e.inverted1 && !e.inverted2
2147
2147
  };
2148
2148
  }
2149
2149
  selectDifferenceRev(e) {
2150
2150
  return {
2151
- segments: ie.differenceRev(e.combined, this.log),
2151
+ segments: ee.differenceRev(e.combined, this.log),
2152
2152
  inverted: !e.inverted1 && e.inverted2
2153
2153
  };
2154
2154
  }
2155
2155
  selectXor(e) {
2156
2156
  return {
2157
- segments: ie.xor(e.combined, this.log),
2157
+ segments: ee.xor(e.combined, this.log),
2158
2158
  inverted: e.inverted1 !== e.inverted2
2159
2159
  };
2160
2160
  }
2161
2161
  polygon(e) {
2162
2162
  return {
2163
- regions: Ei(e.segments, this.geo, this.log),
2163
+ regions: Mi(e.segments, this.geo, this.log),
2164
2164
  inverted: e.inverted
2165
2165
  };
2166
2166
  }
@@ -2186,8 +2186,8 @@ class ft {
2186
2186
  return this.polygon(r);
2187
2187
  }
2188
2188
  }
2189
- new ft(new yt());
2190
- class Se extends d.Object3D {
2189
+ new st(new nt());
2190
+ class be extends d.Object3D {
2191
2191
  /**
2192
2192
  * Flatten the hierarchy of the specified object so that all children are moved to be direct
2193
2193
  * children of this object. Preserve transformations.
@@ -2226,13 +2226,13 @@ class Se extends d.Object3D {
2226
2226
  * this entity. Preserve transformations.
2227
2227
  */
2228
2228
  flatten() {
2229
- Se.flattenObject(this);
2229
+ be.flattenObject(this);
2230
2230
  }
2231
2231
  /**
2232
2232
  * Remove this object from its parent and release geometry and material resource used by this object.
2233
2233
  */
2234
2234
  dispose() {
2235
- Se.disposeObject(this);
2235
+ be.disposeObject(this);
2236
2236
  }
2237
2237
  }
2238
2238
  const T = [
@@ -2365,7 +2365,7 @@ const T = [
2365
2365
  24,
2366
2366
  24,
2367
2367
  25
2368
- ], Di = /* @__PURE__ */ new Map([
2368
+ ], Ci = /* @__PURE__ */ new Map([
2369
2369
  [
2370
2370
  2,
2371
2371
  {
@@ -2810,12 +2810,12 @@ const T = [
2810
2810
  }
2811
2811
  ]
2812
2812
  ]);
2813
- class R {
2813
+ class O {
2814
2814
  constructor() {
2815
2815
  this._symbols = this.initialize();
2816
2816
  }
2817
2817
  static get instance() {
2818
- return R._instance || (R._instance = new R()), R._instance;
2818
+ return O._instance || (O._instance = new O()), O._instance;
2819
2819
  }
2820
2820
  /**
2821
2821
  * Return true if showing one point using THREE.Points
@@ -2826,20 +2826,20 @@ class R {
2826
2826
  create(e = null, t = { x: 0, y: 0, z: 0 }) {
2827
2827
  const i = {};
2828
2828
  if (e == null || e == 0)
2829
- ne.copy(t), i.point = new d.BufferGeometry().setFromPoints([ne]);
2829
+ te.copy(t), i.point = new d.BufferGeometry().setFromPoints([te]);
2830
2830
  else if (e != 1) {
2831
2831
  const n = this._symbols.get(e);
2832
2832
  if (n == null)
2833
2833
  throw new Error(
2834
2834
  `[AcTrPointSymbolCreator] Invalid point type value: '${e}'!`
2835
2835
  );
2836
- ne.copy(t), $e.identity().makeTranslation(ne), i.line = n.clone().applyMatrix4($e), (e == 32 || e == 64 || e == 96) && (i.point = new d.BufferGeometry().setFromPoints([ne]));
2836
+ te.copy(t), Ne.identity().makeTranslation(te), i.line = n.clone().applyMatrix4(Ne), (e == 32 || e == 64 || e == 96) && (i.point = new d.BufferGeometry().setFromPoints([te]));
2837
2837
  }
2838
2838
  return i;
2839
2839
  }
2840
2840
  initialize() {
2841
2841
  const e = /* @__PURE__ */ new Map();
2842
- return Di.forEach((t, i) => {
2842
+ return Ci.forEach((t, i) => {
2843
2843
  const n = new d.BufferGeometry();
2844
2844
  n.setAttribute(
2845
2845
  "position",
@@ -2848,8 +2848,8 @@ class R {
2848
2848
  }), e;
2849
2849
  }
2850
2850
  }
2851
- const $e = /* @__PURE__ */ new d.Matrix4(), ne = /* @__PURE__ */ new d.Vector3(), zi = new d.Color(583902);
2852
- class Ie {
2851
+ const Ne = /* @__PURE__ */ new d.Matrix4(), te = /* @__PURE__ */ new d.Vector3(), Li = new d.Color(583902);
2852
+ class we {
2853
2853
  /**
2854
2854
  * Clone given material(s)
2855
2855
  */
@@ -2864,7 +2864,7 @@ class Ie {
2864
2864
  }
2865
2865
  return e.clone();
2866
2866
  }
2867
- static setMaterialColor(e, t = zi) {
2867
+ static setMaterialColor(e, t = Li) {
2868
2868
  if (Array.isArray(e)) {
2869
2869
  e.forEach((i) => this.setMaterialColor(i, t));
2870
2870
  return;
@@ -2881,7 +2881,7 @@ class Ie {
2881
2881
  return "uniforms" in e && e.uniforms !== void 0;
2882
2882
  }
2883
2883
  }
2884
- class ue {
2884
+ class he {
2885
2885
  static getExtension(e) {
2886
2886
  return e.substring(e.lastIndexOf(".") + 1);
2887
2887
  }
@@ -2916,7 +2916,7 @@ class ue {
2916
2916
  return e.split("/").pop();
2917
2917
  }
2918
2918
  static getFileNameWithoutExtension(e) {
2919
- const t = ue.getFileName(e);
2919
+ const t = he.getFileName(e);
2920
2920
  if (t) {
2921
2921
  const i = t.lastIndexOf(".");
2922
2922
  return i === -1 ? t : t.substring(0, i);
@@ -2924,10 +2924,10 @@ class ue {
2924
2924
  return e;
2925
2925
  }
2926
2926
  }
2927
- function Ve(c, e) {
2927
+ function Te(c, e) {
2928
2928
  return c - e;
2929
2929
  }
2930
- function je(c, e, t = 0) {
2930
+ function De(c, e, t = 0) {
2931
2931
  const i = e.itemSize;
2932
2932
  if (c.isInterleavedBufferAttribute || c.array.constructor !== e.array.constructor) {
2933
2933
  const n = c.count;
@@ -2938,7 +2938,7 @@ function je(c, e, t = 0) {
2938
2938
  e.array.set(c.array, t * i);
2939
2939
  e.needsUpdate = !0;
2940
2940
  }
2941
- function J(c, e) {
2941
+ function Z(c, e) {
2942
2942
  if (c.constructor !== e.constructor) {
2943
2943
  const t = Math.min(c.length, e.length);
2944
2944
  for (let i = 0; i < t; i++)
@@ -2948,8 +2948,8 @@ function J(c, e) {
2948
2948
  e.set(new c.constructor(c.buffer, 0, t));
2949
2949
  }
2950
2950
  }
2951
- const Ye = /* @__PURE__ */ new d.Box3(), F = /* @__PURE__ */ new d.Vector3(), N = /* @__PURE__ */ new d.LineSegments(), me = [];
2952
- class Pi extends d.LineSegments {
2951
+ const Fe = /* @__PURE__ */ new d.Box3(), N = /* @__PURE__ */ new d.Vector3(), F = /* @__PURE__ */ new d.LineSegments(), le = [];
2952
+ class Ei extends d.LineSegments {
2953
2953
  constructor(e = 1e3, t = e * 2, i) {
2954
2954
  super(new d.BufferGeometry(), i), this.boundingBox = null, this.boundingSphere = null, this._geometryInfo = [], this._availableGeometryIds = [], this._nextIndexStart = 0, this._nextVertexStart = 0, this._geometryCount = 0, this._geometryInitialized = !1, this.frustumCulled = !1, this._maxVertexCount = e, this._maxIndexCount = t;
2955
2955
  }
@@ -2965,7 +2965,7 @@ class Pi extends d.LineSegments {
2965
2965
  get mappingStats() {
2966
2966
  const e = this._geometryInfo.length;
2967
2967
  let t = 0;
2968
- return e > 0 && (t = ue.estimateObjectSize(this._geometryInfo[0])), {
2968
+ return e > 0 && (t = he.estimateObjectSize(this._geometryInfo[0])), {
2969
2969
  count: e,
2970
2970
  size: e * t
2971
2971
  };
@@ -3038,7 +3038,7 @@ class Pi extends d.LineSegments {
3038
3038
  resetGeometry(e) {
3039
3039
  const t = this.getUserData();
3040
3040
  this.reset();
3041
- const i = R.instance;
3041
+ const i = O.instance;
3042
3042
  t.forEach((n) => {
3043
3043
  if (n.position) {
3044
3044
  const s = i.create(e, n.position);
@@ -3093,7 +3093,7 @@ class Pi extends d.LineSegments {
3093
3093
  "AcTrBatchedLine: Reserved space request exceeds the maximum buffer size."
3094
3094
  );
3095
3095
  let o;
3096
- return this._availableGeometryIds.length > 0 ? (this._availableGeometryIds.sort(Ve), o = this._availableGeometryIds.shift(), s[o] = n) : (o = this._geometryCount, this._geometryCount++, s.push(n)), this.setGeometryAt(o, e), this._nextIndexStart = n.indexStart + n.reservedIndexCount, this._nextVertexStart = n.vertexStart + n.reservedVertexCount, o;
3096
+ return this._availableGeometryIds.length > 0 ? (this._availableGeometryIds.sort(Te), o = this._availableGeometryIds.shift(), s[o] = n) : (o = this._geometryCount, this._geometryCount++, s.push(n)), this.setGeometryAt(o, e), this._nextIndexStart = n.indexStart + n.reservedIndexCount, this._nextVertexStart = n.vertexStart + n.reservedVertexCount, o;
3097
3097
  }
3098
3098
  setGeometryInfo(e, t) {
3099
3099
  if (e >= this._geometryCount)
@@ -3116,7 +3116,7 @@ class Pi extends d.LineSegments {
3116
3116
  const m = t.getAttribute(l), u = i.getAttribute(
3117
3117
  l
3118
3118
  );
3119
- je(m, u, a);
3119
+ De(m, u, a);
3120
3120
  const p = m.itemSize;
3121
3121
  for (let g = m.count, y = h; g < y; g++) {
3122
3122
  const f = a + g;
@@ -3191,7 +3191,7 @@ class Pi extends d.LineSegments {
3191
3191
  const s = new d.Box3(), r = i.index, o = i.attributes.position;
3192
3192
  for (let a = n.start, h = n.start + n.count; a < h; a++) {
3193
3193
  let l = a;
3194
- r && (l = r.getX(l)), s.expandByPoint(F.fromBufferAttribute(o, l));
3194
+ r && (l = r.getX(l)), s.expandByPoint(N.fromBufferAttribute(o, l));
3195
3195
  }
3196
3196
  n.boundingBox = s;
3197
3197
  }
@@ -3204,14 +3204,14 @@ class Pi extends d.LineSegments {
3204
3204
  const i = this.geometry, n = this._geometryInfo[e];
3205
3205
  if (n.boundingSphere === null) {
3206
3206
  const s = new d.Sphere();
3207
- this.getBoundingBoxAt(e, Ye), Ye.getCenter(s.center);
3207
+ this.getBoundingBoxAt(e, Fe), Fe.getCenter(s.center);
3208
3208
  const r = i.index, o = i.attributes.position;
3209
3209
  let a = 0;
3210
3210
  for (let h = n.start, l = n.start + n.count; h < l; h++) {
3211
3211
  let m = h;
3212
- r && (m = r.getX(m)), F.fromBufferAttribute(o, m), a = Math.max(
3212
+ r && (m = r.getX(m)), N.fromBufferAttribute(o, m), a = Math.max(
3213
3213
  a,
3214
- s.center.distanceToSquared(F)
3214
+ s.center.distanceToSquared(N)
3215
3215
  );
3216
3216
  }
3217
3217
  s.radius = Math.sqrt(a), n.boundingSphere = s;
@@ -3231,9 +3231,9 @@ class Pi extends d.LineSegments {
3231
3231
  const i = this.geometry;
3232
3232
  i.dispose(), this._maxVertexCount = e, this._maxIndexCount = t, this._geometryInitialized && (this._geometryInitialized = !1, this.geometry = new d.BufferGeometry(), this._initializeGeometry(i));
3233
3233
  const n = this.geometry;
3234
- i.index && J(i.index.array, n.index.array);
3234
+ i.index && Z(i.index.array, n.index.array);
3235
3235
  for (const s in i.attributes)
3236
- J(
3236
+ Z(
3237
3237
  i.attributes[s].array,
3238
3238
  n.attributes[s].array
3239
3239
  );
@@ -3260,18 +3260,18 @@ class Pi extends d.LineSegments {
3260
3260
  e.geometry.index = null, e.geometry.attributes = {}, e.geometry.setDrawRange(0, 1 / 0);
3261
3261
  }
3262
3262
  intersectWith(e, t, i) {
3263
- this._initializeRaycastObject(N), this._intersectWith(e, t, i), this._resetRaycastObjectInfo(N);
3263
+ this._initializeRaycastObject(F), this._intersectWith(e, t, i), this._resetRaycastObjectInfo(F);
3264
3264
  }
3265
3265
  _intersectWith(e, t, i) {
3266
3266
  const n = this._geometryInfo[e];
3267
3267
  if (!(!n.visible || !n.active))
3268
3268
  if (n.bboxIntersectionCheck) {
3269
3269
  const s = n.boundingBox;
3270
- if (t.ray.intersectBox(s, F)) {
3271
- const r = t.ray.origin.distanceTo(F);
3270
+ if (t.ray.intersectBox(s, N)) {
3271
+ const r = t.ray.origin.distanceTo(N);
3272
3272
  i.push({
3273
3273
  distance: r,
3274
- point: F.clone(),
3274
+ point: N.clone(),
3275
3275
  object: this,
3276
3276
  face: null,
3277
3277
  faceIndex: void 0,
@@ -3283,24 +3283,24 @@ class Pi extends d.LineSegments {
3283
3283
  }
3284
3284
  } else {
3285
3285
  this._setRaycastObjectInfo(
3286
- N,
3286
+ F,
3287
3287
  e,
3288
3288
  n.start,
3289
3289
  n.count
3290
- ), N.raycast(t, me);
3291
- for (let s = 0, r = me.length; s < r; s++) {
3292
- const o = me[s];
3290
+ ), F.raycast(t, le);
3291
+ for (let s = 0, r = le.length; s < r; s++) {
3292
+ const o = le[s];
3293
3293
  o.object = this, o.batchId = e, o.objectId = n.objectId, i.push(o);
3294
3294
  }
3295
- me.length = 0;
3295
+ le.length = 0;
3296
3296
  }
3297
3297
  }
3298
3298
  raycast(e, t) {
3299
3299
  const i = this._geometryInfo;
3300
- this._initializeRaycastObject(N);
3300
+ this._initializeRaycastObject(F);
3301
3301
  for (let n = 0, s = i.length; n < s; n++)
3302
3302
  this._intersectWith(n, e, t);
3303
- this._resetRaycastObjectInfo(N);
3303
+ this._resetRaycastObjectInfo(F);
3304
3304
  }
3305
3305
  copy(e) {
3306
3306
  return super.copy(e), this.geometry = e.geometry.clone(), this.boundingBox = e.boundingBox !== null ? e.boundingBox.clone() : null, this.boundingSphere = e.boundingSphere !== null ? e.boundingSphere.clone() : null, this._geometryInfo = e._geometryInfo.map((t) => ({
@@ -3313,8 +3313,8 @@ class Pi extends d.LineSegments {
3313
3313
  return this.geometry.dispose(), this;
3314
3314
  }
3315
3315
  }
3316
- const He = /* @__PURE__ */ new d.Box3(), U = /* @__PURE__ */ new d.Vector3(), W = /* @__PURE__ */ new d.Mesh(), ge = [];
3317
- class Ri extends d.Mesh {
3316
+ const Ue = /* @__PURE__ */ new d.Box3(), U = /* @__PURE__ */ new d.Vector3(), W = /* @__PURE__ */ new d.Mesh(), de = [];
3317
+ class Ti extends d.Mesh {
3318
3318
  constructor(e = 1e3, t = e * 2, i) {
3319
3319
  super(new d.BufferGeometry(), i), this.boundingBox = null, this.boundingSphere = null, this._geometryInfo = [], this._availableGeometryIds = [], this._nextIndexStart = 0, this._nextVertexStart = 0, this._geometryCount = 0, this._geometryInitialized = !1, this.frustumCulled = !1, this._maxVertexCount = e, this._maxIndexCount = t;
3320
3320
  }
@@ -3327,7 +3327,7 @@ class Ri extends d.Mesh {
3327
3327
  get mappingStats() {
3328
3328
  const e = this._geometryInfo.length;
3329
3329
  let t = 0;
3330
- return e > 0 && (t = ue.estimateObjectSize(this._geometryInfo[0])), {
3330
+ return e > 0 && (t = he.estimateObjectSize(this._geometryInfo[0])), {
3331
3331
  count: e,
3332
3332
  size: e * t
3333
3333
  };
@@ -3428,7 +3428,7 @@ class Ri extends d.Mesh {
3428
3428
  "AcTrBatchedMesh: Reserved space request exceeds the maximum buffer size."
3429
3429
  );
3430
3430
  let o;
3431
- return this._availableGeometryIds.length > 0 ? (this._availableGeometryIds.sort(Ve), o = this._availableGeometryIds.shift(), s[o] = n) : (o = this._geometryCount, this._geometryCount++, s.push(n)), this.setGeometryAt(o, e), this._nextIndexStart = n.indexStart + n.reservedIndexCount, this._nextVertexStart = n.vertexStart + n.reservedVertexCount, o;
3431
+ return this._availableGeometryIds.length > 0 ? (this._availableGeometryIds.sort(Te), o = this._availableGeometryIds.shift(), s[o] = n) : (o = this._geometryCount, this._geometryCount++, s.push(n)), this.setGeometryAt(o, e), this._nextIndexStart = n.indexStart + n.reservedIndexCount, this._nextVertexStart = n.vertexStart + n.reservedVertexCount, o;
3432
3432
  }
3433
3433
  setGeometryInfo(e, t) {
3434
3434
  if (e >= this._geometryCount)
@@ -3451,7 +3451,7 @@ class Ri extends d.Mesh {
3451
3451
  const m = t.getAttribute(l), u = i.getAttribute(
3452
3452
  l
3453
3453
  );
3454
- je(m, u, a);
3454
+ De(m, u, a);
3455
3455
  const p = m.itemSize;
3456
3456
  for (let g = m.count, y = h; g < y; g++) {
3457
3457
  const f = a + g;
@@ -3539,7 +3539,7 @@ class Ri extends d.Mesh {
3539
3539
  const i = this.geometry, n = this._geometryInfo[e];
3540
3540
  if (n.boundingSphere === null) {
3541
3541
  const s = new d.Sphere();
3542
- this.getBoundingBoxAt(e, He), He.getCenter(s.center);
3542
+ this.getBoundingBoxAt(e, Ue), Ue.getCenter(s.center);
3543
3543
  const r = i.index, o = i.attributes.position;
3544
3544
  let a = 0;
3545
3545
  for (let h = n.start, l = n.start + n.count; h < l; h++) {
@@ -3566,9 +3566,9 @@ class Ri extends d.Mesh {
3566
3566
  const i = this.geometry;
3567
3567
  i.dispose(), this._maxVertexCount = e, this._maxIndexCount = t, this._geometryInitialized && (this._geometryInitialized = !1, this.geometry = new d.BufferGeometry(), this._initializeGeometry(i));
3568
3568
  const n = this.geometry;
3569
- i.index && J(i.index.array, n.index.array);
3569
+ i.index && Z(i.index.array, n.index.array);
3570
3570
  for (const s in i.attributes)
3571
- J(
3571
+ Z(
3572
3572
  i.attributes[s].array,
3573
3573
  n.attributes[s].array
3574
3574
  );
@@ -3622,12 +3622,12 @@ class Ri extends d.Mesh {
3622
3622
  e,
3623
3623
  n.start,
3624
3624
  n.count
3625
- ), W.raycast(t, ge);
3626
- for (let s = 0, r = ge.length; s < r; s++) {
3627
- const o = ge[s];
3625
+ ), W.raycast(t, de);
3626
+ for (let s = 0, r = de.length; s < r; s++) {
3627
+ const o = de[s];
3628
3628
  o.object = this, o.batchId = e, o.objectId = n.objectId, i.push(o);
3629
3629
  }
3630
- ge.length = 0;
3630
+ de.length = 0;
3631
3631
  }
3632
3632
  }
3633
3633
  raycast(e, t) {
@@ -3648,8 +3648,8 @@ class Ri extends d.Mesh {
3648
3648
  return this.geometry.dispose(), this;
3649
3649
  }
3650
3650
  }
3651
- const qe = /* @__PURE__ */ new d.Box3(), X = /* @__PURE__ */ new d.Vector3(), $ = /* @__PURE__ */ new d.Points(), pe = [];
3652
- class Oi extends d.Points {
3651
+ const We = /* @__PURE__ */ new d.Box3(), X = /* @__PURE__ */ new d.Vector3(), $ = /* @__PURE__ */ new d.Points(), ue = [];
3652
+ class Di extends d.Points {
3653
3653
  constructor(e = 1e3, t) {
3654
3654
  super(new d.BufferGeometry(), t), this.boundingBox = null, this.boundingSphere = null, this._geometryInfo = [], this._availableGeometryIds = [], this._nextVertexStart = 0, this._geometryCount = 0, this._geometryInitialized = !1, this.frustumCulled = !1, this._maxVertexCount = e;
3655
3655
  }
@@ -3662,7 +3662,7 @@ class Oi extends d.Points {
3662
3662
  get mappingStats() {
3663
3663
  const e = this._geometryInfo.length;
3664
3664
  let t = 0;
3665
- return e > 0 && (t = ue.estimateObjectSize(this._geometryInfo[0])), {
3665
+ return e > 0 && (t = he.estimateObjectSize(this._geometryInfo[0])), {
3666
3666
  count: e,
3667
3667
  size: e * t
3668
3668
  };
@@ -3744,7 +3744,7 @@ class Oi extends d.Points {
3744
3744
  }, n = this._geometryInfo;
3745
3745
  i.vertexStart = this._nextVertexStart, i.reservedVertexCount = t === -1 ? e.getAttribute("position").count : t;
3746
3746
  let s;
3747
- return this._availableGeometryIds.length > 0 ? (this._availableGeometryIds.sort(Ve), s = this._availableGeometryIds.shift(), n[s] = i) : (s = this._geometryCount, this._geometryCount++, n.push(i)), this.setGeometryAt(s, e), this._nextVertexStart = i.vertexStart + i.reservedVertexCount, this.geometry.setDrawRange(0, this._nextVertexStart), s;
3747
+ return this._availableGeometryIds.length > 0 ? (this._availableGeometryIds.sort(Te), s = this._availableGeometryIds.shift(), n[s] = i) : (s = this._geometryCount, this._geometryCount++, n.push(i)), this.setGeometryAt(s, e), this._nextVertexStart = i.vertexStart + i.reservedVertexCount, this.geometry.setDrawRange(0, this._nextVertexStart), s;
3748
3748
  }
3749
3749
  setGeometryInfo(e, t) {
3750
3750
  if (e >= this._geometryCount)
@@ -3762,7 +3762,7 @@ class Oi extends d.Points {
3762
3762
  const a = t.getAttribute(o), h = i.getAttribute(
3763
3763
  o
3764
3764
  );
3765
- je(a, h, s);
3765
+ De(a, h, s);
3766
3766
  const l = a.itemSize;
3767
3767
  for (let m = a.count, u = r; m < u; m++) {
3768
3768
  const p = s + m;
@@ -3828,7 +3828,7 @@ class Oi extends d.Points {
3828
3828
  const i = this.geometry, n = this._geometryInfo[e];
3829
3829
  if (n.boundingSphere === null) {
3830
3830
  const s = new d.Sphere();
3831
- this.getBoundingBoxAt(e, qe), qe.getCenter(s.center);
3831
+ this.getBoundingBoxAt(e, We), We.getCenter(s.center);
3832
3832
  const r = i.index, o = i.attributes.position;
3833
3833
  let a = 0;
3834
3834
  for (let h = n.vertexStart, l = n.vertexStart + n.vertexCount; h < l; h++) {
@@ -3855,9 +3855,9 @@ class Oi extends d.Points {
3855
3855
  const t = this.geometry;
3856
3856
  t.dispose(), this._maxVertexCount = e, this._geometryInitialized && (this._geometryInitialized = !1, this.geometry = new d.BufferGeometry(), this._initializeGeometry(t));
3857
3857
  const i = this.geometry;
3858
- t.index && J(t.index.array, i.index.array);
3858
+ t.index && Z(t.index.array, i.index.array);
3859
3859
  for (const n in t.attributes)
3860
- J(
3860
+ Z(
3861
3861
  t.attributes[n].array,
3862
3862
  i.attributes[n].array
3863
3863
  );
@@ -3911,12 +3911,12 @@ class Oi extends d.Points {
3911
3911
  e,
3912
3912
  n.vertexStart,
3913
3913
  n.vertexCount
3914
- ), $.raycast(t, pe);
3915
- for (let s = 0, r = pe.length; s < r; s++) {
3916
- const o = pe[s];
3914
+ ), $.raycast(t, ue);
3915
+ for (let s = 0, r = ue.length; s < r; s++) {
3916
+ const o = ue[s];
3917
3917
  o.object = this, o.batchId = e, o.objectId = n.objectId, i.push(o);
3918
3918
  }
3919
- pe.length = 0;
3919
+ ue.length = 0;
3920
3920
  }
3921
3921
  }
3922
3922
  raycast(e, t) {
@@ -3937,7 +3937,7 @@ class Oi extends d.Points {
3937
3937
  return this.geometry.dispose(), this;
3938
3938
  }
3939
3939
  }
3940
- class Vi extends d.Group {
3940
+ class zi extends d.Group {
3941
3941
  constructor() {
3942
3942
  super(), this._pointBatches = /* @__PURE__ */ new Map(), this._pointSymbolBatches = /* @__PURE__ */ new Map(), this._lineBatches = /* @__PURE__ */ new Map(), this._lineWithIndexBatches = /* @__PURE__ */ new Map(), this._meshBatches = /* @__PURE__ */ new Map(), this._meshWithIndexBatches = /* @__PURE__ */ new Map(), this._entitiesMap = /* @__PURE__ */ new Map(), this._selectedObjects = new d.Group(), this._hoverObjects = new d.Group(), this.add(this._selectedObjects), this.add(this._hoverObjects);
3943
3943
  }
@@ -4003,7 +4003,7 @@ class Vi extends d.Group {
4003
4003
  return e.summary.totalGeometrySize = e.line.indexed.geometrySize + e.line.nonIndexed.geometrySize + e.mesh.indexed.geometrySize + e.mesh.nonIndexed.geometrySize + e.point.indexed.geometrySize + e.point.nonIndexed.geometrySize, e.summary.totalMappingSize = e.line.indexed.mappingSize + e.line.nonIndexed.mappingSize + e.mesh.indexed.mappingSize + e.mesh.nonIndexed.mappingSize + e.point.indexed.mappingSize + e.point.nonIndexed.mappingSize, e;
4004
4004
  }
4005
4005
  rerenderPoints(e) {
4006
- const t = R.instance.create(e);
4006
+ const t = O.instance.create(e);
4007
4007
  t.line && this._pointSymbolBatches.forEach((n) => {
4008
4008
  n.resetGeometry(e);
4009
4009
  });
@@ -4091,8 +4091,8 @@ class Vi extends d.Group {
4091
4091
  i && i.forEach((n) => {
4092
4092
  const s = this.getObjectById(
4093
4093
  n.batchedObjectId
4094
- ).getObjectAt(n.batchId), r = Ie.cloneMaterial(s.material);
4095
- Ie.setMaterialColor(r), s.material = r, s.userData.objectId = e, t.add(s);
4094
+ ).getObjectAt(n.batchId), r = we.cloneMaterial(s.material);
4095
+ we.setMaterialColor(r), s.material = r, s.userData.objectId = e, t.add(s);
4096
4096
  });
4097
4097
  }
4098
4098
  unhighlight(e, t) {
@@ -4104,7 +4104,7 @@ class Vi extends d.Group {
4104
4104
  addLine(e, t) {
4105
4105
  const i = e.material, n = this.getMatchedLineBatches(e);
4106
4106
  let s = n.get(i.id);
4107
- s == null && (s = new Pi(1e3, 2e3, i), n.set(i.id, s), this.add(s)), e.geometry.applyMatrix4(e.matrixWorld);
4107
+ s == null && (s = new Ei(1e3, 2e3, i), n.set(i.id, s), this.add(s)), e.geometry.applyMatrix4(e.matrixWorld);
4108
4108
  const r = s.addGeometry(e.geometry);
4109
4109
  return s.setGeometryInfo(r, t), {
4110
4110
  batchedObjectId: s.id,
@@ -4114,7 +4114,7 @@ class Vi extends d.Group {
4114
4114
  addMesh(e, t) {
4115
4115
  const i = e.material, n = this.getMatchedMeshBatches(e);
4116
4116
  let s = n.get(i.id);
4117
- s == null && (s = new Ri(1e3, 2e3, i), n.set(i.id, s), this.add(s)), e.geometry.applyMatrix4(e.matrixWorld);
4117
+ s == null && (s = new Ti(1e3, 2e3, i), n.set(i.id, s), this.add(s)), e.geometry.applyMatrix4(e.matrixWorld);
4118
4118
  const r = s.addGeometry(e.geometry);
4119
4119
  return s.setGeometryInfo(r, t), {
4120
4120
  batchedObjectId: s.id,
@@ -4124,7 +4124,7 @@ class Vi extends d.Group {
4124
4124
  addPoint(e, t) {
4125
4125
  const i = e.material;
4126
4126
  let n = this._pointBatches.get(i.id);
4127
- n == null && (n = new Oi(100, i), n.visible = e.visible, this._pointBatches.set(i.id, n), this.add(n)), e.geometry.applyMatrix4(e.matrixWorld);
4127
+ n == null && (n = new Di(100, i), n.visible = e.visible, this._pointBatches.set(i.id, n), this.add(n)), e.geometry.applyMatrix4(e.matrixWorld);
4128
4128
  const s = n.addGeometry(e.geometry);
4129
4129
  return n.setGeometryInfo(s, t), {
4130
4130
  batchedObjectId: n.id,
@@ -4171,7 +4171,7 @@ class Vi extends d.Group {
4171
4171
  return t;
4172
4172
  }
4173
4173
  }
4174
- class xt extends Se {
4174
+ class rt extends be {
4175
4175
  constructor(e) {
4176
4176
  super(), this._styleManager = e;
4177
4177
  }
@@ -4185,7 +4185,7 @@ class xt extends Se {
4185
4185
  return this._styleManager = e._styleManager, super.copy(e, t);
4186
4186
  }
4187
4187
  }
4188
- class E extends xt {
4188
+ class E extends rt {
4189
4189
  constructor(e) {
4190
4190
  super(e), this._objectId = "", this._ownerId = "", this._layerName = "", this._box = new d.Box3();
4191
4191
  }
@@ -4266,8 +4266,8 @@ class E extends xt {
4266
4266
  if ("material" in e) {
4267
4267
  const t = e.material;
4268
4268
  if (e.userData.originalMaterial == null) {
4269
- const i = Ie.cloneMaterial(t);
4270
- Ie.setMaterialColor(i), e.userData.originalMaterial = e.material, e.material = i;
4269
+ const i = we.cloneMaterial(t);
4270
+ we.setMaterialColor(i), e.userData.originalMaterial = e.material, e.material = i;
4271
4271
  }
4272
4272
  } else e.children.length > 0 && e.children.forEach((t) => {
4273
4273
  this.highlightObject(t);
@@ -4321,7 +4321,7 @@ class E extends xt {
4321
4321
  return r;
4322
4322
  }
4323
4323
  }
4324
- const _t = class H {
4324
+ const ot = class H {
4325
4325
  constructor() {
4326
4326
  }
4327
4327
  /**
@@ -4350,7 +4350,7 @@ const _t = class H {
4350
4350
  * @param workerUrl - URL to the worker script
4351
4351
  */
4352
4352
  initialize(e) {
4353
- this._renderer = new qt("worker", { workerUrl: e });
4353
+ this._renderer = new Xt("worker", { workerUrl: e });
4354
4354
  }
4355
4355
  /**
4356
4356
  * Dispose of the renderer and reset the singleton
@@ -4359,9 +4359,9 @@ const _t = class H {
4359
4359
  this._renderer && (this._renderer.destroy(), this._renderer = void 0), H._instance = null;
4360
4360
  }
4361
4361
  };
4362
- _t._instance = null;
4363
- let Pe = _t;
4364
- class ji extends E {
4362
+ ot._instance = null;
4363
+ let Le = ot;
4364
+ class Pi extends E {
4365
4365
  constructor(e, t) {
4366
4366
  super(t), e.forEach((i) => {
4367
4367
  if (Array.isArray(i)) {
@@ -4372,7 +4372,7 @@ class ji extends E {
4372
4372
  }), this.flatten();
4373
4373
  }
4374
4374
  }
4375
- class Gi extends E {
4375
+ class Oi extends E {
4376
4376
  constructor(e, t, i) {
4377
4377
  super(i);
4378
4378
  const n = URL.createObjectURL(e), s = new d.TextureLoader().load(n);
@@ -4399,8 +4399,8 @@ class Gi extends E {
4399
4399
  e.setAttribute("uv", new d.BufferAttribute(i, 2));
4400
4400
  }
4401
4401
  }
4402
- const ye = /* @__PURE__ */ new d.Vector3(), fe = /* @__PURE__ */ new d.Vector3();
4403
- class le {
4402
+ const me = /* @__PURE__ */ new d.Vector3(), ge = /* @__PURE__ */ new d.Vector3();
4403
+ class ae {
4404
4404
  /**
4405
4405
  * Release memeory occupied by buffer geometry
4406
4406
  * @param geometry
@@ -4418,7 +4418,7 @@ class le {
4418
4418
  for (const n in e.attributes)
4419
4419
  t.setAttribute(
4420
4420
  n,
4421
- le.createGeometryAttributeByIndex(
4421
+ ae.createGeometryAttributeByIndex(
4422
4422
  e.attributes[n],
4423
4423
  i
4424
4424
  )
@@ -4462,18 +4462,18 @@ class le {
4462
4462
  const t = e.isLineSegments === !0;
4463
4463
  let i = e.geometry;
4464
4464
  const n = e.matrixWorld;
4465
- if (i.index && (i = le.toNonIndexed(i)), i.index === null) {
4465
+ if (i.index && (i = ae.toNonIndexed(i)), i.index === null) {
4466
4466
  const s = i.attributes.position;
4467
4467
  if (!s || s.count === 0)
4468
4468
  return;
4469
4469
  const r = [];
4470
4470
  if (t)
4471
4471
  for (let o = 0, a = s.count; o < a; o += 2)
4472
- ye.fromBufferAttribute(s, o).applyMatrix4(n), fe.fromBufferAttribute(s, o + 1).applyMatrix4(n), r[o] = o === 0 ? 0 : r[o - 1], r[o + 1] = r[o] + ye.distanceTo(fe);
4472
+ me.fromBufferAttribute(s, o).applyMatrix4(n), ge.fromBufferAttribute(s, o + 1).applyMatrix4(n), r[o] = o === 0 ? 0 : r[o - 1], r[o + 1] = r[o] + me.distanceTo(ge);
4473
4473
  else {
4474
4474
  r[0] = 0;
4475
4475
  for (let o = 1, a = s.count; o < a; o++)
4476
- ye.fromBufferAttribute(s, o - 1).applyMatrix4(n), fe.fromBufferAttribute(s, o).applyMatrix4(n), r[o] = r[o - 1], r[o] += ye.distanceTo(fe);
4476
+ me.fromBufferAttribute(s, o - 1).applyMatrix4(n), ge.fromBufferAttribute(s, o).applyMatrix4(n), r[o] = r[o - 1], r[o] += me.distanceTo(ge);
4477
4477
  }
4478
4478
  i.setAttribute(
4479
4479
  "lineDistance",
@@ -4524,7 +4524,7 @@ class le {
4524
4524
  return n.needsUpdate = !0, e;
4525
4525
  }
4526
4526
  }
4527
- class ki extends E {
4527
+ class Ri extends E {
4528
4528
  constructor(e, t, i) {
4529
4529
  super(i);
4530
4530
  let n;
@@ -4540,13 +4540,13 @@ class ki extends E {
4540
4540
  const h = new d.BufferGeometry();
4541
4541
  h.setAttribute("position", new d.BufferAttribute(o, 3)), h.setIndex(new d.BufferAttribute(a, 1)), this.setBoundingBox(h), this.geometry = h;
4542
4542
  const l = new d.LineSegments(h, n);
4543
- le.computeLineDistances(l), this.add(l);
4543
+ ae.computeLineDistances(l), this.add(l);
4544
4544
  }
4545
4545
  setBoundingBox(e) {
4546
4546
  e.computeBoundingBox(), this.box = e.boundingBox;
4547
4547
  }
4548
4548
  }
4549
- class Fi extends E {
4549
+ class Vi extends E {
4550
4550
  constructor(e, t, i, n, s) {
4551
4551
  super(s);
4552
4552
  let r;
@@ -4557,15 +4557,15 @@ class Fi extends E {
4557
4557
  new d.BufferAttribute(e, t)
4558
4558
  ), o.setIndex(new d.BufferAttribute(i, 1)), o.computeBoundingBox(), this.box = o.boundingBox;
4559
4559
  const a = new d.LineSegments(o, r);
4560
- le.computeLineDistances(a), this.add(a);
4560
+ ae.computeLineDistances(a), this.add(a);
4561
4561
  }
4562
4562
  }
4563
- class Ni extends E {
4563
+ class ji extends E {
4564
4564
  constructor(e, t, i) {
4565
4565
  super(i), this._text = e, this._style = t;
4566
4566
  }
4567
4567
  async draw() {
4568
- const e = Pe.getInstance();
4568
+ const e = Le.getInstance();
4569
4569
  if (e)
4570
4570
  try {
4571
4571
  const t = this._style;
@@ -4595,16 +4595,16 @@ class Ni extends E {
4595
4595
  return e != null && e.bigFont && e.bigFont.toUpperCase().startsWith("GB") ? "gbk" : "utf8";
4596
4596
  }
4597
4597
  }
4598
- const Ui = /* @__PURE__ */ new d.Vector3();
4599
- class Wi extends E {
4598
+ const Gi = /* @__PURE__ */ new d.Vector3();
4599
+ class ki extends E {
4600
4600
  constructor(e, t, i) {
4601
4601
  super(i);
4602
- const n = R.instance.create(
4602
+ const n = O.instance.create(
4603
4603
  t.displayMode,
4604
4604
  e
4605
4605
  );
4606
4606
  this.isShowPoint = n.point != null;
4607
- const s = n.point ?? new d.BufferGeometry().setFromPoints([Ui.copy(e)]);
4607
+ const s = n.point ?? new d.BufferGeometry().setFromPoints([Gi.copy(e)]);
4608
4608
  s.computeBoundingBox(), s.boundingBox && this.box.union(s.boundingBox);
4609
4609
  const r = this.styleManager.getPointsMaterial(t.color), o = new d.Points(s, r);
4610
4610
  if (o.userData.bboxIntersectionCheck = !0, o.visible = this.isShowPoint, this.add(o), n.line) {
@@ -4615,14 +4615,14 @@ class Wi extends E {
4615
4615
  }
4616
4616
  }
4617
4617
  }
4618
- class Xi extends E {
4618
+ class Ni extends E {
4619
4619
  constructor(e, t, i) {
4620
4620
  var n;
4621
4621
  super(i);
4622
4622
  const s = e.getPoints(100), r = e.buildHierarchy(), o = [];
4623
4623
  this.buildHatchGeometry(s, r, o);
4624
4624
  let a;
4625
- if (o.length > 0 && (a = Qt(o)), !a || !a.getIndex() || ((n = a.getIndex()) == null ? void 0 : n.count) === 0)
4625
+ if (o.length > 0 && (a = $t(o)), !a || !a.getIndex() || ((n = a.getIndex()) == null ? void 0 : n.count) === 0)
4626
4626
  console.warn("Failed to convert hatch boundaries!");
4627
4627
  else {
4628
4628
  a.computeBoundingBox(), this.box = a.boundingBox;
@@ -4678,7 +4678,7 @@ class Xi extends E {
4678
4678
  try {
4679
4679
  p.forEach((f, _) => {
4680
4680
  y = Math.min(e[f][0].relativeEps(), 1e-6);
4681
- const x = new ft(new yt(y));
4681
+ const x = new st(new nt(y));
4682
4682
  if (_ === 0)
4683
4683
  g = x.segments({
4684
4684
  regions: [o(e[f])],
@@ -4726,7 +4726,7 @@ class Xi extends E {
4726
4726
  const a = [];
4727
4727
  for (let h = s + 1; h < i; h++) {
4728
4728
  const l = e[t[h]];
4729
- St.isPolygonIntersect(
4729
+ dt.isPolygonIntersect(
4730
4730
  r,
4731
4731
  l
4732
4732
  ) && (o = !0, a.push(t[h]));
@@ -4736,7 +4736,7 @@ class Xi extends E {
4736
4736
  return n;
4737
4737
  }
4738
4738
  }
4739
- function $i(c, e, t, i, n = 0) {
4739
+ function Fi(c, e, t, i, n = 0) {
4740
4740
  const s = {
4741
4741
  u_cameraZoom: t,
4742
4742
  u_patternLines: { value: c },
@@ -4956,7 +4956,7 @@ function $i(c, e, t, i, n = 0) {
4956
4956
  clipping: !0
4957
4957
  });
4958
4958
  }
4959
- class Yi {
4959
+ class Ui {
4960
4960
  /**
4961
4961
  * Creates line shader by given pattern.
4962
4962
  * Note: remember to call line.computeLineDistances() in order to make it work!
@@ -5047,7 +5047,7 @@ class Yi {
5047
5047
  });
5048
5048
  }
5049
5049
  }
5050
- const we = class oe {
5050
+ const xe = class ne {
5051
5051
  constructor() {
5052
5052
  this.pointMaterials = {}, this.lineShaderMaterials = {}, this.lineBasicMaterials = {}, this.hatchShaderMaterials = [], this.meshBasicMaterials = {}, this.unsupportedTextStyles = {};
5053
5053
  }
@@ -5071,12 +5071,12 @@ const we = class oe {
5071
5071
  getLineShaderMaterial(e, t) {
5072
5072
  if (e.pattern && e.pattern.length !== 0) {
5073
5073
  const i = `${e.name}_${e.color}_${t}`;
5074
- return this.lineShaderMaterials[i] || (this.lineShaderMaterials[i] = Yi.createLineShaderMaterial(
5074
+ return this.lineShaderMaterials[i] || (this.lineShaderMaterials[i] = Ui.createLineShaderMaterial(
5075
5075
  e.pattern,
5076
5076
  e.color,
5077
5077
  t,
5078
- oe.ViewportScaleUniform,
5079
- oe.CameraZoomUniform
5078
+ ne.ViewportScaleUniform,
5079
+ ne.CameraZoomUniform
5080
5080
  )), this.lineShaderMaterials[i];
5081
5081
  } else
5082
5082
  return this.getLineBasicMaterial(e.color);
@@ -5139,7 +5139,7 @@ const we = class oe {
5139
5139
  patternSum: b,
5140
5140
  patternLength: I
5141
5141
  };
5142
- if (a += 4, a += o, a += o + 1, a > oe.MaxFragmentUniforms) {
5142
+ if (a += 4, a += o, a += o + 1, a > ne.MaxFragmentUniforms) {
5143
5143
  console.warn(
5144
5144
  "There will be warning in fragment shader when number of uniforms exceeds 1024, so extra hatch line patterns are ignored here!"
5145
5145
  );
@@ -5147,10 +5147,10 @@ const we = class oe {
5147
5147
  }
5148
5148
  h.push(P);
5149
5149
  }
5150
- const m = $i(
5150
+ const m = Fi(
5151
5151
  h,
5152
5152
  e.patternAngle,
5153
- oe.CameraZoomUniform,
5153
+ ne.CameraZoomUniform,
5154
5154
  new d.Color(e.color)
5155
5155
  );
5156
5156
  return m.defines = {
@@ -5184,13 +5184,13 @@ const we = class oe {
5184
5184
  return o == null ? void 0 : o.material;
5185
5185
  }
5186
5186
  };
5187
- we.CameraZoomUniform = { value: 1 }, we.ViewportScaleUniform = { value: 1 }, we.MaxFragmentUniforms = 1024;
5188
- let Hi = we;
5189
- class qi {
5187
+ xe.CameraZoomUniform = { value: 1 }, xe.ViewportScaleUniform = { value: 1 }, xe.MaxFragmentUniforms = 1024;
5188
+ let Wi = xe;
5189
+ class Xi {
5190
5190
  constructor(e) {
5191
5191
  this.events = {
5192
5192
  fontNotFound: new M()
5193
- }, this._renderer = e, this._styleManager = new Hi(), ee.instance.events.fontNotFound.addEventListener((t) => {
5193
+ }, this._renderer = e, this._styleManager = new Wi(), J.instance.events.fontNotFound.addEventListener((t) => {
5194
5194
  this.events.fontNotFound.dispatch(t);
5195
5195
  });
5196
5196
  }
@@ -5258,31 +5258,31 @@ class qi {
5258
5258
  return this._renderer;
5259
5259
  }
5260
5260
  async loadFonts(e) {
5261
- return await ee.instance.loadFontsByUrls(e);
5261
+ return await J.instance.loadFontsByUrls(e);
5262
5262
  }
5263
5263
  /**
5264
5264
  * @inheritdoc
5265
5265
  */
5266
5266
  setFontMapping(e) {
5267
- ee.instance.setFontMapping(e);
5267
+ J.instance.setFontMapping(e);
5268
5268
  }
5269
5269
  /**
5270
5270
  * Fonts list which can't be found
5271
5271
  */
5272
5272
  get missedFonts() {
5273
- return ee.instance.missedFonts;
5273
+ return J.instance.missedFonts;
5274
5274
  }
5275
5275
  /**
5276
5276
  * Clear fonts which can't be found
5277
5277
  */
5278
5278
  clearMissedFonts() {
5279
- ee.instance.missedFonts = {};
5279
+ J.instance.missedFonts = {};
5280
5280
  }
5281
5281
  /**
5282
5282
  * Create one empty drawable object
5283
5283
  */
5284
5284
  createObject() {
5285
- return new xt(this._styleManager);
5285
+ return new rt(this._styleManager);
5286
5286
  }
5287
5287
  /**
5288
5288
  * Create one empty entity
@@ -5294,13 +5294,13 @@ class qi {
5294
5294
  * @inheritdoc
5295
5295
  */
5296
5296
  group(e) {
5297
- return new ji(e, this._styleManager);
5297
+ return new Pi(e, this._styleManager);
5298
5298
  }
5299
5299
  /**
5300
5300
  * @inheritdoc
5301
5301
  */
5302
5302
  point(e, t) {
5303
- return new Wi(e, t, this._styleManager);
5303
+ return new ki(e, t, this._styleManager);
5304
5304
  }
5305
5305
  /**
5306
5306
  * @inheritdoc
@@ -5324,7 +5324,7 @@ class qi {
5324
5324
  * @inheritdoc
5325
5325
  */
5326
5326
  lineSegments(e, t, i, n) {
5327
- return new Fi(
5327
+ return new Vi(
5328
5328
  e,
5329
5329
  t,
5330
5330
  i,
@@ -5336,25 +5336,25 @@ class qi {
5336
5336
  * @inheritdoc
5337
5337
  */
5338
5338
  area(e, t) {
5339
- return new Xi(e, t, this._styleManager);
5339
+ return new Ni(e, t, this._styleManager);
5340
5340
  }
5341
5341
  /**
5342
5342
  * @inheritdoc
5343
5343
  */
5344
5344
  mtext(e, t) {
5345
- return new Ni(e, t, this._styleManager);
5345
+ return new ji(e, t, this._styleManager);
5346
5346
  }
5347
5347
  /**
5348
5348
  * @inheritdoc
5349
5349
  */
5350
5350
  image(e, t) {
5351
- return new Gi(e, t, this._styleManager);
5351
+ return new Oi(e, t, this._styleManager);
5352
5352
  }
5353
5353
  linePoints(e, t = void 0) {
5354
- return new ki(e, t, this._styleManager);
5354
+ return new Ri(e, t, this._styleManager);
5355
5355
  }
5356
5356
  }
5357
- class Qi {
5357
+ class $i {
5358
5358
  constructor(e) {
5359
5359
  this._camera = e;
5360
5360
  }
@@ -5454,7 +5454,7 @@ class Qi {
5454
5454
  );
5455
5455
  }
5456
5456
  }
5457
- class bt {
5457
+ class at {
5458
5458
  /**
5459
5459
  * Construct one instance of this class
5460
5460
  * @param renderer Input renderer
@@ -5466,7 +5466,7 @@ class bt {
5466
5466
  viewChanged: new M()
5467
5467
  }, this._renderer = e, this._width = t, this._height = i;
5468
5468
  const n = this.createCamera();
5469
- this._camera = new Qi(n), this._cameraControls = this.createCameraControls(), this._cameraControls.addEventListener("change", () => {
5469
+ this._camera = new $i(n), this._cameraControls = this.createCameraControls(), this._cameraControls.addEventListener("change", () => {
5470
5470
  this.events.viewChanged.dispatch({ view: this });
5471
5471
  }), this._raycaster = new d.Raycaster();
5472
5472
  }
@@ -5559,9 +5559,9 @@ class bt {
5559
5559
  ), this._raycaster.params.Line.threshold = t, this._raycaster.params.Points.threshold = t, this._raycaster;
5560
5560
  }
5561
5561
  zoomTo(e, t = 1.1) {
5562
- const i = new Te();
5562
+ const i = new Ce();
5563
5563
  e.getSize(i);
5564
- const n = new Te();
5564
+ const n = new Ce();
5565
5565
  e.getCenter(n);
5566
5566
  const s = new d.Vector3(n.x, n.y, 0);
5567
5567
  this._camera.position.set(n.x, n.y, this._camera.position.z), this._camera.lookAt(s), this._camera.setRotationFromEuler(new d.Euler(0, 0, 0));
@@ -5584,7 +5584,7 @@ class bt {
5584
5584
  return e.position.set(0, 0, 500), e.up.set(0, 1, 0), e.updateProjectionMatrix(), e;
5585
5585
  }
5586
5586
  createCameraControls() {
5587
- const e = new Zt(
5587
+ const e = new Yt(
5588
5588
  this._camera.internalCamera,
5589
5589
  this._renderer.domElement
5590
5590
  );
@@ -5593,7 +5593,7 @@ class bt {
5593
5593
  }, e.update(), e;
5594
5594
  }
5595
5595
  }
5596
- class Be extends bt {
5596
+ class ve extends at {
5597
5597
  /**
5598
5598
  * Calcuate the bounding box of this viewport in client window coordinate system
5599
5599
  */
@@ -5608,7 +5608,7 @@ class Be extends bt {
5608
5608
  * @param renderer Input renderer to draw this viewport view
5609
5609
  */
5610
5610
  constructor(e, t, i) {
5611
- const n = Be.calculateViewportWindowBox(
5611
+ const n = ve.calculateViewportWindowBox(
5612
5612
  e,
5613
5613
  t
5614
5614
  ).size;
@@ -5631,7 +5631,7 @@ class Be extends bt {
5631
5631
  * @param scene Input the scene to render
5632
5632
  */
5633
5633
  render(e) {
5634
- const t = Be.calculateViewportWindowBox(
5634
+ const t = ve.calculateViewportWindowBox(
5635
5635
  this._parentView,
5636
5636
  this._viewport
5637
5637
  );
@@ -5651,36 +5651,36 @@ class Be extends bt {
5651
5651
  }
5652
5652
  }
5653
5653
  }
5654
- const Zi = (c) => new it(c.min, c.max), Ji = (c) => new L(
5654
+ const Yi = (c) => new Ze(c.min, c.max), Hi = (c) => new L(
5655
5655
  c.min,
5656
5656
  c.max
5657
- ), Ki = (c) => new d.Box3(
5657
+ ), qi = (c) => new d.Box3(
5658
5658
  c.min,
5659
5659
  c.max
5660
- ), en = (c) => new L(c.min, c.max), tn = (c) => new d.Box2(
5660
+ ), Qi = (c) => new L(c.min, c.max), Zi = (c) => new d.Box2(
5661
5661
  c.min,
5662
5662
  c.max
5663
- ), nn = (c) => new L(c.min, c.max), sn = (c) => {
5663
+ ), Ji = (c) => new L(c.min, c.max), Ki = (c) => {
5664
5664
  const e = new d.Box3();
5665
5665
  return e.min.set(c.min.x, c.min.y, 0), e.max.set(c.max.x, c.max.y, 0), e;
5666
- }, rn = {
5666
+ }, en = {
5667
5667
  /** Converts Three.js Box2 to CAD geometry AcGeBox2d */
5668
- threeBo2dToGeBox2d: en,
5668
+ threeBo2dToGeBox2d: Qi,
5669
5669
  /** Converts CAD geometry AcGeBox2d to Three.js Box2 */
5670
- geBox2dToThreeBox2d: tn,
5670
+ geBox2dToThreeBox2d: Zi,
5671
5671
  /** Converts Three.js Box3 to CAD geometry AcGeBox3d */
5672
- threeBox3dToGeBox3d: Zi,
5672
+ threeBox3dToGeBox3d: Yi,
5673
5673
  /** Converts CAD geometry AcGeBox3d to Three.js Box3 */
5674
- geBox3dToThreeBox3d: Ki,
5674
+ geBox3dToThreeBox3d: qi,
5675
5675
  /** Converts CAD geometry AcGeBox3d to CAD geometry AcGeBox2d */
5676
- goBox3dToGeBox2d: Ji,
5676
+ goBox3dToGeBox2d: Hi,
5677
5677
  /** Converts Three.js Box3 to CAD geometry Box2d (ignores Z) */
5678
- threeBox3dToGeBox2d: nn,
5678
+ threeBox3dToGeBox2d: Ji,
5679
5679
  /** Converts CAD geometry AcGeBox2d to Three.js Box3 (Z=0) */
5680
- geBox2dToThreeBox3d: sn
5680
+ geBox2dToThreeBox3d: Ki
5681
5681
  };
5682
- var Ae = /* @__PURE__ */ ((c) => (c[c.LEFT_BOTTOM = 0] = "LEFT_BOTTOM", c[c.LEFT_TOP = 1] = "LEFT_TOP", c[c.RIGHT_TOP = 2] = "RIGHT_TOP", c[c.RIGHT_BOTTOM = 4] = "RIGHT_BOTTOM", c))(Ae || {});
5683
- class on extends d.Object3D {
5682
+ var Ie = /* @__PURE__ */ ((c) => (c[c.LEFT_BOTTOM = 0] = "LEFT_BOTTOM", c[c.LEFT_TOP = 1] = "LEFT_TOP", c[c.RIGHT_TOP = 2] = "RIGHT_TOP", c[c.RIGHT_BOTTOM = 4] = "RIGHT_BOTTOM", c))(Ie || {});
5683
+ class tn extends d.Object3D {
5684
5684
  /**
5685
5685
  * Construct one instance of this gizmo
5686
5686
  * @param camera Camera used in your canvas
@@ -5764,7 +5764,7 @@ class on extends d.Object3D {
5764
5764
  return r;
5765
5765
  }
5766
5766
  }
5767
- function an(c, e) {
5767
+ function nn(c, e) {
5768
5768
  const t = e.font || "Helvetica", i = e.fontSize || 30, n = e.width || 200, s = e.height || 200, r = e.bgColor ? e.bgColor.join(", ") : "255, 255, 255, 1.0", o = e.color ? e.color.join(", ") : "0, 0, 0, 1.0", a = document.createElement("canvas");
5769
5769
  a.width = n, a.height = s;
5770
5770
  const h = a.getContext("2d");
@@ -5780,8 +5780,8 @@ function an(c, e) {
5780
5780
  const l = new d.Texture(a);
5781
5781
  return l.minFilter = d.LinearFilter, l.needsUpdate = !0, l;
5782
5782
  }
5783
- function Ce(c) {
5784
- const e = an(c, {
5783
+ function Be(c) {
5784
+ const e = nn(c, {
5785
5785
  fontSize: 100,
5786
5786
  font: "Arial Narrow, sans-serif",
5787
5787
  color: [255, 255, 255, 1],
@@ -5789,16 +5789,16 @@ function Ce(c) {
5789
5789
  }), t = new d.SpriteMaterial({ map: e, transparent: !0 });
5790
5790
  return new d.Sprite(t);
5791
5791
  }
5792
- Ae.RIGHT_TOP;
5793
- const cn = {
5794
- pos: Ae.LEFT_BOTTOM,
5792
+ Ie.RIGHT_TOP;
5793
+ const sn = {
5794
+ pos: Ie.LEFT_BOTTOM,
5795
5795
  size: 100,
5796
5796
  hasZAxis: !0
5797
5797
  };
5798
- class hn extends on {
5798
+ class rn extends tn {
5799
5799
  constructor(e, t, i) {
5800
5800
  const n = {
5801
- ...cn,
5801
+ ...sn,
5802
5802
  ...i
5803
5803
  };
5804
5804
  super(e, t, n.size, i.pos), this.hasZAxis = n.hasZAxis;
@@ -5813,7 +5813,7 @@ class hn extends on {
5813
5813
  vertexColors: !0,
5814
5814
  toneMapped: !1
5815
5815
  });
5816
- this.axes = new d.LineSegments(o, a), this.axes.position.set(-1, -1, -1), this.add(this.axes), this.xText = Ce("X"), this.xText.position.set(1.5, -1, -1), this.add(this.xText), this.yText = Ce("Y"), this.yText.position.set(-1, 1.5, -1), this.add(this.yText), this.hasZAxis && (this.zText = Ce("Z"), this.zText.position.set(-1, -1, 1.5), this.add(this.zText));
5816
+ this.axes = new d.LineSegments(o, a), this.axes.position.set(-1, -1, -1), this.add(this.axes), this.xText = Be("X"), this.xText.position.set(1.5, -1, -1), this.add(this.xText), this.yText = Be("Y"), this.yText.position.set(-1, 1.5, -1), this.add(this.yText), this.hasZAxis && (this.zText = Be("Z"), this.zText.position.set(-1, -1, 1.5), this.add(this.zText));
5817
5817
  }
5818
5818
  /**
5819
5819
  * Set color of x-axis and y-axis
@@ -5840,7 +5840,7 @@ class hn extends on {
5840
5840
  this.axes.geometry.dispose(), this.axes.material.dispose(), this.xText.geometry.dispose(), this.xText.material.dispose(), this.yText.geometry.dispose(), this.yText.material.dispose(), this.hasZAxis && ((e = this.zText) == null || e.geometry.dispose(), (t = this.zText) == null || t.material.dispose());
5841
5841
  }
5842
5842
  }
5843
- class ln extends bt {
5843
+ class on extends at {
5844
5844
  /**
5845
5845
  * Construct one instance of this class.
5846
5846
  *
@@ -5850,7 +5850,7 @@ class ln extends bt {
5850
5850
  * @param height - Input height of this view in pixels
5851
5851
  */
5852
5852
  constructor(e, t, i, n) {
5853
- super(e, i, n), this._layoutBtrId = t, this._mode = O.SELECTION, this._axesGizmo = this.createAxesGizmo(), this._viewportViews = /* @__PURE__ */ new Map();
5853
+ super(e, i, n), this._layoutBtrId = t, this._mode = R.SELECTION, this._axesGizmo = this.createAxesGizmo(), this._viewportViews = /* @__PURE__ */ new Map();
5854
5854
  }
5855
5855
  /**
5856
5856
  * Gets the block table record ID associated with this layout.
@@ -5868,9 +5868,9 @@ class ln extends bt {
5868
5868
  return this._mode;
5869
5869
  }
5870
5870
  set mode(e) {
5871
- e == O.SELECTION ? this._cameraControls.mouseButtons = {
5871
+ e == R.SELECTION ? this._cameraControls.mouseButtons = {
5872
5872
  MIDDLE: d.MOUSE.PAN
5873
- } : e == O.PAN && (this._cameraControls.mouseButtons = {
5873
+ } : e == R.PAN && (this._cameraControls.mouseButtons = {
5874
5874
  LEFT: d.MOUSE.PAN
5875
5875
  }), this._cameraControls.update(), this._mode = e;
5876
5876
  }
@@ -5931,12 +5931,12 @@ class ln extends bt {
5931
5931
  * @returns The configured axes gizmo instance
5932
5932
  */
5933
5933
  createAxesGizmo() {
5934
- return new hn(
5934
+ return new rn(
5935
5935
  this._camera.internalCamera,
5936
5936
  this._renderer.internalRenderer,
5937
5937
  {
5938
5938
  hasZAxis: !1,
5939
- pos: Ae.LEFT_BOTTOM
5939
+ pos: Ie.LEFT_BOTTOM
5940
5940
  }
5941
5941
  );
5942
5942
  }
@@ -5965,7 +5965,7 @@ class ln extends bt {
5965
5965
  }
5966
5966
  }
5967
5967
  }
5968
- class dn {
5968
+ class an {
5969
5969
  /**
5970
5970
  * Creates a new layout view manager instance.
5971
5971
  * Initializes with no active layout and an empty collection of views.
@@ -6048,29 +6048,29 @@ class dn {
6048
6048
  (t = this.activeLayoutView) == null || t.render(e);
6049
6049
  }
6050
6050
  }
6051
- function wt(c, e, t = 0, i = c.length - 1, n = un) {
6051
+ function ct(c, e, t = 0, i = c.length - 1, n = cn) {
6052
6052
  for (; i > t; ) {
6053
6053
  if (i - t > 600) {
6054
6054
  const a = i - t + 1, h = e - t + 1, l = Math.log(a), m = 0.5 * Math.exp(2 * l / 3), u = 0.5 * Math.sqrt(l * m * (a - m) / a) * (h - a / 2 < 0 ? -1 : 1), p = Math.max(t, Math.floor(e - h * m / a + u)), g = Math.min(i, Math.floor(e + (a - h) * m / a + u));
6055
- wt(c, e, p, g, n);
6055
+ ct(c, e, p, g, n);
6056
6056
  }
6057
6057
  const s = c[e];
6058
6058
  let r = t, o = i;
6059
- for (se(c, t, e), n(c[i], s) > 0 && se(c, t, i); r < o; ) {
6060
- for (se(c, r, o), r++, o--; n(c[r], s) < 0; ) r++;
6059
+ for (ie(c, t, e), n(c[i], s) > 0 && ie(c, t, i); r < o; ) {
6060
+ for (ie(c, r, o), r++, o--; n(c[r], s) < 0; ) r++;
6061
6061
  for (; n(c[o], s) > 0; ) o--;
6062
6062
  }
6063
- n(c[t], s) === 0 ? se(c, t, o) : (o++, se(c, o, i)), o <= e && (t = o + 1), e <= o && (i = o - 1);
6063
+ n(c[t], s) === 0 ? ie(c, t, o) : (o++, ie(c, o, i)), o <= e && (t = o + 1), e <= o && (i = o - 1);
6064
6064
  }
6065
6065
  }
6066
- function se(c, e, t) {
6066
+ function ie(c, e, t) {
6067
6067
  const i = c[e];
6068
6068
  c[e] = c[t], c[t] = i;
6069
6069
  }
6070
- function un(c, e) {
6070
+ function cn(c, e) {
6071
6071
  return c < e ? -1 : c > e ? 1 : 0;
6072
6072
  }
6073
- class mn {
6073
+ class hn {
6074
6074
  constructor(e = 9) {
6075
6075
  this._maxEntries = Math.max(4, e), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear();
6076
6076
  }
@@ -6080,12 +6080,12 @@ class mn {
6080
6080
  search(e) {
6081
6081
  let t = this.data;
6082
6082
  const i = [];
6083
- if (!_e(e, t)) return i;
6083
+ if (!ye(e, t)) return i;
6084
6084
  const n = this.toBBox, s = [];
6085
6085
  for (; t; ) {
6086
6086
  for (let r = 0; r < t.children.length; r++) {
6087
6087
  const o = t.children[r], a = t.leaf ? n(o) : o;
6088
- _e(e, a) && (t.leaf ? i.push(o) : Ee(e, a) ? this._all(o, i) : s.push(o));
6088
+ ye(e, a) && (t.leaf ? i.push(o) : Ae(e, a) ? this._all(o, i) : s.push(o));
6089
6089
  }
6090
6090
  t = s.pop();
6091
6091
  }
@@ -6093,13 +6093,13 @@ class mn {
6093
6093
  }
6094
6094
  collides(e) {
6095
6095
  let t = this.data;
6096
- if (!_e(e, t)) return !1;
6096
+ if (!ye(e, t)) return !1;
6097
6097
  const i = [];
6098
6098
  for (; t; ) {
6099
6099
  for (let n = 0; n < t.children.length; n++) {
6100
6100
  const s = t.children[n], r = t.leaf ? this.toBBox(s) : s;
6101
- if (_e(e, r)) {
6102
- if (t.leaf || Ee(e, r)) return !0;
6101
+ if (ye(e, r)) {
6102
+ if (t.leaf || Ae(e, r)) return !0;
6103
6103
  i.push(s);
6104
6104
  }
6105
6105
  }
@@ -6141,11 +6141,11 @@ class mn {
6141
6141
  let o, a, h;
6142
6142
  for (; i || s.length; ) {
6143
6143
  if (i || (i = s.pop(), a = s[s.length - 1], o = r.pop(), h = !0), i.leaf) {
6144
- const l = gn(e, i.children, t);
6144
+ const l = ln(e, i.children, t);
6145
6145
  if (l !== -1)
6146
6146
  return i.children.splice(l, 1), s.push(i), this._condense(s), this;
6147
6147
  }
6148
- !h && !i.leaf && Ee(i, n) ? (s.push(i), r.push(o), o = 0, a = i, i = i.children[0]) : a ? (o++, i = a.children[o], h = !1) : i = null;
6148
+ !h && !i.leaf && Ae(i, n) ? (s.push(i), r.push(o), o = 0, a = i, i = i.children[0]) : a ? (o++, i = a.children[o], h = !1) : i = null;
6149
6149
  }
6150
6150
  return this;
6151
6151
  }
@@ -6177,10 +6177,10 @@ class mn {
6177
6177
  return o = q(e.slice(t, i + 1)), Y(o, this.toBBox), o;
6178
6178
  n || (n = Math.ceil(Math.log(s) / Math.log(r)), r = Math.ceil(s / Math.pow(r, n - 1))), o = q([]), o.leaf = !1, o.height = n;
6179
6179
  const a = Math.ceil(s / r), h = a * Math.ceil(Math.sqrt(r));
6180
- Qe(e, t, i, h, this.compareMinX);
6180
+ Xe(e, t, i, h, this.compareMinX);
6181
6181
  for (let l = t; l <= i; l += h) {
6182
6182
  const m = Math.min(l + h - 1, i);
6183
- Qe(e, l, m, a, this.compareMinY);
6183
+ Xe(e, l, m, a, this.compareMinY);
6184
6184
  for (let u = l; u <= m; u += a) {
6185
6185
  const p = Math.min(u + a - 1, m);
6186
6186
  o.children.push(this._build(e, u, p, n - 1));
@@ -6192,7 +6192,7 @@ class mn {
6192
6192
  for (; n.push(t), !(t.leaf || n.length - 1 === i); ) {
6193
6193
  let s = 1 / 0, r = 1 / 0, o;
6194
6194
  for (let a = 0; a < t.children.length; a++) {
6195
- const h = t.children[a], l = Le(h), m = fn(e, h) - l;
6195
+ const h = t.children[a], l = Me(h), m = mn(e, h) - l;
6196
6196
  m < r ? (r = m, s = l < s ? l : s, o = h) : m === r && l < s && (s = l, o = h);
6197
6197
  }
6198
6198
  t = o || t.children[0];
@@ -6201,7 +6201,7 @@ class mn {
6201
6201
  }
6202
6202
  _insert(e, t, i) {
6203
6203
  const n = i ? e : this.toBBox(e), s = [], r = this._chooseSubtree(n, this.data, t, s);
6204
- for (r.children.push(e), ce(r, n); t >= 0 && s[t].children.length > this._maxEntries; )
6204
+ for (r.children.push(e), re(r, n); t >= 0 && s[t].children.length > this._maxEntries; )
6205
6205
  this._split(s, t), t--;
6206
6206
  this._adjustParentBBoxes(n, s, t);
6207
6207
  }
@@ -6218,83 +6218,83 @@ class mn {
6218
6218
  _chooseSplitIndex(e, t, i) {
6219
6219
  let n, s = 1 / 0, r = 1 / 0;
6220
6220
  for (let o = t; o <= i - t; o++) {
6221
- const a = ae(e, 0, o, this.toBBox), h = ae(e, o, i, this.toBBox), l = xn(a, h), m = Le(a) + Le(h);
6221
+ const a = se(e, 0, o, this.toBBox), h = se(e, o, i, this.toBBox), l = gn(a, h), m = Me(a) + Me(h);
6222
6222
  l < s ? (s = l, n = o, r = m < r ? m : r) : l === s && m < r && (r = m, n = o);
6223
6223
  }
6224
6224
  return n || i - t;
6225
6225
  }
6226
6226
  // sorts node children by the best axis for split
6227
6227
  _chooseSplitAxis(e, t, i) {
6228
- const n = e.leaf ? this.compareMinX : pn, s = e.leaf ? this.compareMinY : yn, r = this._allDistMargin(e, t, i, n), o = this._allDistMargin(e, t, i, s);
6228
+ const n = e.leaf ? this.compareMinX : dn, s = e.leaf ? this.compareMinY : un, r = this._allDistMargin(e, t, i, n), o = this._allDistMargin(e, t, i, s);
6229
6229
  r < o && e.children.sort(n);
6230
6230
  }
6231
6231
  // total margin of all possible split distributions where each node is at least m full
6232
6232
  _allDistMargin(e, t, i, n) {
6233
6233
  e.children.sort(n);
6234
- const s = this.toBBox, r = ae(e, 0, t, s), o = ae(e, i - t, i, s);
6235
- let a = xe(r) + xe(o);
6234
+ const s = this.toBBox, r = se(e, 0, t, s), o = se(e, i - t, i, s);
6235
+ let a = pe(r) + pe(o);
6236
6236
  for (let h = t; h < i - t; h++) {
6237
6237
  const l = e.children[h];
6238
- ce(r, e.leaf ? s(l) : l), a += xe(r);
6238
+ re(r, e.leaf ? s(l) : l), a += pe(r);
6239
6239
  }
6240
6240
  for (let h = i - t - 1; h >= t; h--) {
6241
6241
  const l = e.children[h];
6242
- ce(o, e.leaf ? s(l) : l), a += xe(o);
6242
+ re(o, e.leaf ? s(l) : l), a += pe(o);
6243
6243
  }
6244
6244
  return a;
6245
6245
  }
6246
6246
  _adjustParentBBoxes(e, t, i) {
6247
6247
  for (let n = i; n >= 0; n--)
6248
- ce(t[n], e);
6248
+ re(t[n], e);
6249
6249
  }
6250
6250
  _condense(e) {
6251
6251
  for (let t = e.length - 1, i; t >= 0; t--)
6252
6252
  e[t].children.length === 0 ? t > 0 ? (i = e[t - 1].children, i.splice(i.indexOf(e[t]), 1)) : this.clear() : Y(e[t], this.toBBox);
6253
6253
  }
6254
6254
  }
6255
- function gn(c, e, t) {
6255
+ function ln(c, e, t) {
6256
6256
  if (!t) return e.indexOf(c);
6257
6257
  for (let i = 0; i < e.length; i++)
6258
6258
  if (t(c, e[i])) return i;
6259
6259
  return -1;
6260
6260
  }
6261
6261
  function Y(c, e) {
6262
- ae(c, 0, c.children.length, e, c);
6262
+ se(c, 0, c.children.length, e, c);
6263
6263
  }
6264
- function ae(c, e, t, i, n) {
6264
+ function se(c, e, t, i, n) {
6265
6265
  n || (n = q(null)), n.minX = 1 / 0, n.minY = 1 / 0, n.maxX = -1 / 0, n.maxY = -1 / 0;
6266
6266
  for (let s = e; s < t; s++) {
6267
6267
  const r = c.children[s];
6268
- ce(n, c.leaf ? i(r) : r);
6268
+ re(n, c.leaf ? i(r) : r);
6269
6269
  }
6270
6270
  return n;
6271
6271
  }
6272
- function ce(c, e) {
6272
+ function re(c, e) {
6273
6273
  return c.minX = Math.min(c.minX, e.minX), c.minY = Math.min(c.minY, e.minY), c.maxX = Math.max(c.maxX, e.maxX), c.maxY = Math.max(c.maxY, e.maxY), c;
6274
6274
  }
6275
- function pn(c, e) {
6275
+ function dn(c, e) {
6276
6276
  return c.minX - e.minX;
6277
6277
  }
6278
- function yn(c, e) {
6278
+ function un(c, e) {
6279
6279
  return c.minY - e.minY;
6280
6280
  }
6281
- function Le(c) {
6281
+ function Me(c) {
6282
6282
  return (c.maxX - c.minX) * (c.maxY - c.minY);
6283
6283
  }
6284
- function xe(c) {
6284
+ function pe(c) {
6285
6285
  return c.maxX - c.minX + (c.maxY - c.minY);
6286
6286
  }
6287
- function fn(c, e) {
6287
+ function mn(c, e) {
6288
6288
  return (Math.max(e.maxX, c.maxX) - Math.min(e.minX, c.minX)) * (Math.max(e.maxY, c.maxY) - Math.min(e.minY, c.minY));
6289
6289
  }
6290
- function xn(c, e) {
6290
+ function gn(c, e) {
6291
6291
  const t = Math.max(c.minX, e.minX), i = Math.max(c.minY, e.minY), n = Math.min(c.maxX, e.maxX), s = Math.min(c.maxY, e.maxY);
6292
6292
  return Math.max(0, n - t) * Math.max(0, s - i);
6293
6293
  }
6294
- function Ee(c, e) {
6294
+ function Ae(c, e) {
6295
6295
  return c.minX <= e.minX && c.minY <= e.minY && e.maxX <= c.maxX && e.maxY <= c.maxY;
6296
6296
  }
6297
- function _e(c, e) {
6297
+ function ye(c, e) {
6298
6298
  return e.minX <= c.maxX && e.minY <= c.maxY && e.maxX >= c.minX && e.maxY >= c.minY;
6299
6299
  }
6300
6300
  function q(c) {
@@ -6308,21 +6308,21 @@ function q(c) {
6308
6308
  maxY: -1 / 0
6309
6309
  };
6310
6310
  }
6311
- function Qe(c, e, t, i, n) {
6311
+ function Xe(c, e, t, i, n) {
6312
6312
  const s = [e, t];
6313
6313
  for (; s.length; ) {
6314
6314
  if (t = s.pop(), e = s.pop(), t - e <= i) continue;
6315
6315
  const r = e + Math.ceil((t - e) / i / 2) * i;
6316
- wt(c, r, e, t, n), s.push(e, r, r, t);
6316
+ ct(c, r, e, t, n), s.push(e, r, r, t);
6317
6317
  }
6318
6318
  }
6319
- class _n {
6319
+ class pn {
6320
6320
  /**
6321
6321
  * Construct one instance of this class
6322
6322
  * @param name Input layer name
6323
6323
  */
6324
6324
  constructor(e) {
6325
- this._group = new Vi(), this._name = e;
6325
+ this._group = new zi(), this._name = e;
6326
6326
  }
6327
6327
  /**
6328
6328
  * Layer name
@@ -6438,13 +6438,13 @@ class _n {
6438
6438
  });
6439
6439
  }
6440
6440
  }
6441
- class bn {
6441
+ class yn {
6442
6442
  /**
6443
6443
  * Creates a new layout instance.
6444
6444
  * Initializes the layout with empty collections and a spatial index.
6445
6445
  */
6446
6446
  constructor() {
6447
- this._group = new d.Group(), this._indexTree = new mn(), this._box = new d.Box3(), this._layers = /* @__PURE__ */ new Map();
6447
+ this._group = new d.Group(), this._indexTree = new hn(), this._box = new d.Box3(), this._layers = /* @__PURE__ */ new Map();
6448
6448
  }
6449
6449
  /**
6450
6450
  * The internal THREE.js object to use by scene. This is internally used only. Try to avoid using it.
@@ -6688,10 +6688,10 @@ class bn {
6688
6688
  */
6689
6689
  getLayer(e, t = !0) {
6690
6690
  let i = this._layers.get(e);
6691
- return i === void 0 && t && (i = new _n(e), this._layers.set(e, i), this._group.add(i.internalObject)), i;
6691
+ return i === void 0 && t && (i = new pn(e), this._layers.set(e, i), this._group.add(i.internalObject)), i;
6692
6692
  }
6693
6693
  }
6694
- class wn {
6694
+ class fn {
6695
6695
  /**
6696
6696
  * Creates a new CAD scene instance.
6697
6697
  *
@@ -6771,7 +6771,7 @@ class wn {
6771
6771
  * @returns Return the newly created empty layout
6772
6772
  */
6773
6773
  addEmptyLayout(e) {
6774
- const t = new bn();
6774
+ const t = new yn();
6775
6775
  return this._layouts.set(e, t), this._scene.add(t.internalObject), t.visible = e == this._activeLayoutBtrId, t;
6776
6776
  }
6777
6777
  /**
@@ -6871,10 +6871,10 @@ class wn {
6871
6871
  }), this;
6872
6872
  }
6873
6873
  }
6874
- const Ze = {
6874
+ const $e = {
6875
6875
  background: 0
6876
6876
  };
6877
- class vn extends gi {
6877
+ class xn extends li {
6878
6878
  /**
6879
6879
  * Creates a new 2D CAD viewer instance.
6880
6880
  *
@@ -6883,33 +6883,33 @@ class vn extends gi {
6883
6883
  * @param options.calculateSizeCallback - Optional callback function to calculate canvas size on window resize
6884
6884
  * @param options.background - Optional background color as hex number (default: 0x000000)
6885
6885
  */
6886
- constructor(e = Ze) {
6886
+ constructor(e = $e) {
6887
6887
  const t = {
6888
- ...Ze,
6888
+ ...$e,
6889
6889
  ...e
6890
6890
  }, i = new d.WebGLRenderer({
6891
6891
  antialias: !0,
6892
6892
  alpha: !0,
6893
6893
  canvas: e.canvas
6894
6894
  });
6895
- t.canvas == null && (t.canvas = i.domElement), super(t.canvas), e.calculateSizeCallback && this.setCalculateSizeCallback(e.calculateSizeCallback), i.setPixelRatio(Math.min(window.devicePixelRatio, 2)), i.setSize(this.width, this.height), this._renderer = new qi(i);
6896
- const n = he.instance.fontMapping;
6895
+ t.canvas == null && (t.canvas = i.domElement), super(t.canvas), e.calculateSizeCallback && this.setCalculateSizeCallback(e.calculateSizeCallback), i.setPixelRatio(Math.min(window.devicePixelRatio, 2)), i.setSize(this.width, this.height), this._renderer = new Xi(i);
6896
+ const n = oe.instance.fontMapping;
6897
6897
  this._renderer.setFontMapping(n), this._renderer.events.fontNotFound.addEventListener((s) => {
6898
6898
  V.emit("font-not-found", {
6899
6899
  fontName: s.fontName,
6900
6900
  count: s.count ?? 0
6901
6901
  });
6902
- }), this._scene = this.createScene(), this._renderer.setClearColor(t.background || 0), this._stats = this.createStats(he.instance.isShowStats), he.instance.events.modified.addEventListener((s) => {
6902
+ }), this._scene = this.createScene(), this._renderer.setClearColor(t.background || 0), this._stats = this.createStats(oe.instance.isShowStats), oe.instance.events.modified.addEventListener((s) => {
6903
6903
  s.key == "isShowStats" && this.toggleStatsVisibility(this._stats, s.value);
6904
6904
  }), this.canvas.addEventListener("click", () => {
6905
- this.mode == O.SELECTION && this.select();
6905
+ this.mode == R.SELECTION && this.select();
6906
6906
  }), document.addEventListener("keydown", (s) => {
6907
6907
  s.code === "Escape" && this.selectionSet.clear();
6908
- }), nt().layoutManager.events.layoutSwitched.addEventListener(
6908
+ }), Je().layoutManager.events.layoutSwitched.addEventListener(
6909
6909
  (s) => {
6910
6910
  this.activeLayoutBtrId = s.layout.blockTableRecordId;
6911
6911
  }
6912
- ), this._missedImages = /* @__PURE__ */ new Map(), this._layoutViewManager = new dn(), this.initialize(), this.onWindowResize(), this.animate(), this._isDirty = !0;
6912
+ ), this._missedImages = /* @__PURE__ */ new Map(), this._layoutViewManager = new an(), this.initialize(), this.onWindowResize(), this.animate(), this._isDirty = !0;
6913
6913
  }
6914
6914
  /**
6915
6915
  * Initializes the viewer after renderer and camera are created.
@@ -6920,7 +6920,7 @@ class vn extends gi {
6920
6920
  * @protected
6921
6921
  */
6922
6922
  initialize() {
6923
- this.setCursor(de.Crosshair);
6923
+ this.setCursor(ce.Crosshair);
6924
6924
  }
6925
6925
  /**
6926
6926
  * Gets the current view mode (selection or pan).
@@ -6930,7 +6930,7 @@ class vn extends gi {
6930
6930
  */
6931
6931
  get mode() {
6932
6932
  const e = this.activeLayoutView;
6933
- return e ? e.mode : O.SELECTION;
6933
+ return e ? e.mode : R.SELECTION;
6934
6934
  }
6935
6935
  /**
6936
6936
  * Sets the view mode (selection or pan).
@@ -7065,7 +7065,7 @@ class vn extends gi {
7065
7065
  */
7066
7066
  zoomToFit() {
7067
7067
  if (this._scene.box) {
7068
- const e = rn.threeBox3dToGeBox2d(this._scene.box);
7068
+ const e = en.threeBox3dToGeBox2d(this._scene.box);
7069
7069
  this.zoomTo(e), this._isDirty = !0;
7070
7070
  }
7071
7071
  }
@@ -7177,13 +7177,13 @@ class vn extends gi {
7177
7177
  this._isDirty = this._scene.unhover([e]);
7178
7178
  }
7179
7179
  createScene() {
7180
- const e = new wn();
7180
+ const e = new fn();
7181
7181
  return e.layouts.forEach((t) => {
7182
7182
  t.setSnapObject(this.renderer.createObject());
7183
7183
  }), e;
7184
7184
  }
7185
7185
  createStats(e) {
7186
- const t = new ti();
7186
+ const t = new Zt();
7187
7187
  document.body.appendChild(t.dom);
7188
7188
  const i = t.dom;
7189
7189
  return i.style.position = "fixed", i.style.inset = "unset", i.style.bottom = "30px", i.style.right = "0px", this.toggleStatsVisibility(t, e), t;
@@ -7197,7 +7197,7 @@ class vn extends gi {
7197
7197
  */
7198
7198
  createLayoutViewIfNeeded(e) {
7199
7199
  let t = this._layoutViewManager.getAt(e);
7200
- return t == null && (t = new ln(
7200
+ return t == null && (t = new on(
7201
7201
  this._renderer,
7202
7202
  e,
7203
7203
  this.width,
@@ -7226,14 +7226,14 @@ class vn extends gi {
7226
7226
  );
7227
7227
  if (n) {
7228
7228
  n.objectId = i.objectId, n.ownerId = i.ownerId, n.layerName = i.layer, n.visible = i.visibility;
7229
- const s = !(i instanceof ot || i instanceof at);
7229
+ const s = !(i instanceof tt || i instanceof it);
7230
7230
  if (await n.draw().then(() => {
7231
7231
  this._scene.addEntity(n, s), n.dispose(), this._isDirty = !0;
7232
- }), i instanceof st) {
7232
+ }), i instanceof Ke) {
7233
7233
  if (i.number > 1) {
7234
7234
  const r = this._layoutViewManager.getAt(i.ownerId);
7235
7235
  if (r) {
7236
- const o = new Be(
7236
+ const o = new ve(
7237
7237
  r,
7238
7238
  i.toGiViewport(),
7239
7239
  this._renderer
@@ -7241,7 +7241,7 @@ class vn extends gi {
7241
7241
  r.addViewport(o);
7242
7242
  }
7243
7243
  }
7244
- } else if (i instanceof rt) {
7244
+ } else if (i instanceof et) {
7245
7245
  const r = i.imageFileName;
7246
7246
  r && this._missedImages.set(i.objectId, r);
7247
7247
  }
@@ -7249,182 +7249,7 @@ class vn extends gi {
7249
7249
  }
7250
7250
  }
7251
7251
  }
7252
- const Je = "simsun";
7253
- class Q {
7254
- /**
7255
- * Gets the singleton instance of the document creator.
7256
- *
7257
- * @returns The singleton AcApDocCreator instance
7258
- */
7259
- static get instance() {
7260
- return Q._instance || (Q._instance = new Q()), Q._instance;
7261
- }
7262
- /**
7263
- * Creates a simple example document with circular hatches.
7264
- *
7265
- * This method generates a 2x2 grid of circular hatched areas,
7266
- * useful for testing hatch rendering and basic geometry display.
7267
- *
7268
- * @param db - The database to add the example entities to
7269
- *
7270
- * @example
7271
- * ```typescript
7272
- * const creator = AcApDocCreator.instance;
7273
- * const database = new AcDbDatabase();
7274
- * creator.createExampleDoc1(database);
7275
- * // Database now contains 4 circular hatches in a grid
7276
- * ```
7277
- */
7278
- createExampleDoc1(e) {
7279
- for (let n = 0; n < 2; ++n)
7280
- for (let s = 0; s < 2; ++s) {
7281
- const r = new De(), o = new ct();
7282
- o.addVertexAt(0, { x: s * 100, y: n * 100, bulge: 1 }), o.addVertexAt(1, { x: s * 100 + 100, y: n * 100, bulge: 1 }), o.closed = !0, r.add(o), e.tables.blockTable.modelSpace.appendEntity(r);
7283
- }
7284
- }
7285
- /**
7286
- * Creates a comprehensive example document with various CAD entities.
7287
- *
7288
- * This method generates a more complex document containing:
7289
- * - Arcs and lines forming geometric shapes
7290
- * - Complex hatches with boundary loops
7291
- * - Formatted text (MText) with Chinese characters
7292
- * - Custom text styles
7293
- *
7294
- * This example is useful for testing complex rendering scenarios,
7295
- * text handling, and international character support.
7296
- *
7297
- * @param db - The database to add the example entities to
7298
- *
7299
- * @example
7300
- * ```typescript
7301
- * const creator = AcApDocCreator.instance;
7302
- * const database = new AcDbDatabase();
7303
- * creator.createExampleDoc2(database);
7304
- * // Database now contains arcs, lines, hatches, and formatted text
7305
- * ```
7306
- */
7307
- createExampleDoc2(e) {
7308
- const t = e.tables.blockTable.modelSpace;
7309
- t.appendEntity(this.createArc()), this.createLines().forEach((n) => {
7310
- e.tables.blockTable.modelSpace.appendEntity(
7311
- new ht(n.startPoint, n.endPoint)
7312
- );
7313
- }), t.appendEntity(this.createHatch()), e.tables.textStyleTable.add(this.createTextStyle()), t.appendEntity(this.createMText());
7314
- }
7315
- createTextStyle() {
7316
- const e = {
7317
- bigFont: "",
7318
- color: 16777215,
7319
- extendedFont: Je,
7320
- fixedTextHeight: 0,
7321
- font: Je,
7322
- lastHeight: 0.2,
7323
- name: "Standard",
7324
- obliqueAngle: 0,
7325
- standardFlag: 0,
7326
- textGenerationFlag: 0,
7327
- widthFactor: 0.667
7328
- };
7329
- return new lt(e);
7330
- }
7331
- createMText() {
7332
- const e = new dt();
7333
- return e.attachmentPoint = It.MiddleLeft, e.color = new Re().setColorName("red"), e.layer = "0", e.location = new ze(9850, 86773, 0), e.contents = "{\\W0.667;\\T1.1;智慧8081}", e.height = 200, e.width = 1e3, e.styleName = "Standard", e;
7334
- }
7335
- createHatch() {
7336
- const e = this.createLines(), t = new De(), i = new ut();
7337
- return i.add(
7338
- new mt(
7339
- { x: 20241.23355899991, y: 174118.6312674369 },
7340
- 89258.30757455899,
7341
- re.degToRad(262.2471115358437),
7342
- re.degToRad(264.444541053754),
7343
- !1
7344
- )
7345
- ), e.forEach((n) => {
7346
- i.add(new gt(n.startPoint, n.endPoint));
7347
- }), t.add(i), t;
7348
- }
7349
- createArc() {
7350
- return new pt(
7351
- { x: 20241.23355899991, y: 174118.6312674369, z: 0 },
7352
- 89258.30757455899,
7353
- re.degToRad(262.2471115358437),
7354
- re.degToRad(264.444541053754)
7355
- );
7356
- }
7357
- createLines() {
7358
- const e = [];
7359
- return e.push(
7360
- new K(
7361
- {
7362
- x: 11600.20888122753,
7363
- y: 85279.57362051727,
7364
- z: 0
7365
- },
7366
- {
7367
- x: 11600.20890652924,
7368
- y: 86546.03982284805,
7369
- z: 0
7370
- }
7371
- )
7372
- ), e.push(
7373
- new K(
7374
- {
7375
- x: 11600.20890652924,
7376
- y: 86546.03982284805,
7377
- z: 0
7378
- },
7379
- {
7380
- x: 10850.20885583921,
7381
- y: 86546.03980174381,
7382
- z: 0
7383
- }
7384
- )
7385
- ), e.push(
7386
- new K(
7387
- {
7388
- x: 10850.2088602169,
7389
- y: 86546.03967292747,
7390
- z: 0
7391
- },
7392
- {
7393
- x: 9050.208860216895,
7394
- y: 86546.039672927,
7395
- z: 0
7396
- }
7397
- )
7398
- ), e.push(
7399
- new K(
7400
- {
7401
- x: 9050.208855839213,
7402
- y: 86546.0397510943,
7403
- z: 0
7404
- },
7405
- {
7406
- x: 8200.209067034302,
7407
- y: 86546.039727177,
7408
- z: 0
7409
- }
7410
- )
7411
- ), e.push(
7412
- new K(
7413
- {
7414
- x: 8200.209067034302,
7415
- y: 86546.039727177,
7416
- z: 0
7417
- },
7418
- {
7419
- x: 8200.209067033837,
7420
- y: 85676.22514764359,
7421
- z: 0
7422
- }
7423
- )
7424
- ), e;
7425
- }
7426
- }
7427
- class Sn {
7252
+ class _n {
7428
7253
  /**
7429
7254
  * Creates a new font loader instance.
7430
7255
  *
@@ -7466,7 +7291,7 @@ class Sn {
7466
7291
  await this.getAvaiableFonts();
7467
7292
  const t = [];
7468
7293
  e.forEach((n) => {
7469
- const s = n.toLowerCase(), r = Jt(this._avaiableFonts, (o) => Kt(o.name, (a) => a.toLowerCase() == s) >= 0);
7294
+ const s = n.toLowerCase(), r = Ht(this._avaiableFonts, (o) => qt(o.name, (a) => a.toLowerCase() == s) >= 0);
7470
7295
  r && t.push(r.url);
7471
7296
  }), (await this._cadRenderer.loadFonts(t)).forEach((n) => {
7472
7297
  n.status || V.emit("font-not-loaded", {
@@ -7493,7 +7318,7 @@ class C {
7493
7318
  /** Fired when a document becomes active */
7494
7319
  documentActivated: new M()
7495
7320
  };
7496
- const t = new pi();
7321
+ const t = new di();
7497
7322
  t.database.events.openProgress.addEventListener((s) => {
7498
7323
  V.emit("open-file-progress", {
7499
7324
  database: t.database,
@@ -7506,8 +7331,8 @@ class C {
7506
7331
  const i = () => ({
7507
7332
  width: window.innerWidth,
7508
7333
  height: window.innerHeight - 30
7509
- }), n = new vn({ canvas: e, calculateSizeCallback: i });
7510
- this._context = new ii(n, t), this._fontLoader = new Sn(n.renderer), nt().workingDatabase = t.database, this.registerCommands();
7334
+ }), n = new xn({ canvas: e, calculateSizeCallback: i });
7335
+ this._context = new Jt(n, t), this._fontLoader = new _n(n.renderer), Je().workingDatabase = t.database, this.registerCommands();
7511
7336
  }
7512
7337
  /**
7513
7338
  * Creates the singleton instance with an optional canvas element.
@@ -7638,18 +7463,6 @@ class C {
7638
7463
  async loadDefaultFonts(e) {
7639
7464
  e == null ? await this._fontLoader.load(["simkai"]) : await this._fontLoader.load(e);
7640
7465
  }
7641
- /**
7642
- * Creates an example CAD document with sample content.
7643
- *
7644
- * This method asynchronously loads default fonts, creates example drawing content,
7645
- * sets up layout information, and zooms the view to fit the content.
7646
- * The creation is performed after a short delay to ensure proper initialization.
7647
- */
7648
- createExampleDoc() {
7649
- setTimeout(async () => {
7650
- Q.instance.createExampleDoc2(this.curDocument.database), this.setLayoutInfo(), this.curView.zoomToFit();
7651
- });
7652
- }
7653
7466
  /**
7654
7467
  * Opens a CAD document from a URL.
7655
7468
  *
@@ -7720,37 +7533,37 @@ class C {
7720
7533
  A.SYSTEMT_COMMAND_GROUP_NAME,
7721
7534
  "pan",
7722
7535
  "pan",
7723
- new Ci()
7536
+ new Ii()
7724
7537
  ), e.addCommand(
7725
7538
  A.SYSTEMT_COMMAND_GROUP_NAME,
7726
7539
  "select",
7727
7540
  "select",
7728
- new Ii()
7541
+ new bi()
7729
7542
  ), e.addCommand(
7730
7543
  A.SYSTEMT_COMMAND_GROUP_NAME,
7731
7544
  "zoom",
7732
7545
  "zoom",
7733
- new Bi()
7546
+ new wi()
7734
7547
  ), e.addCommand(
7735
7548
  A.SYSTEMT_COMMAND_GROUP_NAME,
7736
7549
  "zoomw",
7737
7550
  "zoomw",
7738
- new Ai()
7551
+ new Si()
7739
7552
  ), e.addCommand(
7740
7553
  A.SYSTEMT_COMMAND_GROUP_NAME,
7741
7554
  "csvg",
7742
7555
  "csvg",
7743
- new wi()
7556
+ new fi()
7744
7557
  ), e.addCommand(
7745
7558
  A.SYSTEMT_COMMAND_GROUP_NAME,
7746
7559
  "qnew",
7747
7560
  "qnew",
7748
- new Si()
7561
+ new _i()
7749
7562
  ), e.addCommand(
7750
7563
  A.SYSTEMT_COMMAND_GROUP_NAME,
7751
7564
  "open",
7752
7565
  "open",
7753
- new vi()
7566
+ new xi()
7754
7567
  );
7755
7568
  }
7756
7569
  /**
@@ -7771,6 +7584,16 @@ class C {
7771
7584
  const i = A.instance.lookupGlobalCmd(e);
7772
7585
  i == null || i.execute(this.context);
7773
7586
  }
7587
+ /**
7588
+ * Configures layout information for the current view.
7589
+ *
7590
+ * Sets up the active layout block table record ID and model space block table
7591
+ * record ID based on the current document's space configuration.
7592
+ */
7593
+ setActiveLayout() {
7594
+ const e = this.curView;
7595
+ e.activeLayoutBtrId = this.curDocument.database.currentSpaceId, e.modelSpaceBtrId = this.curDocument.database.currentSpaceId;
7596
+ }
7774
7597
  /**
7775
7598
  * Performs cleanup operations before opening a new document.
7776
7599
  *
@@ -7795,7 +7618,7 @@ class C {
7795
7618
  onAfterOpenDocument(e) {
7796
7619
  if (e) {
7797
7620
  const t = this.context.doc;
7798
- this.events.documentActivated.dispatch({ doc: t }), this.setLayoutInfo();
7621
+ this.events.documentActivated.dispatch({ doc: t }), this.setActiveLayout();
7799
7622
  const i = t.database;
7800
7623
  this.curView.zoomTo(new L(i.extmin, i.extmax));
7801
7624
  }
@@ -7814,20 +7637,8 @@ class C {
7814
7637
  setOptions(e) {
7815
7638
  return e == null ? e = { fontLoader: this._fontLoader } : e.fontLoader == null && (e.fontLoader = this._fontLoader), e;
7816
7639
  }
7817
- /**
7818
- * Configures layout information for the current view.
7819
- *
7820
- * This private method sets up the active layout block table record ID and
7821
- * model space block table record ID based on the current document's space configuration.
7822
- *
7823
- * @private
7824
- */
7825
- setLayoutInfo() {
7826
- const e = this.curView;
7827
- e.activeLayoutBtrId = this.curDocument.database.currentSpaceId, e.modelSpaceBtrId = this.curDocument.database.currentSpaceId;
7828
- }
7829
7640
  }
7830
- class Ke {
7641
+ class Ye {
7831
7642
  convert(e) {
7832
7643
  const t = this.createEntity(e);
7833
7644
  return t && this.processCommonAttrs(e, t), t;
@@ -7841,7 +7652,7 @@ class Ke {
7841
7652
  return e.type == "ARC" ? this.convertArc(e) : e.type == "CIRCLE" ? this.convertCirle(e) : e.type == "DIMENSION" ? this.convertDimension(e) : e.type == "ELLIPSE" ? this.convertEllipse(e) : e.type == "HATCH" ? this.convertHatch(e) : e.type == "IMAGE" ? this.convertImage(e) : e.type == "LEADER" ? this.convertLeader(e) : e.type == "LINE" ? this.convertLine(e) : e.type == "LWPOLYLINE" ? this.convertLWPolyline(e) : e.type == "MTEXT" ? this.convertMText(e) : e.type == "POINT" ? this.convertPoint(e) : e.type == "POLYLINE" ? this.convertPolyline(e) : e.type == "RAY" ? this.convertRay(e) : e.type == "SPLINE" ? this.convertSpline(e) : e.type == "ACAD_TABLE" ? this.convertTable(e) : e.type == "TEXT" ? this.convertText(e) : e.type == "SOLID" ? this.convertSolid(e) : e.type == "VIEWPORT" ? this.convertViewport(e) : e.type == "XLINE" ? this.convertXline(e) : e.type == "INSERT" ? this.convertBlockReference(e) : null;
7842
7653
  }
7843
7654
  convertArc(e) {
7844
- return new pt(
7655
+ return new vt(
7845
7656
  e.center,
7846
7657
  e.radius,
7847
7658
  e.startAngle,
@@ -7849,13 +7660,13 @@ class Ke {
7849
7660
  );
7850
7661
  }
7851
7662
  convertCirle(e) {
7852
- return new Pt(e.center, e.radius);
7663
+ return new St(e.center, e.radius);
7853
7664
  }
7854
7665
  convertEllipse(e) {
7855
- const t = new be(e.majorAxisEndPoint), i = t.length();
7856
- return new Rt(
7666
+ const t = new fe(e.majorAxisEndPoint), i = t.length();
7667
+ return new It(
7857
7668
  e.center,
7858
- be.Z_AXIS,
7669
+ fe.Z_AXIS,
7859
7670
  t,
7860
7671
  i,
7861
7672
  i * e.axisRatio,
@@ -7865,19 +7676,19 @@ class Ke {
7865
7676
  }
7866
7677
  convertLine(e) {
7867
7678
  const t = e.startPoint, i = e.endPoint;
7868
- return new ht(
7679
+ return new Bt(
7869
7680
  new ze(t.x, t.y, t.z),
7870
7681
  new ze(i.x, i.y, i.z)
7871
7682
  );
7872
7683
  }
7873
7684
  convertSpline(e) {
7874
- return e.numberOfControlPoints > 0 && e.numberOfKnots > 0 ? new Ge(
7685
+ return e.numberOfControlPoints > 0 && e.numberOfKnots > 0 ? new Pe(
7875
7686
  e.controlPoints,
7876
7687
  e.knots,
7877
7688
  e.weights,
7878
7689
  e.degree,
7879
7690
  !!(e.flag & 1)
7880
- ) : e.numberOfFitPoints > 0 ? new Ge(
7691
+ ) : e.numberOfFitPoints > 0 ? new Pe(
7881
7692
  e.fitPoints,
7882
7693
  "Uniform",
7883
7694
  e.degree,
@@ -7885,18 +7696,18 @@ class Ke {
7885
7696
  ) : null;
7886
7697
  }
7887
7698
  convertPoint(e) {
7888
- const t = new Ot();
7699
+ const t = new Mt();
7889
7700
  return t.position = e.position, t;
7890
7701
  }
7891
7702
  convertSolid(e) {
7892
- const t = new Vt();
7703
+ const t = new At();
7893
7704
  return t.setPointAt(0, { ...e.corner1, z: 0 }), t.setPointAt(1, { ...e.corner2, z: 0 }), t.setPointAt(2, { ...e.corner3, z: 0 }), t.setPointAt(
7894
7705
  3,
7895
7706
  e.corner4 ? { ...e.corner4, z: 0 } : { ...e.corner3, z: 0 }
7896
7707
  ), t.thickness = e.thickness, t;
7897
7708
  }
7898
7709
  convertLWPolyline(e) {
7899
- const t = new ke();
7710
+ const t = new Oe();
7900
7711
  return t.closed = !!(e.flag & 512), e.vertices.forEach((i, n) => {
7901
7712
  t.addVertexAt(
7902
7713
  n,
@@ -7908,7 +7719,7 @@ class Ke {
7908
7719
  }), t;
7909
7720
  }
7910
7721
  convertPolyline(e) {
7911
- const t = new ke();
7722
+ const t = new Oe();
7912
7723
  return t.closed = !!(e.flag & 1), e.vertices.forEach((i, n) => {
7913
7724
  t.addVertexAt(
7914
7725
  n,
@@ -7921,7 +7732,7 @@ class Ke {
7921
7732
  }
7922
7733
  convertHatch(e) {
7923
7734
  var t;
7924
- const i = new De();
7735
+ const i = new Ct();
7925
7736
  return (t = e.definitionLines) == null || t.forEach((n) => {
7926
7737
  i.definitionLines.push({
7927
7738
  angle: n.angle,
@@ -7931,7 +7742,7 @@ class Ke {
7931
7742
  });
7932
7743
  }), i.hatchStyle = e.hatchStyle, i.patternName = e.patternName, i.patternType = e.patternType, i.patternAngle = e.patternAngle == null ? 0 : e.patternAngle, i.patternScale = e.patternScale == null ? 0 : e.patternScale, e.boundaryPaths.forEach((n) => {
7933
7744
  if (n.boundaryPathTypeFlag & 2) {
7934
- const s = n, r = new ct();
7745
+ const s = n, r = new Lt();
7935
7746
  r.closed = s.isClosed, s.vertices.forEach((o, a) => {
7936
7747
  r.addVertexAt(a, {
7937
7748
  x: o.x,
@@ -7940,15 +7751,15 @@ class Ke {
7940
7751
  });
7941
7752
  }), i.add(r);
7942
7753
  } else {
7943
- const s = n, r = new ut();
7754
+ const s = n, r = new Et();
7944
7755
  s.edges.forEach((o) => {
7945
7756
  if (o.type == 1) {
7946
7757
  const a = o;
7947
- r.add(new gt(a.start, a.end));
7758
+ r.add(new Tt(a.start, a.end));
7948
7759
  } else if (o.type == 2) {
7949
7760
  const a = o;
7950
7761
  r.add(
7951
- new mt(
7762
+ new Dt(
7952
7763
  a.center,
7953
7764
  a.radius,
7954
7765
  a.startAngle,
@@ -7958,14 +7769,14 @@ class Ke {
7958
7769
  );
7959
7770
  } else if (o.type == 3) {
7960
7771
  const a = o;
7961
- new Te().subVectors(a.end, a.center);
7772
+ new Ce().subVectors(a.end, a.center);
7962
7773
  const h = Math.sqrt(
7963
7774
  Math.pow(a.end.x, 2) + Math.pow(a.end.y, 2)
7964
7775
  ), l = h * a.lengthOfMinorAxis;
7965
7776
  let m = a.startAngle, u = a.endAngle;
7966
7777
  const p = Math.atan2(a.end.y, a.end.x);
7967
7778
  a.isCCW || (m = Math.PI * 2 - m, u = Math.PI * 2 - u), r.add(
7968
- new jt(
7779
+ new zt(
7969
7780
  { ...a.center, z: 0 },
7970
7781
  h,
7971
7782
  l,
@@ -7988,7 +7799,7 @@ class Ke {
7988
7799
  let l = !0;
7989
7800
  const m = a.controlPoints.map((u) => (u.weight == null && (l = !1), u.weight || 1));
7990
7801
  r.add(
7991
- new Fe(
7802
+ new Re(
7992
7803
  h,
7993
7804
  a.knots,
7994
7805
  l ? m : void 0
@@ -8000,7 +7811,7 @@ class Ke {
8000
7811
  y: l.y,
8001
7812
  z: 0
8002
7813
  }));
8003
- r.add(new Fe(h, "Uniform"));
7814
+ r.add(new Re(h, "Uniform"));
8004
7815
  }
8005
7816
  }
8006
7817
  }), i.add(r);
@@ -8008,7 +7819,7 @@ class Ke {
8008
7819
  }), i;
8009
7820
  }
8010
7821
  convertTable(e) {
8011
- const t = new Gt(
7822
+ const t = new Pt(
8012
7823
  e.name,
8013
7824
  e.rowCount,
8014
7825
  e.columnCount
@@ -8022,29 +7833,29 @@ class Ke {
8022
7833
  }), t;
8023
7834
  }
8024
7835
  convertText(e) {
8025
- const t = new kt();
7836
+ const t = new Ot();
8026
7837
  return t.textString = e.text, t.styleName = e.styleName, t.height = e.textHeight, t.position.copy(e.startPoint), t.rotation = e.rotation, t.oblique = e.obliqueAngle ?? 0, t.thickness = e.thickness, t.horizontalMode = e.halign, t.verticalMode = e.valign, t.widthFactor = e.xScale ?? 1, t;
8027
7838
  }
8028
7839
  convertMText(e) {
8029
- const t = new dt();
8030
- return t.contents = e.text, e.styleName != null && (t.styleName = e.styleName), t.height = e.textHeight, t.width = e.rectWidth, t.rotation = e.rotation || 0, t.location = e.insertionPoint, t.attachmentPoint = e.attachmentPoint, e.direction && (t.direction = new be(e.direction)), t.drawingDirection = e.drawingDirection, t;
7840
+ const t = new Rt();
7841
+ return t.contents = e.text, e.styleName != null && (t.styleName = e.styleName), t.height = e.textHeight, t.width = e.rectWidth, t.rotation = e.rotation || 0, t.location = e.insertionPoint, t.attachmentPoint = e.attachmentPoint, e.direction && (t.direction = new fe(e.direction)), t.drawingDirection = e.drawingDirection, t;
8031
7842
  }
8032
7843
  convertLeader(e) {
8033
- const t = new Ft();
7844
+ const t = new Vt();
8034
7845
  return e.vertices.forEach((i) => {
8035
7846
  t.appendVertex(i);
8036
7847
  }), t.hasArrowHead = e.isArrowheadEnabled, t.hasHookLine = e.isHooklineExists, t.isSplined = e.isSpline, t.dimensionStyle = e.styleName, t.annoType = e.leaderCreationFlag, t;
8037
7848
  }
8038
7849
  convertDimension(e) {
8039
7850
  if (e.subclassMarker == "AcDbAlignedDimension" || e.subclassMarker == "AcDbRotatedDimension") {
8040
- const t = e, i = new Nt(
7851
+ const t = e, i = new jt(
8041
7852
  t.subDefinitionPoint1,
8042
7853
  t.subDefinitionPoint2,
8043
7854
  t.definitionPoint
8044
7855
  );
8045
7856
  return i.rotation = t.rotationAngle, this.processDimensionCommonAttrs(e, i), i;
8046
7857
  } else if (e.subclassMarker == "AcDb3PointAngularDimension") {
8047
- const t = e, i = new Ut(
7858
+ const t = e, i = new Gt(
8048
7859
  t.centerPoint,
8049
7860
  t.subDefinitionPoint1,
8050
7861
  t.subDefinitionPoint2,
@@ -8052,20 +7863,20 @@ class Ke {
8052
7863
  );
8053
7864
  return this.processDimensionCommonAttrs(e, i), i;
8054
7865
  } else if (e.subclassMarker == "AcDbOrdinateDimension") {
8055
- const t = e, i = new Wt(
7866
+ const t = e, i = new kt(
8056
7867
  t.subDefinitionPoint1,
8057
7868
  t.subDefinitionPoint2
8058
7869
  );
8059
7870
  return this.processDimensionCommonAttrs(e, i), i;
8060
7871
  } else if (e.subclassMarker == "AcDbRadialDimension") {
8061
- const t = e, i = new Xt(
7872
+ const t = e, i = new Nt(
8062
7873
  t.definitionPoint,
8063
7874
  t.centerPoint,
8064
7875
  t.leaderLength
8065
7876
  );
8066
7877
  return this.processDimensionCommonAttrs(e, i), i;
8067
7878
  } else if (e.subclassMarker == "AcDbDiametricDimension") {
8068
- const t = e, i = new $t(
7879
+ const t = e, i = new Ft(
8069
7880
  t.definitionPoint,
8070
7881
  t.centerPoint,
8071
7882
  t.leaderLength
@@ -8084,7 +7895,7 @@ class Ke {
8084
7895
  ) * e.imageSize.y, t.rotation = Math.atan2(e.uPixel.y, e.uPixel.x);
8085
7896
  }
8086
7897
  convertImage(e) {
8087
- const t = new rt();
7898
+ const t = new et();
8088
7899
  return this.processImage(e, t), t;
8089
7900
  }
8090
7901
  // private convertWipeout(wipeout: WipeoutEntity) {
@@ -8093,19 +7904,19 @@ class Ke {
8093
7904
  // return dbWipeout
8094
7905
  // }
8095
7906
  convertViewport(e) {
8096
- const t = new st();
7907
+ const t = new Ke();
8097
7908
  return t.number = e.viewportId, t.centerPoint.copy(e.viewportCenter), t.height = e.height, t.width = e.width, t.viewCenter.copy(e.displayCenter), t.viewHeight = e.viewHeight, t;
8098
7909
  }
8099
7910
  convertRay(e) {
8100
- const t = new ot();
7911
+ const t = new tt();
8101
7912
  return t.basePoint.copy(e.firstPoint), t.unitDir.copy(e.unitDirection), t;
8102
7913
  }
8103
7914
  convertXline(e) {
8104
- const t = new at();
7915
+ const t = new it();
8105
7916
  return t.basePoint.copy(e.firstPoint), t.unitDir.copy(e.unitDirection), t;
8106
7917
  }
8107
7918
  convertBlockReference(e) {
8108
- const t = new Yt(e.name);
7919
+ const t = new Ut(e.name);
8109
7920
  return e.insertionPoint && t.position.copy(e.insertionPoint), t.scaleFactors.x = e.xScale, t.scaleFactors.y = e.yScale, t.scaleFactors.z = e.zScale, t.rotation = e.rotation, t.normal.copy(e.extrusionDirection), t;
8110
7921
  }
8111
7922
  processDimensionCommonAttrs(e, t) {
@@ -8115,13 +7926,13 @@ class Ke {
8115
7926
  t.layer = e.layer, t.objectId = e.handle.toString(), t.ownerId = e.ownerBlockRecordSoftId.toString(), e.lineType != null && (t.lineType = e.lineType), e.lineweight != null && (t.lineWeight = e.lineweight), e.lineTypeScale != null && (t.linetypeScale = e.lineTypeScale), e.color != null && (t.color.color = e.color), e.colorIndex != null && (t.color.colorIndex = e.colorIndex), e.colorName != null && (t.color.colorName = e.colorName), e.isVisible != null && (t.visibility = e.isVisible), e.transparency != null && (t.transparency = e.transparency);
8116
7927
  }
8117
7928
  }
8118
- class In extends Bt {
7929
+ class bn extends ut {
8119
7930
  constructor(e = {}) {
8120
7931
  super(e), e.useWorker = !0, e.parserWorkerUrl || (e.parserWorkerUrl = "/assets/libredwg-parser-worker.js");
8121
7932
  }
8122
7933
  async parse(e) {
8123
7934
  if (this.config.useWorker && this.config.parserWorkerUrl) {
8124
- const t = Mt({
7935
+ const t = mt({
8125
7936
  workerUrl: this.config.parserWorkerUrl,
8126
7937
  // One concurrent worker needed for parser
8127
7938
  maxConcurrentWorkers: 1
@@ -8184,13 +7995,13 @@ class In extends Bt {
8184
7995
  standardFlag: i.standardFlag,
8185
7996
  totalPatternLength: i.totalPatternLength,
8186
7997
  pattern: i.pattern
8187
- }, s = new At(n);
7998
+ }, s = new gt(n);
8188
7999
  this.processCommonTableEntryAttrs(i, s), s.name = i.name, t.tables.linetypeTable.add(s);
8189
8000
  });
8190
8001
  }
8191
8002
  processTextStyles(e, t) {
8192
8003
  e.tables.STYLE.entries.forEach((i) => {
8193
- const n = new lt(i);
8004
+ const n = new pt(i);
8194
8005
  this.processCommonTableEntryAttrs(i, n), t.tables.textStyleTable.add(n);
8195
8006
  });
8196
8007
  }
@@ -8270,15 +8081,15 @@ class In extends Bt {
8270
8081
  // TODO: Set correct value
8271
8082
  dimlwd: i.DIMLWD,
8272
8083
  dimlwe: i.DIMLWE
8273
- }, s = new Ct(n);
8084
+ }, s = new yt(n);
8274
8085
  this.processCommonTableEntryAttrs(i, s), t.tables.dimStyleTable.add(s);
8275
8086
  });
8276
8087
  }
8277
8088
  processLayers(e, t) {
8278
8089
  e.tables.LAYER.entries.forEach((i) => {
8279
- const n = new Re();
8090
+ const n = new Qe();
8280
8091
  n.colorIndex = i.colorIndex;
8281
- const s = new Lt({
8092
+ const s = new ft({
8282
8093
  name: i.name,
8283
8094
  standardFlags: i.standardFlag,
8284
8095
  linetype: i.lineType,
@@ -8292,20 +8103,20 @@ class In extends Bt {
8292
8103
  }
8293
8104
  processViewports(e, t) {
8294
8105
  e.tables.VPORT.entries.forEach((i) => {
8295
- const n = new Et();
8106
+ const n = new xt();
8296
8107
  this.processCommonTableEntryAttrs(i, n), i.circleSides && (n.circleSides = i.circleSides), n.standardFlag = i.standardFlag, n.center.copy(i.center), n.lowerLeftCorner.copy(i.lowerLeftCorner), n.upperRightCorner.copy(i.upperRightCorner), i.snapBasePoint && n.snapBase.copy(i.snapBasePoint), i.snapRotationAngle && (n.snapAngle = i.snapRotationAngle), i.snapSpacing && n.snapIncrements.copy(i.snapSpacing), i.majorGridLines && (n.gridMajor = i.majorGridLines), i.gridSpacing && n.gridIncrements.copy(i.gridSpacing), i.backgroundObjectId && (n.backgroundObjectId = i.backgroundObjectId), n.gsView.center.copy(i.center), n.gsView.viewDirectionFromTarget.copy(i.viewDirectionFromTarget), n.gsView.viewTarget.copy(i.viewTarget), i.lensLength && (n.gsView.lensLength = i.lensLength), i.frontClippingPlane && (n.gsView.frontClippingPlane = i.frontClippingPlane), i.backClippingPlane && (n.gsView.backClippingPlane = i.backClippingPlane), i.viewHeight && (n.gsView.viewHeight = i.viewHeight), i.viewTwistAngle && (n.gsView.viewTwistAngle = i.viewTwistAngle), i.frozenLayers && (n.gsView.frozenLayers = i.frozenLayers), i.styleSheet && (n.gsView.styleSheet = i.styleSheet), i.renderMode && (n.gsView.renderMode = i.renderMode), i.viewMode && (n.gsView.viewMode = i.viewMode), i.ucsIconSetting && (n.gsView.ucsIconSetting = i.ucsIconSetting), i.ucsOrigin && n.gsView.ucsOrigin.copy(i.ucsOrigin), i.ucsXAxis && n.gsView.ucsXAxis.copy(i.ucsXAxis), i.ucsYAxis && n.gsView.ucsYAxis.copy(i.ucsYAxis), i.orthographicType && (n.gsView.orthographicType = i.orthographicType), i.shadePlotSetting && (n.gsView.shadePlotSetting = i.shadePlotSetting), i.shadePlotObjectId && (n.gsView.shadePlotObjectId = i.shadePlotObjectId), i.visualStyleObjectId && (n.gsView.visualStyleObjectId = i.visualStyleObjectId), i.isDefaultLightingOn && (n.gsView.isDefaultLightingOn = i.isDefaultLightingOn), i.defaultLightingType && (n.gsView.defaultLightingType = i.defaultLightingType), i.brightness && (n.gsView.brightness = i.brightness), i.contrast && (n.gsView.contrast = i.contrast), i.ambientColor && (n.gsView.ambientColor = i.ambientColor), t.tables.viewportTable.add(n);
8297
8108
  });
8298
8109
  }
8299
8110
  processBlockTables(e, t) {
8300
8111
  e.tables.BLOCK_RECORD.entries.forEach((i) => {
8301
8112
  let n = t.tables.blockTable.getAt(i.name);
8302
- n || (n = new Tt(), n.objectId = i.handle.toString(), n.name = i.name, n.ownerId = i.ownerHandle.toString(), n.origin.copy(i.basePoint), n.layoutId = i.layout.toString(), t.tables.blockTable.add(n)), !n.isModelSapce && !n.isPaperSapce && i.entities && i.entities.length > 0 && this.processEntitiesInBlock(i.entities, n);
8113
+ n || (n = new _t(), n.objectId = i.handle.toString(), n.name = i.name, n.ownerId = i.ownerHandle.toString(), n.origin.copy(i.basePoint), n.layoutId = i.layout.toString(), t.tables.blockTable.add(n)), !n.isModelSapce && !n.isPaperSapce && i.entities && i.entities.length > 0 && this.processEntitiesInBlock(i.entities, n);
8303
8114
  });
8304
8115
  }
8305
8116
  processBlocks(e, t) {
8306
8117
  }
8307
8118
  async processEntitiesInBlock(e, t) {
8308
- const i = new Ke(), n = e.length, s = [];
8119
+ const i = new Ye(), n = e.length, s = [];
8309
8120
  for (let r = 0; r < n; r++) {
8310
8121
  const o = e[r], a = i.convert(o);
8311
8122
  a && s.push(a);
@@ -8318,9 +8129,9 @@ class In extends Bt {
8318
8129
  * smaller pieces and executed in small intervals to allow the UI to remain responsive.
8319
8130
  */
8320
8131
  async processEntities(e, t, i, n, s) {
8321
- const r = new Ke();
8132
+ const r = new Ye();
8322
8133
  let o = e.entities;
8323
- const a = o.length, h = new Dt(
8134
+ const a = o.length, h = new bt(
8324
8135
  a,
8325
8136
  100 - n.value,
8326
8137
  i
@@ -8352,7 +8163,7 @@ class In extends Bt {
8352
8163
  processLayouts(e, t) {
8353
8164
  const i = t.dictionaries.layouts;
8354
8165
  e.objects.LAYOUT.forEach((n) => {
8355
- const s = new tt();
8166
+ const s = new qe();
8356
8167
  s.layoutName = n.layoutName, s.tabOrder = n.tabOrder;
8357
8168
  const r = t.tables.blockTable.newIterator();
8358
8169
  s.objectId = n.handle.toString();
@@ -8367,7 +8178,7 @@ class In extends Bt {
8367
8178
  processImageDefs(e, t) {
8368
8179
  const i = t.dictionaries.imageDefs;
8369
8180
  e.objects.IMAGEDEF.forEach((n) => {
8370
- const s = new zt();
8181
+ const s = new wt();
8371
8182
  s.sourceFileName = n.fileName, this.processCommonObjectAttrs(n, s), i.setAt(s.objectId, s);
8372
8183
  });
8373
8184
  }
@@ -8394,42 +8205,42 @@ class In extends Bt {
8394
8205
  return i.flatMap((n) => t[n]);
8395
8206
  }
8396
8207
  }
8397
- function Bn() {
8208
+ function wn() {
8398
8209
  try {
8399
- const c = new Ht({
8210
+ const c = new Wt({
8400
8211
  convertByEntityType: !1,
8401
8212
  useWorker: !0,
8402
8213
  parserWorkerUrl: "./assets/dxf-parser-worker.js"
8403
8214
  });
8404
- Ne.instance.register(ve.DXF, c);
8215
+ Ve.instance.register(_e.DXF, c);
8405
8216
  } catch (c) {
8406
8217
  console.error("Failed to register dxf converter: ", c);
8407
8218
  }
8408
8219
  try {
8409
- const c = new In({
8220
+ const c = new bn({
8410
8221
  convertByEntityType: !1,
8411
8222
  useWorker: !0,
8412
8223
  parserWorkerUrl: "./assets/libredwg-parser-worker.js"
8413
8224
  });
8414
- Ne.instance.register(ve.DWG, c);
8225
+ Ve.instance.register(_e.DWG, c);
8415
8226
  } catch (c) {
8416
8227
  console.error("Failed to register dwg converter: ", c);
8417
8228
  }
8418
8229
  }
8419
- function Pn() {
8420
- Bn(), typeof window < "u" && !!window.location && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") ? Pe.getInstance().initialize(
8230
+ function En() {
8231
+ wn(), typeof window < "u" && !!window.location && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") ? Le.getInstance().initialize(
8421
8232
  "/assets/mtext-renderer-worker.js"
8422
- ) : Pe.getInstance().initialize("./mtext-renderer-worker.js");
8233
+ ) : Le.getInstance().initialize("./mtext-renderer-worker.js");
8423
8234
  }
8424
- const Mn = {
8235
+ const vn = {
8425
8236
  isDebug: !1,
8426
8237
  isShowCommandLine: !0,
8427
8238
  isShowCoordinate: !0,
8428
8239
  isShowToolbar: !0,
8429
8240
  isShowStats: !1,
8430
8241
  fontMapping: {}
8431
- }, et = "settings";
8432
- class he {
8242
+ }, He = "settings";
8243
+ class oe {
8433
8244
  constructor() {
8434
8245
  this.events = {
8435
8246
  /** Fired when any setting is modified */
@@ -8444,7 +8255,7 @@ class he {
8444
8255
  * @returns The singleton settings manager instance
8445
8256
  */
8446
8257
  static get instance() {
8447
- return this._instance || (this._instance = new he()), this._instance;
8258
+ return this._instance || (this._instance = new oe()), this._instance;
8448
8259
  }
8449
8260
  /**
8450
8261
  * Sets a setting value and persists it to localStorage.
@@ -8463,7 +8274,7 @@ class he {
8463
8274
  */
8464
8275
  set(e, t) {
8465
8276
  const i = this.settings;
8466
- i[e] = t, localStorage.setItem(et, JSON.stringify(i)), this.events.modified.dispatch({
8277
+ i[e] = t, localStorage.setItem(He, JSON.stringify(i)), this.events.modified.dispatch({
8467
8278
  key: e,
8468
8279
  value: t
8469
8280
  });
@@ -8618,36 +8429,36 @@ class he {
8618
8429
  * @returns The current settings object
8619
8430
  */
8620
8431
  get settings() {
8621
- const e = localStorage.getItem(et), t = e == null ? {} : JSON.parse(e);
8622
- return ei(t, Mn);
8432
+ const e = localStorage.getItem(He), t = e == null ? {} : JSON.parse(e);
8433
+ return Qt(t, vn);
8623
8434
  }
8624
8435
  }
8625
8436
  export {
8626
- ii as AcApContext,
8627
- wi as AcApConvertToSvgCmd,
8437
+ Jt as AcApContext,
8438
+ fi as AcApConvertToSvgCmd,
8628
8439
  C as AcApDocManager,
8629
- pi as AcApDocument,
8630
- vi as AcApOpenCmd,
8631
- Ci as AcApPanCmd,
8632
- Si as AcApQNewCmd,
8633
- Ii as AcApSelectCmd,
8634
- he as AcApSettingManager,
8635
- Bi as AcApZoomCmd,
8636
- Ai as AcApZoomToBoxCmd,
8637
- Mi as AcApZoomToBoxJig,
8638
- gi as AcEdBaseView,
8440
+ di as AcApDocument,
8441
+ xi as AcApOpenCmd,
8442
+ Ii as AcApPanCmd,
8443
+ _i as AcApQNewCmd,
8444
+ bi as AcApSelectCmd,
8445
+ oe as AcApSettingManager,
8446
+ wi as AcApZoomCmd,
8447
+ Si as AcApZoomToBoxCmd,
8448
+ vi as AcApZoomToBoxJig,
8449
+ li as AcEdBaseView,
8639
8450
  j as AcEdCommand,
8640
8451
  A as AcEdCommandStack,
8641
- de as AcEdCorsorType,
8642
- ri as AcEdCursorManager,
8643
- ai as AcEdJig,
8644
- mi as AcEdSelectionSet,
8645
- O as AcEdViewMode,
8646
- ui as AcEditor,
8647
- vn as AcTrView2d,
8648
- Ze as DEFAULT_VIEW_2D_OPTIONS,
8649
- zn as acedAlert,
8452
+ ce as AcEdCorsorType,
8453
+ ti as AcEdCursorManager,
8454
+ ni as AcEdJig,
8455
+ hi as AcEdSelectionSet,
8456
+ R as AcEdViewMode,
8457
+ ci as AcEditor,
8458
+ xn as AcTrView2d,
8459
+ $e as DEFAULT_VIEW_2D_OPTIONS,
8460
+ Ln as acedAlert,
8650
8461
  V as eventBus,
8651
- Bn as registerConverters,
8652
- Pn as registerWorkers
8462
+ wn as registerConverters,
8463
+ En as registerWorkers
8653
8464
  };