@mlightcad/cad-simple-viewer 1.4.9 → 1.4.11

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.
Files changed (151) hide show
  1. package/dist/index.js +17930 -12377
  2. package/dist/index.umd.cjs +158 -30
  3. package/dist/libredwg-parser-worker.js +78 -31
  4. package/dist/mtext-renderer-worker.js +28725 -28097
  5. package/lib/app/AcApAnnotation.d.ts +2 -1
  6. package/lib/app/AcApAnnotation.d.ts.map +1 -1
  7. package/lib/app/AcApAnnotation.js +2 -1
  8. package/lib/app/AcApAnnotation.js.map +1 -1
  9. package/lib/app/AcApContext.d.ts.map +1 -1
  10. package/lib/app/AcApContext.js +14 -3
  11. package/lib/app/AcApContext.js.map +1 -1
  12. package/lib/app/AcApDocManager.d.ts +28 -1
  13. package/lib/app/AcApDocManager.d.ts.map +1 -1
  14. package/lib/app/AcApDocManager.js +117 -16
  15. package/lib/app/AcApDocManager.js.map +1 -1
  16. package/lib/app/AcApDocument.d.ts.map +1 -1
  17. package/lib/app/AcApDocument.js +2 -2
  18. package/lib/app/AcApDocument.js.map +1 -1
  19. package/lib/command/AcApClearMeasurementsCmd.d.ts +13 -0
  20. package/lib/command/AcApClearMeasurementsCmd.d.ts.map +1 -0
  21. package/lib/command/AcApClearMeasurementsCmd.js +86 -0
  22. package/lib/command/AcApClearMeasurementsCmd.js.map +1 -0
  23. package/lib/command/AcApLogCmd.d.ts.map +1 -1
  24. package/lib/command/AcApLogCmd.js +40 -6
  25. package/lib/command/AcApLogCmd.js.map +1 -1
  26. package/lib/command/AcApMTextCmd.d.ts +12 -0
  27. package/lib/command/AcApMTextCmd.d.ts.map +1 -0
  28. package/lib/command/AcApMTextCmd.js +120 -0
  29. package/lib/command/AcApMTextCmd.js.map +1 -0
  30. package/lib/command/AcApMeasureAngleCmd.d.ts +15 -0
  31. package/lib/command/AcApMeasureAngleCmd.d.ts.map +1 -0
  32. package/lib/command/AcApMeasureAngleCmd.js +358 -0
  33. package/lib/command/AcApMeasureAngleCmd.js.map +1 -0
  34. package/lib/command/AcApMeasureArcCmd.d.ts +25 -0
  35. package/lib/command/AcApMeasureArcCmd.d.ts.map +1 -0
  36. package/lib/command/AcApMeasureArcCmd.js +411 -0
  37. package/lib/command/AcApMeasureArcCmd.js.map +1 -0
  38. package/lib/command/AcApMeasureAreaCmd.d.ts +21 -0
  39. package/lib/command/AcApMeasureAreaCmd.d.ts.map +1 -0
  40. package/lib/command/AcApMeasureAreaCmd.js +379 -0
  41. package/lib/command/AcApMeasureAreaCmd.js.map +1 -0
  42. package/lib/command/AcApMeasureDistanceCmd.d.ts +34 -0
  43. package/lib/command/AcApMeasureDistanceCmd.d.ts.map +1 -0
  44. package/lib/command/AcApMeasureDistanceCmd.js +179 -0
  45. package/lib/command/AcApMeasureDistanceCmd.js.map +1 -0
  46. package/lib/command/AcApSwitchBgCmd.js +2 -2
  47. package/lib/command/AcApSwitchBgCmd.js.map +1 -1
  48. package/lib/command/AcApSysVarCmd.d.ts.map +1 -1
  49. package/lib/command/AcApSysVarCmd.js +16 -6
  50. package/lib/command/AcApSysVarCmd.js.map +1 -1
  51. package/lib/command/AcApZoomToBoxCmd.d.ts +1 -1
  52. package/lib/command/AcApZoomToBoxCmd.d.ts.map +1 -1
  53. package/lib/command/AcApZoomToBoxCmd.js +6 -3
  54. package/lib/command/AcApZoomToBoxCmd.js.map +1 -1
  55. package/lib/command/index.d.ts +6 -0
  56. package/lib/command/index.d.ts.map +1 -1
  57. package/lib/command/index.js +6 -0
  58. package/lib/command/index.js.map +1 -1
  59. package/lib/editor/global/AcEdConditionWaiter.d.ts +1 -1
  60. package/lib/editor/global/AcEdConditionWaiter.d.ts.map +1 -1
  61. package/lib/editor/global/AcEdConditionWaiter.js +3 -2
  62. package/lib/editor/global/AcEdConditionWaiter.js.map +1 -1
  63. package/lib/editor/input/AcEdCursorManager.js +2 -2
  64. package/lib/editor/input/AcEdCursorManager.js.map +1 -1
  65. package/lib/editor/input/AcEditor.d.ts +9 -2
  66. package/lib/editor/input/AcEditor.d.ts.map +1 -1
  67. package/lib/editor/input/AcEditor.js +13 -2
  68. package/lib/editor/input/AcEditor.js.map +1 -1
  69. package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts +20 -0
  70. package/lib/editor/input/prompt/AcEdPromptBoxOptions.d.ts.map +1 -0
  71. package/lib/editor/input/prompt/AcEdPromptBoxOptions.js +80 -0
  72. package/lib/editor/input/prompt/AcEdPromptBoxOptions.js.map +1 -0
  73. package/lib/editor/input/prompt/index.d.ts +1 -0
  74. package/lib/editor/input/prompt/index.d.ts.map +1 -1
  75. package/lib/editor/input/prompt/index.js +1 -0
  76. package/lib/editor/input/prompt/index.js.map +1 -1
  77. package/lib/editor/input/ui/AcEdInputManager.d.ts +23 -2
  78. package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
  79. package/lib/editor/input/ui/AcEdInputManager.js +114 -7
  80. package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
  81. package/lib/editor/input/ui/AcEdMTextEditor.d.ts +79 -0
  82. package/lib/editor/input/ui/AcEdMTextEditor.d.ts.map +1 -0
  83. package/lib/editor/input/ui/AcEdMTextEditor.js +157 -0
  84. package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -0
  85. package/lib/editor/input/ui/index.d.ts +2 -0
  86. package/lib/editor/input/ui/index.d.ts.map +1 -1
  87. package/lib/editor/input/ui/index.js +1 -0
  88. package/lib/editor/input/ui/index.js.map +1 -1
  89. package/lib/editor/view/AcEdBaseView.d.ts +15 -0
  90. package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
  91. package/lib/editor/view/AcEdBaseView.js +3 -1
  92. package/lib/editor/view/AcEdBaseView.js.map +1 -1
  93. package/lib/i18n/en/command.d.ts +12 -0
  94. package/lib/i18n/en/command.d.ts.map +1 -1
  95. package/lib/i18n/en/command.js +12 -0
  96. package/lib/i18n/en/command.js.map +1 -1
  97. package/lib/i18n/en/jig.d.ts +21 -0
  98. package/lib/i18n/en/jig.d.ts.map +1 -1
  99. package/lib/i18n/en/jig.js +21 -0
  100. package/lib/i18n/en/jig.js.map +1 -1
  101. package/lib/i18n/zh/command.d.ts +12 -0
  102. package/lib/i18n/zh/command.d.ts.map +1 -1
  103. package/lib/i18n/zh/command.js +12 -0
  104. package/lib/i18n/zh/command.js.map +1 -1
  105. package/lib/i18n/zh/jig.d.ts +21 -0
  106. package/lib/i18n/zh/jig.d.ts.map +1 -1
  107. package/lib/i18n/zh/jig.js +21 -0
  108. package/lib/i18n/zh/jig.js.map +1 -1
  109. package/lib/index.d.ts +2 -0
  110. package/lib/index.d.ts.map +1 -1
  111. package/lib/index.js +1 -0
  112. package/lib/index.js.map +1 -1
  113. package/lib/plugin/AcApPluginExample.d.ts.map +1 -1
  114. package/lib/plugin/AcApPluginExample.js +7 -6
  115. package/lib/plugin/AcApPluginExample.js.map +1 -1
  116. package/lib/plugin/AcApPluginManager.d.ts +4 -4
  117. package/lib/plugin/AcApPluginManager.d.ts.map +1 -1
  118. package/lib/plugin/AcApPluginManager.js +7 -6
  119. package/lib/plugin/AcApPluginManager.js.map +1 -1
  120. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
  121. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +1 -0
  122. package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
  123. package/lib/util/AcApMeasurementUtils.d.ts +12 -0
  124. package/lib/util/AcApMeasurementUtils.d.ts.map +1 -0
  125. package/lib/util/AcApMeasurementUtils.js +36 -0
  126. package/lib/util/AcApMeasurementUtils.js.map +1 -0
  127. package/lib/util/index.d.ts +1 -0
  128. package/lib/util/index.d.ts.map +1 -1
  129. package/lib/util/index.js +1 -0
  130. package/lib/util/index.js.map +1 -1
  131. package/lib/view/AcTrLayer.d.ts +15 -0
  132. package/lib/view/AcTrLayer.d.ts.map +1 -1
  133. package/lib/view/AcTrLayer.js +13 -2
  134. package/lib/view/AcTrLayer.js.map +1 -1
  135. package/lib/view/AcTrLayout.d.ts +25 -0
  136. package/lib/view/AcTrLayout.d.ts.map +1 -1
  137. package/lib/view/AcTrLayout.js +40 -3
  138. package/lib/view/AcTrLayout.js.map +1 -1
  139. package/lib/view/AcTrLayoutView.d.ts +5 -0
  140. package/lib/view/AcTrLayoutView.d.ts.map +1 -1
  141. package/lib/view/AcTrLayoutView.js +10 -0
  142. package/lib/view/AcTrLayoutView.js.map +1 -1
  143. package/lib/view/AcTrScene.d.ts +30 -4
  144. package/lib/view/AcTrScene.d.ts.map +1 -1
  145. package/lib/view/AcTrScene.js +59 -3
  146. package/lib/view/AcTrScene.js.map +1 -1
  147. package/lib/view/AcTrView2d.d.ts +17 -4
  148. package/lib/view/AcTrView2d.d.ts.map +1 -1
  149. package/lib/view/AcTrView2d.js +64 -15
  150. package/lib/view/AcTrView2d.js.map +1 -1
  151. package/package.json +7 -6
