mxcad 1.0.4 → 1.0.5

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