@mlightcad/cad-simple-viewer 1.3.3 → 1.3.4
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 +378 -365
- package/dist/index.umd.cjs +12 -12
- package/dist/libredwg-parser-worker.js +176 -176
- package/dist/mtext-renderer-worker.js +468 -466
- package/lib/view/AcTrLayout.d.ts +14 -5
- package/lib/view/AcTrLayout.d.ts.map +1 -1
- package/lib/view/AcTrLayout.js +33 -25
- package/lib/view/AcTrLayout.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +6 -0
- package/lib/view/AcTrView2d.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AcDbLayout as Aa, AcCmEventManager as
|
|
1
|
+
import { AcDbLayout as Aa, AcCmEventManager as ye, AcDbSysVarManager as us, AcGePoint3d as He, acdbHostApplicationServices as ds, AcDbOsnapMode as rc, AcGeBox2d as Ke, AcGeBox3d as Oa, AcGePoint2d as je, AcDbDatabase as sc, AcDbFileType as Hn, AcCmTransparency as Wn, AcGiLineWeight as Vr, AcCmColor as $n, AcGeGeometryUtil as ic, AcGeVector2d as Hr, deepClone as Ws, AcDbCircle as ps, AcGeMathUtil as ac, AcGeVector3d as Bt, AcDbDataGenerator as oc, AcDbAlignedDimension as fs, AcDbLine as gs, AcCmPerformanceCollector as cc, AcDbViewport as Pa, AcDbRasterImage as Da, AcDbRay as Ra, AcDbXline as Ua, AcDbDatabaseConverter as lc, createWorkerApi as hc, AcDbLinetypeTableRecord as uc, AcDbTextStyleTableRecord as dc, AcDbDimStyleTableRecord as pc, AcDbLayerTableRecord as fc, AcDbViewportTableRecord as gc, AcDbBlockTableRecord as mc, AcDbBatchProcessing as yc, AcDbRasterImageDef as bc, AcDbFace as vc, AcDbArc as xc, AcDbEllipse as wc, AcDbSpline as $s, AcDbPoint as Sc, AcDbTrace as _c, AcDbPolyline as Cc, AcDbPoly2dType as In, AcDb2dPolyline as Tc, AcDbPoly3dType as ur, AcDb3dPolyline as Ic, AcDbHatch as Ec, AcGePolyline2d as Mc, AcGeLoop2d as kc, AcGeLine2d as Lc, AcGeCircArc2d as Bc, AcGeEllipseArc2d as Ac, AcGeSpline3d as qs, AcDbTable as Oc, AcDbText as Pc, AcDbMText as Dc, AcDbLeader as Rc, AcDb3PointAngularDimension as Uc, AcDbOrdinateDimension as Fc, AcDbRadialDimension as Nc, AcDbDiametricDimension as zc, AcDbWipeout as Gc, AcDbBlockReference as jc, AcDbDxfConverter as Vc, AcDbDatabaseConverterManager as Xs } from "@mlightcad/data-model";
|
|
2
2
|
import * as C from "three";
|
|
3
3
|
import { BufferGeometry as Hc, BufferAttribute as Wc, ShapePath as Fa, ShapeUtils as Na, Shape as $c, LineCurve as dr, QuadraticBezierCurve as Ys, CubicBezierCurve as Zs, EllipseCurve as Ks } from "three";
|
|
4
4
|
import { mergeGeometries as qc } from "three/examples/jsm/utils/BufferGeometryUtils.js";
|
|
@@ -64,9 +64,9 @@ class ve {
|
|
|
64
64
|
constructor() {
|
|
65
65
|
this.events = {
|
|
66
66
|
/** Fired just before the command starts executing */
|
|
67
|
-
commandWillStart: new
|
|
67
|
+
commandWillStart: new ye(),
|
|
68
68
|
/** Fired after the command finishes executing */
|
|
69
|
-
commandEnded: new
|
|
69
|
+
commandEnded: new ye()
|
|
70
70
|
}, this._globalName = "", this._localName = "";
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
@@ -386,7 +386,7 @@ function Jc(r) {
|
|
|
386
386
|
} };
|
|
387
387
|
}
|
|
388
388
|
const ot = Jc();
|
|
389
|
-
function
|
|
389
|
+
function Qm(r) {
|
|
390
390
|
ot.emit("message", {
|
|
391
391
|
message: r,
|
|
392
392
|
type: "warning"
|
|
@@ -631,7 +631,7 @@ yt._messages = {
|
|
|
631
631
|
zh: {}
|
|
632
632
|
}, yt._currentLocale = "en", yt.events = {
|
|
633
633
|
/** Fired when locale changed */
|
|
634
|
-
localeChanged: new
|
|
634
|
+
localeChanged: new ye()
|
|
635
635
|
}, yt.userCmdDescription = (e) => yt.cmdDescription(Q.DEFAUT_COMMAND_GROUP_NAME, e);
|
|
636
636
|
let ce = yt;
|
|
637
637
|
function za(r, e) {
|
|
@@ -795,7 +795,7 @@ ce.mergeLocaleMessage("zh", {
|
|
|
795
795
|
const Ga = (r, e) => {
|
|
796
796
|
const t = `command.${r}.${e}`;
|
|
797
797
|
return ce.t(t);
|
|
798
|
-
},
|
|
798
|
+
}, Jm = (r) => Ga(Q.SYSTEMT_COMMAND_GROUP_NAME, r), e0 = (r) => Ga(Q.DEFAUT_COMMAND_GROUP_NAME, r);
|
|
799
799
|
class cl {
|
|
800
800
|
constructor(e = document.body) {
|
|
801
801
|
this.container = e, this.history = [], this.historyIndex = -1, this.lastExecuted = null, this.isCmdPopupOpen = !1, this.isMsgPanelOpen = !1, this.minWidth = 420, this.widthRatio = 0.66, this.autoCompleteIndex = -1, this.injectCSS(), this.createUI(), this.bindEvents(), this.resizeHandler(), window.addEventListener("resize", () => this.resizeHandler()), ce.events.localeChanged.addEventListener(() => this.refreshLocale());
|
|
@@ -1521,7 +1521,7 @@ class nr {
|
|
|
1521
1521
|
return this;
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
|
-
class
|
|
1524
|
+
class t0 extends nr {
|
|
1525
1525
|
/**
|
|
1526
1526
|
* Constructs a new `AcEdPromptAngleOptions` with a given prompt message.
|
|
1527
1527
|
* @param message - The prompt message shown to the user.
|
|
@@ -1735,10 +1735,10 @@ class ml extends ys {
|
|
|
1735
1735
|
this.isReadOnly || (this._only2d = e);
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
1738
|
-
class
|
|
1738
|
+
class n0 extends ys {
|
|
1739
1739
|
// For now there are no new memebers needed
|
|
1740
1740
|
}
|
|
1741
|
-
class
|
|
1741
|
+
class r0 extends ys {
|
|
1742
1742
|
/**
|
|
1743
1743
|
* Constructs a new `AcEdPromptIntegerOptions`.
|
|
1744
1744
|
*
|
|
@@ -2783,7 +2783,7 @@ class wl {
|
|
|
2783
2783
|
* Fired after a system variable is changed directly through the SETVAR command or
|
|
2784
2784
|
* by entering the variable name at the command line.
|
|
2785
2785
|
*/
|
|
2786
|
-
sysVarChanged: new
|
|
2786
|
+
sysVarChanged: new ye()
|
|
2787
2787
|
}, this._view = e, this._cursorManager = new tl(e), this._inputManager = new $r(e);
|
|
2788
2788
|
}
|
|
2789
2789
|
/**
|
|
@@ -2942,9 +2942,9 @@ class Sl {
|
|
|
2942
2942
|
constructor(e = []) {
|
|
2943
2943
|
this.events = {
|
|
2944
2944
|
/** Fired when entities are added to the selection */
|
|
2945
|
-
selectionAdded: new
|
|
2945
|
+
selectionAdded: new ye(),
|
|
2946
2946
|
/** Fired when entities are removed from the selection */
|
|
2947
|
-
selectionRemoved: new
|
|
2947
|
+
selectionRemoved: new ye()
|
|
2948
2948
|
}, this._ids = new Set(e);
|
|
2949
2949
|
}
|
|
2950
2950
|
/**
|
|
@@ -3049,13 +3049,13 @@ class _l {
|
|
|
3049
3049
|
constructor(e) {
|
|
3050
3050
|
this.events = {
|
|
3051
3051
|
/** Fired when mouse moves over the view */
|
|
3052
|
-
mouseMove: new
|
|
3052
|
+
mouseMove: new ye(),
|
|
3053
3053
|
/** Fired when the view is resized */
|
|
3054
|
-
viewResize: new
|
|
3054
|
+
viewResize: new ye(),
|
|
3055
3055
|
/** Fired when mouse hovers over an entity */
|
|
3056
|
-
hover: new
|
|
3056
|
+
hover: new ye(),
|
|
3057
3057
|
/** Fired when mouse stops hovering over an entity */
|
|
3058
|
-
unhover: new
|
|
3058
|
+
unhover: new ye()
|
|
3059
3059
|
}, this._canvas = e;
|
|
3060
3060
|
const t = e.getBoundingClientRect();
|
|
3061
3061
|
this._bbox = new Oa(), this._width = t.width, this._height = t.height, this._curPos = new je(), this._curMousePos = new je(), this._selectionSet = new Sl(), this._editor = new wl(this), this._canvas.addEventListener("mousemove", (n) => this.onMouseMove(n)), this._canvas.addEventListener("mousedown", (n) => {
|
|
@@ -13384,11 +13384,11 @@ let fe = class {
|
|
|
13384
13384
|
);
|
|
13385
13385
|
}
|
|
13386
13386
|
};
|
|
13387
|
-
var
|
|
13387
|
+
var me = /* @__PURE__ */ ((r) => (r.SHAPES = "shapes", r.BIGFONT = "bigfont", r.UNIFONT = "unifont", r))(me || {});
|
|
13388
13388
|
class bf {
|
|
13389
13389
|
parse(e) {
|
|
13390
13390
|
const t = this.parseHeader(e).split(" "), n = t[1].toLocaleLowerCase();
|
|
13391
|
-
if (!Object.values(
|
|
13391
|
+
if (!Object.values(me).includes(n))
|
|
13392
13392
|
throw new Error(`Invalid font type: ${n}`);
|
|
13393
13393
|
return {
|
|
13394
13394
|
fileHeader: t[0],
|
|
@@ -13412,8 +13412,8 @@ class bf {
|
|
|
13412
13412
|
return t.trim();
|
|
13413
13413
|
}
|
|
13414
13414
|
}
|
|
13415
|
-
const Te = 10;
|
|
13416
|
-
class
|
|
13415
|
+
const Te = 10, vf = [13, 10, 0];
|
|
13416
|
+
class xf {
|
|
13417
13417
|
parse(e) {
|
|
13418
13418
|
try {
|
|
13419
13419
|
e.readBytes(4);
|
|
@@ -13429,11 +13429,7 @@ class vf {
|
|
|
13429
13429
|
for (const a of n)
|
|
13430
13430
|
try {
|
|
13431
13431
|
const o = e.readBytes(a.length);
|
|
13432
|
-
|
|
13433
|
-
const c = o.indexOf(0);
|
|
13434
|
-
let l = 0;
|
|
13435
|
-
c >= 0 && c < o.length && (l = c + 1), l < o.length && (s[a.code] = o.subarray(l));
|
|
13436
|
-
}
|
|
13432
|
+
o.length === a.length && (s[a.code] = o);
|
|
13437
13433
|
} catch {
|
|
13438
13434
|
console.warn(`Failed to read shape data for code ${a.code}`);
|
|
13439
13435
|
}
|
|
@@ -13451,7 +13447,7 @@ class vf {
|
|
|
13451
13447
|
const a = s[0];
|
|
13452
13448
|
try {
|
|
13453
13449
|
const o = new TextDecoder().decode(a);
|
|
13454
|
-
let c =
|
|
13450
|
+
let c = a.findIndex((l) => vf.includes(l));
|
|
13455
13451
|
c >= 0 && (i.info = o.substring(0, c), c + 3 < a.length && (i.baseUp = a[c + 1], i.baseDown = a[c + 2], i.height = i.baseDown + i.baseUp, i.width = i.height, i.orientation = a[c + 3] === 0 ? "horizontal" : "vertical"));
|
|
13456
13452
|
} catch {
|
|
13457
13453
|
console.warn("Failed to parse font info block");
|
|
@@ -13472,7 +13468,7 @@ class vf {
|
|
|
13472
13468
|
}
|
|
13473
13469
|
}
|
|
13474
13470
|
}
|
|
13475
|
-
class
|
|
13471
|
+
class wf {
|
|
13476
13472
|
parse(e) {
|
|
13477
13473
|
try {
|
|
13478
13474
|
e.readInt16();
|
|
@@ -13563,13 +13559,13 @@ class xf {
|
|
|
13563
13559
|
return { text: t, pos: n };
|
|
13564
13560
|
}
|
|
13565
13561
|
}
|
|
13566
|
-
class
|
|
13567
|
-
parse(
|
|
13562
|
+
let Sf = class {
|
|
13563
|
+
parse(r) {
|
|
13568
13564
|
try {
|
|
13569
|
-
const
|
|
13570
|
-
if (
|
|
13565
|
+
const e = r.readInt32();
|
|
13566
|
+
if (e <= 0)
|
|
13571
13567
|
throw new Error("Invalid character count in font file");
|
|
13572
|
-
const
|
|
13568
|
+
const t = r.readInt16(), n = r.readBytes(t), s = {
|
|
13573
13569
|
data: {},
|
|
13574
13570
|
info: "",
|
|
13575
13571
|
baseUp: 8,
|
|
@@ -13580,31 +13576,31 @@ class wf {
|
|
|
13580
13576
|
isExtended: !1
|
|
13581
13577
|
};
|
|
13582
13578
|
try {
|
|
13583
|
-
const
|
|
13584
|
-
let
|
|
13585
|
-
|
|
13579
|
+
const a = new TextDecoder().decode(n);
|
|
13580
|
+
let o = a.indexOf("\0");
|
|
13581
|
+
o >= 0 && (s.info = a.substring(0, o), o + 3 < n.length && (s.baseUp = n[o + 1], s.baseDown = n[o + 2], s.height = s.baseUp + s.baseDown, s.width = s.height, s.orientation = n[o + 3] === 0 ? "horizontal" : "vertical"));
|
|
13586
13582
|
} catch {
|
|
13587
13583
|
console.warn("Failed to parse unifont info block");
|
|
13588
13584
|
}
|
|
13589
|
-
const
|
|
13590
|
-
for (let
|
|
13585
|
+
const i = {};
|
|
13586
|
+
for (let a = 0; a < e - 1; a++)
|
|
13591
13587
|
try {
|
|
13592
|
-
const
|
|
13593
|
-
if (
|
|
13594
|
-
const
|
|
13595
|
-
if (
|
|
13596
|
-
const
|
|
13597
|
-
let
|
|
13598
|
-
|
|
13588
|
+
const o = r.readUint16(), c = r.readUint16();
|
|
13589
|
+
if (c > 0) {
|
|
13590
|
+
const l = r.readBytes(c);
|
|
13591
|
+
if (l.length === c) {
|
|
13592
|
+
const h = l.indexOf(0);
|
|
13593
|
+
let d = 0;
|
|
13594
|
+
h >= 0 && h < l.length && (d = h + 1), d < l.length && (i[o] = l.subarray(d));
|
|
13599
13595
|
}
|
|
13600
13596
|
}
|
|
13601
13597
|
} catch {
|
|
13602
13598
|
console.warn("Failed to read unifont character data");
|
|
13603
13599
|
break;
|
|
13604
13600
|
}
|
|
13605
|
-
return
|
|
13606
|
-
} catch (
|
|
13607
|
-
return console.error("Error parsing unifont:",
|
|
13601
|
+
return s.data = i, s;
|
|
13602
|
+
} catch (e) {
|
|
13603
|
+
return console.error("Error parsing unifont:", e), {
|
|
13608
13604
|
data: {},
|
|
13609
13605
|
info: "Failed to parse font file",
|
|
13610
13606
|
baseUp: 8,
|
|
@@ -13616,16 +13612,15 @@ class wf {
|
|
|
13616
13612
|
};
|
|
13617
13613
|
}
|
|
13618
13614
|
}
|
|
13619
|
-
}
|
|
13620
|
-
let Sf = class {
|
|
13615
|
+
}, _f = class {
|
|
13621
13616
|
static createParser(r) {
|
|
13622
13617
|
switch (r) {
|
|
13623
|
-
case
|
|
13624
|
-
return new vf();
|
|
13625
|
-
case be.BIGFONT:
|
|
13618
|
+
case me.SHAPES:
|
|
13626
13619
|
return new xf();
|
|
13627
|
-
case
|
|
13620
|
+
case me.BIGFONT:
|
|
13628
13621
|
return new wf();
|
|
13622
|
+
case me.UNIFONT:
|
|
13623
|
+
return new Sf();
|
|
13629
13624
|
default:
|
|
13630
13625
|
throw new Error(`Unsupported font type: ${r}`);
|
|
13631
13626
|
}
|
|
@@ -13883,8 +13878,8 @@ class nn {
|
|
|
13883
13878
|
return `<svg width="100%" height="100%" viewBox="${i}" preserveAspectRatio="xMidYMid meet">${a}</svg>`;
|
|
13884
13879
|
}
|
|
13885
13880
|
}
|
|
13886
|
-
const
|
|
13887
|
-
class
|
|
13881
|
+
const Cf = Math.PI / 18;
|
|
13882
|
+
class Tf {
|
|
13888
13883
|
constructor(e) {
|
|
13889
13884
|
this.shapeCache = /* @__PURE__ */ new Map(), this.shapeData = /* @__PURE__ */ new Map(), this.fontData = e;
|
|
13890
13885
|
}
|
|
@@ -14115,13 +14110,13 @@ class Cf {
|
|
|
14115
14110
|
let s = t, i = 0, a, o = n.scale * this.fontData.content.height, c = o;
|
|
14116
14111
|
const l = n.currentPoint.clone();
|
|
14117
14112
|
switch (n.currentPolyline.length > 1 && (n.polylines.push(n.currentPolyline.slice()), n.currentPolyline = []), this.fontData.header.fontType) {
|
|
14118
|
-
case
|
|
14113
|
+
case me.SHAPES:
|
|
14119
14114
|
s++, i = e[s];
|
|
14120
14115
|
break;
|
|
14121
|
-
case
|
|
14116
|
+
case me.BIGFONT:
|
|
14122
14117
|
s++, i = e[s], i === 0 && (s++, i = e[s++] << 8 | e[s++], l.x = fe.byteToSByte(e[s++]) * n.scale, l.y = fe.byteToSByte(e[s++]) * n.scale, this.fontData.content.isExtended && (c = e[s++] * n.scale), o = e[s] * n.scale);
|
|
14123
14118
|
break;
|
|
14124
|
-
case
|
|
14119
|
+
case me.UNIFONT:
|
|
14125
14120
|
s++, i = e[s++] << 8 | e[s++];
|
|
14126
14121
|
break;
|
|
14127
14122
|
}
|
|
@@ -14160,7 +14155,7 @@ class Cf {
|
|
|
14160
14155
|
let u = h & 7;
|
|
14161
14156
|
u === 0 && (u = 8), a !== 0 && u--;
|
|
14162
14157
|
const f = Math.PI / 4;
|
|
14163
|
-
let y = f * u, m =
|
|
14158
|
+
let y = f * u, m = Cf, x = 1;
|
|
14164
14159
|
h < 0 && (m = -m, y = -y, x = -1);
|
|
14165
14160
|
let v = f * d, w = v + y;
|
|
14166
14161
|
v += f * i / 256 * x, w += f * a / 256 * x;
|
|
@@ -14234,13 +14229,13 @@ class Cf {
|
|
|
14234
14229
|
break;
|
|
14235
14230
|
case 7:
|
|
14236
14231
|
switch (this.fontData.header.fontType) {
|
|
14237
|
-
case
|
|
14232
|
+
case me.SHAPES:
|
|
14238
14233
|
t++;
|
|
14239
14234
|
break;
|
|
14240
|
-
case
|
|
14235
|
+
case me.BIGFONT:
|
|
14241
14236
|
t++, e[t] === 0 && (t += this.fontData.content.isExtended ? 6 : 5);
|
|
14242
14237
|
break;
|
|
14243
|
-
case
|
|
14238
|
+
case me.UNIFONT:
|
|
14244
14239
|
t += 2;
|
|
14245
14240
|
break;
|
|
14246
14241
|
}
|
|
@@ -14309,30 +14304,30 @@ class Cf {
|
|
|
14309
14304
|
return o.add(t), o;
|
|
14310
14305
|
}
|
|
14311
14306
|
}
|
|
14312
|
-
class
|
|
14307
|
+
let If = class {
|
|
14313
14308
|
/**
|
|
14314
14309
|
* Creates a new ShxFont instance.
|
|
14315
14310
|
* @param data - Either raw binary data of the SHX font file (ArrayBuffer) or pre-parsed font data (ShxFontData)
|
|
14316
14311
|
* @throws {Error} If the font data is invalid or cannot be parsed
|
|
14317
14312
|
*/
|
|
14318
|
-
constructor(
|
|
14319
|
-
if (
|
|
14320
|
-
const
|
|
14313
|
+
constructor(r) {
|
|
14314
|
+
if (r instanceof ArrayBuffer) {
|
|
14315
|
+
const e = new fe(r), t = new bf().parse(e), n = _f.createParser(t.fontType).parse(e);
|
|
14321
14316
|
this.fontData = {
|
|
14322
|
-
header:
|
|
14323
|
-
content:
|
|
14317
|
+
header: t,
|
|
14318
|
+
content: n
|
|
14324
14319
|
};
|
|
14325
14320
|
} else
|
|
14326
|
-
this.fontData =
|
|
14327
|
-
this.shapeParser = new
|
|
14321
|
+
this.fontData = r;
|
|
14322
|
+
this.shapeParser = new Tf(this.fontData);
|
|
14328
14323
|
}
|
|
14329
14324
|
/**
|
|
14330
14325
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
14331
14326
|
* @param char - The character to check
|
|
14332
14327
|
* @returns True if this font contains glyph of the specified character. Otherwise, return false.
|
|
14333
14328
|
*/
|
|
14334
|
-
hasChar(
|
|
14335
|
-
return this.fontData.content.data[
|
|
14329
|
+
hasChar(r) {
|
|
14330
|
+
return this.fontData.content.data[r] !== void 0;
|
|
14336
14331
|
}
|
|
14337
14332
|
/**
|
|
14338
14333
|
* Gets the shape data for a specific character at a given font size.
|
|
@@ -14340,9 +14335,9 @@ class Tf {
|
|
|
14340
14335
|
* @param size - The desired font size
|
|
14341
14336
|
* @returns The shape data for the character, or undefined if the character is not found in the font
|
|
14342
14337
|
*/
|
|
14343
|
-
getCharShape(
|
|
14344
|
-
let
|
|
14345
|
-
return
|
|
14338
|
+
getCharShape(r, e) {
|
|
14339
|
+
let t = this.shapeParser.getCharShape(r, e);
|
|
14340
|
+
return t && this.fontData.header.fontType === me.BIGFONT && (t = t.normalizeToOrigin()), t;
|
|
14346
14341
|
}
|
|
14347
14342
|
/**
|
|
14348
14343
|
* Releases resources used by the font.
|
|
@@ -14351,11 +14346,11 @@ class Tf {
|
|
|
14351
14346
|
release() {
|
|
14352
14347
|
this.shapeParser.release();
|
|
14353
14348
|
}
|
|
14354
|
-
}
|
|
14355
|
-
function
|
|
14349
|
+
};
|
|
14350
|
+
function Ef(r) {
|
|
14356
14351
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
14357
14352
|
}
|
|
14358
|
-
function
|
|
14353
|
+
function Mf(r) {
|
|
14359
14354
|
if (r.__esModule) return r;
|
|
14360
14355
|
var e = r.default;
|
|
14361
14356
|
if (typeof e == "function") {
|
|
@@ -14375,11 +14370,11 @@ function Ef(r) {
|
|
|
14375
14370
|
}), t;
|
|
14376
14371
|
}
|
|
14377
14372
|
var Go = { exports: {} }, Bs = {}, ar = {};
|
|
14378
|
-
ar.byteLength =
|
|
14379
|
-
ar.toByteArray =
|
|
14380
|
-
ar.fromByteArray =
|
|
14381
|
-
var ze = [], Se = [],
|
|
14382
|
-
for (var St = 0,
|
|
14373
|
+
ar.byteLength = Bf;
|
|
14374
|
+
ar.toByteArray = Of;
|
|
14375
|
+
ar.fromByteArray = Rf;
|
|
14376
|
+
var ze = [], Se = [], kf = typeof Uint8Array < "u" ? Uint8Array : Array, Tr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
14377
|
+
for (var St = 0, Lf = Tr.length; St < Lf; ++St)
|
|
14383
14378
|
ze[St] = Tr[St], Se[Tr.charCodeAt(St)] = St;
|
|
14384
14379
|
Se[45] = 62;
|
|
14385
14380
|
Se[95] = 63;
|
|
@@ -14392,30 +14387,30 @@ function jo(r) {
|
|
|
14392
14387
|
var n = t === e ? 0 : 4 - t % 4;
|
|
14393
14388
|
return [t, n];
|
|
14394
14389
|
}
|
|
14395
|
-
function
|
|
14390
|
+
function Bf(r) {
|
|
14396
14391
|
var e = jo(r), t = e[0], n = e[1];
|
|
14397
14392
|
return (t + n) * 3 / 4 - n;
|
|
14398
14393
|
}
|
|
14399
|
-
function
|
|
14394
|
+
function Af(r, e, t) {
|
|
14400
14395
|
return (e + t) * 3 / 4 - t;
|
|
14401
14396
|
}
|
|
14402
|
-
function
|
|
14403
|
-
var e, t = jo(r), n = t[0], s = t[1], i = new
|
|
14397
|
+
function Of(r) {
|
|
14398
|
+
var e, t = jo(r), n = t[0], s = t[1], i = new kf(Af(r, n, s)), a = 0, o = s > 0 ? n - 4 : n, c;
|
|
14404
14399
|
for (c = 0; c < o; c += 4)
|
|
14405
14400
|
e = Se[r.charCodeAt(c)] << 18 | Se[r.charCodeAt(c + 1)] << 12 | Se[r.charCodeAt(c + 2)] << 6 | Se[r.charCodeAt(c + 3)], i[a++] = e >> 16 & 255, i[a++] = e >> 8 & 255, i[a++] = e & 255;
|
|
14406
14401
|
return s === 2 && (e = Se[r.charCodeAt(c)] << 2 | Se[r.charCodeAt(c + 1)] >> 4, i[a++] = e & 255), s === 1 && (e = Se[r.charCodeAt(c)] << 10 | Se[r.charCodeAt(c + 1)] << 4 | Se[r.charCodeAt(c + 2)] >> 2, i[a++] = e >> 8 & 255, i[a++] = e & 255), i;
|
|
14407
14402
|
}
|
|
14408
|
-
function
|
|
14403
|
+
function Pf(r) {
|
|
14409
14404
|
return ze[r >> 18 & 63] + ze[r >> 12 & 63] + ze[r >> 6 & 63] + ze[r & 63];
|
|
14410
14405
|
}
|
|
14411
|
-
function
|
|
14406
|
+
function Df(r, e, t) {
|
|
14412
14407
|
for (var n, s = [], i = e; i < t; i += 3)
|
|
14413
|
-
n = (r[i] << 16 & 16711680) + (r[i + 1] << 8 & 65280) + (r[i + 2] & 255), s.push(
|
|
14408
|
+
n = (r[i] << 16 & 16711680) + (r[i + 1] << 8 & 65280) + (r[i + 2] & 255), s.push(Pf(n));
|
|
14414
14409
|
return s.join("");
|
|
14415
14410
|
}
|
|
14416
|
-
function
|
|
14411
|
+
function Rf(r) {
|
|
14417
14412
|
for (var e, t = r.length, n = t % 3, s = [], i = 16383, a = 0, o = t - n; a < o; a += i)
|
|
14418
|
-
s.push(
|
|
14413
|
+
s.push(Df(r, a, a + i > o ? o : a + i));
|
|
14419
14414
|
return n === 1 ? (e = r[t - 1], s.push(
|
|
14420
14415
|
ze[e >> 2] + ze[e << 4 & 63] + "=="
|
|
14421
14416
|
)) : n === 2 && (e = (r[t - 2] << 8) + r[t - 1], s.push(
|
|
@@ -15284,15 +15279,15 @@ Ds.prototype.write = function(r) {
|
|
|
15284
15279
|
Ds.prototype.end = function() {
|
|
15285
15280
|
return this.decoder.end();
|
|
15286
15281
|
};
|
|
15287
|
-
var
|
|
15288
|
-
function
|
|
15282
|
+
var Uf = typeof Object.hasOwn > "u" ? Function.call.bind(Object.prototype.hasOwnProperty) : Object.hasOwn;
|
|
15283
|
+
function Ff(r, e) {
|
|
15289
15284
|
for (var t in e)
|
|
15290
|
-
|
|
15285
|
+
Uf(e, t) && (r[t] = e[t]);
|
|
15291
15286
|
}
|
|
15292
|
-
var Ho =
|
|
15287
|
+
var Ho = Ff, Qi = {}, Ir = {}, Er = { exports: {} };
|
|
15293
15288
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
15294
15289
|
var Ji;
|
|
15295
|
-
function
|
|
15290
|
+
function Nf() {
|
|
15296
15291
|
return Ji || (Ji = 1, function(r, e) {
|
|
15297
15292
|
var t = Bs, n = t.Buffer;
|
|
15298
15293
|
function s(a, o) {
|
|
@@ -15324,10 +15319,10 @@ function Ff() {
|
|
|
15324
15319
|
}(Er, Er.exports)), Er.exports;
|
|
15325
15320
|
}
|
|
15326
15321
|
var ea;
|
|
15327
|
-
function
|
|
15322
|
+
function zf() {
|
|
15328
15323
|
if (ea) return Ir;
|
|
15329
15324
|
ea = 1;
|
|
15330
|
-
var r =
|
|
15325
|
+
var r = Nf().Buffer, e = r.isEncoding || function(v) {
|
|
15331
15326
|
switch (v = "" + v, v && v.toLowerCase()) {
|
|
15332
15327
|
case "hex":
|
|
15333
15328
|
case "utf8":
|
|
@@ -15482,7 +15477,7 @@ function Nf() {
|
|
|
15482
15477
|
return Ir;
|
|
15483
15478
|
}
|
|
15484
15479
|
var Mr, ta;
|
|
15485
|
-
function
|
|
15480
|
+
function Gf() {
|
|
15486
15481
|
if (ta) return Mr;
|
|
15487
15482
|
ta = 1;
|
|
15488
15483
|
var r = ut.Buffer;
|
|
@@ -15503,7 +15498,7 @@ function zf() {
|
|
|
15503
15498
|
this.enc = l.encodingName, this.bomAware = l.bomAware, this.enc === "base64" ? this.encoder = i : this.enc === "utf8" ? this.encoder = c : this.enc === "cesu8" && (this.enc = "utf8", this.encoder = a, r.from("eda0bdedb2a9", "hex").toString() !== "💩" && (this.decoder = o, this.defaultCharUnicode = h.defaultCharUnicode));
|
|
15504
15499
|
}
|
|
15505
15500
|
e.prototype.encoder = s, e.prototype.decoder = n;
|
|
15506
|
-
var t =
|
|
15501
|
+
var t = zf().StringDecoder;
|
|
15507
15502
|
function n(l, h) {
|
|
15508
15503
|
this.decoder = new t(h.enc);
|
|
15509
15504
|
}
|
|
@@ -15569,7 +15564,7 @@ function zf() {
|
|
|
15569
15564
|
}, Mr;
|
|
15570
15565
|
}
|
|
15571
15566
|
var We = {}, na;
|
|
15572
|
-
function
|
|
15567
|
+
function jf() {
|
|
15573
15568
|
if (na) return We;
|
|
15574
15569
|
na = 1;
|
|
15575
15570
|
var r = ut.Buffer;
|
|
@@ -15688,7 +15683,7 @@ function Gf() {
|
|
|
15688
15683
|
return We;
|
|
15689
15684
|
}
|
|
15690
15685
|
var An = {}, ra;
|
|
15691
|
-
function
|
|
15686
|
+
function Vf() {
|
|
15692
15687
|
if (ra) return An;
|
|
15693
15688
|
ra = 1;
|
|
15694
15689
|
var r = ut.Buffer;
|
|
@@ -15774,7 +15769,7 @@ function jf() {
|
|
|
15774
15769
|
return An;
|
|
15775
15770
|
}
|
|
15776
15771
|
var Ht = {}, sa;
|
|
15777
|
-
function
|
|
15772
|
+
function Hf() {
|
|
15778
15773
|
if (sa) return Ht;
|
|
15779
15774
|
sa = 1;
|
|
15780
15775
|
var r = ut.Buffer;
|
|
@@ -15870,7 +15865,7 @@ function Vf() {
|
|
|
15870
15865
|
}, Ht;
|
|
15871
15866
|
}
|
|
15872
15867
|
var kr = {}, ia;
|
|
15873
|
-
function
|
|
15868
|
+
function Wf() {
|
|
15874
15869
|
if (ia) return kr;
|
|
15875
15870
|
ia = 1;
|
|
15876
15871
|
var r = ut.Buffer;
|
|
@@ -15911,7 +15906,7 @@ function Hf() {
|
|
|
15911
15906
|
}, kr;
|
|
15912
15907
|
}
|
|
15913
15908
|
var aa, oa;
|
|
15914
|
-
function
|
|
15909
|
+
function $f() {
|
|
15915
15910
|
return oa || (oa = 1, aa = {
|
|
15916
15911
|
// Not supported by iconv, not sure why.
|
|
15917
15912
|
10029: "maccenteuro",
|
|
@@ -16060,7 +16055,7 @@ function Wf() {
|
|
|
16060
16055
|
}), aa;
|
|
16061
16056
|
}
|
|
16062
16057
|
var ca, la;
|
|
16063
|
-
function
|
|
16058
|
+
function qf() {
|
|
16064
16059
|
return la || (la = 1, ca = {
|
|
16065
16060
|
437: "cp437",
|
|
16066
16061
|
737: "cp737",
|
|
@@ -16516,7 +16511,7 @@ function $f() {
|
|
|
16516
16511
|
}), ca;
|
|
16517
16512
|
}
|
|
16518
16513
|
var Lr = {}, ha;
|
|
16519
|
-
function
|
|
16514
|
+
function Xf() {
|
|
16520
16515
|
if (ha) return Lr;
|
|
16521
16516
|
ha = 1;
|
|
16522
16517
|
var r = ut.Buffer;
|
|
@@ -16756,7 +16751,7 @@ function qf() {
|
|
|
16756
16751
|
}
|
|
16757
16752
|
return Lr;
|
|
16758
16753
|
}
|
|
16759
|
-
const
|
|
16754
|
+
const Yf = [
|
|
16760
16755
|
[
|
|
16761
16756
|
"0",
|
|
16762
16757
|
"\0",
|
|
@@ -17301,7 +17296,7 @@ const Xf = [
|
|
|
17301
17296
|
"fc40",
|
|
17302
17297
|
"髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"
|
|
17303
17298
|
]
|
|
17304
|
-
],
|
|
17299
|
+
], Zf = [
|
|
17305
17300
|
[
|
|
17306
17301
|
"0",
|
|
17307
17302
|
"\0",
|
|
@@ -20999,7 +20994,7 @@ const Xf = [
|
|
|
20999
20994
|
"8135f437",
|
|
21000
20995
|
""
|
|
21001
20996
|
]
|
|
21002
|
-
],
|
|
20997
|
+
], Kf = [
|
|
21003
20998
|
128,
|
|
21004
20999
|
165,
|
|
21005
21000
|
169,
|
|
@@ -21207,7 +21202,7 @@ const Xf = [
|
|
|
21207
21202
|
65375,
|
|
21208
21203
|
65510,
|
|
21209
21204
|
65536
|
|
21210
|
-
],
|
|
21205
|
+
], Qf = [
|
|
21211
21206
|
0,
|
|
21212
21207
|
36,
|
|
21213
21208
|
38,
|
|
@@ -21415,10 +21410,10 @@ const Xf = [
|
|
|
21415
21410
|
39265,
|
|
21416
21411
|
39394,
|
|
21417
21412
|
189e3
|
|
21418
|
-
],
|
|
21419
|
-
uChars:
|
|
21420
|
-
gbChars:
|
|
21421
|
-
},
|
|
21413
|
+
], Jf = {
|
|
21414
|
+
uChars: Kf,
|
|
21415
|
+
gbChars: Qf
|
|
21416
|
+
}, eg = [
|
|
21422
21417
|
[
|
|
21423
21418
|
"0",
|
|
21424
21419
|
"\0",
|
|
@@ -24521,7 +24516,7 @@ const Xf = [
|
|
|
24521
24516
|
"f9a1",
|
|
24522
24517
|
"龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"
|
|
24523
24518
|
]
|
|
24524
|
-
],
|
|
24519
|
+
], tg = [
|
|
24525
24520
|
[
|
|
24526
24521
|
"8740",
|
|
24527
24522
|
"䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"
|
|
@@ -25026,7 +25021,7 @@ const Xf = [
|
|
|
25026
25021
|
]
|
|
25027
25022
|
];
|
|
25028
25023
|
var pa, fa;
|
|
25029
|
-
function
|
|
25024
|
+
function ng() {
|
|
25030
25025
|
return fa || (fa = 1, pa = {
|
|
25031
25026
|
// == Japanese/ShiftJIS ====================================================
|
|
25032
25027
|
// All japanese encodings are based on JIS X set of standards:
|
|
@@ -25061,7 +25056,7 @@ function tg() {
|
|
|
25061
25056
|
shiftjis: {
|
|
25062
25057
|
type: "_dbcs",
|
|
25063
25058
|
table: function() {
|
|
25064
|
-
return
|
|
25059
|
+
return Yf;
|
|
25065
25060
|
},
|
|
25066
25061
|
encodeAdd: { "¥": 92, "‾": 126 },
|
|
25067
25062
|
encodeSkipVals: [{ from: 60736, to: 63808 }]
|
|
@@ -25079,7 +25074,7 @@ function tg() {
|
|
|
25079
25074
|
eucjp: {
|
|
25080
25075
|
type: "_dbcs",
|
|
25081
25076
|
table: function() {
|
|
25082
|
-
return
|
|
25077
|
+
return Zf;
|
|
25083
25078
|
},
|
|
25084
25079
|
encodeAdd: { "¥": 92, "‾": 126 }
|
|
25085
25080
|
},
|
|
@@ -25126,7 +25121,7 @@ function tg() {
|
|
|
25126
25121
|
return Br.concat(ua);
|
|
25127
25122
|
},
|
|
25128
25123
|
gb18030: function() {
|
|
25129
|
-
return
|
|
25124
|
+
return Jf;
|
|
25130
25125
|
},
|
|
25131
25126
|
encodeSkipVals: [128],
|
|
25132
25127
|
encodeAdd: { "€": 41699 }
|
|
@@ -25140,7 +25135,7 @@ function tg() {
|
|
|
25140
25135
|
cp949: {
|
|
25141
25136
|
type: "_dbcs",
|
|
25142
25137
|
table: function() {
|
|
25143
|
-
return
|
|
25138
|
+
return eg;
|
|
25144
25139
|
}
|
|
25145
25140
|
},
|
|
25146
25141
|
cseuckr: "cp949",
|
|
@@ -25187,7 +25182,7 @@ function tg() {
|
|
|
25187
25182
|
big5hkscs: {
|
|
25188
25183
|
type: "_dbcs",
|
|
25189
25184
|
table: function() {
|
|
25190
|
-
return da.concat(
|
|
25185
|
+
return da.concat(tg);
|
|
25191
25186
|
},
|
|
25192
25187
|
encodeSkipVals: [
|
|
25193
25188
|
// Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of
|
|
@@ -25269,10 +25264,9 @@ function tg() {
|
|
|
25269
25264
|
}), pa;
|
|
25270
25265
|
}
|
|
25271
25266
|
var ga;
|
|
25272
|
-
function
|
|
25267
|
+
function rg() {
|
|
25273
25268
|
return ga || (ga = 1, function(r) {
|
|
25274
25269
|
for (var e = Ho, t = [
|
|
25275
|
-
zf(),
|
|
25276
25270
|
Gf(),
|
|
25277
25271
|
jf(),
|
|
25278
25272
|
Vf(),
|
|
@@ -25280,7 +25274,8 @@ function ng() {
|
|
|
25280
25274
|
Wf(),
|
|
25281
25275
|
$f(),
|
|
25282
25276
|
qf(),
|
|
25283
|
-
|
|
25277
|
+
Xf(),
|
|
25278
|
+
ng()
|
|
25284
25279
|
], n = 0; n < t.length; n++) {
|
|
25285
25280
|
var s = t[n];
|
|
25286
25281
|
e(r, s);
|
|
@@ -25288,7 +25283,7 @@ function ng() {
|
|
|
25288
25283
|
}(Qi)), Qi;
|
|
25289
25284
|
}
|
|
25290
25285
|
var Ar, ma;
|
|
25291
|
-
function
|
|
25286
|
+
function sg() {
|
|
25292
25287
|
if (ma) return Ar;
|
|
25293
25288
|
ma = 1;
|
|
25294
25289
|
var r = ut.Buffer;
|
|
@@ -25357,10 +25352,10 @@ function rg() {
|
|
|
25357
25352
|
};
|
|
25358
25353
|
}, Ar;
|
|
25359
25354
|
}
|
|
25360
|
-
const
|
|
25355
|
+
const ig = {}, ag = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
25361
25356
|
__proto__: null,
|
|
25362
|
-
default:
|
|
25363
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
25357
|
+
default: ig
|
|
25358
|
+
}, Symbol.toStringTag, { value: "Module" })), og = /* @__PURE__ */ Mf(ag);
|
|
25364
25359
|
(function(r) {
|
|
25365
25360
|
var e = ut.Buffer, t = Os, n = Ho, s = r.exports;
|
|
25366
25361
|
s.encodings = null, s.defaultCharUnicode = "�", s.defaultCharSingleByte = "?", s.encode = function(a, o, c) {
|
|
@@ -25379,7 +25374,7 @@ const sg = {}, ig = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
25379
25374
|
}
|
|
25380
25375
|
}, s.toEncoding = s.encode, s.fromEncoding = s.decode, s._codecDataCache = { __proto__: null }, s.getCodec = function(a) {
|
|
25381
25376
|
if (!s.encodings) {
|
|
25382
|
-
var o =
|
|
25377
|
+
var o = rg();
|
|
25383
25378
|
s.encodings = { __proto__: null }, n(s.encodings, o);
|
|
25384
25379
|
}
|
|
25385
25380
|
for (var c = s._canonicalizeEncoding(a), l = {}; ; ) {
|
|
@@ -25412,7 +25407,7 @@ const sg = {}, ig = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
25412
25407
|
return c.bomAware && !(o && o.stripBOM === !1) && (l = new t.StripBOM(l, o)), l;
|
|
25413
25408
|
}, s.enableStreamingAPI = function(a) {
|
|
25414
25409
|
if (!s.supportsStreams) {
|
|
25415
|
-
var o =
|
|
25410
|
+
var o = sg()(a);
|
|
25416
25411
|
s.IconvLiteEncoderStream = o.IconvLiteEncoderStream, s.IconvLiteDecoderStream = o.IconvLiteDecoderStream, s.encodeStream = function(c, l) {
|
|
25417
25412
|
return new s.IconvLiteEncoderStream(s.getEncoder(c, l), l);
|
|
25418
25413
|
}, s.decodeStream = function(c, l) {
|
|
@@ -25422,15 +25417,15 @@ const sg = {}, ig = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
25422
25417
|
};
|
|
25423
25418
|
var i;
|
|
25424
25419
|
try {
|
|
25425
|
-
i =
|
|
25420
|
+
i = og;
|
|
25426
25421
|
} catch {
|
|
25427
25422
|
}
|
|
25428
25423
|
i && i.Transform ? s.enableStreamingAPI(i) : s.encodeStream = s.decodeStream = function() {
|
|
25429
25424
|
throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.");
|
|
25430
25425
|
};
|
|
25431
25426
|
})(Go);
|
|
25432
|
-
var
|
|
25433
|
-
const
|
|
25427
|
+
var cg = Go.exports;
|
|
25428
|
+
const lg = /* @__PURE__ */ Ef(cg);
|
|
25434
25429
|
class Rs extends Va {
|
|
25435
25430
|
/**
|
|
25436
25431
|
* Creates a new instance of ShxTextShape
|
|
@@ -25438,7 +25433,8 @@ class Rs extends Va {
|
|
|
25438
25433
|
* @param shape - The shape data for this character
|
|
25439
25434
|
*/
|
|
25440
25435
|
constructor(e, t, n, s) {
|
|
25441
|
-
|
|
25436
|
+
var i;
|
|
25437
|
+
super(), this.fontSize = t, this.shape = n, this.font = s, this.code = e, s.data.header.fontType === me.BIGFONT ? this.width = this.calcWidth() : this.width = ((i = n.lastPoint) == null ? void 0 : i.x) ?? this.calcWidth();
|
|
25442
25438
|
}
|
|
25443
25439
|
calcWidth() {
|
|
25444
25440
|
const e = this.shape.bbox;
|
|
@@ -25477,9 +25473,9 @@ class Rs extends Va {
|
|
|
25477
25473
|
return e;
|
|
25478
25474
|
}
|
|
25479
25475
|
}
|
|
25480
|
-
class
|
|
25476
|
+
class hg extends ja {
|
|
25481
25477
|
constructor(e) {
|
|
25482
|
-
super(e), this.type = "shx", this.font = new
|
|
25478
|
+
super(e), this.type = "shx", this.font = new If(e.data), this.data = this.font.fontData;
|
|
25483
25479
|
}
|
|
25484
25480
|
/**
|
|
25485
25481
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
@@ -25551,7 +25547,7 @@ class lg extends ja {
|
|
|
25551
25547
|
* For an unsupported char, use "?" as a replacement.
|
|
25552
25548
|
*/
|
|
25553
25549
|
getNotFoundTextShape(e) {
|
|
25554
|
-
const t = this.font.fontData.header.fontType ===
|
|
25550
|
+
const t = this.font.fontData.header.fontType === me.BIGFONT ? "?" : "?";
|
|
25555
25551
|
return this.getCharShape(t, e);
|
|
25556
25552
|
}
|
|
25557
25553
|
/**
|
|
@@ -25560,8 +25556,8 @@ class lg extends ja {
|
|
|
25560
25556
|
* @returns Returns encoded code of the specified character
|
|
25561
25557
|
*/
|
|
25562
25558
|
getCode(e) {
|
|
25563
|
-
if (this.font.fontData.header.fontType ===
|
|
25564
|
-
const t =
|
|
25559
|
+
if (this.font.fontData.header.fontType === me.BIGFONT && this.encoding) {
|
|
25560
|
+
const t = lg.encode(e[0], this.encoding);
|
|
25565
25561
|
return t.length === 1 ? t[0] : t[0] << 8 | t[1];
|
|
25566
25562
|
} else
|
|
25567
25563
|
return e.charCodeAt(0);
|
|
@@ -25587,7 +25583,7 @@ let Or = class Yt {
|
|
|
25587
25583
|
*/
|
|
25588
25584
|
createFont(e) {
|
|
25589
25585
|
if (e.type === "shx")
|
|
25590
|
-
return new
|
|
25586
|
+
return new hg(e);
|
|
25591
25587
|
if (e.type === "mesh")
|
|
25592
25588
|
return new yf(e);
|
|
25593
25589
|
throw new Error("Unsupported font data type");
|
|
@@ -25956,11 +25952,12 @@ class Wo {
|
|
|
25956
25952
|
}
|
|
25957
25953
|
}
|
|
25958
25954
|
var At = /* @__PURE__ */ ((r) => (r[r.NONE = 0] = "NONE", r[r.WORD = 1] = "WORD", r[r.STACK = 2] = "STACK", r[r.SPACE = 3] = "SPACE", r[r.NBSP = 4] = "NBSP", r[r.TABULATOR = 5] = "TABULATOR", r[r.NEW_PARAGRAPH = 6] = "NEW_PARAGRAPH", r[r.NEW_COLUMN = 7] = "NEW_COLUMN", r[r.WRAP_AT_DIMLINE = 8] = "WRAP_AT_DIMLINE", r[r.PROPERTIES_CHANGED = 9] = "PROPERTIES_CHANGED", r))(At || {}), Kt = /* @__PURE__ */ ((r) => (r[r.BOTTOM = 0] = "BOTTOM", r[r.MIDDLE = 1] = "MIDDLE", r[r.TOP = 2] = "TOP", r))(Kt || {}), Ee = /* @__PURE__ */ ((r) => (r[r.DEFAULT = 0] = "DEFAULT", r[r.LEFT = 1] = "LEFT", r[r.RIGHT = 2] = "RIGHT", r[r.CENTER = 3] = "CENTER", r[r.JUSTIFIED = 4] = "JUSTIFIED", r[r.DISTRIBUTED = 5] = "DISTRIBUTED", r))(Ee || {});
|
|
25959
|
-
const
|
|
25955
|
+
const ug = {
|
|
25960
25956
|
c: "Ø",
|
|
25961
25957
|
d: "°",
|
|
25962
|
-
p: "±"
|
|
25963
|
-
|
|
25958
|
+
p: "±",
|
|
25959
|
+
"%": "%"
|
|
25960
|
+
}, dg = {
|
|
25964
25961
|
l: 1,
|
|
25965
25962
|
r: 2,
|
|
25966
25963
|
c: 3,
|
|
@@ -25968,14 +25965,14 @@ const hg = {
|
|
|
25968
25965
|
d: 5
|
|
25969
25966
|
/* DISTRIBUTED */
|
|
25970
25967
|
};
|
|
25971
|
-
function
|
|
25968
|
+
function pg(r, e = !1) {
|
|
25972
25969
|
const t = /* @__PURE__ */ new Set(), n = /\\[fF](.*?)[;|]/g;
|
|
25973
25970
|
return [...r.matchAll(n)].forEach((s) => {
|
|
25974
25971
|
let i = s[1].toLowerCase();
|
|
25975
25972
|
e && (i = i.replace(/\.(ttf|otf|woff|shx)$/, "")), t.add(i);
|
|
25976
25973
|
}), t;
|
|
25977
25974
|
}
|
|
25978
|
-
class
|
|
25975
|
+
class fg {
|
|
25979
25976
|
/**
|
|
25980
25977
|
* Creates a new ContextStack with an initial context.
|
|
25981
25978
|
* @param initial The initial MTextContext to use as the base of the stack.
|
|
@@ -26027,7 +26024,7 @@ class pg {
|
|
|
26027
26024
|
this.stack[this.stack.length - 1] = e;
|
|
26028
26025
|
}
|
|
26029
26026
|
}
|
|
26030
|
-
class
|
|
26027
|
+
class gg {
|
|
26031
26028
|
/**
|
|
26032
26029
|
* Creates a new MTextParser instance
|
|
26033
26030
|
* @param content - The MText content to parse
|
|
@@ -26037,7 +26034,7 @@ class fg {
|
|
|
26037
26034
|
constructor(e, t, n = {}) {
|
|
26038
26035
|
this.continueStroke = !1, this.inStackContext = !1, this.scanner = new Pr(e);
|
|
26039
26036
|
const s = t ?? new vn();
|
|
26040
|
-
this.ctxStack = new
|
|
26037
|
+
this.ctxStack = new fg(s), this.yieldPropertyCommands = n.yieldPropertyCommands ?? !1, this.resetParagraphParameters = n.resetParagraphParameters ?? !1, this.mifDecoder = n.mifDecoder ?? this.decodeMultiByteChar.bind(this), this.mifCodeLength = n.mifCodeLength ?? "auto";
|
|
26041
26038
|
}
|
|
26042
26039
|
/**
|
|
26043
26040
|
* Decode multi-byte character from hex code
|
|
@@ -26414,7 +26411,7 @@ class fg {
|
|
|
26414
26411
|
break;
|
|
26415
26412
|
case "q": {
|
|
26416
26413
|
const l = t.get();
|
|
26417
|
-
for (a =
|
|
26414
|
+
for (a = dg[l] || 0; t.peek() === ","; )
|
|
26418
26415
|
t.consume(1);
|
|
26419
26416
|
break;
|
|
26420
26417
|
}
|
|
@@ -26551,12 +26548,17 @@ class fg {
|
|
|
26551
26548
|
continue;
|
|
26552
26549
|
}
|
|
26553
26550
|
if (a === "%" && this.scanner.peek(1) === "%") {
|
|
26554
|
-
const c = this.scanner.peek(2).toLowerCase(), l =
|
|
26551
|
+
const c = this.scanner.peek(2).toLowerCase(), l = ug[c];
|
|
26555
26552
|
if (l) {
|
|
26556
26553
|
this.scanner.consume(3), s += l;
|
|
26557
26554
|
continue;
|
|
26558
26555
|
} else {
|
|
26559
|
-
this.scanner.
|
|
26556
|
+
const h = [c, this.scanner.peek(3), this.scanner.peek(4)];
|
|
26557
|
+
if (h.every((d) => d >= "0" && d <= "9")) {
|
|
26558
|
+
const d = Number.parseInt(h.join(""), 10);
|
|
26559
|
+
this.scanner.consume(5), s += String.fromCharCode(d);
|
|
26560
|
+
} else
|
|
26561
|
+
this.scanner.consume(3);
|
|
26560
26562
|
continue;
|
|
26561
26563
|
}
|
|
26562
26564
|
}
|
|
@@ -27007,7 +27009,7 @@ class Dr {
|
|
|
27007
27009
|
}
|
|
27008
27010
|
}
|
|
27009
27011
|
var un = /* @__PURE__ */ ((r) => (r[r.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", r[r.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", r[r.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", r[r.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", r[r.BY_STYLE = 5] = "BY_STYLE", r))(un || {});
|
|
27010
|
-
const
|
|
27012
|
+
const mg = /* @__PURE__ */ new C.Vector3(), yg = 1.666666;
|
|
27011
27013
|
class Fs extends vn {
|
|
27012
27014
|
/**
|
|
27013
27015
|
* Creates a new RenderContext instance with optional initial values.
|
|
@@ -27041,7 +27043,7 @@ class Fs extends vn {
|
|
|
27041
27043
|
this.color.rgb = [t, n, s];
|
|
27042
27044
|
}
|
|
27043
27045
|
}
|
|
27044
|
-
class
|
|
27046
|
+
class bg {
|
|
27045
27047
|
/**
|
|
27046
27048
|
* Construct one instance of this class and initialize some properties with default values.
|
|
27047
27049
|
* @param style Input text style
|
|
@@ -27140,7 +27142,7 @@ class yg {
|
|
|
27140
27142
|
* The height of current line of texts
|
|
27141
27143
|
*/
|
|
27142
27144
|
get currentLineHeight() {
|
|
27143
|
-
return this.defaultLineSpaceFactor * this.currentFontSize *
|
|
27145
|
+
return this.defaultLineSpaceFactor * this.currentFontSize * yg + this.currentMaxFontSize;
|
|
27144
27146
|
}
|
|
27145
27147
|
/**
|
|
27146
27148
|
* The maximum font size in current line. Characters in one line may have different font and font
|
|
@@ -27543,7 +27545,7 @@ class yg {
|
|
|
27543
27545
|
if (e.forEach((n, s) => {
|
|
27544
27546
|
n.boundingBox || n.computeBoundingBox(), s === 0 ? t = n.boundingBox : t.union(n.boundingBox);
|
|
27545
27547
|
}), t) {
|
|
27546
|
-
const n = t.getSize(
|
|
27548
|
+
const n = t.getSize(mg);
|
|
27547
27549
|
switch (this.currentHorizontalAlignment) {
|
|
27548
27550
|
case Ee.LEFT:
|
|
27549
27551
|
e.forEach(
|
|
@@ -27648,7 +27650,7 @@ class Jn extends C.Object3D {
|
|
|
27648
27650
|
* ```
|
|
27649
27651
|
*/
|
|
27650
27652
|
static getFonts(e, t = !1) {
|
|
27651
|
-
return
|
|
27653
|
+
return pg(e, t);
|
|
27652
27654
|
}
|
|
27653
27655
|
/**
|
|
27654
27656
|
* Creates a new instance of MText.
|
|
@@ -27816,12 +27818,12 @@ class Jn extends C.Object3D {
|
|
|
27816
27818
|
value: e.widthFactor ?? 1,
|
|
27817
27819
|
isRelative: !0
|
|
27818
27820
|
}, h.align = i, h.paragraph.align = s;
|
|
27819
|
-
const d = new
|
|
27821
|
+
const d = new bg(
|
|
27820
27822
|
t,
|
|
27821
27823
|
this.styleManager,
|
|
27822
27824
|
this.fontManager,
|
|
27823
27825
|
l
|
|
27824
|
-
), u = new
|
|
27826
|
+
), u = new gg(e.text, h, {
|
|
27825
27827
|
resetParagraphParameters: !0,
|
|
27826
27828
|
yieldPropertyCommands: !0
|
|
27827
27829
|
}).parse();
|
|
@@ -27943,7 +27945,7 @@ class $o {
|
|
|
27943
27945
|
return e.isByLayer && e.layer ? `layer_${e.layer}_${e.color}` : `entity_${e.color}`;
|
|
27944
27946
|
}
|
|
27945
27947
|
}
|
|
27946
|
-
class
|
|
27948
|
+
class vg {
|
|
27947
27949
|
constructor(e = {}) {
|
|
27948
27950
|
this.workers = [], this.inFlightPerWorker = [], this.pendingRequests = /* @__PURE__ */ new Map(), this.requestId = 0, this.readyPromise = null, this.poolSize = e.poolSize ?? Math.max(
|
|
27949
27951
|
1,
|
|
@@ -28184,7 +28186,7 @@ class bg {
|
|
|
28184
28186
|
this.terminate();
|
|
28185
28187
|
}
|
|
28186
28188
|
}
|
|
28187
|
-
class
|
|
28189
|
+
class xg {
|
|
28188
28190
|
constructor() {
|
|
28189
28191
|
this.fontManager = Xe.instance, this.defaultStyleManager = new $o(), this.isInitialized = !1;
|
|
28190
28192
|
}
|
|
@@ -28257,7 +28259,7 @@ class vg {
|
|
|
28257
28259
|
this.isInitialized || (await this.loadFonts([Xe.instance.defaultFont]), this.isInitialized = !0);
|
|
28258
28260
|
}
|
|
28259
28261
|
}
|
|
28260
|
-
class
|
|
28262
|
+
class wg {
|
|
28261
28263
|
/**
|
|
28262
28264
|
* Constructor
|
|
28263
28265
|
*
|
|
@@ -28266,7 +28268,7 @@ class xg {
|
|
|
28266
28268
|
* when render mode is 'worker'.
|
|
28267
28269
|
*/
|
|
28268
28270
|
constructor(e = "main", t = {}) {
|
|
28269
|
-
this.defaultMode = e, this.mainThreadRenderer = new
|
|
28271
|
+
this.defaultMode = e, this.mainThreadRenderer = new xg(), this.webWorkerRenderer = new vg(t), this.renderer = this.mainThreadRenderer, e === "worker" && (this.renderer = this.webWorkerRenderer);
|
|
28270
28272
|
}
|
|
28271
28273
|
/**
|
|
28272
28274
|
* Sets one new style manager to override the default style manager
|
|
@@ -28346,7 +28348,7 @@ var ge;
|
|
|
28346
28348
|
(function(r) {
|
|
28347
28349
|
r[r.BeforeStart = 0] = "BeforeStart", r[r.EqualStart = 1] = "EqualStart", r[r.BetweenStartAndEnd = 2] = "BetweenStartAndEnd", r[r.EqualEnd = 3] = "EqualEnd", r[r.AfterEnd = 4] = "AfterEnd";
|
|
28348
28350
|
})(ge || (ge = {}));
|
|
28349
|
-
class
|
|
28351
|
+
class Sg {
|
|
28350
28352
|
pointsSame(e, t) {
|
|
28351
28353
|
return this.pointsSameX(e, t) && this.pointsSameY(e, t);
|
|
28352
28354
|
}
|
|
@@ -28354,7 +28356,7 @@ class wg {
|
|
|
28354
28356
|
return this.pointsSameX(e, t) ? this.pointsSameY(e, t) ? 0 : e[1] < t[1] ? -1 : 1 : e[0] < t[0] ? -1 : 1;
|
|
28355
28357
|
}
|
|
28356
28358
|
}
|
|
28357
|
-
class qo extends
|
|
28359
|
+
class qo extends Sg {
|
|
28358
28360
|
constructor(e = 1e-10) {
|
|
28359
28361
|
super(), this.epsilon = e;
|
|
28360
28362
|
}
|
|
@@ -28604,7 +28606,7 @@ class $t {
|
|
|
28604
28606
|
return Wt(e, [0, 2, 1, 0, 2, 0, 0, 1, 1, 0, 0, 2, 0, 1, 2, 0], t);
|
|
28605
28607
|
}
|
|
28606
28608
|
}
|
|
28607
|
-
function
|
|
28609
|
+
function _g(r, e, t) {
|
|
28608
28610
|
const n = [], s = [];
|
|
28609
28611
|
for (const i of r) {
|
|
28610
28612
|
let d = function(v, w, S) {
|
|
@@ -28670,7 +28672,7 @@ function Sg(r, e, t) {
|
|
|
28670
28672
|
}
|
|
28671
28673
|
return s;
|
|
28672
28674
|
}
|
|
28673
|
-
class
|
|
28675
|
+
class Cg {
|
|
28674
28676
|
constructor() {
|
|
28675
28677
|
this.list = [], this.nextSegmentId = 0, this.curVert = NaN;
|
|
28676
28678
|
}
|
|
@@ -28756,7 +28758,7 @@ class Xo {
|
|
|
28756
28758
|
}
|
|
28757
28759
|
buildLog(e) {
|
|
28758
28760
|
var t;
|
|
28759
|
-
return this.log = e ? new
|
|
28761
|
+
return this.log = e ? new Cg() : null, (t = this.log) === null || t === void 0 ? void 0 : t.list;
|
|
28760
28762
|
}
|
|
28761
28763
|
segments(e) {
|
|
28762
28764
|
const t = new wa(!0, this.geo, this.log);
|
|
@@ -28811,7 +28813,7 @@ class Xo {
|
|
|
28811
28813
|
}
|
|
28812
28814
|
polygon(e) {
|
|
28813
28815
|
return {
|
|
28814
|
-
regions:
|
|
28816
|
+
regions: _g(e.segments, this.geo, this.log),
|
|
28815
28817
|
inverted: e.inverted
|
|
28816
28818
|
};
|
|
28817
28819
|
}
|
|
@@ -28968,7 +28970,7 @@ const De = [
|
|
|
28968
28970
|
24,
|
|
28969
28971
|
24,
|
|
28970
28972
|
25
|
|
28971
|
-
],
|
|
28973
|
+
], Tg = /* @__PURE__ */ new Map([
|
|
28972
28974
|
[
|
|
28973
28975
|
2,
|
|
28974
28976
|
{
|
|
@@ -29442,7 +29444,7 @@ class rt {
|
|
|
29442
29444
|
}
|
|
29443
29445
|
initialize() {
|
|
29444
29446
|
const e = /* @__PURE__ */ new Map();
|
|
29445
|
-
return
|
|
29447
|
+
return Tg.forEach((t, n) => {
|
|
29446
29448
|
const s = new C.BufferGeometry();
|
|
29447
29449
|
s.setAttribute(
|
|
29448
29450
|
"position",
|
|
@@ -29668,7 +29670,7 @@ class ls {
|
|
|
29668
29670
|
};
|
|
29669
29671
|
}
|
|
29670
29672
|
}
|
|
29671
|
-
const
|
|
29673
|
+
const Ig = new C.Color(583902);
|
|
29672
29674
|
class er {
|
|
29673
29675
|
/**
|
|
29674
29676
|
* Clone given material(s)
|
|
@@ -29684,7 +29686,7 @@ class er {
|
|
|
29684
29686
|
}
|
|
29685
29687
|
return e.clone();
|
|
29686
29688
|
}
|
|
29687
|
-
static setMaterialColor(e, t =
|
|
29689
|
+
static setMaterialColor(e, t = Ig) {
|
|
29688
29690
|
if (Array.isArray(e)) {
|
|
29689
29691
|
e.forEach((n) => this.setMaterialColor(n, t));
|
|
29690
29692
|
return;
|
|
@@ -29726,7 +29728,7 @@ function Nt(r, e) {
|
|
|
29726
29728
|
}
|
|
29727
29729
|
}
|
|
29728
29730
|
const _a = /* @__PURE__ */ new C.Box3(), _t = /* @__PURE__ */ new C.Vector3(), Ct = /* @__PURE__ */ new C.LineSegments(), Dn = [];
|
|
29729
|
-
class
|
|
29731
|
+
class Eg extends C.LineSegments {
|
|
29730
29732
|
constructor(e = 1e3, t = e * 2, n) {
|
|
29731
29733
|
super(new C.BufferGeometry(), n), 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;
|
|
29732
29734
|
}
|
|
@@ -30091,7 +30093,7 @@ class Ig extends C.LineSegments {
|
|
|
30091
30093
|
}
|
|
30092
30094
|
}
|
|
30093
30095
|
const Ca = /* @__PURE__ */ new C.Box3(), Tt = /* @__PURE__ */ new C.Vector3(), It = /* @__PURE__ */ new C.Mesh(), Rn = [];
|
|
30094
|
-
class
|
|
30096
|
+
class Mg extends C.Mesh {
|
|
30095
30097
|
constructor(e = 1e3, t = e * 2, n) {
|
|
30096
30098
|
super(new C.BufferGeometry(), n), 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;
|
|
30097
30099
|
}
|
|
@@ -30426,7 +30428,7 @@ class Eg extends C.Mesh {
|
|
|
30426
30428
|
}
|
|
30427
30429
|
}
|
|
30428
30430
|
const Ta = /* @__PURE__ */ new C.Box3(), Et = /* @__PURE__ */ new C.Vector3(), Mt = /* @__PURE__ */ new C.Points(), Un = [];
|
|
30429
|
-
class
|
|
30431
|
+
class kg extends C.Points {
|
|
30430
30432
|
constructor(e = 1e3, t) {
|
|
30431
30433
|
super(new C.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;
|
|
30432
30434
|
}
|
|
@@ -30714,7 +30716,7 @@ class Mg extends C.Points {
|
|
|
30714
30716
|
return this.geometry.dispose(), this;
|
|
30715
30717
|
}
|
|
30716
30718
|
}
|
|
30717
|
-
class
|
|
30719
|
+
class Lg extends C.Group {
|
|
30718
30720
|
constructor() {
|
|
30719
30721
|
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 C.Group(), this._hoverObjects = new C.Group(), this.add(this._selectedObjects), this.add(this._hoverObjects);
|
|
30720
30722
|
}
|
|
@@ -30897,7 +30899,7 @@ class kg extends C.Group {
|
|
|
30897
30899
|
addLine(e, t) {
|
|
30898
30900
|
const n = e.material, s = this.getMatchedLineBatches(e);
|
|
30899
30901
|
let i = s.get(n.id);
|
|
30900
|
-
i == null && (i = new
|
|
30902
|
+
i == null && (i = new Eg(1e3, 2e3, n), s.set(n.id, i), this.add(i)), e.geometry.applyMatrix4(e.matrixWorld);
|
|
30901
30903
|
const a = i.addGeometry(e.geometry);
|
|
30902
30904
|
return i.setGeometryInfo(a, t), {
|
|
30903
30905
|
batchedObjectId: i.id,
|
|
@@ -30907,7 +30909,7 @@ class kg extends C.Group {
|
|
|
30907
30909
|
addMesh(e, t) {
|
|
30908
30910
|
const n = e.material, s = this.getMatchedMeshBatches(e);
|
|
30909
30911
|
let i = s.get(n.id);
|
|
30910
|
-
i == null && (i = new
|
|
30912
|
+
i == null && (i = new Mg(1e3, 2e3, n), s.set(n.id, i), this.add(i)), e.geometry.applyMatrix4(e.matrixWorld);
|
|
30911
30913
|
const a = i.addGeometry(e.geometry);
|
|
30912
30914
|
return i.setGeometryInfo(a, t), {
|
|
30913
30915
|
batchedObjectId: i.id,
|
|
@@ -30917,7 +30919,7 @@ class kg extends C.Group {
|
|
|
30917
30919
|
addPoint(e, t) {
|
|
30918
30920
|
const n = e.material;
|
|
30919
30921
|
let s = this._pointBatches.get(n.id);
|
|
30920
|
-
s == null && (s = new
|
|
30922
|
+
s == null && (s = new kg(100, n), s.visible = e.visible, this._pointBatches.set(n.id, s), this.add(s)), e.geometry.applyMatrix4(e.matrixWorld);
|
|
30921
30923
|
const i = s.addGeometry(e.geometry);
|
|
30922
30924
|
return s.setGeometryInfo(i, t), {
|
|
30923
30925
|
batchedObjectId: s.id,
|
|
@@ -30973,7 +30975,7 @@ class Yo extends C.Object3D {
|
|
|
30973
30975
|
return this._styleManager = e._styleManager, super.copy(e, t);
|
|
30974
30976
|
}
|
|
30975
30977
|
}
|
|
30976
|
-
class
|
|
30978
|
+
class be extends Yo {
|
|
30977
30979
|
constructor(e) {
|
|
30978
30980
|
super(e), this._box = new C.Box3();
|
|
30979
30981
|
}
|
|
@@ -31069,13 +31071,13 @@ class ye extends Yo {
|
|
|
31069
31071
|
* this entity. Preserve transformations.
|
|
31070
31072
|
*/
|
|
31071
31073
|
flatten() {
|
|
31072
|
-
|
|
31074
|
+
be.flattenObject(this);
|
|
31073
31075
|
}
|
|
31074
31076
|
/**
|
|
31075
31077
|
* Remove this object from its parent and release geometry and material resource used by this object.
|
|
31076
31078
|
*/
|
|
31077
31079
|
dispose() {
|
|
31078
|
-
|
|
31080
|
+
be.disposeObject(this);
|
|
31079
31081
|
}
|
|
31080
31082
|
async draw() {
|
|
31081
31083
|
}
|
|
@@ -31133,7 +31135,7 @@ class ye extends Yo {
|
|
|
31133
31135
|
* @inheritdoc
|
|
31134
31136
|
*/
|
|
31135
31137
|
fastDeepClone() {
|
|
31136
|
-
const e = new
|
|
31138
|
+
const e = new be(this.styleManager);
|
|
31137
31139
|
return e.copy(this, !1), this.copyGeometry(this, e), e;
|
|
31138
31140
|
}
|
|
31139
31141
|
/**
|
|
@@ -31171,11 +31173,11 @@ class ye extends Yo {
|
|
|
31171
31173
|
return a;
|
|
31172
31174
|
}
|
|
31173
31175
|
}
|
|
31174
|
-
class or extends
|
|
31176
|
+
class or extends be {
|
|
31175
31177
|
constructor(e, t) {
|
|
31176
31178
|
super(t), e.forEach((i) => {
|
|
31177
31179
|
if (Array.isArray(i)) {
|
|
31178
|
-
const a = new
|
|
31180
|
+
const a = new be(t);
|
|
31179
31181
|
this.add(a), this.box.union(a.box);
|
|
31180
31182
|
} else
|
|
31181
31183
|
this.add(i), this.box.union(i.box);
|
|
@@ -31242,7 +31244,7 @@ class Ia {
|
|
|
31242
31244
|
*/
|
|
31243
31245
|
remove(e) {
|
|
31244
31246
|
const t = this.entities.get(e);
|
|
31245
|
-
t && (this.transientGroup.remove(t),
|
|
31247
|
+
t && (this.transientGroup.remove(t), be.disposeObject(t), this.entities.delete(e));
|
|
31246
31248
|
}
|
|
31247
31249
|
/**
|
|
31248
31250
|
* Retrieve a transient entity by ID.
|
|
@@ -31269,7 +31271,7 @@ class Ia {
|
|
|
31269
31271
|
this.clear(), this.scene.remove(this.transientGroup);
|
|
31270
31272
|
}
|
|
31271
31273
|
}
|
|
31272
|
-
let
|
|
31274
|
+
let Bg = class {
|
|
31273
31275
|
constructor(e) {
|
|
31274
31276
|
this.unsupportedTextStyles = {}, this._styleManager = e;
|
|
31275
31277
|
}
|
|
@@ -31348,8 +31350,8 @@ const Zo = class Qt {
|
|
|
31348
31350
|
* @param workerUrl - URL to the worker script
|
|
31349
31351
|
*/
|
|
31350
31352
|
initialize(e) {
|
|
31351
|
-
if (this._workerUrl = e, this._renderer = new
|
|
31352
|
-
const t = new
|
|
31353
|
+
if (this._workerUrl = e, this._renderer = new wg("worker", { workerUrl: e }), this._fontUrl && this._renderer.setFontUrl(this._fontUrl), this._renderMode && this._renderer.setDefaultMode(this._renderMode), this._styleManager) {
|
|
31354
|
+
const t = new Bg(this._styleManager);
|
|
31353
31355
|
this._renderer.setStyleManager(t);
|
|
31354
31356
|
}
|
|
31355
31357
|
}
|
|
@@ -31365,12 +31367,12 @@ const Zo = class Qt {
|
|
|
31365
31367
|
};
|
|
31366
31368
|
Zo._instance = null;
|
|
31367
31369
|
let lt = Zo;
|
|
31368
|
-
class
|
|
31370
|
+
class Ag extends Wo {
|
|
31369
31371
|
onFontUrlChanged(e) {
|
|
31370
31372
|
lt.getInstance().setFontUrl(e);
|
|
31371
31373
|
}
|
|
31372
31374
|
}
|
|
31373
|
-
class
|
|
31375
|
+
class Og extends be {
|
|
31374
31376
|
constructor(e, t, n) {
|
|
31375
31377
|
super(n);
|
|
31376
31378
|
const s = URL.createObjectURL(e), i = new C.TextureLoader().load(s);
|
|
@@ -31397,7 +31399,7 @@ class Ag extends ye {
|
|
|
31397
31399
|
e.setAttribute("uv", new C.BufferAttribute(n, 2));
|
|
31398
31400
|
}
|
|
31399
31401
|
}
|
|
31400
|
-
class
|
|
31402
|
+
class Pg extends be {
|
|
31401
31403
|
constructor(e, t, n) {
|
|
31402
31404
|
super(n);
|
|
31403
31405
|
const s = this.styleManager.getLineMaterial(t), i = e.length, a = new Float32Array(i * 3), o = i * 2 > 65535 ? new Uint32Array(i * 2) : new Uint16Array(i * 2);
|
|
@@ -31416,7 +31418,7 @@ class Og extends ye {
|
|
|
31416
31418
|
e.computeBoundingBox(), this.box = e.boundingBox;
|
|
31417
31419
|
}
|
|
31418
31420
|
}
|
|
31419
|
-
class
|
|
31421
|
+
class Dg extends be {
|
|
31420
31422
|
constructor(e, t, n, s, i) {
|
|
31421
31423
|
super(i);
|
|
31422
31424
|
const a = this.styleManager.getLineMaterial(s), o = new C.BufferGeometry();
|
|
@@ -31428,7 +31430,7 @@ class Pg extends ye {
|
|
|
31428
31430
|
dn.computeLineDistances(c), this.add(c);
|
|
31429
31431
|
}
|
|
31430
31432
|
}
|
|
31431
|
-
class
|
|
31433
|
+
class Rg extends be {
|
|
31432
31434
|
constructor(e, t, n, s, i = !1) {
|
|
31433
31435
|
super(s), this._text = e, this._style = {
|
|
31434
31436
|
...n,
|
|
@@ -31486,8 +31488,8 @@ class Dg extends ye {
|
|
|
31486
31488
|
(n = this._mtext) == null || n.raycast(e, t);
|
|
31487
31489
|
}
|
|
31488
31490
|
}
|
|
31489
|
-
const
|
|
31490
|
-
class
|
|
31491
|
+
const Ug = /* @__PURE__ */ new C.Vector3();
|
|
31492
|
+
class Fg extends be {
|
|
31491
31493
|
constructor(e, t, n, s) {
|
|
31492
31494
|
super(s);
|
|
31493
31495
|
const i = rt.instance.create(
|
|
@@ -31495,7 +31497,7 @@ class Ug extends ye {
|
|
|
31495
31497
|
e
|
|
31496
31498
|
);
|
|
31497
31499
|
this.isShowPoint = i.point != null;
|
|
31498
|
-
const a = i.point ?? new C.BufferGeometry().setFromPoints([
|
|
31500
|
+
const a = i.point ?? new C.BufferGeometry().setFromPoints([Ug.copy(e)]);
|
|
31499
31501
|
a.computeBoundingBox(), a.boundingBox && this.box.union(a.boundingBox);
|
|
31500
31502
|
const o = this.styleManager.getPointsMaterial(t), c = new C.Points(a, o);
|
|
31501
31503
|
if (c.userData.bboxIntersectionCheck = !0, c.visible = this.isShowPoint, this.add(c), i.line) {
|
|
@@ -31506,7 +31508,7 @@ class Ug extends ye {
|
|
|
31506
31508
|
}
|
|
31507
31509
|
}
|
|
31508
31510
|
}
|
|
31509
|
-
class
|
|
31511
|
+
class Ng extends be {
|
|
31510
31512
|
constructor(e, t, n) {
|
|
31511
31513
|
var s;
|
|
31512
31514
|
super(n);
|
|
@@ -31624,7 +31626,7 @@ class Fg extends ye {
|
|
|
31624
31626
|
return s;
|
|
31625
31627
|
}
|
|
31626
31628
|
}
|
|
31627
|
-
function
|
|
31629
|
+
function zg(r, e, t, n, s = 0) {
|
|
31628
31630
|
const i = {
|
|
31629
31631
|
u_cameraZoom: { value: t },
|
|
31630
31632
|
u_patternLines: { value: r },
|
|
@@ -31909,7 +31911,7 @@ class Gs {
|
|
|
31909
31911
|
return e.color.isByLayer || e.lineType.type === "ByLayer";
|
|
31910
31912
|
}
|
|
31911
31913
|
}
|
|
31912
|
-
class
|
|
31914
|
+
class Gg extends Gs {
|
|
31913
31915
|
/**
|
|
31914
31916
|
* Create either MeshBasicMaterial or hatch shader material
|
|
31915
31917
|
*/
|
|
@@ -31977,7 +31979,7 @@ class zg extends Gs {
|
|
|
31977
31979
|
}
|
|
31978
31980
|
c.push(T);
|
|
31979
31981
|
}
|
|
31980
|
-
const h =
|
|
31982
|
+
const h = zg(
|
|
31981
31983
|
c,
|
|
31982
31984
|
n.patternAngle,
|
|
31983
31985
|
this.options.cameraZoomUniform,
|
|
@@ -32003,7 +32005,7 @@ class zg extends Gs {
|
|
|
32003
32005
|
return `hatch_${e.layer}_${e.rgbColor}_${n.patternAngle}_${s}`;
|
|
32004
32006
|
}
|
|
32005
32007
|
}
|
|
32006
|
-
class
|
|
32008
|
+
class jg {
|
|
32007
32009
|
/**
|
|
32008
32010
|
* Creates line shader by given pattern.
|
|
32009
32011
|
* Note: remember to call line.computeLineDistances() in order to make it work!
|
|
@@ -32094,7 +32096,7 @@ class Gg {
|
|
|
32094
32096
|
});
|
|
32095
32097
|
}
|
|
32096
32098
|
}
|
|
32097
|
-
class
|
|
32099
|
+
class Vg extends Gs {
|
|
32098
32100
|
/**
|
|
32099
32101
|
* Builds a stable material key from traits.
|
|
32100
32102
|
* Key differs for shader vs basic, ByLayer vs ByEntity.
|
|
@@ -32109,7 +32111,7 @@ class jg extends Gs {
|
|
|
32109
32111
|
}
|
|
32110
32112
|
createMaterialImpl(e, t = {}) {
|
|
32111
32113
|
let n;
|
|
32112
|
-
return this.isShaderMaterial(e, t) ? n =
|
|
32114
|
+
return this.isShaderMaterial(e, t) ? n = jg.createLineShaderMaterial(
|
|
32113
32115
|
e.lineType.pattern,
|
|
32114
32116
|
e.rgbColor,
|
|
32115
32117
|
e.lineTypeScale,
|
|
@@ -32118,7 +32120,7 @@ class jg extends Gs {
|
|
|
32118
32120
|
) : n = new C.LineBasicMaterial({ color: e.rgbColor }), n;
|
|
32119
32121
|
}
|
|
32120
32122
|
}
|
|
32121
|
-
class
|
|
32123
|
+
class Hg extends Gs {
|
|
32122
32124
|
/**
|
|
32123
32125
|
* Builds a stable material key from traits.
|
|
32124
32126
|
*/
|
|
@@ -32139,7 +32141,7 @@ class Vg extends Gs {
|
|
|
32139
32141
|
}
|
|
32140
32142
|
const Ko = class Vn {
|
|
32141
32143
|
constructor() {
|
|
32142
|
-
this.unsupportedTextStyles = {}, this.pointMgr = new
|
|
32144
|
+
this.unsupportedTextStyles = {}, this.pointMgr = new Hg(Vn.options), this.lineMgr = new Vg(Vn.options), this.fillMgr = new Gg(Vn.options);
|
|
32143
32145
|
}
|
|
32144
32146
|
/**
|
|
32145
32147
|
* Returns a material for point entities.
|
|
@@ -32166,7 +32168,7 @@ const Ko = class Vn {
|
|
|
32166
32168
|
* @param traits - Current entity traits.
|
|
32167
32169
|
* @param rebaseOffset - Offset used to transform pattern origins.
|
|
32168
32170
|
*/
|
|
32169
|
-
getFillMaterial(e, t =
|
|
32171
|
+
getFillMaterial(e, t = $g) {
|
|
32170
32172
|
return this.fillMgr.getMaterial(e, {
|
|
32171
32173
|
rebaseOffset: t
|
|
32172
32174
|
});
|
|
@@ -32198,13 +32200,13 @@ Ko.options = {
|
|
|
32198
32200
|
viewportScaleUniform: 1,
|
|
32199
32201
|
maxFragmentUniforms: 1024
|
|
32200
32202
|
};
|
|
32201
|
-
let
|
|
32202
|
-
const
|
|
32203
|
-
class
|
|
32203
|
+
let Wg = Ko;
|
|
32204
|
+
const $g = /* @__PURE__ */ new C.Vector2(0, 0);
|
|
32205
|
+
class qg {
|
|
32204
32206
|
constructor(e) {
|
|
32205
32207
|
this.events = {
|
|
32206
|
-
fontNotFound: new
|
|
32207
|
-
}, this._renderer = e, this._styleManager = new
|
|
32208
|
+
fontNotFound: new ye()
|
|
32209
|
+
}, this._renderer = e, this._styleManager = new Wg(), lt.getInstance().overrideStyleManager(this._styleManager), Xe.instance.events.fontNotFound.addEventListener((t) => {
|
|
32208
32210
|
this.events.fontNotFound.dispatch(t);
|
|
32209
32211
|
}), this._subEntityTraits = ls.createDefaultTraits();
|
|
32210
32212
|
}
|
|
@@ -32318,7 +32320,7 @@ class $g {
|
|
|
32318
32320
|
* Create one empty entity
|
|
32319
32321
|
*/
|
|
32320
32322
|
createEntity() {
|
|
32321
|
-
return new
|
|
32323
|
+
return new be(this._styleManager);
|
|
32322
32324
|
}
|
|
32323
32325
|
/**
|
|
32324
32326
|
* @inheritdoc
|
|
@@ -32330,7 +32332,7 @@ class $g {
|
|
|
32330
32332
|
* @inheritdoc
|
|
32331
32333
|
*/
|
|
32332
32334
|
point(e, t) {
|
|
32333
|
-
return new
|
|
32335
|
+
return new Fg(
|
|
32334
32336
|
e,
|
|
32335
32337
|
this._subEntityTraits,
|
|
32336
32338
|
t,
|
|
@@ -32359,7 +32361,7 @@ class $g {
|
|
|
32359
32361
|
* @inheritdoc
|
|
32360
32362
|
*/
|
|
32361
32363
|
lineSegments(e, t, n) {
|
|
32362
|
-
return new
|
|
32364
|
+
return new Dg(
|
|
32363
32365
|
e,
|
|
32364
32366
|
t,
|
|
32365
32367
|
n,
|
|
@@ -32371,13 +32373,13 @@ class $g {
|
|
|
32371
32373
|
* @inheritdoc
|
|
32372
32374
|
*/
|
|
32373
32375
|
area(e) {
|
|
32374
|
-
return new
|
|
32376
|
+
return new Ng(e, this._subEntityTraits, this._styleManager);
|
|
32375
32377
|
}
|
|
32376
32378
|
/**
|
|
32377
32379
|
* @inheritdoc
|
|
32378
32380
|
*/
|
|
32379
32381
|
mtext(e, t, n) {
|
|
32380
|
-
return new
|
|
32382
|
+
return new Rg(
|
|
32381
32383
|
e,
|
|
32382
32384
|
this._subEntityTraits,
|
|
32383
32385
|
t,
|
|
@@ -32389,7 +32391,7 @@ class $g {
|
|
|
32389
32391
|
* @inheritdoc
|
|
32390
32392
|
*/
|
|
32391
32393
|
image(e, t) {
|
|
32392
|
-
return new
|
|
32394
|
+
return new Og(e, t, this._styleManager);
|
|
32393
32395
|
}
|
|
32394
32396
|
/**
|
|
32395
32397
|
* Clears all cached materials and releases its memory
|
|
@@ -32398,10 +32400,10 @@ class $g {
|
|
|
32398
32400
|
this._styleManager.dispose(), Xe.instance.missedFonts = {};
|
|
32399
32401
|
}
|
|
32400
32402
|
linePoints(e) {
|
|
32401
|
-
return new
|
|
32403
|
+
return new Pg(e, this._subEntityTraits, this._styleManager);
|
|
32402
32404
|
}
|
|
32403
32405
|
}
|
|
32404
|
-
class
|
|
32406
|
+
class Xg {
|
|
32405
32407
|
constructor(e) {
|
|
32406
32408
|
this._camera = e;
|
|
32407
32409
|
}
|
|
@@ -32510,10 +32512,10 @@ class Qo {
|
|
|
32510
32512
|
*/
|
|
32511
32513
|
constructor(e, t, n) {
|
|
32512
32514
|
this._frustum = 400, this.events = {
|
|
32513
|
-
viewChanged: new
|
|
32515
|
+
viewChanged: new ye()
|
|
32514
32516
|
}, this._renderer = e, this._width = t, this._height = n;
|
|
32515
32517
|
const s = this.createCamera();
|
|
32516
|
-
this._camera = new
|
|
32518
|
+
this._camera = new Xg(s), this._cameraControls = this.createCameraControls(), this._cameraControls.addEventListener("change", () => {
|
|
32517
32519
|
this.events.viewChanged.dispatch({ view: this });
|
|
32518
32520
|
}), this._raycaster = new C.Raycaster();
|
|
32519
32521
|
}
|
|
@@ -32701,7 +32703,7 @@ class tr extends Qo {
|
|
|
32701
32703
|
}
|
|
32702
32704
|
}
|
|
32703
32705
|
}
|
|
32704
|
-
class
|
|
32706
|
+
class Yg extends vs {
|
|
32705
32707
|
/**
|
|
32706
32708
|
* Creates a circle jig.
|
|
32707
32709
|
*
|
|
@@ -32717,14 +32719,14 @@ class Xg extends vs {
|
|
|
32717
32719
|
this._circle.radius = e;
|
|
32718
32720
|
}
|
|
32719
32721
|
}
|
|
32720
|
-
class
|
|
32722
|
+
class Zg extends ve {
|
|
32721
32723
|
async execute(e) {
|
|
32722
32724
|
const t = new st(
|
|
32723
32725
|
ce.t("jig.circle.center")
|
|
32724
32726
|
), n = await ee.instance.editor.getPoint(t), s = new ml(
|
|
32725
32727
|
ce.t("jig.circle.radius")
|
|
32726
32728
|
);
|
|
32727
|
-
s.jig = new
|
|
32729
|
+
s.jig = new Yg(e.view, n);
|
|
32728
32730
|
const i = await ee.instance.editor.getDistance(s), a = e.doc.database, o = new ps(n, i);
|
|
32729
32731
|
a.tables.blockTable.modelSpace.appendEntity(o);
|
|
32730
32732
|
}
|
|
@@ -32839,7 +32841,7 @@ class cr {
|
|
|
32839
32841
|
return this;
|
|
32840
32842
|
}
|
|
32841
32843
|
}
|
|
32842
|
-
class
|
|
32844
|
+
class Kg extends cr {
|
|
32843
32845
|
constructor(e) {
|
|
32844
32846
|
if (super(), e.closed)
|
|
32845
32847
|
this.svg = `
|
|
@@ -32853,7 +32855,7 @@ class Zg extends cr {
|
|
|
32853
32855
|
this._box.min.copy(t.min), this._box.max.copy(t.max);
|
|
32854
32856
|
}
|
|
32855
32857
|
}
|
|
32856
|
-
class
|
|
32858
|
+
class Qg extends cr {
|
|
32857
32859
|
constructor(e) {
|
|
32858
32860
|
if (super(), e.closed)
|
|
32859
32861
|
this.svg = `
|
|
@@ -32869,7 +32871,7 @@ class Kg extends cr {
|
|
|
32869
32871
|
this._box.min.copy(t.min), this._box.max.copy(t.max);
|
|
32870
32872
|
}
|
|
32871
32873
|
}
|
|
32872
|
-
class
|
|
32874
|
+
class Jg extends cr {
|
|
32873
32875
|
constructor(e) {
|
|
32874
32876
|
super();
|
|
32875
32877
|
const t = e.reduce(
|
|
@@ -32879,7 +32881,7 @@ class Qg extends cr {
|
|
|
32879
32881
|
t && (this.svg = `<path d="${t}" />`);
|
|
32880
32882
|
}
|
|
32881
32883
|
}
|
|
32882
|
-
class
|
|
32884
|
+
class em {
|
|
32883
32885
|
constructor() {
|
|
32884
32886
|
this._container = new Array(), this._bbox = new Ke(), this._subEntityTraits = {
|
|
32885
32887
|
color: new $n(),
|
|
@@ -32939,21 +32941,21 @@ class Jg {
|
|
|
32939
32941
|
* @inheritdoc
|
|
32940
32942
|
*/
|
|
32941
32943
|
circularArc(e) {
|
|
32942
|
-
const t = new
|
|
32944
|
+
const t = new Kg(e);
|
|
32943
32945
|
return this._container.push(t.svg), this._bbox.union(t.box), t;
|
|
32944
32946
|
}
|
|
32945
32947
|
/**
|
|
32946
32948
|
* @inheritdoc
|
|
32947
32949
|
*/
|
|
32948
32950
|
ellipticalArc(e) {
|
|
32949
|
-
const t = new
|
|
32951
|
+
const t = new Qg(e);
|
|
32950
32952
|
return this._container.push(t.svg), this._bbox.union(t.box), t;
|
|
32951
32953
|
}
|
|
32952
32954
|
/**
|
|
32953
32955
|
* @inheritdoc
|
|
32954
32956
|
*/
|
|
32955
32957
|
lines(e) {
|
|
32956
|
-
const t = new
|
|
32958
|
+
const t = new Jg(e);
|
|
32957
32959
|
return this._container.push(t.svg), this._bbox.union(t.box), t;
|
|
32958
32960
|
}
|
|
32959
32961
|
/**
|
|
@@ -33008,7 +33010,7 @@ class Jg {
|
|
|
33008
33010
|
}
|
|
33009
33011
|
}
|
|
33010
33012
|
const kt = /* @__PURE__ */ new cr();
|
|
33011
|
-
class
|
|
33013
|
+
class tm {
|
|
33012
33014
|
/**
|
|
33013
33015
|
* Converts the current CAD drawing to SVG format and initiates download.
|
|
33014
33016
|
*
|
|
@@ -33025,7 +33027,7 @@ class em {
|
|
|
33025
33027
|
* ```
|
|
33026
33028
|
*/
|
|
33027
33029
|
convert() {
|
|
33028
|
-
const e = ee.instance.curDocument.database.tables.blockTable.modelSpace.newIterator(), t = new
|
|
33030
|
+
const e = ee.instance.curDocument.database.tables.blockTable.modelSpace.newIterator(), t = new em();
|
|
33029
33031
|
for (const n of e)
|
|
33030
33032
|
n.worldDraw(t);
|
|
33031
33033
|
this.createFileAndDownloadIt(t.export());
|
|
@@ -33049,7 +33051,7 @@ class em {
|
|
|
33049
33051
|
s.href = n, s.download = "example.svg", document.body.appendChild(s), s.click();
|
|
33050
33052
|
}
|
|
33051
33053
|
}
|
|
33052
|
-
class
|
|
33054
|
+
class nm extends ve {
|
|
33053
33055
|
/**
|
|
33054
33056
|
* Executes the SVG conversion command.
|
|
33055
33057
|
*
|
|
@@ -33059,10 +33061,10 @@ class tm extends ve {
|
|
|
33059
33061
|
* @param _context - The application context (unused in this command)
|
|
33060
33062
|
*/
|
|
33061
33063
|
execute(e) {
|
|
33062
|
-
new
|
|
33064
|
+
new tm().convert();
|
|
33063
33065
|
}
|
|
33064
33066
|
}
|
|
33065
|
-
class
|
|
33067
|
+
class rm extends vs {
|
|
33066
33068
|
/**
|
|
33067
33069
|
* Creates a dimension jig.
|
|
33068
33070
|
*
|
|
@@ -33090,7 +33092,7 @@ class nm extends vs {
|
|
|
33090
33092
|
return Math.atan2(s, n);
|
|
33091
33093
|
}
|
|
33092
33094
|
}
|
|
33093
|
-
class
|
|
33095
|
+
class sm extends ve {
|
|
33094
33096
|
async execute(e) {
|
|
33095
33097
|
const t = new st(
|
|
33096
33098
|
ce.t("jig.dimlinear.xLine1Point")
|
|
@@ -33101,7 +33103,7 @@ class rm extends ve {
|
|
|
33101
33103
|
const i = await ee.instance.editor.getPoint(s), a = new st(
|
|
33102
33104
|
ce.t("jig.dimlinear.dimLinePoint")
|
|
33103
33105
|
);
|
|
33104
|
-
a.jig = new
|
|
33106
|
+
a.jig = new rm(
|
|
33105
33107
|
e.view,
|
|
33106
33108
|
e.doc.database,
|
|
33107
33109
|
n,
|
|
@@ -33126,7 +33128,7 @@ class rm extends ve {
|
|
|
33126
33128
|
return `*D${n + 1}`;
|
|
33127
33129
|
}
|
|
33128
33130
|
}
|
|
33129
|
-
class
|
|
33131
|
+
class im extends vs {
|
|
33130
33132
|
/**
|
|
33131
33133
|
* Creates a line jig.
|
|
33132
33134
|
*
|
|
@@ -33142,19 +33144,19 @@ class sm extends vs {
|
|
|
33142
33144
|
this._line.endPoint = e;
|
|
33143
33145
|
}
|
|
33144
33146
|
}
|
|
33145
|
-
class
|
|
33147
|
+
class am extends ve {
|
|
33146
33148
|
async execute(e) {
|
|
33147
33149
|
const t = new st(
|
|
33148
33150
|
ce.t("jig.line.firstPoint")
|
|
33149
33151
|
), n = await ee.instance.editor.getPoint(t), s = new st(
|
|
33150
33152
|
ce.t("jig.line.nextPoint")
|
|
33151
33153
|
);
|
|
33152
|
-
s.useDashedLine = !0, s.jig = new
|
|
33154
|
+
s.useDashedLine = !0, s.jig = new im(e.view, n), s.useDashedLine = !0, s.useBasePoint = !0;
|
|
33153
33155
|
const i = await ee.instance.editor.getPoint(s), a = e.doc.database, o = new gs(n, i);
|
|
33154
33156
|
a.tables.blockTable.modelSpace.appendEntity(o);
|
|
33155
33157
|
}
|
|
33156
33158
|
}
|
|
33157
|
-
class
|
|
33159
|
+
class om extends ve {
|
|
33158
33160
|
execute(e) {
|
|
33159
33161
|
this.printSelectionSet(e), this.printStats(e), this.printPerformanceData();
|
|
33160
33162
|
}
|
|
@@ -33202,7 +33204,7 @@ class am extends ve {
|
|
|
33202
33204
|
cc.getInstance().printAll();
|
|
33203
33205
|
}
|
|
33204
33206
|
}
|
|
33205
|
-
class
|
|
33207
|
+
class cm extends ve {
|
|
33206
33208
|
/**
|
|
33207
33209
|
* Executes the open file command.
|
|
33208
33210
|
*
|
|
@@ -33216,7 +33218,7 @@ class om extends ve {
|
|
|
33216
33218
|
ot.emit("open-file", {});
|
|
33217
33219
|
}
|
|
33218
33220
|
}
|
|
33219
|
-
class
|
|
33221
|
+
class lm extends ve {
|
|
33220
33222
|
/**
|
|
33221
33223
|
* Executes the quick new command.
|
|
33222
33224
|
*
|
|
@@ -33230,7 +33232,7 @@ class cm extends ve {
|
|
|
33230
33232
|
ee.instance.openUrl(t + "templates/acadiso.dxf");
|
|
33231
33233
|
}
|
|
33232
33234
|
}
|
|
33233
|
-
class
|
|
33235
|
+
class hm extends ve {
|
|
33234
33236
|
/**
|
|
33235
33237
|
* Executes the regen command to redraw the current drawing
|
|
33236
33238
|
*/
|
|
@@ -33238,7 +33240,7 @@ class lm extends ve {
|
|
|
33238
33240
|
ee.instance.regen();
|
|
33239
33241
|
}
|
|
33240
33242
|
}
|
|
33241
|
-
class
|
|
33243
|
+
class um extends ve {
|
|
33242
33244
|
/**
|
|
33243
33245
|
* Executes the select command.
|
|
33244
33246
|
*
|
|
@@ -33251,7 +33253,7 @@ class hm extends ve {
|
|
|
33251
33253
|
e.view.mode = it.SELECTION, e.view.setCursor(pn.Crosshair);
|
|
33252
33254
|
}
|
|
33253
33255
|
}
|
|
33254
|
-
class
|
|
33256
|
+
class dm extends ve {
|
|
33255
33257
|
/**
|
|
33256
33258
|
* Executes the command to modify the value of one system variable.
|
|
33257
33259
|
*
|
|
@@ -33262,7 +33264,7 @@ class um extends ve {
|
|
|
33262
33264
|
s.getDescriptor(this.globalName) && s.setVar(this.globalName, n);
|
|
33263
33265
|
}
|
|
33264
33266
|
}
|
|
33265
|
-
class
|
|
33267
|
+
class pm extends ve {
|
|
33266
33268
|
/**
|
|
33267
33269
|
* Executes the zoom to fit command.
|
|
33268
33270
|
*
|
|
@@ -33275,7 +33277,7 @@ class dm extends ve {
|
|
|
33275
33277
|
e.view.zoomToFitDrawing();
|
|
33276
33278
|
}
|
|
33277
33279
|
}
|
|
33278
|
-
class
|
|
33280
|
+
class fm extends ve {
|
|
33279
33281
|
/**
|
|
33280
33282
|
* Executes the zoom-to-box command.
|
|
33281
33283
|
*
|
|
@@ -33290,7 +33292,7 @@ class pm extends ve {
|
|
|
33290
33292
|
return e.view.zoomTo(t, 1);
|
|
33291
33293
|
}
|
|
33292
33294
|
}
|
|
33293
|
-
class
|
|
33295
|
+
class gm extends ve {
|
|
33294
33296
|
/**
|
|
33295
33297
|
* Executes the pan command.
|
|
33296
33298
|
*
|
|
@@ -33303,36 +33305,36 @@ class fm extends ve {
|
|
|
33303
33305
|
e.view.mode = it.PAN, e.view.setCursor(pn.Grab);
|
|
33304
33306
|
}
|
|
33305
33307
|
}
|
|
33306
|
-
const
|
|
33308
|
+
const mm = (r) => new Oa(r.min, r.max), ym = (r) => new Ke(
|
|
33307
33309
|
r.min,
|
|
33308
33310
|
r.max
|
|
33309
|
-
),
|
|
33311
|
+
), bm = (r) => new C.Box3(
|
|
33310
33312
|
r.min,
|
|
33311
33313
|
r.max
|
|
33312
|
-
),
|
|
33314
|
+
), vm = (r) => new Ke(r.min, r.max), xm = (r) => new C.Box2(
|
|
33313
33315
|
r.min,
|
|
33314
33316
|
r.max
|
|
33315
|
-
),
|
|
33317
|
+
), wm = (r) => new Ke(r.min, r.max), Sm = (r) => {
|
|
33316
33318
|
const e = new C.Box3();
|
|
33317
33319
|
return e.min.set(r.min.x, r.min.y, 0), e.max.set(r.max.x, r.max.y, 0), e;
|
|
33318
33320
|
}, Ea = {
|
|
33319
33321
|
/** Converts Three.js Box2 to CAD geometry AcGeBox2d */
|
|
33320
|
-
threeBo2dToGeBox2d:
|
|
33322
|
+
threeBo2dToGeBox2d: vm,
|
|
33321
33323
|
/** Converts CAD geometry AcGeBox2d to Three.js Box2 */
|
|
33322
|
-
geBox2dToThreeBox2d:
|
|
33324
|
+
geBox2dToThreeBox2d: xm,
|
|
33323
33325
|
/** Converts Three.js Box3 to CAD geometry AcGeBox3d */
|
|
33324
|
-
threeBox3dToGeBox3d:
|
|
33326
|
+
threeBox3dToGeBox3d: mm,
|
|
33325
33327
|
/** Converts CAD geometry AcGeBox3d to Three.js Box3 */
|
|
33326
|
-
geBox3dToThreeBox3d:
|
|
33328
|
+
geBox3dToThreeBox3d: bm,
|
|
33327
33329
|
/** Converts CAD geometry AcGeBox3d to CAD geometry AcGeBox2d */
|
|
33328
|
-
goBox3dToGeBox2d:
|
|
33330
|
+
goBox3dToGeBox2d: ym,
|
|
33329
33331
|
/** Converts Three.js Box3 to CAD geometry Box2d (ignores Z) */
|
|
33330
|
-
threeBox3dToGeBox2d:
|
|
33332
|
+
threeBox3dToGeBox2d: wm,
|
|
33331
33333
|
/** Converts CAD geometry AcGeBox2d to Three.js Box3 (Z=0) */
|
|
33332
|
-
geBox2dToThreeBox3d:
|
|
33334
|
+
geBox2dToThreeBox3d: Sm
|
|
33333
33335
|
};
|
|
33334
33336
|
var lr = /* @__PURE__ */ ((r) => (r[r.LEFT_BOTTOM = 0] = "LEFT_BOTTOM", r[r.LEFT_TOP = 1] = "LEFT_TOP", r[r.RIGHT_TOP = 2] = "RIGHT_TOP", r[r.RIGHT_BOTTOM = 4] = "RIGHT_BOTTOM", r))(lr || {});
|
|
33335
|
-
class
|
|
33337
|
+
class _m extends C.Object3D {
|
|
33336
33338
|
/**
|
|
33337
33339
|
* Construct one instance of this gizmo
|
|
33338
33340
|
* @param camera Camera used in your canvas
|
|
@@ -33416,7 +33418,7 @@ class Sm extends C.Object3D {
|
|
|
33416
33418
|
return a;
|
|
33417
33419
|
}
|
|
33418
33420
|
}
|
|
33419
|
-
function
|
|
33421
|
+
function Cm(r, e) {
|
|
33420
33422
|
const t = e.font || "Helvetica", n = e.fontSize || 30, s = e.width || 200, i = e.height || 200, a = e.bgColor ? e.bgColor.join(", ") : "255, 255, 255, 1.0", o = e.color ? e.color.join(", ") : "0, 0, 0, 1.0", c = document.createElement("canvas");
|
|
33421
33423
|
c.width = s, c.height = i;
|
|
33422
33424
|
const l = c.getContext("2d");
|
|
@@ -33433,7 +33435,7 @@ function _m(r, e) {
|
|
|
33433
33435
|
return h.minFilter = C.LinearFilter, h.needsUpdate = !0, h;
|
|
33434
33436
|
}
|
|
33435
33437
|
function zr(r) {
|
|
33436
|
-
const e =
|
|
33438
|
+
const e = Cm(r, {
|
|
33437
33439
|
fontSize: 100,
|
|
33438
33440
|
font: "Arial Narrow, sans-serif",
|
|
33439
33441
|
color: [255, 255, 255, 1],
|
|
@@ -33442,15 +33444,15 @@ function zr(r) {
|
|
|
33442
33444
|
return new C.Sprite(t);
|
|
33443
33445
|
}
|
|
33444
33446
|
lr.RIGHT_TOP;
|
|
33445
|
-
const
|
|
33447
|
+
const Tm = {
|
|
33446
33448
|
pos: lr.LEFT_BOTTOM,
|
|
33447
33449
|
size: 100,
|
|
33448
33450
|
hasZAxis: !0
|
|
33449
33451
|
};
|
|
33450
|
-
class
|
|
33452
|
+
class Im extends _m {
|
|
33451
33453
|
constructor(e, t, n) {
|
|
33452
33454
|
const s = {
|
|
33453
|
-
...
|
|
33455
|
+
...Tm,
|
|
33454
33456
|
...n
|
|
33455
33457
|
};
|
|
33456
33458
|
super(e, t, s.size, n.pos), this.hasZAxis = s.hasZAxis;
|
|
@@ -33492,7 +33494,7 @@ class Tm extends Sm {
|
|
|
33492
33494
|
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());
|
|
33493
33495
|
}
|
|
33494
33496
|
}
|
|
33495
|
-
class
|
|
33497
|
+
class Em extends Qo {
|
|
33496
33498
|
/**
|
|
33497
33499
|
* Construct one instance of this class.
|
|
33498
33500
|
*
|
|
@@ -33583,7 +33585,7 @@ class Im extends Qo {
|
|
|
33583
33585
|
* @returns The configured axes gizmo instance
|
|
33584
33586
|
*/
|
|
33585
33587
|
createAxesGizmo() {
|
|
33586
|
-
return new
|
|
33588
|
+
return new Im(
|
|
33587
33589
|
this._camera.internalCamera,
|
|
33588
33590
|
this._renderer.internalRenderer,
|
|
33589
33591
|
{
|
|
@@ -33617,7 +33619,7 @@ class Im extends Qo {
|
|
|
33617
33619
|
}
|
|
33618
33620
|
}
|
|
33619
33621
|
}
|
|
33620
|
-
class
|
|
33622
|
+
class Mm {
|
|
33621
33623
|
/**
|
|
33622
33624
|
* Creates a new layout view manager instance.
|
|
33623
33625
|
* Initializes with no active layout and an empty collection of views.
|
|
@@ -33700,7 +33702,7 @@ class Em {
|
|
|
33700
33702
|
(t = this.activeLayoutView) == null || t.render(e);
|
|
33701
33703
|
}
|
|
33702
33704
|
}
|
|
33703
|
-
function Jo(r, e, t = 0, n = r.length - 1, s =
|
|
33705
|
+
function Jo(r, e, t = 0, n = r.length - 1, s = km) {
|
|
33704
33706
|
for (; n > t; ) {
|
|
33705
33707
|
if (n - t > 600) {
|
|
33706
33708
|
const c = n - t + 1, l = e - t + 1, h = Math.log(c), d = 0.5 * Math.exp(2 * h / 3), u = 0.5 * Math.sqrt(h * d * (c - d) / c) * (l - c / 2 < 0 ? -1 : 1), f = Math.max(t, Math.floor(e - l * d / c + u)), y = Math.min(n, Math.floor(e + (c - l) * d / c + u));
|
|
@@ -33719,10 +33721,10 @@ function Xt(r, e, t) {
|
|
|
33719
33721
|
const n = r[e];
|
|
33720
33722
|
r[e] = r[t], r[t] = n;
|
|
33721
33723
|
}
|
|
33722
|
-
function
|
|
33724
|
+
function km(r, e) {
|
|
33723
33725
|
return r < e ? -1 : r > e ? 1 : 0;
|
|
33724
33726
|
}
|
|
33725
|
-
class
|
|
33727
|
+
class Lm {
|
|
33726
33728
|
constructor(e = 9) {
|
|
33727
33729
|
this._maxEntries = Math.max(4, e), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear();
|
|
33728
33730
|
}
|
|
@@ -33793,7 +33795,7 @@ class km {
|
|
|
33793
33795
|
let o, c, l;
|
|
33794
33796
|
for (; n || i.length; ) {
|
|
33795
33797
|
if (n || (n = i.pop(), c = i[i.length - 1], o = a.pop(), l = !0), n.leaf) {
|
|
33796
|
-
const h =
|
|
33798
|
+
const h = Bm(e, n.children, t);
|
|
33797
33799
|
if (h !== -1)
|
|
33798
33800
|
return n.children.splice(h, 1), i.push(n), this._condense(i), this;
|
|
33799
33801
|
}
|
|
@@ -33844,7 +33846,7 @@ class km {
|
|
|
33844
33846
|
for (; s.push(t), !(t.leaf || s.length - 1 === n); ) {
|
|
33845
33847
|
let i = 1 / 0, a = 1 / 0, o;
|
|
33846
33848
|
for (let c = 0; c < t.children.length; c++) {
|
|
33847
|
-
const l = t.children[c], h = Gr(l), d =
|
|
33849
|
+
const l = t.children[c], h = Gr(l), d = Pm(e, l) - h;
|
|
33848
33850
|
d < a ? (a = d, i = h < i ? h : i, o = l) : d === a && h < i && (i = h, o = l);
|
|
33849
33851
|
}
|
|
33850
33852
|
t = o || t.children[0];
|
|
@@ -33870,14 +33872,14 @@ class km {
|
|
|
33870
33872
|
_chooseSplitIndex(e, t, n) {
|
|
33871
33873
|
let s, i = 1 / 0, a = 1 / 0;
|
|
33872
33874
|
for (let o = t; o <= n - t; o++) {
|
|
33873
|
-
const c = Jt(e, 0, o, this.toBBox), l = Jt(e, o, n, this.toBBox), h =
|
|
33875
|
+
const c = Jt(e, 0, o, this.toBBox), l = Jt(e, o, n, this.toBBox), h = Dm(c, l), d = Gr(c) + Gr(l);
|
|
33874
33876
|
h < i ? (i = h, s = o, a = d < a ? d : a) : h === i && d < a && (a = d, s = o);
|
|
33875
33877
|
}
|
|
33876
33878
|
return s || n - t;
|
|
33877
33879
|
}
|
|
33878
33880
|
// sorts node children by the best axis for split
|
|
33879
33881
|
_chooseSplitAxis(e, t, n) {
|
|
33880
|
-
const s = e.leaf ? this.compareMinX :
|
|
33882
|
+
const s = e.leaf ? this.compareMinX : Am, i = e.leaf ? this.compareMinY : Om, a = this._allDistMargin(e, t, n, s), o = this._allDistMargin(e, t, n, i);
|
|
33881
33883
|
a < o && e.children.sort(s);
|
|
33882
33884
|
}
|
|
33883
33885
|
// total margin of all possible split distributions where each node is at least m full
|
|
@@ -33904,7 +33906,7 @@ class km {
|
|
|
33904
33906
|
e[t].children.length === 0 ? t > 0 ? (n = e[t - 1].children, n.splice(n.indexOf(e[t]), 1)) : this.clear() : Lt(e[t], this.toBBox);
|
|
33905
33907
|
}
|
|
33906
33908
|
}
|
|
33907
|
-
function
|
|
33909
|
+
function Bm(r, e, t) {
|
|
33908
33910
|
if (!t) return e.indexOf(r);
|
|
33909
33911
|
for (let n = 0; n < e.length; n++)
|
|
33910
33912
|
if (t(r, e[n])) return n;
|
|
@@ -33924,10 +33926,10 @@ function Jt(r, e, t, n, s) {
|
|
|
33924
33926
|
function en(r, e) {
|
|
33925
33927
|
return r.minX = Math.min(r.minX, e.minX), r.minY = Math.min(r.minY, e.minY), r.maxX = Math.max(r.maxX, e.maxX), r.maxY = Math.max(r.maxY, e.maxY), r;
|
|
33926
33928
|
}
|
|
33927
|
-
function
|
|
33929
|
+
function Am(r, e) {
|
|
33928
33930
|
return r.minX - e.minX;
|
|
33929
33931
|
}
|
|
33930
|
-
function
|
|
33932
|
+
function Om(r, e) {
|
|
33931
33933
|
return r.minY - e.minY;
|
|
33932
33934
|
}
|
|
33933
33935
|
function Gr(r) {
|
|
@@ -33936,10 +33938,10 @@ function Gr(r) {
|
|
|
33936
33938
|
function Fn(r) {
|
|
33937
33939
|
return r.maxX - r.minX + (r.maxY - r.minY);
|
|
33938
33940
|
}
|
|
33939
|
-
function
|
|
33941
|
+
function Pm(r, e) {
|
|
33940
33942
|
return (Math.max(e.maxX, r.maxX) - Math.min(e.minX, r.minX)) * (Math.max(e.maxY, r.maxY) - Math.min(e.minY, r.minY));
|
|
33941
33943
|
}
|
|
33942
|
-
function
|
|
33944
|
+
function Dm(r, e) {
|
|
33943
33945
|
const t = Math.max(r.minX, e.minX), n = Math.max(r.minY, e.minY), s = Math.min(r.maxX, e.maxX), i = Math.min(r.maxY, e.maxY);
|
|
33944
33946
|
return Math.max(0, s - t) * Math.max(0, i - n);
|
|
33945
33947
|
}
|
|
@@ -33968,13 +33970,13 @@ function Ma(r, e, t, n, s) {
|
|
|
33968
33970
|
Jo(r, a, e, t, s), i.push(e, a, a, t);
|
|
33969
33971
|
}
|
|
33970
33972
|
}
|
|
33971
|
-
class
|
|
33973
|
+
class Rm {
|
|
33972
33974
|
/**
|
|
33973
33975
|
* Construct one instance of this class
|
|
33974
33976
|
* @param layer - Layer information
|
|
33975
33977
|
*/
|
|
33976
33978
|
constructor(e) {
|
|
33977
|
-
this._group = new
|
|
33979
|
+
this._group = new Lg(), this._name = e.name, this._box = new C.Box3(), this._group.visible = !(e.isFrozen || e.isOff);
|
|
33978
33980
|
}
|
|
33979
33981
|
/**
|
|
33980
33982
|
* Layer name
|
|
@@ -34117,13 +34119,13 @@ class Dm {
|
|
|
34117
34119
|
});
|
|
34118
34120
|
}
|
|
34119
34121
|
}
|
|
34120
|
-
class
|
|
34122
|
+
class Um {
|
|
34121
34123
|
/**
|
|
34122
34124
|
* Creates a new layout instance.
|
|
34123
34125
|
* Initializes the layout with empty collections and a spatial index.
|
|
34124
34126
|
*/
|
|
34125
34127
|
constructor() {
|
|
34126
|
-
this._group = new C.Group(), this._indexTree = new
|
|
34128
|
+
this._group = new C.Group(), this._indexTree = new Lm(), this._box = new C.Box3(), this._layers = /* @__PURE__ */ new Map();
|
|
34127
34129
|
}
|
|
34128
34130
|
/**
|
|
34129
34131
|
* The internal THREE.js object to use by scene. This is internally used only. Try to avoid using it.
|
|
@@ -34220,8 +34222,12 @@ class Rm {
|
|
|
34220
34222
|
* @returns True if the object intersects with the ray, false otherwise
|
|
34221
34223
|
*/
|
|
34222
34224
|
isIntersectWith(e, t) {
|
|
34223
|
-
const n = this.
|
|
34224
|
-
|
|
34225
|
+
const n = this.getLayersByObjectId(e);
|
|
34226
|
+
for (let s = 0; s < n.length; ++s) {
|
|
34227
|
+
const i = n[s];
|
|
34228
|
+
if (i && i.isIntersectWith(e, t)) return !0;
|
|
34229
|
+
}
|
|
34230
|
+
return !1;
|
|
34225
34231
|
}
|
|
34226
34232
|
/**
|
|
34227
34233
|
* Add one AutoCAD entity into this layout. If layer group referenced by the entity doesn't exist, create one
|
|
@@ -34292,7 +34298,7 @@ class Rm {
|
|
|
34292
34298
|
addLayer(e) {
|
|
34293
34299
|
const t = e.name;
|
|
34294
34300
|
let n = this._layers.get(t);
|
|
34295
|
-
return n === void 0 && (n = new
|
|
34301
|
+
return n === void 0 && (n = new Rm(e), this._layers.set(t, n), this._group.add(n.internalObject)), n;
|
|
34296
34302
|
}
|
|
34297
34303
|
/**
|
|
34298
34304
|
* Updates layer information (such as visibility). If the layer doesn't exist, do nothing.
|
|
@@ -34311,8 +34317,7 @@ class Rm {
|
|
|
34311
34317
|
*/
|
|
34312
34318
|
hover(e) {
|
|
34313
34319
|
e.forEach((t) => {
|
|
34314
|
-
|
|
34315
|
-
n && n.hover([t]);
|
|
34320
|
+
this.getLayersByObjectId(t).forEach((s) => s.hover([t]));
|
|
34316
34321
|
});
|
|
34317
34322
|
}
|
|
34318
34323
|
/**
|
|
@@ -34323,8 +34328,7 @@ class Rm {
|
|
|
34323
34328
|
*/
|
|
34324
34329
|
unhover(e) {
|
|
34325
34330
|
e.forEach((t) => {
|
|
34326
|
-
|
|
34327
|
-
n && n.unhover([t]);
|
|
34331
|
+
this.getLayersByObjectId(t).forEach((s) => s.unhover([t]));
|
|
34328
34332
|
});
|
|
34329
34333
|
}
|
|
34330
34334
|
/**
|
|
@@ -34335,8 +34339,7 @@ class Rm {
|
|
|
34335
34339
|
*/
|
|
34336
34340
|
select(e) {
|
|
34337
34341
|
e.forEach((t) => {
|
|
34338
|
-
|
|
34339
|
-
n && n.select([t]);
|
|
34342
|
+
this.getLayersByObjectId(t).forEach((s) => s.unselect([t]));
|
|
34340
34343
|
});
|
|
34341
34344
|
}
|
|
34342
34345
|
/**
|
|
@@ -34347,8 +34350,7 @@ class Rm {
|
|
|
34347
34350
|
*/
|
|
34348
34351
|
unselect(e) {
|
|
34349
34352
|
e.forEach((t) => {
|
|
34350
|
-
|
|
34351
|
-
n && n.unselect([t]);
|
|
34353
|
+
this.getLayersByObjectId(t).forEach((s) => s.unselect([t]));
|
|
34352
34354
|
});
|
|
34353
34355
|
}
|
|
34354
34356
|
/**
|
|
@@ -34376,17 +34378,28 @@ class Rm {
|
|
|
34376
34378
|
});
|
|
34377
34379
|
}
|
|
34378
34380
|
/**
|
|
34379
|
-
*
|
|
34381
|
+
* Returns all layers that contain renderable entities associated with
|
|
34382
|
+
* the specified AutoCAD object ID.
|
|
34383
|
+
*
|
|
34384
|
+
* In AutoCAD, an INSERT entity may reference multiple child entities that
|
|
34385
|
+
* reside on different layers. During rendering, this engine groups entities
|
|
34386
|
+
* by layer and assigns each group the INSERT entity's object ID.
|
|
34380
34387
|
*
|
|
34381
|
-
*
|
|
34382
|
-
*
|
|
34388
|
+
* As a result, a single object ID (typically from an INSERT entity) may
|
|
34389
|
+
* correspond to multiple layers, and this method returns all such layers.
|
|
34390
|
+
*
|
|
34391
|
+
* @param objectId - The AutoCAD object ID to search for (e.g. an INSERT entity ID)
|
|
34392
|
+
* @returns An array of layers containing entities associated with the given object ID;
|
|
34393
|
+
* returns an empty array if no matching layers are found
|
|
34383
34394
|
*/
|
|
34384
|
-
|
|
34385
|
-
|
|
34386
|
-
|
|
34395
|
+
getLayersByObjectId(e) {
|
|
34396
|
+
const t = [];
|
|
34397
|
+
for (const [n, s] of this._layers)
|
|
34398
|
+
s.hasEntity(e) && t.push(s);
|
|
34399
|
+
return t;
|
|
34387
34400
|
}
|
|
34388
34401
|
}
|
|
34389
|
-
class
|
|
34402
|
+
class Fm {
|
|
34390
34403
|
/**
|
|
34391
34404
|
* Creates a new CAD scene instance.
|
|
34392
34405
|
*
|
|
@@ -34472,7 +34485,7 @@ class Um {
|
|
|
34472
34485
|
* @returns Return the newly created empty layout
|
|
34473
34486
|
*/
|
|
34474
34487
|
addEmptyLayout(e) {
|
|
34475
|
-
const t = new
|
|
34488
|
+
const t = new Um();
|
|
34476
34489
|
return this._layouts.set(e, t), this._scene.add(t.internalObject), t.visible = e == this._activeLayoutBtrId, this._layers.forEach((n) => {
|
|
34477
34490
|
t.addLayer(n);
|
|
34478
34491
|
}), t;
|
|
@@ -34594,7 +34607,7 @@ class Um {
|
|
|
34594
34607
|
const ka = {
|
|
34595
34608
|
background: 0
|
|
34596
34609
|
};
|
|
34597
|
-
class
|
|
34610
|
+
class Nm extends _l {
|
|
34598
34611
|
/**
|
|
34599
34612
|
* Creates a new 2D CAD viewer instance.
|
|
34600
34613
|
*
|
|
@@ -34612,7 +34625,7 @@ class Fm extends _l {
|
|
|
34612
34625
|
alpha: !0,
|
|
34613
34626
|
canvas: e.canvas
|
|
34614
34627
|
});
|
|
34615
|
-
t.canvas == null && (t.canvas = n.domElement), super(t.canvas), e.calculateSizeCallback && this.setCalculateSizeCallback(e.calculateSizeCallback), n.setPixelRatio(Math.min(window.devicePixelRatio, 2)), n.setSize(this.width, this.height), this._renderer = new
|
|
34628
|
+
t.canvas == null && (t.canvas = n.domElement), super(t.canvas), e.calculateSizeCallback && this.setCalculateSizeCallback(e.calculateSizeCallback), n.setPixelRatio(Math.min(window.devicePixelRatio, 2)), n.setSize(this.width, this.height), this._renderer = new qg(n);
|
|
34616
34629
|
const s = Ze.instance.fontMapping;
|
|
34617
34630
|
this._renderer.setFontMapping(s), this._renderer.events.fontNotFound.addEventListener((i) => {
|
|
34618
34631
|
ot.emit("font-not-found", {
|
|
@@ -34629,7 +34642,7 @@ class Fm extends _l {
|
|
|
34629
34642
|
(i) => {
|
|
34630
34643
|
this.activeLayoutBtrId = i.layout.blockTableRecordId;
|
|
34631
34644
|
}
|
|
34632
|
-
), this._missedImages = /* @__PURE__ */ new Map(), this._layoutViewManager = new
|
|
34645
|
+
), this._missedImages = /* @__PURE__ */ new Map(), this._layoutViewManager = new Mm(), this.initialize(), this.onWindowResize(), this.animate(), this._isDirty = !0, this._numOfEntitiesToProcess = 0;
|
|
34633
34646
|
}
|
|
34634
34647
|
/**
|
|
34635
34648
|
* Initializes the viewer after renderer and camera are created.
|
|
@@ -34964,7 +34977,7 @@ class Fm extends _l {
|
|
|
34964
34977
|
this._isDirty = this._scene.unhover([e]);
|
|
34965
34978
|
}
|
|
34966
34979
|
createScene() {
|
|
34967
|
-
const e = new
|
|
34980
|
+
const e = new Fm();
|
|
34968
34981
|
return e.layouts.forEach((t) => {
|
|
34969
34982
|
t.setSnapObject(this.renderer.createObject());
|
|
34970
34983
|
}), e;
|
|
@@ -34984,7 +34997,7 @@ class Fm extends _l {
|
|
|
34984
34997
|
*/
|
|
34985
34998
|
createLayoutViewIfNeeded(e) {
|
|
34986
34999
|
let t = this._layoutViewManager.getAt(e);
|
|
34987
|
-
return t == null && (t = new
|
|
35000
|
+
return t == null && (t = new Em(
|
|
34988
35001
|
this._renderer,
|
|
34989
35002
|
e,
|
|
34990
35003
|
this.width,
|
|
@@ -35054,7 +35067,7 @@ class Fm extends _l {
|
|
|
35054
35067
|
c.parent = null;
|
|
35055
35068
|
const s = e.styleManager, i = e.objectId, a = e.layerName, o = e.box;
|
|
35056
35069
|
n.forEach((c, l) => {
|
|
35057
|
-
const h = new
|
|
35070
|
+
const h = new be(s);
|
|
35058
35071
|
h.applyMatrix4(e.matrix), h.objectId = i, h.ownerId = e.ownerId, h.layerName = l === "0" ? a : l, h.box = o;
|
|
35059
35072
|
for (let d = 0; d < c.length; d++)
|
|
35060
35073
|
h.add(c[d]);
|
|
@@ -35067,14 +35080,14 @@ class Fm extends _l {
|
|
|
35067
35080
|
));
|
|
35068
35081
|
}
|
|
35069
35082
|
}
|
|
35070
|
-
class
|
|
35083
|
+
class zm {
|
|
35071
35084
|
/**
|
|
35072
35085
|
* Creates a new font loader instance.
|
|
35073
35086
|
*
|
|
35074
35087
|
* @param renderer - The Three.js renderer that will use the loaded fonts
|
|
35075
35088
|
*/
|
|
35076
35089
|
constructor() {
|
|
35077
|
-
this._loader = new
|
|
35090
|
+
this._loader = new Ag();
|
|
35078
35091
|
}
|
|
35079
35092
|
/**
|
|
35080
35093
|
* Base URL to load fonts
|
|
@@ -35447,7 +35460,7 @@ class La {
|
|
|
35447
35460
|
}
|
|
35448
35461
|
}
|
|
35449
35462
|
}
|
|
35450
|
-
class
|
|
35463
|
+
class Gm extends lc {
|
|
35451
35464
|
constructor(e = {}) {
|
|
35452
35465
|
super(e), e.useWorker = !0, e.parserWorkerUrl || (e.parserWorkerUrl = "/assets/libredwg-parser-worker.js");
|
|
35453
35466
|
}
|
|
@@ -35726,7 +35739,7 @@ class zm extends lc {
|
|
|
35726
35739
|
return n.flatMap((s) => t[s]);
|
|
35727
35740
|
}
|
|
35728
35741
|
}
|
|
35729
|
-
function
|
|
35742
|
+
function jm() {
|
|
35730
35743
|
try {
|
|
35731
35744
|
const r = new Vc({
|
|
35732
35745
|
convertByEntityType: !1,
|
|
@@ -35738,7 +35751,7 @@ function Gm() {
|
|
|
35738
35751
|
console.error("Failed to register dxf converter: ", r);
|
|
35739
35752
|
}
|
|
35740
35753
|
try {
|
|
35741
|
-
const r = new
|
|
35754
|
+
const r = new Gm({
|
|
35742
35755
|
convertByEntityType: !1,
|
|
35743
35756
|
useWorker: !0,
|
|
35744
35757
|
parserWorkerUrl: "./assets/libredwg-parser-worker.js"
|
|
@@ -35748,8 +35761,8 @@ function Gm() {
|
|
|
35748
35761
|
console.error("Failed to register dwg converter: ", r);
|
|
35749
35762
|
}
|
|
35750
35763
|
}
|
|
35751
|
-
function
|
|
35752
|
-
|
|
35764
|
+
function Vm() {
|
|
35765
|
+
jm(), typeof window < "u" && !!window.location && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") ? lt.getInstance().initialize(
|
|
35753
35766
|
"/assets/mtext-renderer-worker.js"
|
|
35754
35767
|
) : lt.getInstance().initialize("./mtext-renderer-worker.js");
|
|
35755
35768
|
}
|
|
@@ -35872,7 +35885,7 @@ const $e = class $e {
|
|
|
35872
35885
|
};
|
|
35873
35886
|
$e.styleId = "ml-ccl-loader-styles", $e.stylesInjected = !1;
|
|
35874
35887
|
let hs = $e;
|
|
35875
|
-
const
|
|
35888
|
+
const Hm = {
|
|
35876
35889
|
isDebug: !1,
|
|
35877
35890
|
isShowCommandLine: !0,
|
|
35878
35891
|
isShowCoordinate: !0,
|
|
@@ -35887,7 +35900,7 @@ class Ze {
|
|
|
35887
35900
|
constructor() {
|
|
35888
35901
|
this.events = {
|
|
35889
35902
|
/** Fired when any setting is modified */
|
|
35890
|
-
modified: new
|
|
35903
|
+
modified: new ye()
|
|
35891
35904
|
};
|
|
35892
35905
|
}
|
|
35893
35906
|
/**
|
|
@@ -36121,10 +36134,10 @@ class Ze {
|
|
|
36121
36134
|
*/
|
|
36122
36135
|
get settings() {
|
|
36123
36136
|
const e = localStorage.getItem(Ba), t = e == null ? {} : JSON.parse(e);
|
|
36124
|
-
return Zc(t,
|
|
36137
|
+
return Zc(t, Hm);
|
|
36125
36138
|
}
|
|
36126
36139
|
}
|
|
36127
|
-
const
|
|
36140
|
+
const Wm = "https://mlightcad.gitlab.io/cad-data/";
|
|
36128
36141
|
class ee {
|
|
36129
36142
|
/**
|
|
36130
36143
|
* Private constructor for singleton pattern.
|
|
@@ -36138,10 +36151,10 @@ class ee {
|
|
|
36138
36151
|
constructor(e = {}) {
|
|
36139
36152
|
this.events = {
|
|
36140
36153
|
/** Fired when a new document is created */
|
|
36141
|
-
documentCreated: new
|
|
36154
|
+
documentCreated: new ye(),
|
|
36142
36155
|
/** Fired when a document becomes active */
|
|
36143
|
-
documentActivated: new
|
|
36144
|
-
}, this._baseUrl = e.baseUrl ??
|
|
36156
|
+
documentActivated: new ye()
|
|
36157
|
+
}, this._baseUrl = e.baseUrl ?? Wm, e.useMainThreadDraw ? lt.getInstance().setRenderMode("main") : lt.getInstance().setRenderMode("worker");
|
|
36145
36158
|
const t = new Cl();
|
|
36146
36159
|
t.database.events.openProgress.addEventListener((i) => {
|
|
36147
36160
|
const a = {
|
|
@@ -36157,11 +36170,11 @@ class ee {
|
|
|
36157
36170
|
const n = () => ({
|
|
36158
36171
|
width: window.innerWidth,
|
|
36159
36172
|
height: window.innerHeight - 30
|
|
36160
|
-
}), s = new
|
|
36173
|
+
}), s = new Nm({
|
|
36161
36174
|
canvas: e.canvas,
|
|
36162
36175
|
calculateSizeCallback: n
|
|
36163
36176
|
});
|
|
36164
|
-
this._context = new Kc(s, t), this._fontLoader = new
|
|
36177
|
+
this._context = new Kc(s, t), this._fontLoader = new zm(), this._fontLoader.baseUrl = this._baseUrl + "fonts/", ds().workingDatabase = t.database, this.registerCommands(), this._progress = new hs(), this._progress.hide(), e.notLoadDefaultFonts || this.loadDefaultFonts(), Vm(), this.createCommandLine();
|
|
36165
36178
|
}
|
|
36166
36179
|
/**
|
|
36167
36180
|
* Creates the singleton instance with an optional canvas element.
|
|
@@ -36370,68 +36383,68 @@ class ee {
|
|
|
36370
36383
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36371
36384
|
"circle",
|
|
36372
36385
|
"circle",
|
|
36373
|
-
new
|
|
36386
|
+
new Zg()
|
|
36374
36387
|
), e.addCommand(
|
|
36375
36388
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36376
36389
|
"csvg",
|
|
36377
36390
|
"csvg",
|
|
36378
|
-
new
|
|
36391
|
+
new nm()
|
|
36379
36392
|
), e.addCommand(
|
|
36380
36393
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36381
36394
|
"dimlinear",
|
|
36382
36395
|
"dimlinear",
|
|
36383
|
-
new
|
|
36396
|
+
new sm()
|
|
36384
36397
|
), e.addCommand(
|
|
36385
36398
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36386
36399
|
"line",
|
|
36387
36400
|
"line",
|
|
36388
|
-
new
|
|
36401
|
+
new am()
|
|
36389
36402
|
), e.addCommand(
|
|
36390
36403
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36391
36404
|
"log",
|
|
36392
36405
|
"log",
|
|
36393
|
-
new
|
|
36406
|
+
new om()
|
|
36394
36407
|
), e.addCommand(
|
|
36395
36408
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36396
36409
|
"open",
|
|
36397
36410
|
"open",
|
|
36398
|
-
new
|
|
36411
|
+
new cm()
|
|
36399
36412
|
), e.addCommand(
|
|
36400
36413
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36401
36414
|
"pan",
|
|
36402
36415
|
"pan",
|
|
36403
|
-
new
|
|
36416
|
+
new gm()
|
|
36404
36417
|
), e.addCommand(
|
|
36405
36418
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36406
36419
|
"qnew",
|
|
36407
36420
|
"qnew",
|
|
36408
|
-
new
|
|
36421
|
+
new lm()
|
|
36409
36422
|
), e.addCommand(
|
|
36410
36423
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36411
36424
|
"regen",
|
|
36412
36425
|
"regen",
|
|
36413
|
-
new
|
|
36426
|
+
new hm()
|
|
36414
36427
|
), e.addCommand(
|
|
36415
36428
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36416
36429
|
"select",
|
|
36417
36430
|
"select",
|
|
36418
|
-
new
|
|
36431
|
+
new um()
|
|
36419
36432
|
), e.addCommand(
|
|
36420
36433
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36421
36434
|
"zoom",
|
|
36422
36435
|
"zoom",
|
|
36423
|
-
new
|
|
36436
|
+
new pm()
|
|
36424
36437
|
), e.addCommand(
|
|
36425
36438
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36426
36439
|
"zoomw",
|
|
36427
36440
|
"zoomw",
|
|
36428
|
-
new
|
|
36441
|
+
new fm()
|
|
36429
36442
|
), us.instance().getAllDescriptors().forEach((n) => {
|
|
36430
36443
|
e.addCommand(
|
|
36431
36444
|
Q.SYSTEMT_COMMAND_GROUP_NAME,
|
|
36432
36445
|
n.name,
|
|
36433
36446
|
n.name,
|
|
36434
|
-
new
|
|
36447
|
+
new dm()
|
|
36435
36448
|
);
|
|
36436
36449
|
});
|
|
36437
36450
|
}
|
|
@@ -36530,27 +36543,27 @@ class ee {
|
|
|
36530
36543
|
}
|
|
36531
36544
|
}
|
|
36532
36545
|
export {
|
|
36533
|
-
|
|
36534
|
-
|
|
36546
|
+
Zg as AcApCircleCmd,
|
|
36547
|
+
Yg as AcApCircleJig,
|
|
36535
36548
|
Kc as AcApContext,
|
|
36536
|
-
|
|
36537
|
-
|
|
36538
|
-
|
|
36549
|
+
nm as AcApConvertToSvgCmd,
|
|
36550
|
+
rm as AcApDimJig,
|
|
36551
|
+
sm as AcApDimLinearCmd,
|
|
36539
36552
|
ee as AcApDocManager,
|
|
36540
36553
|
Cl as AcApDocument,
|
|
36541
36554
|
ce as AcApI18n,
|
|
36542
|
-
|
|
36543
|
-
|
|
36544
|
-
|
|
36545
|
-
|
|
36546
|
-
|
|
36547
|
-
|
|
36548
|
-
|
|
36549
|
-
|
|
36555
|
+
am as AcApLineCmd,
|
|
36556
|
+
im as AcApLineJig,
|
|
36557
|
+
om as AcApLogCmd,
|
|
36558
|
+
cm as AcApOpenCmd,
|
|
36559
|
+
gm as AcApPanCmd,
|
|
36560
|
+
lm as AcApQNewCmd,
|
|
36561
|
+
hm as AcApRegenCmd,
|
|
36562
|
+
um as AcApSelectCmd,
|
|
36550
36563
|
Ze as AcApSettingManager,
|
|
36551
|
-
|
|
36552
|
-
|
|
36553
|
-
|
|
36564
|
+
dm as AcApSysVarCmd,
|
|
36565
|
+
pm as AcApZoomCmd,
|
|
36566
|
+
fm as AcApZoomToBoxCmd,
|
|
36554
36567
|
_l as AcEdBaseView,
|
|
36555
36568
|
ve as AcEdCommand,
|
|
36556
36569
|
cl as AcEdCommandLine,
|
|
@@ -36564,10 +36577,10 @@ export {
|
|
|
36564
36577
|
bs as AcEdMarker,
|
|
36565
36578
|
bl as AcEdMarkerManager,
|
|
36566
36579
|
vs as AcEdPreviewJig,
|
|
36567
|
-
|
|
36580
|
+
t0 as AcEdPromptAngleOptions,
|
|
36568
36581
|
ml as AcEdPromptDistanceOptions,
|
|
36569
|
-
|
|
36570
|
-
|
|
36582
|
+
n0 as AcEdPromptDoubleOptions,
|
|
36583
|
+
r0 as AcEdPromptIntegerOptions,
|
|
36571
36584
|
ys as AcEdPromptNumericalOptions,
|
|
36572
36585
|
nr as AcEdPromptOptions,
|
|
36573
36586
|
st as AcEdPromptPointOptions,
|
|
@@ -36575,11 +36588,11 @@ export {
|
|
|
36575
36588
|
Sl as AcEdSelectionSet,
|
|
36576
36589
|
it as AcEdViewMode,
|
|
36577
36590
|
wl as AcEditor,
|
|
36578
|
-
|
|
36591
|
+
Nm as AcTrView2d,
|
|
36579
36592
|
ka as DEFAULT_VIEW_2D_OPTIONS,
|
|
36580
|
-
|
|
36593
|
+
Qm as acedAlert,
|
|
36581
36594
|
Ga as cmdDescription,
|
|
36582
36595
|
ot as eventBus,
|
|
36583
|
-
|
|
36584
|
-
|
|
36596
|
+
Jm as sysCmdDescription,
|
|
36597
|
+
e0 as userCmdDescription
|
|
36585
36598
|
};
|