@@ -8874,9 +8874,56 @@ class Xo {
8874
8874
  self.postMessage(K);
8875
8875
  }
8876
8876
  }
8877
+ const jo = {
8878
+ /** Drawing version identifier, for example `AC1014`. */
8879
+ ACADVER: "ACADVER",
8880
+ /** Base angle, in radians, used as the zero direction for angular input/output. */
8881
+ ANGBASE: "ANGBASE",
8882
+ /** Positive angle direction flag: `0` for counterclockwise, `1` for clockwise. */
8883
+ ANGDIR: "ANGDIR",
8884
+ /** Angular unit display mode, such as decimal degrees or degrees/minutes/seconds. */
8885
+ AUNITS: "AUNITS",
8886
+ /** Current color applied to newly created entities. */
8887
+ CECOLOR: "CECOLOR",
8888
+ /** Current entity linetype scale multiplier for newly created entities. */
8889
+ CELTSCALE: "CELTSCALE",
8890
+ /** Current lineweight applied to newly created entities. */
8891
+ CELWEIGHT: "CELWEIGHT",
8892
+ /** Current layer name used when creating new entities. */
8893
+ CLAYER: "CLAYER",
8894
+ /** UI color theme selector used by the application shell or viewer integration. */
8895
+ COLORTHEME: "COLORTHEME",
8896
+ /** Upper-right corner of the model-space drawing extents. */
8897
+ EXTMAX: "EXTMAX",
8898
+ /** Lower-left corner of the model-space drawing extents. */
8899
+ EXTMIN: "EXTMIN",
8900
+ /** Insertion units used for automatic scaling of inserted content. */
8901
+ INSUNITS: "INSUNITS",
8902
+ /** Global linetype scale multiplier for the drawing database. */
8903
+ LTSCALE: "LTSCALE",
8904
+ /** Flag indicating whether lineweights are displayed in the editor/viewer. */
8905
+ LWDISPLAY: "LWDISPLAY",
8906
+ /** Color used for measurement tool overlays (distance, area, arc). */
8907
+ MEASUREMENTCOLOR: "MEASUREMENTCOLOR",
8908
+ /** Running object snap mode bitmask (OSNAP settings). */
8909
+ OSMODE: "OSMODE",
8910
+ /** Point display style bitmask that controls how POINT entities are drawn. */
8911
+ PDMODE: "PDMODE",
8912
+ /** Point display size, expressed as an absolute value or viewport percentage. */
8913
+ PDSIZE: "PDSIZE",
8914
+ /** Pickbox half-size, in pixels, used for selection hit testing in the UI. */
8915
+ PICKBOX: "PICKBOX",
8916
+ /** Current text style name used when creating new text entities. */
8917
+ TEXTSTYLE: "TEXTSTYLE",
8918
+ /** Flag indicating whether the drawing background should be rendered as white. */
8919
+ WHITEBKCOLOR: "WHITEBKCOLOR"
8920
+ };
8921
+ Object.freeze(
8922
+ Object.values(jo)
8923
+ );
8877
8924
  new tw(), new KQ(0, 0, 1), new KQ(0, 0, 0), iE.OPTIMIZED_2D, new KQ(0, 0, 0), new KQ(1, 0, 0), new KQ(0, 1, 0), hE.TOP, SE.ONE_DISTANT_LIGHT;
