@rive-app/webgl2-advanced 2.11.0

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.
@@ -0,0 +1,3528 @@
1
+
2
+ var Rive = (() => {
3
+ var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
4
+
5
+ return (
6
+ function(moduleArg = {}) {
7
+
8
+ var p = moduleArg, ba, ca;
9
+ p.ready = new Promise((a, b) => {
10
+ ba = a;
11
+ ca = b;
12
+ });
13
+ function da() {
14
+ function a(g) {
15
+ const m = d;
16
+ c = b = 0;
17
+ d = new Map();
18
+ m.forEach(n => {
19
+ try {
20
+ n(g);
21
+ } catch (l) {
22
+ console.error(l);
23
+ }
24
+ });
25
+ this.jb();
26
+ e && e.Pb();
27
+ }
28
+ let b = 0, c = 0, d = new Map(), e = null, f = null;
29
+ this.requestAnimationFrame = function(g) {
30
+ b || (b = requestAnimationFrame(a.bind(this)));
31
+ const m = ++c;
32
+ d.set(m, g);
33
+ return m;
34
+ };
35
+ this.cancelAnimationFrame = function(g) {
36
+ d.delete(g);
37
+ b && 0 == d.size && (cancelAnimationFrame(b), b = 0);
38
+ };
39
+ this.Nb = function(g) {
40
+ f && (document.body.remove(f), f = null);
41
+ g || (f = document.createElement("div"), f.style.backgroundColor = "black", f.style.position = "fixed", f.style.right = 0, f.style.top = 0, f.style.color = "white", f.style.padding = "4px", f.innerHTML = "RIVE FPS", g = function(m) {
42
+ f.innerHTML = "RIVE FPS " + m.toFixed(1);
43
+ }, document.body.appendChild(f));
44
+ e = new function() {
45
+ let m = 0, n = 0;
46
+ this.Pb = function() {
47
+ var l = performance.now();
48
+ n ? (++m, l -= n, 1000 < l && (g(1000 * m / l), m = n = 0)) : (n = l, m = 0);
49
+ };
50
+ }();
51
+ };
52
+ this.jb = function() {
53
+ };
54
+ }
55
+ function ea() {
56
+ console.assert(!0);
57
+ const a = new Map();
58
+ let b = -Infinity;
59
+ this.push = function(c) {
60
+ c = c + 255 >> 8;
61
+ a.has(c) && clearTimeout(a.get(c));
62
+ a.set(c, setTimeout(function() {
63
+ a.delete(c);
64
+ 0 == a.length ? b = -Infinity : c == b && (b = Math.max(...a.keys()), console.assert(b < c));
65
+ }, 1000));
66
+ b = Math.max(c, b);
67
+ return b << 8;
68
+ };
69
+ }
70
+ const fa = p.onRuntimeInitialized;
71
+ p.onRuntimeInitialized = function() {
72
+ fa && fa();
73
+ let a = p.decodeFont;
74
+ p.decodeFont = function(c, d) {
75
+ c = a(c);
76
+ d(c);
77
+ };
78
+ const b = p.FileAssetLoader;
79
+ p.ptrToAsset = c => {
80
+ let d = p.ptrToFileAsset(c);
81
+ return d.isImage ? p.ptrToImageAsset(c) : d.isFont ? p.ptrToFontAsset(c) : d;
82
+ };
83
+ p.CustomFileAssetLoader = b.extend("CustomFileAssetLoader", {__construct:function({loadContents:c}) {
84
+ this.__parent.__construct.call(this);
85
+ this.Ab = c;
86
+ }, loadContents:function(c, d) {
87
+ c = p.ptrToAsset(c);
88
+ return this.Ab(c, d);
89
+ },});
90
+ p.CDNFileAssetLoader = b.extend("CDNFileAssetLoader", {__construct:function() {
91
+ this.__parent.__construct.call(this);
92
+ }, loadContents:function(c) {
93
+ let d = p.ptrToAsset(c);
94
+ c = d.cdnUuid;
95
+ if ("" === c) {
96
+ return !1;
97
+ }
98
+ (function(e, f) {
99
+ var g = new XMLHttpRequest();
100
+ g.responseType = "arraybuffer";
101
+ g.onreadystatechange = function() {
102
+ 4 == g.readyState && 200 == g.status && f(g);
103
+ };
104
+ g.open("GET", e, !0);
105
+ g.send(null);
106
+ })(d.cdnBaseUrl + "/" + c, e => {
107
+ d.decode(new Uint8Array(e.response));
108
+ });
109
+ return !0;
110
+ },});
111
+ p.FallbackFileAssetLoader = b.extend("FallbackFileAssetLoader", {__construct:function() {
112
+ this.__parent.__construct.call(this);
113
+ this.fb = [];
114
+ }, addLoader:function(c) {
115
+ this.fb.push(c);
116
+ }, loadContents:function(c, d) {
117
+ for (let e of this.fb) {
118
+ if (e.loadContents(c, d)) {
119
+ return !0;
120
+ }
121
+ }
122
+ return !1;
123
+ },});
124
+ };
125
+ const ha = p.onRuntimeInitialized;
126
+ p.onRuntimeInitialized = function() {
127
+ function a(q) {
128
+ this.F = q;
129
+ this.yb = q.getContext("2d");
130
+ this.Cb = d;
131
+ this.U = [];
132
+ this.la = 0;
133
+ this.clear = function() {
134
+ console.assert(0 == this.la);
135
+ this.U = [];
136
+ e.delete(this);
137
+ };
138
+ this.save = function() {
139
+ ++this.la;
140
+ this.U.push(d.save.bind(d));
141
+ };
142
+ this.restore = function() {
143
+ 0 < this.la && (this.U.push(d.restore.bind(d)), --this.la);
144
+ };
145
+ this.transform = function(k) {
146
+ this.U.push(d.transform.bind(d, k));
147
+ };
148
+ this.align = function(k, r, w, z) {
149
+ this.U.push(d.align.bind(d, k, r, w, z));
150
+ };
151
+ this.flush = function() {
152
+ console.assert(0 == this.la);
153
+ e.add(this);
154
+ d.Ja || c();
155
+ };
156
+ }
157
+ function b(q, k = !1) {
158
+ var r = {alpha:!0, depth:k, stencil:k, antialias:k, premultipliedAlpha:!0, preserveDrawingBuffer:0, preferLowPowerToHighPerformance:0, failIfMajorPerformanceCaveat:0, enableExtensionsByDefault:!1, explicitSwapControl:0, renderViaOffscreenBackBuffer:0,};
159
+ k = q.getContext("webgl2", r);
160
+ if (!k) {
161
+ return null;
162
+ }
163
+ var w = ia(t), z = {handle:w, attributes:r, version:r.Ec, H:k};
164
+ k.canvas && (k.canvas.vc = z);
165
+ t[w] = z;
166
+ ("undefined" == typeof r.Mb || r.Mb) && ja(z);
167
+ ka(w);
168
+ r = f(q.width, q.height);
169
+ r.zb = w;
170
+ r.F = q;
171
+ r.Va = q.width;
172
+ r.Ua = q.height;
173
+ r.ka = k;
174
+ return r;
175
+ }
176
+ function c() {
177
+ if (d) {
178
+ var q = d.Bb, k = 0, r = 0, w = 0, z = Array(e.size), G = 0;
179
+ for (var A of e) {
180
+ A.ea = Math.min(A.F.width, q), A.da = Math.min(A.F.height, q), A.Ia = A.da * A.ea, k = Math.max(k, A.ea), r = Math.max(r, A.da), w += A.Ia, z[G++] = A;
181
+ }
182
+ e.clear();
183
+ if (!(0 >= w)) {
184
+ k = 1 << (0 >= k ? 0 : 32 - Math.clz32(k - 1));
185
+ for (r = 1 << (0 >= r ? 0 : 32 - Math.clz32(r - 1)); r * k < w;) {
186
+ k <= r ? k *= 2 : r *= 2;
187
+ }
188
+ k = Math.min(k, q);
189
+ k = Math.min(r, q);
190
+ z.sort((aa, sb) => sb.Ia - aa.Ia);
191
+ w = new p.DynamicRectanizer(q);
192
+ for (A = 0; A < z.length;) {
193
+ w.reset(k, r);
194
+ for (G = A; G < z.length; ++G) {
195
+ var H = z[G], E = w.addRect(H.ea, H.da);
196
+ if (0 > E) {
197
+ console.assert(G > A);
198
+ break;
199
+ }
200
+ H.sa = E & 65535;
201
+ H.ta = E >> 16;
202
+ }
203
+ H = m.push(w.drawWidth());
204
+ E = n.push(w.drawHeight());
205
+ console.assert(H >= w.drawWidth());
206
+ console.assert(E >= w.drawHeight());
207
+ console.assert(H <= q);
208
+ console.assert(E <= q);
209
+ d.F.width != H && (d.F.width = H);
210
+ d.F.height != E && (d.F.height = E);
211
+ d.clear();
212
+ for (H = A; H < G; ++H) {
213
+ E = z[H];
214
+ d.saveClipRect(E.sa, E.ta, E.sa + E.ea, E.ta + E.da);
215
+ let aa = new p.Mat2D();
216
+ aa.xx = E.ea / E.F.width;
217
+ aa.yy = E.da / E.F.height;
218
+ aa.xy = aa.yx = 0;
219
+ aa.tx = E.sa;
220
+ aa.ty = E.ta;
221
+ d.transform(aa);
222
+ for (const sb of E.U) {
223
+ sb();
224
+ }
225
+ d.restoreClipRect();
226
+ E.U = [];
227
+ }
228
+ for (d.flush(); A < G; ++A) {
229
+ H = z[A], E = H.yb, E.globalCompositeOperation = "copy", E.drawImage(d.F, H.sa, H.ta, H.ea, H.da, 0, 0, H.F.width, H.F.height);
230
+ }
231
+ A = G;
232
+ }
233
+ }
234
+ }
235
+ }
236
+ ha && ha();
237
+ let d = null;
238
+ const e = new Set(), f = p.makeRenderer;
239
+ p.makeRenderer = function(q, k) {
240
+ if (!d) {
241
+ function r(w) {
242
+ const z = document.createElement("canvas");
243
+ z.width = 1;
244
+ z.height = 1;
245
+ d = b(z, w);
246
+ d.Ja = !!d.ka.getExtension("WEBGL_shader_pixel_local_storage");
247
+ d.Bb = Math.min(d.ka.getParameter(d.ka.MAX_RENDERBUFFER_SIZE), d.ka.getParameter(d.ka.MAX_TEXTURE_SIZE));
248
+ return d;
249
+ }
250
+ d = r(!0);
251
+ d.Ja && (d = r(!1));
252
+ }
253
+ return k ? new a(q) : b(q, !d.Ja);
254
+ };
255
+ const g = p.Artboard.prototype.draw;
256
+ p.Artboard.prototype.draw = function(q) {
257
+ q.U ? q.U.push(g.bind(this, q.Cb)) : g.call(this, q);
258
+ };
259
+ const m = new ea(), n = new ea(), l = new da();
260
+ p.requestAnimationFrame = l.requestAnimationFrame.bind(l);
261
+ p.cancelAnimationFrame = l.cancelAnimationFrame.bind(l);
262
+ p.enableFPSCounter = l.Nb.bind(l);
263
+ l.jb = c;
264
+ p.resolveAnimationFrame = c;
265
+ let u = p.load;
266
+ p.load = function(q, k, r = !0) {
267
+ const w = new p.FallbackFileAssetLoader();
268
+ void 0 !== k && w.addLoader(k);
269
+ r && (k = new p.CDNFileAssetLoader(), w.addLoader(k));
270
+ return Promise.resolve(u(q, w));
271
+ };
272
+ const v = p.WebGL2Renderer.prototype.clear;
273
+ p.WebGL2Renderer.prototype.clear = function() {
274
+ ka(this.zb);
275
+ const q = this.F;
276
+ if (this.Va != q.width || this.Ua != q.height) {
277
+ this.resize(q.width, q.height), this.Va = q.width, this.Ua = q.height;
278
+ }
279
+ v.call(this);
280
+ };
281
+ p.decodeImage = function(q, k) {
282
+ q = p.decodeWebGL2Image(q);
283
+ k(q);
284
+ };
285
+ };
286
+ var la = Object.assign({}, p), ma = "object" == typeof window, na = "function" == typeof importScripts, oa = "", pa, qa;
287
+ if (ma || na) {
288
+ na ? oa = self.location.href : "undefined" != typeof document && document.currentScript && (oa = document.currentScript.src), _scriptDir && (oa = _scriptDir), 0 !== oa.indexOf("blob:") ? oa = oa.substr(0, oa.replace(/[?#].*/, "").lastIndexOf("/") + 1) : oa = "", na && (qa = a => {
289
+ var b = new XMLHttpRequest();
290
+ b.open("GET", a, !1);
291
+ b.responseType = "arraybuffer";
292
+ b.send(null);
293
+ return new Uint8Array(b.response);
294
+ }), pa = (a, b, c) => {
295
+ var d = new XMLHttpRequest();
296
+ d.open("GET", a, !0);
297
+ d.responseType = "arraybuffer";
298
+ d.onload = () => {
299
+ 200 == d.status || 0 == d.status && d.response ? b(d.response) : c();
300
+ };
301
+ d.onerror = c;
302
+ d.send(null);
303
+ };
304
+ }
305
+ var ra = console.log.bind(console), sa = console.error.bind(console);
306
+ Object.assign(p, la);
307
+ la = null;
308
+ var noExitRuntime = !0;
309
+ "object" != typeof WebAssembly && ta("no native wasm support detected");
310
+ var ua, x, va = !1, y, B, C, wa, D, F, xa, ya;
311
+ function za() {
312
+ var a = ua.buffer;
313
+ p.HEAP8 = y = new Int8Array(a);
314
+ p.HEAP16 = C = new Int16Array(a);
315
+ p.HEAP32 = D = new Int32Array(a);
316
+ p.HEAPU8 = B = new Uint8Array(a);
317
+ p.HEAPU16 = wa = new Uint16Array(a);
318
+ p.HEAPU32 = F = new Uint32Array(a);
319
+ p.HEAPF32 = xa = new Float32Array(a);
320
+ p.HEAPF64 = ya = new Float64Array(a);
321
+ }
322
+ var Aa, Ba = [], Ca = [], Da = [], Ea = 0, Fa = null, Ga = null;
323
+ function ta(a) {
324
+ a = "Aborted(" + a + ")";
325
+ sa(a);
326
+ va = !0;
327
+ a = new WebAssembly.RuntimeError(a + ". Build with -sASSERTIONS for more info.");
328
+ ca(a);
329
+ throw a;
330
+ }
331
+ function Ha(a) {
332
+ return a.startsWith("data:application/octet-stream;base64,");
333
+ }
334
+ var Ia;
335
+ Ia = "webgl2_advanced.wasm";
336
+ Ha(Ia) || (Ia = oa + Ia);
337
+ function Ja(a) {
338
+ if (qa) {
339
+ return qa(a);
340
+ }
341
+ throw "both async and sync fetching of the wasm failed";
342
+ }
343
+ function Ka(a) {
344
+ if (ma || na) {
345
+ if ("function" == typeof fetch && !a.startsWith("file://")) {
346
+ return fetch(a, {credentials:"same-origin"}).then(b => {
347
+ if (!b.ok) {
348
+ throw "failed to load wasm binary file at '" + a + "'";
349
+ }
350
+ return b.arrayBuffer();
351
+ }).catch(() => Ja(a));
352
+ }
353
+ if (pa) {
354
+ return new Promise((b, c) => {
355
+ pa(a, d => b(new Uint8Array(d)), c);
356
+ });
357
+ }
358
+ }
359
+ return Promise.resolve().then(() => Ja(a));
360
+ }
361
+ function La(a, b, c) {
362
+ return Ka(a).then(d => WebAssembly.instantiate(d, b)).then(d => d).then(c, d => {
363
+ sa("failed to asynchronously prepare wasm: " + d);
364
+ ta(d);
365
+ });
366
+ }
367
+ function Ma(a, b) {
368
+ var c = Ia;
369
+ return "function" != typeof WebAssembly.instantiateStreaming || Ha(c) || c.startsWith("file://") || "function" != typeof fetch ? La(c, a, b) : fetch(c, {credentials:"same-origin"}).then(d => WebAssembly.instantiateStreaming(d, a).then(b, function(e) {
370
+ sa("wasm streaming compile failed: " + e);
371
+ sa("falling back to ArrayBuffer instantiation");
372
+ return La(c, a, b);
373
+ }));
374
+ }
375
+ var I, J, Qa = {264968:(a, b, c, d, e) => {
376
+ if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
377
+ return 0;
378
+ }
379
+ if ("undefined" === typeof window.h) {
380
+ window.h = {Da:0};
381
+ window.h.I = {};
382
+ window.h.I.Ca = a;
383
+ window.h.I.capture = b;
384
+ window.h.I.La = c;
385
+ window.h.ha = {};
386
+ window.h.ha.stopped = d;
387
+ window.h.ha.sb = e;
388
+ let f = window.h;
389
+ f.C = [];
390
+ f.tc = function(g) {
391
+ for (var m = 0; m < f.C.length; ++m) {
392
+ if (null == f.C[m]) {
393
+ return f.C[m] = g, m;
394
+ }
395
+ }
396
+ f.C.push(g);
397
+ return f.C.length - 1;
398
+ };
399
+ f.xb = function(g) {
400
+ for (f.C[g] = null; 0 < f.C.length;) {
401
+ if (null == f.C[f.C.length - 1]) {
402
+ f.C.pop();
403
+ } else {
404
+ break;
405
+ }
406
+ }
407
+ };
408
+ f.Nc = function(g) {
409
+ for (var m = 0; m < f.C.length; ++m) {
410
+ if (f.C[m] == g) {
411
+ return f.xb(m);
412
+ }
413
+ }
414
+ };
415
+ f.wa = function(g) {
416
+ return f.C[g];
417
+ };
418
+ f.wb = ["touchend", "click"];
419
+ f.unlock = function() {
420
+ for (var g = 0; g < f.C.length; ++g) {
421
+ var m = f.C[g];
422
+ null != m && null != m.J && m.state === f.ha.sb && m.J.resume().then(() => {
423
+ Na(m.kb);
424
+ }, n => {
425
+ console.error("Failed to resume audiocontext", n);
426
+ });
427
+ }
428
+ f.wb.map(function(n) {
429
+ document.removeEventListener(n, f.unlock, !0);
430
+ });
431
+ };
432
+ f.wb.map(function(g) {
433
+ document.addEventListener(g, f.unlock, !0);
434
+ });
435
+ }
436
+ window.h.Da += 1;
437
+ return 1;
438
+ }, 267146:() => {
439
+ "undefined" !== typeof window.h && (--window.h.Da, 0 === window.h.Da && delete window.h);
440
+ }, 267310:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 267414:() => {
441
+ try {
442
+ var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
443
+ a.close();
444
+ return b;
445
+ } catch (c) {
446
+ return 0;
447
+ }
448
+ }, 267585:(a, b, c, d, e, f) => {
449
+ if ("undefined" === typeof window.h) {
450
+ return -1;
451
+ }
452
+ var g = {}, m = {};
453
+ a == window.h.I.Ca && 0 != c && (m.sampleRate = c);
454
+ g.J = new (window.AudioContext || window.webkitAudioContext)(m);
455
+ g.J.suspend();
456
+ g.state = window.h.ha.stopped;
457
+ c = 0;
458
+ a != window.h.I.Ca && (c = b);
459
+ g.Z = g.J.createScriptProcessor(d, c, b);
460
+ g.Z.onaudioprocess = function(n) {
461
+ if (null == g.xa || 0 == g.xa.length) {
462
+ g.xa = new Float32Array(xa.buffer, e, d * b);
463
+ }
464
+ if (a == window.h.I.capture || a == window.h.I.La) {
465
+ for (var l = 0; l < b; l += 1) {
466
+ for (var u = n.inputBuffer.getChannelData(l), v = g.xa, q = 0; q < d; q += 1) {
467
+ v[q * b + l] = u[q];
468
+ }
469
+ }
470
+ Oa(f, d, e);
471
+ }
472
+ if (a == window.h.I.Ca || a == window.h.I.La) {
473
+ for (Pa(f, d, e), l = 0; l < n.outputBuffer.numberOfChannels; ++l) {
474
+ for (u = n.outputBuffer.getChannelData(l), v = g.xa, q = 0; q < d; q += 1) {
475
+ u[q] = v[q * b + l];
476
+ }
477
+ }
478
+ } else {
479
+ for (l = 0; l < n.outputBuffer.numberOfChannels; ++l) {
480
+ n.outputBuffer.getChannelData(l).fill(0.0);
481
+ }
482
+ }
483
+ };
484
+ a != window.h.I.capture && a != window.h.I.La || navigator.mediaDevices.getUserMedia({audio:!0, video:!1}).then(function(n) {
485
+ g.Ea = g.J.createMediaStreamSource(n);
486
+ g.Ea.connect(g.Z);
487
+ g.Z.connect(g.J.destination);
488
+ }).catch(function(n) {
489
+ console.log("Failed to get user media: " + n);
490
+ });
491
+ a == window.h.I.Ca && g.Z.connect(g.J.destination);
492
+ g.kb = f;
493
+ return window.h.tc(g);
494
+ }, 270462:a => window.h.wa(a).J.sampleRate, 270535:a => {
495
+ a = window.h.wa(a);
496
+ void 0 !== a.Z && (a.Z.onaudioprocess = function() {
497
+ }, a.Z.disconnect(), a.Z = void 0);
498
+ void 0 !== a.Ea && (a.Ea.disconnect(), a.Ea = void 0);
499
+ a.J.close();
500
+ a.J = void 0;
501
+ a.kb = void 0;
502
+ }, 270935:a => {
503
+ window.h.xb(a);
504
+ }, 270985:a => {
505
+ a = window.h.wa(a);
506
+ a.J.resume();
507
+ a.state = window.h.ha.sb;
508
+ }, 271124:a => {
509
+ a = window.h.wa(a);
510
+ a.J.suspend();
511
+ a.state = window.h.ha.stopped;
512
+ }}, Ra = (a, b) => {
513
+ for (var c = 0, d = a.length - 1; 0 <= d; d--) {
514
+ var e = a[d];
515
+ "." === e ? a.splice(d, 1) : ".." === e ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--);
516
+ }
517
+ if (b) {
518
+ for (; c; c--) {
519
+ a.unshift("..");
520
+ }
521
+ }
522
+ return a;
523
+ }, Sa = a => {
524
+ var b = "/" === a.charAt(0), c = "/" === a.substr(-1);
525
+ (a = Ra(a.split("/").filter(d => !!d), !b).join("/")) || b || (a = ".");
526
+ a && c && (a += "/");
527
+ return (b ? "/" : "") + a;
528
+ }, Ta = a => {
529
+ var b = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
530
+ a = b[0];
531
+ b = b[1];
532
+ if (!a && !b) {
533
+ return ".";
534
+ }
535
+ b && (b = b.substr(0, b.length - 1));
536
+ return a + b;
537
+ }, Ua = a => {
538
+ if ("/" === a) {
539
+ return "/";
540
+ }
541
+ a = Sa(a);
542
+ a = a.replace(/\/$/, "");
543
+ var b = a.lastIndexOf("/");
544
+ return -1 === b ? a : a.substr(b + 1);
545
+ }, Va = () => {
546
+ if ("object" == typeof crypto && "function" == typeof crypto.getRandomValues) {
547
+ return a => crypto.getRandomValues(a);
548
+ }
549
+ ta("initRandomDevice");
550
+ }, Wa = a => (Wa = Va())(a);
551
+ function Xa() {
552
+ for (var a = "", b = !1, c = arguments.length - 1; -1 <= c && !b; c--) {
553
+ b = 0 <= c ? arguments[c] : "/";
554
+ if ("string" != typeof b) {
555
+ throw new TypeError("Arguments to path.resolve must be strings");
556
+ }
557
+ if (!b) {
558
+ return "";
559
+ }
560
+ a = b + "/" + a;
561
+ b = "/" === b.charAt(0);
562
+ }
563
+ a = Ra(a.split("/").filter(d => !!d), !b).join("/");
564
+ return (b ? "/" : "") + a || ".";
565
+ }
566
+ var Ya = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, K = (a, b, c) => {
567
+ var d = b + c;
568
+ for (c = b; a[c] && !(c >= d);) {
569
+ ++c;
570
+ }
571
+ if (16 < c - b && a.buffer && Ya) {
572
+ return Ya.decode(a.subarray(b, c));
573
+ }
574
+ for (d = ""; b < c;) {
575
+ var e = a[b++];
576
+ if (e & 128) {
577
+ var f = a[b++] & 63;
578
+ if (192 == (e & 224)) {
579
+ d += String.fromCharCode((e & 31) << 6 | f);
580
+ } else {
581
+ var g = a[b++] & 63;
582
+ e = 224 == (e & 240) ? (e & 15) << 12 | f << 6 | g : (e & 7) << 18 | f << 12 | g << 6 | a[b++] & 63;
583
+ 65536 > e ? d += String.fromCharCode(e) : (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023));
584
+ }
585
+ } else {
586
+ d += String.fromCharCode(e);
587
+ }
588
+ }
589
+ return d;
590
+ }, Za = [], $a = a => {
591
+ for (var b = 0, c = 0; c < a.length; ++c) {
592
+ var d = a.charCodeAt(c);
593
+ 127 >= d ? b++ : 2047 >= d ? b += 2 : 55296 <= d && 57343 >= d ? (b += 4, ++c) : b += 3;
594
+ }
595
+ return b;
596
+ }, ab = (a, b, c, d) => {
597
+ if (!(0 < d)) {
598
+ return 0;
599
+ }
600
+ var e = c;
601
+ d = c + d - 1;
602
+ for (var f = 0; f < a.length; ++f) {
603
+ var g = a.charCodeAt(f);
604
+ if (55296 <= g && 57343 >= g) {
605
+ var m = a.charCodeAt(++f);
606
+ g = 65536 + ((g & 1023) << 10) | m & 1023;
607
+ }
608
+ if (127 >= g) {
609
+ if (c >= d) {
610
+ break;
611
+ }
612
+ b[c++] = g;
613
+ } else {
614
+ if (2047 >= g) {
615
+ if (c + 1 >= d) {
616
+ break;
617
+ }
618
+ b[c++] = 192 | g >> 6;
619
+ } else {
620
+ if (65535 >= g) {
621
+ if (c + 2 >= d) {
622
+ break;
623
+ }
624
+ b[c++] = 224 | g >> 12;
625
+ } else {
626
+ if (c + 3 >= d) {
627
+ break;
628
+ }
629
+ b[c++] = 240 | g >> 18;
630
+ b[c++] = 128 | g >> 12 & 63;
631
+ }
632
+ b[c++] = 128 | g >> 6 & 63;
633
+ }
634
+ b[c++] = 128 | g & 63;
635
+ }
636
+ }
637
+ b[c] = 0;
638
+ return c - e;
639
+ };
640
+ function bb(a, b) {
641
+ var c = Array($a(a) + 1);
642
+ a = ab(a, c, 0, c.length);
643
+ b && (c.length = a);
644
+ return c;
645
+ }
646
+ var cb = [];
647
+ function db(a, b) {
648
+ cb[a] = {input:[], D:[], W:b};
649
+ eb(a, fb);
650
+ }
651
+ var fb = {open:function(a) {
652
+ var b = cb[a.node.na];
653
+ if (!b) {
654
+ throw new L(43);
655
+ }
656
+ a.s = b;
657
+ a.seekable = !1;
658
+ }, close:function(a) {
659
+ a.s.W.va(a.s);
660
+ }, va:function(a) {
661
+ a.s.W.va(a.s);
662
+ }, read:function(a, b, c, d) {
663
+ if (!a.s || !a.s.W.cb) {
664
+ throw new L(60);
665
+ }
666
+ for (var e = 0, f = 0; f < d; f++) {
667
+ try {
668
+ var g = a.s.W.cb(a.s);
669
+ } catch (m) {
670
+ throw new L(29);
671
+ }
672
+ if (void 0 === g && 0 === e) {
673
+ throw new L(6);
674
+ }
675
+ if (null === g || void 0 === g) {
676
+ break;
677
+ }
678
+ e++;
679
+ b[c + f] = g;
680
+ }
681
+ e && (a.node.timestamp = Date.now());
682
+ return e;
683
+ }, write:function(a, b, c, d) {
684
+ if (!a.s || !a.s.W.Pa) {
685
+ throw new L(60);
686
+ }
687
+ try {
688
+ for (var e = 0; e < d; e++) {
689
+ a.s.W.Pa(a.s, b[c + e]);
690
+ }
691
+ } catch (f) {
692
+ throw new L(29);
693
+ }
694
+ d && (a.node.timestamp = Date.now());
695
+ return e;
696
+ },}, gb = {cb:function() {
697
+ a: {
698
+ if (!Za.length) {
699
+ var a = null;
700
+ "undefined" != typeof window && "function" == typeof window.prompt ? (a = window.prompt("Input: "), null !== a && (a += "\n")) : "function" == typeof readline && (a = readline(), null !== a && (a += "\n"));
701
+ if (!a) {
702
+ a = null;
703
+ break a;
704
+ }
705
+ Za = bb(a, !0);
706
+ }
707
+ a = Za.shift();
708
+ }
709
+ return a;
710
+ }, Pa:function(a, b) {
711
+ null === b || 10 === b ? (ra(K(a.D, 0)), a.D = []) : 0 != b && a.D.push(b);
712
+ }, va:function(a) {
713
+ a.D && 0 < a.D.length && (ra(K(a.D, 0)), a.D = []);
714
+ }, $b:function() {
715
+ return {yc:25856, Ac:5, xc:191, zc:35387, wc:[3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]};
716
+ }, ac:function() {
717
+ return 0;
718
+ }, bc:function() {
719
+ return [24, 80];
720
+ },}, hb = {Pa:function(a, b) {
721
+ null === b || 10 === b ? (sa(K(a.D, 0)), a.D = []) : 0 != b && a.D.push(b);
722
+ }, va:function(a) {
723
+ a.D && 0 < a.D.length && (sa(K(a.D, 0)), a.D = []);
724
+ },};
725
+ function ib(a, b) {
726
+ var c = a.l ? a.l.length : 0;
727
+ c >= b || (b = Math.max(b, c * (1048576 > c ? 2.0 : 1.125) >>> 0), 0 != c && (b = Math.max(b, 256)), c = a.l, a.l = new Uint8Array(b), 0 < a.v && a.l.set(c.subarray(0, a.v), 0));
728
+ }
729
+ var M = {R:null, V() {
730
+ return M.createNode(null, "/", 16895, 0);
731
+ }, createNode(a, b, c, d) {
732
+ if (24576 === (c & 61440) || 4096 === (c & 61440)) {
733
+ throw new L(63);
734
+ }
735
+ M.R || (M.R = {dir:{node:{O:M.j.O, S:M.j.S, ma:M.j.ma, Aa:M.j.Aa, qb:M.j.qb, vb:M.j.vb, rb:M.j.rb, ob:M.j.ob, Fa:M.j.Fa}, stream:{aa:M.m.aa}}, file:{node:{O:M.j.O, S:M.j.S}, stream:{aa:M.m.aa, read:M.m.read, write:M.m.write, ua:M.m.ua, gb:M.m.gb, ib:M.m.ib}}, link:{node:{O:M.j.O, S:M.j.S, oa:M.j.oa}, stream:{}}, Wa:{node:{O:M.j.O, S:M.j.S}, stream:jb}});
736
+ c = kb(a, b, c, d);
737
+ 16384 === (c.mode & 61440) ? (c.j = M.R.dir.node, c.m = M.R.dir.stream, c.l = {}) : 32768 === (c.mode & 61440) ? (c.j = M.R.file.node, c.m = M.R.file.stream, c.v = 0, c.l = null) : 40960 === (c.mode & 61440) ? (c.j = M.R.link.node, c.m = M.R.link.stream) : 8192 === (c.mode & 61440) && (c.j = M.R.Wa.node, c.m = M.R.Wa.stream);
738
+ c.timestamp = Date.now();
739
+ a && (a.l[b] = c, a.timestamp = c.timestamp);
740
+ return c;
741
+ }, Dc(a) {
742
+ return a.l ? a.l.subarray ? a.l.subarray(0, a.v) : new Uint8Array(a.l) : new Uint8Array(0);
743
+ }, j:{O(a) {
744
+ var b = {};
745
+ b.Kb = 8192 === (a.mode & 61440) ? a.id : 1;
746
+ b.eb = a.id;
747
+ b.mode = a.mode;
748
+ b.hc = 1;
749
+ b.uid = 0;
750
+ b.Vb = 0;
751
+ b.na = a.na;
752
+ 16384 === (a.mode & 61440) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.v : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
753
+ b.Db = new Date(a.timestamp);
754
+ b.ec = new Date(a.timestamp);
755
+ b.Hb = new Date(a.timestamp);
756
+ b.Eb = 4096;
757
+ b.Fb = Math.ceil(b.size / b.Eb);
758
+ return b;
759
+ }, S(a, b) {
760
+ void 0 !== b.mode && (a.mode = b.mode);
761
+ void 0 !== b.timestamp && (a.timestamp = b.timestamp);
762
+ if (void 0 !== b.size && (b = b.size, a.v != b)) {
763
+ if (0 == b) {
764
+ a.l = null, a.v = 0;
765
+ } else {
766
+ var c = a.l;
767
+ a.l = new Uint8Array(b);
768
+ c && a.l.set(c.subarray(0, Math.min(b, a.v)));
769
+ a.v = b;
770
+ }
771
+ }
772
+ }, ma() {
773
+ throw lb[44];
774
+ }, Aa(a, b, c, d) {
775
+ return M.createNode(a, b, c, d);
776
+ }, qb(a, b, c) {
777
+ if (16384 === (a.mode & 61440)) {
778
+ try {
779
+ var d = mb(b, c);
780
+ } catch (f) {
781
+ }
782
+ if (d) {
783
+ for (var e in d.l) {
784
+ throw new L(55);
785
+ }
786
+ }
787
+ }
788
+ delete a.parent.l[a.name];
789
+ a.parent.timestamp = Date.now();
790
+ a.name = c;
791
+ b.l[c] = a;
792
+ b.timestamp = a.parent.timestamp;
793
+ a.parent = b;
794
+ }, vb(a, b) {
795
+ delete a.l[b];
796
+ a.timestamp = Date.now();
797
+ }, rb(a, b) {
798
+ var c = mb(a, b), d;
799
+ for (d in c.l) {
800
+ throw new L(55);
801
+ }
802
+ delete a.l[b];
803
+ a.timestamp = Date.now();
804
+ }, ob(a) {
805
+ var b = [".", ".."], c;
806
+ for (c in a.l) {
807
+ a.l.hasOwnProperty(c) && b.push(c);
808
+ }
809
+ return b;
810
+ }, Fa(a, b, c) {
811
+ a = M.createNode(a, b, 41471, 0);
812
+ a.link = c;
813
+ return a;
814
+ }, oa(a) {
815
+ if (40960 !== (a.mode & 61440)) {
816
+ throw new L(28);
817
+ }
818
+ return a.link;
819
+ },}, m:{read(a, b, c, d, e) {
820
+ var f = a.node.l;
821
+ if (e >= a.node.v) {
822
+ return 0;
823
+ }
824
+ a = Math.min(a.node.v - e, d);
825
+ if (8 < a && f.subarray) {
826
+ b.set(f.subarray(e, e + a), c);
827
+ } else {
828
+ for (d = 0; d < a; d++) {
829
+ b[c + d] = f[e + d];
830
+ }
831
+ }
832
+ return a;
833
+ }, write(a, b, c, d, e, f) {
834
+ b.buffer === y.buffer && (f = !1);
835
+ if (!d) {
836
+ return 0;
837
+ }
838
+ a = a.node;
839
+ a.timestamp = Date.now();
840
+ if (b.subarray && (!a.l || a.l.subarray)) {
841
+ if (f) {
842
+ return a.l = b.subarray(c, c + d), a.v = d;
843
+ }
844
+ if (0 === a.v && 0 === e) {
845
+ return a.l = b.slice(c, c + d), a.v = d;
846
+ }
847
+ if (e + d <= a.v) {
848
+ return a.l.set(b.subarray(c, c + d), e), d;
849
+ }
850
+ }
851
+ ib(a, e + d);
852
+ if (a.l.subarray && b.subarray) {
853
+ a.l.set(b.subarray(c, c + d), e);
854
+ } else {
855
+ for (f = 0; f < d; f++) {
856
+ a.l[e + f] = b[c + f];
857
+ }
858
+ }
859
+ a.v = Math.max(a.v, e + d);
860
+ return d;
861
+ }, aa(a, b, c) {
862
+ 1 === c ? b += a.position : 2 === c && 32768 === (a.node.mode & 61440) && (b += a.node.v);
863
+ if (0 > b) {
864
+ throw new L(28);
865
+ }
866
+ return b;
867
+ }, ua(a, b, c) {
868
+ ib(a.node, b + c);
869
+ a.node.v = Math.max(a.node.v, b + c);
870
+ }, gb(a, b, c, d, e) {
871
+ if (32768 !== (a.node.mode & 61440)) {
872
+ throw new L(43);
873
+ }
874
+ a = a.node.l;
875
+ if (e & 2 || a.buffer !== y.buffer) {
876
+ if (0 < c || c + b < a.length) {
877
+ a.subarray ? a = a.subarray(c, c + b) : a = Array.prototype.slice.call(a, c, c + b);
878
+ }
879
+ c = !0;
880
+ ta();
881
+ b = void 0;
882
+ if (!b) {
883
+ throw new L(48);
884
+ }
885
+ y.set(a, b);
886
+ } else {
887
+ c = !1, b = a.byteOffset;
888
+ }
889
+ return {o:b, N:c};
890
+ }, ib(a, b, c, d) {
891
+ M.m.write(a, b, 0, d, c, !1);
892
+ return 0;
893
+ },},};
894
+ function nb(a, b) {
895
+ var c = 0;
896
+ a && (c |= 365);
897
+ b && (c |= 146);
898
+ return c;
899
+ }
900
+ var ob = null, pb = {}, qb = [], rb = 1, tb = null, ub = !0, L = null, lb = {}, wb = (a, b = {}) => {
901
+ a = Xa(a);
902
+ if (!a) {
903
+ return {path:"", node:null};
904
+ }
905
+ b = Object.assign({ab:!0, Ra:0}, b);
906
+ if (8 < b.Ra) {
907
+ throw new L(32);
908
+ }
909
+ a = a.split("/").filter(g => !!g);
910
+ for (var c = ob, d = "/", e = 0; e < a.length; e++) {
911
+ var f = e === a.length - 1;
912
+ if (f && b.parent) {
913
+ break;
914
+ }
915
+ c = mb(c, a[e]);
916
+ d = Sa(d + "/" + a[e]);
917
+ c.Ba && (!f || f && b.ab) && (c = c.Ba.root);
918
+ if (!f || b.Ma) {
919
+ for (f = 0; 40960 === (c.mode & 61440);) {
920
+ if (c = vb(d), d = Xa(Ta(d), c), c = wb(d, {Ra:b.Ra + 1}).node, 40 < f++) {
921
+ throw new L(32);
922
+ }
923
+ }
924
+ }
925
+ }
926
+ return {path:d, node:c};
927
+ }, xb = a => {
928
+ for (var b;;) {
929
+ if (a === a.parent) {
930
+ return a = a.V.hb, b ? "/" !== a[a.length - 1] ? `${a}/${b}` : a + b : a;
931
+ }
932
+ b = b ? `${a.name}/${b}` : a.name;
933
+ a = a.parent;
934
+ }
935
+ }, yb = (a, b) => {
936
+ for (var c = 0, d = 0; d < b.length; d++) {
937
+ c = (c << 5) - c + b.charCodeAt(d) | 0;
938
+ }
939
+ return (a + c >>> 0) % tb.length;
940
+ }, mb = (a, b) => {
941
+ var c;
942
+ if (c = (c = zb(a, "x")) ? c : a.j.ma ? 0 : 2) {
943
+ throw new L(c, a);
944
+ }
945
+ for (c = tb[yb(a.id, b)]; c; c = c.fc) {
946
+ var d = c.name;
947
+ if (c.parent.id === a.id && d === b) {
948
+ return c;
949
+ }
950
+ }
951
+ return a.j.ma(a, b);
952
+ }, kb = (a, b, c, d) => {
953
+ a = new Ab(a, b, c, d);
954
+ b = yb(a.parent.id, a.name);
955
+ a.fc = tb[b];
956
+ return tb[b] = a;
957
+ }, Bb = a => {
958
+ var b = ["r", "w", "rw"][a & 3];
959
+ a & 512 && (b += "w");
960
+ return b;
961
+ }, zb = (a, b) => {
962
+ if (ub) {
963
+ return 0;
964
+ }
965
+ if (!b.includes("r") || a.mode & 292) {
966
+ if (b.includes("w") && !(a.mode & 146) || b.includes("x") && !(a.mode & 73)) {
967
+ return 2;
968
+ }
969
+ } else {
970
+ return 2;
971
+ }
972
+ return 0;
973
+ }, Cb = (a, b) => {
974
+ try {
975
+ return mb(a, b), 20;
976
+ } catch (c) {
977
+ }
978
+ return zb(a, "wx");
979
+ }, Db = () => {
980
+ for (var a = 0; 4096 >= a; a++) {
981
+ if (!qb[a]) {
982
+ return a;
983
+ }
984
+ }
985
+ throw new L(33);
986
+ }, Eb = a => {
987
+ a = qb[a];
988
+ if (!a) {
989
+ throw new L(8);
990
+ }
991
+ return a;
992
+ }, Gb = (a, b = -1) => {
993
+ Fb || (Fb = function() {
994
+ this.h = {};
995
+ }, Fb.prototype = {}, Object.defineProperties(Fb.prototype, {object:{get() {
996
+ return this.node;
997
+ }, set(c) {
998
+ this.node = c;
999
+ }}, flags:{get() {
1000
+ return this.h.flags;
1001
+ }, set(c) {
1002
+ this.h.flags = c;
1003
+ },}, position:{get() {
1004
+ return this.h.position;
1005
+ }, set(c) {
1006
+ this.h.position = c;
1007
+ },},}));
1008
+ a = Object.assign(new Fb(), a);
1009
+ -1 == b && (b = Db());
1010
+ a.Y = b;
1011
+ return qb[b] = a;
1012
+ }, jb = {open:a => {
1013
+ a.m = pb[a.node.na].m;
1014
+ a.m.open && a.m.open(a);
1015
+ }, aa:() => {
1016
+ throw new L(70);
1017
+ },}, eb = (a, b) => {
1018
+ pb[a] = {m:b};
1019
+ }, Hb = (a, b) => {
1020
+ var c = "/" === b, d = !b;
1021
+ if (c && ob) {
1022
+ throw new L(10);
1023
+ }
1024
+ if (!c && !d) {
1025
+ var e = wb(b, {ab:!1});
1026
+ b = e.path;
1027
+ e = e.node;
1028
+ if (e.Ba) {
1029
+ throw new L(10);
1030
+ }
1031
+ if (16384 !== (e.mode & 61440)) {
1032
+ throw new L(54);
1033
+ }
1034
+ }
1035
+ b = {type:a, Lc:{}, hb:b, dc:[]};
1036
+ a = a.V(b);
1037
+ a.V = b;
1038
+ b.root = a;
1039
+ c ? ob = a : e && (e.Ba = b, e.V && e.V.dc.push(b));
1040
+ }, N = (a, b, c) => {
1041
+ var d = wb(a, {parent:!0}).node;
1042
+ a = Ua(a);
1043
+ if (!a || "." === a || ".." === a) {
1044
+ throw new L(28);
1045
+ }
1046
+ var e = Cb(d, a);
1047
+ if (e) {
1048
+ throw new L(e);
1049
+ }
1050
+ if (!d.j.Aa) {
1051
+ throw new L(63);
1052
+ }
1053
+ return d.j.Aa(d, a, b, c);
1054
+ }, Ib = (a, b, c) => {
1055
+ "undefined" == typeof c && (c = b, b = 438);
1056
+ N(a, b | 8192, c);
1057
+ }, Jb = (a, b) => {
1058
+ if (!Xa(a)) {
1059
+ throw new L(44);
1060
+ }
1061
+ var c = wb(b, {parent:!0}).node;
1062
+ if (!c) {
1063
+ throw new L(44);
1064
+ }
1065
+ b = Ua(b);
1066
+ var d = Cb(c, b);
1067
+ if (d) {
1068
+ throw new L(d);
1069
+ }
1070
+ if (!c.j.Fa) {
1071
+ throw new L(63);
1072
+ }
1073
+ c.j.Fa(c, b, a);
1074
+ }, vb = a => {
1075
+ a = wb(a).node;
1076
+ if (!a) {
1077
+ throw new L(44);
1078
+ }
1079
+ if (!a.j.oa) {
1080
+ throw new L(28);
1081
+ }
1082
+ return Xa(xb(a.parent), a.j.oa(a));
1083
+ }, Kb = (a, b) => {
1084
+ a = wb(a, {Ma:!b}).node;
1085
+ if (!a) {
1086
+ throw new L(44);
1087
+ }
1088
+ if (!a.j.O) {
1089
+ throw new L(63);
1090
+ }
1091
+ return a.j.O(a);
1092
+ }, Lb = a => Kb(a, !0), Nb = (a, b, c) => {
1093
+ if ("" === a) {
1094
+ throw new L(44);
1095
+ }
1096
+ if ("string" == typeof b) {
1097
+ var d = {r:0, "r+":2, w:577, "w+":578, a:1089, "a+":1090,}[b];
1098
+ if ("undefined" == typeof d) {
1099
+ throw Error(`Unknown file open mode: ${b}`);
1100
+ }
1101
+ b = d;
1102
+ }
1103
+ c = b & 64 ? ("undefined" == typeof c ? 438 : c) & 4095 | 32768 : 0;
1104
+ if ("object" == typeof a) {
1105
+ var e = a;
1106
+ } else {
1107
+ a = Sa(a);
1108
+ try {
1109
+ e = wb(a, {Ma:!(b & 131072)}).node;
1110
+ } catch (f) {
1111
+ }
1112
+ }
1113
+ d = !1;
1114
+ if (b & 64) {
1115
+ if (e) {
1116
+ if (b & 128) {
1117
+ throw new L(20);
1118
+ }
1119
+ } else {
1120
+ e = N(a, c, 0), d = !0;
1121
+ }
1122
+ }
1123
+ if (!e) {
1124
+ throw new L(44);
1125
+ }
1126
+ 8192 === (e.mode & 61440) && (b &= -513);
1127
+ if (b & 65536 && 16384 !== (e.mode & 61440)) {
1128
+ throw new L(54);
1129
+ }
1130
+ if (!d && (c = e ? 40960 === (e.mode & 61440) ? 32 : 16384 === (e.mode & 61440) && ("r" !== Bb(b) || b & 512) ? 31 : zb(e, Bb(b)) : 44)) {
1131
+ throw new L(c);
1132
+ }
1133
+ if (b & 512 && !d) {
1134
+ c = e;
1135
+ c = "string" == typeof c ? wb(c, {Ma:!0}).node : c;
1136
+ if (!c.j.S) {
1137
+ throw new L(63);
1138
+ }
1139
+ if (16384 === (c.mode & 61440)) {
1140
+ throw new L(31);
1141
+ }
1142
+ if (32768 !== (c.mode & 61440)) {
1143
+ throw new L(28);
1144
+ }
1145
+ if (d = zb(c, "w")) {
1146
+ throw new L(d);
1147
+ }
1148
+ c.j.S(c, {size:0, timestamp:Date.now()});
1149
+ }
1150
+ b &= -131713;
1151
+ e = Gb({node:e, path:xb(e), flags:b, seekable:!0, position:0, m:e.m, uc:[], error:!1});
1152
+ e.m.open && e.m.open(e);
1153
+ !p.logReadFiles || b & 1 || (Mb || (Mb = {}), a in Mb || (Mb[a] = 1));
1154
+ return e;
1155
+ }, Ob = (a, b, c) => {
1156
+ if (null === a.Y) {
1157
+ throw new L(8);
1158
+ }
1159
+ if (!a.seekable || !a.m.aa) {
1160
+ throw new L(70);
1161
+ }
1162
+ if (0 != c && 1 != c && 2 != c) {
1163
+ throw new L(28);
1164
+ }
1165
+ a.position = a.m.aa(a, b, c);
1166
+ a.uc = [];
1167
+ }, Pb = () => {
1168
+ L || (L = function(a, b) {
1169
+ this.name = "ErrnoError";
1170
+ this.node = b;
1171
+ this.kc = function(c) {
1172
+ this.L = c;
1173
+ };
1174
+ this.kc(a);
1175
+ this.message = "FS error";
1176
+ }, L.prototype = Error(), L.prototype.constructor = L, [44].forEach(a => {
1177
+ lb[a] = new L(a);
1178
+ lb[a].stack = "<generic error, no stack>";
1179
+ }));
1180
+ }, Qb, Sb = (a, b, c) => {
1181
+ a = Sa("/dev/" + a);
1182
+ var d = nb(!!b, !!c);
1183
+ Rb || (Rb = 64);
1184
+ var e = Rb++ << 8 | 0;
1185
+ eb(e, {open:f => {
1186
+ f.seekable = !1;
1187
+ }, close:() => {
1188
+ c && c.buffer && c.buffer.length && c(10);
1189
+ }, read:(f, g, m, n) => {
1190
+ for (var l = 0, u = 0; u < n; u++) {
1191
+ try {
1192
+ var v = b();
1193
+ } catch (q) {
1194
+ throw new L(29);
1195
+ }
1196
+ if (void 0 === v && 0 === l) {
1197
+ throw new L(6);
1198
+ }
1199
+ if (null === v || void 0 === v) {
1200
+ break;
1201
+ }
1202
+ l++;
1203
+ g[m + u] = v;
1204
+ }
1205
+ l && (f.node.timestamp = Date.now());
1206
+ return l;
1207
+ }, write:(f, g, m, n) => {
1208
+ for (var l = 0; l < n; l++) {
1209
+ try {
1210
+ c(g[m + l]);
1211
+ } catch (u) {
1212
+ throw new L(29);
1213
+ }
1214
+ }
1215
+ n && (f.node.timestamp = Date.now());
1216
+ return l;
1217
+ }});
1218
+ Ib(a, d, e);
1219
+ }, Rb, O = {}, Fb, Mb;
1220
+ function Tb(a, b, c) {
1221
+ if ("/" === b.charAt(0)) {
1222
+ return b;
1223
+ }
1224
+ a = -100 === a ? "/" : Eb(a).path;
1225
+ if (0 == b.length) {
1226
+ if (!c) {
1227
+ throw new L(44);
1228
+ }
1229
+ return a;
1230
+ }
1231
+ return Sa(a + "/" + b);
1232
+ }
1233
+ function Ub(a, b, c) {
1234
+ try {
1235
+ var d = a(b);
1236
+ } catch (f) {
1237
+ if (f && f.node && Sa(b) !== Sa(xb(f.node))) {
1238
+ return -54;
1239
+ }
1240
+ throw f;
1241
+ }
1242
+ D[c >> 2] = d.Kb;
1243
+ D[c + 4 >> 2] = d.mode;
1244
+ F[c + 8 >> 2] = d.hc;
1245
+ D[c + 12 >> 2] = d.uid;
1246
+ D[c + 16 >> 2] = d.Vb;
1247
+ D[c + 20 >> 2] = d.na;
1248
+ J = [d.size >>> 0, (I = d.size, 1.0 <= +Math.abs(I) ? 0.0 < I ? +Math.floor(I / 4294967296.0) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296.0) >>> 0 : 0)];
1249
+ D[c + 24 >> 2] = J[0];
1250
+ D[c + 28 >> 2] = J[1];
1251
+ D[c + 32 >> 2] = 4096;
1252
+ D[c + 36 >> 2] = d.Fb;
1253
+ a = d.Db.getTime();
1254
+ b = d.ec.getTime();
1255
+ var e = d.Hb.getTime();
1256
+ J = [Math.floor(a / 1000) >>> 0, (I = Math.floor(a / 1000), 1.0 <= +Math.abs(I) ? 0.0 < I ? +Math.floor(I / 4294967296.0) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296.0) >>> 0 : 0)];
1257
+ D[c + 40 >> 2] = J[0];
1258
+ D[c + 44 >> 2] = J[1];
1259
+ F[c + 48 >> 2] = a % 1000 * 1000;
1260
+ J = [Math.floor(b / 1000) >>> 0, (I = Math.floor(b / 1000), 1.0 <= +Math.abs(I) ? 0.0 < I ? +Math.floor(I / 4294967296.0) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296.0) >>> 0 : 0)];
1261
+ D[c + 56 >> 2] = J[0];
1262
+ D[c + 60 >> 2] = J[1];
1263
+ F[c + 64 >> 2] = b % 1000 * 1000;
1264
+ J = [Math.floor(e / 1000) >>> 0, (I = Math.floor(e / 1000), 1.0 <= +Math.abs(I) ? 0.0 < I ? +Math.floor(I / 4294967296.0) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296.0) >>> 0 : 0)];
1265
+ D[c + 72 >> 2] = J[0];
1266
+ D[c + 76 >> 2] = J[1];
1267
+ F[c + 80 >> 2] = e % 1000 * 1000;
1268
+ J = [d.eb >>> 0, (I = d.eb, 1.0 <= +Math.abs(I) ? 0.0 < I ? +Math.floor(I / 4294967296.0) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296.0) >>> 0 : 0)];
1269
+ D[c + 88 >> 2] = J[0];
1270
+ D[c + 92 >> 2] = J[1];
1271
+ return 0;
1272
+ }
1273
+ var Vb = void 0;
1274
+ function Wb() {
1275
+ Vb += 4;
1276
+ return D[Vb - 4 >> 2];
1277
+ }
1278
+ function Xb(a) {
1279
+ if (void 0 === a) {
1280
+ return "_unknown";
1281
+ }
1282
+ a = a.replace(/[^a-zA-Z0-9_]/g, "$");
1283
+ var b = a.charCodeAt(0);
1284
+ return 48 <= b && 57 >= b ? `_${a}` : a;
1285
+ }
1286
+ function Yb(a, b) {
1287
+ a = Xb(a);
1288
+ return {[a]:function() {
1289
+ return b.apply(this, arguments);
1290
+ }}[a];
1291
+ }
1292
+ function Zb() {
1293
+ this.N = [void 0];
1294
+ this.bb = [];
1295
+ }
1296
+ var P = new Zb(), $b = void 0;
1297
+ function Q(a) {
1298
+ throw new $b(a);
1299
+ }
1300
+ var R = a => {
1301
+ a || Q("Cannot use deleted val. handle = " + a);
1302
+ return P.get(a).value;
1303
+ }, ac = a => {
1304
+ switch(a) {
1305
+ case void 0:
1306
+ return 1;
1307
+ case null:
1308
+ return 2;
1309
+ case !0:
1310
+ return 3;
1311
+ case !1:
1312
+ return 4;
1313
+ default:
1314
+ return P.ua({pb:1, value:a});
1315
+ }
1316
+ };
1317
+ function bc(a) {
1318
+ var b = Error, c = Yb(a, function(d) {
1319
+ this.name = a;
1320
+ this.message = d;
1321
+ d = Error(d).stack;
1322
+ void 0 !== d && (this.stack = this.toString() + "\n" + d.replace(/^Error(:[^\n]*)?\n/, ""));
1323
+ });
1324
+ c.prototype = Object.create(b.prototype);
1325
+ c.prototype.constructor = c;
1326
+ c.prototype.toString = function() {
1327
+ return void 0 === this.message ? this.name : `${this.name}: ${this.message}`;
1328
+ };
1329
+ return c;
1330
+ }
1331
+ var cc = void 0, dc = void 0;
1332
+ function S(a) {
1333
+ for (var b = ""; B[a];) {
1334
+ b += dc[B[a++]];
1335
+ }
1336
+ return b;
1337
+ }
1338
+ var ec = [];
1339
+ function fc() {
1340
+ for (; ec.length;) {
1341
+ var a = ec.pop();
1342
+ a.g.ga = !1;
1343
+ a["delete"]();
1344
+ }
1345
+ }
1346
+ var gc = void 0, hc = {};
1347
+ function ic(a, b) {
1348
+ for (void 0 === b && Q("ptr should not be undefined"); a.A;) {
1349
+ b = a.qa(b), a = a.A;
1350
+ }
1351
+ return b;
1352
+ }
1353
+ var jc = {};
1354
+ function kc(a) {
1355
+ a = lc(a);
1356
+ var b = S(a);
1357
+ mc(a);
1358
+ return b;
1359
+ }
1360
+ function nc(a, b) {
1361
+ var c = jc[a];
1362
+ void 0 === c && Q(b + " has unknown type " + kc(a));
1363
+ return c;
1364
+ }
1365
+ function oc() {
1366
+ }
1367
+ var pc = !1;
1368
+ function qc(a) {
1369
+ --a.count.value;
1370
+ 0 === a.count.value && (a.G ? a.M.X(a.G) : a.u.i.X(a.o));
1371
+ }
1372
+ function rc(a, b, c) {
1373
+ if (b === c) {
1374
+ return a;
1375
+ }
1376
+ if (void 0 === c.A) {
1377
+ return null;
1378
+ }
1379
+ a = rc(a, b, c.A);
1380
+ return null === a ? null : c.Lb(a);
1381
+ }
1382
+ var sc = {};
1383
+ function tc(a, b) {
1384
+ b = ic(a, b);
1385
+ return hc[b];
1386
+ }
1387
+ var uc = void 0;
1388
+ function vc(a) {
1389
+ throw new uc(a);
1390
+ }
1391
+ function wc(a, b) {
1392
+ b.u && b.o || vc("makeClassHandle requires ptr and ptrType");
1393
+ !!b.M !== !!b.G && vc("Both smartPtrType and smartPtr must be specified");
1394
+ b.count = {value:1};
1395
+ return xc(Object.create(a, {g:{value:b,},}));
1396
+ }
1397
+ function xc(a) {
1398
+ if ("undefined" === typeof FinalizationRegistry) {
1399
+ return xc = b => b, a;
1400
+ }
1401
+ pc = new FinalizationRegistry(b => {
1402
+ qc(b.g);
1403
+ });
1404
+ xc = b => {
1405
+ var c = b.g;
1406
+ c.G && pc.register(b, {g:c}, b);
1407
+ return b;
1408
+ };
1409
+ oc = b => {
1410
+ pc.unregister(b);
1411
+ };
1412
+ return xc(a);
1413
+ }
1414
+ var yc = {};
1415
+ function zc(a) {
1416
+ for (; a.length;) {
1417
+ var b = a.pop();
1418
+ a.pop()(b);
1419
+ }
1420
+ }
1421
+ function Ac(a) {
1422
+ return this.fromWireType(D[a >> 2]);
1423
+ }
1424
+ var Bc = {}, Cc = {};
1425
+ function T(a, b, c) {
1426
+ function d(m) {
1427
+ m = c(m);
1428
+ m.length !== a.length && vc("Mismatched type converter count");
1429
+ for (var n = 0; n < a.length; ++n) {
1430
+ U(a[n], m[n]);
1431
+ }
1432
+ }
1433
+ a.forEach(function(m) {
1434
+ Cc[m] = b;
1435
+ });
1436
+ var e = Array(b.length), f = [], g = 0;
1437
+ b.forEach((m, n) => {
1438
+ jc.hasOwnProperty(m) ? e[n] = jc[m] : (f.push(m), Bc.hasOwnProperty(m) || (Bc[m] = []), Bc[m].push(() => {
1439
+ e[n] = jc[m];
1440
+ ++g;
1441
+ g === f.length && d(e);
1442
+ }));
1443
+ });
1444
+ 0 === f.length && d(e);
1445
+ }
1446
+ function Dc(a) {
1447
+ switch(a) {
1448
+ case 1:
1449
+ return 0;
1450
+ case 2:
1451
+ return 1;
1452
+ case 4:
1453
+ return 2;
1454
+ case 8:
1455
+ return 3;
1456
+ default:
1457
+ throw new TypeError(`Unknown type size: ${a}`);
1458
+ }
1459
+ }
1460
+ function Ec(a, b, c = {}) {
1461
+ var d = b.name;
1462
+ a || Q(`type "${d}" must have a positive integer typeid pointer`);
1463
+ if (jc.hasOwnProperty(a)) {
1464
+ if (c.Xb) {
1465
+ return;
1466
+ }
1467
+ Q(`Cannot register type '${d}' twice`);
1468
+ }
1469
+ jc[a] = b;
1470
+ delete Cc[a];
1471
+ Bc.hasOwnProperty(a) && (b = Bc[a], delete Bc[a], b.forEach(e => e()));
1472
+ }
1473
+ function U(a, b, c = {}) {
1474
+ if (!("argPackAdvance" in b)) {
1475
+ throw new TypeError("registerType registeredInstance requires argPackAdvance");
1476
+ }
1477
+ Ec(a, b, c);
1478
+ }
1479
+ function Fc(a) {
1480
+ Q(a.g.u.i.name + " instance already deleted");
1481
+ }
1482
+ function Gc() {
1483
+ }
1484
+ function Hc(a, b, c) {
1485
+ if (void 0 === a[b].B) {
1486
+ var d = a[b];
1487
+ a[b] = function() {
1488
+ a[b].B.hasOwnProperty(arguments.length) || Q(`Function '${c}' called with an invalid number of arguments (${arguments.length}) - expects one of (${a[b].B})!`);
1489
+ return a[b].B[arguments.length].apply(this, arguments);
1490
+ };
1491
+ a[b].B = [];
1492
+ a[b].B[d.fa] = d;
1493
+ }
1494
+ }
1495
+ function Ic(a, b, c) {
1496
+ p.hasOwnProperty(a) ? ((void 0 === c || void 0 !== p[a].B && void 0 !== p[a].B[c]) && Q(`Cannot register public name '${a}' twice`), Hc(p, a, a), p.hasOwnProperty(c) && Q(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`), p[a].B[c] = b) : (p[a] = b, void 0 !== c && (p[a].Kc = c));
1497
+ }
1498
+ function Jc(a, b, c, d, e, f, g, m) {
1499
+ this.name = a;
1500
+ this.constructor = b;
1501
+ this.P = c;
1502
+ this.X = d;
1503
+ this.A = e;
1504
+ this.Qb = f;
1505
+ this.qa = g;
1506
+ this.Lb = m;
1507
+ this.lb = [];
1508
+ }
1509
+ function Kc(a, b, c) {
1510
+ for (; b !== c;) {
1511
+ b.qa || Q(`Expected null or instance of ${c.name}, got an instance of ${b.name}`), a = b.qa(a), b = b.A;
1512
+ }
1513
+ return a;
1514
+ }
1515
+ function Lc(a, b) {
1516
+ if (null === b) {
1517
+ return this.Oa && Q(`null is not a valid ${this.name}`), 0;
1518
+ }
1519
+ b.g || Q(`Cannot pass "${Mc(b)}" as a ${this.name}`);
1520
+ b.g.o || Q(`Cannot pass deleted object as a pointer of type ${this.name}`);
1521
+ return Kc(b.g.o, b.g.u.i, this.i);
1522
+ }
1523
+ function Nc(a, b) {
1524
+ if (null === b) {
1525
+ this.Oa && Q(`null is not a valid ${this.name}`);
1526
+ if (this.za) {
1527
+ var c = this.Qa();
1528
+ null !== a && a.push(this.X, c);
1529
+ return c;
1530
+ }
1531
+ return 0;
1532
+ }
1533
+ b.g || Q(`Cannot pass "${Mc(b)}" as a ${this.name}`);
1534
+ b.g.o || Q(`Cannot pass deleted object as a pointer of type ${this.name}`);
1535
+ !this.ya && b.g.u.ya && Q(`Cannot convert argument of type ${b.g.M ? b.g.M.name : b.g.u.name} to parameter type ${this.name}`);
1536
+ c = Kc(b.g.o, b.g.u.i, this.i);
1537
+ if (this.za) {
1538
+ switch(void 0 === b.g.G && Q("Passing raw pointer to smart pointer is illegal"), this.oc) {
1539
+ case 0:
1540
+ b.g.M === this ? c = b.g.G : Q(`Cannot convert argument of type ${b.g.M ? b.g.M.name : b.g.u.name} to parameter type ${this.name}`);
1541
+ break;
1542
+ case 1:
1543
+ c = b.g.G;
1544
+ break;
1545
+ case 2:
1546
+ if (b.g.M === this) {
1547
+ c = b.g.G;
1548
+ } else {
1549
+ var d = b.clone();
1550
+ c = this.jc(c, ac(function() {
1551
+ d["delete"]();
1552
+ }));
1553
+ null !== a && a.push(this.X, c);
1554
+ }
1555
+ break;
1556
+ default:
1557
+ Q("Unsupporting sharing policy");
1558
+ }
1559
+ }
1560
+ return c;
1561
+ }
1562
+ function Oc(a, b) {
1563
+ if (null === b) {
1564
+ return this.Oa && Q(`null is not a valid ${this.name}`), 0;
1565
+ }
1566
+ b.g || Q(`Cannot pass "${Mc(b)}" as a ${this.name}`);
1567
+ b.g.o || Q(`Cannot pass deleted object as a pointer of type ${this.name}`);
1568
+ b.g.u.ya && Q(`Cannot convert argument of type ${b.g.u.name} to parameter type ${this.name}`);
1569
+ return Kc(b.g.o, b.g.u.i, this.i);
1570
+ }
1571
+ function Pc(a, b, c, d) {
1572
+ this.name = a;
1573
+ this.i = b;
1574
+ this.Oa = c;
1575
+ this.ya = d;
1576
+ this.za = !1;
1577
+ this.X = this.jc = this.Qa = this.nb = this.oc = this.ic = void 0;
1578
+ void 0 !== b.A ? this.toWireType = Nc : (this.toWireType = d ? Lc : Oc, this.K = null);
1579
+ }
1580
+ function Qc(a, b, c) {
1581
+ p.hasOwnProperty(a) || vc("Replacing nonexistant public symbol");
1582
+ void 0 !== p[a].B && void 0 !== c ? p[a].B[c] = b : (p[a] = b, p[a].fa = c);
1583
+ }
1584
+ var Rc = [], Sc = a => {
1585
+ var b = Rc[a];
1586
+ b || (a >= Rc.length && (Rc.length = a + 1), Rc[a] = b = Aa.get(a));
1587
+ return b;
1588
+ }, Tc = (a, b) => {
1589
+ var c = [];
1590
+ return function() {
1591
+ c.length = 0;
1592
+ Object.assign(c, arguments);
1593
+ if (a.includes("j")) {
1594
+ var d = p["dynCall_" + a];
1595
+ d = c && c.length ? d.apply(null, [b].concat(c)) : d.call(null, b);
1596
+ } else {
1597
+ d = Sc(b).apply(null, c);
1598
+ }
1599
+ return d;
1600
+ };
1601
+ };
1602
+ function V(a, b) {
1603
+ a = S(a);
1604
+ var c = a.includes("j") ? Tc(a, b) : Sc(b);
1605
+ "function" != typeof c && Q(`unknown function pointer with signature ${a}: ${b}`);
1606
+ return c;
1607
+ }
1608
+ var Uc = void 0;
1609
+ function Vc(a, b) {
1610
+ function c(f) {
1611
+ e[f] || jc[f] || (Cc[f] ? Cc[f].forEach(c) : (d.push(f), e[f] = !0));
1612
+ }
1613
+ var d = [], e = {};
1614
+ b.forEach(c);
1615
+ throw new Uc(`${a}: ` + d.map(kc).join([", "]));
1616
+ }
1617
+ function Wc(a, b, c, d, e) {
1618
+ var f = b.length;
1619
+ 2 > f && Q("argTypes array size mismatch! Must at least get return value and 'this' types!");
1620
+ var g = null !== b[1] && null !== c, m = !1;
1621
+ for (c = 1; c < b.length; ++c) {
1622
+ if (null !== b[c] && void 0 === b[c].K) {
1623
+ m = !0;
1624
+ break;
1625
+ }
1626
+ }
1627
+ var n = "void" !== b[0].name, l = f - 2, u = Array(l), v = [], q = [];
1628
+ return function() {
1629
+ arguments.length !== l && Q(`function ${a} called with ${arguments.length} arguments, expected ${l} args!`);
1630
+ q.length = 0;
1631
+ v.length = g ? 2 : 1;
1632
+ v[0] = e;
1633
+ if (g) {
1634
+ var k = b[1].toWireType(q, this);
1635
+ v[1] = k;
1636
+ }
1637
+ for (var r = 0; r < l; ++r) {
1638
+ u[r] = b[r + 2].toWireType(q, arguments[r]), v.push(u[r]);
1639
+ }
1640
+ r = d.apply(null, v);
1641
+ if (m) {
1642
+ zc(q);
1643
+ } else {
1644
+ for (var w = g ? 1 : 2; w < b.length; w++) {
1645
+ var z = 1 === w ? k : u[w - 2];
1646
+ null !== b[w].K && b[w].K(z);
1647
+ }
1648
+ }
1649
+ k = n ? b[0].fromWireType(r) : void 0;
1650
+ return k;
1651
+ };
1652
+ }
1653
+ function Xc(a, b) {
1654
+ for (var c = [], d = 0; d < a; d++) {
1655
+ c.push(F[b + 4 * d >> 2]);
1656
+ }
1657
+ return c;
1658
+ }
1659
+ function Yc(a, b, c) {
1660
+ a instanceof Object || Q(`${c} with invalid "this": ${a}`);
1661
+ a instanceof b.i.constructor || Q(`${c} incompatible with "this" of type ${a.constructor.name}`);
1662
+ a.g.o || Q(`cannot call emscripten binding method ${c} on deleted object`);
1663
+ return Kc(a.g.o, a.g.u.i, b.i);
1664
+ }
1665
+ function Zc(a) {
1666
+ a >= P.h && 0 === --P.get(a).pb && P.Wb(a);
1667
+ }
1668
+ function $c(a, b, c) {
1669
+ switch(b) {
1670
+ case 0:
1671
+ return function(d) {
1672
+ return this.fromWireType((c ? y : B)[d]);
1673
+ };
1674
+ case 1:
1675
+ return function(d) {
1676
+ return this.fromWireType((c ? C : wa)[d >> 1]);
1677
+ };
1678
+ case 2:
1679
+ return function(d) {
1680
+ return this.fromWireType((c ? D : F)[d >> 2]);
1681
+ };
1682
+ default:
1683
+ throw new TypeError("Unknown integer type: " + a);
1684
+ }
1685
+ }
1686
+ function Mc(a) {
1687
+ if (null === a) {
1688
+ return "null";
1689
+ }
1690
+ var b = typeof a;
1691
+ return "object" === b || "array" === b || "function" === b ? a.toString() : "" + a;
1692
+ }
1693
+ function ad(a, b) {
1694
+ switch(b) {
1695
+ case 2:
1696
+ return function(c) {
1697
+ return this.fromWireType(xa[c >> 2]);
1698
+ };
1699
+ case 3:
1700
+ return function(c) {
1701
+ return this.fromWireType(ya[c >> 3]);
1702
+ };
1703
+ default:
1704
+ throw new TypeError("Unknown float type: " + a);
1705
+ }
1706
+ }
1707
+ function bd(a, b, c) {
1708
+ switch(b) {
1709
+ case 0:
1710
+ return c ? function(d) {
1711
+ return y[d];
1712
+ } : function(d) {
1713
+ return B[d];
1714
+ };
1715
+ case 1:
1716
+ return c ? function(d) {
1717
+ return C[d >> 1];
1718
+ } : function(d) {
1719
+ return wa[d >> 1];
1720
+ };
1721
+ case 2:
1722
+ return c ? function(d) {
1723
+ return D[d >> 2];
1724
+ } : function(d) {
1725
+ return F[d >> 2];
1726
+ };
1727
+ default:
1728
+ throw new TypeError("Unknown integer type: " + a);
1729
+ }
1730
+ }
1731
+ var cd = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, dd = (a, b) => {
1732
+ var c = a >> 1;
1733
+ for (var d = c + b / 2; !(c >= d) && wa[c];) {
1734
+ ++c;
1735
+ }
1736
+ c <<= 1;
1737
+ if (32 < c - a && cd) {
1738
+ return cd.decode(B.subarray(a, c));
1739
+ }
1740
+ c = "";
1741
+ for (d = 0; !(d >= b / 2); ++d) {
1742
+ var e = C[a + 2 * d >> 1];
1743
+ if (0 == e) {
1744
+ break;
1745
+ }
1746
+ c += String.fromCharCode(e);
1747
+ }
1748
+ return c;
1749
+ }, ed = (a, b, c) => {
1750
+ void 0 === c && (c = 2147483647);
1751
+ if (2 > c) {
1752
+ return 0;
1753
+ }
1754
+ c -= 2;
1755
+ var d = b;
1756
+ c = c < 2 * a.length ? c / 2 : a.length;
1757
+ for (var e = 0; e < c; ++e) {
1758
+ C[b >> 1] = a.charCodeAt(e), b += 2;
1759
+ }
1760
+ C[b >> 1] = 0;
1761
+ return b - d;
1762
+ }, fd = a => 2 * a.length, gd = (a, b) => {
1763
+ for (var c = 0, d = ""; !(c >= b / 4);) {
1764
+ var e = D[a + 4 * c >> 2];
1765
+ if (0 == e) {
1766
+ break;
1767
+ }
1768
+ ++c;
1769
+ 65536 <= e ? (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : d += String.fromCharCode(e);
1770
+ }
1771
+ return d;
1772
+ }, hd = (a, b, c) => {
1773
+ void 0 === c && (c = 2147483647);
1774
+ if (4 > c) {
1775
+ return 0;
1776
+ }
1777
+ var d = b;
1778
+ c = d + c - 4;
1779
+ for (var e = 0; e < a.length; ++e) {
1780
+ var f = a.charCodeAt(e);
1781
+ if (55296 <= f && 57343 >= f) {
1782
+ var g = a.charCodeAt(++e);
1783
+ f = 65536 + ((f & 1023) << 10) | g & 1023;
1784
+ }
1785
+ D[b >> 2] = f;
1786
+ b += 4;
1787
+ if (b + 4 > c) {
1788
+ break;
1789
+ }
1790
+ }
1791
+ D[b >> 2] = 0;
1792
+ return b - d;
1793
+ }, jd = a => {
1794
+ for (var b = 0, c = 0; c < a.length; ++c) {
1795
+ var d = a.charCodeAt(c);
1796
+ 55296 <= d && 57343 >= d && ++c;
1797
+ b += 4;
1798
+ }
1799
+ return b;
1800
+ }, kd = {};
1801
+ function ld(a) {
1802
+ var b = kd[a];
1803
+ return void 0 === b ? S(a) : b;
1804
+ }
1805
+ var md = [];
1806
+ function nd(a) {
1807
+ var b = md.length;
1808
+ md.push(a);
1809
+ return b;
1810
+ }
1811
+ function od(a, b) {
1812
+ for (var c = Array(a), d = 0; d < a; ++d) {
1813
+ c[d] = nc(F[b + 4 * d >> 2], "parameter " + d);
1814
+ }
1815
+ return c;
1816
+ }
1817
+ var pd = [], qd = [];
1818
+ function rd(a) {
1819
+ a.Cc = a.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");
1820
+ }
1821
+ function sd(a) {
1822
+ a.Ic = a.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");
1823
+ }
1824
+ var td = 1, ud = [], W = [], vd = [], wd = [], X = [], xd = [], yd = [], t = [], zd = {};
1825
+ function Y(a) {
1826
+ Ad || (Ad = a);
1827
+ }
1828
+ function ia(a) {
1829
+ for (var b = td++, c = a.length; c < b; c++) {
1830
+ a[c] = null;
1831
+ }
1832
+ return b;
1833
+ }
1834
+ function ka(a) {
1835
+ Bd = t[a];
1836
+ p.Bc = Z = Bd && Bd.H;
1837
+ return !(a && !Z);
1838
+ }
1839
+ function ja(a) {
1840
+ a || (a = Bd);
1841
+ if (!a.Yb) {
1842
+ a.Yb = !0;
1843
+ var b = a.H;
1844
+ rd(b);
1845
+ sd(b);
1846
+ 2 <= a.version && (b.Za = b.getExtension("EXT_disjoint_timer_query_webgl2"));
1847
+ if (2 > a.version || !b.Za) {
1848
+ b.Za = b.getExtension("EXT_disjoint_timer_query");
1849
+ }
1850
+ Cd(b);
1851
+ (b.getSupportedExtensions() || []).forEach(function(c) {
1852
+ c.includes("lose_context") || c.includes("debug") || b.getExtension(c);
1853
+ });
1854
+ }
1855
+ }
1856
+ var Ad, Bd;
1857
+ function Cd(a) {
1858
+ a.Jc = a.getExtension("WEBGL_multi_draw");
1859
+ }
1860
+ var Dd = {}, Fd = () => {
1861
+ if (!Ed) {
1862
+ var a = {USER:"web_user", LOGNAME:"web_user", PATH:"/", PWD:"/", HOME:"/home/web_user", LANG:("object" == typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", _:"./this.program"}, b;
1863
+ for (b in Dd) {
1864
+ void 0 === Dd[b] ? delete a[b] : a[b] = Dd[b];
1865
+ }
1866
+ var c = [];
1867
+ for (b in a) {
1868
+ c.push(`${b}=${a[b]}`);
1869
+ }
1870
+ Ed = c;
1871
+ }
1872
+ return Ed;
1873
+ }, Ed, Gd = [];
1874
+ function Hd(a, b, c, d) {
1875
+ for (var e = 0; e < a; e++) {
1876
+ var f = Z[c](), g = f && ia(d);
1877
+ f ? (f.name = g, d[g] = f) : Y(1282);
1878
+ D[b + 4 * e >> 2] = g;
1879
+ }
1880
+ }
1881
+ function Id(a, b) {
1882
+ if (b) {
1883
+ var c = void 0;
1884
+ switch(a) {
1885
+ case 36346:
1886
+ c = 1;
1887
+ break;
1888
+ case 36344:
1889
+ return;
1890
+ case 34814:
1891
+ case 36345:
1892
+ c = 0;
1893
+ break;
1894
+ case 34466:
1895
+ var d = Z.getParameter(34467);
1896
+ c = d ? d.length : 0;
1897
+ break;
1898
+ case 33309:
1899
+ if (2 > Bd.version) {
1900
+ Y(1282);
1901
+ return;
1902
+ }
1903
+ c = 2 * (Z.getSupportedExtensions() || []).length;
1904
+ break;
1905
+ case 33307:
1906
+ case 33308:
1907
+ if (2 > Bd.version) {
1908
+ Y(1280);
1909
+ return;
1910
+ }
1911
+ c = 33307 == a ? 3 : 0;
1912
+ }
1913
+ if (void 0 === c) {
1914
+ switch(d = Z.getParameter(a), typeof d) {
1915
+ case "number":
1916
+ c = d;
1917
+ break;
1918
+ case "boolean":
1919
+ c = d ? 1 : 0;
1920
+ break;
1921
+ case "string":
1922
+ Y(1280);
1923
+ return;
1924
+ case "object":
1925
+ if (null === d) {
1926
+ switch(a) {
1927
+ case 34964:
1928
+ case 35725:
1929
+ case 34965:
1930
+ case 36006:
1931
+ case 36007:
1932
+ case 32873:
1933
+ case 34229:
1934
+ case 36662:
1935
+ case 36663:
1936
+ case 35053:
1937
+ case 35055:
1938
+ case 36010:
1939
+ case 35097:
1940
+ case 35869:
1941
+ case 32874:
1942
+ case 36389:
1943
+ case 35983:
1944
+ case 35368:
1945
+ case 34068:
1946
+ c = 0;
1947
+ break;
1948
+ default:
1949
+ Y(1280);
1950
+ return;
1951
+ }
1952
+ } else {
1953
+ if (d instanceof Float32Array || d instanceof Uint32Array || d instanceof Int32Array || d instanceof Array) {
1954
+ for (a = 0; a < d.length; ++a) {
1955
+ D[b + 4 * a >> 2] = d[a];
1956
+ }
1957
+ return;
1958
+ }
1959
+ try {
1960
+ c = d.name | 0;
1961
+ } catch (e) {
1962
+ Y(1280);
1963
+ sa("GL_INVALID_ENUM in glGet0v: Unknown object returned from WebGL getParameter(" + a + ")! (error: " + e + ")");
1964
+ return;
1965
+ }
1966
+ }
1967
+ break;
1968
+ default:
1969
+ Y(1280);
1970
+ sa("GL_INVALID_ENUM in glGet0v: Native code calling glGet0v(" + a + ") and it returns " + d + " of type " + typeof d + "!");
1971
+ return;
1972
+ }
1973
+ }
1974
+ D[b >> 2] = c;
1975
+ } else {
1976
+ Y(1281);
1977
+ }
1978
+ }
1979
+ var Kd = a => {
1980
+ var b = $a(a) + 1, c = Jd(b);
1981
+ c && ab(a, B, c, b);
1982
+ return c;
1983
+ };
1984
+ function Ld(a) {
1985
+ return "]" == a.slice(-1) && a.lastIndexOf("[");
1986
+ }
1987
+ var Md = a => 0 === a % 4 && (0 !== a % 100 || 0 === a % 400), Nd = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Od = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Pd = (a, b, c, d) => {
1988
+ function e(k, r, w) {
1989
+ for (k = "number" == typeof k ? k.toString() : k || ""; k.length < r;) {
1990
+ k = w[0] + k;
1991
+ }
1992
+ return k;
1993
+ }
1994
+ function f(k, r) {
1995
+ return e(k, r, "0");
1996
+ }
1997
+ function g(k, r) {
1998
+ function w(G) {
1999
+ return 0 > G ? -1 : 0 < G ? 1 : 0;
2000
+ }
2001
+ var z;
2002
+ 0 === (z = w(k.getFullYear() - r.getFullYear())) && 0 === (z = w(k.getMonth() - r.getMonth())) && (z = w(k.getDate() - r.getDate()));
2003
+ return z;
2004
+ }
2005
+ function m(k) {
2006
+ switch(k.getDay()) {
2007
+ case 0:
2008
+ return new Date(k.getFullYear() - 1, 11, 29);
2009
+ case 1:
2010
+ return k;
2011
+ case 2:
2012
+ return new Date(k.getFullYear(), 0, 3);
2013
+ case 3:
2014
+ return new Date(k.getFullYear(), 0, 2);
2015
+ case 4:
2016
+ return new Date(k.getFullYear(), 0, 1);
2017
+ case 5:
2018
+ return new Date(k.getFullYear() - 1, 11, 31);
2019
+ case 6:
2020
+ return new Date(k.getFullYear() - 1, 11, 30);
2021
+ }
2022
+ }
2023
+ function n(k) {
2024
+ var r = k.ba;
2025
+ for (k = new Date((new Date(k.ca + 1900, 0, 1)).getTime()); 0 < r;) {
2026
+ var w = k.getMonth(), z = (Md(k.getFullYear()) ? Nd : Od)[w];
2027
+ if (r > z - k.getDate()) {
2028
+ r -= z - k.getDate() + 1, k.setDate(1), 11 > w ? k.setMonth(w + 1) : (k.setMonth(0), k.setFullYear(k.getFullYear() + 1));
2029
+ } else {
2030
+ k.setDate(k.getDate() + r);
2031
+ break;
2032
+ }
2033
+ }
2034
+ w = new Date(k.getFullYear() + 1, 0, 4);
2035
+ r = m(new Date(k.getFullYear(), 0, 4));
2036
+ w = m(w);
2037
+ return 0 >= g(r, k) ? 0 >= g(w, k) ? k.getFullYear() + 1 : k.getFullYear() : k.getFullYear() - 1;
2038
+ }
2039
+ var l = D[d + 40 >> 2];
2040
+ d = {rc:D[d >> 2], qc:D[d + 4 >> 2], Ga:D[d + 8 >> 2], Sa:D[d + 12 >> 2], Ha:D[d + 16 >> 2], ca:D[d + 20 >> 2], T:D[d + 24 >> 2], ba:D[d + 28 >> 2], Mc:D[d + 32 >> 2], pc:D[d + 36 >> 2], sc:l ? l ? K(B, l) : "" : ""};
2041
+ c = c ? K(B, c) : "";
2042
+ l = {"%c":"%a %b %d %H:%M:%S %Y", "%D":"%m/%d/%y", "%F":"%Y-%m-%d", "%h":"%b", "%r":"%I:%M:%S %p", "%R":"%H:%M", "%T":"%H:%M:%S", "%x":"%m/%d/%y", "%X":"%H:%M:%S", "%Ec":"%c", "%EC":"%C", "%Ex":"%m/%d/%y", "%EX":"%H:%M:%S", "%Ey":"%y", "%EY":"%Y", "%Od":"%d", "%Oe":"%e", "%OH":"%H", "%OI":"%I", "%Om":"%m", "%OM":"%M", "%OS":"%S", "%Ou":"%u", "%OU":"%U", "%OV":"%V", "%Ow":"%w", "%OW":"%W", "%Oy":"%y",};
2043
+ for (var u in l) {
2044
+ c = c.replace(new RegExp(u, "g"), l[u]);
2045
+ }
2046
+ var v = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), q = "January February March April May June July August September October November December".split(" ");
2047
+ l = {"%a":k => v[k.T].substring(0, 3), "%A":k => v[k.T], "%b":k => q[k.Ha].substring(0, 3), "%B":k => q[k.Ha], "%C":k => f((k.ca + 1900) / 100 | 0, 2), "%d":k => f(k.Sa, 2), "%e":k => e(k.Sa, 2, " "), "%g":k => n(k).toString().substring(2), "%G":k => n(k), "%H":k => f(k.Ga, 2), "%I":k => {
2048
+ k = k.Ga;
2049
+ 0 == k ? k = 12 : 12 < k && (k -= 12);
2050
+ return f(k, 2);
2051
+ }, "%j":k => {
2052
+ for (var r = 0, w = 0; w <= k.Ha - 1; r += (Md(k.ca + 1900) ? Nd : Od)[w++]) {
2053
+ }
2054
+ return f(k.Sa + r, 3);
2055
+ }, "%m":k => f(k.Ha + 1, 2), "%M":k => f(k.qc, 2), "%n":() => "\n", "%p":k => 0 <= k.Ga && 12 > k.Ga ? "AM" : "PM", "%S":k => f(k.rc, 2), "%t":() => "\t", "%u":k => k.T || 7, "%U":k => f(Math.floor((k.ba + 7 - k.T) / 7), 2), "%V":k => {
2056
+ var r = Math.floor((k.ba + 7 - (k.T + 6) % 7) / 7);
2057
+ 2 >= (k.T + 371 - k.ba - 2) % 7 && r++;
2058
+ if (r) {
2059
+ 53 == r && (w = (k.T + 371 - k.ba) % 7, 4 == w || 3 == w && Md(k.ca) || (r = 1));
2060
+ } else {
2061
+ r = 52;
2062
+ var w = (k.T + 7 - k.ba - 1) % 7;
2063
+ (4 == w || 5 == w && Md(k.ca % 400 - 1)) && r++;
2064
+ }
2065
+ return f(r, 2);
2066
+ }, "%w":k => k.T, "%W":k => f(Math.floor((k.ba + 7 - (k.T + 6) % 7) / 7), 2), "%y":k => (k.ca + 1900).toString().substring(2), "%Y":k => k.ca + 1900, "%z":k => {
2067
+ k = k.pc;
2068
+ var r = 0 <= k;
2069
+ k = Math.abs(k) / 60;
2070
+ return (r ? "+" : "-") + String("0000" + (k / 60 * 100 + k % 60)).slice(-4);
2071
+ }, "%Z":k => k.sc, "%%":() => "%"};
2072
+ c = c.replace(/%%/g, "\x00\x00");
2073
+ for (u in l) {
2074
+ c.includes(u) && (c = c.replace(new RegExp(u, "g"), l[u](d)));
2075
+ }
2076
+ c = c.replace(/\0\0/g, "%");
2077
+ u = bb(c, !1);
2078
+ if (u.length > b) {
2079
+ return 0;
2080
+ }
2081
+ y.set(u, a);
2082
+ return u.length - 1;
2083
+ };
2084
+ function Ab(a, b, c, d) {
2085
+ a || (a = this);
2086
+ this.parent = a;
2087
+ this.V = a.V;
2088
+ this.Ba = null;
2089
+ this.id = rb++;
2090
+ this.name = b;
2091
+ this.mode = c;
2092
+ this.j = {};
2093
+ this.m = {};
2094
+ this.na = d;
2095
+ }
2096
+ Object.defineProperties(Ab.prototype, {read:{get:function() {
2097
+ return 365 === (this.mode & 365);
2098
+ }, set:function(a) {
2099
+ a ? this.mode |= 365 : this.mode &= -366;
2100
+ }}, write:{get:function() {
2101
+ return 146 === (this.mode & 146);
2102
+ }, set:function(a) {
2103
+ a ? this.mode |= 146 : this.mode &= -147;
2104
+ }}});
2105
+ Pb();
2106
+ tb = Array(4096);
2107
+ Hb(M, "/");
2108
+ N("/tmp", 16895, 0);
2109
+ N("/home", 16895, 0);
2110
+ N("/home/web_user", 16895, 0);
2111
+ (() => {
2112
+ N("/dev", 16895, 0);
2113
+ eb(259, {read:() => 0, write:(d, e, f, g) => g,});
2114
+ Ib("/dev/null", 259);
2115
+ db(1280, gb);
2116
+ db(1536, hb);
2117
+ Ib("/dev/tty", 1280);
2118
+ Ib("/dev/tty1", 1536);
2119
+ var a = new Uint8Array(1024), b = 0, c = () => {
2120
+ 0 === b && (b = Wa(a).byteLength);
2121
+ return a[--b];
2122
+ };
2123
+ Sb("random", c);
2124
+ Sb("urandom", c);
2125
+ N("/dev/shm", 16895, 0);
2126
+ N("/dev/shm/tmp", 16895, 0);
2127
+ })();
2128
+ (() => {
2129
+ N("/proc", 16895, 0);
2130
+ var a = N("/proc/self", 16895, 0);
2131
+ N("/proc/self/fd", 16895, 0);
2132
+ Hb({V:() => {
2133
+ var b = kb(a, "fd", 16895, 73);
2134
+ b.j = {ma:(c, d) => {
2135
+ var e = Eb(+d);
2136
+ c = {parent:null, V:{hb:"fake"}, j:{oa:() => e.path},};
2137
+ return c.parent = c;
2138
+ }};
2139
+ return b;
2140
+ }}, "/proc/self/fd");
2141
+ })();
2142
+ Object.assign(Zb.prototype, {get(a) {
2143
+ return this.N[a];
2144
+ }, has(a) {
2145
+ return void 0 !== this.N[a];
2146
+ }, ua(a) {
2147
+ var b = this.bb.pop() || this.N.length;
2148
+ this.N[b] = a;
2149
+ return b;
2150
+ }, Wb(a) {
2151
+ this.N[a] = void 0;
2152
+ this.bb.push(a);
2153
+ }});
2154
+ $b = p.BindingError = class extends Error {
2155
+ constructor(a) {
2156
+ super(a);
2157
+ this.name = "BindingError";
2158
+ }
2159
+ };
2160
+ P.N.push({value:void 0}, {value:null}, {value:!0}, {value:!1},);
2161
+ P.h = P.N.length;
2162
+ p.count_emval_handles = function() {
2163
+ for (var a = 0, b = P.h; b < P.N.length; ++b) {
2164
+ void 0 !== P.N[b] && ++a;
2165
+ }
2166
+ return a;
2167
+ };
2168
+ cc = p.PureVirtualError = bc("PureVirtualError");
2169
+ for (var Qd = Array(256), Rd = 0; 256 > Rd; ++Rd) {
2170
+ Qd[Rd] = String.fromCharCode(Rd);
2171
+ }
2172
+ dc = Qd;
2173
+ p.getInheritedInstanceCount = function() {
2174
+ return Object.keys(hc).length;
2175
+ };
2176
+ p.getLiveInheritedInstances = function() {
2177
+ var a = [], b;
2178
+ for (b in hc) {
2179
+ hc.hasOwnProperty(b) && a.push(hc[b]);
2180
+ }
2181
+ return a;
2182
+ };
2183
+ p.flushPendingDeletes = fc;
2184
+ p.setDelayFunction = function(a) {
2185
+ gc = a;
2186
+ ec.length && gc && gc(fc);
2187
+ };
2188
+ uc = p.InternalError = class extends Error {
2189
+ constructor(a) {
2190
+ super(a);
2191
+ this.name = "InternalError";
2192
+ }
2193
+ };
2194
+ Gc.prototype.isAliasOf = function(a) {
2195
+ if (!(this instanceof Gc && a instanceof Gc)) {
2196
+ return !1;
2197
+ }
2198
+ var b = this.g.u.i, c = this.g.o, d = a.g.u.i;
2199
+ for (a = a.g.o; b.A;) {
2200
+ c = b.qa(c), b = b.A;
2201
+ }
2202
+ for (; d.A;) {
2203
+ a = d.qa(a), d = d.A;
2204
+ }
2205
+ return b === d && c === a;
2206
+ };
2207
+ Gc.prototype.clone = function() {
2208
+ this.g.o || Fc(this);
2209
+ if (this.g.ja) {
2210
+ return this.g.count.value += 1, this;
2211
+ }
2212
+ var a = xc, b = Object, c = b.create, d = Object.getPrototypeOf(this), e = this.g;
2213
+ a = a(c.call(b, d, {g:{value:{count:e.count, ga:e.ga, ja:e.ja, o:e.o, u:e.u, G:e.G, M:e.M,},}}));
2214
+ a.g.count.value += 1;
2215
+ a.g.ga = !1;
2216
+ return a;
2217
+ };
2218
+ Gc.prototype["delete"] = function() {
2219
+ this.g.o || Fc(this);
2220
+ this.g.ga && !this.g.ja && Q("Object already scheduled for deletion");
2221
+ oc(this);
2222
+ qc(this.g);
2223
+ this.g.ja || (this.g.G = void 0, this.g.o = void 0);
2224
+ };
2225
+ Gc.prototype.isDeleted = function() {
2226
+ return !this.g.o;
2227
+ };
2228
+ Gc.prototype.deleteLater = function() {
2229
+ this.g.o || Fc(this);
2230
+ this.g.ga && !this.g.ja && Q("Object already scheduled for deletion");
2231
+ ec.push(this);
2232
+ 1 === ec.length && gc && gc(fc);
2233
+ this.g.ga = !0;
2234
+ return this;
2235
+ };
2236
+ Pc.prototype.Rb = function(a) {
2237
+ this.nb && (a = this.nb(a));
2238
+ return a;
2239
+ };
2240
+ Pc.prototype.Ya = function(a) {
2241
+ this.X && this.X(a);
2242
+ };
2243
+ Pc.prototype.argPackAdvance = 8;
2244
+ Pc.prototype.readValueFromPointer = Ac;
2245
+ Pc.prototype.deleteObject = function(a) {
2246
+ if (null !== a) {
2247
+ a["delete"]();
2248
+ }
2249
+ };
2250
+ Pc.prototype.fromWireType = function(a) {
2251
+ function b() {
2252
+ return this.za ? wc(this.i.P, {u:this.ic, o:c, M:this, G:a,}) : wc(this.i.P, {u:this, o:a,});
2253
+ }
2254
+ var c = this.Rb(a);
2255
+ if (!c) {
2256
+ return this.Ya(a), null;
2257
+ }
2258
+ var d = tc(this.i, c);
2259
+ if (void 0 !== d) {
2260
+ if (0 === d.g.count.value) {
2261
+ return d.g.o = c, d.g.G = a, d.clone();
2262
+ }
2263
+ d = d.clone();
2264
+ this.Ya(a);
2265
+ return d;
2266
+ }
2267
+ d = this.i.Qb(c);
2268
+ d = sc[d];
2269
+ if (!d) {
2270
+ return b.call(this);
2271
+ }
2272
+ d = this.ya ? d.Gb : d.pointerType;
2273
+ var e = rc(c, this.i, d.i);
2274
+ return null === e ? b.call(this) : this.za ? wc(d.i.P, {u:d, o:e, M:this, G:a,}) : wc(d.i.P, {u:d, o:e,});
2275
+ };
2276
+ Uc = p.UnboundTypeError = bc("UnboundTypeError");
2277
+ for (var Z, Sd = 0; 32 > Sd; ++Sd) {
2278
+ Gd.push(Array(Sd));
2279
+ }
2280
+ var Ud = {__syscall_fcntl64:function(a, b, c) {
2281
+ Vb = c;
2282
+ try {
2283
+ var d = Eb(a);
2284
+ switch(b) {
2285
+ case 0:
2286
+ var e = Wb();
2287
+ return 0 > e ? -28 : Gb(d, e).Y;
2288
+ case 1:
2289
+ case 2:
2290
+ return 0;
2291
+ case 3:
2292
+ return d.flags;
2293
+ case 4:
2294
+ return e = Wb(), d.flags |= e, 0;
2295
+ case 5:
2296
+ return e = Wb(), C[e + 0 >> 1] = 2, 0;
2297
+ case 6:
2298
+ case 7:
2299
+ return 0;
2300
+ case 16:
2301
+ case 8:
2302
+ return -28;
2303
+ case 9:
2304
+ return D[Td() >> 2] = 28, -1;
2305
+ default:
2306
+ return -28;
2307
+ }
2308
+ } catch (f) {
2309
+ if ("undefined" == typeof O || "ErrnoError" !== f.name) {
2310
+ throw f;
2311
+ }
2312
+ return -f.L;
2313
+ }
2314
+ }, __syscall_fstat64:function(a, b) {
2315
+ try {
2316
+ var c = Eb(a);
2317
+ return Ub(Kb, c.path, b);
2318
+ } catch (d) {
2319
+ if ("undefined" == typeof O || "ErrnoError" !== d.name) {
2320
+ throw d;
2321
+ }
2322
+ return -d.L;
2323
+ }
2324
+ }, __syscall_ioctl:function(a, b, c) {
2325
+ Vb = c;
2326
+ try {
2327
+ var d = Eb(a);
2328
+ switch(b) {
2329
+ case 21509:
2330
+ return d.s ? 0 : -59;
2331
+ case 21505:
2332
+ if (!d.s) {
2333
+ return -59;
2334
+ }
2335
+ if (d.s.W.$b) {
2336
+ b = [3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,];
2337
+ var e = Wb();
2338
+ D[e >> 2] = 25856;
2339
+ D[e + 4 >> 2] = 5;
2340
+ D[e + 8 >> 2] = 191;
2341
+ D[e + 12 >> 2] = 35387;
2342
+ for (var f = 0; 32 > f; f++) {
2343
+ y[e + f + 17 >> 0] = b[f] || 0;
2344
+ }
2345
+ }
2346
+ return 0;
2347
+ case 21510:
2348
+ case 21511:
2349
+ case 21512:
2350
+ return d.s ? 0 : -59;
2351
+ case 21506:
2352
+ case 21507:
2353
+ case 21508:
2354
+ if (!d.s) {
2355
+ return -59;
2356
+ }
2357
+ if (d.s.W.ac) {
2358
+ for (e = Wb(), b = [], f = 0; 32 > f; f++) {
2359
+ b.push(y[e + f + 17 >> 0]);
2360
+ }
2361
+ }
2362
+ return 0;
2363
+ case 21519:
2364
+ if (!d.s) {
2365
+ return -59;
2366
+ }
2367
+ e = Wb();
2368
+ return D[e >> 2] = 0;
2369
+ case 21520:
2370
+ return d.s ? -28 : -59;
2371
+ case 21531:
2372
+ e = Wb();
2373
+ if (!d.m.Zb) {
2374
+ throw new L(59);
2375
+ }
2376
+ return d.m.Zb(d, b, e);
2377
+ case 21523:
2378
+ if (!d.s) {
2379
+ return -59;
2380
+ }
2381
+ d.s.W.bc && (f = [24, 80], e = Wb(), C[e >> 1] = f[0], C[e + 2 >> 1] = f[1]);
2382
+ return 0;
2383
+ case 21524:
2384
+ return d.s ? 0 : -59;
2385
+ case 21515:
2386
+ return d.s ? 0 : -59;
2387
+ default:
2388
+ return -28;
2389
+ }
2390
+ } catch (g) {
2391
+ if ("undefined" == typeof O || "ErrnoError" !== g.name) {
2392
+ throw g;
2393
+ }
2394
+ return -g.L;
2395
+ }
2396
+ }, __syscall_lstat64:function(a, b) {
2397
+ try {
2398
+ return a = a ? K(B, a) : "", Ub(Lb, a, b);
2399
+ } catch (c) {
2400
+ if ("undefined" == typeof O || "ErrnoError" !== c.name) {
2401
+ throw c;
2402
+ }
2403
+ return -c.L;
2404
+ }
2405
+ }, __syscall_newfstatat:function(a, b, c, d) {
2406
+ try {
2407
+ b = b ? K(B, b) : "";
2408
+ var e = d & 256;
2409
+ b = Tb(a, b, d & 4096);
2410
+ return Ub(e ? Lb : Kb, b, c);
2411
+ } catch (f) {
2412
+ if ("undefined" == typeof O || "ErrnoError" !== f.name) {
2413
+ throw f;
2414
+ }
2415
+ return -f.L;
2416
+ }
2417
+ }, __syscall_openat:function(a, b, c, d) {
2418
+ Vb = d;
2419
+ try {
2420
+ b = b ? K(B, b) : "";
2421
+ b = Tb(a, b);
2422
+ var e = d ? Wb() : 0;
2423
+ return Nb(b, c, e).Y;
2424
+ } catch (f) {
2425
+ if ("undefined" == typeof O || "ErrnoError" !== f.name) {
2426
+ throw f;
2427
+ }
2428
+ return -f.L;
2429
+ }
2430
+ }, __syscall_stat64:function(a, b) {
2431
+ try {
2432
+ return a = a ? K(B, a) : "", Ub(Kb, a, b);
2433
+ } catch (c) {
2434
+ if ("undefined" == typeof O || "ErrnoError" !== c.name) {
2435
+ throw c;
2436
+ }
2437
+ return -c.L;
2438
+ }
2439
+ }, _embind_create_inheriting_constructor:function(a, b, c) {
2440
+ a = S(a);
2441
+ b = nc(b, "wrapper");
2442
+ c = R(c);
2443
+ var d = [].slice, e = b.i, f = e.P, g = e.A.P, m = e.A.constructor;
2444
+ a = Yb(a, function() {
2445
+ e.A.lb.forEach(function(l) {
2446
+ if (this[l] === g[l]) {
2447
+ throw new cc(`Pure virtual function ${l} must be implemented in JavaScript`);
2448
+ }
2449
+ }.bind(this));
2450
+ Object.defineProperty(this, "__parent", {value:f});
2451
+ this.__construct.apply(this, d.call(arguments));
2452
+ });
2453
+ f.__construct = function() {
2454
+ this === f && Q("Pass correct 'this' to __construct");
2455
+ var l = m.implement.apply(void 0, [this].concat(d.call(arguments)));
2456
+ oc(l);
2457
+ var u = l.g;
2458
+ l.notifyOnDestruction();
2459
+ u.ja = !0;
2460
+ Object.defineProperties(this, {g:{value:u}});
2461
+ xc(this);
2462
+ l = u.o;
2463
+ l = ic(e, l);
2464
+ hc.hasOwnProperty(l) ? Q(`Tried to register registered instance: ${l}`) : hc[l] = this;
2465
+ };
2466
+ f.__destruct = function() {
2467
+ this === f && Q("Pass correct 'this' to __destruct");
2468
+ oc(this);
2469
+ var l = this.g.o;
2470
+ l = ic(e, l);
2471
+ hc.hasOwnProperty(l) ? delete hc[l] : Q(`Tried to unregister unregistered instance: ${l}`);
2472
+ };
2473
+ a.prototype = Object.create(f);
2474
+ for (var n in c) {
2475
+ a.prototype[n] = c[n];
2476
+ }
2477
+ return ac(a);
2478
+ }, _embind_finalize_value_object:function(a) {
2479
+ var b = yc[a];
2480
+ delete yc[a];
2481
+ var c = b.Qa, d = b.X, e = b.$a, f = e.map(g => g.Ub).concat(e.map(g => g.mc));
2482
+ T([a], f, g => {
2483
+ var m = {};
2484
+ e.forEach((n, l) => {
2485
+ var u = g[l], v = n.Sb, q = n.Tb, k = g[l + e.length], r = n.lc, w = n.nc;
2486
+ m[n.Ob] = {read:z => u.fromWireType(v(q, z)), write:(z, G) => {
2487
+ var A = [];
2488
+ r(w, z, k.toWireType(A, G));
2489
+ zc(A);
2490
+ }};
2491
+ });
2492
+ return [{name:b.name, fromWireType:function(n) {
2493
+ var l = {}, u;
2494
+ for (u in m) {
2495
+ l[u] = m[u].read(n);
2496
+ }
2497
+ d(n);
2498
+ return l;
2499
+ }, toWireType:function(n, l) {
2500
+ for (var u in m) {
2501
+ if (!(u in l)) {
2502
+ throw new TypeError(`Missing field: "${u}"`);
2503
+ }
2504
+ }
2505
+ var v = c();
2506
+ for (u in m) {
2507
+ m[u].write(v, l[u]);
2508
+ }
2509
+ null !== n && n.push(d, v);
2510
+ return v;
2511
+ }, argPackAdvance:8, readValueFromPointer:Ac, K:d,}];
2512
+ });
2513
+ }, _embind_register_bigint:function() {
2514
+ }, _embind_register_bool:function(a, b, c, d, e) {
2515
+ var f = Dc(c);
2516
+ b = S(b);
2517
+ U(a, {name:b, fromWireType:function(g) {
2518
+ return !!g;
2519
+ }, toWireType:function(g, m) {
2520
+ return m ? d : e;
2521
+ }, argPackAdvance:8, readValueFromPointer:function(g) {
2522
+ if (1 === c) {
2523
+ var m = y;
2524
+ } else if (2 === c) {
2525
+ m = C;
2526
+ } else if (4 === c) {
2527
+ m = D;
2528
+ } else {
2529
+ throw new TypeError("Unknown boolean type size: " + b);
2530
+ }
2531
+ return this.fromWireType(m[g >> f]);
2532
+ }, K:null,});
2533
+ }, _embind_register_class:function(a, b, c, d, e, f, g, m, n, l, u, v, q) {
2534
+ u = S(u);
2535
+ f = V(e, f);
2536
+ m && (m = V(g, m));
2537
+ l && (l = V(n, l));
2538
+ q = V(v, q);
2539
+ var k = Xb(u);
2540
+ Ic(k, function() {
2541
+ Vc(`Cannot construct ${u} due to unbound types`, [d]);
2542
+ });
2543
+ T([a, b, c], d ? [d] : [], function(r) {
2544
+ r = r[0];
2545
+ if (d) {
2546
+ var w = r.i;
2547
+ var z = w.P;
2548
+ } else {
2549
+ z = Gc.prototype;
2550
+ }
2551
+ r = Yb(k, function() {
2552
+ if (Object.getPrototypeOf(this) !== G) {
2553
+ throw new $b("Use 'new' to construct " + u);
2554
+ }
2555
+ if (void 0 === A.$) {
2556
+ throw new $b(u + " has no accessible constructor");
2557
+ }
2558
+ var E = A.$[arguments.length];
2559
+ if (void 0 === E) {
2560
+ throw new $b(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(A.$).toString()}) parameters instead!`);
2561
+ }
2562
+ return E.apply(this, arguments);
2563
+ });
2564
+ var G = Object.create(z, {constructor:{value:r},});
2565
+ r.prototype = G;
2566
+ var A = new Jc(u, r, G, q, w, f, m, l);
2567
+ A.A && (void 0 === A.A.ra && (A.A.ra = []), A.A.ra.push(A));
2568
+ w = new Pc(u, A, !0, !1);
2569
+ z = new Pc(u + "*", A, !1, !1);
2570
+ var H = new Pc(u + " const*", A, !1, !0);
2571
+ sc[a] = {pointerType:z, Gb:H};
2572
+ Qc(k, r);
2573
+ return [w, z, H];
2574
+ });
2575
+ }, _embind_register_class_class_function:function(a, b, c, d, e, f, g) {
2576
+ var m = Xc(c, d);
2577
+ b = S(b);
2578
+ f = V(e, f);
2579
+ T([], [a], function(n) {
2580
+ function l() {
2581
+ Vc(`Cannot call ${u} due to unbound types`, m);
2582
+ }
2583
+ n = n[0];
2584
+ var u = `${n.name}.${b}`;
2585
+ b.startsWith("@@") && (b = Symbol[b.substring(2)]);
2586
+ var v = n.i.constructor;
2587
+ void 0 === v[b] ? (l.fa = c - 1, v[b] = l) : (Hc(v, b, u), v[b].B[c - 1] = l);
2588
+ T([], m, function(q) {
2589
+ q = Wc(u, [q[0], null].concat(q.slice(1)), null, f, g);
2590
+ void 0 === v[b].B ? (q.fa = c - 1, v[b] = q) : v[b].B[c - 1] = q;
2591
+ if (n.i.ra) {
2592
+ for (const k of n.i.ra) {
2593
+ k.constructor.hasOwnProperty(b) || (k.constructor[b] = q);
2594
+ }
2595
+ }
2596
+ return [];
2597
+ });
2598
+ return [];
2599
+ });
2600
+ }, _embind_register_class_class_property:function(a, b, c, d, e, f, g, m) {
2601
+ b = S(b);
2602
+ f = V(e, f);
2603
+ T([], [a], function(n) {
2604
+ n = n[0];
2605
+ var l = `${n.name}.${b}`, u = {get() {
2606
+ Vc(`Cannot access ${l} due to unbound types`, [c]);
2607
+ }, enumerable:!0, configurable:!0};
2608
+ u.set = m ? () => {
2609
+ Vc(`Cannot access ${l} due to unbound types`, [c]);
2610
+ } : () => {
2611
+ Q(`${l} is a read-only property`);
2612
+ };
2613
+ Object.defineProperty(n.i.constructor, b, u);
2614
+ T([], [c], function(v) {
2615
+ v = v[0];
2616
+ var q = {get() {
2617
+ return v.fromWireType(f(d));
2618
+ }, enumerable:!0};
2619
+ m && (m = V(g, m), q.set = k => {
2620
+ var r = [];
2621
+ m(d, v.toWireType(r, k));
2622
+ zc(r);
2623
+ });
2624
+ Object.defineProperty(n.i.constructor, b, q);
2625
+ return [];
2626
+ });
2627
+ return [];
2628
+ });
2629
+ }, _embind_register_class_constructor:function(a, b, c, d, e, f) {
2630
+ var g = Xc(b, c);
2631
+ e = V(d, e);
2632
+ T([], [a], function(m) {
2633
+ m = m[0];
2634
+ var n = `constructor ${m.name}`;
2635
+ void 0 === m.i.$ && (m.i.$ = []);
2636
+ if (void 0 !== m.i.$[b - 1]) {
2637
+ throw new $b(`Cannot register multiple constructors with identical number of parameters (${b - 1}) for class '${m.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
2638
+ }
2639
+ m.i.$[b - 1] = () => {
2640
+ Vc(`Cannot construct ${m.name} due to unbound types`, g);
2641
+ };
2642
+ T([], g, function(l) {
2643
+ l.splice(1, 0, null);
2644
+ m.i.$[b - 1] = Wc(n, l, null, e, f);
2645
+ return [];
2646
+ });
2647
+ return [];
2648
+ });
2649
+ }, _embind_register_class_function:function(a, b, c, d, e, f, g, m) {
2650
+ var n = Xc(c, d);
2651
+ b = S(b);
2652
+ f = V(e, f);
2653
+ T([], [a], function(l) {
2654
+ function u() {
2655
+ Vc(`Cannot call ${v} due to unbound types`, n);
2656
+ }
2657
+ l = l[0];
2658
+ var v = `${l.name}.${b}`;
2659
+ b.startsWith("@@") && (b = Symbol[b.substring(2)]);
2660
+ m && l.i.lb.push(b);
2661
+ var q = l.i.P, k = q[b];
2662
+ void 0 === k || void 0 === k.B && k.className !== l.name && k.fa === c - 2 ? (u.fa = c - 2, u.className = l.name, q[b] = u) : (Hc(q, b, v), q[b].B[c - 2] = u);
2663
+ T([], n, function(r) {
2664
+ r = Wc(v, r, l, f, g);
2665
+ void 0 === q[b].B ? (r.fa = c - 2, q[b] = r) : q[b].B[c - 2] = r;
2666
+ return [];
2667
+ });
2668
+ return [];
2669
+ });
2670
+ }, _embind_register_class_property:function(a, b, c, d, e, f, g, m, n, l) {
2671
+ b = S(b);
2672
+ e = V(d, e);
2673
+ T([], [a], function(u) {
2674
+ u = u[0];
2675
+ var v = `${u.name}.${b}`, q = {get() {
2676
+ Vc(`Cannot access ${v} due to unbound types`, [c, g]);
2677
+ }, enumerable:!0, configurable:!0};
2678
+ q.set = n ? () => {
2679
+ Vc(`Cannot access ${v} due to unbound types`, [c, g]);
2680
+ } : () => {
2681
+ Q(v + " is a read-only property");
2682
+ };
2683
+ Object.defineProperty(u.i.P, b, q);
2684
+ T([], n ? [c, g] : [c], function(k) {
2685
+ var r = k[0], w = {get() {
2686
+ var G = Yc(this, u, v + " getter");
2687
+ return r.fromWireType(e(f, G));
2688
+ }, enumerable:!0};
2689
+ if (n) {
2690
+ n = V(m, n);
2691
+ var z = k[1];
2692
+ w.set = function(G) {
2693
+ var A = Yc(this, u, v + " setter"), H = [];
2694
+ n(l, A, z.toWireType(H, G));
2695
+ zc(H);
2696
+ };
2697
+ }
2698
+ Object.defineProperty(u.i.P, b, w);
2699
+ return [];
2700
+ });
2701
+ return [];
2702
+ });
2703
+ }, _embind_register_emval:function(a, b) {
2704
+ b = S(b);
2705
+ U(a, {name:b, fromWireType:function(c) {
2706
+ var d = R(c);
2707
+ Zc(c);
2708
+ return d;
2709
+ }, toWireType:function(c, d) {
2710
+ return ac(d);
2711
+ }, argPackAdvance:8, readValueFromPointer:Ac, K:null,});
2712
+ }, _embind_register_enum:function(a, b, c, d) {
2713
+ function e() {
2714
+ }
2715
+ c = Dc(c);
2716
+ b = S(b);
2717
+ e.values = {};
2718
+ U(a, {name:b, constructor:e, fromWireType:function(f) {
2719
+ return this.constructor.values[f];
2720
+ }, toWireType:function(f, g) {
2721
+ return g.value;
2722
+ }, argPackAdvance:8, readValueFromPointer:$c(b, c, d), K:null,});
2723
+ Ic(b, e);
2724
+ }, _embind_register_enum_value:function(a, b, c) {
2725
+ var d = nc(a, "enum");
2726
+ b = S(b);
2727
+ a = d.constructor;
2728
+ d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value:Yb(`${d.name}_${b}`, function() {
2729
+ })},});
2730
+ a.values[c] = d;
2731
+ a[b] = d;
2732
+ }, _embind_register_float:function(a, b, c) {
2733
+ c = Dc(c);
2734
+ b = S(b);
2735
+ U(a, {name:b, fromWireType:function(d) {
2736
+ return d;
2737
+ }, toWireType:function(d, e) {
2738
+ return e;
2739
+ }, argPackAdvance:8, readValueFromPointer:ad(b, c), K:null,});
2740
+ }, _embind_register_function:function(a, b, c, d, e, f) {
2741
+ var g = Xc(b, c);
2742
+ a = S(a);
2743
+ e = V(d, e);
2744
+ Ic(a, function() {
2745
+ Vc(`Cannot call ${a} due to unbound types`, g);
2746
+ }, b - 1);
2747
+ T([], g, function(m) {
2748
+ Qc(a, Wc(a, [m[0], null].concat(m.slice(1)), null, e, f), b - 1);
2749
+ return [];
2750
+ });
2751
+ }, _embind_register_integer:function(a, b, c, d, e) {
2752
+ b = S(b);
2753
+ -1 === e && (e = 4294967295);
2754
+ e = Dc(c);
2755
+ var f = m => m;
2756
+ if (0 === d) {
2757
+ var g = 32 - 8 * c;
2758
+ f = m => m << g >>> g;
2759
+ }
2760
+ c = b.includes("unsigned") ? function(m, n) {
2761
+ return n >>> 0;
2762
+ } : function(m, n) {
2763
+ return n;
2764
+ };
2765
+ U(a, {name:b, fromWireType:f, toWireType:c, argPackAdvance:8, readValueFromPointer:bd(b, e, 0 !== d), K:null,});
2766
+ }, _embind_register_memory_view:function(a, b, c) {
2767
+ function d(f) {
2768
+ f >>= 2;
2769
+ var g = F;
2770
+ return new e(g.buffer, g[f + 1], g[f]);
2771
+ }
2772
+ var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][b];
2773
+ c = S(c);
2774
+ U(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Xb:!0,});
2775
+ }, _embind_register_std_string:function(a, b) {
2776
+ b = S(b);
2777
+ var c = "std::string" === b;
2778
+ U(a, {name:b, fromWireType:function(d) {
2779
+ var e = F[d >> 2], f = d + 4;
2780
+ if (c) {
2781
+ for (var g = f, m = 0; m <= e; ++m) {
2782
+ var n = f + m;
2783
+ if (m == e || 0 == B[n]) {
2784
+ g = g ? K(B, g, n - g) : "";
2785
+ if (void 0 === l) {
2786
+ var l = g;
2787
+ } else {
2788
+ l += String.fromCharCode(0), l += g;
2789
+ }
2790
+ g = n + 1;
2791
+ }
2792
+ }
2793
+ } else {
2794
+ l = Array(e);
2795
+ for (m = 0; m < e; ++m) {
2796
+ l[m] = String.fromCharCode(B[f + m]);
2797
+ }
2798
+ l = l.join("");
2799
+ }
2800
+ mc(d);
2801
+ return l;
2802
+ }, toWireType:function(d, e) {
2803
+ e instanceof ArrayBuffer && (e = new Uint8Array(e));
2804
+ var f = "string" == typeof e;
2805
+ f || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array || Q("Cannot pass non-string to std::string");
2806
+ var g = c && f ? $a(e) : e.length;
2807
+ var m = Jd(4 + g + 1), n = m + 4;
2808
+ F[m >> 2] = g;
2809
+ if (c && f) {
2810
+ ab(e, B, n, g + 1);
2811
+ } else {
2812
+ if (f) {
2813
+ for (f = 0; f < g; ++f) {
2814
+ var l = e.charCodeAt(f);
2815
+ 255 < l && (mc(n), Q("String has UTF-16 code units that do not fit in 8 bits"));
2816
+ B[n + f] = l;
2817
+ }
2818
+ } else {
2819
+ for (f = 0; f < g; ++f) {
2820
+ B[n + f] = e[f];
2821
+ }
2822
+ }
2823
+ }
2824
+ null !== d && d.push(mc, m);
2825
+ return m;
2826
+ }, argPackAdvance:8, readValueFromPointer:Ac, K:function(d) {
2827
+ mc(d);
2828
+ },});
2829
+ }, _embind_register_std_wstring:function(a, b, c) {
2830
+ c = S(c);
2831
+ if (2 === b) {
2832
+ var d = dd;
2833
+ var e = ed;
2834
+ var f = fd;
2835
+ var g = () => wa;
2836
+ var m = 1;
2837
+ } else {
2838
+ 4 === b && (d = gd, e = hd, f = jd, g = () => F, m = 2);
2839
+ }
2840
+ U(a, {name:c, fromWireType:function(n) {
2841
+ for (var l = F[n >> 2], u = g(), v, q = n + 4, k = 0; k <= l; ++k) {
2842
+ var r = n + 4 + k * b;
2843
+ if (k == l || 0 == u[r >> m]) {
2844
+ q = d(q, r - q), void 0 === v ? v = q : (v += String.fromCharCode(0), v += q), q = r + b;
2845
+ }
2846
+ }
2847
+ mc(n);
2848
+ return v;
2849
+ }, toWireType:function(n, l) {
2850
+ "string" != typeof l && Q(`Cannot pass non-string to C++ string type ${c}`);
2851
+ var u = f(l), v = Jd(4 + u + b);
2852
+ F[v >> 2] = u >> m;
2853
+ e(l, v + 4, u + b);
2854
+ null !== n && n.push(mc, v);
2855
+ return v;
2856
+ }, argPackAdvance:8, readValueFromPointer:Ac, K:function(n) {
2857
+ mc(n);
2858
+ },});
2859
+ }, _embind_register_value_object:function(a, b, c, d, e, f) {
2860
+ yc[a] = {name:S(b), Qa:V(c, d), X:V(e, f), $a:[],};
2861
+ }, _embind_register_value_object_field:function(a, b, c, d, e, f, g, m, n, l) {
2862
+ yc[a].$a.push({Ob:S(b), Ub:c, Sb:V(d, e), Tb:f, mc:g, lc:V(m, n), nc:l,});
2863
+ }, _embind_register_void:function(a, b) {
2864
+ b = S(b);
2865
+ U(a, {cc:!0, name:b, argPackAdvance:0, fromWireType:function() {
2866
+ }, toWireType:function() {
2867
+ },});
2868
+ }, _emscripten_get_now_is_monotonic:() => !0, _emval_as:function(a, b, c) {
2869
+ a = R(a);
2870
+ b = nc(b, "emval::as");
2871
+ var d = [], e = ac(d);
2872
+ F[c >> 2] = e;
2873
+ return b.toWireType(d, a);
2874
+ }, _emval_call_method:function(a, b, c, d, e) {
2875
+ a = md[a];
2876
+ b = R(b);
2877
+ c = ld(c);
2878
+ var f = [];
2879
+ F[d >> 2] = ac(f);
2880
+ return a(b, c, f, e);
2881
+ }, _emval_call_void_method:function(a, b, c, d) {
2882
+ a = md[a];
2883
+ b = R(b);
2884
+ c = ld(c);
2885
+ a(b, c, null, d);
2886
+ }, _emval_decref:Zc, _emval_get_method_caller:function(a, b) {
2887
+ var c = od(a, b), d = c[0];
2888
+ b = d.name + "_$" + c.slice(1).map(function(g) {
2889
+ return g.name;
2890
+ }).join("_") + "$";
2891
+ var e = pd[b];
2892
+ if (void 0 !== e) {
2893
+ return e;
2894
+ }
2895
+ var f = Array(a - 1);
2896
+ e = nd((g, m, n, l) => {
2897
+ for (var u = 0, v = 0; v < a - 1; ++v) {
2898
+ f[v] = c[v + 1].readValueFromPointer(l + u), u += c[v + 1].argPackAdvance;
2899
+ }
2900
+ g = g[m].apply(g, f);
2901
+ for (v = 0; v < a - 1; ++v) {
2902
+ c[v + 1].Jb && c[v + 1].Jb(f[v]);
2903
+ }
2904
+ if (!d.cc) {
2905
+ return d.toWireType(n, g);
2906
+ }
2907
+ });
2908
+ return pd[b] = e;
2909
+ }, _emval_get_property:function(a, b) {
2910
+ a = R(a);
2911
+ b = R(b);
2912
+ return ac(a[b]);
2913
+ }, _emval_incref:function(a) {
2914
+ 4 < a && (P.get(a).pb += 1);
2915
+ }, _emval_new_cstring:function(a) {
2916
+ return ac(ld(a));
2917
+ }, _emval_new_object:function() {
2918
+ return ac({});
2919
+ }, _emval_run_destructors:function(a) {
2920
+ var b = R(a);
2921
+ zc(b);
2922
+ Zc(a);
2923
+ }, _emval_set_property:function(a, b, c) {
2924
+ a = R(a);
2925
+ b = R(b);
2926
+ c = R(c);
2927
+ a[b] = c;
2928
+ }, _emval_take_value:function(a, b) {
2929
+ a = nc(a, "_emval_take_value");
2930
+ a = a.readValueFromPointer(b);
2931
+ return ac(a);
2932
+ }, abort:() => {
2933
+ ta("");
2934
+ }, beginPixelLocalStorageWEBGL:function(a, b, c) {
2935
+ (a = t[a].H.ia) && a.beginPixelLocalStorageWEBGL(p.HEAPU32.subarray(c, c + b));
2936
+ }, begin_texture_image_decode:function(a, b, c) {
2937
+ a = X[a];
2938
+ a.image = new Image();
2939
+ a.image.src = URL.createObjectURL(new Blob([p.HEAP8.subarray(b, b + c)]), {type:"image/png"});
2940
+ a.complete = !1;
2941
+ }, emscripten_asm_const_int:(a, b, c) => {
2942
+ qd.length = 0;
2943
+ var d;
2944
+ for (c >>= 2; d = B[b++];) {
2945
+ c += 105 != d & c, qd.push(105 == d ? D[c] : ya[c++ >> 1]), ++c;
2946
+ }
2947
+ return Qa[a].apply(null, qd);
2948
+ }, emscripten_date_now:function() {
2949
+ return Date.now();
2950
+ }, emscripten_get_now:() => performance.now(), emscripten_memcpy_big:(a, b, c) => B.copyWithin(a, b, b + c), emscripten_resize_heap:a => {
2951
+ var b = B.length;
2952
+ a >>>= 0;
2953
+ if (2147483648 < a) {
2954
+ return !1;
2955
+ }
2956
+ for (var c = 1; 4 >= c; c *= 2) {
2957
+ var d = b * (1 + 0.2 / c);
2958
+ d = Math.min(d, a + 100663296);
2959
+ var e = Math;
2960
+ d = Math.max(a, d);
2961
+ a: {
2962
+ e = e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536) - ua.buffer.byteLength + 65535 >>> 16;
2963
+ try {
2964
+ ua.grow(e);
2965
+ za();
2966
+ var f = 1;
2967
+ break a;
2968
+ } catch (g) {
2969
+ }
2970
+ f = void 0;
2971
+ }
2972
+ if (f) {
2973
+ return !0;
2974
+ }
2975
+ }
2976
+ return !1;
2977
+ }, emscripten_webgl_enable_extension:function(a, b) {
2978
+ a = t[a];
2979
+ b = b ? K(B, b) : "";
2980
+ b.startsWith("GL_") && (b = b.substr(3));
2981
+ "WEBGL_draw_instanced_base_vertex_base_instance" == b && rd(Z);
2982
+ "WEBGL_multi_draw_instanced_base_vertex_base_instance" == b && sd(Z);
2983
+ "WEBGL_multi_draw" == b && Cd(Z);
2984
+ return !!a.H.getExtension(b);
2985
+ }, emscripten_webgl_get_current_context:function() {
2986
+ return Bd ? Bd.handle : 0;
2987
+ }, emscripten_webgl_make_context_current:function(a) {
2988
+ return ka(a) ? 0 : -5;
2989
+ }, enable_WEBGL_provoking_vertex:function(a) {
2990
+ a = t[a].H;
2991
+ a.mb = a.getExtension("WEBGL_provoking_vertex");
2992
+ return !!a.mb;
2993
+ }, enable_WEBGL_shader_pixel_local_storage_coherent:function(a) {
2994
+ a = t[a].H;
2995
+ a.ia = a.getExtension("WEBGL_shader_pixel_local_storage");
2996
+ return !(!a.ia || !a.ia.isCoherent());
2997
+ }, endPixelLocalStorageWEBGL:function(a, b, c) {
2998
+ (a = t[a].H.ia) && a.endPixelLocalStorageWEBGL(p.HEAPU32.subarray(c, c + b));
2999
+ }, environ_get:(a, b) => {
3000
+ var c = 0;
3001
+ Fd().forEach(function(d, e) {
3002
+ var f = b + c;
3003
+ e = F[a + 4 * e >> 2] = f;
3004
+ for (f = 0; f < d.length; ++f) {
3005
+ y[e++ >> 0] = d.charCodeAt(f);
3006
+ }
3007
+ y[e >> 0] = 0;
3008
+ c += d.length + 1;
3009
+ });
3010
+ return 0;
3011
+ }, environ_sizes_get:(a, b) => {
3012
+ var c = Fd();
3013
+ F[a >> 2] = c.length;
3014
+ var d = 0;
3015
+ c.forEach(function(e) {
3016
+ d += e.length + 1;
3017
+ });
3018
+ F[b >> 2] = d;
3019
+ return 0;
3020
+ }, fd_close:function(a) {
3021
+ try {
3022
+ var b = Eb(a);
3023
+ if (null === b.Y) {
3024
+ throw new L(8);
3025
+ }
3026
+ b.Na && (b.Na = null);
3027
+ try {
3028
+ b.m.close && b.m.close(b);
3029
+ } catch (c) {
3030
+ throw c;
3031
+ } finally {
3032
+ qb[b.Y] = null;
3033
+ }
3034
+ b.Y = null;
3035
+ return 0;
3036
+ } catch (c) {
3037
+ if ("undefined" == typeof O || "ErrnoError" !== c.name) {
3038
+ throw c;
3039
+ }
3040
+ return c.L;
3041
+ }
3042
+ }, fd_read:function(a, b, c, d) {
3043
+ try {
3044
+ a: {
3045
+ var e = Eb(a);
3046
+ a = b;
3047
+ for (var f, g = b = 0; g < c; g++) {
3048
+ var m = F[a >> 2], n = F[a + 4 >> 2];
3049
+ a += 8;
3050
+ var l = e, u = m, v = n, q = f, k = y;
3051
+ if (0 > v || 0 > q) {
3052
+ throw new L(28);
3053
+ }
3054
+ if (null === l.Y) {
3055
+ throw new L(8);
3056
+ }
3057
+ if (1 === (l.flags & 2097155)) {
3058
+ throw new L(8);
3059
+ }
3060
+ if (16384 === (l.node.mode & 61440)) {
3061
+ throw new L(31);
3062
+ }
3063
+ if (!l.m.read) {
3064
+ throw new L(28);
3065
+ }
3066
+ var r = "undefined" != typeof q;
3067
+ if (!r) {
3068
+ q = l.position;
3069
+ } else if (!l.seekable) {
3070
+ throw new L(70);
3071
+ }
3072
+ var w = l.m.read(l, k, u, v, q);
3073
+ r || (l.position += w);
3074
+ var z = w;
3075
+ if (0 > z) {
3076
+ var G = -1;
3077
+ break a;
3078
+ }
3079
+ b += z;
3080
+ if (z < n) {
3081
+ break;
3082
+ }
3083
+ "undefined" !== typeof f && (f += z);
3084
+ }
3085
+ G = b;
3086
+ }
3087
+ F[d >> 2] = G;
3088
+ return 0;
3089
+ } catch (A) {
3090
+ if ("undefined" == typeof O || "ErrnoError" !== A.name) {
3091
+ throw A;
3092
+ }
3093
+ return A.L;
3094
+ }
3095
+ }, fd_seek:function(a, b, c, d, e) {
3096
+ b = c + 2097152 >>> 0 < 4194305 - !!b ? (b >>> 0) + 4294967296 * c : NaN;
3097
+ try {
3098
+ if (isNaN(b)) {
3099
+ return 61;
3100
+ }
3101
+ var f = Eb(a);
3102
+ Ob(f, b, d);
3103
+ J = [f.position >>> 0, (I = f.position, 1.0 <= +Math.abs(I) ? 0.0 < I ? +Math.floor(I / 4294967296.0) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296.0) >>> 0 : 0)];
3104
+ D[e >> 2] = J[0];
3105
+ D[e + 4 >> 2] = J[1];
3106
+ f.Na && 0 === b && 0 === d && (f.Na = null);
3107
+ return 0;
3108
+ } catch (g) {
3109
+ if ("undefined" == typeof O || "ErrnoError" !== g.name) {
3110
+ throw g;
3111
+ }
3112
+ return g.L;
3113
+ }
3114
+ }, fd_write:function(a, b, c, d) {
3115
+ try {
3116
+ a: {
3117
+ var e = Eb(a);
3118
+ a = b;
3119
+ for (var f, g = b = 0; g < c; g++) {
3120
+ var m = F[a >> 2], n = F[a + 4 >> 2];
3121
+ a += 8;
3122
+ var l = e, u = m, v = n, q = f, k = y;
3123
+ if (0 > v || 0 > q) {
3124
+ throw new L(28);
3125
+ }
3126
+ if (null === l.Y) {
3127
+ throw new L(8);
3128
+ }
3129
+ if (0 === (l.flags & 2097155)) {
3130
+ throw new L(8);
3131
+ }
3132
+ if (16384 === (l.node.mode & 61440)) {
3133
+ throw new L(31);
3134
+ }
3135
+ if (!l.m.write) {
3136
+ throw new L(28);
3137
+ }
3138
+ l.seekable && l.flags & 1024 && Ob(l, 0, 2);
3139
+ var r = "undefined" != typeof q;
3140
+ if (!r) {
3141
+ q = l.position;
3142
+ } else if (!l.seekable) {
3143
+ throw new L(70);
3144
+ }
3145
+ var w = l.m.write(l, k, u, v, q, void 0);
3146
+ r || (l.position += w);
3147
+ var z = w;
3148
+ if (0 > z) {
3149
+ var G = -1;
3150
+ break a;
3151
+ }
3152
+ b += z;
3153
+ "undefined" !== typeof f && (f += z);
3154
+ }
3155
+ G = b;
3156
+ }
3157
+ F[d >> 2] = G;
3158
+ return 0;
3159
+ } catch (A) {
3160
+ if ("undefined" == typeof O || "ErrnoError" !== A.name) {
3161
+ throw A;
3162
+ }
3163
+ return A.L;
3164
+ }
3165
+ }, framebufferPixelLocalClearValuefvWEBGL:function(a, b, c, d, e, f) {
3166
+ (a = t[a].H.ia) && a.framebufferPixelLocalClearValuefvWEBGL(b, [c, d, e, f]);
3167
+ }, framebufferTexturePixelLocalStorageWEBGL:function(a, b, c, d, e) {
3168
+ (a = t[a].H.ia) && a.framebufferTexturePixelLocalStorageWEBGL(b, X[c], d, e);
3169
+ }, glActiveTexture:function(a) {
3170
+ Z.activeTexture(a);
3171
+ }, glAttachShader:function(a, b) {
3172
+ Z.attachShader(W[a], xd[b]);
3173
+ }, glBindBuffer:function(a, b) {
3174
+ 35051 == a ? Z.Xa = b : 35052 == a && (Z.Ka = b);
3175
+ Z.bindBuffer(a, ud[b]);
3176
+ }, glBindBufferRange:function(a, b, c, d, e) {
3177
+ Z.bindBufferRange(a, b, ud[c], d, e);
3178
+ }, glBindFramebuffer:function(a, b) {
3179
+ Z.bindFramebuffer(a, vd[b]);
3180
+ }, glBindRenderbuffer:function(a, b) {
3181
+ Z.bindRenderbuffer(a, wd[b]);
3182
+ }, glBindTexture:function(a, b) {
3183
+ Z.bindTexture(a, X[b]);
3184
+ }, glBindVertexArray:function(a) {
3185
+ Z.bindVertexArray(yd[a]);
3186
+ }, glBlendEquation:function(a) {
3187
+ Z.blendEquation(a);
3188
+ }, glBlendFunc:function(a, b) {
3189
+ Z.blendFunc(a, b);
3190
+ }, glBlitFramebuffer:function(a, b, c, d, e, f, g, m, n, l) {
3191
+ Z.blitFramebuffer(a, b, c, d, e, f, g, m, n, l);
3192
+ }, glBufferData:function(a, b, c, d) {
3193
+ c && b ? Z.bufferData(a, B, d, c, b) : Z.bufferData(a, b, d);
3194
+ }, glBufferSubData:function(a, b, c, d) {
3195
+ c && Z.bufferSubData(a, b, B, d, c);
3196
+ }, glClear:function(a) {
3197
+ Z.clear(a);
3198
+ }, glClearColor:function(a, b, c, d) {
3199
+ Z.clearColor(a, b, c, d);
3200
+ }, glClearDepthf:function(a) {
3201
+ Z.clearDepth(a);
3202
+ }, glClearStencil:function(a) {
3203
+ Z.clearStencil(a);
3204
+ }, glColorMask:function(a, b, c, d) {
3205
+ Z.colorMask(!!a, !!b, !!c, !!d);
3206
+ }, glCompileShader:function(a) {
3207
+ Z.compileShader(xd[a]);
3208
+ }, glCreateProgram:function() {
3209
+ var a = ia(W), b = Z.createProgram();
3210
+ b.name = a;
3211
+ b.Hc = b.Fc = b.Gc = 0;
3212
+ b.Ta = 1;
3213
+ W[a] = b;
3214
+ return a;
3215
+ }, glCreateShader:function(a) {
3216
+ var b = ia(xd);
3217
+ xd[b] = Z.createShader(a);
3218
+ return b;
3219
+ }, glCullFace:function(a) {
3220
+ Z.cullFace(a);
3221
+ }, glDeleteBuffers:function(a, b) {
3222
+ for (var c = 0; c < a; c++) {
3223
+ var d = D[b + 4 * c >> 2], e = ud[d];
3224
+ e && (Z.deleteBuffer(e), e.name = 0, ud[d] = null, d == Z.Xa && (Z.Xa = 0), d == Z.Ka && (Z.Ka = 0));
3225
+ }
3226
+ }, glDeleteFramebuffers:function(a, b) {
3227
+ for (var c = 0; c < a; ++c) {
3228
+ var d = D[b + 4 * c >> 2], e = vd[d];
3229
+ e && (Z.deleteFramebuffer(e), e.name = 0, vd[d] = null);
3230
+ }
3231
+ }, glDeleteProgram:function(a) {
3232
+ if (a) {
3233
+ var b = W[a];
3234
+ b ? (Z.deleteProgram(b), b.name = 0, W[a] = null) : Y(1281);
3235
+ }
3236
+ }, glDeleteRenderbuffers:function(a, b) {
3237
+ for (var c = 0; c < a; c++) {
3238
+ var d = D[b + 4 * c >> 2], e = wd[d];
3239
+ e && (Z.deleteRenderbuffer(e), e.name = 0, wd[d] = null);
3240
+ }
3241
+ }, glDeleteShader:function(a) {
3242
+ if (a) {
3243
+ var b = xd[a];
3244
+ b ? (Z.deleteShader(b), xd[a] = null) : Y(1281);
3245
+ }
3246
+ }, glDeleteTextures:function(a, b) {
3247
+ for (var c = 0; c < a; c++) {
3248
+ var d = D[b + 4 * c >> 2], e = X[d];
3249
+ e && (Z.deleteTexture(e), e.name = 0, X[d] = null);
3250
+ }
3251
+ }, glDeleteVertexArrays:function(a, b) {
3252
+ for (var c = 0; c < a; c++) {
3253
+ var d = D[b + 4 * c >> 2];
3254
+ Z.deleteVertexArray(yd[d]);
3255
+ yd[d] = null;
3256
+ }
3257
+ }, glDepthFunc:function(a) {
3258
+ Z.depthFunc(a);
3259
+ }, glDepthMask:function(a) {
3260
+ Z.depthMask(!!a);
3261
+ }, glDepthRangef:function(a, b) {
3262
+ Z.depthRange(a, b);
3263
+ }, glDisable:function(a) {
3264
+ Z.disable(a);
3265
+ }, glDrawArrays:function(a, b, c) {
3266
+ Z.drawArrays(a, b, c);
3267
+ }, glDrawArraysInstanced:function(a, b, c, d) {
3268
+ Z.drawArraysInstanced(a, b, c, d);
3269
+ }, glDrawBuffers:function(a, b) {
3270
+ for (var c = Gd[a], d = 0; d < a; d++) {
3271
+ c[d] = D[b + 4 * d >> 2];
3272
+ }
3273
+ Z.drawBuffers(c);
3274
+ }, glDrawElements:function(a, b, c, d) {
3275
+ Z.drawElements(a, b, c, d);
3276
+ }, glDrawElementsInstanced:function(a, b, c, d, e) {
3277
+ Z.drawElementsInstanced(a, b, c, d, e);
3278
+ }, glEnable:function(a) {
3279
+ Z.enable(a);
3280
+ }, glEnableVertexAttribArray:function(a) {
3281
+ Z.enableVertexAttribArray(a);
3282
+ }, glFramebufferRenderbuffer:function(a, b, c, d) {
3283
+ Z.framebufferRenderbuffer(a, b, c, wd[d]);
3284
+ }, glFramebufferTexture2D:function(a, b, c, d, e) {
3285
+ Z.framebufferTexture2D(a, b, c, X[d], e);
3286
+ }, glFrontFace:function(a) {
3287
+ Z.frontFace(a);
3288
+ }, glGenBuffers:function(a, b) {
3289
+ Hd(a, b, "createBuffer", ud);
3290
+ }, glGenFramebuffers:function(a, b) {
3291
+ Hd(a, b, "createFramebuffer", vd);
3292
+ }, glGenRenderbuffers:function(a, b) {
3293
+ Hd(a, b, "createRenderbuffer", wd);
3294
+ }, glGenTextures:function(a, b) {
3295
+ Hd(a, b, "createTexture", X);
3296
+ }, glGenVertexArrays:function(a, b) {
3297
+ Hd(a, b, "createVertexArray", yd);
3298
+ }, glGenerateMipmap:function(a) {
3299
+ Z.generateMipmap(a);
3300
+ }, glGetIntegerv:function(a, b) {
3301
+ Id(a, b);
3302
+ }, glGetString:function(a) {
3303
+ var b = zd[a];
3304
+ if (!b) {
3305
+ switch(a) {
3306
+ case 7939:
3307
+ b = Z.getSupportedExtensions() || [];
3308
+ b = b.concat(b.map(function(d) {
3309
+ return "GL_" + d;
3310
+ }));
3311
+ b = Kd(b.join(" "));
3312
+ break;
3313
+ case 7936:
3314
+ case 7937:
3315
+ case 37445:
3316
+ case 37446:
3317
+ (b = Z.getParameter(a)) || Y(1280);
3318
+ b = b && Kd(b);
3319
+ break;
3320
+ case 7938:
3321
+ b = Kd("OpenGL ES 3.0 (" + Z.getParameter(7938) + ")");
3322
+ break;
3323
+ case 35724:
3324
+ b = Z.getParameter(35724);
3325
+ var c = b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);
3326
+ null !== c && (3 == c[1].length && (c[1] += "0"), b = "OpenGL ES GLSL ES " + c[1] + " (" + b + ")");
3327
+ b = Kd(b);
3328
+ break;
3329
+ default:
3330
+ Y(1280);
3331
+ }
3332
+ zd[a] = b;
3333
+ }
3334
+ return b;
3335
+ }, glGetUniformBlockIndex:function(a, b) {
3336
+ return Z.getUniformBlockIndex(W[a], b ? K(B, b) : "");
3337
+ }, glGetUniformLocation:function(a, b) {
3338
+ b = b ? K(B, b) : "";
3339
+ if (a = W[a]) {
3340
+ var c = a, d = c.pa, e = c.ub, f;
3341
+ if (!d) {
3342
+ for (c.pa = d = {}, c.tb = {}, f = 0; f < Z.getProgramParameter(c, 35718); ++f) {
3343
+ var g = Z.getActiveUniform(c, f);
3344
+ var m = g.name;
3345
+ g = g.size;
3346
+ var n = Ld(m);
3347
+ n = 0 < n ? m.slice(0, n) : m;
3348
+ var l = c.Ta;
3349
+ c.Ta += g;
3350
+ e[n] = [g, l];
3351
+ for (m = 0; m < g; ++m) {
3352
+ d[l] = m, c.tb[l++] = n;
3353
+ }
3354
+ }
3355
+ }
3356
+ c = a.pa;
3357
+ d = 0;
3358
+ e = b;
3359
+ f = Ld(b);
3360
+ 0 < f && (d = parseInt(b.slice(f + 1)) >>> 0, e = b.slice(0, f));
3361
+ if ((e = a.ub[e]) && d < e[0] && (d += e[1], c[d] = c[d] || Z.getUniformLocation(a, b))) {
3362
+ return d;
3363
+ }
3364
+ } else {
3365
+ Y(1281);
3366
+ }
3367
+ return -1;
3368
+ }, glInvalidateFramebuffer:function(a, b, c) {
3369
+ for (var d = Gd[b], e = 0; e < b; e++) {
3370
+ d[e] = D[c + 4 * e >> 2];
3371
+ }
3372
+ Z.invalidateFramebuffer(a, d);
3373
+ }, glLinkProgram:function(a) {
3374
+ a = W[a];
3375
+ Z.linkProgram(a);
3376
+ a.pa = 0;
3377
+ a.ub = {};
3378
+ }, glPixelStorei:function(a, b) {
3379
+ Z.pixelStorei(a, b);
3380
+ }, glRenderbufferStorageMultisample:function(a, b, c, d, e) {
3381
+ Z.renderbufferStorageMultisample(a, b, c, d, e);
3382
+ }, glScissor:function(a, b, c, d) {
3383
+ Z.scissor(a, b, c, d);
3384
+ }, glShaderSource:function(a, b, c, d) {
3385
+ for (var e = "", f = 0; f < b; ++f) {
3386
+ var g = d ? D[d + 4 * f >> 2] : -1, m = D[c + 4 * f >> 2];
3387
+ g = m ? K(B, m, 0 > g ? void 0 : g) : "";
3388
+ e += g;
3389
+ }
3390
+ Z.shaderSource(xd[a], e);
3391
+ }, glStencilFunc:function(a, b, c) {
3392
+ Z.stencilFunc(a, b, c);
3393
+ }, glStencilFuncSeparate:function(a, b, c, d) {
3394
+ Z.stencilFuncSeparate(a, b, c, d);
3395
+ }, glStencilMask:function(a) {
3396
+ Z.stencilMask(a);
3397
+ }, glStencilOp:function(a, b, c) {
3398
+ Z.stencilOp(a, b, c);
3399
+ }, glStencilOpSeparate:function(a, b, c, d) {
3400
+ Z.stencilOpSeparate(a, b, c, d);
3401
+ }, glTexParameteri:function(a, b, c) {
3402
+ Z.texParameteri(a, b, c);
3403
+ }, glTexStorage2D:function(a, b, c, d, e) {
3404
+ Z.texStorage2D(a, b, c, d, e);
3405
+ }, glTexSubImage2D:function(a, b, c, d, e, f, g, m, n) {
3406
+ if (Z.Ka) {
3407
+ Z.texSubImage2D(a, b, c, d, e, f, g, m, n);
3408
+ } else if (n) {
3409
+ var l = m - 5120;
3410
+ l = 0 == l ? y : 1 == l ? B : 2 == l ? C : 4 == l ? D : 6 == l ? xa : 5 == l || 28922 == l || 28520 == l || 30779 == l || 30782 == l ? F : wa;
3411
+ Z.texSubImage2D(a, b, c, d, e, f, g, m, l, n >> 31 - Math.clz32(l.BYTES_PER_ELEMENT));
3412
+ } else {
3413
+ Z.texSubImage2D(a, b, c, d, e, f, g, m, null);
3414
+ }
3415
+ }, glUniform1i:function(a, b) {
3416
+ var c = Z, d = c.uniform1i;
3417
+ var e = Z.Ib;
3418
+ if (e) {
3419
+ var f = e.pa[a];
3420
+ "number" == typeof f && (e.pa[a] = f = Z.getUniformLocation(e, e.tb[a] + (0 < f ? "[" + f + "]" : "")));
3421
+ a = f;
3422
+ } else {
3423
+ Y(1282), a = void 0;
3424
+ }
3425
+ d.call(c, a, b);
3426
+ }, glUniformBlockBinding:function(a, b, c) {
3427
+ a = W[a];
3428
+ Z.uniformBlockBinding(a, b, c);
3429
+ }, glUseProgram:function(a) {
3430
+ a = W[a];
3431
+ Z.useProgram(a);
3432
+ Z.Ib = a;
3433
+ }, glVertexAttribDivisor:function(a, b) {
3434
+ Z.vertexAttribDivisor(a, b);
3435
+ }, glVertexAttribIPointer:function(a, b, c, d, e) {
3436
+ Z.vertexAttribIPointer(a, b, c, d, e);
3437
+ }, glVertexAttribPointer:function(a, b, c, d, e, f) {
3438
+ Z.vertexAttribPointer(a, b, c, !!d, e, f);
3439
+ }, glViewport:function(a, b, c, d) {
3440
+ Z.viewport(a, b, c, d);
3441
+ }, is_texture_image_done_decoding:function(a) {
3442
+ a = X[a];
3443
+ return a.complete || a.image.complete;
3444
+ }, provokingVertexWEBGL:function(a, b) {
3445
+ (a = t[a].H.mb) && a.provokingVertexWEBGL(b);
3446
+ }, set_decoded_tex_image_2d:function(a, b) {
3447
+ a = t[a].H;
3448
+ b = X[b];
3449
+ a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, b.image);
3450
+ b.imageWidth = b.image.width;
3451
+ b.imageHeight = b.image.height;
3452
+ b.complete = !0;
3453
+ delete b.image;
3454
+ }, strftime_l:(a, b, c, d) => Pd(a, b, c, d), texture_image_height:function(a) {
3455
+ a = X[a];
3456
+ return a.imageHeight;
3457
+ }, texture_image_width:function(a) {
3458
+ a = X[a];
3459
+ return a.imageWidth;
3460
+ }, webgl_texSubImage2DWithOffset:function(a, b, c, d, e, f, g, m, n, l) {
3461
+ a = t[a].H;
3462
+ a.texSubImage2D(b, c, d, e, f, g, m, n, l);
3463
+ }};
3464
+ (function() {
3465
+ var a = {env:Ud, wasi_snapshot_preview1:Ud,};
3466
+ Ea++;
3467
+ Ma(a, function(b) {
3468
+ x = b.instance.exports;
3469
+ ua = x.memory;
3470
+ za();
3471
+ Aa = x.__indirect_function_table;
3472
+ Ca.unshift(x.__wasm_call_ctors);
3473
+ Ea--;
3474
+ 0 == Ea && (null !== Fa && (clearInterval(Fa), Fa = null), Ga && (b = Ga, Ga = null, b()));
3475
+ }).catch(ca);
3476
+ return {};
3477
+ })();
3478
+ var mc = a => (mc = x.free)(a), Jd = a => (Jd = x.malloc)(a), Na = p._ma_device__on_notification_unlocked = a => (Na = p._ma_device__on_notification_unlocked = x.ma_device__on_notification_unlocked)(a);
3479
+ p._ma_malloc_emscripten = (a, b) => (p._ma_malloc_emscripten = x.ma_malloc_emscripten)(a, b);
3480
+ p._ma_free_emscripten = (a, b) => (p._ma_free_emscripten = x.ma_free_emscripten)(a, b);
3481
+ var Oa = p._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (Oa = p._ma_device_process_pcm_frames_capture__webaudio = x.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), Pa = p._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (Pa = p._ma_device_process_pcm_frames_playback__webaudio = x.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), Td = () => (Td = x.__errno_location)(), lc = a => (lc = x.__getTypeName)(a);
3482
+ p.__embind_initialize_bindings = () => (p.__embind_initialize_bindings = x._embind_initialize_bindings)();
3483
+ p.dynCall_iiji = (a, b, c, d, e) => (p.dynCall_iiji = x.dynCall_iiji)(a, b, c, d, e);
3484
+ p.dynCall_iiiji = (a, b, c, d, e, f) => (p.dynCall_iiiji = x.dynCall_iiiji)(a, b, c, d, e, f);
3485
+ p.dynCall_iij = (a, b, c, d) => (p.dynCall_iij = x.dynCall_iij)(a, b, c, d);
3486
+ p.dynCall_jii = (a, b, c) => (p.dynCall_jii = x.dynCall_jii)(a, b, c);
3487
+ p.dynCall_jiji = (a, b, c, d, e) => (p.dynCall_jiji = x.dynCall_jiji)(a, b, c, d, e);
3488
+ p.dynCall_viijii = (a, b, c, d, e, f, g) => (p.dynCall_viijii = x.dynCall_viijii)(a, b, c, d, e, f, g);
3489
+ p.dynCall_iiiiij = (a, b, c, d, e, f, g) => (p.dynCall_iiiiij = x.dynCall_iiiiij)(a, b, c, d, e, f, g);
3490
+ p.dynCall_iiiiijj = (a, b, c, d, e, f, g, m, n) => (p.dynCall_iiiiijj = x.dynCall_iiiiijj)(a, b, c, d, e, f, g, m, n);
3491
+ p.dynCall_iiiiiijj = (a, b, c, d, e, f, g, m, n, l) => (p.dynCall_iiiiiijj = x.dynCall_iiiiiijj)(a, b, c, d, e, f, g, m, n, l);
3492
+ p.___start_em_js = 262344;
3493
+ p.___stop_em_js = 264968;
3494
+ var Vd;
3495
+ Ga = function Wd() {
3496
+ Vd || Xd();
3497
+ Vd || (Ga = Wd);
3498
+ };
3499
+ function Xd() {
3500
+ if (!(0 < Ea)) {
3501
+ for (; 0 < Ba.length;) {
3502
+ Ba.shift()(p);
3503
+ }
3504
+ if (!(0 < Ea || Vd || (Vd = !0, p.calledRun = !0, va))) {
3505
+ p.noFSInit || Qb || (Qb = !0, Pb(), p.stdin = p.stdin, p.stdout = p.stdout, p.stderr = p.stderr, p.stdin ? Sb("stdin", p.stdin) : Jb("/dev/tty", "/dev/stdin"), p.stdout ? Sb("stdout", null, p.stdout) : Jb("/dev/tty", "/dev/stdout"), p.stderr ? Sb("stderr", null, p.stderr) : Jb("/dev/tty1", "/dev/stderr"), Nb("/dev/stdin", 0), Nb("/dev/stdout", 1), Nb("/dev/stderr", 1));
3506
+ for (ub = !1; 0 < Ca.length;) {
3507
+ Ca.shift()(p);
3508
+ }
3509
+ ba(p);
3510
+ if (p.onRuntimeInitialized) {
3511
+ p.onRuntimeInitialized();
3512
+ }
3513
+ for (; 0 < Da.length;) {
3514
+ Da.shift()(p);
3515
+ }
3516
+ }
3517
+ }
3518
+ }
3519
+ Xd();
3520
+
3521
+
3522
+
3523
+ return moduleArg.ready
3524
+ }
3525
+
3526
+ );
3527
+ })();
3528
+ export default Rive;