mxdraw 0.1.2 → 0.1.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.
Files changed (65) hide show
  1. package/dist/lib/MxModule/McGeVector3d/McGeVector3d.js +2 -0
  2. package/dist/lib/MxModule/McGeVector3d/index.js +3 -0
  3. package/dist/lib/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.js +213 -0
  4. package/dist/lib/MxModule/MxDbAlignedDimension/index.js +5 -0
  5. package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +45 -19
  6. package/dist/lib/MxModule/MxDbImage/MxDbImage.js +147 -0
  7. package/dist/lib/MxModule/MxDbImage/index.js +5 -0
  8. package/dist/lib/MxModule/MxDbLine/MxDbLine.js +94 -0
  9. package/dist/lib/MxModule/MxDbLine/index.js +5 -0
  10. package/dist/lib/MxModule/MxDbRect/MxDbRect.js +219 -0
  11. package/dist/lib/MxModule/MxDbRect/index.js +4 -0
  12. package/dist/lib/MxModule/MxDbSVG/MxDbSVG.js +208 -0
  13. package/dist/lib/MxModule/MxDbSVG/index.js +5 -0
  14. package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js +41 -44
  15. package/dist/lib/MxModule/MxFilters/MxFilters.js +201 -0
  16. package/dist/lib/MxModule/MxFilters/index.js +4 -0
  17. package/dist/lib/MxModule/MxFun/MxFun.js +70 -30
  18. package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js +6 -1
  19. package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.js +3 -3
  20. package/dist/lib/MxModule/MxThreeJS/SVGLoader.js +4 -4
  21. package/dist/lib/MxModule/Mxassembly/Mxassembly.js +18 -0
  22. package/dist/lib/MxModule/Mxassembly/index.js +9 -0
  23. package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js +16 -0
  24. package/dist/lib/MxModule/loadCoreCode/mxcadassembly_es5.js +1519 -0
  25. package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +101 -92
  26. package/dist/lib/MxModule/store/store.js +1 -0
  27. package/dist/lib/doc.js +11 -1
  28. package/dist/lib/mxdraw.js +26 -6
  29. package/dist/lib/tools/three/index.js +100 -3
  30. package/dist/lib/types/Mxassembly.js +2 -0
  31. package/dist/mxdraw.es5.js +3 -3
  32. package/dist/mxdraw.es5.js.map +1 -1
  33. package/dist/mxdraw.umd.js +3 -3
  34. package/dist/mxdraw.umd.js.map +1 -1
  35. package/dist/types/MxModule/McGeVector3d/McGeVector3d.d.ts +17 -0
  36. package/dist/types/MxModule/McGeVector3d/index.d.ts +3 -0
  37. package/dist/types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts +61 -65
  38. package/dist/types/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.d.ts +21 -0
  39. package/dist/types/MxModule/MxDbAlignedDimension/index.d.ts +3 -0
  40. package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +47 -26
  41. package/dist/types/MxModule/MxDbImage/MxDbImage.d.ts +28 -0
  42. package/dist/types/MxModule/MxDbImage/index.d.ts +3 -0
  43. package/dist/types/MxModule/MxDbLine/MxDbLine.d.ts +22 -0
  44. package/dist/types/MxModule/MxDbLine/index.d.ts +3 -0
  45. package/dist/types/MxModule/MxDbRect/MxDbRect.d.ts +74 -0
  46. package/dist/types/MxModule/MxDbRect/index.d.ts +2 -0
  47. package/dist/types/MxModule/MxDbSVG/MxDbSVG.d.ts +42 -0
  48. package/dist/types/MxModule/MxDbSVG/index.d.ts +3 -0
  49. package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +38 -39
  50. package/dist/types/MxModule/MxFilters/MxFilters.d.ts +94 -0
  51. package/dist/types/MxModule/MxFilters/index.d.ts +2 -0
  52. package/dist/types/MxModule/MxFun/MxFun.d.ts +59 -27
  53. package/dist/types/MxModule/MxThreeJS/MxThreeJS.d.ts +2 -2
  54. package/dist/types/MxModule/MxType/index.d.ts +1 -1
  55. package/dist/types/MxModule/Mxassembly/Mxassembly.d.ts +11 -0
  56. package/dist/types/MxModule/Mxassembly/index.d.ts +3 -0
  57. package/dist/types/MxModule/loadCoreCode/mxcadassembly_es5.d.ts +1 -0
  58. package/dist/types/MxModule/store/store.d.ts +2 -0
  59. package/dist/types/doc.d.ts +6 -1
  60. package/dist/types/mxdraw.d.ts +18 -4
  61. package/dist/types/tools/three/index.d.ts +20 -1
  62. package/dist/types/types/MxDrawObject.d.ts +2 -2
  63. package/dist/types/types/MxFun.d.ts +8 -5
  64. package/dist/types/types/Mxassembly.d.ts +3 -0
  65. package/package.json +3 -3
