mxcad 1.0.63 → 1.0.65

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/mxcad.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import _D, { MxFun as d, MrxDbgUiPrPoint as T, MxCursorType as qD, MrxDbgUtils as $D, store as oD, loadCoreCode as JD, MxPaintBrush as L, MrxDbgUiPrBaseReturn as y, MxDbCircleShape as aD, MxDbLine as J, MxDbPolyline as ZD, MxDbCircleArc as q, Mx3PointArc as YD, MxDbEllipseShape as QD, McEdGetPointWorldDrawObject as XD, MxDbEllipse as DC } from "mxdraw";
1
+ import _D, { MxFun as d, MrxDbgUiPrPoint as T, MxCursorType as qD, MrxDbgUtils as $D, store as oD, loadCoreCode as JD, MxPaintBrush as S, MrxDbgUiPrBaseReturn as y, MxDbCircleShape as aD, MxDbLine as J, MxDbPolyline as ZD, MxDbCircleArc as q, Mx3PointArc as YD, MxDbEllipseShape as QD, McEdGetPointWorldDrawObject as XD, MxDbEllipse as DC } from "mxdraw";
2
2
  function uD(E) {
3
3
  return btoa(unescape(encodeURIComponent(E)));
4
4
  }
@@ -56,7 +56,7 @@ function pD(E, D) {
56
56
  B.href = window.URL.createObjectURL(C), B.download = D, B.click();
57
57
  });
58
58
  }
