mxcad 1.0.0 → 1.0.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/LICENSE.md +9 -0
- package/README.md +60 -0
- package/dist/mxcad.d.ts +55 -0
- package/dist/mxcad.es.js +1443 -0
- package/dist/mxcad.umd.js +49 -0
- package/package.json +57 -29
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -5
- package/lib/utles/index.d.ts +0 -5
- package/lib/utles/index.js +0 -63
package/dist/mxcad.es.js
ADDED
|
@@ -0,0 +1,1443 @@
|
|
|
1
|
+
import { MxFun as I, MrxDbgUiPrPoint as oe, store as Ve, MxPaintBrush as J, MrxDbgUiPrBaseReturn as T, MxDbCircleShape as mt, MxDbLine as Re, MxDbPolyline as Kt, MxDbRegularPolygon as jt, MxDbCircleArc as De, Mx3PointArc as Ot, MxDbEllipseShape as kt } from "mxdraw";
|
|
2
|
+
async function qt(r, o) {
|
|
3
|
+
const f = await (await fetch(r)).arrayBuffer();
|
|
4
|
+
return await WebAssembly.instantiate(f, o);
|
|
5
|
+
}
|
|
6
|
+
const Vt = (r) => new Promise((o, n) => {
|
|
7
|
+
const f = new FileReader();
|
|
8
|
+
f.onload = () => {
|
|
9
|
+
o(f.result);
|
|
10
|
+
}, f.onerror = ({ target: { error: { code: a } } }) => {
|
|
11
|
+
n(Error(`File could not be read! Code=${a}`));
|
|
12
|
+
}, f.readAsArrayBuffer(r);
|
|
13
|
+
}), en = async (r) => {
|
|
14
|
+
let o = r;
|
|
15
|
+
return typeof r > "u" ? new Uint8Array() : (typeof r == "string" ? /data:_data\/([a-zA-Z]*);base64,([^"]*)/.test(r) ? o = atob(r.split(",")[1]).split("").map((n) => n.charCodeAt(0)) : o = await (await fetch(new URL(r, import.meta.url).href)).arrayBuffer() : (r instanceof File || r instanceof Blob) && (o = await Vt(r)), new Uint8Array(o));
|
|
16
|
+
}, tn = async (r, o) => {
|
|
17
|
+
console.log("info", `fetch ${r}`);
|
|
18
|
+
const n = await (await fetch(r)).arrayBuffer();
|
|
19
|
+
console.log("info", `${r} file size = ${n.byteLength} bytes`);
|
|
20
|
+
const f = new Blob([n], { type: o }), a = URL.createObjectURL(f);
|
|
21
|
+
return console.log("info", `${r} blob URL = ${a}`), a;
|
|
22
|
+
};
|
|
23
|
+
function Ht(r) {
|
|
24
|
+
return btoa(unescape(encodeURIComponent(r)));
|
|
25
|
+
}
|
|
26
|
+
function zt(r) {
|
|
27
|
+
return decodeURIComponent(escape(atob(r)));
|
|
28
|
+
}
|
|
29
|
+
function Nt(r) {
|
|
30
|
+
let o = JSON.stringify(r);
|
|
31
|
+
I.callCommand("MxCAD_SetEntityData", o);
|
|
32
|
+
}
|
|
33
|
+
const _t = {
|
|
34
|
+
b64Encode: Ht,
|
|
35
|
+
b64Decode: zt,
|
|
36
|
+
setMcDbEntity: Nt
|
|
37
|
+
};
|
|
38
|
+
async function nn() {
|
|
39
|
+
const r = new oe();
|
|
40
|
+
r.setMessage(`
|
|
41
|
+
\u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
|
|
42
|
+
let o = await r.go();
|
|
43
|
+
if (o == null)
|
|
44
|
+
return;
|
|
45
|
+
let n = "\u6D4B\u8BD5";
|
|
46
|
+
if (n.length <= 0)
|
|
47
|
+
return;
|
|
48
|
+
let f = I.screenCoordLong2Doc(50);
|
|
49
|
+
n = _t.b64Encode(n);
|
|
50
|
+
const a = {
|
|
51
|
+
postx: o.x,
|
|
52
|
+
posty: o.y,
|
|
53
|
+
text: n,
|
|
54
|
+
height: f
|
|
55
|
+
};
|
|
56
|
+
I.call("Mx_Text", a);
|
|
57
|
+
}
|
|
58
|
+
class Gt extends mt {
|
|
59
|
+
getGripPoints() {
|
|
60
|
+
const { x: o, y: n, z: f } = this.center;
|
|
61
|
+
let a = new THREE.Vector3(o, n + this.radius, f), g = new THREE.Vector3(o, n - this.radius, f), d = new THREE.Vector3(o - this.radius, n, f), h = new THREE.Vector3(o + this.radius, n, f);
|
|
62
|
+
return [this.center, a, g, d, h];
|
|
63
|
+
}
|
|
64
|
+
moveGripPointsAt(o, n) {
|
|
65
|
+
const [f, a, g, d, h] = this.getGripPoints();
|
|
66
|
+
return o === 0 && (this.center = f.add(n)), o === 1 && (this.radius = a.add(n).distanceTo(this.center)), o === 2 && (this.radius = g.add(n).distanceTo(this.center)), o === 3 && (this.radius = d.add(n).distanceTo(this.center)), o === 4 && (this.radius = h.add(n).distanceTo(this.center)), !0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const At = (r) => {
|
|
70
|
+
const [o, n, f] = r, { x: a, y: g, z: d } = o, { x: h, y: w, z: E } = n, { x, y: D, z: b } = f, m = g * E - w * d - g * b + D * d + w * b - D * E, M = -(a * E - h * d - a * b + x * d + h * b - x * E), W = a * w - h * g - a * D + x * g + h * D - x * w, P = -(a * w * b - a * D * E - h * g * b + h * D * d + x * g * E - x * w * d), v = 2 * (h - a), K = 2 * (w - g), O = 2 * (E - d), q = a * a + g * g + d * d - h * h - w * w - E * E, H = 2 * (x - a), z = 2 * (D - g), N = 2 * (b - d), Y = a * a + g * g + d * d - x * x - D * D - b * b, de = -(M * O * Y - M * N * q - K * W * Y + K * N * P + z * W * q - z * O * P) / (m * K * N - m * z * O - v * M * N + v * z * W + H * M * O - H * K * W), pe = (m * O * Y - m * N * q - v * W * Y + v * N * P + H * W * q - H * O * P) / (m * K * N - m * z * O - v * M * N + v * z * W + H * M * O - H * K * W), j = -(m * K * Y - m * z * q - v * M * Y + v * z * P + H * M * q - H * K * P) / (m * K * N - m * z * O - v * M * N + v * z * W + H * M * O - H * K * W);
|
|
71
|
+
return new THREE.Vector3(de, pe, j);
|
|
72
|
+
};
|
|
73
|
+
function $t() {
|
|
74
|
+
const r = new oe();
|
|
75
|
+
let o = new Gt();
|
|
76
|
+
J.use(o), o.closed = !1;
|
|
77
|
+
let n = 0, f = "default", a = !0;
|
|
78
|
+
const g = () => {
|
|
79
|
+
r.setUserDraw(
|
|
80
|
+
(m, M) => {
|
|
81
|
+
o.radius = a ? o.center.distanceTo(m) : o.center.distanceTo(m) / 2, M.drawCustomEntity(o), M.drawLine(o.center, m);
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}, d = (m) => {
|
|
85
|
+
if (f === "default") {
|
|
86
|
+
if (m === T.kOk) {
|
|
87
|
+
if (n === 0)
|
|
88
|
+
r.setMessage(`
|
|
89
|
+
\u6307\u5B9A\u5706\u7684\u534A\u5F84:`), r.setKeyWords("[\u76F4\u5F84(D)]"), o.center = r.value(), g();
|
|
90
|
+
else if (n === 1)
|
|
91
|
+
return I.getCurrentDraw().addMxEntity(o), !0;
|
|
92
|
+
n++;
|
|
93
|
+
}
|
|
94
|
+
m === T.kKeyWord && r.isKeyWordPicked("D") && (a = !1, g(), r.setMessage(`
|
|
95
|
+
\u6307\u5B9A\u5706\u7684\u76F4\u5F84:`), r.setKeyWords(""));
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
let h = [];
|
|
99
|
+
const w = (m) => {
|
|
100
|
+
if (f === "3P" && (r.setMessage(`
|
|
101
|
+
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), m === T.kOk)) {
|
|
102
|
+
if (n === 0 && (h.push(r.value()), r.setUserDraw((M, W) => {
|
|
103
|
+
W.drawLine(h[0], M);
|
|
104
|
+
}), r.setMessage(`
|
|
105
|
+
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), n === 1 && (h.push(r.value()), r.setUserDraw((M, W) => {
|
|
106
|
+
const [P, v] = h, K = M;
|
|
107
|
+
o.center = At([
|
|
108
|
+
P,
|
|
109
|
+
v,
|
|
110
|
+
K
|
|
111
|
+
]), o.radius = o.center.distanceTo(P), W.drawCustomEntity(o);
|
|
112
|
+
}), r.setMessage(`
|
|
113
|
+
\u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E09\u4E2A\u70B9:`)), n === 2)
|
|
114
|
+
return h.push(r.value()), o.center = At(h), o.radius = o.center.distanceTo(h[0]), I.getCurrentDraw().addMxEntity(o), !0;
|
|
115
|
+
n++;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
let E;
|
|
119
|
+
const x = (m, M) => {
|
|
120
|
+
new THREE.Line3(m, M).getCenter(o.center), o.radius = M.distanceTo(m) / 2;
|
|
121
|
+
}, D = (m) => {
|
|
122
|
+
if (f === "2P" && (r.setMessage(`
|
|
123
|
+
\u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), m === T.kOk)) {
|
|
124
|
+
if (n === 0 && (E = r.value(), r.setUserDraw((M, W) => {
|
|
125
|
+
x(E, M), W.drawCustomEntity(o), W.drawLine(E, M);
|
|
126
|
+
}), r.setMessage(`
|
|
127
|
+
\u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`)), n === 1)
|
|
128
|
+
return x(E, r.value()), I.getCurrentDraw().addMxEntity(o), !0;
|
|
129
|
+
n++;
|
|
130
|
+
}
|
|
131
|
+
}, b = (m) => {
|
|
132
|
+
if (f === "T") {
|
|
133
|
+
if (r.setMessage(`
|
|
134
|
+
\u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), m === T.kOk) {
|
|
135
|
+
if (n === 0) {
|
|
136
|
+
const M = r.value();
|
|
137
|
+
console.log(M), I.getCurrentDraw();
|
|
138
|
+
}
|
|
139
|
+
n++;
|
|
140
|
+
}
|
|
141
|
+
return !0;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
r.setMessage(
|
|
145
|
+
`
|
|
146
|
+
\u6307\u5B9A\u5706\u7684\u5706\u5FC3\u6216[\u4E09\u70B9(3P)/\u4E24\u70B9(2P)/\u5207\u70B9\u3001\u5207\u70B9\u3001\u534A\u5F84(T)]:`
|
|
147
|
+
), r.setKeyWords("3P 2P T"), r.goWhile(
|
|
148
|
+
(m) => {
|
|
149
|
+
if (m === T.kKeyWord && (r.isKeyWordPicked("3P") ? f = "3P" : r.isKeyWordPicked("2P") ? f = "2P" : r.isKeyWordPicked("T") && (f = "T")), d(m))
|
|
150
|
+
return { exit: !0 };
|
|
151
|
+
if (w(m))
|
|
152
|
+
return { exit: !0 };
|
|
153
|
+
if (D(m))
|
|
154
|
+
return { exit: !0 };
|
|
155
|
+
if (b(m))
|
|
156
|
+
return { exit: !0 };
|
|
157
|
+
},
|
|
158
|
+
(m) => {
|
|
159
|
+
m === T.kCancel && I.getCurrentDraw().addMxEntity(o);
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
Ve.events.on("MxDbEntityRegister", () => {
|
|
164
|
+
I.addCommand("Mx_Circle", $t);
|
|
165
|
+
});
|
|
166
|
+
const wt = () => Ve.state.MxFun.stopRunCommand();
|
|
167
|
+
function je(r, o, n, f) {
|
|
168
|
+
const a = r - n, g = o - f;
|
|
169
|
+
let d = 0;
|
|
170
|
+
return a == 0 ? d = Math.PI / 2 : d = Math.atan(Math.abs(g / a)), a < 0 && g >= 0 ? d = Math.PI - d : a < 0 && g < 0 ? d = Math.PI + d : a >= 0 && g < 0 && (d = Math.PI * 2 - d), d;
|
|
171
|
+
}
|
|
172
|
+
async function Xt() {
|
|
173
|
+
const r = new oe();
|
|
174
|
+
let o = new Re(), n = [];
|
|
175
|
+
r.setMessage(`
|
|
176
|
+
\u6307\u5B9A\u7B2C\u4E00\u70B9:`);
|
|
177
|
+
let f = await r.go();
|
|
178
|
+
r.setUserDraw((g, d) => {
|
|
179
|
+
n.forEach((h) => {
|
|
180
|
+
d.drawCustomEntity(h);
|
|
181
|
+
}), d.drawLine(f, g);
|
|
182
|
+
});
|
|
183
|
+
const a = () => {
|
|
184
|
+
r.setMessage(`
|
|
185
|
+
\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9:`), n.length > 1 ? r.setKeyWords("[\u9000\u51FA(E)/\u95ED\u5408(C)/\u653E\u5F03(U)]") : r.setKeyWords("[\u9000\u51FA(E)/\u653E\u5F03(U)]");
|
|
186
|
+
};
|
|
187
|
+
a(), r.goWhile(
|
|
188
|
+
(g) => {
|
|
189
|
+
if (g === T.kOk && (o = new Re(), J.use(o), o.pt1 = f, o.pt2 = r.value(), f = o.pt2.clone(), n.push(o), a()), g === T.kKeyWord) {
|
|
190
|
+
if (r.isKeyWordPicked("E"))
|
|
191
|
+
wt();
|
|
192
|
+
else if (r.isKeyWordPicked("C")) {
|
|
193
|
+
const d = new Re();
|
|
194
|
+
return d.pt1 = f.clone(), d.pt2 = n[0].pt1.clone(), J.use(d), n.push(d), f = d.pt2.clone(), wt(), { exit: !0 };
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
(g) => {
|
|
199
|
+
if (g === T.kCancel)
|
|
200
|
+
return n.forEach((d) => {
|
|
201
|
+
I.getCurrentDraw().addMxEntity(d);
|
|
202
|
+
}), { exit: !0 };
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
Ve.events.on("MxDbEntityRegister", () => {
|
|
207
|
+
I.addCommand("Mx_Line", Xt);
|
|
208
|
+
});
|
|
209
|
+
async function rn() {
|
|
210
|
+
const r = new oe();
|
|
211
|
+
r.setMessage(`
|
|
212
|
+
\u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
|
|
213
|
+
let o = await r.go();
|
|
214
|
+
if (o == null)
|
|
215
|
+
return;
|
|
216
|
+
let n = `\u6D4B\u8BD5
|
|
217
|
+
\u6D4B\u8BD5`;
|
|
218
|
+
if (n.length <= 0)
|
|
219
|
+
return;
|
|
220
|
+
let f = I.screenCoordLong2Doc(50);
|
|
221
|
+
n = _t.b64Encode(n);
|
|
222
|
+
const a = {
|
|
223
|
+
postx: o.x,
|
|
224
|
+
posty: o.y,
|
|
225
|
+
text: n,
|
|
226
|
+
height: f
|
|
227
|
+
};
|
|
228
|
+
I.call("Mx_MText", a);
|
|
229
|
+
}
|
|
230
|
+
async function sn() {
|
|
231
|
+
const r = new oe(), o = new Kt();
|
|
232
|
+
J.use(o), r.setMessage(`
|
|
233
|
+
\u6307\u5B9A\u8D77\u70B9:`);
|
|
234
|
+
let n;
|
|
235
|
+
r.setUserDraw((f, a) => {
|
|
236
|
+
a.drawCustomEntity(o), n && a.drawLine(n, f);
|
|
237
|
+
}), r.goWhile(
|
|
238
|
+
(f) => {
|
|
239
|
+
if (f === T.kOk) {
|
|
240
|
+
const a = r.value();
|
|
241
|
+
o.points.push(r.value()), n = a, r.setMessage(`
|
|
242
|
+
\u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9:`), r.setKeyWords("[\u5706\u5F27(A)/\u5BBD\u5EA6(W)]");
|
|
243
|
+
} else
|
|
244
|
+
f === T.kKeyWord && (r.isKeyWordPicked("A"), r.isKeyWordPicked("W"));
|
|
245
|
+
},
|
|
246
|
+
(f) => {
|
|
247
|
+
f === T.kCancel && I.getCurrentDraw().addMxEntity(o);
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
async function on() {
|
|
252
|
+
const r = new oe();
|
|
253
|
+
let o = new jt();
|
|
254
|
+
J.use(o), r.setMessage(`
|
|
255
|
+
\u8F93\u5165\u8FB9\u7684\u6570\u76EE<5>:`);
|
|
256
|
+
let n = 3, f = [n];
|
|
257
|
+
for (; n < 25; )
|
|
258
|
+
f.push(n++);
|
|
259
|
+
r.setKeyWords(f.join(" "));
|
|
260
|
+
let a = 0;
|
|
261
|
+
r.goWhile((g) => {
|
|
262
|
+
if (g === T.kOk)
|
|
263
|
+
if (a === 1)
|
|
264
|
+
o.centerPoint = r.value(), r.setMessage(`
|
|
265
|
+
[\u5185\u63A5\u4E8E\u5706(I)/\u5916\u5207\u4E8E\u5706(C)]<\u5916\u5207>:`), r.setKeyWords("I C");
|
|
266
|
+
else if (a === 2)
|
|
267
|
+
r.setMessage(`
|
|
268
|
+
\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`), a++;
|
|
269
|
+
else {
|
|
270
|
+
if (a === 3)
|
|
271
|
+
return r.setMessage(`
|
|
272
|
+
\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`), { exit: !0 };
|
|
273
|
+
if (a === 4)
|
|
274
|
+
return o.otherPoint = r.value(), I.getCurrentDraw().addMxEntity(o), { exit: !0 };
|
|
275
|
+
a === 5 && r.setMessage(`
|
|
276
|
+
\u5916\u5207\u4E8E\u5706(C)\u65E0\u6CD5\u7ED8\u5236:`);
|
|
277
|
+
}
|
|
278
|
+
if (g === T.kKeyWord) {
|
|
279
|
+
const d = r.keyWordPicked(), h = Number(d);
|
|
280
|
+
!Number.isNaN(h) && a === 0 && (o.sidesNumber = h, r.setMessage(`
|
|
281
|
+
\u6307\u5B9A\u6B63\u591A\u8FB9\u5F62\u7684\u4E2D\u5FC3\u70B9\u6216 [\u8FB9(E)]:`), r.setKeyWords("E"), a++), a === 1 && (r.isKeyWordPicked("E") && (r.setMessage(`
|
|
282
|
+
\u6307\u5B9A\u8FB9\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), a++), r.isKeyWordPicked("I") ? (r.setUserDraw((w, E) => {
|
|
283
|
+
o.otherPoint = w, E.drawCustomEntity(o);
|
|
284
|
+
}), r.setMessage(`
|
|
285
|
+
\u6307\u5B9A\u5706\u7684\u534A\u5F84:`), a++, a++, a++) : r.isKeyWordPicked("C") && (r.setMessage(`
|
|
286
|
+
\u5916\u5207\u4E8E\u5706(C)\u65E0\u6CD5\u7ED8\u5236:`), a++, a++, a++, a++));
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
function Yt(r, o, n) {
|
|
291
|
+
const f = r.x, a = o.x, g = n.x, d = r.y, h = o.y, w = n.y, E = f - a, x = d - h, D = f - g, b = d - w, m = (f * f - a * a + (d * d - h * h)) / 2, M = (f * f - g * g + (d * d - w * w)) / 2, W = x * D - E * b, P = -(b * m - x * M) / W, v = -(E * M - D * m) / W;
|
|
292
|
+
return new THREE.Vector3(P, v, 0);
|
|
293
|
+
}
|
|
294
|
+
function Zt(r, o) {
|
|
295
|
+
const n = r.x, f = r.y, a = o.x, g = o.y;
|
|
296
|
+
return Math.sqrt((n - a) * (n - a) + (f - g) * (f - g));
|
|
297
|
+
}
|
|
298
|
+
function Qt(r, o, n) {
|
|
299
|
+
let f;
|
|
300
|
+
r < n ? f = n - r : f = n - r + 360;
|
|
301
|
+
let a;
|
|
302
|
+
return r < o ? a = o - r : a = o - r + 360, a > f;
|
|
303
|
+
}
|
|
304
|
+
function Oe(r, o, n) {
|
|
305
|
+
const f = r.x, a = o.x, g = r.y, d = o.y;
|
|
306
|
+
let h, w, E;
|
|
307
|
+
return h = (g - d) / n, w = (f - a) / n, w >= 0.99999 && (w = 0.99999), w <= -0.99999 && (w = -0.99999), E = Math.acos(w), E = E / Math.PI * 180, h < -0.05 && (E = 360 - E), {
|
|
308
|
+
sin: h,
|
|
309
|
+
cos: w,
|
|
310
|
+
angle: E
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
const U = (r, o, n) => {
|
|
314
|
+
const f = () => {
|
|
315
|
+
r.go((a) => {
|
|
316
|
+
if (a === T.kKeyWord && n() && f(), a === T.kOk && o() && f(), a === T.kNone && f(), a === T.kCancel)
|
|
317
|
+
return { exit: !0 };
|
|
318
|
+
});
|
|
319
|
+
};
|
|
320
|
+
return f;
|
|
321
|
+
};
|
|
322
|
+
class He extends mt {
|
|
323
|
+
constructor() {
|
|
324
|
+
super(), this._propertyDbKeys = [...this._propertyDbKeys, "bulge"];
|
|
325
|
+
}
|
|
326
|
+
getTypeName() {
|
|
327
|
+
return "MxDbCircle";
|
|
328
|
+
}
|
|
329
|
+
create() {
|
|
330
|
+
return new He();
|
|
331
|
+
}
|
|
332
|
+
getArcBulge(o, n, f) {
|
|
333
|
+
const a = o.distanceTo(n);
|
|
334
|
+
let h = 2 * new THREE.Line3(o, n).getCenter(
|
|
335
|
+
new THREE.Vector3()
|
|
336
|
+
).distanceTo(f) / a;
|
|
337
|
+
return h > 0.9999 && h < 1.0001 ? h = 1 : h < -0.9999 && h > -1.0001 ? h = -1 : Math.abs(h) < 1e-10 && (h = 0), h;
|
|
338
|
+
}
|
|
339
|
+
getArcMidPoint(o, n, f, a, g) {
|
|
340
|
+
const d = o, h = f * Math.PI / 180;
|
|
341
|
+
let w = a * Math.PI / 180;
|
|
342
|
+
const E = new THREE.Vector3(), x = new THREE.Vector3();
|
|
343
|
+
E.x = d.x + n * Math.cos(h), E.y = d.y + n * Math.sin(h), x.x = d.x + n * Math.cos(w), x.y = d.y + n * Math.sin(w);
|
|
344
|
+
const D = n;
|
|
345
|
+
(g ? f < a : f > a) && (w += Math.PI * 2);
|
|
346
|
+
const b = new THREE.Vector3();
|
|
347
|
+
return b.x = d.x + D * Math.cos((h + w) / 2), b.y = d.y + D * Math.sin((h + w) / 2), [E, b, x, this.center];
|
|
348
|
+
}
|
|
349
|
+
getGripPoints() {
|
|
350
|
+
return this.getArcMidPoint(
|
|
351
|
+
this.center,
|
|
352
|
+
this.radius,
|
|
353
|
+
THREE.MathUtils.radToDeg(this.startAngle),
|
|
354
|
+
THREE.MathUtils.radToDeg(this.endAngle),
|
|
355
|
+
this.clockwise
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
moveGripPointsAt(o, n) {
|
|
359
|
+
if (o === 3)
|
|
360
|
+
return this.center.add(n), !0;
|
|
361
|
+
const f = this.getGripPoints();
|
|
362
|
+
return this.upDatePoints(f, o, n), !0;
|
|
363
|
+
}
|
|
364
|
+
upDatePoints(o, n, f) {
|
|
365
|
+
o[n].add(f);
|
|
366
|
+
const [a, g, d] = o;
|
|
367
|
+
this.center = Yt(a, d, g), this.radius = Zt(g, this.center);
|
|
368
|
+
const h = Oe(a, this.center, this.radius), w = Oe(d, this.center, this.radius), E = Oe(g, this.center, this.radius);
|
|
369
|
+
this.clockwise = Qt(
|
|
370
|
+
w.angle,
|
|
371
|
+
h.angle,
|
|
372
|
+
E.angle
|
|
373
|
+
), this.startAngle = THREE.MathUtils.degToRad(h.angle), this.endAngle = THREE.MathUtils.degToRad(w.angle);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
async function un() {
|
|
377
|
+
const r = new oe();
|
|
378
|
+
r.setMessage(`
|
|
379
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), r.setKeyWords("[\u5706\u5FC3(C)]");
|
|
380
|
+
let o = new He();
|
|
381
|
+
o.closed = !1, J.use(o);
|
|
382
|
+
let n, f, a;
|
|
383
|
+
const g = U(
|
|
384
|
+
r,
|
|
385
|
+
() => {
|
|
386
|
+
n = r.value(), r.setMessage(`
|
|
387
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u7B2C\u4E8C\u4E2A\u70B9:`), r.setKeyWords("[\u5706\u5FC3(C)/\u7AEF\u70B9(E)]"), r.setUserDraw((P, v) => {
|
|
388
|
+
v.drawLine(n, P);
|
|
389
|
+
}), M();
|
|
390
|
+
},
|
|
391
|
+
() => {
|
|
392
|
+
if (r.isKeyWordPicked("C")) {
|
|
393
|
+
const P = new De();
|
|
394
|
+
o.center = r.value(), P.center = r.value(), r.setMessage(`
|
|
395
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3:`), r.setKeyWords(""), h();
|
|
396
|
+
} else
|
|
397
|
+
return !0;
|
|
398
|
+
}
|
|
399
|
+
);
|
|
400
|
+
let d;
|
|
401
|
+
const h = U(
|
|
402
|
+
r,
|
|
403
|
+
() => {
|
|
404
|
+
d = r.value(), a = new De(), a.closed = !1, J.use(a), a.center = d, o.center = d, r.setMessage(`
|
|
405
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), r.setUserDraw((P, v) => {
|
|
406
|
+
v.drawCustomEntity(a), v.drawLine(d, P);
|
|
407
|
+
}), x();
|
|
408
|
+
},
|
|
409
|
+
() => {
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
let w, E;
|
|
413
|
+
const x = U(
|
|
414
|
+
r,
|
|
415
|
+
() => {
|
|
416
|
+
w = r.value(), a.endPoint = w, r.setMessage(
|
|
417
|
+
`
|
|
418
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u89D2\u5EA6(A)/\u5F26\u957F(L)/\u4FEE\u6539\u534A\u5F84(R)]:`
|
|
419
|
+
), r.setKeyWords("A L R"), E = new Re(), E.setDashLineDisplay(!0), E.setDashArray(0.05), E.setLineWidth(2), E.setColor("#ffd30d"), E.pt1 = a.center, r.setUserDraw((P, v) => {
|
|
420
|
+
a.startPoint = P, E.pt2 = P, v.drawCustomEntity(a), v.drawCustomEntity(E);
|
|
421
|
+
}), b();
|
|
422
|
+
},
|
|
423
|
+
() => {
|
|
424
|
+
}
|
|
425
|
+
);
|
|
426
|
+
let D;
|
|
427
|
+
const b = U(
|
|
428
|
+
r,
|
|
429
|
+
() => {
|
|
430
|
+
D = r.value(), a.startPoint = D, a.endPoint = w, I.getCurrentDraw().addMxEntity(a);
|
|
431
|
+
},
|
|
432
|
+
() => {
|
|
433
|
+
if (r.isKeyWordPicked("A"))
|
|
434
|
+
return r.setMessage(
|
|
435
|
+
`
|
|
436
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
|
|
437
|
+
), r.setKeyWords("R"), r.setUserDraw((P, v) => {
|
|
438
|
+
a.startPoint = P, v.drawCustomEntity(a), v.drawCustomEntity(E);
|
|
439
|
+
}), !0;
|
|
440
|
+
if (r.isKeyWordPicked("L"))
|
|
441
|
+
return r.setMessage(
|
|
442
|
+
`
|
|
443
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
|
|
444
|
+
), r.setKeyWords("R"), r.setUserDraw((P, v) => {
|
|
445
|
+
a.startPoint = P, v.drawCustomEntity(a), v.drawCustomEntity(E);
|
|
446
|
+
}), !0;
|
|
447
|
+
if (r.isKeyWordPicked("R"))
|
|
448
|
+
r.setMessage(
|
|
449
|
+
`
|
|
450
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u534A\u5F84${a.radius ? "<" + a.radius + ">" : ""}:`
|
|
451
|
+
), r.setKeyWords(""), r.setUserDraw((P, v) => {
|
|
452
|
+
v.drawLine(P, a.center), a.startPoint = P, v.drawCustomEntity(a);
|
|
453
|
+
}), x();
|
|
454
|
+
else
|
|
455
|
+
return !0;
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
let m;
|
|
459
|
+
const M = U(
|
|
460
|
+
r,
|
|
461
|
+
() => {
|
|
462
|
+
m = r.value(), r.setMessage(`
|
|
463
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), f = new Ot(), f.autoClockwise = !0, f.closed = !1, J.use(f), f.point1 = n, f.point3 = m, o.center, r.setUserDraw((P, v) => {
|
|
464
|
+
f.point2 = P, v.drawCustomEntity(o);
|
|
465
|
+
}), W();
|
|
466
|
+
},
|
|
467
|
+
() => {
|
|
468
|
+
if (r.isKeyWordPicked("C"))
|
|
469
|
+
a = new De(), a.closed = !1, J.use(a), r.setMessage(`
|
|
470
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), r.setKeyWords(""), r.setUserDraw((P, v) => {
|
|
471
|
+
a.startPoint = n, v.drawLine(P, a.startPoint);
|
|
472
|
+
}), h();
|
|
473
|
+
else if (r.isKeyWordPicked("E"))
|
|
474
|
+
a = new De(), a.closed = !1, J.use(a), r.setMessage(`
|
|
475
|
+
\u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), r.setKeyWords(""), r.setUserDraw((P, v) => {
|
|
476
|
+
a.startPoint = n, v.drawLine(P, a.startPoint);
|
|
477
|
+
}), h();
|
|
478
|
+
else
|
|
479
|
+
return !0;
|
|
480
|
+
}
|
|
481
|
+
), W = U(
|
|
482
|
+
r,
|
|
483
|
+
() => {
|
|
484
|
+
f.point1 = n, f.point2 = r.value(), f.point3 = m, I.getCurrentDraw().addMxEntity(f);
|
|
485
|
+
},
|
|
486
|
+
() => {
|
|
487
|
+
if (r.isKeyWordPicked("C"))
|
|
488
|
+
console.log("C");
|
|
489
|
+
else if (r.isKeyWordPicked("E"))
|
|
490
|
+
console.log("E");
|
|
491
|
+
else
|
|
492
|
+
return !0;
|
|
493
|
+
}
|
|
494
|
+
);
|
|
495
|
+
g();
|
|
496
|
+
}
|
|
497
|
+
function an() {
|
|
498
|
+
const r = new oe(), o = new kt();
|
|
499
|
+
o.closed = !1, J.use(o), r.setMessage(`
|
|
500
|
+
\u6307\u5B9A\u692D\u5706\u7684\u8F74\u7AEF\u70B9`), r.setKeyWords("[\u4E2D\u5FC3\u70B9(C)]");
|
|
501
|
+
let n, f = new THREE.Vector3();
|
|
502
|
+
U(
|
|
503
|
+
r,
|
|
504
|
+
() => {
|
|
505
|
+
n = r.value(), r.setUserDraw((E, x) => {
|
|
506
|
+
const D = new THREE.Line3(n, E);
|
|
507
|
+
D.getCenter(f), o.center = f, o.xRadius = D.distance() / 2, o.yRadius = o.xRadius, o.rotation = je(E.x, E.y, f.x, f.y), x.drawLine(E, n);
|
|
508
|
+
}), r.setMessage(`
|
|
509
|
+
\u6307\u5B9A\u692D\u5706\u5F27\u8F74\u7684\u53E6\u4E00\u4E2A\u7AEF\u70B9:`), r.setKeyWords(""), g();
|
|
510
|
+
},
|
|
511
|
+
() => {
|
|
512
|
+
}
|
|
513
|
+
)();
|
|
514
|
+
const g = U(
|
|
515
|
+
r,
|
|
516
|
+
() => {
|
|
517
|
+
r.setUserDraw((E, x) => {
|
|
518
|
+
o.yRadius = f.distanceTo(E), x.drawLine(f, E), x.drawCustomEntity(o);
|
|
519
|
+
}), r.setMessage(`
|
|
520
|
+
\u6307\u5B9A\u53E6\u4E00\u6761\u534A\u8F74\u957F\u5EA6`), r.setKeyWords(""), d();
|
|
521
|
+
},
|
|
522
|
+
() => {
|
|
523
|
+
}
|
|
524
|
+
), d = U(
|
|
525
|
+
r,
|
|
526
|
+
() => {
|
|
527
|
+
r.setMessage(`
|
|
528
|
+
\u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`), r.setKeyWords(""), r.setUserDraw((E, x) => {
|
|
529
|
+
o.startAngle = je(E.x, E.y, f.x, f.y) - o.rotation, x.drawLine(f, E), x.drawCustomEntity(o);
|
|
530
|
+
}), h();
|
|
531
|
+
},
|
|
532
|
+
() => {
|
|
533
|
+
}
|
|
534
|
+
), h = U(
|
|
535
|
+
r,
|
|
536
|
+
() => {
|
|
537
|
+
r.setUserDraw((E, x) => {
|
|
538
|
+
o.endAngle = je(E.x, E.y, f.x, f.y) - o.rotation, x.drawLine(f, E), x.drawCustomEntity(o);
|
|
539
|
+
}), r.setMessage(`
|
|
540
|
+
\u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`), r.setKeyWords(""), w();
|
|
541
|
+
},
|
|
542
|
+
() => {
|
|
543
|
+
}
|
|
544
|
+
), w = U(
|
|
545
|
+
r,
|
|
546
|
+
() => {
|
|
547
|
+
I.getCurrentDraw().addMxEntity(o);
|
|
548
|
+
},
|
|
549
|
+
() => {
|
|
550
|
+
}
|
|
551
|
+
);
|
|
552
|
+
}
|
|
553
|
+
var Fe = (() => {
|
|
554
|
+
var r = typeof document < "u" && document.currentScript ? document.currentScript.src : void 0;
|
|
555
|
+
return typeof __filename < "u" && (r = r || __filename), function(o) {
|
|
556
|
+
o = o || {};
|
|
557
|
+
var n;
|
|
558
|
+
n || (n = typeof o < "u" ? o : {});
|
|
559
|
+
var f, a;
|
|
560
|
+
n.ready = new Promise(function(e, t) {
|
|
561
|
+
f = e, a = t;
|
|
562
|
+
});
|
|
563
|
+
var g = Object.assign({}, n), d = typeof window == "object", h = typeof importScripts == "function", w = "", E, x, D, b, m, M;
|
|
564
|
+
typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" ? (w = h ? require("path").dirname(w) + "/" : __dirname + "/", M = () => {
|
|
565
|
+
m || (b = require("fs"), m = require("path"));
|
|
566
|
+
}, E = function(e, t) {
|
|
567
|
+
return M(), e = m.normalize(e), b.readFileSync(e, t ? void 0 : "utf8");
|
|
568
|
+
}, D = (e) => (e = E(e, !0), e.buffer || (e = new Uint8Array(e)), e), x = (e, t, i) => {
|
|
569
|
+
M(), e = m.normalize(e), b.readFile(e, function(s, l) {
|
|
570
|
+
s ? i(s) : t(l.buffer);
|
|
571
|
+
});
|
|
572
|
+
}, 1 < process.argv.length && process.argv[1].replace(/\\/g, "/"), process.argv.slice(2), process.on("uncaughtException", function(e) {
|
|
573
|
+
throw e;
|
|
574
|
+
}), process.on("unhandledRejection", function(e) {
|
|
575
|
+
throw e;
|
|
576
|
+
}), n.inspect = function() {
|
|
577
|
+
return "[Emscripten Module object]";
|
|
578
|
+
}) : (d || h) && (h ? w = self.location.href : typeof document < "u" && document.currentScript && (w = document.currentScript.src), r && (w = r), w = w.indexOf("blob:") !== 0 ? w.substr(0, w.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", E = (e) => {
|
|
579
|
+
var t = new XMLHttpRequest();
|
|
580
|
+
return t.open("GET", e, !1), t.send(null), t.responseText;
|
|
581
|
+
}, h && (D = (e) => {
|
|
582
|
+
var t = new XMLHttpRequest();
|
|
583
|
+
return t.open("GET", e, !1), t.responseType = "arraybuffer", t.send(null), new Uint8Array(t.response);
|
|
584
|
+
}), x = (e, t, i) => {
|
|
585
|
+
var s = new XMLHttpRequest();
|
|
586
|
+
s.open("GET", e, !0), s.responseType = "arraybuffer", s.onload = () => {
|
|
587
|
+
s.status == 200 || s.status == 0 && s.response ? t(s.response) : i();
|
|
588
|
+
}, s.onerror = i, s.send(null);
|
|
589
|
+
});
|
|
590
|
+
var W = n.print || console.log.bind(console), P = n.printErr || console.warn.bind(console);
|
|
591
|
+
Object.assign(n, g), g = null;
|
|
592
|
+
function v(e) {
|
|
593
|
+
K || (K = {}), K[e] || (K[e] = 1, P(e));
|
|
594
|
+
}
|
|
595
|
+
var K, O;
|
|
596
|
+
n.wasmBinary && (O = n.wasmBinary), n.noExitRuntime, typeof WebAssembly != "object" && ae("no native wasm support detected");
|
|
597
|
+
var q, H = !1, z = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
|
|
598
|
+
function N(e, t, i) {
|
|
599
|
+
var s = t + i;
|
|
600
|
+
for (i = t; e[i] && !(i >= s); )
|
|
601
|
+
++i;
|
|
602
|
+
if (16 < i - t && e.buffer && z)
|
|
603
|
+
return z.decode(e.subarray(t, i));
|
|
604
|
+
for (s = ""; t < i; ) {
|
|
605
|
+
var l = e[t++];
|
|
606
|
+
if (l & 128) {
|
|
607
|
+
var u = e[t++] & 63;
|
|
608
|
+
if ((l & 224) == 192)
|
|
609
|
+
s += String.fromCharCode((l & 31) << 6 | u);
|
|
610
|
+
else {
|
|
611
|
+
var c = e[t++] & 63;
|
|
612
|
+
l = (l & 240) == 224 ? (l & 15) << 12 | u << 6 | c : (l & 7) << 18 | u << 12 | c << 6 | e[t++] & 63, 65536 > l ? s += String.fromCharCode(l) : (l -= 65536, s += String.fromCharCode(55296 | l >> 10, 56320 | l & 1023));
|
|
613
|
+
}
|
|
614
|
+
} else
|
|
615
|
+
s += String.fromCharCode(l);
|
|
616
|
+
}
|
|
617
|
+
return s;
|
|
618
|
+
}
|
|
619
|
+
function Y(e, t) {
|
|
620
|
+
return e ? N(ee, e, t) : "";
|
|
621
|
+
}
|
|
622
|
+
function de(e, t, i, s) {
|
|
623
|
+
if (!(0 < s))
|
|
624
|
+
return 0;
|
|
625
|
+
var l = i;
|
|
626
|
+
s = i + s - 1;
|
|
627
|
+
for (var u = 0; u < e.length; ++u) {
|
|
628
|
+
var c = e.charCodeAt(u);
|
|
629
|
+
if (55296 <= c && 57343 >= c) {
|
|
630
|
+
var p = e.charCodeAt(++u);
|
|
631
|
+
c = 65536 + ((c & 1023) << 10) | p & 1023;
|
|
632
|
+
}
|
|
633
|
+
if (127 >= c) {
|
|
634
|
+
if (i >= s)
|
|
635
|
+
break;
|
|
636
|
+
t[i++] = c;
|
|
637
|
+
} else {
|
|
638
|
+
if (2047 >= c) {
|
|
639
|
+
if (i + 1 >= s)
|
|
640
|
+
break;
|
|
641
|
+
t[i++] = 192 | c >> 6;
|
|
642
|
+
} else {
|
|
643
|
+
if (65535 >= c) {
|
|
644
|
+
if (i + 2 >= s)
|
|
645
|
+
break;
|
|
646
|
+
t[i++] = 224 | c >> 12;
|
|
647
|
+
} else {
|
|
648
|
+
if (i + 3 >= s)
|
|
649
|
+
break;
|
|
650
|
+
t[i++] = 240 | c >> 18, t[i++] = 128 | c >> 12 & 63;
|
|
651
|
+
}
|
|
652
|
+
t[i++] = 128 | c >> 6 & 63;
|
|
653
|
+
}
|
|
654
|
+
t[i++] = 128 | c & 63;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
return t[i] = 0, i - l;
|
|
658
|
+
}
|
|
659
|
+
var pe, j, ee, C, ye, he;
|
|
660
|
+
function ze() {
|
|
661
|
+
var e = q.buffer;
|
|
662
|
+
pe = e, n.HEAP8 = j = new Int8Array(e), n.HEAP16 = new Int16Array(e), n.HEAP32 = C = new Int32Array(e), n.HEAPU8 = ee = new Uint8Array(e), n.HEAPU16 = new Uint16Array(e), n.HEAPU32 = new Uint32Array(e), n.HEAPF32 = ye = new Float32Array(e), n.HEAPF64 = he = new Float64Array(e);
|
|
663
|
+
}
|
|
664
|
+
var Ne, Ge = [], $e = [], Xe = [];
|
|
665
|
+
function vt() {
|
|
666
|
+
var e = n.preRun.shift();
|
|
667
|
+
Ge.unshift(e);
|
|
668
|
+
}
|
|
669
|
+
var ue = 0, fe = null;
|
|
670
|
+
n.preloadedImages = {}, n.preloadedAudios = {};
|
|
671
|
+
function ae(e) {
|
|
672
|
+
throw n.onAbort && n.onAbort(e), e = "Aborted(" + e + ")", P(e), H = !0, e = new WebAssembly.RuntimeError(e + ". Build with -s ASSERTIONS=1 for more info."), a(e), e;
|
|
673
|
+
}
|
|
674
|
+
function Ye() {
|
|
675
|
+
return $.startsWith("data:application/octet-stream;base64,");
|
|
676
|
+
}
|
|
677
|
+
var $;
|
|
678
|
+
if ($ = "mxdrawassembly_min.wasm.wasm", !Ye()) {
|
|
679
|
+
var Ze = $;
|
|
680
|
+
$ = n.locateFile ? n.locateFile(Ze, w) : w + Ze;
|
|
681
|
+
}
|
|
682
|
+
function Qe() {
|
|
683
|
+
var e = $;
|
|
684
|
+
try {
|
|
685
|
+
if (e == $ && O)
|
|
686
|
+
return new Uint8Array(O);
|
|
687
|
+
if (D)
|
|
688
|
+
return D(e);
|
|
689
|
+
throw "both async and sync fetching of the wasm failed";
|
|
690
|
+
} catch (t) {
|
|
691
|
+
ae(t);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
function xt() {
|
|
695
|
+
if (!O && (d || h)) {
|
|
696
|
+
if (typeof fetch == "function" && !$.startsWith("file://"))
|
|
697
|
+
return fetch($, { credentials: "same-origin" }).then(function(e) {
|
|
698
|
+
if (!e.ok)
|
|
699
|
+
throw "failed to load wasm binary file at '" + $ + "'";
|
|
700
|
+
return e.arrayBuffer();
|
|
701
|
+
}).catch(function() {
|
|
702
|
+
return Qe();
|
|
703
|
+
});
|
|
704
|
+
if (x)
|
|
705
|
+
return new Promise(function(e, t) {
|
|
706
|
+
x($, function(i) {
|
|
707
|
+
e(new Uint8Array(i));
|
|
708
|
+
}, t);
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
return Promise.resolve().then(function() {
|
|
712
|
+
return Qe();
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
function be(e) {
|
|
716
|
+
for (; 0 < e.length; ) {
|
|
717
|
+
var t = e.shift();
|
|
718
|
+
if (typeof t == "function")
|
|
719
|
+
t(n);
|
|
720
|
+
else {
|
|
721
|
+
var i = t.Da;
|
|
722
|
+
typeof i == "number" ? t.da === void 0 ? Ue(i)() : Ue(i)(t.da) : i(t.da === void 0 ? null : t.da);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
var Ee = [];
|
|
727
|
+
function Ue(e) {
|
|
728
|
+
var t = Ee[e];
|
|
729
|
+
return t || (e >= Ee.length && (Ee.length = e + 1), Ee[e] = t = Ne.get(e)), t;
|
|
730
|
+
}
|
|
731
|
+
function Je(e, t) {
|
|
732
|
+
if (0 >= e)
|
|
733
|
+
return e;
|
|
734
|
+
var i = 32 >= t ? Math.abs(1 << t - 1) : Math.pow(2, t - 1);
|
|
735
|
+
return e >= i && (32 >= t || e > i) && (e = -2 * i + e), e;
|
|
736
|
+
}
|
|
737
|
+
function qe(e, t) {
|
|
738
|
+
return 0 <= e ? e : 32 >= t ? 2 * Math.abs(1 << t - 1) + e : Math.pow(2, t) + e;
|
|
739
|
+
}
|
|
740
|
+
function Mt(e, t) {
|
|
741
|
+
function i(X) {
|
|
742
|
+
var Ke = s;
|
|
743
|
+
return (X === "double" || X === "i64") && Ke & 7 && (Ke += 4), s = Ke, X === "double" ? (X = Number(he[s >> 3]), s += 8) : X == "i64" ? (X = [C[s >> 2], C[s + 4 >> 2]], s += 8) : (X = C[s >> 2], s += 4), X;
|
|
744
|
+
}
|
|
745
|
+
for (var s = t, l = [], u, c; ; ) {
|
|
746
|
+
var p = e;
|
|
747
|
+
if (u = j[e >> 0], u === 0)
|
|
748
|
+
break;
|
|
749
|
+
if (c = j[e + 1 >> 0], u == 37) {
|
|
750
|
+
var B = !1, _ = t = !1, R = !1, re = !1;
|
|
751
|
+
e:
|
|
752
|
+
for (; ; ) {
|
|
753
|
+
switch (c) {
|
|
754
|
+
case 43:
|
|
755
|
+
B = !0;
|
|
756
|
+
break;
|
|
757
|
+
case 45:
|
|
758
|
+
t = !0;
|
|
759
|
+
break;
|
|
760
|
+
case 35:
|
|
761
|
+
_ = !0;
|
|
762
|
+
break;
|
|
763
|
+
case 48:
|
|
764
|
+
if (R)
|
|
765
|
+
break e;
|
|
766
|
+
R = !0;
|
|
767
|
+
break;
|
|
768
|
+
case 32:
|
|
769
|
+
re = !0;
|
|
770
|
+
break;
|
|
771
|
+
default:
|
|
772
|
+
break e;
|
|
773
|
+
}
|
|
774
|
+
e++, c = j[e + 1 >> 0];
|
|
775
|
+
}
|
|
776
|
+
var V = 0;
|
|
777
|
+
if (c == 42)
|
|
778
|
+
V = i("i32"), e++, c = j[e + 1 >> 0];
|
|
779
|
+
else
|
|
780
|
+
for (; 48 <= c && 57 >= c; )
|
|
781
|
+
V = 10 * V + (c - 48), e++, c = j[e + 1 >> 0];
|
|
782
|
+
var k = !1, S = -1;
|
|
783
|
+
if (c == 46) {
|
|
784
|
+
if (S = 0, k = !0, e++, c = j[e + 1 >> 0], c == 42)
|
|
785
|
+
S = i("i32"), e++;
|
|
786
|
+
else
|
|
787
|
+
for (; c = j[e + 1 >> 0], !(48 > c || 57 < c); )
|
|
788
|
+
S = 10 * S + (c - 48), e++;
|
|
789
|
+
c = j[e + 1 >> 0];
|
|
790
|
+
}
|
|
791
|
+
switch (0 > S && (S = 6, k = !1), String.fromCharCode(c)) {
|
|
792
|
+
case "h":
|
|
793
|
+
if (c = j[e + 2 >> 0], c == 104) {
|
|
794
|
+
e++;
|
|
795
|
+
var F = 1;
|
|
796
|
+
} else
|
|
797
|
+
F = 2;
|
|
798
|
+
break;
|
|
799
|
+
case "l":
|
|
800
|
+
c = j[e + 2 >> 0], c == 108 ? (e++, F = 8) : F = 4;
|
|
801
|
+
break;
|
|
802
|
+
case "L":
|
|
803
|
+
case "q":
|
|
804
|
+
case "j":
|
|
805
|
+
F = 8;
|
|
806
|
+
break;
|
|
807
|
+
case "z":
|
|
808
|
+
case "t":
|
|
809
|
+
case "I":
|
|
810
|
+
F = 4;
|
|
811
|
+
break;
|
|
812
|
+
default:
|
|
813
|
+
F = null;
|
|
814
|
+
}
|
|
815
|
+
switch (F && e++, c = j[e + 1 >> 0], String.fromCharCode(c)) {
|
|
816
|
+
case "d":
|
|
817
|
+
case "i":
|
|
818
|
+
case "u":
|
|
819
|
+
case "o":
|
|
820
|
+
case "x":
|
|
821
|
+
case "X":
|
|
822
|
+
case "p":
|
|
823
|
+
p = c == 100 || c == 105, F = F || 4, u = i("i" + 8 * F), F == 8 && (u = c == 117 ? (u[0] >>> 0) + 4294967296 * (u[1] >>> 0) : (u[0] >>> 0) + 4294967296 * u[1]), 4 >= F && (u = (p ? Je : qe)(u & Math.pow(256, F) - 1, 8 * F));
|
|
824
|
+
var se = Math.abs(u);
|
|
825
|
+
if (p = "", c == 100 || c == 105)
|
|
826
|
+
var A = Je(u, 8 * F).toString(10);
|
|
827
|
+
else if (c == 117)
|
|
828
|
+
A = qe(u, 8 * F).toString(10), u = Math.abs(u);
|
|
829
|
+
else if (c == 111)
|
|
830
|
+
A = (_ ? "0" : "") + se.toString(8);
|
|
831
|
+
else if (c == 120 || c == 88) {
|
|
832
|
+
if (p = _ && u != 0 ? "0x" : "", 0 > u) {
|
|
833
|
+
for (u = -u, A = (se - 1).toString(16), se = [], _ = 0; _ < A.length; _++)
|
|
834
|
+
se.push((15 - parseInt(A[_], 16)).toString(16));
|
|
835
|
+
for (A = se.join(""); A.length < 2 * F; )
|
|
836
|
+
A = "f" + A;
|
|
837
|
+
} else
|
|
838
|
+
A = se.toString(16);
|
|
839
|
+
c == 88 && (p = p.toUpperCase(), A = A.toUpperCase());
|
|
840
|
+
} else
|
|
841
|
+
c == 112 && (se === 0 ? A = "(nil)" : (p = "0x", A = se.toString(16)));
|
|
842
|
+
if (k)
|
|
843
|
+
for (; A.length < S; )
|
|
844
|
+
A = "0" + A;
|
|
845
|
+
for (0 <= u && (B ? p = "+" + p : re && (p = " " + p)), A.charAt(0) == "-" && (p = "-" + p, A = A.substr(1)); p.length + A.length < V; )
|
|
846
|
+
t ? A += " " : R ? A = "0" + A : p = " " + p;
|
|
847
|
+
A = p + A, A.split("").forEach(function(X) {
|
|
848
|
+
l.push(X.charCodeAt(0));
|
|
849
|
+
});
|
|
850
|
+
break;
|
|
851
|
+
case "f":
|
|
852
|
+
case "F":
|
|
853
|
+
case "e":
|
|
854
|
+
case "E":
|
|
855
|
+
case "g":
|
|
856
|
+
case "G":
|
|
857
|
+
if (u = i("double"), isNaN(u))
|
|
858
|
+
A = "nan", R = !1;
|
|
859
|
+
else if (isFinite(u)) {
|
|
860
|
+
if (k = !1, F = Math.min(S, 20), (c == 103 || c == 71) && (k = !0, S = S || 1, F = parseInt(u.toExponential(F).split("e")[1], 10), S > F && -4 <= F ? (c = (c == 103 ? "f" : "F").charCodeAt(0), S -= F + 1) : (c = (c == 103 ? "e" : "E").charCodeAt(0), S--), F = Math.min(S, 20)), c == 101 || c == 69 ? (A = u.toExponential(F), /[eE][-+]\d$/.test(A) && (A = A.slice(0, -1) + "0" + A.slice(-1))) : (c == 102 || c == 70) && (A = u.toFixed(F), u === 0 && (0 > u || u === 0 && 1 / u === -1 / 0) && (A = "-" + A)), p = A.split("e"), k && !_)
|
|
861
|
+
for (; 1 < p[0].length && p[0].includes(".") && (p[0].slice(-1) == "0" || p[0].slice(-1) == "."); )
|
|
862
|
+
p[0] = p[0].slice(0, -1);
|
|
863
|
+
else
|
|
864
|
+
for (_ && A.indexOf(".") == -1 && (p[0] += "."); S > F++; )
|
|
865
|
+
p[0] += "0";
|
|
866
|
+
A = p[0] + (1 < p.length ? "e" + p[1] : ""), c == 69 && (A = A.toUpperCase()), 0 <= u && (B ? A = "+" + A : re && (A = " " + A));
|
|
867
|
+
} else
|
|
868
|
+
A = (0 > u ? "-" : "") + "inf", R = !1;
|
|
869
|
+
for (; A.length < V; )
|
|
870
|
+
A = t ? A + " " : !R || A[0] != "-" && A[0] != "+" ? (R ? "0" : " ") + A : A[0] + "0" + A.slice(1);
|
|
871
|
+
97 > c && (A = A.toUpperCase()), A.split("").forEach(function(X) {
|
|
872
|
+
l.push(X.charCodeAt(0));
|
|
873
|
+
});
|
|
874
|
+
break;
|
|
875
|
+
case "s":
|
|
876
|
+
if (R = (B = i("i8*")) ? pt(B) : 6, k && (R = Math.min(R, S)), !t)
|
|
877
|
+
for (; R < V--; )
|
|
878
|
+
l.push(32);
|
|
879
|
+
if (B)
|
|
880
|
+
for (_ = 0; _ < R; _++)
|
|
881
|
+
l.push(ee[B++ >> 0]);
|
|
882
|
+
else
|
|
883
|
+
l = l.concat(st(
|
|
884
|
+
"(null)".substr(0, R),
|
|
885
|
+
!0
|
|
886
|
+
));
|
|
887
|
+
if (t)
|
|
888
|
+
for (; R < V--; )
|
|
889
|
+
l.push(32);
|
|
890
|
+
break;
|
|
891
|
+
case "c":
|
|
892
|
+
for (t && l.push(i("i8")); 0 < --V; )
|
|
893
|
+
l.push(32);
|
|
894
|
+
t || l.push(i("i8"));
|
|
895
|
+
break;
|
|
896
|
+
case "n":
|
|
897
|
+
t = i("i32*"), C[t >> 2] = l.length;
|
|
898
|
+
break;
|
|
899
|
+
case "%":
|
|
900
|
+
l.push(u);
|
|
901
|
+
break;
|
|
902
|
+
default:
|
|
903
|
+
for (_ = p; _ < e + 2; _++)
|
|
904
|
+
l.push(j[_ >> 0]);
|
|
905
|
+
}
|
|
906
|
+
e += 2;
|
|
907
|
+
} else
|
|
908
|
+
l.push(u), e += 1;
|
|
909
|
+
}
|
|
910
|
+
return l;
|
|
911
|
+
}
|
|
912
|
+
function We(e) {
|
|
913
|
+
if (!e || !e.callee || !e.callee.name)
|
|
914
|
+
return [null, "", ""];
|
|
915
|
+
var t = e.callee.name, i = "(", s = !0, l;
|
|
916
|
+
for (l in e) {
|
|
917
|
+
var u = e[l];
|
|
918
|
+
s || (i += ", "), s = !1, i = typeof u == "number" || typeof u == "string" ? i + u : i + ("(" + typeof u + ")");
|
|
919
|
+
}
|
|
920
|
+
return i += ")", e = (e = e.callee.caller) ? e.arguments : [], s && (i = ""), [e, t, i];
|
|
921
|
+
}
|
|
922
|
+
function Ct(e) {
|
|
923
|
+
e: {
|
|
924
|
+
var t = Error();
|
|
925
|
+
if (!t.stack) {
|
|
926
|
+
try {
|
|
927
|
+
throw Error();
|
|
928
|
+
} catch (S) {
|
|
929
|
+
t = S;
|
|
930
|
+
}
|
|
931
|
+
if (!t.stack) {
|
|
932
|
+
t = "(no stack trace available)";
|
|
933
|
+
break e;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
t = t.stack.toString();
|
|
937
|
+
}
|
|
938
|
+
t = t.slice(t.indexOf(`
|
|
939
|
+
`, Math.max(t.lastIndexOf("_emscripten_log"), t.lastIndexOf("_emscripten_get_callstack"))) + 1), e & 32 && v("EM_LOG_DEMANGLE is deprecated; ignoring"), e & 8 && typeof emscripten_source_map > "u" && (v('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'), e = e ^ 8 | 16);
|
|
940
|
+
var i = null;
|
|
941
|
+
if (e & 128)
|
|
942
|
+
for (i = We(arguments); i[1].includes("_emscripten_"); )
|
|
943
|
+
i = We(i[0]);
|
|
944
|
+
var s = t.split(`
|
|
945
|
+
`);
|
|
946
|
+
t = "";
|
|
947
|
+
var l = RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"), u = RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"), c = RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)"), p;
|
|
948
|
+
for (p in s) {
|
|
949
|
+
var B = s[p], _;
|
|
950
|
+
if ((_ = c.exec(B)) && _.length == 5) {
|
|
951
|
+
B = _[1];
|
|
952
|
+
var R = _[2], re = _[3];
|
|
953
|
+
_ = _[4];
|
|
954
|
+
} else if ((_ = l.exec(B)) || (_ = u.exec(B)), _ && 4 <= _.length)
|
|
955
|
+
B = _[1], R = _[2], re = _[3], _ = _[4] | 0;
|
|
956
|
+
else {
|
|
957
|
+
t += B + `
|
|
958
|
+
`;
|
|
959
|
+
continue;
|
|
960
|
+
}
|
|
961
|
+
var V = !1;
|
|
962
|
+
if (e & 8) {
|
|
963
|
+
var k = emscripten_source_map.Ia({
|
|
964
|
+
line: re,
|
|
965
|
+
ua: _
|
|
966
|
+
});
|
|
967
|
+
(V = k && k.source) && (e & 64 && (k.source = k.source.substring(k.source.replace(/\\/g, "/").lastIndexOf("/") + 1)), t += " at " + B + " (" + k.source + ":" + k.line + ":" + k.ua + `)
|
|
968
|
+
`);
|
|
969
|
+
}
|
|
970
|
+
(e & 16 || !V) && (e & 64 && (R = R.substring(R.replace(/\\/g, "/").lastIndexOf("/") + 1)), t += (V ? " = " + B : " at " + B) + " (" + R + ":" + re + ":" + _ + `)
|
|
971
|
+
`), e & 128 && i[0] && (i[1] == B && 0 < i[2].length && (t = t.replace(/\s+$/, ""), t += " with values: " + i[1] + i[2] + `
|
|
972
|
+
`), i = We(i[0]));
|
|
973
|
+
}
|
|
974
|
+
return t = t.replace(/\s+$/, "");
|
|
975
|
+
}
|
|
976
|
+
function Bt(e) {
|
|
977
|
+
var t = e.getExtension("ANGLE_instanced_arrays");
|
|
978
|
+
t && (e.vertexAttribDivisor = function(i, s) {
|
|
979
|
+
t.vertexAttribDivisorANGLE(i, s);
|
|
980
|
+
}, e.drawArraysInstanced = function(i, s, l, u) {
|
|
981
|
+
t.drawArraysInstancedANGLE(i, s, l, u);
|
|
982
|
+
}, e.drawElementsInstanced = function(i, s, l, u, c) {
|
|
983
|
+
t.drawElementsInstancedANGLE(i, s, l, u, c);
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
function Dt(e) {
|
|
987
|
+
var t = e.getExtension("OES_vertex_array_object");
|
|
988
|
+
t && (e.createVertexArray = function() {
|
|
989
|
+
return t.createVertexArrayOES();
|
|
990
|
+
}, e.deleteVertexArray = function(i) {
|
|
991
|
+
t.deleteVertexArrayOES(i);
|
|
992
|
+
}, e.bindVertexArray = function(i) {
|
|
993
|
+
t.bindVertexArrayOES(i);
|
|
994
|
+
}, e.isVertexArray = function(i) {
|
|
995
|
+
return t.isVertexArrayOES(i);
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
function Rt(e) {
|
|
999
|
+
var t = e.getExtension("WEBGL_draw_buffers");
|
|
1000
|
+
t && (e.drawBuffers = function(i, s) {
|
|
1001
|
+
t.drawBuffersWEBGL(i, s);
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
var et = 1, ge = [], te = [], ne = [], Te = [], tt = [1, 1, 2, 2, 4, 4, 4, 2, 3, 4, 8];
|
|
1005
|
+
function ce(e) {
|
|
1006
|
+
we || (we = e);
|
|
1007
|
+
}
|
|
1008
|
+
function Ae(e) {
|
|
1009
|
+
for (var t = et++, i = e.length; i < t; i++)
|
|
1010
|
+
e[i] = null;
|
|
1011
|
+
return t;
|
|
1012
|
+
}
|
|
1013
|
+
function Le(e) {
|
|
1014
|
+
return 32 - Math.clz32(e === 0 ? 0 : e - 1);
|
|
1015
|
+
}
|
|
1016
|
+
function Ft(e, t) {
|
|
1017
|
+
e.fa || (e.fa = e.getContext, e.getContext = function(s, l) {
|
|
1018
|
+
return (l = e.fa(s, l)) || (l = e.fa(s)), s == "webgl" == l instanceof WebGLRenderingContext ? l : null;
|
|
1019
|
+
});
|
|
1020
|
+
var i = 1 < t.na ? e.getContext("webgl2", t) : e.getContext("webgl", t);
|
|
1021
|
+
return i ? bt(i, t) : 0;
|
|
1022
|
+
}
|
|
1023
|
+
function bt(e, t) {
|
|
1024
|
+
var i = Ae(Te), s = { Ea: i, attributes: t, version: t.na, ba: e };
|
|
1025
|
+
for (e.canvas && (e.canvas.ya = s), Te[i] = s, (typeof t.ma > "u" || t.ma) && Wt(s), s.oa = s.ba.getParameter(34921), s.X = [], e = 0; e < s.oa; e++)
|
|
1026
|
+
s.X[e] = { enabled: !1, ea: !1, size: 0, type: 0, pa: 0, ga: 0, R: 0, ta: null };
|
|
1027
|
+
for (e = Le(2097152), s.U = [], s.qa = [], s.U.length = s.qa.length = e + 1, s.aa = [], s.ha = [], s.aa.length = s.ha.length = e + 1, s.S = [], s.S.length = e + 1, t = 0; t <= e; ++t) {
|
|
1028
|
+
s.S[t] = null, s.U[t] = s.qa[t] = 0, s.aa[t] = [], s.ha[t] = [];
|
|
1029
|
+
var l = s.aa[t], u = s.ha[t];
|
|
1030
|
+
l.length = u.length = 64;
|
|
1031
|
+
for (var c = 0; 64 > c; ++c)
|
|
1032
|
+
l[c] = u[c] = null;
|
|
1033
|
+
}
|
|
1034
|
+
return i;
|
|
1035
|
+
}
|
|
1036
|
+
function Wt(e) {
|
|
1037
|
+
if (e || (e = L), !e.xa) {
|
|
1038
|
+
e.xa = !0;
|
|
1039
|
+
var t = e.ba;
|
|
1040
|
+
Bt(t), Dt(t), Rt(t), t.Ca = t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"), t.Fa = t.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"), 2 <= e.version && (t.la = t.getExtension("EXT_disjoint_timer_query_webgl2")), (2 > e.version || !t.la) && (t.la = t.getExtension("EXT_disjoint_timer_query")), t.Ha = t.getExtension("WEBGL_multi_draw"), (t.getSupportedExtensions() || []).forEach(function(i) {
|
|
1041
|
+
i.includes("lose_context") || i.includes("debug") || t.getExtension(i);
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
var we, L, Se, Tt = ["default", "low-power", "high-performance"], Lt = [0, typeof document < "u" ? document : 0, typeof window < "u" ? window : 0];
|
|
1046
|
+
function nt(e) {
|
|
1047
|
+
return e.slice(-1) == "]" && e.lastIndexOf("[");
|
|
1048
|
+
}
|
|
1049
|
+
function rt(e) {
|
|
1050
|
+
var t = y.va;
|
|
1051
|
+
if (t) {
|
|
1052
|
+
var i = t.V[e];
|
|
1053
|
+
return typeof i == "number" && (t.V[e] = i = y.getUniformLocation(t, t.ra[e] + (0 < i ? "[" + i + "]" : ""))), i;
|
|
1054
|
+
}
|
|
1055
|
+
ce(1282);
|
|
1056
|
+
}
|
|
1057
|
+
for (var it = [], y, St = new Float32Array(288), me = 0; 288 > me; ++me)
|
|
1058
|
+
it[me] = St.subarray(0, me + 1);
|
|
1059
|
+
function st(e, t) {
|
|
1060
|
+
for (var i = 0, s = 0; s < e.length; ++s) {
|
|
1061
|
+
var l = e.charCodeAt(s);
|
|
1062
|
+
55296 <= l && 57343 >= l && (l = 65536 + ((l & 1023) << 10) | e.charCodeAt(++s) & 1023), 127 >= l ? ++i : i = 2047 >= l ? i + 2 : 65535 >= l ? i + 3 : i + 4;
|
|
1063
|
+
}
|
|
1064
|
+
return i = Array(i + 1), e = de(e, i, 0, i.length), t && (i.length = e), i;
|
|
1065
|
+
}
|
|
1066
|
+
var It = { c: function() {
|
|
1067
|
+
ae("");
|
|
1068
|
+
}, a: function(e, t, i) {
|
|
1069
|
+
t = Mt(t, i), t = N(t, 0), e & 24 && (t = t.replace(/\s+$/, ""), t += (0 < t.length ? `
|
|
1070
|
+
` : "") + Ct(e)), e & 1 ? e & 4 ? console.error(t) : e & 2 ? console.warn(t) : e & 512 ? console.info(t) : e & 256 ? console.debug(t) : console.log(t) : e & 6 ? P(t) : W(t);
|
|
1071
|
+
}, o: function(e, t, i) {
|
|
1072
|
+
ee.copyWithin(e, t, t + i);
|
|
1073
|
+
}, n: function(e) {
|
|
1074
|
+
var t = ee.length;
|
|
1075
|
+
if (e >>>= 0, 2147483648 < e)
|
|
1076
|
+
return !1;
|
|
1077
|
+
for (var i = 1; 4 >= i; i *= 2) {
|
|
1078
|
+
var s = t * (1 + 0.2 / i);
|
|
1079
|
+
s = Math.min(s, e + 100663296);
|
|
1080
|
+
var l = Math;
|
|
1081
|
+
s = Math.max(e, s), l = l.min.call(l, 2147483648, s + (65536 - s % 65536) % 65536);
|
|
1082
|
+
e: {
|
|
1083
|
+
try {
|
|
1084
|
+
q.grow(l - pe.byteLength + 65535 >>> 16), ze();
|
|
1085
|
+
var u = 1;
|
|
1086
|
+
break e;
|
|
1087
|
+
} catch {
|
|
1088
|
+
}
|
|
1089
|
+
u = void 0;
|
|
1090
|
+
}
|
|
1091
|
+
if (u)
|
|
1092
|
+
return !0;
|
|
1093
|
+
}
|
|
1094
|
+
return !1;
|
|
1095
|
+
}, k: function(e, t) {
|
|
1096
|
+
return t >>= 2, t = { alpha: !!C[t + 0], depth: !!C[t + 1], stencil: !!C[t + 2], antialias: !!C[t + 3], premultipliedAlpha: !!C[t + 4], preserveDrawingBuffer: !!C[t + 5], powerPreference: Tt[C[t + 6]], failIfMajorPerformanceCaveat: !!C[t + 7], na: C[t + 8], Ga: C[t + 9], ma: C[t + 10], wa: C[t + 11], Ja: C[t + 12], Ka: C[t + 13] }, e = 2 < e ? Y(e) : e, e = Lt[e] || (typeof document < "u" ? document.querySelector(e) : void 0), !e || t.wa ? 0 : Ft(e, t);
|
|
1097
|
+
}, e: function(e) {
|
|
1098
|
+
return L = Te[e], n.za = y = L && L.ba, !e || y ? 0 : -5;
|
|
1099
|
+
}, d: function(e, t) {
|
|
1100
|
+
y.attachShader(te[e], ne[t]);
|
|
1101
|
+
}, A: function(e, t, i) {
|
|
1102
|
+
y.bindAttribLocation(te[e], t, Y(i));
|
|
1103
|
+
}, b: function(e, t) {
|
|
1104
|
+
e == 34962 ? y.ja = t : e == 34963 && (y.ka = t), e == 35051 ? y.Aa = t : e == 35052 && (y.Ba = t), y.bindBuffer(e, ge[t]);
|
|
1105
|
+
}, f: function(e, t, i, s) {
|
|
1106
|
+
2 <= L.version ? i ? y.bufferData(e, ee, s, i, t) : y.bufferData(e, t, s) : y.bufferData(e, i ? ee.subarray(i, i + t) : t, s);
|
|
1107
|
+
}, v: function(e) {
|
|
1108
|
+
y.clear(e);
|
|
1109
|
+
}, w: function(e, t, i, s) {
|
|
1110
|
+
y.clearColor(e, t, i, s);
|
|
1111
|
+
}, t: function(e) {
|
|
1112
|
+
y.compileShader(ne[e]);
|
|
1113
|
+
}, j: function() {
|
|
1114
|
+
var e = Ae(te), t = y.createProgram();
|
|
1115
|
+
return t.name = e, t.$ = t.Y = t.Z = 0, t.ia = 1, te[e] = t, e;
|
|
1116
|
+
}, C: function(e) {
|
|
1117
|
+
var t = Ae(ne);
|
|
1118
|
+
return ne[t] = y.createShader(e), t;
|
|
1119
|
+
}, q: function(e, t, i, s) {
|
|
1120
|
+
if (!y.ka) {
|
|
1121
|
+
var l = 1 * tt[i - 5120] * t, u = Le(l), c = L.S[u];
|
|
1122
|
+
c ? u = c : (c = y.getParameter(34965), L.S[u] = y.createBuffer(), y.bindBuffer(34963, L.S[u]), y.bufferData(34963, 1 << u, 35048), y.bindBuffer(34963, c), u = L.S[u]), y.bindBuffer(34963, u), y.bufferSubData(34963, 0, ee.subarray(s, s + l)), s = 0;
|
|
1123
|
+
}
|
|
1124
|
+
for (Se = !1, l = 0; l < L.oa; ++l)
|
|
1125
|
+
if (u = L.X[l], u.ea && u.enabled) {
|
|
1126
|
+
Se = !0, c = u.ga, c = 0 < c ? t * c : u.size * tt[u.type - 5120] * t;
|
|
1127
|
+
var p = Le(c), B = L.aa[p], _ = L.U[p];
|
|
1128
|
+
L.U[p] = L.U[p] + 1 & 63;
|
|
1129
|
+
var R = B[_];
|
|
1130
|
+
R ? p = R : (R = y.getParameter(34964), B[_] = y.createBuffer(), y.bindBuffer(34962, B[_]), y.bufferData(34962, 1 << p, 35048), y.bindBuffer(34962, R), p = B[_]), y.bindBuffer(34962, p), y.bufferSubData(34962, 0, ee.subarray(u.R, u.R + c)), u.ta.call(y, l, u.size, u.type, u.pa, u.ga, 0);
|
|
1131
|
+
}
|
|
1132
|
+
y.drawElements(e, t, i, s), Se && y.bindBuffer(34962, ge[y.ja]), y.ka || y.bindBuffer(34963, null);
|
|
1133
|
+
}, s: function(e) {
|
|
1134
|
+
L.X[e].enabled = !0, y.enableVertexAttribArray(e);
|
|
1135
|
+
}, g: function(e, t) {
|
|
1136
|
+
for (var i = 0; i < e; i++) {
|
|
1137
|
+
var s = y.createBuffer(), l = s && Ae(ge);
|
|
1138
|
+
s ? (s.name = l, ge[l] = s) : ce(1282), C[t + 4 * i >> 2] = l;
|
|
1139
|
+
}
|
|
1140
|
+
}, p: function() {
|
|
1141
|
+
var e = y.getError() || we;
|
|
1142
|
+
return we = 0, e;
|
|
1143
|
+
}, x: function(e, t, i) {
|
|
1144
|
+
if (i)
|
|
1145
|
+
if (e >= et)
|
|
1146
|
+
ce(1281);
|
|
1147
|
+
else if (e = te[e], t == 35716)
|
|
1148
|
+
e = y.getProgramInfoLog(e), e === null && (e = "(unknown error)"), C[i >> 2] = e.length + 1;
|
|
1149
|
+
else if (t == 35719) {
|
|
1150
|
+
if (!e.$)
|
|
1151
|
+
for (t = 0; t < y.getProgramParameter(e, 35718); ++t)
|
|
1152
|
+
e.$ = Math.max(e.$, y.getActiveUniform(e, t).name.length + 1);
|
|
1153
|
+
C[i >> 2] = e.$;
|
|
1154
|
+
} else if (t == 35722) {
|
|
1155
|
+
if (!e.Y)
|
|
1156
|
+
for (t = 0; t < y.getProgramParameter(e, 35721); ++t)
|
|
1157
|
+
e.Y = Math.max(e.Y, y.getActiveAttrib(
|
|
1158
|
+
e,
|
|
1159
|
+
t
|
|
1160
|
+
).name.length + 1);
|
|
1161
|
+
C[i >> 2] = e.Y;
|
|
1162
|
+
} else if (t == 35381) {
|
|
1163
|
+
if (!e.Z)
|
|
1164
|
+
for (t = 0; t < y.getProgramParameter(e, 35382); ++t)
|
|
1165
|
+
e.Z = Math.max(e.Z, y.getActiveUniformBlockName(e, t).length + 1);
|
|
1166
|
+
C[i >> 2] = e.Z;
|
|
1167
|
+
} else
|
|
1168
|
+
C[i >> 2] = y.getProgramParameter(e, t);
|
|
1169
|
+
else
|
|
1170
|
+
ce(1281);
|
|
1171
|
+
}, l: function(e, t, i, s) {
|
|
1172
|
+
e = y.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), t = 0 < t && s ? de(e, ee, s, t) : 0, i && (C[i >> 2] = t);
|
|
1173
|
+
}, m: function(e, t, i) {
|
|
1174
|
+
i ? t == 35716 ? (e = y.getShaderInfoLog(ne[e]), e === null && (e = "(unknown error)"), C[i >> 2] = e ? e.length + 1 : 0) : t == 35720 ? (e = y.getShaderSource(ne[e]), C[i >> 2] = e ? e.length + 1 : 0) : C[i >> 2] = y.getShaderParameter(ne[e], t) : ce(1281);
|
|
1175
|
+
}, i: function(e, t) {
|
|
1176
|
+
if (t = Y(t), e = te[e]) {
|
|
1177
|
+
var i = e, s = i.V, l = i.sa, u;
|
|
1178
|
+
if (!s)
|
|
1179
|
+
for (i.V = s = {}, i.ra = {}, u = 0; u < y.getProgramParameter(i, 35718); ++u) {
|
|
1180
|
+
var c = y.getActiveUniform(i, u), p = c.name;
|
|
1181
|
+
c = c.size;
|
|
1182
|
+
var B = nt(p);
|
|
1183
|
+
B = 0 < B ? p.slice(0, B) : p;
|
|
1184
|
+
var _ = i.ia;
|
|
1185
|
+
for (i.ia += c, l[B] = [c, _], p = 0; p < c; ++p)
|
|
1186
|
+
s[_] = p, i.ra[_++] = B;
|
|
1187
|
+
}
|
|
1188
|
+
if (i = e.V, s = 0, l = t, u = nt(t), 0 < u && (s = parseInt(t.slice(u + 1)) >>> 0, l = t.slice(0, u)), (l = e.sa[l]) && s < l[0] && (s += l[1], i[s] = i[s] || y.getUniformLocation(e, t)))
|
|
1189
|
+
return s;
|
|
1190
|
+
} else
|
|
1191
|
+
ce(1281);
|
|
1192
|
+
return -1;
|
|
1193
|
+
}, z: function(e) {
|
|
1194
|
+
e = te[e], y.linkProgram(e), e.V = 0, e.sa = {};
|
|
1195
|
+
}, B: function(e, t, i, s) {
|
|
1196
|
+
for (var l = "", u = 0; u < t; ++u) {
|
|
1197
|
+
var c = s ? C[s + 4 * u >> 2] : -1;
|
|
1198
|
+
l += Y(C[i + 4 * u >> 2], 0 > c ? void 0 : c);
|
|
1199
|
+
}
|
|
1200
|
+
y.shaderSource(ne[e], l);
|
|
1201
|
+
}, h: function(e, t, i, s) {
|
|
1202
|
+
if (2 <= L.version)
|
|
1203
|
+
y.uniformMatrix4fv(rt(e), !!i, ye, s >> 2, 16 * t);
|
|
1204
|
+
else {
|
|
1205
|
+
if (18 >= t) {
|
|
1206
|
+
var l = it[16 * t - 1], u = ye;
|
|
1207
|
+
s >>= 2;
|
|
1208
|
+
for (var c = 0; c < 16 * t; c += 16) {
|
|
1209
|
+
var p = s + c;
|
|
1210
|
+
l[c] = u[p], l[c + 1] = u[p + 1], l[c + 2] = u[p + 2], l[c + 3] = u[p + 3], l[c + 4] = u[p + 4], l[c + 5] = u[p + 5], l[c + 6] = u[p + 6], l[c + 7] = u[p + 7], l[c + 8] = u[p + 8], l[c + 9] = u[p + 9], l[c + 10] = u[p + 10], l[c + 11] = u[p + 11], l[c + 12] = u[p + 12], l[c + 13] = u[p + 13], l[c + 14] = u[p + 14], l[c + 15] = u[p + 15];
|
|
1211
|
+
}
|
|
1212
|
+
} else
|
|
1213
|
+
l = ye.subarray(s >> 2, s + 64 * t >> 2);
|
|
1214
|
+
y.uniformMatrix4fv(rt(e), !!i, l);
|
|
1215
|
+
}
|
|
1216
|
+
}, u: function(e) {
|
|
1217
|
+
e = te[e], y.useProgram(e), y.va = e;
|
|
1218
|
+
}, y: function(e) {
|
|
1219
|
+
y.validateProgram(te[e]);
|
|
1220
|
+
}, r: function(e, t, i, s, l, u) {
|
|
1221
|
+
var c = L.X[e];
|
|
1222
|
+
y.ja ? (c.ea = !1, y.vertexAttribPointer(e, t, i, !!s, l, u)) : (c.size = t, c.type = i, c.pa = s, c.ga = l, c.R = u, c.ea = !0, c.ta = function(p, B, _, R, re, V) {
|
|
1223
|
+
this.vertexAttribPointer(p, B, _, R, re, V);
|
|
1224
|
+
});
|
|
1225
|
+
} };
|
|
1226
|
+
(function() {
|
|
1227
|
+
function e(l) {
|
|
1228
|
+
n.asm = l.exports, q = n.asm.D, ze(), Ne = n.asm.M, $e.unshift(n.asm.E), ue--, n.monitorRunDependencies && n.monitorRunDependencies(ue), ue == 0 && fe && (l = fe, fe = null, l());
|
|
1229
|
+
}
|
|
1230
|
+
function t(l) {
|
|
1231
|
+
e(l.instance);
|
|
1232
|
+
}
|
|
1233
|
+
function i(l) {
|
|
1234
|
+
return xt().then(function(u) {
|
|
1235
|
+
return WebAssembly.instantiate(u, s);
|
|
1236
|
+
}).then(function(u) {
|
|
1237
|
+
return u;
|
|
1238
|
+
}).then(l, function(u) {
|
|
1239
|
+
P("failed to asynchronously prepare wasm: " + u), ae(u);
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
var s = { a: It };
|
|
1243
|
+
if (ue++, n.monitorRunDependencies && n.monitorRunDependencies(ue), n.instantiateWasm)
|
|
1244
|
+
try {
|
|
1245
|
+
return n.instantiateWasm(
|
|
1246
|
+
s,
|
|
1247
|
+
e
|
|
1248
|
+
);
|
|
1249
|
+
} catch (l) {
|
|
1250
|
+
return P("Module.instantiateWasm callback failed with error: " + l), !1;
|
|
1251
|
+
}
|
|
1252
|
+
return function() {
|
|
1253
|
+
return O || typeof WebAssembly.instantiateStreaming != "function" || Ye() || $.startsWith("file://") || typeof fetch != "function" ? i(t) : fetch($, { credentials: "same-origin" }).then(function(l) {
|
|
1254
|
+
return WebAssembly.instantiateStreaming(l, s).then(t, function(u) {
|
|
1255
|
+
return P("wasm streaming compile failed: " + u), P("falling back to ArrayBuffer instantiation"), i(t);
|
|
1256
|
+
});
|
|
1257
|
+
});
|
|
1258
|
+
}().catch(a), {};
|
|
1259
|
+
})(), n.___wasm_call_ctors = function() {
|
|
1260
|
+
return (n.___wasm_call_ctors = n.asm.E).apply(null, arguments);
|
|
1261
|
+
};
|
|
1262
|
+
var ot = n._emscripten_bind_VoidPtr___destroy___0 = function() {
|
|
1263
|
+
return (ot = n._emscripten_bind_VoidPtr___destroy___0 = n.asm.F).apply(null, arguments);
|
|
1264
|
+
}, ut = n._emscripten_bind_McObject_updateDisplay_2 = function() {
|
|
1265
|
+
return (ut = n._emscripten_bind_McObject_updateDisplay_2 = n.asm.G).apply(null, arguments);
|
|
1266
|
+
}, at = n._emscripten_bind_McObject_test_0 = function() {
|
|
1267
|
+
return (at = n._emscripten_bind_McObject_test_0 = n.asm.H).apply(null, arguments);
|
|
1268
|
+
}, ct = n._emscripten_bind_McApp_McApp_0 = function() {
|
|
1269
|
+
return (ct = n._emscripten_bind_McApp_McApp_0 = n.asm.I).apply(null, arguments);
|
|
1270
|
+
}, lt = n._emscripten_bind_McApp_Init_0 = function() {
|
|
1271
|
+
return (lt = n._emscripten_bind_McApp_Init_0 = n.asm.J).apply(null, arguments);
|
|
1272
|
+
}, ft = n._emscripten_bind_McApp_CreateMxDraw_3 = function() {
|
|
1273
|
+
return (ft = n._emscripten_bind_McApp_CreateMxDraw_3 = n.asm.K).apply(null, arguments);
|
|
1274
|
+
}, dt = n._emscripten_bind_McApp___destroy___0 = function() {
|
|
1275
|
+
return (dt = n._emscripten_bind_McApp___destroy___0 = n.asm.L).apply(null, arguments);
|
|
1276
|
+
}, pt = n._strlen = function() {
|
|
1277
|
+
return (pt = n._strlen = n.asm.N).apply(null, arguments);
|
|
1278
|
+
};
|
|
1279
|
+
n._malloc = function() {
|
|
1280
|
+
return (n._malloc = n.asm.O).apply(null, arguments);
|
|
1281
|
+
}, n._free = function() {
|
|
1282
|
+
return (n._free = n.asm.P).apply(null, arguments);
|
|
1283
|
+
};
|
|
1284
|
+
var _e;
|
|
1285
|
+
fe = function e() {
|
|
1286
|
+
_e || Ie(), _e || (fe = e);
|
|
1287
|
+
};
|
|
1288
|
+
function Ie() {
|
|
1289
|
+
function e() {
|
|
1290
|
+
if (!_e && (_e = !0, n.calledRun = !0, !H)) {
|
|
1291
|
+
if (be($e), f(n), n.onRuntimeInitialized && n.onRuntimeInitialized(), n.postRun)
|
|
1292
|
+
for (typeof n.postRun == "function" && (n.postRun = [n.postRun]); n.postRun.length; ) {
|
|
1293
|
+
var t = n.postRun.shift();
|
|
1294
|
+
Xe.unshift(t);
|
|
1295
|
+
}
|
|
1296
|
+
be(Xe);
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
if (!(0 < ue)) {
|
|
1300
|
+
if (n.preRun)
|
|
1301
|
+
for (typeof n.preRun == "function" && (n.preRun = [n.preRun]); n.preRun.length; )
|
|
1302
|
+
vt();
|
|
1303
|
+
be(Ge), 0 < ue || (n.setStatus ? (n.setStatus("Running..."), setTimeout(function() {
|
|
1304
|
+
setTimeout(function() {
|
|
1305
|
+
n.setStatus("");
|
|
1306
|
+
}, 1), e();
|
|
1307
|
+
}, 1)) : e());
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
if (n.run = Ie, n.preInit)
|
|
1311
|
+
for (typeof n.preInit == "function" && (n.preInit = [n.preInit]); 0 < n.preInit.length; )
|
|
1312
|
+
n.preInit.pop()();
|
|
1313
|
+
Ie();
|
|
1314
|
+
function G() {
|
|
1315
|
+
}
|
|
1316
|
+
G.prototype = Object.create(G.prototype), G.prototype.constructor = G, G.prototype.T = G, G.W = {}, n.WrapperObject = G;
|
|
1317
|
+
function Pe(e) {
|
|
1318
|
+
return (e || G).W;
|
|
1319
|
+
}
|
|
1320
|
+
n.getCache = Pe;
|
|
1321
|
+
function ve(e, t) {
|
|
1322
|
+
var i = Pe(t), s = i[e];
|
|
1323
|
+
return s || (s = Object.create((t || G).prototype), s.R = e, i[e] = s);
|
|
1324
|
+
}
|
|
1325
|
+
n.wrapPointer = ve, n.castObject = function(e, t) {
|
|
1326
|
+
return ve(e.R, t);
|
|
1327
|
+
}, n.NULL = ve(0), n.destroy = function(e) {
|
|
1328
|
+
if (!e.__destroy__)
|
|
1329
|
+
throw "Error: Cannot destroy object. (Did you create it yourself?)";
|
|
1330
|
+
e.__destroy__(), delete Pe(e.T)[e.R];
|
|
1331
|
+
}, n.compare = function(e, t) {
|
|
1332
|
+
return e.R === t.R;
|
|
1333
|
+
}, n.getPointer = function(e) {
|
|
1334
|
+
return e.R;
|
|
1335
|
+
}, n.getClass = function(e) {
|
|
1336
|
+
return e.T;
|
|
1337
|
+
};
|
|
1338
|
+
var le = 0, xe = 0, Me = 0, Ce = [], Be = 0;
|
|
1339
|
+
function yt() {
|
|
1340
|
+
if (Be) {
|
|
1341
|
+
for (var e = 0; e < Ce.length; e++)
|
|
1342
|
+
n._free(Ce[e]);
|
|
1343
|
+
Ce.length = 0, n._free(le), le = 0, xe += Be, Be = 0;
|
|
1344
|
+
}
|
|
1345
|
+
le || (xe += 128, (le = n._malloc(xe)) || ae(void 0)), Me = 0;
|
|
1346
|
+
}
|
|
1347
|
+
function ht(e, t) {
|
|
1348
|
+
return le || ae(void 0), e = e.length * t.BYTES_PER_ELEMENT, e = e + 7 & -8, Me + e >= xe ? (0 < e || ae(void 0), Be += e, t = n._malloc(e), Ce.push(t)) : (t = le + Me, Me += e), t;
|
|
1349
|
+
}
|
|
1350
|
+
function Et(e, t, i) {
|
|
1351
|
+
switch (i >>>= 0, t.BYTES_PER_ELEMENT) {
|
|
1352
|
+
case 2:
|
|
1353
|
+
i >>>= 1;
|
|
1354
|
+
break;
|
|
1355
|
+
case 4:
|
|
1356
|
+
i >>>= 2;
|
|
1357
|
+
break;
|
|
1358
|
+
case 8:
|
|
1359
|
+
i >>>= 3;
|
|
1360
|
+
}
|
|
1361
|
+
for (var s = 0; s < e.length; s++)
|
|
1362
|
+
t[i + s] = e[s];
|
|
1363
|
+
}
|
|
1364
|
+
function gt(e) {
|
|
1365
|
+
if (typeof e == "object") {
|
|
1366
|
+
var t = ht(e, he);
|
|
1367
|
+
return Et(e, he, t), t;
|
|
1368
|
+
}
|
|
1369
|
+
return e;
|
|
1370
|
+
}
|
|
1371
|
+
function ie() {
|
|
1372
|
+
throw "cannot construct a VoidPtr, no constructor in IDL";
|
|
1373
|
+
}
|
|
1374
|
+
ie.prototype = Object.create(G.prototype), ie.prototype.constructor = ie, ie.prototype.T = ie, ie.W = {}, n.VoidPtr = ie, ie.prototype.__destroy__ = function() {
|
|
1375
|
+
ot(this.R);
|
|
1376
|
+
};
|
|
1377
|
+
function Z() {
|
|
1378
|
+
throw "cannot construct a McObject, no constructor in IDL";
|
|
1379
|
+
}
|
|
1380
|
+
Z.prototype = Object.create(G.prototype), Z.prototype.constructor = Z, Z.prototype.T = Z, Z.W = {}, n.McObject = Z, Z.prototype.updateDisplay = function(e, t) {
|
|
1381
|
+
var i = this.R;
|
|
1382
|
+
return yt(), typeof e == "object" && (e = gt(e)), typeof t == "object" && (t = gt(t)), !!ut(i, e, t);
|
|
1383
|
+
}, Z.prototype.test = Z.prototype.test = function() {
|
|
1384
|
+
at(this.R);
|
|
1385
|
+
};
|
|
1386
|
+
function Q() {
|
|
1387
|
+
this.R = ct(), Pe(Q)[this.R] = this;
|
|
1388
|
+
}
|
|
1389
|
+
return Q.prototype = Object.create(G.prototype), Q.prototype.constructor = Q, Q.prototype.T = Q, Q.W = {}, n.McApp = Q, Q.prototype.Init = function() {
|
|
1390
|
+
lt(this.R);
|
|
1391
|
+
}, Q.prototype.CreateMxDraw = function(e, t, i) {
|
|
1392
|
+
var s = this.R;
|
|
1393
|
+
if (yt(), e && typeof e == "object" && (e = e.R), t && typeof t == "object" && (t = t.R), i && typeof i == "object")
|
|
1394
|
+
i = i.R;
|
|
1395
|
+
else if (typeof i == "string") {
|
|
1396
|
+
i = st(i);
|
|
1397
|
+
var l = ht(i, j);
|
|
1398
|
+
Et(i, j, l), i = l;
|
|
1399
|
+
}
|
|
1400
|
+
return ve(ft(s, e, t, i), Z);
|
|
1401
|
+
}, Q.prototype.__destroy__ = function() {
|
|
1402
|
+
dt(this.R);
|
|
1403
|
+
}, o.ready;
|
|
1404
|
+
};
|
|
1405
|
+
})();
|
|
1406
|
+
typeof exports == "object" && typeof module == "object" ? module.exports = Fe : typeof define == "function" && define.amd ? define([], function() {
|
|
1407
|
+
return Fe;
|
|
1408
|
+
}) : typeof exports == "object" && (exports.mxdrawassembly = Fe);
|
|
1409
|
+
const Pt = (r, o) => new URL(r, o || self.location.href).toString();
|
|
1410
|
+
let ke;
|
|
1411
|
+
function Ut(r, o = Pt) {
|
|
1412
|
+
Fe({
|
|
1413
|
+
locateFile: o
|
|
1414
|
+
}).then((n) => {
|
|
1415
|
+
let f = new n.McApp();
|
|
1416
|
+
f.Init(), ke = n, ke.McApp = f, r(ke);
|
|
1417
|
+
});
|
|
1418
|
+
}
|
|
1419
|
+
const cn = {
|
|
1420
|
+
loadMxdrawassembly: Ut,
|
|
1421
|
+
getWasmURL: Pt
|
|
1422
|
+
};
|
|
1423
|
+
export {
|
|
1424
|
+
ke as MxCpp,
|
|
1425
|
+
_t as MxTools,
|
|
1426
|
+
zt as b64Decode,
|
|
1427
|
+
Ht as b64Encode,
|
|
1428
|
+
cn as default,
|
|
1429
|
+
un as drawArc,
|
|
1430
|
+
$t as drawCircle,
|
|
1431
|
+
an as drawEllipticalArc,
|
|
1432
|
+
Xt as drawLine,
|
|
1433
|
+
rn as drawMText,
|
|
1434
|
+
sn as drawPolyLine,
|
|
1435
|
+
on as drawPolygon,
|
|
1436
|
+
nn as drawText,
|
|
1437
|
+
qt as fetchAndInstantiate,
|
|
1438
|
+
en as fetchFile,
|
|
1439
|
+
Ut as loadMxdrawassembly,
|
|
1440
|
+
Vt as readFromBlobOrFile,
|
|
1441
|
+
Nt as setMcDbEntity,
|
|
1442
|
+
tn as toBlobURL
|
|
1443
|
+
};
|