@@ -0,0 +1,1519 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function mxcadassemblyinit() {
4
+ var mxcadassembly = (function () {
5
+ var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
6
+ if (typeof __filename !== 'undefined')
7
+ _scriptDir = _scriptDir || __filename;
8
+ return (function (mxcadassembly) {
9
+ mxcadassembly = mxcadassembly || {};
10
+ var b;
11
+ b || (b = typeof mxcadassembly !== 'undefined' ? mxcadassembly : {});
12
+ var g, k;
13
+ b.ready = new Promise(function (a, c) { g = a; k = c; });
14
+ var l = Object.assign({}, b), m = "object" == typeof window, n = "function" == typeof importScripts, p = "object" == typeof process && "object" == typeof process.versions && "string" == typeof process.versions.node, q = "", r, t, u, fs, v, w;
15
+ if (p)
16
+ q = n ? require("path").dirname(q) + "/" : __dirname + "/", w = function () { v || (fs = require("fs"), v = require("path")); }, r = function (a, c) { var d = x(a); if (d)
17
+ return c ? d : d.toString(); w(); a = v.normalize(a); return fs.readFileSync(a, c ? void 0 : "utf8"); }, u = function (a) { a = r(a, !0); a.buffer || (a = new Uint8Array(a)); return a; }, t = function (a, c, d) { var e = x(a); e && c(e); w(); a = v.normalize(a); fs.readFile(a, function (f, h) { f ? d(f) : c(h.buffer); }); }, 1 < process.argv.length && process.argv[1].replace(/\\/g, "/"), process.argv.slice(2), process.on("uncaughtException", function (a) {
18
+ throw a;
19
+ }), process.on("unhandledRejection", function (a) { throw a; }), b.inspect = function () { return "[Emscripten Module object]"; };
20
+ else if (m || n)
21
+ n ? q = self.location.href : "undefined" != typeof document && document.currentScript && (q = document.currentScript.src), _scriptDir && (q = _scriptDir), q = 0 !== q.indexOf("blob:") ? q.substr(0, q.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", r = function (a) {
22
+ try {
23
+ var c = new XMLHttpRequest;
24
+ c.open("GET", a, !1);
25
+ c.send(null);
26
+ return c.responseText;
27
+ }
28
+ catch (f) {
29
+ if (a = x(a)) {
30
+ c = [];
31
+ for (var d = 0; d < a.length; d++) {
32
+ var e = a[d];
33
+ 255 <
34
+ e && (aa && y("Character code " + e + " (" + String.fromCharCode(e) + ") at offset " + d + " not in 0x00-0xFF."), e &= 255);
35
+ c.push(String.fromCharCode(e));
36
+ }
37
+ return c.join("");
38
+ }
39
+ throw f;
40
+ }
41
+ }, n && (u = function (a) { try {
42
+ var c = new XMLHttpRequest;
43
+ c.open("GET", a, !1);
44
+ c.responseType = "arraybuffer";
45
+ c.send(null);
46
+ return new Uint8Array(c.response);
47
+ }
48
+ catch (d) {
49
+ if (a = x(a))
50
+ return a;
51
+ throw d;
52
+ } }), t = function (a, c, d) {
53
+ var e = new XMLHttpRequest;
54
+ e.open("GET", a, !0);
55
+ e.responseType = "arraybuffer";
56
+ e.onload = function () {
57
+ if (200 == e.status || 0 == e.status && e.response)
58
+ c(e.response);
59
+ else {
60
+ var f = x(a);
61
+ f ? c(f.buffer) : d();
62
+ }
63
+ };
64
+ e.onerror = d;
65
+ e.send(null);
66
+ };
67
+ b.print || console.log.bind(console);
68
+ var z = b.printErr || console.warn.bind(console);
69
+ Object.assign(b, l);
70
+ l = null;
71
+ var A;
72
+ b.wasmBinary && (A = b.wasmBinary);
73
+ var noExitRuntime = b.noExitRuntime || !0;
74
+ function ba() { this.buffer = new ArrayBuffer(B / 65536 * 65536); }
75
+ function da() {
76
+ this.exports = (
77
+ // EMSCRIPTEN_START_ASM
78
+ function instantiate(X) {
79
+ function e(f) { f.grow = function (b) { var a = this.length; this.length = this.length + b; return a; }; f.set = function (c, d) { this[c] = d; }; f.get = function (c) { return this[c]; }; return f; }
80
+ var g;
81
+ var h = new Uint8Array(123);
82
+ for (var c = 25; c >= 0; --c) {
83
+ h[48 + c] = 52 + c;
84
+ h[65 + c] = c;
85
+ h[97 + c] = 26 + c;
86
+ }
87
+ h[43] = 62;
88
+ h[47] = 63;
89
+ function n(o, p, q) { var i, j, c = 0, k = p, l = q.length, m = p + (l * 3 >> 2) - (q[l - 2] == "=") - (q[l - 1] == "="); for (; c < l; c += 4) {
90
+ i = h[q.charCodeAt(c + 1)];
91
+ j = h[q.charCodeAt(c + 2)];
92
+ o[k++] = h[q.charCodeAt(c)] << 2 | i >> 4;
93
+ if (k < m)
94
+ o[k++] = i << 4 | j >> 2;
95
+ if (k < m)
96
+ o[k++] = j << 6 | h[q.charCodeAt(c + 3)];
97
+ } }
98
+ function r(s) { n(g, 1024, "YAZQ"); }
99
+ function V(W) {
100
+ var t = W.a;
101
+ var u = t.buffer;
102
+ var v = new Int8Array(u);
103
+ var w = new Int16Array(u);
104
+ var x = new Int32Array(u);
105
+ var y = new Uint8Array(u);
106
+ var z = new Uint16Array(u);
107
+ var A = new Uint32Array(u);
108
+ var B = new Float32Array(u);
109
+ var C = new Float64Array(u);
110
+ var D = Math.imul;
111
+ var E = Math.fround;
112
+ var F = Math.abs;
113
+ var G = Math.clz32;
114
+ var H = Math.min;
115
+ var I = Math.max;
116
+ var J = Math.floor;
117
+ var K = Math.ceil;
118
+ var L = Math.trunc;
119
+ var M = Math.sqrt;
120
+ var N = W.abort;
121
+ var O = NaN;
122
+ var P = Infinity;
123
+ var Q = W.b;
124
+ var R = W.c;
125
+ var S = 5244512;
126
+ // EMSCRIPTEN_START_FUNCS
127
+ function Z() { var a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0, k = 0; a: {
128
+ while (1) {
129
+ k = S - 16 | 0;
130
+ S = k;
131
+ e = x[283];
132
+ a = e >>> 2 | 0;
133
+ b: {
134
+ if (a & 3) {
135
+ c = ((a ^ -1) & 1) + 2 | 0;
136
+ f = c << 3;
137
+ b = x[f + 1180 >> 2];
138
+ a = b + 8 | 0;
139
+ d = x[b + 8 >> 2];
140
+ f = f + 1172 | 0;
141
+ c: {
142
+ if ((d | 0) == (f | 0)) {
143
+ x[283] = ea(c) & e;
144
+ break c;
145
+ }
146
+ x[d + 12 >> 2] = f;
147
+ x[f + 8 >> 2] = d;
148
+ }
149
+ c = c << 3;
150
+ x[b + 4 >> 2] = c | 3;
151
+ b = b + c | 0;
152
+ x[b + 4 >> 2] = x[b + 4 >> 2] | 1;
153
+ break b;
154
+ }
155
+ d: {
156
+ e: {
157
+ f: {
158
+ g: {
159
+ h: {
160
+ i: {
161
+ j: {
162
+ k: {
163
+ h = x[285];
164
+ if (h >>> 0 >= 16) {
165
+ break k;
166
+ }
167
+ if (a) {
168
+ a = a << 2 & -8;
169
+ a = (0 - a & a) - 1 | 0;
170
+ b = a >>> 12 & 16;
171
+ c = b;
172
+ a = a >>> b | 0;
173
+ b = a >>> 5 & 8;
174
+ c = c | b;
175
+ a = a >>> b | 0;
176
+ b = a >>> 2 & 4;
177
+ c = c | b;
178
+ a = a >>> b | 0;
179
+ b = a >>> 1 & 2;
180
+ c = c | b;
181
+ a = a >>> b | 0;
182
+ b = a >>> 1 & 1;
183
+ c = (c | b) + (a >>> b | 0) | 0;
184
+ d = c << 3;
185
+ b = x[d + 1180 >> 2];
186
+ a = x[b + 8 >> 2];
187
+ d = d + 1172 | 0;
188
+ l: {
189
+ if ((a | 0) == (d | 0)) {
190
+ e = ea(c) & e;
191
+ x[283] = e;
192
+ break l;
193
+ }
194
+ x[a + 12 >> 2] = d;
195
+ x[d + 8 >> 2] = a;
196
+ }
197
+ a = b + 8 | 0;
198
+ x[b + 4 >> 2] = 19;
199
+ g = b + 16 | 0;
200
+ c = c << 3;
201
+ f = c - 16 | 0;
202
+ x[g + 4 >> 2] = f | 1;
203
+ x[b + c >> 2] = f;
204
+ if (h) {
205
+ c = h >>> 3 | 0;
206
+ b = (c << 3) + 1172 | 0;
207
+ d = x[288];
208
+ c = 1 << c;
209
+ m: {
210
+ if (!(c & e)) {
211
+ x[283] = c | e;
212
+ c = b;
213
+ break m;
214
+ }
215
+ c = x[b + 8 >> 2];
216
+ }
217
+ x[b + 8 >> 2] = d;
218
+ x[c + 12 >> 2] = d;
219
+ x[d + 12 >> 2] = b;
220
+ x[d + 8 >> 2] = c;
221
+ }
222
+ x[288] = g;
223
+ x[285] = f;
224
+ break b;
225
+ }
226
+ j = x[284];
227
+ if (!j) {
228
+ break k;
229
+ }
230
+ a = (j & 0 - j) - 1 | 0;
231
+ b = a >>> 12 & 16;
232
+ c = b;
233
+ a = a >>> b | 0;
234
+ b = a >>> 5 & 8;
235
+ c = c | b;
236
+ a = a >>> b | 0;
237
+ b = a >>> 2 & 4;
238
+ c = c | b;
239
+ a = a >>> b | 0;
240
+ b = a >>> 1 & 2;
241
+ c = c | b;
242
+ a = a >>> b | 0;
243
+ b = a >>> 1 & 1;
244
+ b = x[((c | b) + (a >>> b | 0) << 2) + 1436 >> 2];
245
+ f = (x[b + 4 >> 2] & -8) - 16 | 0;
246
+ c = b;
247
+ while (1) {
248
+ n: {
249
+ a = x[c + 16 >> 2];
250
+ if (!a) {
251
+ a = x[c + 20 >> 2];
252
+ if (!a) {
253
+ break n;
254
+ }
255
+ }
256
+ d = (x[a + 4 >> 2] & -8) - 16 | 0;
257
+ c = d >>> 0 < f >>> 0;
258
+ f = c ? d : f;
259
+ b = c ? a : b;
260
+ c = a;
261
+ continue;
262
+ }
263
+ break;
264
+ }
265
+ i = x[b + 24 >> 2];
266
+ d = x[b + 12 >> 2];
267
+ if ((d | 0) != (b | 0)) {
268
+ a = x[b + 8 >> 2];
269
+ x[a + 12 >> 2] = d;
270
+ x[d + 8 >> 2] = a;
271
+ break d;
272
+ }
273
+ c = b + 20 | 0;
274
+ a = x[c >> 2];
275
+ if (!a) {
276
+ a = x[b + 16 >> 2];
277
+ if (!a) {
278
+ break j;
279
+ }
280
+ c = b + 16 | 0;
281
+ }
282
+ while (1) {
283
+ g = c;
284
+ d = a;
285
+ c = a + 20 | 0;
286
+ a = x[c >> 2];
287
+ if (a) {
288
+ continue;
289
+ }
290
+ c = d + 16 | 0;
291
+ a = x[d + 16 >> 2];
292
+ if (a) {
293
+ continue;
294
+ }
295
+ break;
296
+ }
297
+ x[g >> 2] = 0;
298
+ break d;
299
+ }
300
+ b = x[285];
301
+ if (b >>> 0 >= 16) {
302
+ a = x[288];
303
+ c = b - 16 | 0;
304
+ o: {
305
+ if (c >>> 0 >= 16) {
306
+ x[285] = c;
307
+ x[288] = a + 16;
308
+ x[a + 20 >> 2] = c | 1;
309
+ x[a + b >> 2] = c;
310
+ x[a + 4 >> 2] = 19;
311
+ break o;
312
+ }
313
+ x[288] = 0;
314
+ x[285] = 0;
315
+ x[a + 4 >> 2] = b | 3;
316
+ b = a + b | 0;
317
+ x[b + 4 >> 2] = x[b + 4 >> 2] | 1;
318
+ }
319
+ a = a + 8 | 0;
320
+ break b;
321
+ }
322
+ e = x[286];
323
+ if (e >>> 0 > 16) {
324
+ b = e - 16 | 0;
325
+ x[286] = b;
326
+ a = x[289];
327
+ x[289] = a + 16;
328
+ x[a + 20 >> 2] = b | 1;
329
+ x[a + 4 >> 2] = 19;
330
+ a = a + 8 | 0;
331
+ break b;
332
+ }
333
+ a = 0;
334
+ if (x[401]) {
335
+ b = x[403];
336
+ }
337
+ else {
338
+ x[404] = -1;
339
+ x[405] = -1;
340
+ x[402] = 4096;
341
+ x[403] = 4096;
342
+ x[401] = k + 12 & -16 ^ 1431655768;
343
+ x[406] = 0;
344
+ x[394] = 0;
345
+ b = 4096;
346
+ }
347
+ d = b + 63 | 0;
348
+ f = 0 - b | 0;
349
+ c = d & f;
350
+ if (c >>> 0 <= 16) {
351
+ break b;
352
+ }
353
+ g = x[393];
354
+ if (g) {
355
+ h = x[391];
356
+ b = h + c | 0;
357
+ if (b >>> 0 <= h >>> 0 | b >>> 0 > g >>> 0) {
358
+ break b;
359
+ }
360
+ }
361
+ if (y[1576] & 4) {
362
+ break g;
363
+ }
364
+ p: {
365
+ q: {
366
+ b = x[289];
367
+ if (b) {
368
+ a = 1580;
369
+ while (1) {
370
+ g = x[a >> 2];
371
+ if (g >>> 0 <= b >>> 0 & b >>> 0 < g + x[a + 4 >> 2] >>> 0) {
372
+ break q;
373
+ }
374
+ a = x[a + 8 >> 2];
375
+ if (a) {
376
+ continue;
377
+ }
378
+ break;
379
+ }
380
+ }
381
+ b = Y(0);
382
+ if ((b | 0) == -1) {
383
+ break h;
384
+ }
385
+ e = c;
386
+ a = x[402];
387
+ d = a - 1 | 0;
388
+ if (d & b) {
389
+ e = (c - b | 0) + (b + d & 0 - a) | 0;
390
+ }
391
+ if (e >>> 0 <= 16 | e >>> 0 > 2147483646) {
392
+ break h;
393
+ }
394
+ d = x[393];
395
+ if (d) {
396
+ f = x[391];
397
+ a = f + e | 0;
398
+ if (a >>> 0 <= f >>> 0 | a >>> 0 > d >>> 0) {
399
+ break h;
400
+ }
401
+ }
402
+ a = Y(e);
403
+ if ((a | 0) != (b | 0)) {
404
+ break p;
405
+ }
406
+ break f;
407
+ }
408
+ e = f & d - e;
409
+ if (e >>> 0 > 2147483646) {
410
+ break h;
411
+ }
412
+ b = Y(e);
413
+ if ((b | 0) == (x[a >> 2] + x[a + 4 >> 2] | 0)) {
414
+ break i;
415
+ }
416
+ a = b;
417
+ }
418
+ if (!((a | 0) == -1 | e >>> 0 >= 64)) {
419
+ b = x[403];
420
+ b = b + (63 - e | 0) & 0 - b;
421
+ if (b >>> 0 > 2147483646) {
422
+ b = a;
423
+ break f;
424
+ }
425
+ if ((Y(b) | 0) != -1) {
426
+ e = b + e | 0;
427
+ b = a;
428
+ break f;
429
+ }
430
+ Y(0 - e | 0);
431
+ break h;
432
+ }
433
+ b = a;
434
+ if ((a | 0) != -1) {
435
+ break f;
436
+ }
437
+ break h;
438
+ }
439
+ d = 0;
440
+ break d;
441
+ }
442
+ if ((b | 0) != -1) {
443
+ break f;
444
+ }
445
+ }
446
+ x[394] = x[394] | 4;
447
+ }
448
+ if (c >>> 0 > 2147483646) {
449
+ break e;
450
+ }
451
+ b = Y(c);
452
+ a = Y(0);
453
+ if ((b | 0) == -1 | (a | 0) == -1 | a >>> 0 <= b >>> 0) {
454
+ break e;
455
+ }
456
+ e = a - b | 0;
457
+ if (e >>> 0 <= 56) {
458
+ break e;
459
+ }
460
+ }
461
+ a = x[391] + e | 0;
462
+ x[391] = a;
463
+ if (a >>> 0 > A[392]) {
464
+ x[392] = a;
465
+ }
466
+ r: {
467
+ s: {
468
+ t: {
469
+ f = x[289];
470
+ if (f) {
471
+ a = 1580;
472
+ while (1) {
473
+ c = x[a >> 2];
474
+ d = x[a + 4 >> 2];
475
+ if ((c + d | 0) == (b | 0)) {
476
+ break t;
477
+ }
478
+ a = x[a + 8 >> 2];
479
+ if (a) {
480
+ continue;
481
+ }
482
+ break;
483
+ }
484
+ break s;
485
+ }
486
+ a = x[287];
487
+ if (!(a >>> 0 <= b >>> 0 ? a : 0)) {
488
+ x[287] = b;
489
+ }
490
+ a = 0;
491
+ x[396] = e;
492
+ x[395] = b;
493
+ x[291] = -1;
494
+ x[292] = x[401];
495
+ x[398] = 0;
496
+ while (1) {
497
+ c = a << 3;
498
+ d = c + 1172 | 0;
499
+ x[c + 1180 >> 2] = d;
500
+ x[c + 1184 >> 2] = d;
501
+ a = a + 1 | 0;
502
+ if ((a | 0) != 32) {
503
+ continue;
504
+ }
505
+ break;
506
+ }
507
+ a = e - 40 | 0;
508
+ c = b + 8 & 7 ? -8 - b & 7 : 0;
509
+ e = a - c | 0;
510
+ x[286] = e;
511
+ c = b + c | 0;
512
+ x[289] = c;
513
+ x[c + 4 >> 2] = e | 1;
514
+ x[(a + b | 0) + 4 >> 2] = 40;
515
+ x[290] = x[405];
516
+ break r;
517
+ }
518
+ if (y[a + 12 | 0] & 8 | c >>> 0 > f >>> 0 | b >>> 0 <= f >>> 0) {
519
+ break s;
520
+ }
521
+ x[a + 4 >> 2] = d + e;
522
+ a = f + 8 & 7 ? -8 - f & 7 : 0;
523
+ b = a + f | 0;
524
+ x[289] = b;
525
+ c = x[286] + e | 0;
526
+ a = c - a | 0;
527
+ x[286] = a;
528
+ x[b + 4 >> 2] = a | 1;
529
+ x[(c + f | 0) + 4 >> 2] = 40;
530
+ x[290] = x[405];
531
+ break r;
532
+ }
533
+ if (A[287] > b >>> 0) {
534
+ x[287] = b;
535
+ }
536
+ c = b + e | 0;
537
+ a = 1580;
538
+ u: {
539
+ v: {
540
+ w: {
541
+ x: {
542
+ y: {
543
+ z: {
544
+ while (1) {
545
+ if ((c | 0) != x[a >> 2]) {
546
+ a = x[a + 8 >> 2];
547
+ if (a) {
548
+ continue;
549
+ }
550
+ break z;
551
+ }
552
+ break;
553
+ }
554
+ if (!(y[a + 12 | 0] & 8)) {
555
+ break y;
556
+ }
557
+ }
558
+ a = 1580;
559
+ while (1) {
560
+ c = x[a >> 2];
561
+ if (c >>> 0 <= f >>> 0) {
562
+ d = c + x[a + 4 >> 2] | 0;
563
+ if (d >>> 0 > f >>> 0) {
564
+ break x;
565
+ }
566
+ }
567
+ a = x[a + 8 >> 2];
568
+ continue;
569
+ }
570
+ }
571
+ x[a >> 2] = b;
572
+ x[a + 4 >> 2] = x[a + 4 >> 2] + e;
573
+ i = (b + 8 & 7 ? -8 - b & 7 : 0) + b | 0;
574
+ x[i + 4 >> 2] = 19;
575
+ e = c + (c + 8 & 7 ? -8 - c & 7 : 0) | 0;
576
+ g = i + 16 | 0;
577
+ d = e - g | 0;
578
+ if ((e | 0) == (f | 0)) {
579
+ x[289] = g;
580
+ a = x[286] + d | 0;
581
+ x[286] = a;
582
+ x[g + 4 >> 2] = a | 1;
583
+ break v;
584
+ }
585
+ if (x[288] == (e | 0)) {
586
+ x[288] = g;
587
+ a = x[285] + d | 0;
588
+ x[285] = a;
589
+ x[g + 4 >> 2] = a | 1;
590
+ x[a + g >> 2] = a;
591
+ break v;
592
+ }
593
+ a = x[e + 4 >> 2];
594
+ if ((a & 3) == 1) {
595
+ j = a & -8;
596
+ A: {
597
+ if (a >>> 0 <= 255) {
598
+ c = a >>> 3 | 0;
599
+ a = x[e + 8 >> 2];
600
+ b = x[e + 12 >> 2];
601
+ if ((b | 0) == (a | 0)) {
602
+ x[283] = x[283] & ea(c);
603
+ break A;
604
+ }
605
+ x[a + 12 >> 2] = b;
606
+ x[b + 8 >> 2] = a;
607
+ break A;
608
+ }
609
+ h = x[e + 24 >> 2];
610
+ b = x[e + 12 >> 2];
611
+ B: {
612
+ if ((e | 0) != (b | 0)) {
613
+ a = x[e + 8 >> 2];
614
+ x[a + 12 >> 2] = b;
615
+ x[b + 8 >> 2] = a;
616
+ break B;
617
+ }
618
+ C: {
619
+ a = e + 20 | 0;
620
+ f = x[a >> 2];
621
+ if (f) {
622
+ break C;
623
+ }
624
+ a = e + 16 | 0;
625
+ f = x[a >> 2];
626
+ if (f) {
627
+ break C;
628
+ }
629
+ b = 0;
630
+ break B;
631
+ }
632
+ while (1) {
633
+ c = a;
634
+ b = f;
635
+ a = b + 20 | 0;
636
+ f = x[a >> 2];
637
+ if (f) {
638
+ continue;
639
+ }
640
+ a = b + 16 | 0;
641
+ f = x[b + 16 >> 2];
642
+ if (f) {
643
+ continue;
644
+ }
645
+ break;
646
+ }
647
+ x[c >> 2] = 0;
648
+ }
649
+ if (!h) {
650
+ break A;
651
+ }
652
+ a = x[e + 28 >> 2];
653
+ c = (a << 2) + 1436 | 0;
654
+ D: {
655
+ if (x[c >> 2] == (e | 0)) {
656
+ x[c >> 2] = b;
657
+ if (b) {
658
+ break D;
659
+ }
660
+ x[284] = x[284] & ea(a);
661
+ break A;
662
+ }
663
+ x[h + (x[h + 16 >> 2] == (e | 0) ? 16 : 20) >> 2] = b;
664
+ if (!b) {
665
+ break A;
666
+ }
667
+ }
668
+ x[b + 24 >> 2] = h;
669
+ a = x[e + 16 >> 2];
670
+ if (a) {
671
+ x[b + 16 >> 2] = a;
672
+ x[a + 24 >> 2] = b;
673
+ }
674
+ a = x[e + 20 >> 2];
675
+ if (!a) {
676
+ break A;
677
+ }
678
+ x[b + 20 >> 2] = a;
679
+ x[a + 24 >> 2] = b;
680
+ }
681
+ d = d + j | 0;
682
+ e = e + j | 0;
683
+ }
684
+ x[e + 4 >> 2] = x[e + 4 >> 2] & -2;
685
+ x[g + 4 >> 2] = d | 1;
686
+ x[d + g >> 2] = d;
687
+ if (d >>> 0 <= 255) {
688
+ b = d >>> 3 | 0;
689
+ a = (b << 3) + 1172 | 0;
690
+ c = x[283];
691
+ b = 1 << b;
692
+ E: {
693
+ if (!(c & b)) {
694
+ x[283] = b | c;
695
+ b = a;
696
+ break E;
697
+ }
698
+ b = x[a + 8 >> 2];
699
+ }
700
+ x[a + 8 >> 2] = g;
701
+ x[b + 12 >> 2] = g;
702
+ x[g + 12 >> 2] = a;
703
+ x[g + 8 >> 2] = b;
704
+ break v;
705
+ }
706
+ a = 31;
707
+ if (d >>> 0 <= 16777215) {
708
+ b = d >>> 8 | 0;
709
+ a = b + 1048320 >>> 16 & 8;
710
+ c = b << a;
711
+ b = c + 520192 >>> 16 & 4;
712
+ e = c << b;
713
+ c = e + 245760 >>> 16 & 2;
714
+ a = (e << c >>> 15 | 0) - (c | (a | b)) | 0;
715
+ a = (a << 1 | d >>> a + 21 & 1) + 28 | 0;
716
+ }
717
+ x[g + 28 >> 2] = a;
718
+ x[g + 16 >> 2] = 0;
719
+ x[g + 20 >> 2] = 0;
720
+ b = (a << 2) + 1436 | 0;
721
+ c = x[284];
722
+ e = 1 << a;
723
+ F: {
724
+ if (!(c & e)) {
725
+ x[284] = c | e;
726
+ x[b >> 2] = g;
727
+ x[g + 24 >> 2] = b;
728
+ break F;
729
+ }
730
+ a = d << ((a | 0) == 31 ? 0 : 25 - (a >>> 1 | 0) | 0);
731
+ b = x[b >> 2];
732
+ while (1) {
733
+ c = b;
734
+ if ((x[b + 4 >> 2] & -8) == (d | 0)) {
735
+ break w;
736
+ }
737
+ b = a >>> 29 | 0;
738
+ a = a << 1;
739
+ e = c + (b & 4) | 0;
740
+ b = x[e + 16 >> 2];
741
+ if (b) {
742
+ continue;
743
+ }
744
+ break;
745
+ }
746
+ x[e + 16 >> 2] = g;
747
+ x[g + 24 >> 2] = c;
748
+ }
749
+ x[g + 12 >> 2] = g;
750
+ x[g + 8 >> 2] = g;
751
+ break v;
752
+ }
753
+ a = e - 40 | 0;
754
+ c = b + 8 & 7 ? -8 - b & 7 : 0;
755
+ g = a - c | 0;
756
+ x[286] = g;
757
+ c = b + c | 0;
758
+ x[289] = c;
759
+ x[c + 4 >> 2] = g | 1;
760
+ x[(a + b | 0) + 4 >> 2] = 40;
761
+ x[290] = x[405];
762
+ a = (d + (d - 39 & 7 ? 39 - d & 7 : 0) | 0) - 47 | 0;
763
+ c = a >>> 0 < f + 16 >>> 0 ? f : a;
764
+ x[c + 4 >> 2] = 27;
765
+ a = x[398];
766
+ x[c + 16 >> 2] = x[397];
767
+ x[c + 20 >> 2] = a;
768
+ a = x[396];
769
+ x[c + 8 >> 2] = x[395];
770
+ x[c + 12 >> 2] = a;
771
+ x[397] = c + 8;
772
+ x[396] = e;
773
+ x[395] = b;
774
+ x[398] = 0;
775
+ a = c + 24 | 0;
776
+ while (1) {
777
+ x[a + 4 >> 2] = 7;
778
+ b = a + 8 | 0;
779
+ a = a + 4 | 0;
780
+ if (b >>> 0 < d >>> 0) {
781
+ continue;
782
+ }
783
+ break;
784
+ }
785
+ if ((c | 0) == (f | 0)) {
786
+ break r;
787
+ }
788
+ x[c + 4 >> 2] = x[c + 4 >> 2] & -2;
789
+ e = c - f | 0;
790
+ x[f + 4 >> 2] = e | 1;
791
+ x[c >> 2] = e;
792
+ if (e >>> 0 <= 255) {
793
+ b = e >>> 3 | 0;
794
+ a = (b << 3) + 1172 | 0;
795
+ c = x[283];
796
+ b = 1 << b;
797
+ G: {
798
+ if (!(c & b)) {
799
+ x[283] = b | c;
800
+ b = a;
801
+ break G;
802
+ }
803
+ b = x[a + 8 >> 2];
804
+ }
805
+ x[a + 8 >> 2] = f;
806
+ x[b + 12 >> 2] = f;
807
+ x[f + 12 >> 2] = a;
808
+ x[f + 8 >> 2] = b;
809
+ break r;
810
+ }
811
+ a = 31;
812
+ x[f + 16 >> 2] = 0;
813
+ x[f + 20 >> 2] = 0;
814
+ if (e >>> 0 <= 16777215) {
815
+ b = e >>> 8 | 0;
816
+ a = b + 1048320 >>> 16 & 8;
817
+ c = b << a;
818
+ b = c + 520192 >>> 16 & 4;
819
+ d = c << b;
820
+ c = d + 245760 >>> 16 & 2;
821
+ a = (d << c >>> 15 | 0) - (c | (a | b)) | 0;
822
+ a = (a << 1 | e >>> a + 21 & 1) + 28 | 0;
823
+ }
824
+ x[f + 28 >> 2] = a;
825
+ b = (a << 2) + 1436 | 0;
826
+ c = x[284];
827
+ d = 1 << a;
828
+ H: {
829
+ if (!(c & d)) {
830
+ x[284] = c | d;
831
+ x[b >> 2] = f;
832
+ x[f + 24 >> 2] = b;
833
+ break H;
834
+ }
835
+ a = e << ((a | 0) == 31 ? 0 : 25 - (a >>> 1 | 0) | 0);
836
+ b = x[b >> 2];
837
+ while (1) {
838
+ c = b;
839
+ if ((e | 0) == (x[b + 4 >> 2] & -8)) {
840
+ break u;
841
+ }
842
+ b = a >>> 29 | 0;
843
+ a = a << 1;
844
+ d = c + (b & 4) | 0;
845
+ b = x[d + 16 >> 2];
846
+ if (b) {
847
+ continue;
848
+ }
849
+ break;
850
+ }
851
+ x[d + 16 >> 2] = f;
852
+ x[f + 24 >> 2] = c;
853
+ }
854
+ x[f + 12 >> 2] = f;
855
+ x[f + 8 >> 2] = f;
856
+ break r;
857
+ }
858
+ a = x[c + 8 >> 2];
859
+ x[a + 12 >> 2] = g;
860
+ x[c + 8 >> 2] = g;
861
+ x[g + 24 >> 2] = 0;
862
+ x[g + 12 >> 2] = c;
863
+ x[g + 8 >> 2] = a;
864
+ }
865
+ a = i + 8 | 0;
866
+ break b;
867
+ }
868
+ a = x[c + 8 >> 2];
869
+ x[a + 12 >> 2] = f;
870
+ x[c + 8 >> 2] = f;
871
+ x[f + 24 >> 2] = 0;
872
+ x[f + 12 >> 2] = c;
873
+ x[f + 8 >> 2] = a;
874
+ }
875
+ a = x[286];
876
+ if (a >>> 0 <= 16) {
877
+ break e;
878
+ }
879
+ b = a - 16 | 0;
880
+ x[286] = b;
881
+ a = x[289];
882
+ x[289] = a + 16;
883
+ x[a + 20 >> 2] = b | 1;
884
+ x[a + 4 >> 2] = 19;
885
+ a = a + 8 | 0;
886
+ break b;
887
+ }
888
+ x[282] = 48;
889
+ a = 0;
890
+ break b;
891
+ }
892
+ I: {
893
+ if (!i) {
894
+ break I;
895
+ }
896
+ a = x[b + 28 >> 2];
897
+ c = (a << 2) + 1436 | 0;
898
+ J: {
899
+ if (x[c >> 2] == (b | 0)) {
900
+ x[c >> 2] = d;
901
+ if (d) {
902
+ break J;
903
+ }
904
+ x[284] = ea(a) & j;
905
+ break I;
906
+ }
907
+ x[i + (x[i + 16 >> 2] == (b | 0) ? 16 : 20) >> 2] = d;
908
+ if (!d) {
909
+ break I;
910
+ }
911
+ }
912
+ x[d + 24 >> 2] = i;
913
+ a = x[b + 16 >> 2];
914
+ if (a) {
915
+ x[d + 16 >> 2] = a;
916
+ x[a + 24 >> 2] = d;
917
+ }
918
+ a = x[b + 20 >> 2];
919
+ if (!a) {
920
+ break I;
921
+ }
922
+ x[d + 20 >> 2] = a;
923
+ x[a + 24 >> 2] = d;
924
+ }
925
+ K: {
926
+ if (f >>> 0 <= 15) {
927
+ a = f + 16 | 0;
928
+ x[b + 4 >> 2] = a | 3;
929
+ a = a + b | 0;
930
+ x[a + 4 >> 2] = x[a + 4 >> 2] | 1;
931
+ break K;
932
+ }
933
+ x[b + 4 >> 2] = 19;
934
+ g = b + 16 | 0;
935
+ x[g + 4 >> 2] = f | 1;
936
+ x[f + g >> 2] = f;
937
+ if (h) {
938
+ c = h >>> 3 | 0;
939
+ a = (c << 3) + 1172 | 0;
940
+ d = x[288];
941
+ c = 1 << c;
942
+ L: {
943
+ if (!(c & e)) {
944
+ x[283] = c | e;
945
+ c = a;
946
+ break L;
947
+ }
948
+ c = x[a + 8 >> 2];
949
+ }
950
+ x[a + 8 >> 2] = d;
951
+ x[c + 12 >> 2] = d;
952
+ x[d + 12 >> 2] = a;
953
+ x[d + 8 >> 2] = c;
954
+ }
955
+ x[288] = g;
956
+ x[285] = f;
957
+ }
958
+ a = b + 8 | 0;
959
+ }
960
+ S = k + 16 | 0;
961
+ if (a) {
962
+ break a;
963
+ }
964
+ a = x[407];
965
+ if (a) {
966
+ T[a | 0]();
967
+ continue;
968
+ }
969
+ break;
970
+ }
971
+ R();
972
+ N();
973
+ } return a; }
974
+ function _(a) { a = a | 0; var b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0; if (a) {
975
+ a: {
976
+ if (!a) {
977
+ break a;
978
+ }
979
+ c = a - 8 | 0;
980
+ a = x[a - 4 >> 2];
981
+ e = a & -8;
982
+ f = c + e | 0;
983
+ b: {
984
+ if (a & 1) {
985
+ break b;
986
+ }
987
+ if (!(a & 3)) {
988
+ break a;
989
+ }
990
+ a = x[c >> 2];
991
+ c = c - a | 0;
992
+ if (c >>> 0 < A[287]) {
993
+ break a;
994
+ }
995
+ e = a + e | 0;
996
+ if (x[288] != (c | 0)) {
997
+ if (a >>> 0 <= 255) {
998
+ d = a >>> 3 | 0;
999
+ a = x[c + 8 >> 2];
1000
+ b = x[c + 12 >> 2];
1001
+ if ((b | 0) == (a | 0)) {
1002
+ x[283] = x[283] & ea(d);
1003
+ break b;
1004
+ }
1005
+ x[a + 12 >> 2] = b;
1006
+ x[b + 8 >> 2] = a;
1007
+ break b;
1008
+ }
1009
+ h = x[c + 24 >> 2];
1010
+ a = x[c + 12 >> 2];
1011
+ c: {
1012
+ if ((c | 0) != (a | 0)) {
1013
+ b = x[c + 8 >> 2];
1014
+ x[b + 12 >> 2] = a;
1015
+ x[a + 8 >> 2] = b;
1016
+ break c;
1017
+ }
1018
+ d: {
1019
+ b = c + 20 | 0;
1020
+ d = x[b >> 2];
1021
+ if (d) {
1022
+ break d;
1023
+ }
1024
+ b = c + 16 | 0;
1025
+ d = x[b >> 2];
1026
+ if (d) {
1027
+ break d;
1028
+ }
1029
+ a = 0;
1030
+ break c;
1031
+ }
1032
+ while (1) {
1033
+ g = b;
1034
+ a = d;
1035
+ b = a + 20 | 0;
1036
+ d = x[b >> 2];
1037
+ if (d) {
1038
+ continue;
1039
+ }
1040
+ b = a + 16 | 0;
1041
+ d = x[a + 16 >> 2];
1042
+ if (d) {
1043
+ continue;
1044
+ }
1045
+ break;
1046
+ }
1047
+ x[g >> 2] = 0;
1048
+ }
1049
+ if (!h) {
1050
+ break b;
1051
+ }
1052
+ b = x[c + 28 >> 2];
1053
+ d = (b << 2) + 1436 | 0;
1054
+ e: {
1055
+ if (x[d >> 2] == (c | 0)) {
1056
+ x[d >> 2] = a;
1057
+ if (a) {
1058
+ break e;
1059
+ }
1060
+ x[284] = x[284] & ea(b);
1061
+ break b;
1062
+ }
1063
+ x[h + (x[h + 16 >> 2] == (c | 0) ? 16 : 20) >> 2] = a;
1064
+ if (!a) {
1065
+ break b;
1066
+ }
1067
+ }
1068
+ x[a + 24 >> 2] = h;
1069
+ b = x[c + 16 >> 2];
1070
+ if (b) {
1071
+ x[a + 16 >> 2] = b;
1072
+ x[b + 24 >> 2] = a;
1073
+ }
1074
+ b = x[c + 20 >> 2];
1075
+ if (!b) {
1076
+ break b;
1077
+ }
1078
+ x[a + 20 >> 2] = b;
1079
+ x[b + 24 >> 2] = a;
1080
+ break b;
1081
+ }
1082
+ a = x[f + 4 >> 2];
1083
+ if ((a & 3) != 3) {
1084
+ break b;
1085
+ }
1086
+ x[285] = e;
1087
+ x[f + 4 >> 2] = a & -2;
1088
+ x[c + 4 >> 2] = e | 1;
1089
+ x[c + e >> 2] = e;
1090
+ break a;
1091
+ }
1092
+ if (c >>> 0 >= f >>> 0) {
1093
+ break a;
1094
+ }
1095
+ a = x[f + 4 >> 2];
1096
+ if (!(a & 1)) {
1097
+ break a;
1098
+ }
1099
+ f: {
1100
+ if (!(a & 2)) {
1101
+ if (x[289] == (f | 0)) {
1102
+ x[289] = c;
1103
+ a = x[286] + e | 0;
1104
+ x[286] = a;
1105
+ x[c + 4 >> 2] = a | 1;
1106
+ if (x[288] != (c | 0)) {
1107
+ break a;
1108
+ }
1109
+ x[285] = 0;
1110
+ x[288] = 0;
1111
+ break a;
1112
+ }
1113
+ if (x[288] == (f | 0)) {
1114
+ x[288] = c;
1115
+ a = x[285] + e | 0;
1116
+ x[285] = a;
1117
+ x[c + 4 >> 2] = a | 1;
1118
+ x[a + c >> 2] = a;
1119
+ break a;
1120
+ }
1121
+ e = (a & -8) + e | 0;
1122
+ g: {
1123
+ if (a >>> 0 <= 255) {
1124
+ d = a >>> 3 | 0;
1125
+ a = x[f + 8 >> 2];
1126
+ b = x[f + 12 >> 2];
1127
+ if ((b | 0) == (a | 0)) {
1128
+ x[283] = x[283] & ea(d);
1129
+ break g;
1130
+ }
1131
+ x[a + 12 >> 2] = b;
1132
+ x[b + 8 >> 2] = a;
1133
+ break g;
1134
+ }
1135
+ h = x[f + 24 >> 2];
1136
+ a = x[f + 12 >> 2];
1137
+ h: {
1138
+ if ((f | 0) != (a | 0)) {
1139
+ b = x[f + 8 >> 2];
1140
+ x[b + 12 >> 2] = a;
1141
+ x[a + 8 >> 2] = b;
1142
+ break h;
1143
+ }
1144
+ i: {
1145
+ b = f + 20 | 0;
1146
+ d = x[b >> 2];
1147
+ if (d) {
1148
+ break i;
1149
+ }
1150
+ b = f + 16 | 0;
1151
+ d = x[b >> 2];
1152
+ if (d) {
1153
+ break i;
1154
+ }
1155
+ a = 0;
1156
+ break h;
1157
+ }
1158
+ while (1) {
1159
+ g = b;
1160
+ a = d;
1161
+ b = a + 20 | 0;
1162
+ d = x[b >> 2];
1163
+ if (d) {
1164
+ continue;
1165
+ }
1166
+ b = a + 16 | 0;
1167
+ d = x[a + 16 >> 2];
1168
+ if (d) {
1169
+ continue;
1170
+ }
1171
+ break;
1172
+ }
1173
+ x[g >> 2] = 0;
1174
+ }
1175
+ if (!h) {
1176
+ break g;
1177
+ }
1178
+ b = x[f + 28 >> 2];
1179
+ d = (b << 2) + 1436 | 0;
1180
+ j: {
1181
+ if (x[d >> 2] == (f | 0)) {
1182
+ x[d >> 2] = a;
1183
+ if (a) {
1184
+ break j;
1185
+ }
1186
+ x[284] = x[284] & ea(b);
1187
+ break g;
1188
+ }
1189
+ x[h + (x[h + 16 >> 2] == (f | 0) ? 16 : 20) >> 2] = a;
1190
+ if (!a) {
1191
+ break g;
1192
+ }
1193
+ }
1194
+ x[a + 24 >> 2] = h;
1195
+ b = x[f + 16 >> 2];
1196
+ if (b) {
1197
+ x[a + 16 >> 2] = b;
1198
+ x[b + 24 >> 2] = a;
1199
+ }
1200
+ b = x[f + 20 >> 2];
1201
+ if (!b) {
1202
+ break g;
1203
+ }
1204
+ x[a + 20 >> 2] = b;
1205
+ x[b + 24 >> 2] = a;
1206
+ }
1207
+ x[c + 4 >> 2] = e | 1;
1208
+ x[c + e >> 2] = e;
1209
+ if (x[288] != (c | 0)) {
1210
+ break f;
1211
+ }
1212
+ x[285] = e;
1213
+ break a;
1214
+ }
1215
+ x[f + 4 >> 2] = a & -2;
1216
+ x[c + 4 >> 2] = e | 1;
1217
+ x[c + e >> 2] = e;
1218
+ }
1219
+ if (e >>> 0 <= 255) {
1220
+ b = e >>> 3 | 0;
1221
+ a = (b << 3) + 1172 | 0;
1222
+ d = x[283];
1223
+ b = 1 << b;
1224
+ k: {
1225
+ if (!(d & b)) {
1226
+ x[283] = b | d;
1227
+ b = a;
1228
+ break k;
1229
+ }
1230
+ b = x[a + 8 >> 2];
1231
+ }
1232
+ x[a + 8 >> 2] = c;
1233
+ x[b + 12 >> 2] = c;
1234
+ x[c + 12 >> 2] = a;
1235
+ x[c + 8 >> 2] = b;
1236
+ break a;
1237
+ }
1238
+ b = 31;
1239
+ x[c + 16 >> 2] = 0;
1240
+ x[c + 20 >> 2] = 0;
1241
+ if (e >>> 0 <= 16777215) {
1242
+ b = e >>> 8 | 0;
1243
+ a = b + 1048320 >>> 16 & 8;
1244
+ d = b << a;
1245
+ b = d + 520192 >>> 16 & 4;
1246
+ g = d << b;
1247
+ d = g + 245760 >>> 16 & 2;
1248
+ a = (g << d >>> 15 | 0) - (d | (a | b)) | 0;
1249
+ b = (a << 1 | e >>> a + 21 & 1) + 28 | 0;
1250
+ }
1251
+ x[c + 28 >> 2] = b;
1252
+ a = (b << 2) + 1436 | 0;
1253
+ l: {
1254
+ m: {
1255
+ d = x[284];
1256
+ g = 1 << b;
1257
+ n: {
1258
+ if (!(d & g)) {
1259
+ x[284] = d | g;
1260
+ x[a >> 2] = c;
1261
+ x[c + 24 >> 2] = a;
1262
+ break n;
1263
+ }
1264
+ b = e << ((b | 0) == 31 ? 0 : 25 - (b >>> 1 | 0) | 0);
1265
+ a = x[a >> 2];
1266
+ while (1) {
1267
+ d = a;
1268
+ if ((x[a + 4 >> 2] & -8) == (e | 0)) {
1269
+ break m;
1270
+ }
1271
+ a = b >>> 29 | 0;
1272
+ b = b << 1;
1273
+ g = d + (a & 4) | 0;
1274
+ a = x[g + 16 >> 2];
1275
+ if (a) {
1276
+ continue;
1277
+ }
1278
+ break;
1279
+ }
1280
+ x[g + 16 >> 2] = c;
1281
+ x[c + 24 >> 2] = d;
1282
+ }
1283
+ x[c + 12 >> 2] = c;
1284
+ x[c + 8 >> 2] = c;
1285
+ break l;
1286
+ }
1287
+ a = x[d + 8 >> 2];
1288
+ x[a + 12 >> 2] = c;
1289
+ x[d + 8 >> 2] = c;
1290
+ x[c + 24 >> 2] = 0;
1291
+ x[c + 12 >> 2] = d;
1292
+ x[c + 8 >> 2] = a;
1293
+ }
1294
+ a = x[291] - 1 | 0;
1295
+ x[291] = a ? a : -1;
1296
+ }
1297
+ } }
1298
+ function Y(a) { var b = 0, c = 0; b = x[256]; c = a + 3 & -4; a = b + c | 0; a: {
1299
+ if (a >>> 0 <= b >>> 0 ? c : 0) {
1300
+ break a;
1301
+ }
1302
+ if (a >>> 0 > U() << 16 >>> 0) {
1303
+ if (!(Q(a | 0) | 0)) {
1304
+ break a;
1305
+ }
1306
+ }
1307
+ x[256] = a;
1308
+ return b;
1309
+ } x[282] = 48; return -1; }
1310
+ function ea(a) { var b = 0; b = a & 31; a = 0 - a & 31; return (-1 >>> b & -2) << b | (-1 << a & -2) >>> a; }
1311
+ function ca(a, b, c) { a = E(a); b = E(b); c = E(c); return Z() | 0; }
1312
+ function ba(a, b) { a = a | 0; b = b | 0; return D(b, 4950) | 0; }
1313
+ function aa(a, b) { a = a | 0; b = b | 0; }
1314
+ function da() { return Z() | 0; }
1315
+ function $() { }
1316
+ // EMSCRIPTEN_END_FUNCS
1317
+ g = y;
1318
+ r(W);
1319
+ var T = e([]);
1320
+ function U() { return u.byteLength / 65536 | 0; }
1321
+ return { "d": $, "e": _, "f": da, "g": ca, "h": ba, "i": aa, "j": _, "k": T };
1322
+ }
1323
+ return V(X);
1324
+ }
1325
+ // EMSCRIPTEN_END_ASM
1326
+ )(C);
1327
+ }
1328
+ function ea() { return { then: function (a) { a({ instance: new da }); } }; }
1329
+ var fa = Error, WebAssembly = {};
1330
+ A = [];
1331
+ "object" != typeof WebAssembly && y("no native wasm support detected");
1332
+ var D, E = !1, F, B = b.INITIAL_MEMORY || 16777216;
1333
+ if (D = b.wasmMemory ? b.wasmMemory : new ba)
1334
+ F = D.buffer;
1335
+ B = F.byteLength;
1336
+ var G = F;
1337
+ F = G;
1338
+ b.HEAP8 = new Int8Array(G);
1339
+ b.HEAP16 = new Int16Array(G);
1340
+ b.HEAP32 = new Int32Array(G);
1341
+ b.HEAPU8 = new Uint8Array(G);
1342
+ b.HEAPU16 = new Uint16Array(G);
1343
+ b.HEAPU32 = new Uint32Array(G);
1344
+ b.HEAPF32 = new Float32Array(G);
1345
+ b.HEAPF64 = new Float64Array(G);
1346
+ var H, I = [], J = [], K = [];
1347
+ function ha() { var a = b.preRun.shift(); I.unshift(a); }
1348
+ var L = 0, M = null, N = null;
1349
+ b.preloadedImages = {};
1350
+ b.preloadedAudios = {};
1351
+ function y(a) { if (b.onAbort)
1352
+ b.onAbort(a); a = "Aborted(" + a + ")"; z(a); E = !0; a = new fa(a + ". Build with -s ASSERTIONS=1 for more info."); k(a); throw a; }
1353
+ var O = "data:application/octet-stream;base64,", P;
1354
+ P = "mxcadassembly_min.wasm";
1355
+ if (!P.startsWith(O)) {
1356
+ var Q = P;
1357
+ P = b.locateFile ? b.locateFile(Q, q) : q + Q;
1358
+ }
1359
+ function ia() { var a = P; try {
1360
+ if (a == P && A)
1361
+ return new Uint8Array(A);
1362
+ var c = x(a);
1363
+ if (c)
1364
+ return c;
1365
+ if (u)
1366
+ return u(a);
1367
+ throw "both async and sync fetching of the wasm failed";
1368
+ }
1369
+ catch (d) {
1370
+ y(d);
1371
+ } }
1372
+ function ja() { if (!A && (m || n)) {
1373
+ if ("function" == typeof fetch && !P.startsWith("file://"))
1374
+ return fetch(P, { credentials: "same-origin" }).then(function (a) { if (!a.ok)
1375
+ throw "failed to load wasm binary file at '" + P + "'"; return a.arrayBuffer(); }).catch(function () { return ia(); });
1376
+ if (t)
1377
+ return new Promise(function (a, c) { t(P, function (d) { a(new Uint8Array(d)); }, c); });
1378
+ } return Promise.resolve().then(function () { return ia(); }); }
1379
+ function R(a) { for (; 0 < a.length;) {
1380
+ var c = a.shift();
1381
+ if ("function" == typeof c)
1382
+ c(b);
1383
+ else {
1384
+ var d = c.u;
1385
+ "number" == typeof d ? void 0 === c.s ? ka(d)() : ka(d)(c.s) : d(void 0 === c.s ? null : c.s);
1386
+ }
1387
+ } }
1388
+ var S = [];
1389
+ function ka(a) { var c = S[a]; c || (a >= S.length && (S.length = a + 1), S[a] = c = H.get(a)); return c; }
1390
+ var aa = !1, la = "function" == typeof atob ? atob : function (a) {
1391
+ var c = "", d = 0;
1392
+ a = a.replace(/[^A-Za-z0-9\+\/=]/g, "");
1393
+ do {
1394
+ var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));
1395
+ var f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));
1396
+ var h = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));
1397
+ var ca = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(d++));
1398
+ e = e <<
1399
+ 2 | f >> 4;
1400
+ f = (f & 15) << 4 | h >> 2;
1401
+ var ra = (h & 3) << 6 | ca;
1402
+ c += String.fromCharCode(e);
1403
+ 64 !== h && (c += String.fromCharCode(f));
1404
+ 64 !== ca && (c += String.fromCharCode(ra));
1405
+ } while (d < a.length);
1406
+ return c;
1407
+ };
1408
+ function x(a) { if (a.startsWith(O)) {
1409
+ a = a.slice(O.length);
1410
+ if ("boolean" == typeof p && p) {
1411
+ var c = Buffer.from(a, "base64");
1412
+ c = new Uint8Array(c.buffer, c.byteOffset, c.byteLength);
1413
+ }
1414
+ else
1415
+ try {
1416
+ var d = la(a), e = new Uint8Array(d.length);
1417
+ for (a = 0; a < d.length; ++a)
1418
+ e[a] = d.charCodeAt(a);
1419
+ c = e;
1420
+ }
1421
+ catch (f) {
1422
+ throw Error("Converting base64 string to bytes failed.");
1423
+ }
1424
+ return c;
1425
+ } }
1426
+ var C = { c: function () { y(""); }, b: function () { y("OOM"); }, a: D };
1427
+ (function () {
1428
+ function a(f) { b.asm = f.exports; H = b.asm.k; J.unshift(b.asm.d); L--; b.monitorRunDependencies && b.monitorRunDependencies(L); 0 == L && (null !== M && (clearInterval(M), M = null), N && (f = N, N = null, f())); }
1429
+ function c(f) { a(f.instance); }
1430
+ function d(f) { return ja().then(function () { return ea(); }).then(function (h) { return h; }).then(f, function (h) { z("failed to asynchronously prepare wasm: " + h); y(h); }); }
1431
+ var e = { a: C };
1432
+ L++;
1433
+ b.monitorRunDependencies && b.monitorRunDependencies(L);
1434
+ if (b.instantiateWasm)
1435
+ try {
1436
+ return b.instantiateWasm(e, a);
1437
+ }
1438
+ catch (f) {
1439
+ return z("Module.instantiateWasm callback failed with error: " +
1440
+ f), !1;
1441
+ }
1442
+ (function () { return A || "function" != typeof WebAssembly.instantiateStreaming || P.startsWith(O) || P.startsWith("file://") || "function" != typeof fetch ? d(c) : fetch(P, { credentials: "same-origin" }).then(function (f) { return WebAssembly.instantiateStreaming(f, e).then(c, function (h) { z("wasm streaming compile failed: " + h); z("falling back to ArrayBuffer instantiation"); return d(c); }); }); })().catch(k);
1443
+ return {};
1444
+ })();
1445
+ b.___wasm_call_ctors = function () { return (b.___wasm_call_ctors = b.asm.d).apply(null, arguments); };
1446
+ var ma = b._emscripten_bind_VoidPtr___destroy___0 = function () { return (ma = b._emscripten_bind_VoidPtr___destroy___0 = b.asm.e).apply(null, arguments); }, na = b._emscripten_bind_McGeVector3d_McGeVector3d_0 = function () { return (na = b._emscripten_bind_McGeVector3d_McGeVector3d_0 = b.asm.f).apply(null, arguments); }, oa = b._emscripten_bind_McGeVector3d_McGeVector3d_3 = function () { return (oa = b._emscripten_bind_McGeVector3d_McGeVector3d_3 = b.asm.g).apply(null, arguments); }, pa = b._emscripten_bind_McGeVector3d_getVal_1 = function () {
1447
+ return (pa =
1448
+ b._emscripten_bind_McGeVector3d_getVal_1 = b.asm.h).apply(null, arguments);
1449
+ }, qa = b._emscripten_bind_McGeVector3d_setVal_1 = function () { return (qa = b._emscripten_bind_McGeVector3d_setVal_1 = b.asm.i).apply(null, arguments); }, sa = b._emscripten_bind_McGeVector3d___destroy___0 = function () { return (sa = b._emscripten_bind_McGeVector3d___destroy___0 = b.asm.j).apply(null, arguments); }, T;
1450
+ N = function ta() { T || U(); T || (N = ta); };
1451
+ function U() { function a() { if (!T && (T = !0, b.calledRun = !0, !E)) {
1452
+ R(J);
1453
+ g(b);
1454
+ if (b.onRuntimeInitialized)
1455
+ b.onRuntimeInitialized();
1456
+ if (b.postRun)
1457
+ for ("function" == typeof b.postRun && (b.postRun = [b.postRun]); b.postRun.length;) {
1458
+ var c = b.postRun.shift();
1459
+ K.unshift(c);
1460
+ }
1461
+ R(K);
1462
+ } } if (!(0 < L)) {
1463
+ if (b.preRun)
1464
+ for ("function" == typeof b.preRun && (b.preRun = [b.preRun]); b.preRun.length;)
1465
+ ha();
1466
+ R(I);
1467
+ 0 < L || (b.setStatus ? (b.setStatus("Running..."), setTimeout(function () { setTimeout(function () { b.setStatus(""); }, 1); a(); }, 1)) : a());
1468
+ } }
1469
+ b.run = U;
1470
+ if (b.preInit)
1471
+ for ("function" == typeof b.preInit && (b.preInit = [b.preInit]); 0 < b.preInit.length;)
1472
+ b.preInit.pop()();
1473
+ U();
1474
+ function V() { }
1475
+ V.prototype = Object.create(V.prototype);
1476
+ V.prototype.constructor = V;
1477
+ V.prototype.m = V;
1478
+ V.o = {};
1479
+ b.WrapperObject = V;
1480
+ function W(a) { return (a || V).o; }
1481
+ b.getCache = W;
1482
+ function X(a, c) { var d = W(c), e = d[a]; if (e)
1483
+ return e; e = Object.create((c || V).prototype); e.l = a; return d[a] = e; }
1484
+ b.wrapPointer = X;
1485
+ b.castObject = function (a, c) { return X(a.l, c); };
1486
+ b.NULL = X(0);
1487
+ b.destroy = function (a) { if (!a.__destroy__)
1488
+ throw "Error: Cannot destroy object. (Did you create it yourself?)"; a.__destroy__(); delete W(a.m)[a.l]; };
1489
+ b.compare = function (a, c) { return a.l === c.l; };
1490
+ b.getPointer = function (a) { return a.l; };
1491
+ b.getClass = function (a) { return a.m; };
1492
+ function Y() { throw "cannot construct a VoidPtr, no constructor in IDL"; }
1493
+ Y.prototype = Object.create(V.prototype);
1494
+ Y.prototype.constructor = Y;
1495
+ Y.prototype.m = Y;
1496
+ Y.o = {};
1497
+ b.VoidPtr = Y;
1498
+ Y.prototype.__destroy__ = function () { ma(this.l); };
1499
+ function Z(a, c, d) { a && "object" === typeof a && (a = a.l); c && "object" === typeof c && (c = c.l); d && "object" === typeof d && (d = d.l); this.l = void 0 === a ? na() : void 0 === c ? _emscripten_bind_McGeVector3d_McGeVector3d_1(a) : void 0 === d ? _emscripten_bind_McGeVector3d_McGeVector3d_2(a, c) : oa(a, c, d); W(Z)[this.l] = this; }
1500
+ Z.prototype = Object.create(V.prototype);
1501
+ Z.prototype.constructor = Z;
1502
+ Z.prototype.m = Z;
1503
+ Z.o = {};
1504
+ b.McGeVector3d = Z;
1505
+ Z.prototype.getVal = function (a) { var c = this.l; a && "object" === typeof a && (a = a.l); return pa(c, a); };
1506
+ Z.prototype.setVal = function (a) { var c = this.l; a && "object" === typeof a && (a = a.l); qa(c, a); };
1507
+ Z.prototype.__destroy__ = function () { sa(this.l); };
1508
+ return mxcadassembly.ready;
1509
+ });
1510
+ })();
1511
+ if (typeof exports === 'object' && typeof module === 'object')
1512
+ module.exports = mxcadassembly;
1513
+ else if (typeof define === 'function' && define['amd'])
1514
+ define([], function () { return mxcadassembly; });
1515
+ else if (typeof exports === 'object')
1516
+ exports["mxcadassembly"] = mxcadassembly;
1517
+ return mxcadassembly();
1518
+ }
1519
+ exports.default = mxcadassemblyinit;