8878
- var jo = Object.defineProperty, _o = (I, A, Q) => A in I ? jo(I, A, { enumerable: !0, configurable: !0, writable: !0, value: Q }) : I[A] = Q, og = (I, A, Q) => _o(I, typeof A != "symbol" ? A + "" : A, Q);
8879
- const $o = [
8925
+ var _o = Object.defineProperty, $o = (I, A, Q) => A in I ? _o(I, A, { enumerable: !0, configurable: !0, writable: !0, value: Q }) : I[A] = Q, og = (I, A, Q) => $o(I, typeof A != "symbol" ? A + "" : A, Q);
8926
+ const Ac = [
8880
8927
  "utf-8",
8881
8928
  // 0
8882
8929
  "utf-8",
@@ -8957,9 +9004,9 @@ const $o = [
8957
9004
  "utf-16le",
8958
9005
  "windows-1258"
8959
9006
  // Vietnamese
8960
- ], IE = (I) => $o[I];
9007
+ ], IE = (I) => Ac[I];
8961
9008
  var vB = /* @__PURE__ */ ((I) => (I[I.TopLeft = 1] = "TopLeft", I[I.TopCenter = 2] = "TopCenter", I[I.TopRight = 3] = "TopRight", I[I.MiddleLeft = 4] = "MiddleLeft", I[I.MiddleCenter = 5] = "MiddleCenter", I[I.MiddleRight = 6] = "MiddleRight", I[I.BottomLeft = 7] = "BottomLeft", I[I.BottomCenter = 8] = "BottomCenter", I[I.BottomRight = 9] = "BottomRight", I))(vB || {}), qI = /* @__PURE__ */ ((I) => (I[I.PatternFill = 0] = "PatternFill", I[I.SolidFill = 1] = "SolidFill", I))(qI || {}), xI = /* @__PURE__ */ ((I) => (I[I.NonAssociative = 0] = "NonAssociative", I[I.Associative = 1] = "Associative", I))(xI || {}), HQ = /* @__PURE__ */ ((I) => (I[I.Line = 1] = "Line", I[I.Circular = 2] = "Circular", I[I.Elliptic = 3] = "Elliptic", I[I.Spline = 4] = "Spline", I))(HQ || {}), rI = /* @__PURE__ */ ((I) => (I[I.LEFT = 0] = "LEFT", I[I.CENTER = 1] = "CENTER", I[I.RIGHT = 2] = "RIGHT", I[I.ALIGNED = 3] = "ALIGNED", I[I.MIDDLE = 4] = "MIDDLE", I[I.FIT = 5] = "FIT", I))(rI || {});
8962
- const Ac = Object.freeze([
9009
+ const gc = Object.freeze([
8963
9010
  "ACADMAINTVER",
8964
9011
  "ACADVER",
8965
9012
  "ANGBASE",
@@ -9174,7 +9221,7 @@ const Ac = Object.freeze([
9174
9221
  "WORLDVIEW",
9175
9222
  "XCLIPFRAME",
9176
9223
  "XEDIT"
9177
- ]), gc = [
9224
+ ]), Cc = [
9178
9225
  {
9179
9226
  type: "invalid",
9180
9227
  hdr: "INVALI",
@@ -9441,7 +9488,7 @@ var EE = (() => {
9441
9488
  c = E, K = w;
9442
9489
  }), M = typeof window == "object", y = typeof WorkerGlobalScope < "u", S = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && process.type != "renderer";
9443
9490
  if (S) {
9444
- const { createRequire: E } = await Promise.resolve().then(() => Nc);
9491
+ const { createRequire: E } = await Promise.resolve().then(() => Jc);
9445
9492
  var n = E(import.meta.url);
9446
9493
  }
9447
9494
  var Z = Object.assign({}, C), V = "./this.program", t = "";
@@ -11815,8 +11862,8 @@ Object.fromEntries(
11815
11862
  Object.entries(SA).map(([I, A]) => [A, I])
11816
11863
  );
11817
11864
  var OI = /* @__PURE__ */ ((I) => (I[I.DWG = 0] = "DWG", I[I.DXF = 1] = "DXF", I))(OI || {}), kQ = /* @__PURE__ */ ((I) => (I[I.Line = 1] = "Line", I[I.CircularArc = 2] = "CircularArc", I[I.EllipticArc = 3] = "EllipticArc", I[I.Spline = 4] = "Spline", I))(kQ || {});
11818
- const Cc = "*MODEL_SPACE", Bc = "*PAPER_SPACE", aD = (I) => I && I.toUpperCase() == Cc, Qc = (I) => I && I.toUpperCase().startsWith(Bc), Hg = (I) => I.toString(16).toUpperCase();
11819
- class Ic {
11865
+ const Bc = "*MODEL_SPACE", Qc = "*PAPER_SPACE", aD = (I) => I && I.toUpperCase() == Bc, Ic = (I) => I && I.toUpperCase().startsWith(Qc), Hg = (I) => I.toString(16).toUpperCase();
11866
+ class Ec {
11820
11867
  constructor(A) {
11821
11868
  og(this, "libredwg"), og(this, "layers", /* @__PURE__ */ new Map()), og(this, "ltypes", /* @__PURE__ */ new Map()), og(this, "unknownEntityCount"), this.libredwg = A, this.unknownEntityCount = 0;
11822
11869
  }
@@ -13159,7 +13206,7 @@ class Ic {
13159
13206
  }
13160
13207
  class DE {
13161
13208
  constructor(A) {
13162
- og(this, "libredwg"), og(this, "entityConverter"), this.libredwg = A, this.entityConverter = new Ic(A);
13209
+ og(this, "libredwg"), og(this, "entityConverter"), this.libredwg = A, this.entityConverter = new Ec(A);
13163
13210
  }
13164
13211
  convert(A) {
13165
13212
  this.entityConverter.clear();
@@ -13232,7 +13279,7 @@ class DE {
13232
13279
  case SA.DWG_TYPE_BLOCK_HEADER:
13233
13280
  {
13234
13281
  const S = this.convertBlockRecord(M, H);
13235
- Q.tables.BLOCK_RECORD.entries.push(S), (aD(S.name) || Qc(S.name)) && S.entities.forEach((n) => {
13282
+ Q.tables.BLOCK_RECORD.entries.push(S), (aD(S.name) || Ic(S.name)) && S.entities.forEach((n) => {
13236
13283
  Q.entities.push(n), n.type === "INSERT" && n.attribs.forEach((Z) => {
13237
13284
  Q.entities.push(Z);
13238
13285
  });
@@ -13274,7 +13321,7 @@ class DE {
13274
13321
  }
13275
13322
  convertHeader(A, Q) {
13276
13323
  const C = this.libredwg;
13277
- Ac.forEach((c) => {
13324
+ gc.forEach((c) => {
13278
13325
  let K = c;
13279
13326
  (c == "DIMBLK" || c == "DIMBLK1" || c == "DIMBLK2") && (K = K + "_T");
13280
13327
  let H = C.dwg_dynapi_header_value(A, K).data;
@@ -13789,7 +13836,7 @@ class rC {
13789
13836
  ];
13790
13837
  }
13791
13838
  }
13792
- function Ec(I, A, Q, C, c) {
13839
+ function Dc(I, A, Q, C, c) {
13793
13840
  const K = Q.length;
13794
13841
  if (K === 0) throw new Error("points must not be empty");
13795
13842
  const H = Q[0].length;
@@ -13827,10 +13874,10 @@ function Ec(I, A, Q, C, c) {
13827
13874
  }
13828
13875
  const e = new Array(H);
13829
13876
  for (let r = 0; r < H; r++)
13830
- e[r] = Dc(t[V][r] / t[V][H], -9);
13877
+ e[r] = wc(t[V][r] / t[V][H], -9);
13831
13878
  return e;
13832
13879
  }
13833
- function Dc(I, A) {
13880
+ function wc(I, A) {
13834
13881
  if (isNaN(I) || !Number.isInteger(A))
13835
13882
  return NaN;
13836
13883
  const [Q, C = "0"] = I.toString().split("e"), c = Math.round(+`${Q}e${+C - A}`), [K, H = "0"] = c.toString().split("e");
@@ -14355,7 +14402,7 @@ const nD = class lD {
14355
14402
  }
14356
14403
  };
14357
14404
  og(nD, "NAMES", II);
14358
- let wc = nD;
14405
+ let oc = nD;
14359
14406
  class pC {
14360
14407
  constructor(A, Q) {
14361
14408
  og(this, "x"), og(this, "y"), this.x = A, this.y = Q;
@@ -14377,7 +14424,7 @@ class pC {
14377
14424
  return A === 0 ? new pC(0, 0) : new pC(this.x / A, this.y / A);
14378
14425
  }
14379
14426
  }
14380
- function oc(I, A, Q, C = 5) {
14427
+ function cc(I, A, Q, C = 5) {
14381
14428
  let c, K, H;
14382
14429
  Q < 0 ? (c = Math.atan(-Q) * 4, K = new pC(I.x, I.y), H = new pC(A.x, A.y)) : (c = Math.atan(Q) * 4, K = new pC(A.x, A.y), H = new pC(I.x, I.y));
14383
14430
  const M = H.sub(K), y = M.length(), S = K.add(M.multiply(0.5)), n = Math.abs(y / 2 / Math.tan(c / 2)), Z = M.norm(), V = new pC(
@@ -14395,7 +14442,7 @@ function oc(I, A, Q, C = 5) {
14395
14442
  }
14396
14443
  return Q < 0 && oA.reverse(), oA;
14397
14444
  }
14398
- function cc(I, A = !1) {
14445
+ function Gc(I, A = !1) {
14399
14446
  let Q = [];
14400
14447
  const C = I.vertices.map((c) => ({
14401
14448
  x: c.x,
@@ -14406,12 +14453,12 @@ function cc(I, A = !1) {
14406
14453
  for (let c = 0, K = C.length; c < K - 1; ++c) {
14407
14454
  const H = C[c], M = C[c + 1];
14408
14455
  Q.push(H), C[c].bulge && (Q = Q.concat(
14409
- oc(H, M, I.vertices[c].bulge)
14456
+ cc(H, M, I.vertices[c].bulge)
14410
14457
  )), c === K - 2 && Q.push(M);
14411
14458
  }
14412
14459
  return Q;
14413
14460
  }
14414
- class Gc {
14461
+ class Uc {
14415
14462
  constructor() {
14416
14463
  og(this, "blockMap", /* @__PURE__ */ new Map());
14417
14464
  }
@@ -14446,7 +14493,7 @@ class Gc {
14446
14493
  for (let t = 0; t <= c; ++t) {
14447
14494
  let r = (t / c * (V - Z) + Z - S[0]) / (S[1] - S[0]);
14448
14495
  r = Math.max(0, Math.min(1, r));
14449
- const W = Ec(
14496
+ const W = Dc(
14450
14497
  r,
14451
14498
  Q,
14452
14499
  M,
@@ -14737,7 +14784,7 @@ class Gc {
14737
14784
  Q = this.line(A);
14738
14785
  break;
14739
14786
  case "LWPOLYLINE": {
14740
- const C = A, c = !!(C.flag & 512), K = cc(C, c);
14787
+ const C = A, c = !!(C.flag & 512), K = Gc(C, c);
14741
14788
  Q = this.vertices(K, c);
14742
14789
  break;
14743
14790
  }
@@ -14778,7 +14825,7 @@ class Gc {
14778
14825
  return Q ? this.addFlipXIfApplicable(A, Q) : null;
14779
14826
  }
14780
14827
  getEntityColor(A, Q) {
14781
- const C = new wc();
14828
+ const C = new oc();
14782
14829
  if (Q.colorIndex != null ? C.colorIndex = Q.colorIndex : Q.colorName ? C.colorName = Q.colorName : Q.color != null && (C.color = Q.color), C.colorIndex == 7 && (C.colorIndex = 256), C.isByLayer) {
14783
14830
  const c = A.find(
14784
14831
  (K) => K.name === Q.layer
@@ -14849,7 +14896,7 @@ const tD = class fD {
14849
14896
  */
14850
14897
  dwg_get_version_type(A) {
14851
14898
  const Q = this.wasmInstance.dwg_get_version_type(A);
14852
- return gc[Q];
14899
+ return Cc[Q];
14853
14900
  }
14854
14901
  /**
14855
14902
  * Gets code page of the dwg.
@@ -14917,7 +14964,7 @@ const tD = class fD {
14917
14964
  * @returns Returns the converted svg string.
14918
14965
  */
14919
14966
  dwg_to_svg(A) {
14920
- return new Gc().convert(A);
14967
+ return new Uc().convert(A);
14921
14968
  }
14922
14969
  /**
14923
14970
  * Frees the whole DWG. all tables, sections, objects, ...
@@ -15782,9 +15829,9 @@ const tD = class fD {
15782
15829
  }
15783
15830
  };
15784
15831
  og(tD, "instance");
15785
- let Uc = tD;
15786
- async function Yc(I) {
15787
- const A = await Uc.create();
15832
+ let Yc = tD;
15833
+ async function Kc(I) {
15834
+ const A = await Yc.create();
15788
15835
  if (A == null)
15789
15836
  throw new Error("libredwg is not loaded!");
15790
15837
  const Q = A.dwg_read_data(I, OI.DWG);
@@ -15793,16 +15840,16 @@ async function Yc(I) {
15793
15840
  const C = A.convertEx(Q);
15794
15841
  return A.dwg_free(Q), C;
15795
15842
  }
15796
- class Kc extends Xo {
15843
+ class Nc extends Xo {
15797
15844
  async executeTask(A) {
15798
- const Q = await Yc(A);
15845
+ const Q = await Kc(A);
15799
15846
  return {
15800
15847
  model: Q.database,
15801
15848
  data: Q.stats
15802
15849
  };
15803
15850
  }
15804
15851
  }
15805
- new Kc();
15806
- const Nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15852
+ new Nc();
15853
+ const Jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15807
15854
  __proto__: null
15808
15855
  }, Symbol.toStringTag, { value: "Module" }));