59
- const N = {
59
+ const H = {
60
60
  b64Encode: uD,
61
61
  b64Decode: lD,
62
62
  saveAsFileDialog: cD,
@@ -67,7 +67,7 @@ class p {
67
67
  static kOrigin;
68
68
  imp;
69
69
  constructor(D, C, B) {
70
- this.imp = new r.mxcadassemblyimp.MdGePoint3d(), D instanceof Object ? (this.imp.x = D.x, this.imp.y = D.y, this.imp.z = D.z) : (this.imp.x = D || 0, this.imp.y = C || 0, this.imp.z = B || 0);
70
+ this.imp = new i.mxcadassemblyimp.MdGePoint3d(), D instanceof Object ? (this.imp.x = D.x, this.imp.y = D.y, this.imp.z = D.z) : (this.imp.x = D || 0, this.imp.y = C || 0, this.imp.z = B || 0);
71
71
  }
72
72
  copy(D) {
73
73
  return this.imp.x = D.x, this.imp.y = D.y, this.imp.z = D.z, this;
@@ -118,7 +118,7 @@ class w {
118
118
  static kZAxis;
119
119
  imp;
120
120
  constructor(D, C, B) {
121
- this.imp = new r.mxcadassemblyimp.MdGeVector3d(), D instanceof Object ? (this.imp.x = D.x, this.imp.y = D.y, this.imp.z = D.z) : (this.imp.x = D || 0, this.imp.y = C || 0, this.imp.z = B || 0);
121
+ this.imp = new i.mxcadassemblyimp.MdGeVector3d(), D instanceof Object ? (this.imp.x = D.x, this.imp.y = D.y, this.imp.z = D.z) : (this.imp.x = D || 0, this.imp.y = C || 0, this.imp.z = B || 0);
122
122
  }
123
123
  copy(D) {
124
124
  return this.imp.x = D.imp.x, this.imp.y = D.imp.y, this.imp.z = D.imp.z, this;
@@ -186,7 +186,7 @@ class W {
186
186
  static kIdentity;
187
187
  imp;
188
188
  constructor(D) {
189
- this.imp = r.mxcadassemblyimp.MdGeMatrix3d(), D instanceof Object && this.imp.copy(D);
189
+ this.imp = i.mxcadassemblyimp.MdGeMatrix3d(), D instanceof Object && this.imp.copy(D);
190
190
  }
191
191
  copy(D) {
192
192
  return this.imp.copy(D.imp), this;
@@ -291,7 +291,7 @@ class CC {
291
291
  }
292
292
  let x = new CC();
293
293
  const BC = new FinalizationRegistry((E) => {
294
- r.App.DestroyObject(E);
294
+ i.App.DestroyObject(E);
295
295
  }), EC = {};
296
296
  class O {
297
297
  imp = 0;
@@ -333,11 +333,11 @@ class M {
333
333
  this.type == 1 ? d.getCurrentDraw().eraseMxEntity(this.id) : this.type == 0 && eD.eraseEntity(this.id);
334
334
  }
335
335
  getMcDbObject() {
336
- return this.type == 0 ? r.App.ObjectIdToObject(this.id) : null;
336
+ return this.type == 0 ? i.App.ObjectIdToObject(this.id) : null;
337
337
  }
338
338
  getObjectName() {
339
339
  if (this.type == 0)
340
- return r.App.getImp().ObjectIdToObjectName(this.id);
340
+ return i.App.getImp().ObjectIdToObjectName(this.id);
341
341
  if (this.type == 1) {
342
342
  let D = d.getCurrentDraw().getMxEntity(this.id);
343
343
  if (D)
@@ -361,7 +361,7 @@ class v extends O {
361
361
  }
362
362
  Clone() {
363
363
  let D = this.imp.Clone();
364
- return r.App.CreateCloneObject(D);
364
+ return i.App.CreateCloneObject(D);
365
365
  }
366
366
  GetHandle() {
367
367
  return this.imp.GetHandle();
@@ -388,7 +388,7 @@ var BD;
388
388
  class j {
389
389
  imp;
390
390
  constructor(D, C, B) {
391
- this.imp = new r.mxcadassemblyimp.MdCmColor(), D instanceof Object ? (this.imp.red = D.red, this.imp.green = D.green, this.imp.blue = D.blue, this.imp.method = D.method, this.imp.n = D.n, this.imp.colorIndex = D.colorIndex) : D && C && B && this.imp.setRGB(D, C, B);
391
+ this.imp = new i.mxcadassemblyimp.MdCmColor(), D instanceof Object ? (this.imp.red = D.red, this.imp.green = D.green, this.imp.blue = D.blue, this.imp.method = D.method, this.imp.n = D.n, this.imp.colorIndex = D.colorIndex) : D && C && B && this.imp.setRGB(D, C, B);
392
392
  }
393
393
  getImp() {
394
394
  return this.imp;
@@ -444,7 +444,7 @@ class j {
444
444
  }
445
445
  class FC extends v {
446
446
  constructor(D) {
447
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbLayerTableRecord());
447
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbLayerTableRecord());
448
448
  }
449
449
  get name() {
450
450
  return this.imp.getName();
@@ -585,7 +585,7 @@ class gD extends O {
585
585
  }
586
586
  class Q extends v {
587
587
  constructor(D) {
588
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbBlockTableRecord());
588
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockTableRecord());
589
589
  }
590
590
  appendAcDbEntity(D) {
591
591
  return new M(
@@ -624,7 +624,7 @@ class yD extends O {
624
624
  }
625
625
  class xD extends v {
626
626
  constructor(D) {
627
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbBlockTable());
627
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockTable());
628
628
  }
629
629
  getAt(D) {
630
630
  let C = this.getAt(D);
@@ -647,7 +647,7 @@ class V extends v {
647
647
  }
648
648
  explode() {
649
649
  let D = this.imp.explode();
650
- return new H(D);
650
+ return new K(D);
651
651
  }
652
652
  get trueColor() {
653
653
  return new j(this.imp.TrueColor());
@@ -713,7 +713,7 @@ class V extends v {
713
713
  let D = this.imp.GetBoundingBox();
714
714
  if (D) {
715
715
  let C = { minPt: new p(D.AtPoint(0).val), maxPt: new p(D.AtPoint(1).val), ret: 0 };
716
- return r.App.DestroyObject(D), C;
716
+ return i.App.DestroyObject(D), C;
717
717
  } else
718
718
  return { minPt: new p(), maxPt: new p(), ret: 1 };
719
719
  }
@@ -723,66 +723,66 @@ class _ extends V {
723
723
  super(D);
724
724
  }
725
725
  getStartParam() {
726
- return { val: this.imp.getStartParam(), ret: r.getCallResult() };
726
+ return { val: this.imp.getStartParam(), ret: i.getCallResult() };
727
727
  }
728
728
  getEndParam() {
729
- return { val: this.imp.getEndParam(), ret: r.getCallResult() };
729
+ return { val: this.imp.getEndParam(), ret: i.getCallResult() };
730
730
  }
731
731
  getDistAtParam(D) {
732
- return { val: this.imp.getDistAtParam(D), ret: r.getCallResult() };
732
+ return { val: this.imp.getDistAtParam(D), ret: i.getCallResult() };
733
733
  }
734
734
  getParamAtDist(D) {
735
- return { val: this.imp.getParamAtDist(D), ret: r.getCallResult() };
735
+ return { val: this.imp.getParamAtDist(D), ret: i.getCallResult() };
736
736
  }
737
737
  getDistAtPoint(D) {
738
- return { val: this.imp.getDistAtPoint(D.imp), ret: r.getCallResult() };
738
+ return { val: this.imp.getDistAtPoint(D.imp), ret: i.getCallResult() };
739
739
  }
740
740
  getPointAtDist(D) {
741
- return { val: new p(this.imp.getPointAtDist(D)), ret: r.getCallResult() };
741
+ return { val: new p(this.imp.getPointAtDist(D)), ret: i.getCallResult() };
742
742
  }
743
743
  getStartPoint() {
744
- return { val: new p(this.imp.getStartPoint()), ret: r.getCallResult() };
744
+ return { val: new p(this.imp.getStartPoint()), ret: i.getCallResult() };
745
745
  }
746
746
  getEndPoint() {
747
- return { val: new p(this.imp.getStartPoint()), ret: r.getCallResult() };
747
+ return { val: new p(this.imp.getStartPoint()), ret: i.getCallResult() };
748
748
  }
749
749
  getPointAtParam(D) {
750
- return { val: new p(this.imp.getPointAtParam(D)), ret: r.getCallResult() };
750
+ return { val: new p(this.imp.getPointAtParam(D)), ret: i.getCallResult() };
751
751
  }
752
752
  getParamAtPoint(D) {
753
- return { val: this.imp.getParamAtPoint(D.imp), ret: r.getCallResult() };
753
+ return { val: this.imp.getParamAtPoint(D.imp), ret: i.getCallResult() };
754
754
  }
755
755
  getFirstDeriv(D) {
756
- return { val: new w(this.imp.getFirstDeriv(D)), ret: r.getCallResult() };
756
+ return { val: new w(this.imp.getFirstDeriv(D)), ret: i.getCallResult() };
757
757
  }
758
758
  getFirstDerivEx(D) {
759
- return { val: new w(this.imp.getFirstDerivEx(D.imp)), ret: r.getCallResult() };
759
+ return { val: new w(this.imp.getFirstDerivEx(D.imp)), ret: i.getCallResult() };
760
760
  }
761
761
  getClosestPointTo(D, C) {
762
- return { val: new p(this.imp.getClosestPointTo(D.imp, C)), ret: r.getCallResult() };
762
+ return { val: new p(this.imp.getClosestPointTo(D.imp, C)), ret: i.getCallResult() };
763
763
  }
764
764
  offsetCurves(D, C) {
765
765
  let B = this.imp.offsetCurves(D, C.imp);
766
- return new H(B);
766
+ return new K(B);
767
767
  }
768
768
  splitCurves(D) {
769
769
  let C = this.imp.splitCurves(D);
770
- return new H(C);
770
+ return new K(C);
771
771
  }
772
772
  getArea() {
773
- return { val: this.imp.getArea(), ret: r.getCallResult() };
773
+ return { val: this.imp.getArea(), ret: i.getCallResult() };
774
774
  }
775
775
  getSamplePoints(D) {
776
776
  let C = this.imp.getSamplePoints(D);
777
- return new H(C);
777
+ return new K(C);
778
778
  }
779
779
  getLength() {
780
- return { val: this.imp.getLength(), ret: r.getCallResult() };
780
+ return { val: this.imp.getLength(), ret: i.getCallResult() };
781
781
  }
782
782
  }
783
783
  class Z extends _ {
784
784
  constructor(D) {
785
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbLine());
785
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbLine());
786
786
  }
787
787
  get startPoint() {
788
788
  return new p(this.imp.startPoint());
@@ -799,7 +799,7 @@ class Z extends _ {
799
799
  }
800
800
  class Y extends V {
801
801
  constructor(D) {
802
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbText());
802
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbText());
803
803
  }
804
804
  get position() {
805
805
  return new p(this.imp.position());
@@ -858,7 +858,7 @@ class Y extends V {
858
858
  }
859
859
  class FD extends V {
860
860
  constructor(D) {
861
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbMText());
861
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbMText());
862
862
  }
863
863
  get location() {
864
864
  return new p(this.imp.location());
@@ -899,7 +899,7 @@ class FD extends V {
899
899
  }
900
900
  class AD extends _ {
901
901
  constructor(D) {
902
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbCircle());
902
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbCircle());
903
903
  }
904
904
  setCenter(D, C, B) {
905
905
  this.imp.setCenter(new p(D, C, B).imp);
@@ -919,7 +919,7 @@ class AD extends _ {
919
919
  }
920
920
  class bD extends _ {
921
921
  constructor(D) {
922
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbPolyline());
922
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbPolyline());
923
923
  }
924
924
  get isClosed() {
925
925
  return this.imp.isClosed();
@@ -943,13 +943,13 @@ class bD extends _ {
943
943
  return this.imp.numVerts();
944
944
  }
945
945
  getPointAt(D) {
946
- return { val: this.imp.getPointAt(D), ret: r.getCallResult() };
946
+ return { val: this.imp.getPointAt(D), ret: i.getCallResult() };
947
947
  }
948
948
  getBulgeAt(D) {
949
949
  return this.imp.getBulgeAt(D);
950
950
  }
951
951
  getWidthsAt(D) {
952
- return { val1: this.imp.getStartWidthsAt(D), val2: this.imp.getEndWidthsAt(D), ret: r.getCallResult() };
952
+ return { val1: this.imp.getStartWidthsAt(D), val2: this.imp.getEndWidthsAt(D), ret: i.getCallResult() };
953
953
  }
954
954
  setPointAt(D, C) {
955
955
  return this.imp.setPointAt(D, C.imp);
@@ -960,7 +960,7 @@ class bD extends _ {
960
960
  }
961
961
  class fD extends V {
962
962
  constructor(D) {
963
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbBlockReference());
963
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockReference());
964
964
  }
965
965
  get blockTableRecordId() {
966
966
  return new M(this.imp.blockTableRecord(), b.kMxCAD);
@@ -1078,7 +1078,7 @@ class tD extends V {
1078
1078
  }
1079
1079
  class MD extends tD {
1080
1080
  constructor(D) {
1081
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbAlignedDimension());
1081
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbAlignedDimension());
1082
1082
  }
1083
1083
  get xLine1Point() {
1084
1084
  return new p(this.imp.xLine1Point());
@@ -1107,7 +1107,7 @@ class MD extends tD {
1107
1107
  }
1108
1108
  class TD extends tD {
1109
1109
  constructor(D) {
1110
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbRotatedDimension());
1110
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbRotatedDimension());
1111
1111
  }
1112
1112
  get xLine1Point() {
1113
1113
  return new p(this.imp.xLine1Point());
@@ -1142,7 +1142,7 @@ class TD extends tD {
1142
1142
  }
1143
1143
  class kD extends _ {
1144
1144
  constructor(D) {
1145
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbArc());
1145
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbArc());
1146
1146
  }
1147
1147
  setCenter(D, C, B) {
1148
1148
  this.imp.setCenter(new p(D, C, B).imp);
@@ -1172,13 +1172,13 @@ class kD extends _ {
1172
1172
  this.imp.setEndAngle(D);
1173
1173
  }
1174
1174
  }
1175
- function K(E = null) {
1175
+ function N(E = null) {
1176
1176
  let D;
1177
- return E == null ? D = new r.mxcadassemblyimp.McDrawResbuf() : D = E.getImp(), D;
1177
+ return E == null ? D = new i.mxcadassemblyimp.McDrawResbuf() : D = E.getImp(), D;
1178
1178
  }
1179
- class H extends O {
1179
+ class K extends O {
1180
1180
  constructor(D) {
1181
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.McDrawResbuf());
1181
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.McDrawResbuf());
1182
1182
  }
1183
1183
  Clear() {
1184
1184
  this.imp.Clear();
@@ -1187,16 +1187,16 @@ class H extends O {
1187
1187
  return this.imp.GetCount();
1188
1188
  }
1189
1189
  AtDouble(D) {
1190
- return { val: this.imp.AtDouble(D), ret: r.getCallResult() };
1190
+ return { val: this.imp.AtDouble(D), ret: i.getCallResult() };
1191
1191
  }
1192
1192
  Atlong(D) {
1193
- return { val: this.imp.Atlong(D), ret: r.getCallResult() };
1193
+ return { val: this.imp.Atlong(D), ret: i.getCallResult() };
1194
1194
  }
1195
1195
  AtObject(D) {
1196
1196
  if (this.imp.AtObjectName(D) == "McDbMText") {
1197
1197
  let B = this.imp.AtObjectMdDbMText(D);
1198
1198
  if (B)
1199
- return { val: new FD(B), ret: r.getCallResult() };
1199
+ return { val: new FD(B), ret: i.getCallResult() };
1200
1200
  }
1201
1201
  return { val: void 0, ret: -1 };
1202
1202
  }
@@ -1204,13 +1204,13 @@ class H extends O {
1204
1204
  this.imp.AddObject(D.getImp());
1205
1205
  }
1206
1206
  AtObjectId(D) {
1207
- return { val: new M(this.imp.AtObjectId(D), b.kMxCAD), ret: r.getCallResult() };
1207
+ return { val: new M(this.imp.AtObjectId(D), b.kMxCAD), ret: i.getCallResult() };
1208
1208
  }
1209
1209
  AtString(D) {
1210
- return { val: x.decodeFromGb2312(this.imp.AtString(D)), ret: r.getCallResult() };
1210
+ return { val: x.decodeFromGb2312(this.imp.AtString(D)), ret: i.getCallResult() };
1211
1211
  }
1212
1212
  AtPoint(D) {
1213
- return { val: new p(this.imp.AtPoint(D)), ret: r.getCallResult() };
1213
+ return { val: new p(this.imp.AtPoint(D)), ret: i.getCallResult() };
1214
1214
  }
1215
1215
  ItemDataType() {
1216
1216
  return this.imp.ItemDataType();
@@ -1249,7 +1249,7 @@ class PD {
1249
1249
  }
1250
1250
  findEntAtPoint(D, C, B, F = -1, A = null) {
1251
1251
  this.init();
1252
- let t = this.imp.findEntAtPoint(D, C, B, F, K(A));
1252
+ let t = this.imp.findEntAtPoint(D, C, B, F, N(A));
1253
1253
  return new M(t, b.kMxCAD);
1254
1254
  }
1255
1255
  selectEnt(D, C = null) {
@@ -1263,31 +1263,31 @@ class PD {
1263
1263
  }
1264
1264
  $D.findEntAtPoint(A).then((t) => {
1265
1265
  let e = [];
1266
- t.forEach((i) => {
1267
- e.push(new M(i, b.kMxDraw));
1266
+ t.forEach((r) => {
1267
+ e.push(new M(r, b.kMxDraw));
1268
1268
  });
1269
- let s = this.findEntAtPoint(A.x, A.y, A.z, -1, C);
1270
- s.isValid() && e.push(s), B(e);
1269
+ let n = this.findEntAtPoint(A.x, A.y, A.z, -1, C);
1270
+ n.isValid() && e.push(n), B(e);
1271
1271
  });
1272
1272
  });
1273
1273
  }
1274
1274
  init() {
1275
- this.imp || (this.imp = new r.mxcadassemblyimp.McDrawUtility());
1275
+ this.imp || (this.imp = new i.mxcadassemblyimp.McDrawUtility());
1276
1276
  }
1277
1277
  }
1278
1278
  let eD = new PD();
1279
1279
  class RD extends O {
1280
1280
  constructor() {
1281
- super(), this.initTempObject(new r.mxcadassemblyimp.McDrawSelSet());
1281
+ super(), this.initTempObject(new i.mxcadassemblyimp.McDrawSelSet());
1282
1282
  }
1283
1283
  allSelect(D = null) {
1284
- return this.imp.allSelect(K(D));
1284
+ return this.imp.allSelect(N(D));
1285
1285
  }
1286
1286
  pointSelect(D, C, B = null, F = -1) {
1287
- return this.imp.pointSelect(D, C, K(B), F);
1287
+ return this.imp.pointSelect(D, C, N(B), F);
1288
1288
  }
1289
1289
  crossingSelect(D, C, B, F, A = null) {
1290
- return this.imp.crossingSelect(D, C, B, F, K(A));
1290
+ return this.imp.crossingSelect(D, C, B, F, N(A));
1291
1291
  }
1292
1292
  count() {
1293
1293
  return this.imp.count();
@@ -1313,7 +1313,7 @@ class U {
1313
1313
  return this.imp;
1314
1314
  }
1315
1315
  getMxCppImp() {
1316
- return r.mxcadassemblyimp;
1316
+ return i.mxcadassemblyimp;
1317
1317
  }
1318
1318
  updateDisplay(D, C) {
1319
1319
  this.imp.updateDisplay(D, C);
@@ -1324,8 +1324,8 @@ class U {
1324
1324
  openWebFile(D, C, B = !0) {
1325
1325
  let F = Math.round(Math.random() * 1e7);
1326
1326
  if (C) {
1327
- let A = this, t = (e, s) => {
1328
- A.mxObject.removeEventFuction("openFileComplete", t), F == s && C(e);
1327
+ let A = this, t = (e, n) => {
1328
+ A.mxObject.removeEventFuction("openFileComplete", t), F == n && C(e);
1329
1329
  };
1330
1330
  A.mxObject.addEvent("openFileComplete", t);
1331
1331
  }
@@ -1347,7 +1347,7 @@ class U {
1347
1347
  if (C && C(t), !!t) {
1348
1348
  if (B) {
1349
1349
  let e;
1350
- /^((?!chrome|android).)*safari/i.test(navigator.userAgent) ? e = new Blob([t.buffer], { type: "application/octet-stream" }) : e = new Blob([t.buffer], { type: "application/octet-binary" }), F ? N.saveAsFileDialog({
1350
+ /^((?!chrome|android).)*safari/i.test(navigator.userAgent) ? e = new Blob([t.buffer], { type: "application/octet-stream" }) : e = new Blob([t.buffer], { type: "application/octet-binary" }), F ? H.saveAsFileDialog({
1351
1351
  blob: e,
1352
1352
  filename: D,
1353
1353
  types: [{
@@ -1356,7 +1356,7 @@ class U {
1356
1356
  "application/octet-stream": [".mxweb"]
1357
1357
  }
1358
1358
  }]
1359
- }) : N.downloadFile(e, D);
1359
+ }) : H.downloadFile(e, D);
1360
1360
  }
1361
1361
  A.mx_saveFile_call = null;
1362
1362
  }
@@ -1473,8 +1473,8 @@ class U {
1473
1473
  DrawPoint(D, C) {
1474
1474
  return this.imp.DrawPoint(D, C);
1475
1475
  }
1476
- DrawSolid(D, C, B, F, A, t, e, s) {
1477
- return this.imp.DrawSolid(D, C, B, F, A, t, e, s);
1476
+ DrawSolid(D, C, B, F, A, t, e, n) {
1477
+ return this.imp.DrawSolid(D, C, B, F, A, t, e, n);
1478
1478
  }
1479
1479
  DrawMText(D, C, B, F, A, t, e) {
1480
1480
  return this.imp.DrawMText(D, C, B, F, A, t, e);
@@ -1488,8 +1488,8 @@ class U {
1488
1488
  DrawDimAligned(D, C, B, F, A, t) {
1489
1489
  return this.imp.DrawDimAligned(D, C, B, F, A, t);
1490
1490
  }
1491
- DrawDimAngular(D, C, B, F, A, t, e, s) {
1492
- return this.imp.DrawDimAngular(D, C, B, F, A, t, e, s);
1491
+ DrawDimAngular(D, C, B, F, A, t, e, n) {
1492
+ return this.imp.DrawDimAngular(D, C, B, F, A, t, e, n);
1493
1493
  }
1494
1494
  DrawDimDiametric(D, C, B, F, A) {
1495
1495
  return this.imp.DrawDimDiametric(D, C, B, F, A);
@@ -1531,20 +1531,20 @@ class U {
1531
1531
  return this.imp.DrawEntity(D.getImp());
1532
1532
  }
1533
1533
  ObjectIdToObject(D) {
1534
- return r.App.ObjectIdToObject(D);
1534
+ return i.App.ObjectIdToObject(D);
1535
1535
  }
1536
1536
  CloneMcDbObject(D) {
1537
1537
  let C = this.imp.CloneMcDbObject(D);
1538
- return r.App.CreateCloneObject(C);
1538
+ return i.App.CreateCloneObject(C);
1539
1539
  }
1540
1540
  ObjectIdToMdObjectImp(D) {
1541
- return r.App.getImp().ObjectIdToMdObject(D);
1541
+ return i.App.getImp().ObjectIdToMdObject(D);
1542
1542
  }
1543
1543
  DestroyObject(D) {
1544
- !D || r.App.getImp().DestroyObject(D);
1544
+ !D || i.App.getImp().DestroyObject(D);
1545
1545
  }
1546
1546
  }
1547
- class SD {
1547
+ class LD {
1548
1548
  imp;
1549
1549
  init(D) {
1550
1550
  this.imp = D, w.kZAxis = new w(0, 0, 1), w.kXAxis = new w(1, 0, 0), w.kYAxis = new w(0, 1, 0), p.kOrigin = new p(0, 0, 0), W.kIdentity = new W();
@@ -1606,20 +1606,25 @@ class SD {
1606
1606
  let C = D.getObjectName();
1607
1607
  if (C == "McDbLine") {
1608
1608
  let B = new Z();
1609
- return B.getImp().ConnectionTempObject(D), r.App.DestroyObject(D), B;
1609
+ return B.getImp().ConnectionTempObject(D), i.App.DestroyObject(D), B;
1610
1610
  } else if (C == "McDbText") {
1611
1611
  let B = new Y();
1612
- return B.getImp().ConnectionTempObject(D), r.App.DestroyObject(D), B;
1612
+ return B.getImp().ConnectionTempObject(D), i.App.DestroyObject(D), B;
1613
1613
  }
1614
1614
  return console.log("Mx: Clone error type"), new v(D);
1615
1615
  }
1616
1616
  setFontFilePath(D) {
1617
- return this.imp.setFontFilePath(D);
1617
+ this.imp.setFontFilePath(D);
1618
+ }
1619
+ addNetworkLoadingFont(D) {
1620
+ typeof D == "string" ? this.imp.addNetworkLoadingFont(D) : D.forEach((C) => {
1621
+ this.imp.addNetworkLoadingFont(C);
1622
+ });
1618
1623
  }
1619
1624
  }
1620
- class LD {
1625
+ class SD {
1621
1626
  mxcadassemblyimp;
1622
- App = new SD();
1627
+ App = new LD();
1623
1628
  getCallResult() {
1624
1629
  return this.App.getLastCallResult();
1625
1630
  }
@@ -1632,7 +1637,7 @@ class LD {
1632
1637
  return D && D.x && D.y && (B.x = D.x, B.y = D.y, D.z && (B.y = D.z)), B;
1633
1638
  }
1634
1639
  }
1635
- const iD = "1.0.63", AC = "SharedArrayBuffer" in window, X = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src), tC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/2d-st/${E}` : D + E, eC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/2d/${E}` : D + E, iC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/3d/${E}` : D + E, vD = (E) => new Promise((D, C) => {
1640
+ const iD = "1.0.65", AC = "SharedArrayBuffer" in window, X = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src), tC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/2d-st/${E}` : D + E, eC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/2d/${E}` : D + E, iC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/3d/${E}` : D + E, vD = (E) => new Promise((D, C) => {
1636
1641
  const B = document.createElement("script");
1637
1642
  B.src = E, B.type = "text/javascript", B.crossOrigin = "anonymous", document.body.appendChild(B), B.onload = () => {
1638
1643
  D();
@@ -1643,21 +1648,21 @@ const iD = "1.0.63", AC = "SharedArrayBuffer" in window, X = document.currentScr
1643
1648
  const { locateFile: B } = C, F = B(E + ".js");
1644
1649
  return await vD(F), await globalThis[D](C);
1645
1650
  };
1646
- let r;
1647
- async function OD(E, D = AC || !X ? tC : eC, C, B) {
1648
- return new Promise(async (F, A) => {
1651
+ let i;
1652
+ async function OD(E, D = AC || !X ? tC : eC, C, B, F) {
1653
+ return new Promise(async (A, t) => {
1649
1654
  try {
1650
- if (r || (r = new LD()), r.mxcadassemblyimp)
1651
- return E && E(r), F(r);
1652
- const e = await rC("mxdrawassembly_min", "mxdrawassembly", {
1655
+ if (i || (i = new SD()), i.mxcadassemblyimp)
1656
+ return E && E(i), A(i);
1657
+ const n = await rC("mxdrawassembly_min", "mxdrawassembly", {
1653
1658
  locateFile: D,
1654
1659
  wasmBinary: C
1655
1660
  });
1656
- r.mxcadassemblyimp = e;
1657
- let s = new e.McApp();
1658
- B && s.setFontFilePath(B), s.Init(), r.App.init(s), E && E(r), F(r);
1659
- } catch (t) {
1660
- A(t);
1661
+ i.mxcadassemblyimp = n;
1662
+ let r = new n.McApp();
1663
+ B && r.setFontFilePath(B), r.Init(), i.App.init(r), F && i.App.addNetworkLoadingFont(F), E && E(i), A(i);
1664
+ } catch (e) {
1665
+ t(e);
1661
1666
  }
1662
1667
  });
1663
1668
  }
@@ -1682,7 +1687,7 @@ const sC = (E) => {
1682
1687
  }
1683
1688
  }), oC = async (E) => {
1684
1689
  oD.state.MxFun || await JD();
1685
- const { fontspath: D, locateFile: C, wasmBinary: B, canvas: F, userIdentitySign: A, onOpenFileComplete: t, fileUrl: e, onInit: s = () => {
1690
+ const { networkFonts: D, fontspath: C, locateFile: B, wasmBinary: F, canvas: A, userIdentitySign: t, onOpenFileComplete: e, fileUrl: n, onInit: r = () => {
1686
1691
  d.setIniset({
1687
1692
  EnableIntelliSelect: !0,
1688
1693
  IntelliSelectType: 1,
@@ -1690,15 +1695,15 @@ const sC = (E) => {
1690
1695
  });
1691
1696
  } } = E || {};
1692
1697
  await OD(() => {
1693
- }, C, B, D), s();
1694
- let i = await nC(F, A);
1695
- const o = d.getMxFunTHREE();
1696
- let a = new o.Vector2();
1697
- i.getRenderer().getSize(a);
1698
- const l = r.App.CreateMxCAD(a.width, a.height, i.getCanvas().id, i.isWebgl2(), i.getId());
1699
- return i.initMxCpp(l), i.addEvent("openFileComplete", () => {
1700
- t && t();
1701
- }), e && l.openWebFile(e), l;
1698
+ }, B, F, C, D), r();
1699
+ let o = await nC(A, t);
1700
+ const u = d.getMxFunTHREE();
1701
+ let l = new u.Vector2();
1702
+ o.getRenderer().getSize(l);
1703
+ const s = i.App.CreateMxCAD(l.width, l.height, o.getCanvas().id, o.isWebgl2(), o.getId());
1704
+ return o.initMxCpp(s), o.addEvent("openFileComplete", () => {
1705
+ e && e();
1706
+ }), n && s.openWebFile(n), s;
1702
1707
  };
1703
1708
  async function aC() {
1704
1709
  const E = new T();
@@ -1711,7 +1716,7 @@ async function aC() {
1711
1716
  if (C.length <= 0)
1712
1717
  return;
1713
1718
  let B = d.screenCoordLong2Doc(50);
1714
- C = N.b64Encode(C);
1719
+ C = H.b64Encode(C);
1715
1720
  const F = {
1716
1721
  postx: D.x,
1717
1722
  posty: D.y,
@@ -1732,43 +1737,43 @@ class uC extends aD {
1732
1737
  }
1733
1738
  }
1734
1739
  const sD = (E) => {
1735
- const [D, C, B] = E, { x: F, y: A, z: t } = D, { x: e, y: s, z: i } = C, { x: o, y: a, z: l } = B, n = A * i - s * t - A * l + a * t + s * l - a * i, u = -(F * i - e * t - F * l + o * t + e * l - o * i), h = F * s - e * A - F * a + o * A + e * a - o * s, g = -(F * s * l - F * a * i - e * A * l + e * a * t + o * A * i - o * s * t), c = 2 * (e - F), m = 2 * (s - A), k = 2 * (i - t), I = F * F + A * A + t * t - e * e - s * s - i * i, P = 2 * (o - F), R = 2 * (a - A), S = 2 * (l - t), G = F * F + A * A + t * t - o * o - a * a - l * l, KD = -(u * k * G - u * S * I - m * h * G + m * S * g + R * h * I - R * k * g) / (n * m * S - n * R * k - c * u * S + c * R * h + P * u * k - P * m * h), HD = (n * k * G - n * S * I - c * h * G + c * S * g + P * h * I - P * k * g) / (n * m * S - n * R * k - c * u * S + c * R * h + P * u * k - P * m * h), ND = -(n * m * G - n * R * I - c * u * G + c * R * g + P * u * I - P * m * g) / (n * m * S - n * R * k - c * u * S + c * R * h + P * u * k - P * m * h);
1736
- return new THREE.Vector3(KD, HD, ND);
1740
+ const [D, C, B] = E, { x: F, y: A, z: t } = D, { x: e, y: n, z: r } = C, { x: o, y: u, z: l } = B, s = A * r - n * t - A * l + u * t + n * l - u * r, a = -(F * r - e * t - F * l + o * t + e * l - o * r), h = F * n - e * A - F * u + o * A + e * u - o * n, g = -(F * n * l - F * u * r - e * A * l + e * u * t + o * A * r - o * n * t), c = 2 * (e - F), m = 2 * (n - A), k = 2 * (r - t), I = F * F + A * A + t * t - e * e - n * n - r * r, P = 2 * (o - F), R = 2 * (u - A), L = 2 * (l - t), G = F * F + A * A + t * t - o * o - u * u - l * l, ND = -(a * k * G - a * L * I - m * h * G + m * L * g + R * h * I - R * k * g) / (s * m * L - s * R * k - c * a * L + c * R * h + P * a * k - P * m * h), KD = (s * k * G - s * L * I - c * h * G + c * L * g + P * h * I - P * k * g) / (s * m * L - s * R * k - c * a * L + c * R * h + P * a * k - P * m * h), HD = -(s * m * G - s * R * I - c * a * G + c * R * g + P * a * I - P * m * g) / (s * m * L - s * R * k - c * a * L + c * R * h + P * a * k - P * m * h);
1741
+ return new THREE.Vector3(ND, KD, HD);
1737
1742
  };
1738
1743
  function jD() {
1739
1744
  const E = new T();
1740
1745
  let D = new uC();
1741
- L.use(D), D.closed = !1;
1746
+ S.use(D), D.closed = !1;
1742
1747
  let C = 0, B = "default", F = !0;
1743
1748
  const A = () => {
1744
1749
  E.setUserDraw(
1745
- (n, u) => {
1746
- D.radius = F ? D.center.distanceTo(n) : D.center.distanceTo(n) / 2, u.drawCustomEntity(D), u.drawLine(D.center, n);
1750
+ (s, a) => {
1751
+ D.radius = F ? D.center.distanceTo(s) : D.center.distanceTo(s) / 2, a.drawCustomEntity(D), a.drawLine(D.center, s);
1747
1752
  }
1748
1753
  );
1749
- }, t = (n) => {
1754
+ }, t = (s) => {
1750
1755
  if (B === "default") {
1751
- if (n === y.kOk) {
1756
+ if (s === y.kOk) {
1752
1757
  if (C === 0)
1753
1758
  E.setMessage(`
1754
1759
  \u6307\u5B9A\u5706\u7684\u534A\u5F84:`), E.setKeyWords("[\u76F4\u5F84(D)]"), D.center = E.value(), A();
1755
1760
  else if (C === 1)
1756
- return r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1761
+ return i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1757
1762
  C++;
1758
1763
  }
1759
- n === y.kKeyWord && E.isKeyWordPicked("D") && (F = !1, A(), E.setMessage(`
1764
+ s === y.kKeyWord && E.isKeyWordPicked("D") && (F = !1, A(), E.setMessage(`
1760
1765
  \u6307\u5B9A\u5706\u7684\u76F4\u5F84:`), E.setKeyWords(""));
1761
1766
  }
1762
1767
  };
1763
1768
  let e = [];
1764
- const s = (n) => {
1769
+ const n = (s) => {
1765
1770
  if (B === "3P" && (E.setMessage(`
1766
- \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), n === y.kOk)) {
1767
- if (C === 0 && (e.push(E.value()), E.setUserDraw((u, h) => {
1768
- h.drawLine(e[0], u);
1771
+ \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), s === y.kOk)) {
1772
+ if (C === 0 && (e.push(E.value()), E.setUserDraw((a, h) => {
1773
+ h.drawLine(e[0], a);
1769
1774
  }), E.setMessage(`
1770
- \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), C === 1 && (e.push(E.value()), E.setUserDraw((u, h) => {
1771
- const [g, c] = e, m = u;
1775
+ \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), C === 1 && (e.push(E.value()), E.setUserDraw((a, h) => {
1776
+ const [g, c] = e, m = a;
1772
1777
  D.center = sD([
1773
1778
  g,
1774
1779
  c,
@@ -1776,30 +1781,30 @@ function jD() {
1776
1781
  ]), D.radius = D.center.distanceTo(g), h.drawCustomEntity(D);
1777
1782
  }), E.setMessage(`
1778
1783
  \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E09\u4E2A\u70B9:`)), C === 2)
1779
- return e.push(E.value()), D.center = sD(e), D.radius = D.center.distanceTo(e[0]), r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1784
+ return e.push(E.value()), D.center = sD(e), D.radius = D.center.distanceTo(e[0]), i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1780
1785
  C++;
1781
1786
  }
1782
1787
  };
1783
- let i;
1784
- const o = (n, u) => {
1785
- new THREE.Line3(n, u).getCenter(D.center), D.radius = u.distanceTo(n) / 2;
1786
- }, a = (n) => {
1788
+ let r;
1789
+ const o = (s, a) => {
1790
+ new THREE.Line3(s, a).getCenter(D.center), D.radius = a.distanceTo(s) / 2;
1791
+ }, u = (s) => {
1787
1792
  if (B === "2P" && (E.setMessage(`
1788
- \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), n === y.kOk)) {
1789
- if (C === 0 && (i = E.value(), E.setUserDraw((u, h) => {
1790
- o(i, u), h.drawCustomEntity(D), h.drawLine(i, u);
1793
+ \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), s === y.kOk)) {
1794
+ if (C === 0 && (r = E.value(), E.setUserDraw((a, h) => {
1795
+ o(r, a), h.drawCustomEntity(D), h.drawLine(r, a);
1791
1796
  }), E.setMessage(`
1792
1797
  \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`)), C === 1)
1793
- return o(i, E.value()), r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1798
+ return o(r, E.value()), i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1794
1799
  C++;
1795
1800
  }
1796
- }, l = (n) => {
1801
+ }, l = (s) => {
1797
1802
  if (B === "T") {
1798
1803
  if (E.setMessage(`
1799
- \u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), n === y.kOk) {
1804
+ \u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), s === y.kOk) {
1800
1805
  if (C === 0) {
1801
- const u = E.value();
1802
- console.log(u), d.getCurrentDraw();
1806
+ const a = E.value();
1807
+ console.log(a), d.getCurrentDraw();
1803
1808
  }
1804
1809
  C++;
1805
1810
  }
@@ -1810,18 +1815,18 @@ function jD() {
1810
1815
  `
1811
1816
  \u6307\u5B9A\u5706\u7684\u5706\u5FC3\u6216[\u4E09\u70B9(3P)/\u4E24\u70B9(2P)/\u5207\u70B9\u3001\u5207\u70B9\u3001\u534A\u5F84(T)]:`
1812
1817
  ), E.setKeyWords("3P 2P T"), E.goWhile(
1813
- (n) => {
1814
- if (n === y.kKeyWord && (E.isKeyWordPicked("3P") ? B = "3P" : E.isKeyWordPicked("2P") ? B = "2P" : E.isKeyWordPicked("T") && (B = "T")), t(n))
1818
+ (s) => {
1819
+ if (s === y.kKeyWord && (E.isKeyWordPicked("3P") ? B = "3P" : E.isKeyWordPicked("2P") ? B = "2P" : E.isKeyWordPicked("T") && (B = "T")), t(s))
1815
1820
  return { exit: !0 };
1816
- if (s(n))
1821
+ if (n(s))
1817
1822
  return { exit: !0 };
1818
- if (a(n))
1823
+ if (u(s))
1819
1824
  return { exit: !0 };
1820
- if (l(n))
1825
+ if (l(s))
1821
1826
  return { exit: !0 };
1822
1827
  },
1823
- (n) => {
1824
- n === y.kCancel && r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius);
1828
+ (s) => {
1829
+ s === y.kCancel && i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius);
1825
1830
  }
1826
1831
  );
1827
1832
  }
@@ -1851,17 +1856,17 @@ async function ID() {
1851
1856
  };
1852
1857
  F(), E.goWhile(
1853
1858
  (A) => {
1854
- if (A === y.kOk && (D = new J(), L.use(D), D.pt1 = B, D.pt2 = E.value(), B = D.pt2.clone(), C.push(D), F()), A === y.kKeyWord) {
1859
+ if (A === y.kOk && (D = new J(), S.use(D), D.pt1 = B, D.pt2 = E.value(), B = D.pt2.clone(), C.push(D), F()), A === y.kKeyWord) {
1855
1860
  if (E.isKeyWordPicked("E"))
1856
1861
  nD();
1857
1862
  else if (E.isKeyWordPicked("C")) {
1858
1863
  const t = new J();
1859
- return t.pt1 = B.clone(), t.pt2 = C[0].pt1.clone(), L.use(t), C.push(t), B = t.pt2.clone(), nD(), { exit: !0 };
1864
+ return t.pt1 = B.clone(), t.pt2 = C[0].pt1.clone(), S.use(t), C.push(t), B = t.pt2.clone(), nD(), { exit: !0 };
1860
1865
  }
1861
1866
  }
1862
1867
  },
1863
1868
  (A) => (A === y.kCancel && C.forEach((t) => {
1864
- r.App.GetCurrentMxCAD().DrawLine(t.pt1.x, t.pt1.y, 0, t.pt2.x, t.pt2.y, 0);
1869
+ i.App.GetCurrentMxCAD().DrawLine(t.pt1.x, t.pt1.y, 0, t.pt2.x, t.pt2.y, 0);
1865
1870
  }), { exit: !0 })
1866
1871
  );
1867
1872
  }
@@ -1874,11 +1879,11 @@ async function lC() {
1874
1879
  if (!D)
1875
1880
  return;
1876
1881
  let C = new Z(), B = new Y();
1877
- B.textString = "\u6D4B\u8BD5Test", B.height = d.viewCoordLong2Cad(100), C.startPoint = r.NewMcGePoint3d(D), E.setUserDraw((A, t) => {
1878
- C.endPoint = r.NewMcGePoint3d(A), B.position = r.NewMcGePoint3d(A), B.alignmentPoint = B.position, t.drawMcDbEntity(C), t.drawMcDbEntity(B);
1882
+ B.textString = "\u6D4B\u8BD5Test", B.height = d.viewCoordLong2Cad(100), C.startPoint = i.NewMcGePoint3d(D), E.setUserDraw((A, t) => {
1883
+ C.endPoint = i.NewMcGePoint3d(A), B.position = i.NewMcGePoint3d(A), B.alignmentPoint = B.position, t.drawMcDbEntity(C), t.drawMcDbEntity(B);
1879
1884
  }), E.setMessage(`
1880
1885
  \u6307\u5B9A\u4E8C\u70B9:`), await E.go();
1881
- let F = r.App.GetCurrentMxCAD();
1886
+ let F = i.App.GetCurrentMxCAD();
1882
1887
  F.DrawEntity(B), F.DrawEntity(C);
1883
1888
  }
1884
1889
  }
@@ -1893,20 +1898,30 @@ async function cC() {
1893
1898
  if (t.GetCount() == 0)
1894
1899
  return;
1895
1900
  let e = t.GetCount();
1896
- for (let s = 0; s < e; s++) {
1897
- let i = t.AtObject(s).val;
1898
- i?.ObjectName == "McDbMText" && console.log(i.contents);
1901
+ for (let n = 0; n < e; n++) {
1902
+ let r = t.AtObject(n).val;
1903
+ r?.ObjectName == "McDbMText" && console.log(r.contents);
1899
1904
  }
1900
1905
  }
1901
1906
  }
1902
1907
  }
1903
1908
  function mC() {
1904
- r.App.GetCurrentMxCAD().saveFile("xxxxx");
1909
+ i.App.GetCurrentMxCAD().saveFile("xxxxx");
1910
+ }
1911
+ function pC() {
1912
+ i.App.GetCurrentMxCAD().saveFileToUrl("http://localhost:3337/mxcad/savefiledwg", (E, D) => {
1913
+ try {
1914
+ let C = JSON.parse(D);
1915
+ console.log(C), console.log(E);
1916
+ } catch {
1917
+ console.log("Mx: sserverResult error");
1918
+ }
1919
+ });
1905
1920
  }
1906
1921
  d.on("init", () => {
1907
- d.addCommand("Mx_Line", ID), d.addCommand("Mx_TestDraw", lC), d.addCommand("Mx_Test_GetDim", cC), d.addCommand("Mx_Test_SaveFile", mC);
1922
+ d.addCommand("Mx_Line", ID), d.addCommand("Mx_TestDraw", lC), d.addCommand("Mx_Test_GetDim", cC), d.addCommand("Mx_Test_SaveFile", mC), d.addCommand("Mx_Test_SaveFileDwg", pC);
1908
1923
  });
1909
- async function pC() {
1924
+ async function dC() {
1910
1925
  const E = new T();
1911
1926
  E.setMessage(`
1912
1927
  \u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
@@ -1918,7 +1933,7 @@ async function pC() {
1918
1933
  if (C.length <= 0)
1919
1934
  return;
1920
1935
  let B = d.screenCoordLong2Doc(50);
1921
- C = N.b64Encode(C);
1936
+ C = H.b64Encode(C);
1922
1937
  const F = {
1923
1938
  postx: D.x,
1924
1939
  posty: D.y,
@@ -1929,7 +1944,7 @@ async function pC() {
1929
1944
  }
1930
1945
  async function GD() {
1931
1946
  const E = new T(), D = new ZD();
1932
- L.use(D), E.setMessage(`
1947
+ S.use(D), E.setMessage(`
1933
1948
  \u6307\u5B9A\u8D77\u70B9:`);
1934
1949
  let C;
1935
1950
  E.setUserDraw((B, F) => {
@@ -1945,7 +1960,7 @@ async function GD() {
1945
1960
  },
1946
1961
  (B) => {
1947
1962
  if (B === y.kCancel) {
1948
- let F = r.App.GetCurrentMxCAD();
1963
+ let F = i.App.GetCurrentMxCAD();
1949
1964
  for (let A = 0; A < D.points.length; A++)
1950
1965
  A == 0 ? F.PathMoveTo(D.points[A].x, D.points[A].y) : F.PathLineTo(D.points[A].x, D.points[A].y);
1951
1966
  F.DrawPathToPolyline();
@@ -1965,24 +1980,24 @@ async function WD() {
1965
1980
  let B = 5;
1966
1981
  E.setUserDraw((F, A) => {
1967
1982
  C.radius = D.distanceTo(F);
1968
- let t = C.getEndParam().val, s = C.getDistAtParam(t).val / B, i = 0, o = new THREE.Vector3(), a = new THREE.Vector3();
1983
+ let t = C.getEndParam().val, n = C.getDistAtParam(t).val / B, r = 0, o = new THREE.Vector3(), u = new THREE.Vector3();
1969
1984
  for (let l = 0; l < B; l++) {
1970
- let n = C.getPointAtDist(i).val;
1971
- i += s, l > 0 ? A.drawMcDbLine(n.x, n.y, n.z, o.x, o.y, o.z) : a = new THREE.Vector3(n.x, n.y, n.z), l == B - 1 && A.drawMcDbLine(n.x, n.y, n.z, a.x, a.y, a.z), o = new THREE.Vector3(n.x, n.y, n.z);
1985
+ let s = C.getPointAtDist(r).val;
1986
+ r += n, l > 0 ? A.drawMcDbLine(s.x, s.y, s.z, o.x, o.y, o.z) : u = new THREE.Vector3(s.x, s.y, s.z), l == B - 1 && A.drawMcDbLine(s.x, s.y, s.z, u.x, u.y, u.z), o = new THREE.Vector3(s.x, s.y, s.z);
1972
1987
  }
1973
1988
  }), E.setMessage(`
1974
1989
  \u6307\u5B9A\u4E8C\u70B9:`), await E.go(), E.drawReserve();
1975
1990
  }
1976
1991
  d.addCommand("Mx_Polygon", WD);
1977
- function dC(E, D, C) {
1978
- const B = E.x, F = D.x, A = C.x, t = E.y, e = D.y, s = C.y, i = B - F, o = t - e, a = B - A, l = t - s, n = (B * B - F * F + (t * t - e * e)) / 2, u = (B * B - A * A + (t * t - s * s)) / 2, h = o * a - i * l, g = -(l * n - o * u) / h, c = -(i * u - a * n) / h;
1992
+ function hC(E, D, C) {
1993
+ const B = E.x, F = D.x, A = C.x, t = E.y, e = D.y, n = C.y, r = B - F, o = t - e, u = B - A, l = t - n, s = (B * B - F * F + (t * t - e * e)) / 2, a = (B * B - A * A + (t * t - n * n)) / 2, h = o * u - r * l, g = -(l * s - o * a) / h, c = -(r * a - u * s) / h;
1979
1994
  return new THREE.Vector3(g, c, 0);
1980
1995
  }
1981
- function hC(E, D) {
1996
+ function wC(E, D) {
1982
1997
  const C = E.x, B = E.y, F = D.x, A = D.y;
1983
1998
  return Math.sqrt((C - F) * (C - F) + (B - A) * (B - A));
1984
1999
  }
1985
- function wC(E, D, C) {
2000
+ function gC(E, D, C) {
1986
2001
  let B;
1987
2002
  E < C ? B = C - E : B = C - E + 360;
1988
2003
  let F;
@@ -1990,11 +2005,11 @@ function wC(E, D, C) {
1990
2005
  }
1991
2006
  function CD(E, D, C) {
1992
2007
  const B = E.x, F = D.x, A = E.y, t = D.y;
1993
- let e, s, i;
1994
- return e = (A - t) / C, s = (B - F) / C, s >= 0.99999 && (s = 0.99999), s <= -0.99999 && (s = -0.99999), i = Math.acos(s), i = i / Math.PI * 180, e < -0.05 && (i = 360 - i), {
2008
+ let e, n, r;
2009
+ return e = (A - t) / C, n = (B - F) / C, n >= 0.99999 && (n = 0.99999), n <= -0.99999 && (n = -0.99999), r = Math.acos(n), r = r / Math.PI * 180, e < -0.05 && (r = 360 - r), {
1995
2010
  sin: e,
1996
- cos: s,
1997
- angle: i
2011
+ cos: n,
2012
+ angle: r
1998
2013
  };
1999
2014
  }
2000
2015
  const $ = _D.MrxDbgUiPrBaseReturn, f = (E, D, C) => {
@@ -2025,13 +2040,13 @@ class rD extends aD {
2025
2040
  }
2026
2041
  getArcMidPoint(D, C, B, F, A) {
2027
2042
  const t = D, e = B * Math.PI / 180;
2028
- let s = F * Math.PI / 180;
2029
- const i = new THREE.Vector3(), o = new THREE.Vector3();
2030
- i.x = t.x + C * Math.cos(e), i.y = t.y + C * Math.sin(e), o.x = t.x + C * Math.cos(s), o.y = t.y + C * Math.sin(s);
2031
- const a = C;
2032
- (A ? B < F : B > F) && (s += Math.PI * 2);
2043
+ let n = F * Math.PI / 180;
2044
+ const r = new THREE.Vector3(), o = new THREE.Vector3();
2045
+ r.x = t.x + C * Math.cos(e), r.y = t.y + C * Math.sin(e), o.x = t.x + C * Math.cos(n), o.y = t.y + C * Math.sin(n);
2046
+ const u = C;
2047
+ (A ? B < F : B > F) && (n += Math.PI * 2);
2033
2048
  const l = new THREE.Vector3();
2034
- return l.x = t.x + a * Math.cos((e + s) / 2), l.y = t.y + a * Math.sin((e + s) / 2), [i, l, o, this.center];
2049
+ return l.x = t.x + u * Math.cos((e + n) / 2), l.y = t.y + u * Math.sin((e + n) / 2), [r, l, o, this.center];
2035
2050
  }
2036
2051
  getGripPoints() {
2037
2052
  return this.getArcMidPoint(
@@ -2051,13 +2066,13 @@ class rD extends aD {
2051
2066
  upDatePoints(D, C, B) {
2052
2067
  D[C].add(B);
2053
2068
  const [F, A, t] = D;
2054
- this.center = dC(F, t, A), this.radius = hC(A, this.center);
2055
- const e = CD(F, this.center, this.radius), s = CD(t, this.center, this.radius), i = CD(A, this.center, this.radius);
2056
- this.clockwise = wC(
2057
- s.angle,
2069
+ this.center = hC(F, t, A), this.radius = wC(A, this.center);
2070
+ const e = CD(F, this.center, this.radius), n = CD(t, this.center, this.radius), r = CD(A, this.center, this.radius);
2071
+ this.clockwise = gC(
2072
+ n.angle,
2058
2073
  e.angle,
2059
- i.angle
2060
- ), this.startAngle = THREE.MathUtils.degToRad(e.angle), this.endAngle = THREE.MathUtils.degToRad(s.angle);
2074
+ r.angle
2075
+ ), this.startAngle = THREE.MathUtils.degToRad(e.angle), this.endAngle = THREE.MathUtils.degToRad(n.angle);
2061
2076
  }
2062
2077
  }
2063
2078
  async function UD() {
@@ -2065,7 +2080,7 @@ async function UD() {
2065
2080
  E.setMessage(`
2066
2081
  \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), E.setKeyWords("[\u5706\u5FC3(C)]");
2067
2082
  let D = new rD();
2068
- D.closed = !1, L.use(D);
2083
+ D.closed = !1, S.use(D);
2069
2084
  let C, B, F;
2070
2085
  const A = f(
2071
2086
  E,
@@ -2073,7 +2088,7 @@ async function UD() {
2073
2088
  C = E.value(), E.setMessage(`
2074
2089
  \u6307\u5B9A\u5706\u5F27\u7684\u7B2C\u4E8C\u4E2A\u70B9:`), E.setKeyWords("[\u5706\u5FC3(C)/\u7AEF\u70B9(E)]"), E.setUserDraw((c, m) => {
2075
2090
  m.drawLine(C, c);
2076
- }), u();
2091
+ }), a();
2077
2092
  },
2078
2093
  () => {
2079
2094
  if (E.isKeyWordPicked("C")) {
@@ -2088,7 +2103,7 @@ async function UD() {
2088
2103
  const e = f(
2089
2104
  E,
2090
2105
  () => {
2091
- t = E.value(), F = new q(), F.closed = !1, L.use(F), F.center = t, D.center = t, E.setMessage(`
2106
+ t = E.value(), F = new q(), F.closed = !1, S.use(F), F.center = t, D.center = t, E.setMessage(`
2092
2107
  \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), E.setUserDraw((c, m) => {
2093
2108
  m.drawCustomEntity(F), m.drawLine(t, c);
2094
2109
  }), o();
@@ -2096,25 +2111,25 @@ async function UD() {
2096
2111
  () => {
2097
2112
  }
2098
2113
  );
2099
- let s, i;
2114
+ let n, r;
2100
2115
  const o = f(
2101
2116
  E,
2102
2117
  () => {
2103
- s = E.value(), F.endPoint = s, E.setMessage(
2118
+ n = E.value(), F.endPoint = n, E.setMessage(
2104
2119
  `
2105
2120
  \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u89D2\u5EA6(A)/\u5F26\u957F(L)/\u4FEE\u6539\u534A\u5F84(R)]:`
2106
- ), E.setKeyWords("A L R"), i = new J(), i.setDashLineDisplay(!0), i.setDashArray(0.05), i.setLineWidth(2), i.setColor("#ffd30d"), i.pt1 = F.center, E.setUserDraw((c, m) => {
2107
- F.startPoint = c, i.pt2 = c, m.drawCustomEntity(F), m.drawCustomEntity(i);
2121
+ ), E.setKeyWords("A L R"), r = new J(), r.setDashLineDisplay(!0), r.setDashArray(0.05), r.setLineWidth(2), r.setColor("#ffd30d"), r.pt1 = F.center, E.setUserDraw((c, m) => {
2122
+ F.startPoint = c, r.pt2 = c, m.drawCustomEntity(F), m.drawCustomEntity(r);
2108
2123
  }), l();
2109
2124
  },
2110
2125
  () => {
2111
2126
  }
2112
2127
  );
2113
- let a;
2128
+ let u;
2114
2129
  const l = f(
2115
2130
  E,
2116
2131
  () => {
2117
- a = E.value(), F.startPoint = a, F.endPoint = s, d.getCurrentDraw().addMxEntity(F);
2132
+ u = E.value(), F.startPoint = u, F.endPoint = n, d.getCurrentDraw().addMxEntity(F);
2118
2133
  },
2119
2134
  () => {
2120
2135
  if (E.isKeyWordPicked("A"))
@@ -2122,14 +2137,14 @@ async function UD() {
2122
2137
  `
2123
2138
  \u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
2124
2139
  ), E.setKeyWords("R"), E.setUserDraw((c, m) => {
2125
- F.startPoint = c, m.drawCustomEntity(F), m.drawCustomEntity(i);
2140
+ F.startPoint = c, m.drawCustomEntity(F), m.drawCustomEntity(r);
2126
2141
  }), !0;
2127
2142
  if (E.isKeyWordPicked("L"))
2128
2143
  return E.setMessage(
2129
2144
  `
2130
2145
  \u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
2131
2146
  ), E.setKeyWords("R"), E.setUserDraw((c, m) => {
2132
- F.startPoint = c, m.drawCustomEntity(F), m.drawCustomEntity(i);
2147
+ F.startPoint = c, m.drawCustomEntity(F), m.drawCustomEntity(r);
2133
2148
  }), !0;
2134
2149
  if (E.isKeyWordPicked("R"))
2135
2150
  E.setMessage(
@@ -2142,23 +2157,23 @@ async function UD() {
2142
2157
  return !0;
2143
2158
  }
2144
2159
  );
2145
- let n;
2146
- const u = f(
2160
+ let s;
2161
+ const a = f(
2147
2162
  E,
2148
2163
  () => {
2149
- n = E.value(), E.setMessage(`
2150
- \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), B = new YD(), B.autoClockwise = !0, B.closed = !1, L.use(B), B.point1 = C, B.point3 = n, E.setUserDraw((c, m) => {
2164
+ s = E.value(), E.setMessage(`
2165
+ \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), B = new YD(), B.autoClockwise = !0, B.closed = !1, S.use(B), B.point1 = C, B.point3 = s, E.setUserDraw((c, m) => {
2151
2166
  B.point2 = c, m.drawCustomEntity(B);
2152
2167
  }), g();
2153
2168
  },
2154
2169
  () => {
2155
2170
  if (E.isKeyWordPicked("C"))
2156
- F = new q(), F.closed = !1, L.use(F), E.setMessage(`
2171
+ F = new q(), F.closed = !1, S.use(F), E.setMessage(`
2157
2172
  \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), E.setKeyWords(""), E.setUserDraw((c, m) => {
2158
2173
  F.startPoint = C, m.drawLine(c, F.startPoint);
2159
2174
  }), e();
2160
2175
  else if (E.isKeyWordPicked("E"))
2161
- F = new q(), F.closed = !1, L.use(F), E.setMessage(`
2176
+ F = new q(), F.closed = !1, S.use(F), E.setMessage(`
2162
2177
  \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), E.setKeyWords(""), E.setUserDraw((c, m) => {
2163
2178
  F.startPoint = C, m.drawLine(c, F.startPoint);
2164
2179
  }), e();
@@ -2166,11 +2181,11 @@ async function UD() {
2166
2181
  return !0;
2167
2182
  }
2168
2183
  );
2169
- let h = r.App.GetCurrentMxCAD();
2184
+ let h = i.App.GetCurrentMxCAD();
2170
2185
  const g = f(
2171
2186
  E,
2172
2187
  () => {
2173
- B.point1 = C, B.point2 = E.value(), B.point3 = n, h.DrawArc2(B.point1.x, B.point1.y, B.point3.x, B.point3.y, B.point2.x, B.point2.y);
2188
+ B.point1 = C, B.point2 = E.value(), B.point3 = s, h.DrawArc2(B.point1.x, B.point1.y, B.point3.x, B.point3.y, B.point2.x, B.point2.y);
2174
2189
  },
2175
2190
  () => {
2176
2191
  if (E.isKeyWordPicked("C"))
@@ -2188,15 +2203,15 @@ d.on("init", () => {
2188
2203
  });
2189
2204
  function zD() {
2190
2205
  const E = new T(), D = new QD();
2191
- D.closed = !1, L.use(D), E.setMessage(`
2206
+ D.closed = !1, S.use(D), E.setMessage(`
2192
2207
  \u6307\u5B9A\u692D\u5706\u7684\u8F74\u7AEF\u70B9`), E.setKeyWords("[\u4E2D\u5FC3\u70B9(C)]");
2193
2208
  let C, B = new THREE.Vector3();
2194
2209
  f(
2195
2210
  E,
2196
2211
  () => {
2197
- C = E.value(), E.setUserDraw((i, o) => {
2198
- const a = new THREE.Line3(C, i);
2199
- a.getCenter(B), D.center = B, D.xRadius = a.distance() / 2, D.yRadius = D.xRadius, D.rotation = DD(i.x, i.y, B.x, B.y), o.drawLine(i, C);
2212
+ C = E.value(), E.setUserDraw((r, o) => {
2213
+ const u = new THREE.Line3(C, r);
2214
+ u.getCenter(B), D.center = B, D.xRadius = u.distance() / 2, D.yRadius = D.xRadius, D.rotation = DD(r.x, r.y, B.x, B.y), o.drawLine(r, C);
2200
2215
  }), E.setMessage(`
2201
2216
  \u6307\u5B9A\u692D\u5706\u5F27\u8F74\u7684\u53E6\u4E00\u4E2A\u7AEF\u70B9:`), E.setKeyWords(""), A();
2202
2217
  },
@@ -2206,8 +2221,8 @@ function zD() {
2206
2221
  const A = f(
2207
2222
  E,
2208
2223
  () => {
2209
- E.setUserDraw((i, o) => {
2210
- D.yRadius = B.distanceTo(i), o.drawLine(B, i), o.drawCustomEntity(D);
2224
+ E.setUserDraw((r, o) => {
2225
+ D.yRadius = B.distanceTo(r), o.drawLine(B, r), o.drawCustomEntity(D);
2211
2226
  }), E.setMessage(`
2212
2227
  \u6307\u5B9A\u53E6\u4E00\u6761\u534A\u8F74\u957F\u5EA6`), E.setKeyWords(""), t();
2213
2228
  },
@@ -2217,8 +2232,8 @@ function zD() {
2217
2232
  E,
2218
2233
  () => {
2219
2234
  E.setMessage(`
2220
- \u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`), E.setKeyWords(""), E.setUserDraw((i, o) => {
2221
- D.startAngle = DD(i.x, i.y, B.x, B.y) - D.rotation, o.drawLine(B, i), o.drawCustomEntity(D);
2235
+ \u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`), E.setKeyWords(""), E.setUserDraw((r, o) => {
2236
+ D.startAngle = DD(r.x, r.y, B.x, B.y) - D.rotation, o.drawLine(B, r), o.drawCustomEntity(D);
2222
2237
  }), e();
2223
2238
  },
2224
2239
  () => {
@@ -2226,24 +2241,24 @@ function zD() {
2226
2241
  ), e = f(
2227
2242
  E,
2228
2243
  () => {
2229
- E.setUserDraw((i, o) => {
2230
- D.endAngle = DD(i.x, i.y, B.x, B.y) - D.rotation, o.drawLine(B, i), o.drawCustomEntity(D);
2244
+ E.setUserDraw((r, o) => {
2245
+ D.endAngle = DD(r.x, r.y, B.x, B.y) - D.rotation, o.drawLine(B, r), o.drawCustomEntity(D);
2231
2246
  }), E.setMessage(`
2232
- \u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`), E.setKeyWords(""), s();
2247
+ \u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`), E.setKeyWords(""), n();
2233
2248
  },
2234
2249
  () => {
2235
2250
  }
2236
- ), s = f(
2251
+ ), n = f(
2237
2252
  E,
2238
2253
  () => {
2239
- let i = new w(D.xRadius, 0, 0);
2240
- i.rotateBy(D.rotation, w.kZAxis), r.App.GetCurrentMxCAD().DrawEllipseArc(D.center.x, D.center.y, i.x, i.y, D.yRadius / D.xRadius, D.startAngle, D.endAngle);
2254
+ let r = new w(D.xRadius, 0, 0);
2255
+ r.rotateBy(D.rotation, w.kZAxis), i.App.GetCurrentMxCAD().DrawEllipseArc(D.center.x, D.center.y, r.x, r.y, D.yRadius / D.xRadius, D.startAngle, D.endAngle);
2241
2256
  },
2242
2257
  () => {
2243
2258
  }
2244
2259
  );
2245
2260
  }
2246
- function gC() {
2261
+ function yC() {
2247
2262
  const E = new T(), D = new XD(), C = new DC();
2248
2263
  E.setMessage(`
2249
2264
  \u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u692D\u5706:`), E.go(() => {
@@ -2251,12 +2266,12 @@ function gC() {
2251
2266
  C.point2 = B, D.drawCustomEntity(C);
2252
2267
  }), E.setUserDraw(D), E.setMessage(`
2253
2268
  \u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\u692D\u5706:`), E.go(() => {
2254
- r.App.GetCurrentMxCAD().DrawEllipse(C.center.x, C.center.y, C.xRadius, 0, C.yRadius / C.xRadius);
2269
+ i.App.GetCurrentMxCAD().DrawEllipse(C.center.x, C.center.y, C.xRadius, 0, C.yRadius / C.xRadius);
2255
2270
  });
2256
2271
  });
2257
2272
  }
2258
2273
  d.on("init", () => {
2259
- d.addCommand("Mx_EllipseArc", zD), d.addCommand("Mx_Ellipse", gC);
2274
+ d.addCommand("Mx_EllipseArc", zD), d.addCommand("Mx_Ellipse", yC);
2260
2275
  });
2261
2276
  async function VD() {
2262
2277
  (await eD.selectEnt(`
@@ -2265,16 +2280,16 @@ async function VD() {
2265
2280
  });
2266
2281
  }
2267
2282
  d.addCommand("Mx_Erase", VD);
2268
- const yC = async (E, D, C) => {
2283
+ const xC = async (E, D, C) => {
2269
2284
  const { locateFile: B } = C, F = B(E + ".js");
2270
2285
  return await vD(F), await globalThis[D](C);
2271
2286
  };
2272
- function xC(E) {
2287
+ function bC(E) {
2273
2288
  return typeof ResizeObserver == "function" ? new ResizeObserver(E) : null;
2274
2289
  }
2275
- function bC(E, D) {
2290
+ function fC(E, D) {
2276
2291
  const C = () => requestAnimationFrame(D);
2277
- let B = xC(C);
2292
+ let B = bC(C);
2278
2293
  if (B) {
2279
2294
  B.observe(E);
2280
2295
  return;
@@ -2284,7 +2299,7 @@ function bC(E, D) {
2284
2299
  return;
2285
2300
  }
2286
2301
  }
2287
- function fC(E, D) {
2302
+ function MC(E, D) {
2288
2303
  let C = null;
2289
2304
  return function(...B) {
2290
2305
  C || (C = setTimeout(() => {
@@ -2297,42 +2312,42 @@ class z {
2297
2312
  canvas;
2298
2313
  constructor(D) {
2299
2314
  const C = () => {
2300
- const a = this.canvas.parentElement?.clientWidth || window.innerWidth, l = this.canvas.parentElement?.clientHeight || window.innerHeight;
2301
- let n = Math.min(a, window.screen.availWidth), u = Math.min(l, window.screen.availHeight);
2302
- n = Math.max(A, n), u = Math.max(t, u), this.canvas.style.width = n + 1 + "px", this.canvas.style.height = u + "px";
2315
+ const u = this.canvas.parentElement?.clientWidth || window.innerWidth, l = this.canvas.parentElement?.clientHeight || window.innerHeight;
2316
+ let s = Math.min(u, window.screen.availWidth), a = Math.min(l, window.screen.availHeight);
2317
+ s = Math.max(A, s), a = Math.max(t, a), this.canvas.style.width = s + 1 + "px", this.canvas.style.height = a + "px";
2303
2318
  const h = window.devicePixelRatio || 1;
2304
- this.canvas.width = n * h, this.canvas.height = u * h;
2305
- }, B = fC(C, 50), {
2319
+ this.canvas.width = s * h, this.canvas.height = a * h;
2320
+ }, B = MC(C, 50), {
2306
2321
  canvas: F,
2307
2322
  minWidth: A = 300,
2308
2323
  minHeight: t = 300,
2309
2324
  updateCanvasSize: e = B,
2310
- ...s
2325
+ ...n
2311
2326
  } = D;
2312
- let i = typeof F == "string" ? document.querySelectorAll(F)[0] : F, o = i.getContext("webgl2", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 });
2313
- o == null && (o = i.getContext("webgl", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 })), this.canvas = i, this.ctx = o, s.canvas = this.canvas;
2314
- for (let a in s)
2315
- this[a] = s[a];
2327
+ let r = typeof F == "string" ? document.querySelectorAll(F)[0] : F, o = r.getContext("webgl2", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 });
2328
+ o == null && (o = r.getContext("webgl", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 })), this.canvas = r, this.ctx = o, n.canvas = this.canvas;
2329
+ for (let u in n)
2330
+ this[u] = n[u];
2316
2331
  if (this.canvas instanceof HTMLCanvasElement) {
2317
- const a = this.canvas.parentElement || document.body;
2318
- bC(a, e);
2332
+ const u = this.canvas.parentElement || document.body;
2333
+ fC(u, e);
2319
2334
  } else
2320
2335
  console.error("createMxDraw3d canvas \u53C2\u6570\u4E0D\u6B63\u786E \u65E0\u6CD5\u83B7\u53D6\u5230canvas\u5143\u7D20");
2321
- window.onresize = C, C(), yC("mxdraw3d_min", "mxdraw3d", this).then(() => {
2322
- z.onloadWasmMxDraw3dModel && z.onloadWasmMxDraw3dModel(this), this.updateCanvasSize = e, this.open3DFile = (a) => {
2336
+ window.onresize = C, C(), xC("mxdraw3d_min", "mxdraw3d", this).then(() => {
2337
+ z.onloadWasmMxDraw3dModel && z.onloadWasmMxDraw3dModel(this), this.updateCanvasSize = e, this.open3DFile = (u) => {
2323
2338
  const l = new FileReader();
2324
2339
  l.onload = () => {
2325
2340
  if (!!l.result && l.result instanceof ArrayBuffer) {
2326
- var n = new Uint8Array(l.result);
2327
- const u = this._malloc(n.length);
2328
- this.HEAPU8.set(n, u), this.openFromMemory(a.name, u, n.length, !0), this.displayGround(!0), this.canvas.focus();
2341
+ var s = new Uint8Array(l.result);
2342
+ const a = this._malloc(s.length);
2343
+ this.HEAPU8.set(s, a), this.openFromMemory(u.name, a, s.length, !0), this.displayGround(!0), this.canvas.focus();
2329
2344
  }
2330
- }, l.readAsArrayBuffer(a);
2345
+ }, l.readAsArrayBuffer(u);
2331
2346
  };
2332
2347
  });
2333
2348
  }
2334
2349
  }
2335
- function MC(E, D) {
2350
+ function TC(E, D) {
2336
2351
  return new Promise(async (C, B) => {
2337
2352
  try {
2338
2353
  E.locateFile || (E.locateFile = iC);
@@ -2345,19 +2360,19 @@ function MC(E, D) {
2345
2360
  }
2346
2361
  });
2347
2362
  }
2348
- const kC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2363
+ const PC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2349
2364
  __proto__: null,
2350
2365
  b64Encode: uD,
2351
2366
  b64Decode: lD,
2352
2367
  saveAsFileDialog: cD,
2353
2368
  downloadFile: mD,
2354
2369
  downloadFileFromUrl: pD,
2355
- MxTools: N,
2370
+ MxTools: H,
2356
2371
  McGePoint3d: p,
2357
2372
  McGeVector3d: w,
2358
2373
  McGeMatrix3d: W,
2359
- getFilterImp: K,
2360
- McDrawResbuf: H,
2374
+ getFilterImp: N,
2375
+ McDrawResbuf: K,
2361
2376
  McDrawUtilityClass: PD,
2362
2377
  McDrawUtility: eD,
2363
2378
  McDrawSelSet: RD,
@@ -2391,27 +2406,27 @@ const kC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2391
2406
  McDbRotatedDimension: TD,
2392
2407
  McDbArc: kD,
2393
2408
  McObject: U,
2394
- McAppType: SD,
2395
- MxCppType: LD,
2409
+ McAppType: LD,
2410
+ MxCppType: SD,
2396
2411
  get MxCpp() {
2397
- return r;
2412
+ return i;
2398
2413
  },
2399
2414
  loadMxCADassembly: OD,
2400
2415
  createMxCad: oC,
2401
2416
  drawText: aC,
2402
2417
  drawCircle: jD,
2403
2418
  drawLine: ID,
2404
- drawMText: pC,
2419
+ drawMText: dC,
2405
2420
  drawPolyLine: GD,
2406
2421
  drawPolygon: WD,
2407
2422
  drawArc: UD,
2408
2423
  drawEllipticalArc: zD,
2409
2424
  mxErase: VD,
2410
2425
  MxDraw3d: z,
2411
- loadMxCADassembly3d: MC
2426
+ loadMxCADassembly3d: TC
2412
2427
  }, Symbol.toStringTag, { value: "Module" }));
2413
2428
  export {
2414
- SD as McAppType,
2429
+ LD as McAppType,
2415
2430
  j as McCmColor,
2416
2431
  BD as McDb,
2417
2432
  MD as McDbAlignedDimension,
@@ -2436,7 +2451,7 @@ export {
2436
2451
  TD as McDbRotatedDimension,
2437
2452
  Y as McDbText,
2438
2453
  wD as McDbTextStyleTable,
2439
- H as McDrawResbuf,
2454
+ K as McDrawResbuf,
2440
2455
  RD as McDrawSelSet,
2441
2456
  eD as McDrawUtility,
2442
2457
  PD as McDrawUtilityClass,
@@ -2447,27 +2462,27 @@ export {
2447
2462
  M as McObjectId,
2448
2463
  b as McObjectIdType,
2449
2464
  O as McRxObject,
2450
- r as MxCpp,
2451
- LD as MxCppType,
2465
+ i as MxCpp,
2466
+ SD as MxCppType,
2452
2467
  z as MxDraw3d,
2453
- N as MxTools,
2468
+ H as MxTools,
2454
2469
  lD as b64Decode,
2455
2470
  uD as b64Encode,
2456
2471
  oC as createMxCad,
2457
- kC as default,
2472
+ PC as default,
2458
2473
  mD as downloadFile,
2459
2474
  pD as downloadFileFromUrl,
2460
2475
  UD as drawArc,
2461
2476
  jD as drawCircle,
2462
2477
  zD as drawEllipticalArc,
2463
2478
  ID as drawLine,
2464
- pC as drawMText,
2479
+ dC as drawMText,
2465
2480
  GD as drawPolyLine,
2466
2481
  WD as drawPolygon,
2467
2482
  aC as drawText,
2468
- K as getFilterImp,
2483
+ N as getFilterImp,
2469
2484
  OD as loadMxCADassembly,
2470
- MC as loadMxCADassembly3d,
2485
+ TC as loadMxCADassembly3d,
2471
2486
  VD as mxErase,
2472
2487
  cD as saveAsFileDialog
2473
2488
  };