@rive-app/webgl2 2.25.7 → 2.26.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.
- package/package.json +1 -1
- package/rive.d.ts +3 -0
- package/rive.js +573 -507
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
package/rive.js
CHANGED
|
@@ -43,8 +43,8 @@ function ca() {
|
|
|
43
43
|
console.error(l);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
this.
|
|
47
|
-
e && e.
|
|
46
|
+
this.kb();
|
|
47
|
+
e && e.Mb();
|
|
48
48
|
}
|
|
49
49
|
let b = 0, c = 0, d = new Map(), e = null, f = null;
|
|
50
50
|
this.requestAnimationFrame = function(g) {
|
|
@@ -57,20 +57,20 @@ function ca() {
|
|
|
57
57
|
d.delete(g);
|
|
58
58
|
b && 0 == d.size && (cancelAnimationFrame(b), b = 0);
|
|
59
59
|
};
|
|
60
|
-
this.
|
|
60
|
+
this.Kb = function(g) {
|
|
61
61
|
f && (document.body.remove(f), f = null);
|
|
62
62
|
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(n) {
|
|
63
63
|
f.innerHTML = "RIVE FPS " + n.toFixed(1);
|
|
64
64
|
}, document.body.appendChild(f));
|
|
65
65
|
e = new function() {
|
|
66
66
|
let n = 0, p = 0;
|
|
67
|
-
this.
|
|
67
|
+
this.Mb = function() {
|
|
68
68
|
var l = performance.now();
|
|
69
69
|
p ? (++n, l -= p, 1000 < l && (g(1000 * n / l), n = p = 0)) : (p = l, n = 0);
|
|
70
70
|
};
|
|
71
71
|
}();
|
|
72
72
|
};
|
|
73
|
-
this.
|
|
73
|
+
this.kb = function() {
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
function da() {
|
|
@@ -108,10 +108,10 @@ m.onRuntimeInitialized = function() {
|
|
|
108
108
|
};
|
|
109
109
|
m.CustomFileAssetLoader = c.extend("CustomFileAssetLoader", {__construct:function({loadContents:e}) {
|
|
110
110
|
this.__parent.__construct.call(this);
|
|
111
|
-
this.
|
|
111
|
+
this.Bb = e;
|
|
112
112
|
}, loadContents:function(e, f) {
|
|
113
113
|
e = m.ptrToAsset(e);
|
|
114
|
-
return this.
|
|
114
|
+
return this.Bb(e, f);
|
|
115
115
|
},});
|
|
116
116
|
m.CDNFileAssetLoader = c.extend("CDNFileAssetLoader", {__construct:function() {
|
|
117
117
|
this.__parent.__construct.call(this);
|
|
@@ -136,11 +136,11 @@ m.onRuntimeInitialized = function() {
|
|
|
136
136
|
},});
|
|
137
137
|
m.FallbackFileAssetLoader = c.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
138
138
|
this.__parent.__construct.call(this);
|
|
139
|
-
this.
|
|
139
|
+
this.gb = [];
|
|
140
140
|
}, addLoader:function(e) {
|
|
141
|
-
this.
|
|
141
|
+
this.gb.push(e);
|
|
142
142
|
}, loadContents:function(e, f) {
|
|
143
|
-
for (let g of this.
|
|
143
|
+
for (let g of this.gb) {
|
|
144
144
|
if (g.loadContents(e, f)) {
|
|
145
145
|
return !0;
|
|
146
146
|
}
|
|
@@ -156,8 +156,8 @@ const fa = m.onRuntimeInitialized;
|
|
|
156
156
|
m.onRuntimeInitialized = function() {
|
|
157
157
|
function a(k) {
|
|
158
158
|
this.F = k;
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
159
|
+
this.Ab = k.getContext("2d");
|
|
160
|
+
this.Db = d;
|
|
161
161
|
this.S = [];
|
|
162
162
|
this.la = 0;
|
|
163
163
|
this.clear = function() {
|
|
@@ -175,13 +175,13 @@ m.onRuntimeInitialized = function() {
|
|
|
175
175
|
this.transform = function(q) {
|
|
176
176
|
this.S.push(d.transform.bind(d, q));
|
|
177
177
|
};
|
|
178
|
-
this.align = function(q, v, y,
|
|
179
|
-
this.S.push(d.align.bind(d, q, v, y,
|
|
178
|
+
this.align = function(q, v, y, C, z = 1.0) {
|
|
179
|
+
this.S.push(d.align.bind(d, q, v, y, C, z));
|
|
180
180
|
};
|
|
181
181
|
this.flush = function() {
|
|
182
182
|
console.assert(0 == this.la);
|
|
183
183
|
e.add(this);
|
|
184
|
-
d.
|
|
184
|
+
d.Va || c();
|
|
185
185
|
};
|
|
186
186
|
this["delete"] = function() {
|
|
187
187
|
};
|
|
@@ -192,24 +192,30 @@ m.onRuntimeInitialized = function() {
|
|
|
192
192
|
if (!q) {
|
|
193
193
|
return null;
|
|
194
194
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
195
|
+
v = ha(q, v);
|
|
196
|
+
ia(v);
|
|
197
|
+
const y = f(k.width, k.height);
|
|
198
|
+
y.Ka = v;
|
|
199
|
+
y.F = k;
|
|
200
|
+
y.La = k.width;
|
|
201
|
+
y.Wa = k.height;
|
|
202
|
+
y.T = q;
|
|
203
|
+
var C = y.delete;
|
|
204
|
+
y.delete = function() {
|
|
205
|
+
C.call(this);
|
|
206
|
+
var z = this.Ka;
|
|
207
|
+
r === w[z] && (r = null);
|
|
208
|
+
"object" == typeof JSEvents && JSEvents.Nc(w[z].D.canvas);
|
|
209
|
+
w[z] && w[z].D.canvas && (w[z].D.canvas.zb = void 0);
|
|
210
|
+
this.Ka = this.F = this.La = this.T = w[z] = null;
|
|
211
|
+
};
|
|
212
|
+
return y;
|
|
207
213
|
}
|
|
208
214
|
function c() {
|
|
209
215
|
if (d) {
|
|
210
|
-
var k = d.
|
|
216
|
+
var k = d.Cb, q = 0, v = 0, y = 0, C = Array(e.size), z = 0;
|
|
211
217
|
for (var E of e) {
|
|
212
|
-
E.fa = Math.min(E.F.width, k), E.ea = Math.min(E.F.height, k), E.Ia = E.ea * E.fa, q = Math.max(q, E.fa), v = Math.max(v, E.ea), y += E.Ia,
|
|
218
|
+
E.fa = Math.min(E.F.width, k), E.ea = Math.min(E.F.height, k), E.Ia = E.ea * E.fa, q = Math.max(q, E.fa), v = Math.max(v, E.ea), y += E.Ia, C[z++] = E;
|
|
213
219
|
}
|
|
214
220
|
e.clear();
|
|
215
221
|
if (!(0 >= y)) {
|
|
@@ -219,14 +225,14 @@ m.onRuntimeInitialized = function() {
|
|
|
219
225
|
}
|
|
220
226
|
q = Math.min(q, k);
|
|
221
227
|
q = Math.min(v, k);
|
|
222
|
-
|
|
228
|
+
C.sort((Z, rb) => rb.Ia - Z.Ia);
|
|
223
229
|
y = new m.DynamicRectanizer(k);
|
|
224
|
-
for (E = 0; E <
|
|
230
|
+
for (E = 0; E < C.length;) {
|
|
225
231
|
y.reset(q, v);
|
|
226
|
-
for (
|
|
227
|
-
var H =
|
|
232
|
+
for (z = E; z < C.length; ++z) {
|
|
233
|
+
var H = C[z], F = y.addRect(H.fa, H.ea);
|
|
228
234
|
if (0 > F) {
|
|
229
|
-
console.assert(
|
|
235
|
+
console.assert(z > E);
|
|
230
236
|
break;
|
|
231
237
|
}
|
|
232
238
|
H.ra = F & 65535;
|
|
@@ -241,26 +247,26 @@ m.onRuntimeInitialized = function() {
|
|
|
241
247
|
d.F.width != H && (d.F.width = H);
|
|
242
248
|
d.F.height != F && (d.F.height = F);
|
|
243
249
|
d.clear();
|
|
244
|
-
for (H = E; H <
|
|
245
|
-
F =
|
|
250
|
+
for (H = E; H < z; ++H) {
|
|
251
|
+
F = C[H];
|
|
246
252
|
d.saveClipRect(F.ra, F.sa, F.ra + F.fa, F.sa + F.ea);
|
|
247
|
-
let
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
d.transform(
|
|
253
|
+
let Z = new m.Mat2D();
|
|
254
|
+
Z.xx = F.fa / F.F.width;
|
|
255
|
+
Z.yy = F.ea / F.F.height;
|
|
256
|
+
Z.xy = Z.yx = 0;
|
|
257
|
+
Z.tx = F.ra;
|
|
258
|
+
Z.ty = F.sa;
|
|
259
|
+
d.transform(Z);
|
|
254
260
|
for (const rb of F.S) {
|
|
255
261
|
rb();
|
|
256
262
|
}
|
|
257
263
|
d.restoreClipRect();
|
|
258
264
|
F.S = [];
|
|
259
265
|
}
|
|
260
|
-
for (d.flush(); E <
|
|
261
|
-
H =
|
|
266
|
+
for (d.flush(); E < z; ++E) {
|
|
267
|
+
H = C[E], F = H.Ab, F.globalCompositeOperation = "copy", F.drawImage(d.F, H.ra, H.sa, H.fa, H.ea, 0, 0, H.F.width, H.F.height);
|
|
262
268
|
}
|
|
263
|
-
E =
|
|
269
|
+
E = z;
|
|
264
270
|
}
|
|
265
271
|
}
|
|
266
272
|
}
|
|
@@ -271,15 +277,15 @@ m.onRuntimeInitialized = function() {
|
|
|
271
277
|
m.makeRenderer = function(k, q) {
|
|
272
278
|
if (!d) {
|
|
273
279
|
function v(y) {
|
|
274
|
-
var
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
d = b(
|
|
278
|
-
d.
|
|
279
|
-
d.
|
|
280
|
-
d.Ja = !d.
|
|
281
|
-
if (y = d.
|
|
282
|
-
|
|
280
|
+
var C = document.createElement("canvas");
|
|
281
|
+
C.width = 1;
|
|
282
|
+
C.height = 1;
|
|
283
|
+
d = b(C, y);
|
|
284
|
+
d.Va = !!d.T.getExtension("WEBGL_shader_pixel_local_storage");
|
|
285
|
+
d.Cb = Math.min(d.T.getParameter(d.T.MAX_RENDERBUFFER_SIZE), d.T.getParameter(d.T.MAX_TEXTURE_SIZE));
|
|
286
|
+
d.Ja = !d.Va;
|
|
287
|
+
if (y = d.T.getExtension("WEBGL_debug_renderer_info")) {
|
|
288
|
+
C = d.T.getParameter(y.UNMASKED_RENDERER_WEBGL), d.T.getParameter(y.UNMASKED_VENDOR_WEBGL).includes("Google") && C.includes("ANGLE Metal Renderer") && (d.Ja = !1);
|
|
283
289
|
}
|
|
284
290
|
return d;
|
|
285
291
|
}
|
|
@@ -290,13 +296,13 @@ m.onRuntimeInitialized = function() {
|
|
|
290
296
|
};
|
|
291
297
|
const g = m.Artboard.prototype.draw;
|
|
292
298
|
m.Artboard.prototype.draw = function(k) {
|
|
293
|
-
k.S ? k.S.push(g.bind(this, k.
|
|
299
|
+
k.S ? k.S.push(g.bind(this, k.Db)) : g.call(this, k);
|
|
294
300
|
};
|
|
295
301
|
const n = new da(), p = new da(), l = new ca();
|
|
296
302
|
m.requestAnimationFrame = l.requestAnimationFrame.bind(l);
|
|
297
303
|
m.cancelAnimationFrame = l.cancelAnimationFrame.bind(l);
|
|
298
|
-
m.enableFPSCounter = l.
|
|
299
|
-
l.
|
|
304
|
+
m.enableFPSCounter = l.Kb.bind(l);
|
|
305
|
+
l.kb = c;
|
|
300
306
|
m.resolveAnimationFrame = c;
|
|
301
307
|
let t = m.load;
|
|
302
308
|
m.load = function(k, q, v = !0) {
|
|
@@ -307,10 +313,10 @@ m.onRuntimeInitialized = function() {
|
|
|
307
313
|
};
|
|
308
314
|
const u = m.WebGL2Renderer.prototype.clear;
|
|
309
315
|
m.WebGL2Renderer.prototype.clear = function() {
|
|
310
|
-
|
|
316
|
+
ia(this.Ka);
|
|
311
317
|
const k = this.F;
|
|
312
|
-
if (this.
|
|
313
|
-
this.resize(k.width, k.height), this.
|
|
318
|
+
if (this.La != k.width || this.Wa != k.height) {
|
|
319
|
+
this.resize(k.width, k.height), this.La = k.width, this.Wa = k.height;
|
|
314
320
|
}
|
|
315
321
|
u.call(this);
|
|
316
322
|
};
|
|
@@ -319,19 +325,19 @@ m.onRuntimeInitialized = function() {
|
|
|
319
325
|
q(k);
|
|
320
326
|
};
|
|
321
327
|
let x = m.Renderer.prototype.align;
|
|
322
|
-
m.Renderer.prototype.align = function(k, q, v, y,
|
|
323
|
-
x.call(this, k, q, v, y,
|
|
328
|
+
m.Renderer.prototype.align = function(k, q, v, y, C = 1.0) {
|
|
329
|
+
x.call(this, k, q, v, y, C);
|
|
324
330
|
};
|
|
325
331
|
};
|
|
326
|
-
var
|
|
327
|
-
if (
|
|
328
|
-
|
|
332
|
+
var ja = Object.assign({}, m), ka = "./this.program", la = "object" == typeof window, ma = "function" == typeof importScripts, A = "", na, oa;
|
|
333
|
+
if (la || ma) {
|
|
334
|
+
ma ? A = self.location.href : "undefined" != typeof document && document.currentScript && (A = document.currentScript.src), _scriptDir && (A = _scriptDir), 0 !== A.indexOf("blob:") ? A = A.substr(0, A.replace(/[?#].*/, "").lastIndexOf("/") + 1) : A = "", ma && (oa = a => {
|
|
329
335
|
var b = new XMLHttpRequest();
|
|
330
336
|
b.open("GET", a, !1);
|
|
331
337
|
b.responseType = "arraybuffer";
|
|
332
338
|
b.send(null);
|
|
333
339
|
return new Uint8Array(b.response);
|
|
334
|
-
}),
|
|
340
|
+
}), na = (a, b, c) => {
|
|
335
341
|
var d = new XMLHttpRequest();
|
|
336
342
|
d.open("GET", a, !0);
|
|
337
343
|
d.responseType = "arraybuffer";
|
|
@@ -342,18 +348,18 @@ if (ma || na) {
|
|
|
342
348
|
d.send(null);
|
|
343
349
|
};
|
|
344
350
|
}
|
|
345
|
-
var
|
|
346
|
-
Object.assign(m,
|
|
347
|
-
|
|
348
|
-
m.thisProgram && (
|
|
351
|
+
var pa = m.print || console.log.bind(console), qa = m.printErr || console.error.bind(console);
|
|
352
|
+
Object.assign(m, ja);
|
|
353
|
+
ja = null;
|
|
354
|
+
m.thisProgram && (ka = m.thisProgram);
|
|
349
355
|
var ra;
|
|
350
356
|
m.wasmBinary && (ra = m.wasmBinary);
|
|
351
357
|
var noExitRuntime = m.noExitRuntime || !0;
|
|
352
358
|
"object" != typeof WebAssembly && sa("no native wasm support detected");
|
|
353
|
-
var ta,
|
|
359
|
+
var ta, B, ua = !1, D, G, I, va, J, K, wa, xa;
|
|
354
360
|
function ya() {
|
|
355
361
|
var a = ta.buffer;
|
|
356
|
-
m.HEAP8 =
|
|
362
|
+
m.HEAP8 = D = new Int8Array(a);
|
|
357
363
|
m.HEAP16 = I = new Int16Array(a);
|
|
358
364
|
m.HEAP32 = J = new Int32Array(a);
|
|
359
365
|
m.HEAPU8 = G = new Uint8Array(a);
|
|
@@ -373,7 +379,7 @@ function sa(a) {
|
|
|
373
379
|
m.onAbort(a);
|
|
374
380
|
}
|
|
375
381
|
a = "Aborted(" + a + ")";
|
|
376
|
-
|
|
382
|
+
qa(a);
|
|
377
383
|
ua = !0;
|
|
378
384
|
a = new WebAssembly.RuntimeError(a + ". Build with -sASSERTIONS for more info.");
|
|
379
385
|
ba(a);
|
|
@@ -386,19 +392,19 @@ var Ia;
|
|
|
386
392
|
Ia = "webgl2_advanced.wasm";
|
|
387
393
|
if (!Ha(Ia)) {
|
|
388
394
|
var Ja = Ia;
|
|
389
|
-
Ia = m.locateFile ? m.locateFile(Ja,
|
|
395
|
+
Ia = m.locateFile ? m.locateFile(Ja, A) : A + Ja;
|
|
390
396
|
}
|
|
391
397
|
function Ka(a) {
|
|
392
398
|
if (a == Ia && ra) {
|
|
393
399
|
return new Uint8Array(ra);
|
|
394
400
|
}
|
|
395
|
-
if (
|
|
396
|
-
return
|
|
401
|
+
if (oa) {
|
|
402
|
+
return oa(a);
|
|
397
403
|
}
|
|
398
404
|
throw "both async and sync fetching of the wasm failed";
|
|
399
405
|
}
|
|
400
406
|
function La(a) {
|
|
401
|
-
if (!ra && (
|
|
407
|
+
if (!ra && (la || ma)) {
|
|
402
408
|
if ("function" == typeof fetch && !a.startsWith("file://")) {
|
|
403
409
|
return fetch(a, {credentials:"same-origin"}).then(b => {
|
|
404
410
|
if (!b.ok) {
|
|
@@ -407,9 +413,9 @@ function La(a) {
|
|
|
407
413
|
return b.arrayBuffer();
|
|
408
414
|
}).catch(() => Ka(a));
|
|
409
415
|
}
|
|
410
|
-
if (
|
|
416
|
+
if (na) {
|
|
411
417
|
return new Promise((b, c) => {
|
|
412
|
-
|
|
418
|
+
na(a, d => b(new Uint8Array(d)), c);
|
|
413
419
|
});
|
|
414
420
|
}
|
|
415
421
|
}
|
|
@@ -417,34 +423,34 @@ function La(a) {
|
|
|
417
423
|
}
|
|
418
424
|
function Ma(a, b, c) {
|
|
419
425
|
return La(a).then(d => WebAssembly.instantiate(d, b)).then(d => d).then(c, d => {
|
|
420
|
-
|
|
426
|
+
qa("failed to asynchronously prepare wasm: " + d);
|
|
421
427
|
sa(d);
|
|
422
428
|
});
|
|
423
429
|
}
|
|
424
430
|
function Na(a, b) {
|
|
425
431
|
var c = Ia;
|
|
426
432
|
return ra || "function" != typeof WebAssembly.instantiateStreaming || Ha(c) || c.startsWith("file://") || "function" != typeof fetch ? Ma(c, a, b) : fetch(c, {credentials:"same-origin"}).then(d => WebAssembly.instantiateStreaming(d, a).then(b, function(e) {
|
|
427
|
-
|
|
428
|
-
|
|
433
|
+
qa("wasm streaming compile failed: " + e);
|
|
434
|
+
qa("falling back to ArrayBuffer instantiation");
|
|
429
435
|
return Ma(c, a, b);
|
|
430
436
|
}));
|
|
431
437
|
}
|
|
432
|
-
var Oa, Pa, Ta = {
|
|
438
|
+
var Oa, Pa, Ta = {504750:(a, b, c, d, e) => {
|
|
433
439
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
434
440
|
return 0;
|
|
435
441
|
}
|
|
436
442
|
if ("undefined" === typeof window.h) {
|
|
437
443
|
window.h = {Da:0};
|
|
438
|
-
window.h.
|
|
439
|
-
window.h.
|
|
440
|
-
window.h.
|
|
441
|
-
window.h.
|
|
444
|
+
window.h.I = {};
|
|
445
|
+
window.h.I.Ba = a;
|
|
446
|
+
window.h.I.capture = b;
|
|
447
|
+
window.h.I.Na = c;
|
|
442
448
|
window.h.ia = {};
|
|
443
449
|
window.h.ia.stopped = d;
|
|
444
|
-
window.h.ia.
|
|
450
|
+
window.h.ia.tb = e;
|
|
445
451
|
let f = window.h;
|
|
446
452
|
f.C = [];
|
|
447
|
-
f.
|
|
453
|
+
f.nc = function(g) {
|
|
448
454
|
for (var n = 0; n < f.C.length; ++n) {
|
|
449
455
|
if (null == f.C[n]) {
|
|
450
456
|
return f.C[n] = g, n;
|
|
@@ -453,7 +459,7 @@ var Oa, Pa, Ta = {500942:(a, b, c, d, e) => {
|
|
|
453
459
|
f.C.push(g);
|
|
454
460
|
return f.C.length - 1;
|
|
455
461
|
};
|
|
456
|
-
f.
|
|
462
|
+
f.yb = function(g) {
|
|
457
463
|
for (f.C[g] = null; 0 < f.C.length;) {
|
|
458
464
|
if (null == f.C[f.C.length - 1]) {
|
|
459
465
|
f.C.pop();
|
|
@@ -462,39 +468,39 @@ var Oa, Pa, Ta = {500942:(a, b, c, d, e) => {
|
|
|
462
468
|
}
|
|
463
469
|
}
|
|
464
470
|
};
|
|
465
|
-
f.
|
|
471
|
+
f.Pc = function(g) {
|
|
466
472
|
for (var n = 0; n < f.C.length; ++n) {
|
|
467
473
|
if (f.C[n] == g) {
|
|
468
|
-
return f.
|
|
474
|
+
return f.yb(n);
|
|
469
475
|
}
|
|
470
476
|
}
|
|
471
477
|
};
|
|
472
478
|
f.va = function(g) {
|
|
473
479
|
return f.C[g];
|
|
474
480
|
};
|
|
475
|
-
f.
|
|
481
|
+
f.xb = ["touchend", "click"];
|
|
476
482
|
f.unlock = function() {
|
|
477
483
|
for (var g = 0; g < f.C.length; ++g) {
|
|
478
484
|
var n = f.C[g];
|
|
479
|
-
null != n && null != n.
|
|
480
|
-
Qa(n.
|
|
485
|
+
null != n && null != n.J && n.state === f.ia.tb && n.J.resume().then(() => {
|
|
486
|
+
Qa(n.lb);
|
|
481
487
|
}, p => {
|
|
482
488
|
console.error("Failed to resume audiocontext", p);
|
|
483
489
|
});
|
|
484
490
|
}
|
|
485
|
-
f.
|
|
491
|
+
f.xb.map(function(p) {
|
|
486
492
|
document.removeEventListener(p, f.unlock, !0);
|
|
487
493
|
});
|
|
488
494
|
};
|
|
489
|
-
f.
|
|
495
|
+
f.xb.map(function(g) {
|
|
490
496
|
document.addEventListener(g, f.unlock, !0);
|
|
491
497
|
});
|
|
492
498
|
}
|
|
493
499
|
window.h.Da += 1;
|
|
494
500
|
return 1;
|
|
495
|
-
},
|
|
501
|
+
}, 506928:() => {
|
|
496
502
|
"undefined" !== typeof window.h && (--window.h.Da, 0 === window.h.Da && delete window.h);
|
|
497
|
-
},
|
|
503
|
+
}, 507092:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 507196:() => {
|
|
498
504
|
try {
|
|
499
505
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
500
506
|
a.close();
|
|
@@ -502,23 +508,23 @@ var Oa, Pa, Ta = {500942:(a, b, c, d, e) => {
|
|
|
502
508
|
} catch (c) {
|
|
503
509
|
return 0;
|
|
504
510
|
}
|
|
505
|
-
},
|
|
511
|
+
}, 507367:(a, b, c, d, e, f) => {
|
|
506
512
|
if ("undefined" === typeof window.h) {
|
|
507
513
|
return -1;
|
|
508
514
|
}
|
|
509
515
|
var g = {}, n = {};
|
|
510
|
-
a == window.h.
|
|
511
|
-
g.
|
|
512
|
-
g.
|
|
516
|
+
a == window.h.I.Ba && 0 != c && (n.sampleRate = c);
|
|
517
|
+
g.J = new (window.AudioContext || window.webkitAudioContext)(n);
|
|
518
|
+
g.J.suspend();
|
|
513
519
|
g.state = window.h.ia.stopped;
|
|
514
520
|
c = 0;
|
|
515
|
-
a != window.h.
|
|
516
|
-
g.Z = g.
|
|
521
|
+
a != window.h.I.Ba && (c = b);
|
|
522
|
+
g.Z = g.J.createScriptProcessor(d, c, b);
|
|
517
523
|
g.Z.onaudioprocess = function(p) {
|
|
518
524
|
if (null == g.wa || 0 == g.wa.length) {
|
|
519
525
|
g.wa = new Float32Array(wa.buffer, e, d * b);
|
|
520
526
|
}
|
|
521
|
-
if (a == window.h.
|
|
527
|
+
if (a == window.h.I.capture || a == window.h.I.Na) {
|
|
522
528
|
for (var l = 0; l < b; l += 1) {
|
|
523
529
|
for (var t = p.inputBuffer.getChannelData(l), u = g.wa, x = 0; x < d; x += 1) {
|
|
524
530
|
u[x * b + l] = t[x];
|
|
@@ -526,7 +532,7 @@ var Oa, Pa, Ta = {500942:(a, b, c, d, e) => {
|
|
|
526
532
|
}
|
|
527
533
|
Ra(f, d, e);
|
|
528
534
|
}
|
|
529
|
-
if (a == window.h.
|
|
535
|
+
if (a == window.h.I.Ba || a == window.h.I.Na) {
|
|
530
536
|
for (Sa(f, d, e), l = 0; l < p.outputBuffer.numberOfChannels; ++l) {
|
|
531
537
|
for (t = p.outputBuffer.getChannelData(l), u = g.wa, x = 0; x < d; x += 1) {
|
|
532
538
|
t[x] = u[x * b + l];
|
|
@@ -538,33 +544,33 @@ var Oa, Pa, Ta = {500942:(a, b, c, d, e) => {
|
|
|
538
544
|
}
|
|
539
545
|
}
|
|
540
546
|
};
|
|
541
|
-
a != window.h.
|
|
542
|
-
g.Ea = g.
|
|
547
|
+
a != window.h.I.capture && a != window.h.I.Na || navigator.mediaDevices.getUserMedia({audio:!0, video:!1}).then(function(p) {
|
|
548
|
+
g.Ea = g.J.createMediaStreamSource(p);
|
|
543
549
|
g.Ea.connect(g.Z);
|
|
544
|
-
g.Z.connect(g.
|
|
550
|
+
g.Z.connect(g.J.destination);
|
|
545
551
|
}).catch(function(p) {
|
|
546
552
|
console.log("Failed to get user media: " + p);
|
|
547
553
|
});
|
|
548
|
-
a == window.h.
|
|
549
|
-
g.
|
|
550
|
-
return window.h.
|
|
551
|
-
},
|
|
554
|
+
a == window.h.I.Ba && g.Z.connect(g.J.destination);
|
|
555
|
+
g.lb = f;
|
|
556
|
+
return window.h.nc(g);
|
|
557
|
+
}, 510244:a => window.h.va(a).J.sampleRate, 510317:a => {
|
|
552
558
|
a = window.h.va(a);
|
|
553
559
|
void 0 !== a.Z && (a.Z.onaudioprocess = function() {
|
|
554
560
|
}, a.Z.disconnect(), a.Z = void 0);
|
|
555
561
|
void 0 !== a.Ea && (a.Ea.disconnect(), a.Ea = void 0);
|
|
556
|
-
a.
|
|
557
|
-
a.
|
|
558
|
-
a.
|
|
559
|
-
},
|
|
560
|
-
window.h.
|
|
561
|
-
},
|
|
562
|
+
a.J.close();
|
|
563
|
+
a.J = void 0;
|
|
564
|
+
a.lb = void 0;
|
|
565
|
+
}, 510717:a => {
|
|
566
|
+
window.h.yb(a);
|
|
567
|
+
}, 510767:a => {
|
|
562
568
|
a = window.h.va(a);
|
|
563
|
-
a.
|
|
564
|
-
a.state = window.h.ia.
|
|
565
|
-
},
|
|
569
|
+
a.J.resume();
|
|
570
|
+
a.state = window.h.ia.tb;
|
|
571
|
+
}, 510906:a => {
|
|
566
572
|
a = window.h.va(a);
|
|
567
|
-
a.
|
|
573
|
+
a.J.suspend();
|
|
568
574
|
a.state = window.h.ia.stopped;
|
|
569
575
|
}}, Ua = a => {
|
|
570
576
|
for (; 0 < a.length;) {
|
|
@@ -706,7 +712,7 @@ function fb(a, b) {
|
|
|
706
712
|
}
|
|
707
713
|
var gb = [];
|
|
708
714
|
function hb(a, b) {
|
|
709
|
-
gb[a] = {input:[],
|
|
715
|
+
gb[a] = {input:[], G:[], V:b};
|
|
710
716
|
ib(a, jb);
|
|
711
717
|
}
|
|
712
718
|
var jb = {open:function(a) {
|
|
@@ -717,16 +723,16 @@ var jb = {open:function(a) {
|
|
|
717
723
|
a.s = b;
|
|
718
724
|
a.seekable = !1;
|
|
719
725
|
}, close:function(a) {
|
|
720
|
-
a.s.
|
|
726
|
+
a.s.V.ua(a.s);
|
|
721
727
|
}, ua:function(a) {
|
|
722
|
-
a.s.
|
|
728
|
+
a.s.V.ua(a.s);
|
|
723
729
|
}, read:function(a, b, c, d) {
|
|
724
|
-
if (!a.s || !a.s.
|
|
730
|
+
if (!a.s || !a.s.V.fb) {
|
|
725
731
|
throw new M(60);
|
|
726
732
|
}
|
|
727
733
|
for (var e = 0, f = 0; f < d; f++) {
|
|
728
734
|
try {
|
|
729
|
-
var g = a.s.
|
|
735
|
+
var g = a.s.V.fb(a.s);
|
|
730
736
|
} catch (n) {
|
|
731
737
|
throw new M(29);
|
|
732
738
|
}
|
|
@@ -742,19 +748,19 @@ var jb = {open:function(a) {
|
|
|
742
748
|
e && (a.node.timestamp = Date.now());
|
|
743
749
|
return e;
|
|
744
750
|
}, write:function(a, b, c, d) {
|
|
745
|
-
if (!a.s || !a.s.
|
|
751
|
+
if (!a.s || !a.s.V.Qa) {
|
|
746
752
|
throw new M(60);
|
|
747
753
|
}
|
|
748
754
|
try {
|
|
749
755
|
for (var e = 0; e < d; e++) {
|
|
750
|
-
a.s.
|
|
756
|
+
a.s.V.Qa(a.s, b[c + e]);
|
|
751
757
|
}
|
|
752
758
|
} catch (f) {
|
|
753
759
|
throw new M(29);
|
|
754
760
|
}
|
|
755
761
|
d && (a.node.timestamp = Date.now());
|
|
756
762
|
return e;
|
|
757
|
-
},}, kb = {
|
|
763
|
+
},}, kb = {fb:function() {
|
|
758
764
|
a: {
|
|
759
765
|
if (!cb.length) {
|
|
760
766
|
var a = null;
|
|
@@ -768,34 +774,34 @@ var jb = {open:function(a) {
|
|
|
768
774
|
a = cb.shift();
|
|
769
775
|
}
|
|
770
776
|
return a;
|
|
771
|
-
},
|
|
772
|
-
null === b || 10 === b ? (
|
|
777
|
+
}, Qa:function(a, b) {
|
|
778
|
+
null === b || 10 === b ? (pa(L(a.G, 0)), a.G = []) : 0 != b && a.G.push(b);
|
|
773
779
|
}, ua:function(a) {
|
|
774
|
-
a.
|
|
775
|
-
}, Vb:function() {
|
|
776
|
-
return {tc:25856, vc:5, sc:191, uc:35387, rc:[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,]};
|
|
780
|
+
a.G && 0 < a.G.length && (pa(L(a.G, 0)), a.G = []);
|
|
777
781
|
}, Wb:function() {
|
|
778
|
-
return 0;
|
|
782
|
+
return {tc:25856, vc:5, sc:191, uc:35387, rc:[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,]};
|
|
779
783
|
}, Xb:function() {
|
|
784
|
+
return 0;
|
|
785
|
+
}, Yb:function() {
|
|
780
786
|
return [24, 80];
|
|
781
|
-
},}, lb = {
|
|
782
|
-
null === b || 10 === b ? (
|
|
787
|
+
},}, lb = {Qa:function(a, b) {
|
|
788
|
+
null === b || 10 === b ? (qa(L(a.G, 0)), a.G = []) : 0 != b && a.G.push(b);
|
|
783
789
|
}, ua:function(a) {
|
|
784
|
-
a.
|
|
790
|
+
a.G && 0 < a.G.length && (qa(L(a.G, 0)), a.G = []);
|
|
785
791
|
},};
|
|
786
792
|
function mb(a, b) {
|
|
787
793
|
var c = a.j ? a.j.length : 0;
|
|
788
794
|
c >= b || (b = Math.max(b, c * (1048576 > c ? 2.0 : 1.125) >>> 0), 0 != c && (b = Math.max(b, 256)), c = a.j, a.j = new Uint8Array(b), 0 < a.v && a.j.set(c.subarray(0, a.v), 0));
|
|
789
795
|
}
|
|
790
|
-
var N = {O:null,
|
|
796
|
+
var N = {O:null, U() {
|
|
791
797
|
return N.createNode(null, "/", 16895, 0);
|
|
792
798
|
}, createNode(a, b, c, d) {
|
|
793
799
|
if (24576 === (c & 61440) || 4096 === (c & 61440)) {
|
|
794
800
|
throw new M(63);
|
|
795
801
|
}
|
|
796
|
-
N.O || (N.O = {dir:{node:{Y:N.l.Y, P:N.l.P, ma:N.l.ma, za:N.l.za,
|
|
802
|
+
N.O || (N.O = {dir:{node:{Y:N.l.Y, P:N.l.P, ma:N.l.ma, za:N.l.za, rb:N.l.rb, wb:N.l.wb, sb:N.l.sb, pb:N.l.pb, Fa:N.l.Fa}, stream:{ba:N.m.ba}}, file:{node:{Y:N.l.Y, P:N.l.P}, stream:{ba:N.m.ba, read:N.m.read, write:N.m.write, ta:N.m.ta, hb:N.m.hb, jb:N.m.jb}}, link:{node:{Y:N.l.Y, P:N.l.P, na:N.l.na}, stream:{}}, Xa:{node:{Y:N.l.Y, P:N.l.P}, stream:nb}});
|
|
797
803
|
c = ob(a, b, c, d);
|
|
798
|
-
16384 === (c.mode & 61440) ? (c.l = N.O.dir.node, c.m = N.O.dir.stream, c.j = {}) : 32768 === (c.mode & 61440) ? (c.l = N.O.file.node, c.m = N.O.file.stream, c.v = 0, c.j = null) : 40960 === (c.mode & 61440) ? (c.l = N.O.link.node, c.m = N.O.link.stream) : 8192 === (c.mode & 61440) && (c.l = N.O.
|
|
804
|
+
16384 === (c.mode & 61440) ? (c.l = N.O.dir.node, c.m = N.O.dir.stream, c.j = {}) : 32768 === (c.mode & 61440) ? (c.l = N.O.file.node, c.m = N.O.file.stream, c.v = 0, c.j = null) : 40960 === (c.mode & 61440) ? (c.l = N.O.link.node, c.m = N.O.link.stream) : 8192 === (c.mode & 61440) && (c.l = N.O.Xa.node, c.m = N.O.Xa.stream);
|
|
799
805
|
c.timestamp = Date.now();
|
|
800
806
|
a && (a.j[b] = c, a.timestamp = c.timestamp);
|
|
801
807
|
return c;
|
|
@@ -814,8 +820,8 @@ var N = {O:null, T() {
|
|
|
814
820
|
b.pc = new Date(a.timestamp);
|
|
815
821
|
b.Ic = new Date(a.timestamp);
|
|
816
822
|
b.wc = new Date(a.timestamp);
|
|
817
|
-
b.
|
|
818
|
-
b.qc = Math.ceil(b.size / b.
|
|
823
|
+
b.Eb = 4096;
|
|
824
|
+
b.qc = Math.ceil(b.size / b.Eb);
|
|
819
825
|
return b;
|
|
820
826
|
}, P(a, b) {
|
|
821
827
|
void 0 !== b.mode && (a.mode = b.mode);
|
|
@@ -834,7 +840,7 @@ var N = {O:null, T() {
|
|
|
834
840
|
throw pb[44];
|
|
835
841
|
}, za(a, b, c, d) {
|
|
836
842
|
return N.createNode(a, b, c, d);
|
|
837
|
-
},
|
|
843
|
+
}, rb(a, b, c) {
|
|
838
844
|
if (16384 === (a.mode & 61440)) {
|
|
839
845
|
try {
|
|
840
846
|
var d = qb(b, c);
|
|
@@ -852,17 +858,17 @@ var N = {O:null, T() {
|
|
|
852
858
|
b.j[c] = a;
|
|
853
859
|
b.timestamp = a.parent.timestamp;
|
|
854
860
|
a.parent = b;
|
|
855
|
-
},
|
|
861
|
+
}, wb(a, b) {
|
|
856
862
|
delete a.j[b];
|
|
857
863
|
a.timestamp = Date.now();
|
|
858
|
-
},
|
|
864
|
+
}, sb(a, b) {
|
|
859
865
|
var c = qb(a, b), d;
|
|
860
866
|
for (d in c.j) {
|
|
861
867
|
throw new M(55);
|
|
862
868
|
}
|
|
863
869
|
delete a.j[b];
|
|
864
870
|
a.timestamp = Date.now();
|
|
865
|
-
},
|
|
871
|
+
}, pb(a) {
|
|
866
872
|
var b = [".", ".."], c;
|
|
867
873
|
for (c in a.j) {
|
|
868
874
|
a.j.hasOwnProperty(c) && b.push(c);
|
|
@@ -892,7 +898,7 @@ var N = {O:null, T() {
|
|
|
892
898
|
}
|
|
893
899
|
return a;
|
|
894
900
|
}, write(a, b, c, d, e, f) {
|
|
895
|
-
b.buffer ===
|
|
901
|
+
b.buffer === D.buffer && (f = !1);
|
|
896
902
|
if (!d) {
|
|
897
903
|
return 0;
|
|
898
904
|
}
|
|
@@ -928,12 +934,12 @@ var N = {O:null, T() {
|
|
|
928
934
|
}, ta(a, b, c) {
|
|
929
935
|
mb(a.node, b + c);
|
|
930
936
|
a.node.v = Math.max(a.node.v, b + c);
|
|
931
|
-
},
|
|
937
|
+
}, hb(a, b, c, d, e) {
|
|
932
938
|
if (32768 !== (a.node.mode & 61440)) {
|
|
933
939
|
throw new M(43);
|
|
934
940
|
}
|
|
935
941
|
a = a.node.j;
|
|
936
|
-
if (e & 2 || a.buffer !==
|
|
942
|
+
if (e & 2 || a.buffer !== D.buffer) {
|
|
937
943
|
if (0 < c || c + b < a.length) {
|
|
938
944
|
a.subarray ? a = a.subarray(c, c + b) : a = Array.prototype.slice.call(a, c, c + b);
|
|
939
945
|
}
|
|
@@ -943,12 +949,12 @@ var N = {O:null, T() {
|
|
|
943
949
|
if (!b) {
|
|
944
950
|
throw new M(48);
|
|
945
951
|
}
|
|
946
|
-
|
|
952
|
+
D.set(a, b);
|
|
947
953
|
} else {
|
|
948
954
|
c = !1, b = a.byteOffset;
|
|
949
955
|
}
|
|
950
956
|
return {o:b, M:c};
|
|
951
|
-
},
|
|
957
|
+
}, jb(a, b, c, d) {
|
|
952
958
|
N.m.write(a, b, 0, d, c, !1);
|
|
953
959
|
return 0;
|
|
954
960
|
},},};
|
|
@@ -963,8 +969,8 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
963
969
|
if (!a) {
|
|
964
970
|
return {path:"", node:null};
|
|
965
971
|
}
|
|
966
|
-
b = Object.assign({
|
|
967
|
-
if (8 < b.
|
|
972
|
+
b = Object.assign({cb:!0, Sa:0}, b);
|
|
973
|
+
if (8 < b.Sa) {
|
|
968
974
|
throw new M(32);
|
|
969
975
|
}
|
|
970
976
|
a = a.split("/").filter(g => !!g);
|
|
@@ -975,10 +981,10 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
975
981
|
}
|
|
976
982
|
c = qb(c, a[e]);
|
|
977
983
|
d = Wa(d + "/" + a[e]);
|
|
978
|
-
c.Aa && (!f || f && b.
|
|
979
|
-
if (!f || b.
|
|
984
|
+
c.Aa && (!f || f && b.cb) && (c = c.Aa.root);
|
|
985
|
+
if (!f || b.bb) {
|
|
980
986
|
for (f = 0; 40960 === (c.mode & 61440);) {
|
|
981
|
-
if (c = zb(d), d = ab(Xa(d), c), c = Ab(d, {
|
|
987
|
+
if (c = zb(d), d = ab(Xa(d), c), c = Ab(d, {Sa:b.Sa + 1}).node, 40 < f++) {
|
|
982
988
|
throw new M(32);
|
|
983
989
|
}
|
|
984
990
|
}
|
|
@@ -988,7 +994,7 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
988
994
|
}, Bb = a => {
|
|
989
995
|
for (var b;;) {
|
|
990
996
|
if (a === a.parent) {
|
|
991
|
-
return a = a.
|
|
997
|
+
return a = a.U.ib, b ? "/" !== a[a.length - 1] ? `${a}/${b}` : a + b : a;
|
|
992
998
|
}
|
|
993
999
|
b = b ? `${a.name}/${b}` : a.name;
|
|
994
1000
|
a = a.parent;
|
|
@@ -1003,7 +1009,7 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
1003
1009
|
if (c = (c = Db(a, "x")) ? c : a.l.ma ? 0 : 2) {
|
|
1004
1010
|
throw new M(c, a);
|
|
1005
1011
|
}
|
|
1006
|
-
for (c = xb[Cb(a.id, b)]; c; c = c
|
|
1012
|
+
for (c = xb[Cb(a.id, b)]; c; c = c.ac) {
|
|
1007
1013
|
var d = c.name;
|
|
1008
1014
|
if (c.parent.id === a.id && d === b) {
|
|
1009
1015
|
return c;
|
|
@@ -1013,7 +1019,7 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
1013
1019
|
}, ob = (a, b, c, d) => {
|
|
1014
1020
|
a = new Eb(a, b, c, d);
|
|
1015
1021
|
b = Cb(a.parent.id, a.name);
|
|
1016
|
-
a
|
|
1022
|
+
a.ac = xb[b];
|
|
1017
1023
|
return xb[b] = a;
|
|
1018
1024
|
}, Fb = a => {
|
|
1019
1025
|
var b = ["r", "w", "rw"][a & 3];
|
|
@@ -1083,7 +1089,7 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
1083
1089
|
throw new M(10);
|
|
1084
1090
|
}
|
|
1085
1091
|
if (!c && !d) {
|
|
1086
|
-
var e = Ab(b, {
|
|
1092
|
+
var e = Ab(b, {cb:!1});
|
|
1087
1093
|
b = e.path;
|
|
1088
1094
|
e = e.node;
|
|
1089
1095
|
if (e.Aa) {
|
|
@@ -1093,11 +1099,11 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
1093
1099
|
throw new M(54);
|
|
1094
1100
|
}
|
|
1095
1101
|
}
|
|
1096
|
-
b = {type:a, Mc:{},
|
|
1097
|
-
a = a.
|
|
1098
|
-
a.
|
|
1102
|
+
b = {type:a, Mc:{}, ib:b, $b:[]};
|
|
1103
|
+
a = a.U(b);
|
|
1104
|
+
a.U = b;
|
|
1099
1105
|
b.root = a;
|
|
1100
|
-
c ? tb = a : e && (e.Aa = b, e.
|
|
1106
|
+
c ? tb = a : e && (e.Aa = b, e.U && e.U.$b.push(b));
|
|
1101
1107
|
}, O = (a, b, c) => {
|
|
1102
1108
|
var d = Ab(a, {parent:!0}).node;
|
|
1103
1109
|
a = Ya(a);
|
|
@@ -1158,7 +1164,7 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
1158
1164
|
} else {
|
|
1159
1165
|
a = Wa(a);
|
|
1160
1166
|
try {
|
|
1161
|
-
e = Ab(a, {
|
|
1167
|
+
e = Ab(a, {bb:!(b & 131072)}).node;
|
|
1162
1168
|
} catch (f) {
|
|
1163
1169
|
}
|
|
1164
1170
|
}
|
|
@@ -1184,7 +1190,7 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
1184
1190
|
}
|
|
1185
1191
|
if (b & 512 && !d) {
|
|
1186
1192
|
c = e;
|
|
1187
|
-
c = "string" == typeof c ? Ab(c, {
|
|
1193
|
+
c = "string" == typeof c ? Ab(c, {bb:!0}).node : c;
|
|
1188
1194
|
if (!c.l.P) {
|
|
1189
1195
|
throw new M(63);
|
|
1190
1196
|
}
|
|
@@ -1200,7 +1206,7 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
1200
1206
|
c.l.P(c, {size:0, timestamp:Date.now()});
|
|
1201
1207
|
}
|
|
1202
1208
|
b &= -131713;
|
|
1203
|
-
e = Kb({node:e, path:Bb(e), flags:b, seekable:!0, position:0, m:e.m,
|
|
1209
|
+
e = Kb({node:e, path:Bb(e), flags:b, seekable:!0, position:0, m:e.m, oc:[], error:!1});
|
|
1204
1210
|
e.m.open && e.m.open(e);
|
|
1205
1211
|
!m.logReadFiles || b & 1 || (Ob || (Ob = {}), a in Ob || (Ob[a] = 1));
|
|
1206
1212
|
return e;
|
|
@@ -1215,15 +1221,15 @@ var tb = null, ub = {}, vb = [], wb = 1, xb = null, yb = !0, M = null, pb = {},
|
|
|
1215
1221
|
throw new M(28);
|
|
1216
1222
|
}
|
|
1217
1223
|
a.position = a.m.ba(a, b, c);
|
|
1218
|
-
a.
|
|
1224
|
+
a.oc = [];
|
|
1219
1225
|
}, Rb = () => {
|
|
1220
1226
|
M || (M = function(a, b) {
|
|
1221
1227
|
this.name = "ErrnoError";
|
|
1222
1228
|
this.node = b;
|
|
1223
|
-
this.
|
|
1229
|
+
this.dc = function(c) {
|
|
1224
1230
|
this.aa = c;
|
|
1225
1231
|
};
|
|
1226
|
-
this.
|
|
1232
|
+
this.dc(a);
|
|
1227
1233
|
this.message = "FS error";
|
|
1228
1234
|
}, M.prototype = Error(), M.prototype.constructor = M, [44].forEach(a => {
|
|
1229
1235
|
pb[a] = new M(a);
|
|
@@ -1289,7 +1295,7 @@ function Zb(a, b) {
|
|
|
1289
1295
|
}
|
|
1290
1296
|
function $b() {
|
|
1291
1297
|
this.M = [void 0];
|
|
1292
|
-
this.
|
|
1298
|
+
this.eb = [];
|
|
1293
1299
|
}
|
|
1294
1300
|
var P = new $b(), ac = void 0;
|
|
1295
1301
|
function Q(a) {
|
|
@@ -1309,7 +1315,7 @@ var R = a => {
|
|
|
1309
1315
|
case !1:
|
|
1310
1316
|
return 4;
|
|
1311
1317
|
default:
|
|
1312
|
-
return P.ta({
|
|
1318
|
+
return P.ta({qb:1, value:a});
|
|
1313
1319
|
}
|
|
1314
1320
|
};
|
|
1315
1321
|
function cc(a) {
|
|
@@ -1365,7 +1371,7 @@ function pc() {
|
|
|
1365
1371
|
var qc = !1;
|
|
1366
1372
|
function rc(a) {
|
|
1367
1373
|
--a.count.value;
|
|
1368
|
-
0 === a.count.value && (a.
|
|
1374
|
+
0 === a.count.value && (a.H ? a.L.W(a.H) : a.u.i.W(a.o));
|
|
1369
1375
|
}
|
|
1370
1376
|
function sc(a, b, c) {
|
|
1371
1377
|
if (b === c) {
|
|
@@ -1375,7 +1381,7 @@ function sc(a, b, c) {
|
|
|
1375
1381
|
return null;
|
|
1376
1382
|
}
|
|
1377
1383
|
a = sc(a, b, c.A);
|
|
1378
|
-
return null === a ? null : c.
|
|
1384
|
+
return null === a ? null : c.Ib(a);
|
|
1379
1385
|
}
|
|
1380
1386
|
var tc = {};
|
|
1381
1387
|
function uc(a, b) {
|
|
@@ -1388,7 +1394,7 @@ function wc(a) {
|
|
|
1388
1394
|
}
|
|
1389
1395
|
function xc(a, b) {
|
|
1390
1396
|
b.u && b.o || wc("makeClassHandle requires ptr and ptrType");
|
|
1391
|
-
!!b.L !== !!b.
|
|
1397
|
+
!!b.L !== !!b.H && wc("Both smartPtrType and smartPtr must be specified");
|
|
1392
1398
|
b.count = {value:1};
|
|
1393
1399
|
return yc(Object.create(a, {g:{value:b,},}));
|
|
1394
1400
|
}
|
|
@@ -1401,7 +1407,7 @@ function yc(a) {
|
|
|
1401
1407
|
});
|
|
1402
1408
|
yc = b => {
|
|
1403
1409
|
var c = b.g;
|
|
1404
|
-
c.
|
|
1410
|
+
c.H && qc.register(b, {g:c}, b);
|
|
1405
1411
|
return b;
|
|
1406
1412
|
};
|
|
1407
1413
|
pc = b => {
|
|
@@ -1459,7 +1465,7 @@ function Fc(a, b, c = {}) {
|
|
|
1459
1465
|
var d = b.name;
|
|
1460
1466
|
a || Q(`type "${d}" must have a positive integer typeid pointer`);
|
|
1461
1467
|
if (kc.hasOwnProperty(a)) {
|
|
1462
|
-
if (c.
|
|
1468
|
+
if (c.Tb) {
|
|
1463
1469
|
return;
|
|
1464
1470
|
}
|
|
1465
1471
|
Q(`Cannot register type '${d}' twice`);
|
|
@@ -1497,12 +1503,12 @@ function Kc(a, b, c, d, e, f, g, n) {
|
|
|
1497
1503
|
this.name = a;
|
|
1498
1504
|
this.constructor = b;
|
|
1499
1505
|
this.N = c;
|
|
1500
|
-
this.
|
|
1506
|
+
this.W = d;
|
|
1501
1507
|
this.A = e;
|
|
1502
|
-
this.
|
|
1508
|
+
this.Nb = f;
|
|
1503
1509
|
this.pa = g;
|
|
1504
|
-
this.
|
|
1505
|
-
this.
|
|
1510
|
+
this.Ib = n;
|
|
1511
|
+
this.mb = [];
|
|
1506
1512
|
}
|
|
1507
1513
|
function Lc(a, b, c) {
|
|
1508
1514
|
for (; b !== c;) {
|
|
@@ -1512,7 +1518,7 @@ function Lc(a, b, c) {
|
|
|
1512
1518
|
}
|
|
1513
1519
|
function Mc(a, b) {
|
|
1514
1520
|
if (null === b) {
|
|
1515
|
-
return this.
|
|
1521
|
+
return this.Pa && Q(`null is not a valid ${this.name}`), 0;
|
|
1516
1522
|
}
|
|
1517
1523
|
b.g || Q(`Cannot pass "${Nc(b)}" as a ${this.name}`);
|
|
1518
1524
|
b.g.o || Q(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
@@ -1520,10 +1526,10 @@ function Mc(a, b) {
|
|
|
1520
1526
|
}
|
|
1521
1527
|
function Oc(a, b) {
|
|
1522
1528
|
if (null === b) {
|
|
1523
|
-
this.
|
|
1529
|
+
this.Pa && Q(`null is not a valid ${this.name}`);
|
|
1524
1530
|
if (this.ya) {
|
|
1525
|
-
var c = this.
|
|
1526
|
-
null !== a && a.push(this.
|
|
1531
|
+
var c = this.Ra();
|
|
1532
|
+
null !== a && a.push(this.W, c);
|
|
1527
1533
|
return c;
|
|
1528
1534
|
}
|
|
1529
1535
|
return 0;
|
|
@@ -1533,22 +1539,22 @@ function Oc(a, b) {
|
|
|
1533
1539
|
!this.xa && b.g.u.xa && Q(`Cannot convert argument of type ${b.g.L ? b.g.L.name : b.g.u.name} to parameter type ${this.name}`);
|
|
1534
1540
|
c = Lc(b.g.o, b.g.u.i, this.i);
|
|
1535
1541
|
if (this.ya) {
|
|
1536
|
-
switch(void 0 === b.g.
|
|
1542
|
+
switch(void 0 === b.g.H && Q("Passing raw pointer to smart pointer is illegal"), this.ic) {
|
|
1537
1543
|
case 0:
|
|
1538
|
-
b.g.L === this ? c = b.g.
|
|
1544
|
+
b.g.L === this ? c = b.g.H : Q(`Cannot convert argument of type ${b.g.L ? b.g.L.name : b.g.u.name} to parameter type ${this.name}`);
|
|
1539
1545
|
break;
|
|
1540
1546
|
case 1:
|
|
1541
|
-
c = b.g.
|
|
1547
|
+
c = b.g.H;
|
|
1542
1548
|
break;
|
|
1543
1549
|
case 2:
|
|
1544
1550
|
if (b.g.L === this) {
|
|
1545
|
-
c = b.g.
|
|
1551
|
+
c = b.g.H;
|
|
1546
1552
|
} else {
|
|
1547
1553
|
var d = b.clone();
|
|
1548
|
-
c = this.
|
|
1554
|
+
c = this.cc(c, bc(function() {
|
|
1549
1555
|
d["delete"]();
|
|
1550
1556
|
}));
|
|
1551
|
-
null !== a && a.push(this.
|
|
1557
|
+
null !== a && a.push(this.W, c);
|
|
1552
1558
|
}
|
|
1553
1559
|
break;
|
|
1554
1560
|
default:
|
|
@@ -1559,7 +1565,7 @@ function Oc(a, b) {
|
|
|
1559
1565
|
}
|
|
1560
1566
|
function Pc(a, b) {
|
|
1561
1567
|
if (null === b) {
|
|
1562
|
-
return this.
|
|
1568
|
+
return this.Pa && Q(`null is not a valid ${this.name}`), 0;
|
|
1563
1569
|
}
|
|
1564
1570
|
b.g || Q(`Cannot pass "${Nc(b)}" as a ${this.name}`);
|
|
1565
1571
|
b.g.o || Q(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
@@ -1569,10 +1575,10 @@ function Pc(a, b) {
|
|
|
1569
1575
|
function Qc(a, b, c, d) {
|
|
1570
1576
|
this.name = a;
|
|
1571
1577
|
this.i = b;
|
|
1572
|
-
this.
|
|
1578
|
+
this.Pa = c;
|
|
1573
1579
|
this.xa = d;
|
|
1574
1580
|
this.ya = !1;
|
|
1575
|
-
this.
|
|
1581
|
+
this.W = this.cc = this.Ra = this.ob = this.ic = this.bc = void 0;
|
|
1576
1582
|
void 0 !== b.A ? this.toWireType = Oc : (this.toWireType = d ? Mc : Pc, this.K = null);
|
|
1577
1583
|
}
|
|
1578
1584
|
function Rc(a, b, c) {
|
|
@@ -1661,13 +1667,13 @@ function Zc(a, b, c) {
|
|
|
1661
1667
|
return Lc(a.g.o, a.g.u.i, b.i);
|
|
1662
1668
|
}
|
|
1663
1669
|
function $c(a) {
|
|
1664
|
-
a >= P.h && 0 === --P.get(a).
|
|
1670
|
+
a >= P.h && 0 === --P.get(a).qb && P.Sb(a);
|
|
1665
1671
|
}
|
|
1666
1672
|
function ad(a, b, c) {
|
|
1667
1673
|
switch(b) {
|
|
1668
1674
|
case 0:
|
|
1669
1675
|
return function(d) {
|
|
1670
|
-
return this.fromWireType((c ?
|
|
1676
|
+
return this.fromWireType((c ? D : G)[d]);
|
|
1671
1677
|
};
|
|
1672
1678
|
case 1:
|
|
1673
1679
|
return function(d) {
|
|
@@ -1706,7 +1712,7 @@ function cd(a, b, c) {
|
|
|
1706
1712
|
switch(b) {
|
|
1707
1713
|
case 0:
|
|
1708
1714
|
return c ? function(d) {
|
|
1709
|
-
return
|
|
1715
|
+
return D[d];
|
|
1710
1716
|
} : function(d) {
|
|
1711
1717
|
return G[d];
|
|
1712
1718
|
};
|
|
@@ -1819,64 +1825,71 @@ function sd(a) {
|
|
|
1819
1825
|
function td(a) {
|
|
1820
1826
|
a.Hc = a.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");
|
|
1821
1827
|
}
|
|
1822
|
-
var ud = 1, vd = [], W = [], wd = [], xd = [], yd = [], zd = [], Ad = [],
|
|
1828
|
+
var ud = 1, vd = [], W = [], wd = [], xd = [], yd = [], zd = [], Ad = [], w = [], Bd = {};
|
|
1823
1829
|
function X(a) {
|
|
1824
1830
|
Cd || (Cd = a);
|
|
1825
1831
|
}
|
|
1826
|
-
function
|
|
1832
|
+
function Dd(a) {
|
|
1827
1833
|
for (var b = ud++, c = a.length; c < b; c++) {
|
|
1828
1834
|
a[c] = null;
|
|
1829
1835
|
}
|
|
1830
1836
|
return b;
|
|
1831
1837
|
}
|
|
1832
|
-
function
|
|
1833
|
-
Dd =
|
|
1834
|
-
|
|
1835
|
-
|
|
1838
|
+
function ha(a, b) {
|
|
1839
|
+
var c = Dd(w), d = {handle:c, attributes:b, version:b.Dc, D:a};
|
|
1840
|
+
a.canvas && (a.canvas.zb = d);
|
|
1841
|
+
w[c] = d;
|
|
1842
|
+
("undefined" == typeof b.Jb || b.Jb) && Ed(d);
|
|
1843
|
+
return c;
|
|
1836
1844
|
}
|
|
1837
1845
|
function ia(a) {
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1846
|
+
r = w[a];
|
|
1847
|
+
m.xc = Y = r && r.D;
|
|
1848
|
+
return !(a && !Y);
|
|
1849
|
+
}
|
|
1850
|
+
function Ed(a) {
|
|
1851
|
+
a || (a = r);
|
|
1852
|
+
if (!a.Ub) {
|
|
1853
|
+
a.Ub = !0;
|
|
1854
|
+
var b = a.D;
|
|
1842
1855
|
sd(b);
|
|
1843
1856
|
td(b);
|
|
1844
|
-
2 <= a.version && (b
|
|
1845
|
-
if (2 > a.version || !b
|
|
1846
|
-
b
|
|
1857
|
+
2 <= a.version && (b.$a = b.getExtension("EXT_disjoint_timer_query_webgl2"));
|
|
1858
|
+
if (2 > a.version || !b.$a) {
|
|
1859
|
+
b.$a = b.getExtension("EXT_disjoint_timer_query");
|
|
1847
1860
|
}
|
|
1848
|
-
|
|
1861
|
+
Fd(b);
|
|
1849
1862
|
(b.getSupportedExtensions() || []).forEach(function(c) {
|
|
1850
1863
|
c.includes("lose_context") || c.includes("debug") || b.getExtension(c);
|
|
1851
1864
|
});
|
|
1852
1865
|
}
|
|
1853
1866
|
}
|
|
1854
|
-
var Cd,
|
|
1855
|
-
function
|
|
1867
|
+
var Cd, r;
|
|
1868
|
+
function Fd(a) {
|
|
1856
1869
|
a.Jc = a.getExtension("WEBGL_multi_draw");
|
|
1857
1870
|
}
|
|
1858
|
-
var
|
|
1859
|
-
if (!
|
|
1860
|
-
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", _:
|
|
1861
|
-
for (b in
|
|
1862
|
-
void 0 ===
|
|
1871
|
+
var Gd = {}, Id = () => {
|
|
1872
|
+
if (!Hd) {
|
|
1873
|
+
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", _:ka || "./this.program"}, b;
|
|
1874
|
+
for (b in Gd) {
|
|
1875
|
+
void 0 === Gd[b] ? delete a[b] : a[b] = Gd[b];
|
|
1863
1876
|
}
|
|
1864
1877
|
var c = [];
|
|
1865
1878
|
for (b in a) {
|
|
1866
1879
|
c.push(`${b}=${a[b]}`);
|
|
1867
1880
|
}
|
|
1868
|
-
|
|
1881
|
+
Hd = c;
|
|
1869
1882
|
}
|
|
1870
|
-
return
|
|
1871
|
-
},
|
|
1872
|
-
function
|
|
1883
|
+
return Hd;
|
|
1884
|
+
}, Hd, Jd = [];
|
|
1885
|
+
function Kd(a, b, c, d) {
|
|
1873
1886
|
for (var e = 0; e < a; e++) {
|
|
1874
|
-
var f =
|
|
1887
|
+
var f = Y[c](), g = f && Dd(d);
|
|
1875
1888
|
f ? (f.name = g, d[g] = f) : X(1282);
|
|
1876
1889
|
J[b + 4 * e >> 2] = g;
|
|
1877
1890
|
}
|
|
1878
1891
|
}
|
|
1879
|
-
function
|
|
1892
|
+
function Ld(a, b) {
|
|
1880
1893
|
if (b) {
|
|
1881
1894
|
var c = void 0;
|
|
1882
1895
|
switch(a) {
|
|
@@ -1890,26 +1903,26 @@ function Kd(a, b) {
|
|
|
1890
1903
|
c = 0;
|
|
1891
1904
|
break;
|
|
1892
1905
|
case 34466:
|
|
1893
|
-
var d =
|
|
1906
|
+
var d = Y.getParameter(34467);
|
|
1894
1907
|
c = d ? d.length : 0;
|
|
1895
1908
|
break;
|
|
1896
1909
|
case 33309:
|
|
1897
|
-
if (2 >
|
|
1910
|
+
if (2 > r.version) {
|
|
1898
1911
|
X(1282);
|
|
1899
1912
|
return;
|
|
1900
1913
|
}
|
|
1901
|
-
c = 2 * (
|
|
1914
|
+
c = 2 * (Y.getSupportedExtensions() || []).length;
|
|
1902
1915
|
break;
|
|
1903
1916
|
case 33307:
|
|
1904
1917
|
case 33308:
|
|
1905
|
-
if (2 >
|
|
1918
|
+
if (2 > r.version) {
|
|
1906
1919
|
X(1280);
|
|
1907
1920
|
return;
|
|
1908
1921
|
}
|
|
1909
1922
|
c = 33307 == a ? 3 : 0;
|
|
1910
1923
|
}
|
|
1911
1924
|
if (void 0 === c) {
|
|
1912
|
-
switch(d =
|
|
1925
|
+
switch(d = Y.getParameter(a), typeof d) {
|
|
1913
1926
|
case "number":
|
|
1914
1927
|
c = d;
|
|
1915
1928
|
break;
|
|
@@ -1958,14 +1971,14 @@ function Kd(a, b) {
|
|
|
1958
1971
|
c = d.name | 0;
|
|
1959
1972
|
} catch (e) {
|
|
1960
1973
|
X(1280);
|
|
1961
|
-
|
|
1974
|
+
qa("GL_INVALID_ENUM in glGet0v: Unknown object returned from WebGL getParameter(" + a + ")! (error: " + e + ")");
|
|
1962
1975
|
return;
|
|
1963
1976
|
}
|
|
1964
1977
|
}
|
|
1965
1978
|
break;
|
|
1966
1979
|
default:
|
|
1967
1980
|
X(1280);
|
|
1968
|
-
|
|
1981
|
+
qa("GL_INVALID_ENUM in glGet0v: Native code calling glGet0v(" + a + ") and it returns " + d + " of type " + typeof d + "!");
|
|
1969
1982
|
return;
|
|
1970
1983
|
}
|
|
1971
1984
|
}
|
|
@@ -1974,15 +1987,15 @@ function Kd(a, b) {
|
|
|
1974
1987
|
X(1281);
|
|
1975
1988
|
}
|
|
1976
1989
|
}
|
|
1977
|
-
var
|
|
1978
|
-
var b = db(a) + 1, c =
|
|
1990
|
+
var Nd = a => {
|
|
1991
|
+
var b = db(a) + 1, c = Md(b);
|
|
1979
1992
|
c && eb(a, G, c, b);
|
|
1980
1993
|
return c;
|
|
1981
1994
|
};
|
|
1982
|
-
function
|
|
1995
|
+
function Od(a) {
|
|
1983
1996
|
return "]" == a.slice(-1) && a.lastIndexOf("[");
|
|
1984
1997
|
}
|
|
1985
|
-
var
|
|
1998
|
+
var Pd = a => 0 === a % 4 && (0 !== a % 100 || 0 === a % 400), Qd = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Rd = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Sd = (a, b, c, d) => {
|
|
1986
1999
|
function e(k, q, v) {
|
|
1987
2000
|
for (k = "number" == typeof k ? k.toString() : k || ""; k.length < q;) {
|
|
1988
2001
|
k = v[0] + k;
|
|
@@ -1993,8 +2006,8 @@ var Od = a => 0 === a % 4 && (0 !== a % 100 || 0 === a % 400), Pd = [31, 29, 31,
|
|
|
1993
2006
|
return e(k, q, "0");
|
|
1994
2007
|
}
|
|
1995
2008
|
function g(k, q) {
|
|
1996
|
-
function v(
|
|
1997
|
-
return 0 >
|
|
2009
|
+
function v(C) {
|
|
2010
|
+
return 0 > C ? -1 : 0 < C ? 1 : 0;
|
|
1998
2011
|
}
|
|
1999
2012
|
var y;
|
|
2000
2013
|
0 === (y = v(k.getFullYear() - q.getFullYear())) && 0 === (y = v(k.getMonth() - q.getMonth())) && (y = v(k.getDate() - q.getDate()));
|
|
@@ -2021,7 +2034,7 @@ var Od = a => 0 === a % 4 && (0 !== a % 100 || 0 === a % 400), Pd = [31, 29, 31,
|
|
|
2021
2034
|
function p(k) {
|
|
2022
2035
|
var q = k.ca;
|
|
2023
2036
|
for (k = new Date((new Date(k.da + 1900, 0, 1)).getTime()); 0 < q;) {
|
|
2024
|
-
var v = k.getMonth(), y = (
|
|
2037
|
+
var v = k.getMonth(), y = (Pd(k.getFullYear()) ? Qd : Rd)[v];
|
|
2025
2038
|
if (q > y - k.getDate()) {
|
|
2026
2039
|
q -= y - k.getDate() + 1, k.setDate(1), 11 > v ? k.setMonth(v + 1) : (k.setMonth(0), k.setFullYear(k.getFullYear() + 1));
|
|
2027
2040
|
} else {
|
|
@@ -2035,38 +2048,38 @@ var Od = a => 0 === a % 4 && (0 !== a % 100 || 0 === a % 400), Pd = [31, 29, 31,
|
|
|
2035
2048
|
return 0 >= g(q, k) ? 0 >= g(v, k) ? k.getFullYear() + 1 : k.getFullYear() : k.getFullYear() - 1;
|
|
2036
2049
|
}
|
|
2037
2050
|
var l = J[d + 40 >> 2];
|
|
2038
|
-
d = {
|
|
2051
|
+
d = {lc:J[d >> 2], kc:J[d + 4 >> 2], Ga:J[d + 8 >> 2], Ta:J[d + 12 >> 2], Ha:J[d + 16 >> 2], da:J[d + 20 >> 2], R:J[d + 24 >> 2], ca:J[d + 28 >> 2], Oc:J[d + 32 >> 2], jc:J[d + 36 >> 2], mc:l ? l ? L(G, l) : "" : ""};
|
|
2039
2052
|
c = c ? L(G, c) : "";
|
|
2040
2053
|
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",};
|
|
2041
2054
|
for (var t in l) {
|
|
2042
2055
|
c = c.replace(new RegExp(t, "g"), l[t]);
|
|
2043
2056
|
}
|
|
2044
2057
|
var u = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), x = "January February March April May June July August September October November December".split(" ");
|
|
2045
|
-
l = {"%a":k => u[k.R].substring(0, 3), "%A":k => u[k.R], "%b":k => x[k.Ha].substring(0, 3), "%B":k => x[k.Ha], "%C":k => f((k.da + 1900) / 100 | 0, 2), "%d":k => f(k.
|
|
2058
|
+
l = {"%a":k => u[k.R].substring(0, 3), "%A":k => u[k.R], "%b":k => x[k.Ha].substring(0, 3), "%B":k => x[k.Ha], "%C":k => f((k.da + 1900) / 100 | 0, 2), "%d":k => f(k.Ta, 2), "%e":k => e(k.Ta, 2, " "), "%g":k => p(k).toString().substring(2), "%G":k => p(k), "%H":k => f(k.Ga, 2), "%I":k => {
|
|
2046
2059
|
k = k.Ga;
|
|
2047
2060
|
0 == k ? k = 12 : 12 < k && (k -= 12);
|
|
2048
2061
|
return f(k, 2);
|
|
2049
2062
|
}, "%j":k => {
|
|
2050
|
-
for (var q = 0, v = 0; v <= k.Ha - 1; q += (
|
|
2063
|
+
for (var q = 0, v = 0; v <= k.Ha - 1; q += (Pd(k.da + 1900) ? Qd : Rd)[v++]) {
|
|
2051
2064
|
}
|
|
2052
|
-
return f(k.
|
|
2053
|
-
}, "%m":k => f(k.Ha + 1, 2), "%M":k => f(k.
|
|
2065
|
+
return f(k.Ta + q, 3);
|
|
2066
|
+
}, "%m":k => f(k.Ha + 1, 2), "%M":k => f(k.kc, 2), "%n":() => "\n", "%p":k => 0 <= k.Ga && 12 > k.Ga ? "AM" : "PM", "%S":k => f(k.lc, 2), "%t":() => "\t", "%u":k => k.R || 7, "%U":k => f(Math.floor((k.ca + 7 - k.R) / 7), 2), "%V":k => {
|
|
2054
2067
|
var q = Math.floor((k.ca + 7 - (k.R + 6) % 7) / 7);
|
|
2055
2068
|
2 >= (k.R + 371 - k.ca - 2) % 7 && q++;
|
|
2056
2069
|
if (q) {
|
|
2057
|
-
53 == q && (v = (k.R + 371 - k.ca) % 7, 4 == v || 3 == v &&
|
|
2070
|
+
53 == q && (v = (k.R + 371 - k.ca) % 7, 4 == v || 3 == v && Pd(k.da) || (q = 1));
|
|
2058
2071
|
} else {
|
|
2059
2072
|
q = 52;
|
|
2060
2073
|
var v = (k.R + 7 - k.ca - 1) % 7;
|
|
2061
|
-
(4 == v || 5 == v &&
|
|
2074
|
+
(4 == v || 5 == v && Pd(k.da % 400 - 1)) && q++;
|
|
2062
2075
|
}
|
|
2063
2076
|
return f(q, 2);
|
|
2064
2077
|
}, "%w":k => k.R, "%W":k => f(Math.floor((k.ca + 7 - (k.R + 6) % 7) / 7), 2), "%y":k => (k.da + 1900).toString().substring(2), "%Y":k => k.da + 1900, "%z":k => {
|
|
2065
|
-
k = k.
|
|
2078
|
+
k = k.jc;
|
|
2066
2079
|
var q = 0 <= k;
|
|
2067
2080
|
k = Math.abs(k) / 60;
|
|
2068
2081
|
return (q ? "+" : "-") + String("0000" + (k / 60 * 100 + k % 60)).slice(-4);
|
|
2069
|
-
}, "%Z":k => k.
|
|
2082
|
+
}, "%Z":k => k.mc, "%%":() => "%"};
|
|
2070
2083
|
c = c.replace(/%%/g, "\x00\x00");
|
|
2071
2084
|
for (t in l) {
|
|
2072
2085
|
c.includes(t) && (c = c.replace(new RegExp(t, "g"), l[t](d)));
|
|
@@ -2076,13 +2089,13 @@ var Od = a => 0 === a % 4 && (0 !== a % 100 || 0 === a % 400), Pd = [31, 29, 31,
|
|
|
2076
2089
|
if (t.length > b) {
|
|
2077
2090
|
return 0;
|
|
2078
2091
|
}
|
|
2079
|
-
|
|
2092
|
+
D.set(t, a);
|
|
2080
2093
|
return t.length - 1;
|
|
2081
2094
|
};
|
|
2082
2095
|
function Eb(a, b, c, d) {
|
|
2083
2096
|
a || (a = this);
|
|
2084
2097
|
this.parent = a;
|
|
2085
|
-
this.
|
|
2098
|
+
this.U = a.U;
|
|
2086
2099
|
this.Aa = null;
|
|
2087
2100
|
this.id = wb++;
|
|
2088
2101
|
this.name = b;
|
|
@@ -2127,11 +2140,11 @@ O("/home/web_user", 16895, 0);
|
|
|
2127
2140
|
O("/proc", 16895, 0);
|
|
2128
2141
|
var a = O("/proc/self", 16895, 0);
|
|
2129
2142
|
O("/proc/self/fd", 16895, 0);
|
|
2130
|
-
Lb({
|
|
2143
|
+
Lb({U:() => {
|
|
2131
2144
|
var b = ob(a, "fd", 16895, 73);
|
|
2132
2145
|
b.l = {ma:(c, d) => {
|
|
2133
2146
|
var e = Ib(+d);
|
|
2134
|
-
c = {parent:null,
|
|
2147
|
+
c = {parent:null, U:{ib:"fake"}, l:{na:() => e.path},};
|
|
2135
2148
|
return c.parent = c;
|
|
2136
2149
|
}};
|
|
2137
2150
|
return b;
|
|
@@ -2142,12 +2155,12 @@ Object.assign($b.prototype, {get(a) {
|
|
|
2142
2155
|
}, has(a) {
|
|
2143
2156
|
return void 0 !== this.M[a];
|
|
2144
2157
|
}, ta(a) {
|
|
2145
|
-
var b = this.
|
|
2158
|
+
var b = this.eb.pop() || this.M.length;
|
|
2146
2159
|
this.M[b] = a;
|
|
2147
2160
|
return b;
|
|
2148
|
-
},
|
|
2161
|
+
}, Sb(a) {
|
|
2149
2162
|
this.M[a] = void 0;
|
|
2150
|
-
this.
|
|
2163
|
+
this.eb.push(a);
|
|
2151
2164
|
}});
|
|
2152
2165
|
ac = m.BindingError = class extends Error {
|
|
2153
2166
|
constructor(a) {
|
|
@@ -2164,10 +2177,10 @@ m.count_emval_handles = function() {
|
|
|
2164
2177
|
return a;
|
|
2165
2178
|
};
|
|
2166
2179
|
dc = m.PureVirtualError = cc("PureVirtualError");
|
|
2167
|
-
for (var
|
|
2168
|
-
|
|
2180
|
+
for (var Td = Array(256), Ud = 0; 256 > Ud; ++Ud) {
|
|
2181
|
+
Td[Ud] = String.fromCharCode(Ud);
|
|
2169
2182
|
}
|
|
2170
|
-
ec =
|
|
2183
|
+
ec = Td;
|
|
2171
2184
|
m.getInheritedInstanceCount = function() {
|
|
2172
2185
|
return Object.keys(ic).length;
|
|
2173
2186
|
};
|
|
@@ -2208,7 +2221,7 @@ Hc.prototype.clone = function() {
|
|
|
2208
2221
|
return this.g.count.value += 1, this;
|
|
2209
2222
|
}
|
|
2210
2223
|
var a = yc, b = Object, c = b.create, d = Object.getPrototypeOf(this), e = this.g;
|
|
2211
|
-
a = a(c.call(b, d, {g:{value:{count:e.count, ha:e.ha, ka:e.ka, o:e.o, u:e.u,
|
|
2224
|
+
a = a(c.call(b, d, {g:{value:{count:e.count, ha:e.ha, ka:e.ka, o:e.o, u:e.u, H:e.H, L:e.L,},}}));
|
|
2212
2225
|
a.g.count.value += 1;
|
|
2213
2226
|
a.g.ha = !1;
|
|
2214
2227
|
return a;
|
|
@@ -2218,7 +2231,7 @@ Hc.prototype["delete"] = function() {
|
|
|
2218
2231
|
this.g.ha && !this.g.ka && Q("Object already scheduled for deletion");
|
|
2219
2232
|
pc(this);
|
|
2220
2233
|
rc(this.g);
|
|
2221
|
-
this.g.ka || (this.g.
|
|
2234
|
+
this.g.ka || (this.g.H = void 0, this.g.o = void 0);
|
|
2222
2235
|
};
|
|
2223
2236
|
Hc.prototype.isDeleted = function() {
|
|
2224
2237
|
return !this.g.o;
|
|
@@ -2231,12 +2244,12 @@ Hc.prototype.deleteLater = function() {
|
|
|
2231
2244
|
this.g.ha = !0;
|
|
2232
2245
|
return this;
|
|
2233
2246
|
};
|
|
2234
|
-
Qc.prototype.
|
|
2235
|
-
this.
|
|
2247
|
+
Qc.prototype.Ob = function(a) {
|
|
2248
|
+
this.ob && (a = this.ob(a));
|
|
2236
2249
|
return a;
|
|
2237
2250
|
};
|
|
2238
|
-
Qc.prototype.
|
|
2239
|
-
this.
|
|
2251
|
+
Qc.prototype.Za = function(a) {
|
|
2252
|
+
this.W && this.W(a);
|
|
2240
2253
|
};
|
|
2241
2254
|
Qc.prototype.argPackAdvance = 8;
|
|
2242
2255
|
Qc.prototype.readValueFromPointer = Bc;
|
|
@@ -2247,35 +2260,35 @@ Qc.prototype.deleteObject = function(a) {
|
|
|
2247
2260
|
};
|
|
2248
2261
|
Qc.prototype.fromWireType = function(a) {
|
|
2249
2262
|
function b() {
|
|
2250
|
-
return this.ya ? xc(this.i.N, {u:this.
|
|
2263
|
+
return this.ya ? xc(this.i.N, {u:this.bc, o:c, L:this, H:a,}) : xc(this.i.N, {u:this, o:a,});
|
|
2251
2264
|
}
|
|
2252
|
-
var c = this.
|
|
2265
|
+
var c = this.Ob(a);
|
|
2253
2266
|
if (!c) {
|
|
2254
|
-
return this.
|
|
2267
|
+
return this.Za(a), null;
|
|
2255
2268
|
}
|
|
2256
2269
|
var d = uc(this.i, c);
|
|
2257
2270
|
if (void 0 !== d) {
|
|
2258
2271
|
if (0 === d.g.count.value) {
|
|
2259
|
-
return d.g.o = c, d.g.
|
|
2272
|
+
return d.g.o = c, d.g.H = a, d.clone();
|
|
2260
2273
|
}
|
|
2261
2274
|
d = d.clone();
|
|
2262
|
-
this.
|
|
2275
|
+
this.Za(a);
|
|
2263
2276
|
return d;
|
|
2264
2277
|
}
|
|
2265
|
-
d = this.i.
|
|
2278
|
+
d = this.i.Nb(c);
|
|
2266
2279
|
d = tc[d];
|
|
2267
2280
|
if (!d) {
|
|
2268
2281
|
return b.call(this);
|
|
2269
2282
|
}
|
|
2270
|
-
d = this.xa ? d.
|
|
2283
|
+
d = this.xa ? d.Fb : d.pointerType;
|
|
2271
2284
|
var e = sc(c, this.i, d.i);
|
|
2272
|
-
return null === e ? b.call(this) : this.ya ? xc(d.i.N, {u:d, o:e, L:this,
|
|
2285
|
+
return null === e ? b.call(this) : this.ya ? xc(d.i.N, {u:d, o:e, L:this, H:a,}) : xc(d.i.N, {u:d, o:e,});
|
|
2273
2286
|
};
|
|
2274
2287
|
Vc = m.UnboundTypeError = cc("UnboundTypeError");
|
|
2275
|
-
for (var
|
|
2276
|
-
|
|
2288
|
+
for (var Y, Vd = 0; 32 > Vd; ++Vd) {
|
|
2289
|
+
Jd.push(Array(Vd));
|
|
2277
2290
|
}
|
|
2278
|
-
var
|
|
2291
|
+
var Xd = {__syscall_fcntl64:function(a, b, c) {
|
|
2279
2292
|
Wb = c;
|
|
2280
2293
|
try {
|
|
2281
2294
|
var d = Ib(a);
|
|
@@ -2299,7 +2312,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2299
2312
|
case 8:
|
|
2300
2313
|
return -28;
|
|
2301
2314
|
case 9:
|
|
2302
|
-
return J[
|
|
2315
|
+
return J[Wd() >> 2] = 28, -1;
|
|
2303
2316
|
default:
|
|
2304
2317
|
return -28;
|
|
2305
2318
|
}
|
|
@@ -2320,7 +2333,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2320
2333
|
if (!d.s) {
|
|
2321
2334
|
return -59;
|
|
2322
2335
|
}
|
|
2323
|
-
if (d.s.
|
|
2336
|
+
if (d.s.V.Wb) {
|
|
2324
2337
|
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,];
|
|
2325
2338
|
var e = Xb();
|
|
2326
2339
|
J[e >> 2] = 25856;
|
|
@@ -2328,7 +2341,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2328
2341
|
J[e + 8 >> 2] = 191;
|
|
2329
2342
|
J[e + 12 >> 2] = 35387;
|
|
2330
2343
|
for (var f = 0; 32 > f; f++) {
|
|
2331
|
-
|
|
2344
|
+
D[e + f + 17 >> 0] = b[f] || 0;
|
|
2332
2345
|
}
|
|
2333
2346
|
}
|
|
2334
2347
|
return 0;
|
|
@@ -2342,9 +2355,9 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2342
2355
|
if (!d.s) {
|
|
2343
2356
|
return -59;
|
|
2344
2357
|
}
|
|
2345
|
-
if (d.s.
|
|
2358
|
+
if (d.s.V.Xb) {
|
|
2346
2359
|
for (e = Xb(), b = [], f = 0; 32 > f; f++) {
|
|
2347
|
-
b.push(
|
|
2360
|
+
b.push(D[e + f + 17 >> 0]);
|
|
2348
2361
|
}
|
|
2349
2362
|
}
|
|
2350
2363
|
return 0;
|
|
@@ -2358,15 +2371,15 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2358
2371
|
return d.s ? -28 : -59;
|
|
2359
2372
|
case 21531:
|
|
2360
2373
|
e = Xb();
|
|
2361
|
-
if (!d.m.
|
|
2374
|
+
if (!d.m.Vb) {
|
|
2362
2375
|
throw new M(59);
|
|
2363
2376
|
}
|
|
2364
|
-
return d.m.
|
|
2377
|
+
return d.m.Vb(d, b, e);
|
|
2365
2378
|
case 21523:
|
|
2366
2379
|
if (!d.s) {
|
|
2367
2380
|
return -59;
|
|
2368
2381
|
}
|
|
2369
|
-
d.s.
|
|
2382
|
+
d.s.V.Yb && (f = [24, 80], e = Xb(), I[e >> 1] = f[0], I[e + 2 >> 1] = f[1]);
|
|
2370
2383
|
return 0;
|
|
2371
2384
|
case 21524:
|
|
2372
2385
|
return d.s ? 0 : -59;
|
|
@@ -2409,7 +2422,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2409
2422
|
c = R(c);
|
|
2410
2423
|
var d = [].slice, e = b.i, f = e.N, g = e.A.N, n = e.A.constructor;
|
|
2411
2424
|
a = Zb(a, function() {
|
|
2412
|
-
e.A.
|
|
2425
|
+
e.A.mb.forEach(function(l) {
|
|
2413
2426
|
if (this[l] === g[l]) {
|
|
2414
2427
|
throw new dc(`Pure virtual function ${l} must be implemented in JavaScript`);
|
|
2415
2428
|
}
|
|
@@ -2445,15 +2458,15 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2445
2458
|
}, _embind_finalize_value_object:function(a) {
|
|
2446
2459
|
var b = zc[a];
|
|
2447
2460
|
delete zc[a];
|
|
2448
|
-
var c = b.
|
|
2461
|
+
var c = b.Ra, d = b.W, e = b.ab, f = e.map(g => g.Rb).concat(e.map(g => g.fc));
|
|
2449
2462
|
T([a], f, g => {
|
|
2450
2463
|
var n = {};
|
|
2451
2464
|
e.forEach((p, l) => {
|
|
2452
|
-
var t = g[l], u = p.
|
|
2453
|
-
n[p.
|
|
2454
|
-
var
|
|
2455
|
-
q(v, y, k.toWireType(
|
|
2456
|
-
Ac(
|
|
2465
|
+
var t = g[l], u = p.Pb, x = p.Qb, k = g[l + e.length], q = p.ec, v = p.hc;
|
|
2466
|
+
n[p.Lb] = {read:y => t.fromWireType(u(x, y)), write:(y, C) => {
|
|
2467
|
+
var z = [];
|
|
2468
|
+
q(v, y, k.toWireType(z, C));
|
|
2469
|
+
Ac(z);
|
|
2457
2470
|
}};
|
|
2458
2471
|
});
|
|
2459
2472
|
return [{name:b.name, fromWireType:function(p) {
|
|
@@ -2487,7 +2500,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2487
2500
|
return n ? d : e;
|
|
2488
2501
|
}, argPackAdvance:8, readValueFromPointer:function(g) {
|
|
2489
2502
|
if (1 === c) {
|
|
2490
|
-
var n =
|
|
2503
|
+
var n = D;
|
|
2491
2504
|
} else if (2 === c) {
|
|
2492
2505
|
n = I;
|
|
2493
2506
|
} else if (4 === c) {
|
|
@@ -2516,26 +2529,26 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2516
2529
|
y = Hc.prototype;
|
|
2517
2530
|
}
|
|
2518
2531
|
q = Zb(k, function() {
|
|
2519
|
-
if (Object.getPrototypeOf(this) !==
|
|
2532
|
+
if (Object.getPrototypeOf(this) !== C) {
|
|
2520
2533
|
throw new ac("Use 'new' to construct " + t);
|
|
2521
2534
|
}
|
|
2522
|
-
if (void 0 ===
|
|
2535
|
+
if (void 0 === z.$) {
|
|
2523
2536
|
throw new ac(t + " has no accessible constructor");
|
|
2524
2537
|
}
|
|
2525
|
-
var H =
|
|
2538
|
+
var H = z.$[arguments.length];
|
|
2526
2539
|
if (void 0 === H) {
|
|
2527
|
-
throw new ac(`Tried to invoke ctor of ${t} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(
|
|
2540
|
+
throw new ac(`Tried to invoke ctor of ${t} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(z.$).toString()}) parameters instead!`);
|
|
2528
2541
|
}
|
|
2529
2542
|
return H.apply(this, arguments);
|
|
2530
2543
|
});
|
|
2531
|
-
var
|
|
2532
|
-
q.prototype =
|
|
2533
|
-
var
|
|
2534
|
-
|
|
2535
|
-
v = new Qc(t,
|
|
2536
|
-
y = new Qc(t + "*",
|
|
2537
|
-
var E = new Qc(t + " const*",
|
|
2538
|
-
tc[a] = {pointerType:y,
|
|
2544
|
+
var C = Object.create(y, {constructor:{value:q},});
|
|
2545
|
+
q.prototype = C;
|
|
2546
|
+
var z = new Kc(t, q, C, x, v, f, n, l);
|
|
2547
|
+
z.A && (void 0 === z.A.qa && (z.A.qa = []), z.A.qa.push(z));
|
|
2548
|
+
v = new Qc(t, z, !0, !1);
|
|
2549
|
+
y = new Qc(t + "*", z, !1, !1);
|
|
2550
|
+
var E = new Qc(t + " const*", z, !1, !0);
|
|
2551
|
+
tc[a] = {pointerType:y, Fb:E};
|
|
2539
2552
|
Rc(k, q);
|
|
2540
2553
|
return [v, y, E];
|
|
2541
2554
|
});
|
|
@@ -2624,7 +2637,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2624
2637
|
l = l[0];
|
|
2625
2638
|
var u = `${l.name}.${b}`;
|
|
2626
2639
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2627
|
-
n && l.i.
|
|
2640
|
+
n && l.i.mb.push(b);
|
|
2628
2641
|
var x = l.i.N, k = x[b];
|
|
2629
2642
|
void 0 === k || void 0 === k.B && k.className !== l.name && k.ga === c - 2 ? (t.ga = c - 2, t.className = l.name, x[b] = t) : (Ic(x, b, u), x[b].B[c - 2] = t);
|
|
2630
2643
|
T([], p, function(q) {
|
|
@@ -2650,15 +2663,15 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2650
2663
|
Object.defineProperty(t.i.N, b, x);
|
|
2651
2664
|
T([], p ? [c, g] : [c], function(k) {
|
|
2652
2665
|
var q = k[0], v = {get() {
|
|
2653
|
-
var
|
|
2654
|
-
return q.fromWireType(e(f,
|
|
2666
|
+
var C = Zc(this, t, u + " getter");
|
|
2667
|
+
return q.fromWireType(e(f, C));
|
|
2655
2668
|
}, enumerable:!0};
|
|
2656
2669
|
if (p) {
|
|
2657
2670
|
p = V(n, p);
|
|
2658
2671
|
var y = k[1];
|
|
2659
|
-
v.set = function(
|
|
2660
|
-
var
|
|
2661
|
-
p(l,
|
|
2672
|
+
v.set = function(C) {
|
|
2673
|
+
var z = Zc(this, t, u + " setter"), E = [];
|
|
2674
|
+
p(l, z, y.toWireType(E, C));
|
|
2662
2675
|
Ac(E);
|
|
2663
2676
|
};
|
|
2664
2677
|
}
|
|
@@ -2738,7 +2751,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2738
2751
|
}
|
|
2739
2752
|
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][b];
|
|
2740
2753
|
c = S(c);
|
|
2741
|
-
U(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {
|
|
2754
|
+
U(a, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Tb:!0,});
|
|
2742
2755
|
}, _embind_register_std_string:function(a, b) {
|
|
2743
2756
|
b = S(b);
|
|
2744
2757
|
var c = "std::string" === b;
|
|
@@ -2771,7 +2784,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2771
2784
|
var f = "string" == typeof e;
|
|
2772
2785
|
f || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array || Q("Cannot pass non-string to std::string");
|
|
2773
2786
|
var g = c && f ? db(e) : e.length;
|
|
2774
|
-
var n =
|
|
2787
|
+
var n = Md(4 + g + 1), p = n + 4;
|
|
2775
2788
|
K[n >> 2] = g;
|
|
2776
2789
|
if (c && f) {
|
|
2777
2790
|
eb(e, G, p, g + 1);
|
|
@@ -2815,7 +2828,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2815
2828
|
return u;
|
|
2816
2829
|
}, toWireType:function(p, l) {
|
|
2817
2830
|
"string" != typeof l && Q(`Cannot pass non-string to C++ string type ${c}`);
|
|
2818
|
-
var t = f(l), u =
|
|
2831
|
+
var t = f(l), u = Md(4 + t + b);
|
|
2819
2832
|
K[u >> 2] = t >> n;
|
|
2820
2833
|
e(l, u + 4, t + b);
|
|
2821
2834
|
null !== p && p.push(nc, u);
|
|
@@ -2824,12 +2837,12 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2824
2837
|
nc(p);
|
|
2825
2838
|
},});
|
|
2826
2839
|
}, _embind_register_value_object:function(a, b, c, d, e, f) {
|
|
2827
|
-
zc[a] = {name:S(b),
|
|
2840
|
+
zc[a] = {name:S(b), Ra:V(c, d), W:V(e, f), ab:[],};
|
|
2828
2841
|
}, _embind_register_value_object_field:function(a, b, c, d, e, f, g, n, p, l) {
|
|
2829
|
-
zc[a]
|
|
2842
|
+
zc[a].ab.push({Lb:S(b), Rb:c, Pb:V(d, e), Qb:f, fc:g, ec:V(n, p), hc:l,});
|
|
2830
2843
|
}, _embind_register_void:function(a, b) {
|
|
2831
2844
|
b = S(b);
|
|
2832
|
-
U(a, {
|
|
2845
|
+
U(a, {Zb:!0, name:b, argPackAdvance:0, fromWireType:function() {
|
|
2833
2846
|
}, toWireType:function() {
|
|
2834
2847
|
},});
|
|
2835
2848
|
}, _emscripten_get_now_is_monotonic:() => !0, _emval_as:function(a, b, c) {
|
|
@@ -2866,9 +2879,9 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2866
2879
|
}
|
|
2867
2880
|
g = g[n].apply(g, f);
|
|
2868
2881
|
for (u = 0; u < a - 1; ++u) {
|
|
2869
|
-
c[u + 1].
|
|
2882
|
+
c[u + 1].Hb && c[u + 1].Hb(f[u]);
|
|
2870
2883
|
}
|
|
2871
|
-
if (!d.
|
|
2884
|
+
if (!d.Zb) {
|
|
2872
2885
|
return d.toWireType(p, g);
|
|
2873
2886
|
}
|
|
2874
2887
|
});
|
|
@@ -2878,7 +2891,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2878
2891
|
b = R(b);
|
|
2879
2892
|
return bc(a[b]);
|
|
2880
2893
|
}, _emval_incref:function(a) {
|
|
2881
|
-
4 < a && (P.get(a).
|
|
2894
|
+
4 < a && (P.get(a).qb += 1);
|
|
2882
2895
|
}, _emval_new_cstring:function(a) {
|
|
2883
2896
|
return bc(md(a));
|
|
2884
2897
|
}, _emval_new_object:function() {
|
|
@@ -2899,7 +2912,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2899
2912
|
}, abort:() => {
|
|
2900
2913
|
sa("");
|
|
2901
2914
|
}, beginPixelLocalStorageWEBGL:function(a, b, c) {
|
|
2902
|
-
(a =
|
|
2915
|
+
(a = w[a].D.ja) && a.beginPixelLocalStorageWEBGL(m.HEAPU32.subarray(c, c + b));
|
|
2903
2916
|
}, decode_image:function(a, b, c) {
|
|
2904
2917
|
var d = m.images;
|
|
2905
2918
|
d || (d = new Map(), m.images = d);
|
|
@@ -2952,41 +2965,41 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2952
2965
|
}
|
|
2953
2966
|
return !1;
|
|
2954
2967
|
}, emscripten_webgl_enable_extension:function(a, b) {
|
|
2955
|
-
a =
|
|
2968
|
+
a = w[a];
|
|
2956
2969
|
b = b ? L(G, b) : "";
|
|
2957
2970
|
b.startsWith("GL_") && (b = b.substr(3));
|
|
2958
|
-
"WEBGL_draw_instanced_base_vertex_base_instance" == b && sd(
|
|
2959
|
-
"WEBGL_multi_draw_instanced_base_vertex_base_instance" == b && td(
|
|
2960
|
-
"WEBGL_multi_draw" == b &&
|
|
2961
|
-
return !!a.
|
|
2971
|
+
"WEBGL_draw_instanced_base_vertex_base_instance" == b && sd(Y);
|
|
2972
|
+
"WEBGL_multi_draw_instanced_base_vertex_base_instance" == b && td(Y);
|
|
2973
|
+
"WEBGL_multi_draw" == b && Fd(Y);
|
|
2974
|
+
return !!a.D.getExtension(b);
|
|
2962
2975
|
}, emscripten_webgl_get_current_context:function() {
|
|
2963
|
-
return
|
|
2976
|
+
return r ? r.handle : 0;
|
|
2964
2977
|
}, emscripten_webgl_make_context_current:function(a) {
|
|
2965
|
-
return
|
|
2978
|
+
return ia(a) ? 0 : -5;
|
|
2966
2979
|
}, enable_WEBGL_provoking_vertex:function(a) {
|
|
2967
|
-
a =
|
|
2968
|
-
a.
|
|
2969
|
-
return !!a.
|
|
2980
|
+
a = w[a].D;
|
|
2981
|
+
a.nb = a.getExtension("WEBGL_provoking_vertex");
|
|
2982
|
+
return !!a.nb;
|
|
2970
2983
|
}, enable_WEBGL_shader_pixel_local_storage_coherent:function(a) {
|
|
2971
|
-
a =
|
|
2984
|
+
a = w[a].D;
|
|
2972
2985
|
a.ja = a.getExtension("WEBGL_shader_pixel_local_storage");
|
|
2973
2986
|
return !(!a.ja || !a.ja.isCoherent());
|
|
2974
2987
|
}, endPixelLocalStorageWEBGL:function(a, b, c) {
|
|
2975
|
-
(a =
|
|
2988
|
+
(a = w[a].D.ja) && a.endPixelLocalStorageWEBGL(m.HEAPU32.subarray(c, c + b));
|
|
2976
2989
|
}, environ_get:(a, b) => {
|
|
2977
2990
|
var c = 0;
|
|
2978
|
-
|
|
2991
|
+
Id().forEach(function(d, e) {
|
|
2979
2992
|
var f = b + c;
|
|
2980
2993
|
e = K[a + 4 * e >> 2] = f;
|
|
2981
2994
|
for (f = 0; f < d.length; ++f) {
|
|
2982
|
-
|
|
2995
|
+
D[e++ >> 0] = d.charCodeAt(f);
|
|
2983
2996
|
}
|
|
2984
|
-
|
|
2997
|
+
D[e >> 0] = 0;
|
|
2985
2998
|
c += d.length + 1;
|
|
2986
2999
|
});
|
|
2987
3000
|
return 0;
|
|
2988
3001
|
}, environ_sizes_get:(a, b) => {
|
|
2989
|
-
var c =
|
|
3002
|
+
var c = Id();
|
|
2990
3003
|
K[a >> 2] = c.length;
|
|
2991
3004
|
var d = 0;
|
|
2992
3005
|
c.forEach(function(e) {
|
|
@@ -3000,7 +3013,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3000
3013
|
if (null === b.X) {
|
|
3001
3014
|
throw new M(8);
|
|
3002
3015
|
}
|
|
3003
|
-
b.
|
|
3016
|
+
b.Oa && (b.Oa = null);
|
|
3004
3017
|
try {
|
|
3005
3018
|
b.m.close && b.m.close(b);
|
|
3006
3019
|
} catch (c) {
|
|
@@ -3024,7 +3037,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3024
3037
|
for (var f, g = b = 0; g < c; g++) {
|
|
3025
3038
|
var n = K[a >> 2], p = K[a + 4 >> 2];
|
|
3026
3039
|
a += 8;
|
|
3027
|
-
var l = e, t = n, u = p, x = f, k =
|
|
3040
|
+
var l = e, t = n, u = p, x = f, k = D;
|
|
3028
3041
|
if (0 > u || 0 > x) {
|
|
3029
3042
|
throw new M(28);
|
|
3030
3043
|
}
|
|
@@ -3050,7 +3063,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3050
3063
|
q || (l.position += v);
|
|
3051
3064
|
var y = v;
|
|
3052
3065
|
if (0 > y) {
|
|
3053
|
-
var
|
|
3066
|
+
var C = -1;
|
|
3054
3067
|
break a;
|
|
3055
3068
|
}
|
|
3056
3069
|
b += y;
|
|
@@ -3059,15 +3072,15 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3059
3072
|
}
|
|
3060
3073
|
"undefined" !== typeof f && (f += y);
|
|
3061
3074
|
}
|
|
3062
|
-
|
|
3075
|
+
C = b;
|
|
3063
3076
|
}
|
|
3064
|
-
K[d >> 2] =
|
|
3077
|
+
K[d >> 2] = C;
|
|
3065
3078
|
return 0;
|
|
3066
|
-
} catch (
|
|
3067
|
-
if ("undefined" == typeof Vb || "ErrnoError" !==
|
|
3068
|
-
throw
|
|
3079
|
+
} catch (z) {
|
|
3080
|
+
if ("undefined" == typeof Vb || "ErrnoError" !== z.name) {
|
|
3081
|
+
throw z;
|
|
3069
3082
|
}
|
|
3070
|
-
return
|
|
3083
|
+
return z.aa;
|
|
3071
3084
|
}
|
|
3072
3085
|
}, fd_seek:function(a, b, c, d, e) {
|
|
3073
3086
|
b = c + 2097152 >>> 0 < 4194305 - !!b ? (b >>> 0) + 4294967296 * c : NaN;
|
|
@@ -3080,7 +3093,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3080
3093
|
Pa = [f.position >>> 0, (Oa = f.position, 1.0 <= +Math.abs(Oa) ? 0.0 < Oa ? +Math.floor(Oa / 4294967296.0) >>> 0 : ~~+Math.ceil((Oa - +(~~Oa >>> 0)) / 4294967296.0) >>> 0 : 0)];
|
|
3081
3094
|
J[e >> 2] = Pa[0];
|
|
3082
3095
|
J[e + 4 >> 2] = Pa[1];
|
|
3083
|
-
f.
|
|
3096
|
+
f.Oa && 0 === b && 0 === d && (f.Oa = null);
|
|
3084
3097
|
return 0;
|
|
3085
3098
|
} catch (g) {
|
|
3086
3099
|
if ("undefined" == typeof Vb || "ErrnoError" !== g.name) {
|
|
@@ -3096,7 +3109,7 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3096
3109
|
for (var f, g = b = 0; g < c; g++) {
|
|
3097
3110
|
var n = K[a >> 2], p = K[a + 4 >> 2];
|
|
3098
3111
|
a += 8;
|
|
3099
|
-
var l = e, t = n, u = p, x = f, k =
|
|
3112
|
+
var l = e, t = n, u = p, x = f, k = D;
|
|
3100
3113
|
if (0 > u || 0 > x) {
|
|
3101
3114
|
throw new M(28);
|
|
3102
3115
|
}
|
|
@@ -3123,187 +3136,187 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3123
3136
|
q || (l.position += v);
|
|
3124
3137
|
var y = v;
|
|
3125
3138
|
if (0 > y) {
|
|
3126
|
-
var
|
|
3139
|
+
var C = -1;
|
|
3127
3140
|
break a;
|
|
3128
3141
|
}
|
|
3129
3142
|
b += y;
|
|
3130
3143
|
"undefined" !== typeof f && (f += y);
|
|
3131
3144
|
}
|
|
3132
|
-
|
|
3145
|
+
C = b;
|
|
3133
3146
|
}
|
|
3134
|
-
K[d >> 2] =
|
|
3147
|
+
K[d >> 2] = C;
|
|
3135
3148
|
return 0;
|
|
3136
|
-
} catch (
|
|
3137
|
-
if ("undefined" == typeof Vb || "ErrnoError" !==
|
|
3138
|
-
throw
|
|
3149
|
+
} catch (z) {
|
|
3150
|
+
if ("undefined" == typeof Vb || "ErrnoError" !== z.name) {
|
|
3151
|
+
throw z;
|
|
3139
3152
|
}
|
|
3140
|
-
return
|
|
3153
|
+
return z.aa;
|
|
3141
3154
|
}
|
|
3142
3155
|
}, framebufferPixelLocalClearValuefvWEBGL:function(a, b, c, d, e, f) {
|
|
3143
|
-
(a =
|
|
3156
|
+
(a = w[a].D.ja) && a.framebufferPixelLocalClearValuefvWEBGL(b, [c, d, e, f]);
|
|
3144
3157
|
}, framebufferTexturePixelLocalStorageWEBGL:function(a, b, c, d, e) {
|
|
3145
|
-
(a =
|
|
3158
|
+
(a = w[a].D.ja) && a.framebufferTexturePixelLocalStorageWEBGL(b, yd[c], d, e);
|
|
3146
3159
|
}, glActiveTexture:function(a) {
|
|
3147
|
-
|
|
3160
|
+
Y.activeTexture(a);
|
|
3148
3161
|
}, glAttachShader:function(a, b) {
|
|
3149
|
-
|
|
3162
|
+
Y.attachShader(W[a], zd[b]);
|
|
3150
3163
|
}, glBindBuffer:function(a, b) {
|
|
3151
|
-
35051 == a ?
|
|
3152
|
-
|
|
3164
|
+
35051 == a ? Y.Ya = b : 35052 == a && (Y.Ma = b);
|
|
3165
|
+
Y.bindBuffer(a, vd[b]);
|
|
3153
3166
|
}, glBindBufferRange:function(a, b, c, d, e) {
|
|
3154
|
-
|
|
3167
|
+
Y.bindBufferRange(a, b, vd[c], d, e);
|
|
3155
3168
|
}, glBindFramebuffer:function(a, b) {
|
|
3156
|
-
|
|
3169
|
+
Y.bindFramebuffer(a, wd[b]);
|
|
3157
3170
|
}, glBindRenderbuffer:function(a, b) {
|
|
3158
|
-
|
|
3171
|
+
Y.bindRenderbuffer(a, xd[b]);
|
|
3159
3172
|
}, glBindTexture:function(a, b) {
|
|
3160
|
-
|
|
3173
|
+
Y.bindTexture(a, yd[b]);
|
|
3161
3174
|
}, glBindVertexArray:function(a) {
|
|
3162
|
-
|
|
3175
|
+
Y.bindVertexArray(Ad[a]);
|
|
3163
3176
|
}, glBlendEquation:function(a) {
|
|
3164
|
-
|
|
3177
|
+
Y.blendEquation(a);
|
|
3165
3178
|
}, glBlendFunc:function(a, b) {
|
|
3166
|
-
|
|
3179
|
+
Y.blendFunc(a, b);
|
|
3167
3180
|
}, glBlitFramebuffer:function(a, b, c, d, e, f, g, n, p, l) {
|
|
3168
|
-
|
|
3181
|
+
Y.blitFramebuffer(a, b, c, d, e, f, g, n, p, l);
|
|
3169
3182
|
}, glBufferData:function(a, b, c, d) {
|
|
3170
|
-
c && b ?
|
|
3183
|
+
c && b ? Y.bufferData(a, G, d, c, b) : Y.bufferData(a, b, d);
|
|
3171
3184
|
}, glBufferSubData:function(a, b, c, d) {
|
|
3172
|
-
c &&
|
|
3185
|
+
c && Y.bufferSubData(a, b, G, d, c);
|
|
3173
3186
|
}, glClear:function(a) {
|
|
3174
|
-
|
|
3187
|
+
Y.clear(a);
|
|
3175
3188
|
}, glClearColor:function(a, b, c, d) {
|
|
3176
|
-
|
|
3189
|
+
Y.clearColor(a, b, c, d);
|
|
3177
3190
|
}, glClearDepthf:function(a) {
|
|
3178
|
-
|
|
3191
|
+
Y.clearDepth(a);
|
|
3179
3192
|
}, glClearStencil:function(a) {
|
|
3180
|
-
|
|
3193
|
+
Y.clearStencil(a);
|
|
3181
3194
|
}, glColorMask:function(a, b, c, d) {
|
|
3182
|
-
|
|
3195
|
+
Y.colorMask(!!a, !!b, !!c, !!d);
|
|
3183
3196
|
}, glCompileShader:function(a) {
|
|
3184
|
-
|
|
3197
|
+
Y.compileShader(zd[a]);
|
|
3185
3198
|
}, glCreateProgram:function() {
|
|
3186
|
-
var a =
|
|
3199
|
+
var a = Dd(W), b = Y.createProgram();
|
|
3187
3200
|
b.name = a;
|
|
3188
3201
|
b.Gc = b.Ec = b.Fc = 0;
|
|
3189
|
-
b.
|
|
3202
|
+
b.Ua = 1;
|
|
3190
3203
|
W[a] = b;
|
|
3191
3204
|
return a;
|
|
3192
3205
|
}, glCreateShader:function(a) {
|
|
3193
|
-
var b =
|
|
3194
|
-
zd[b] =
|
|
3206
|
+
var b = Dd(zd);
|
|
3207
|
+
zd[b] = Y.createShader(a);
|
|
3195
3208
|
return b;
|
|
3196
3209
|
}, glCullFace:function(a) {
|
|
3197
|
-
|
|
3210
|
+
Y.cullFace(a);
|
|
3198
3211
|
}, glDeleteBuffers:function(a, b) {
|
|
3199
3212
|
for (var c = 0; c < a; c++) {
|
|
3200
3213
|
var d = J[b + 4 * c >> 2], e = vd[d];
|
|
3201
|
-
e && (
|
|
3214
|
+
e && (Y.deleteBuffer(e), e.name = 0, vd[d] = null, d == Y.Ya && (Y.Ya = 0), d == Y.Ma && (Y.Ma = 0));
|
|
3202
3215
|
}
|
|
3203
3216
|
}, glDeleteFramebuffers:function(a, b) {
|
|
3204
3217
|
for (var c = 0; c < a; ++c) {
|
|
3205
3218
|
var d = J[b + 4 * c >> 2], e = wd[d];
|
|
3206
|
-
e && (
|
|
3219
|
+
e && (Y.deleteFramebuffer(e), e.name = 0, wd[d] = null);
|
|
3207
3220
|
}
|
|
3208
3221
|
}, glDeleteProgram:function(a) {
|
|
3209
3222
|
if (a) {
|
|
3210
3223
|
var b = W[a];
|
|
3211
|
-
b ? (
|
|
3224
|
+
b ? (Y.deleteProgram(b), b.name = 0, W[a] = null) : X(1281);
|
|
3212
3225
|
}
|
|
3213
3226
|
}, glDeleteRenderbuffers:function(a, b) {
|
|
3214
3227
|
for (var c = 0; c < a; c++) {
|
|
3215
3228
|
var d = J[b + 4 * c >> 2], e = xd[d];
|
|
3216
|
-
e && (
|
|
3229
|
+
e && (Y.deleteRenderbuffer(e), e.name = 0, xd[d] = null);
|
|
3217
3230
|
}
|
|
3218
3231
|
}, glDeleteShader:function(a) {
|
|
3219
3232
|
if (a) {
|
|
3220
3233
|
var b = zd[a];
|
|
3221
|
-
b ? (
|
|
3234
|
+
b ? (Y.deleteShader(b), zd[a] = null) : X(1281);
|
|
3222
3235
|
}
|
|
3223
3236
|
}, glDeleteTextures:function(a, b) {
|
|
3224
3237
|
for (var c = 0; c < a; c++) {
|
|
3225
3238
|
var d = J[b + 4 * c >> 2], e = yd[d];
|
|
3226
|
-
e && (
|
|
3239
|
+
e && (Y.deleteTexture(e), e.name = 0, yd[d] = null);
|
|
3227
3240
|
}
|
|
3228
3241
|
}, glDeleteVertexArrays:function(a, b) {
|
|
3229
3242
|
for (var c = 0; c < a; c++) {
|
|
3230
3243
|
var d = J[b + 4 * c >> 2];
|
|
3231
|
-
|
|
3244
|
+
Y.deleteVertexArray(Ad[d]);
|
|
3232
3245
|
Ad[d] = null;
|
|
3233
3246
|
}
|
|
3234
3247
|
}, glDepthFunc:function(a) {
|
|
3235
|
-
|
|
3248
|
+
Y.depthFunc(a);
|
|
3236
3249
|
}, glDepthMask:function(a) {
|
|
3237
|
-
|
|
3250
|
+
Y.depthMask(!!a);
|
|
3238
3251
|
}, glDepthRangef:function(a, b) {
|
|
3239
|
-
|
|
3252
|
+
Y.depthRange(a, b);
|
|
3240
3253
|
}, glDisable:function(a) {
|
|
3241
|
-
|
|
3254
|
+
Y.disable(a);
|
|
3242
3255
|
}, glDrawArrays:function(a, b, c) {
|
|
3243
|
-
|
|
3256
|
+
Y.drawArrays(a, b, c);
|
|
3244
3257
|
}, glDrawArraysInstanced:function(a, b, c, d) {
|
|
3245
|
-
|
|
3258
|
+
Y.drawArraysInstanced(a, b, c, d);
|
|
3246
3259
|
}, glDrawBuffers:function(a, b) {
|
|
3247
|
-
for (var c =
|
|
3260
|
+
for (var c = Jd[a], d = 0; d < a; d++) {
|
|
3248
3261
|
c[d] = J[b + 4 * d >> 2];
|
|
3249
3262
|
}
|
|
3250
|
-
|
|
3263
|
+
Y.drawBuffers(c);
|
|
3251
3264
|
}, glDrawElements:function(a, b, c, d) {
|
|
3252
|
-
|
|
3265
|
+
Y.drawElements(a, b, c, d);
|
|
3253
3266
|
}, glDrawElementsInstanced:function(a, b, c, d, e) {
|
|
3254
|
-
|
|
3267
|
+
Y.drawElementsInstanced(a, b, c, d, e);
|
|
3255
3268
|
}, glEnable:function(a) {
|
|
3256
|
-
|
|
3269
|
+
Y.enable(a);
|
|
3257
3270
|
}, glEnableVertexAttribArray:function(a) {
|
|
3258
|
-
|
|
3271
|
+
Y.enableVertexAttribArray(a);
|
|
3259
3272
|
}, glFlush:function() {
|
|
3260
|
-
|
|
3273
|
+
Y.flush();
|
|
3261
3274
|
}, glFramebufferRenderbuffer:function(a, b, c, d) {
|
|
3262
|
-
|
|
3275
|
+
Y.framebufferRenderbuffer(a, b, c, xd[d]);
|
|
3263
3276
|
}, glFramebufferTexture2D:function(a, b, c, d, e) {
|
|
3264
|
-
|
|
3277
|
+
Y.framebufferTexture2D(a, b, c, yd[d], e);
|
|
3265
3278
|
}, glFrontFace:function(a) {
|
|
3266
|
-
|
|
3279
|
+
Y.frontFace(a);
|
|
3267
3280
|
}, glGenBuffers:function(a, b) {
|
|
3268
|
-
|
|
3281
|
+
Kd(a, b, "createBuffer", vd);
|
|
3269
3282
|
}, glGenFramebuffers:function(a, b) {
|
|
3270
|
-
|
|
3283
|
+
Kd(a, b, "createFramebuffer", wd);
|
|
3271
3284
|
}, glGenRenderbuffers:function(a, b) {
|
|
3272
|
-
|
|
3285
|
+
Kd(a, b, "createRenderbuffer", xd);
|
|
3273
3286
|
}, glGenTextures:function(a, b) {
|
|
3274
|
-
|
|
3287
|
+
Kd(a, b, "createTexture", yd);
|
|
3275
3288
|
}, glGenVertexArrays:function(a, b) {
|
|
3276
|
-
|
|
3289
|
+
Kd(a, b, "createVertexArray", Ad);
|
|
3277
3290
|
}, glGenerateMipmap:function(a) {
|
|
3278
|
-
|
|
3291
|
+
Y.generateMipmap(a);
|
|
3279
3292
|
}, glGetIntegerv:function(a, b) {
|
|
3280
|
-
|
|
3293
|
+
Ld(a, b);
|
|
3281
3294
|
}, glGetString:function(a) {
|
|
3282
3295
|
var b = Bd[a];
|
|
3283
3296
|
if (!b) {
|
|
3284
3297
|
switch(a) {
|
|
3285
3298
|
case 7939:
|
|
3286
|
-
b =
|
|
3299
|
+
b = Y.getSupportedExtensions() || [];
|
|
3287
3300
|
b = b.concat(b.map(function(d) {
|
|
3288
3301
|
return "GL_" + d;
|
|
3289
3302
|
}));
|
|
3290
|
-
b =
|
|
3303
|
+
b = Nd(b.join(" "));
|
|
3291
3304
|
break;
|
|
3292
3305
|
case 7936:
|
|
3293
3306
|
case 7937:
|
|
3294
3307
|
case 37445:
|
|
3295
3308
|
case 37446:
|
|
3296
|
-
(b =
|
|
3297
|
-
b = b &&
|
|
3309
|
+
(b = Y.getParameter(a)) || X(1280);
|
|
3310
|
+
b = b && Nd(b);
|
|
3298
3311
|
break;
|
|
3299
3312
|
case 7938:
|
|
3300
|
-
b =
|
|
3313
|
+
b = Nd("OpenGL ES 3.0 (" + Y.getParameter(7938) + ")");
|
|
3301
3314
|
break;
|
|
3302
3315
|
case 35724:
|
|
3303
|
-
b =
|
|
3316
|
+
b = Y.getParameter(35724);
|
|
3304
3317
|
var c = b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);
|
|
3305
3318
|
null !== c && (3 == c[1].length && (c[1] += "0"), b = "OpenGL ES GLSL ES " + c[1] + " (" + b + ")");
|
|
3306
|
-
b =
|
|
3319
|
+
b = Nd(b);
|
|
3307
3320
|
break;
|
|
3308
3321
|
default:
|
|
3309
3322
|
X(1280);
|
|
@@ -3312,32 +3325,32 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3312
3325
|
}
|
|
3313
3326
|
return b;
|
|
3314
3327
|
}, glGetUniformBlockIndex:function(a, b) {
|
|
3315
|
-
return
|
|
3328
|
+
return Y.getUniformBlockIndex(W[a], b ? L(G, b) : "");
|
|
3316
3329
|
}, glGetUniformLocation:function(a, b) {
|
|
3317
3330
|
b = b ? L(G, b) : "";
|
|
3318
3331
|
if (a = W[a]) {
|
|
3319
|
-
var c = a, d = c.oa, e = c.
|
|
3332
|
+
var c = a, d = c.oa, e = c.vb, f;
|
|
3320
3333
|
if (!d) {
|
|
3321
|
-
for (c.oa = d = {}, c.
|
|
3322
|
-
var g =
|
|
3334
|
+
for (c.oa = d = {}, c.ub = {}, f = 0; f < Y.getProgramParameter(c, 35718); ++f) {
|
|
3335
|
+
var g = Y.getActiveUniform(c, f);
|
|
3323
3336
|
var n = g.name;
|
|
3324
3337
|
g = g.size;
|
|
3325
|
-
var p =
|
|
3338
|
+
var p = Od(n);
|
|
3326
3339
|
p = 0 < p ? n.slice(0, p) : n;
|
|
3327
|
-
var l = c.
|
|
3328
|
-
c.
|
|
3340
|
+
var l = c.Ua;
|
|
3341
|
+
c.Ua += g;
|
|
3329
3342
|
e[p] = [g, l];
|
|
3330
3343
|
for (n = 0; n < g; ++n) {
|
|
3331
|
-
d[l] = n, c.
|
|
3344
|
+
d[l] = n, c.ub[l++] = p;
|
|
3332
3345
|
}
|
|
3333
3346
|
}
|
|
3334
3347
|
}
|
|
3335
3348
|
c = a.oa;
|
|
3336
3349
|
d = 0;
|
|
3337
3350
|
e = b;
|
|
3338
|
-
f =
|
|
3351
|
+
f = Od(b);
|
|
3339
3352
|
0 < f && (d = parseInt(b.slice(f + 1)) >>> 0, e = b.slice(0, f));
|
|
3340
|
-
if ((e = a.
|
|
3353
|
+
if ((e = a.vb[e]) && d < e[0] && (d += e[1], c[d] = c[d] || Y.getUniformLocation(a, b))) {
|
|
3341
3354
|
return d;
|
|
3342
3355
|
}
|
|
3343
3356
|
} else {
|
|
@@ -3345,58 +3358,58 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3345
3358
|
}
|
|
3346
3359
|
return -1;
|
|
3347
3360
|
}, glInvalidateFramebuffer:function(a, b, c) {
|
|
3348
|
-
for (var d =
|
|
3361
|
+
for (var d = Jd[b], e = 0; e < b; e++) {
|
|
3349
3362
|
d[e] = J[c + 4 * e >> 2];
|
|
3350
3363
|
}
|
|
3351
|
-
|
|
3364
|
+
Y.invalidateFramebuffer(a, d);
|
|
3352
3365
|
}, glLinkProgram:function(a) {
|
|
3353
3366
|
a = W[a];
|
|
3354
|
-
|
|
3367
|
+
Y.linkProgram(a);
|
|
3355
3368
|
a.oa = 0;
|
|
3356
|
-
a.
|
|
3369
|
+
a.vb = {};
|
|
3357
3370
|
}, glPixelStorei:function(a, b) {
|
|
3358
|
-
|
|
3371
|
+
Y.pixelStorei(a, b);
|
|
3359
3372
|
}, glRenderbufferStorageMultisample:function(a, b, c, d, e) {
|
|
3360
|
-
|
|
3373
|
+
Y.renderbufferStorageMultisample(a, b, c, d, e);
|
|
3361
3374
|
}, glScissor:function(a, b, c, d) {
|
|
3362
|
-
|
|
3375
|
+
Y.scissor(a, b, c, d);
|
|
3363
3376
|
}, glShaderSource:function(a, b, c, d) {
|
|
3364
3377
|
for (var e = "", f = 0; f < b; ++f) {
|
|
3365
3378
|
var g = d ? J[d + 4 * f >> 2] : -1, n = J[c + 4 * f >> 2];
|
|
3366
3379
|
g = n ? L(G, n, 0 > g ? void 0 : g) : "";
|
|
3367
3380
|
e += g;
|
|
3368
3381
|
}
|
|
3369
|
-
|
|
3382
|
+
Y.shaderSource(zd[a], e);
|
|
3370
3383
|
}, glStencilFunc:function(a, b, c) {
|
|
3371
|
-
|
|
3384
|
+
Y.stencilFunc(a, b, c);
|
|
3372
3385
|
}, glStencilFuncSeparate:function(a, b, c, d) {
|
|
3373
|
-
|
|
3386
|
+
Y.stencilFuncSeparate(a, b, c, d);
|
|
3374
3387
|
}, glStencilMask:function(a) {
|
|
3375
|
-
|
|
3388
|
+
Y.stencilMask(a);
|
|
3376
3389
|
}, glStencilOp:function(a, b, c) {
|
|
3377
|
-
|
|
3390
|
+
Y.stencilOp(a, b, c);
|
|
3378
3391
|
}, glStencilOpSeparate:function(a, b, c, d) {
|
|
3379
|
-
|
|
3392
|
+
Y.stencilOpSeparate(a, b, c, d);
|
|
3380
3393
|
}, glTexParameteri:function(a, b, c) {
|
|
3381
|
-
|
|
3394
|
+
Y.texParameteri(a, b, c);
|
|
3382
3395
|
}, glTexStorage2D:function(a, b, c, d, e) {
|
|
3383
|
-
|
|
3396
|
+
Y.texStorage2D(a, b, c, d, e);
|
|
3384
3397
|
}, glTexSubImage2D:function(a, b, c, d, e, f, g, n, p) {
|
|
3385
|
-
if (
|
|
3386
|
-
|
|
3398
|
+
if (Y.Ma) {
|
|
3399
|
+
Y.texSubImage2D(a, b, c, d, e, f, g, n, p);
|
|
3387
3400
|
} else if (p) {
|
|
3388
3401
|
var l = n - 5120;
|
|
3389
|
-
l = 0 == l ?
|
|
3390
|
-
|
|
3402
|
+
l = 0 == l ? D : 1 == l ? G : 2 == l ? I : 4 == l ? J : 6 == l ? wa : 5 == l || 28922 == l || 28520 == l || 30779 == l || 30782 == l ? K : va;
|
|
3403
|
+
Y.texSubImage2D(a, b, c, d, e, f, g, n, l, p >> 31 - Math.clz32(l.BYTES_PER_ELEMENT));
|
|
3391
3404
|
} else {
|
|
3392
|
-
|
|
3405
|
+
Y.texSubImage2D(a, b, c, d, e, f, g, n, null);
|
|
3393
3406
|
}
|
|
3394
3407
|
}, glUniform1i:function(a, b) {
|
|
3395
|
-
var c =
|
|
3396
|
-
var e =
|
|
3408
|
+
var c = Y, d = c.uniform1i;
|
|
3409
|
+
var e = Y.Gb;
|
|
3397
3410
|
if (e) {
|
|
3398
3411
|
var f = e.oa[a];
|
|
3399
|
-
"number" == typeof f && (e.oa[a] = f =
|
|
3412
|
+
"number" == typeof f && (e.oa[a] = f = Y.getUniformLocation(e, e.ub[a] + (0 < f ? "[" + f + "]" : "")));
|
|
3400
3413
|
a = f;
|
|
3401
3414
|
} else {
|
|
3402
3415
|
X(1282), a = void 0;
|
|
@@ -3404,32 +3417,32 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3404
3417
|
d.call(c, a, b);
|
|
3405
3418
|
}, glUniformBlockBinding:function(a, b, c) {
|
|
3406
3419
|
a = W[a];
|
|
3407
|
-
|
|
3420
|
+
Y.uniformBlockBinding(a, b, c);
|
|
3408
3421
|
}, glUseProgram:function(a) {
|
|
3409
3422
|
a = W[a];
|
|
3410
|
-
|
|
3411
|
-
|
|
3423
|
+
Y.useProgram(a);
|
|
3424
|
+
Y.Gb = a;
|
|
3412
3425
|
}, glVertexAttribDivisor:function(a, b) {
|
|
3413
|
-
|
|
3426
|
+
Y.vertexAttribDivisor(a, b);
|
|
3414
3427
|
}, glVertexAttribIPointer:function(a, b, c, d, e) {
|
|
3415
|
-
|
|
3428
|
+
Y.vertexAttribIPointer(a, b, c, d, e);
|
|
3416
3429
|
}, glVertexAttribPointer:function(a, b, c, d, e, f) {
|
|
3417
|
-
|
|
3430
|
+
Y.vertexAttribPointer(a, b, c, !!d, e, f);
|
|
3418
3431
|
}, glViewport:function(a, b, c, d) {
|
|
3419
|
-
|
|
3432
|
+
Y.viewport(a, b, c, d);
|
|
3420
3433
|
}, provokingVertexWEBGL:function(a, b) {
|
|
3421
|
-
(a =
|
|
3422
|
-
}, strftime_l:(a, b, c, d) =>
|
|
3434
|
+
(a = w[a].D.nb) && a.provokingVertexWEBGL(b);
|
|
3435
|
+
}, strftime_l:(a, b, c, d) => Sd(a, b, c, d), upload_image:function(a, b) {
|
|
3423
3436
|
var c = m.images;
|
|
3424
|
-
c && (b = c.get(b)) && (a =
|
|
3437
|
+
c && (b = c.get(b)) && (a = w[a].D, a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, b));
|
|
3425
3438
|
}};
|
|
3426
3439
|
(function() {
|
|
3427
3440
|
function a(c) {
|
|
3428
|
-
|
|
3429
|
-
ta =
|
|
3441
|
+
B = c = c.exports;
|
|
3442
|
+
ta = B.memory;
|
|
3430
3443
|
ya();
|
|
3431
|
-
za =
|
|
3432
|
-
Ba.unshift(
|
|
3444
|
+
za = B.__indirect_function_table;
|
|
3445
|
+
Ba.unshift(B.__wasm_call_ctors);
|
|
3433
3446
|
Ea--;
|
|
3434
3447
|
m.monitorRunDependencies && m.monitorRunDependencies(Ea);
|
|
3435
3448
|
if (0 == Ea && (null !== Fa && (clearInterval(Fa), Fa = null), Ga)) {
|
|
@@ -3439,14 +3452,14 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3439
3452
|
}
|
|
3440
3453
|
return c;
|
|
3441
3454
|
}
|
|
3442
|
-
var b = {env:
|
|
3455
|
+
var b = {env:Xd, wasi_snapshot_preview1:Xd,};
|
|
3443
3456
|
Ea++;
|
|
3444
3457
|
m.monitorRunDependencies && m.monitorRunDependencies(Ea);
|
|
3445
3458
|
if (m.instantiateWasm) {
|
|
3446
3459
|
try {
|
|
3447
3460
|
return m.instantiateWasm(b, a);
|
|
3448
3461
|
} catch (c) {
|
|
3449
|
-
|
|
3462
|
+
qa("Module.instantiateWasm callback failed with error: " + c), ba(c);
|
|
3450
3463
|
}
|
|
3451
3464
|
}
|
|
3452
3465
|
Na(b, function(c) {
|
|
@@ -3454,32 +3467,32 @@ var Wd = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3454
3467
|
}).catch(ba);
|
|
3455
3468
|
return {};
|
|
3456
3469
|
})();
|
|
3457
|
-
var nc = a => (nc =
|
|
3458
|
-
m._setWebImage = (a, b, c) => (m._setWebImage =
|
|
3459
|
-
var Qa = m._ma_device__on_notification_unlocked = a => (Qa = m._ma_device__on_notification_unlocked =
|
|
3460
|
-
m._ma_malloc_emscripten = (a, b) => (m._ma_malloc_emscripten =
|
|
3461
|
-
m._ma_free_emscripten = (a, b) => (m._ma_free_emscripten =
|
|
3462
|
-
var Ra = m._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (Ra = m._ma_device_process_pcm_frames_capture__webaudio =
|
|
3463
|
-
m.__embind_initialize_bindings = () => (m.__embind_initialize_bindings =
|
|
3464
|
-
m.dynCall_iiji = (a, b, c, d, e) => (m.dynCall_iiji =
|
|
3465
|
-
m.dynCall_iiiji = (a, b, c, d, e, f) => (m.dynCall_iiiji =
|
|
3466
|
-
m.dynCall_iij = (a, b, c, d) => (m.dynCall_iij =
|
|
3467
|
-
m.dynCall_jii = (a, b, c) => (m.dynCall_jii =
|
|
3468
|
-
m.dynCall_jiji = (a, b, c, d, e) => (m.dynCall_jiji =
|
|
3469
|
-
m.dynCall_viijii = (a, b, c, d, e, f, g) => (m.dynCall_viijii =
|
|
3470
|
-
m.dynCall_iiiiij = (a, b, c, d, e, f, g) => (m.dynCall_iiiiij =
|
|
3471
|
-
m.dynCall_iiiiijj = (a, b, c, d, e, f, g, n, p) => (m.dynCall_iiiiijj =
|
|
3472
|
-
m.dynCall_iiiiiijj = (a, b, c, d, e, f, g, n, p, l) => (m.dynCall_iiiiiijj =
|
|
3473
|
-
m.___start_em_js =
|
|
3474
|
-
m.___stop_em_js =
|
|
3475
|
-
var
|
|
3476
|
-
Ga = function
|
|
3477
|
-
|
|
3478
|
-
|
|
3470
|
+
var nc = a => (nc = B.free)(a), Md = a => (Md = B.malloc)(a);
|
|
3471
|
+
m._setWebImage = (a, b, c) => (m._setWebImage = B.setWebImage)(a, b, c);
|
|
3472
|
+
var Qa = m._ma_device__on_notification_unlocked = a => (Qa = m._ma_device__on_notification_unlocked = B.ma_device__on_notification_unlocked)(a);
|
|
3473
|
+
m._ma_malloc_emscripten = (a, b) => (m._ma_malloc_emscripten = B.ma_malloc_emscripten)(a, b);
|
|
3474
|
+
m._ma_free_emscripten = (a, b) => (m._ma_free_emscripten = B.ma_free_emscripten)(a, b);
|
|
3475
|
+
var Ra = m._ma_device_process_pcm_frames_capture__webaudio = (a, b, c) => (Ra = m._ma_device_process_pcm_frames_capture__webaudio = B.ma_device_process_pcm_frames_capture__webaudio)(a, b, c), Sa = m._ma_device_process_pcm_frames_playback__webaudio = (a, b, c) => (Sa = m._ma_device_process_pcm_frames_playback__webaudio = B.ma_device_process_pcm_frames_playback__webaudio)(a, b, c), Wd = () => (Wd = B.__errno_location)(), mc = a => (mc = B.__getTypeName)(a);
|
|
3476
|
+
m.__embind_initialize_bindings = () => (m.__embind_initialize_bindings = B._embind_initialize_bindings)();
|
|
3477
|
+
m.dynCall_iiji = (a, b, c, d, e) => (m.dynCall_iiji = B.dynCall_iiji)(a, b, c, d, e);
|
|
3478
|
+
m.dynCall_iiiji = (a, b, c, d, e, f) => (m.dynCall_iiiji = B.dynCall_iiiji)(a, b, c, d, e, f);
|
|
3479
|
+
m.dynCall_iij = (a, b, c, d) => (m.dynCall_iij = B.dynCall_iij)(a, b, c, d);
|
|
3480
|
+
m.dynCall_jii = (a, b, c) => (m.dynCall_jii = B.dynCall_jii)(a, b, c);
|
|
3481
|
+
m.dynCall_jiji = (a, b, c, d, e) => (m.dynCall_jiji = B.dynCall_jiji)(a, b, c, d, e);
|
|
3482
|
+
m.dynCall_viijii = (a, b, c, d, e, f, g) => (m.dynCall_viijii = B.dynCall_viijii)(a, b, c, d, e, f, g);
|
|
3483
|
+
m.dynCall_iiiiij = (a, b, c, d, e, f, g) => (m.dynCall_iiiiij = B.dynCall_iiiiij)(a, b, c, d, e, f, g);
|
|
3484
|
+
m.dynCall_iiiiijj = (a, b, c, d, e, f, g, n, p) => (m.dynCall_iiiiijj = B.dynCall_iiiiijj)(a, b, c, d, e, f, g, n, p);
|
|
3485
|
+
m.dynCall_iiiiiijj = (a, b, c, d, e, f, g, n, p, l) => (m.dynCall_iiiiiijj = B.dynCall_iiiiiijj)(a, b, c, d, e, f, g, n, p, l);
|
|
3486
|
+
m.___start_em_js = 502316;
|
|
3487
|
+
m.___stop_em_js = 504750;
|
|
3488
|
+
var Yd;
|
|
3489
|
+
Ga = function Zd() {
|
|
3490
|
+
Yd || $d();
|
|
3491
|
+
Yd || (Ga = Zd);
|
|
3479
3492
|
};
|
|
3480
|
-
function
|
|
3493
|
+
function $d() {
|
|
3481
3494
|
function a() {
|
|
3482
|
-
if (!
|
|
3495
|
+
if (!Yd && (Yd = !0, m.calledRun = !0, !ua)) {
|
|
3483
3496
|
m.noFSInit || Sb || (Sb = !0, Rb(), m.stdin = m.stdin, m.stdout = m.stdout, m.stderr = m.stderr, m.stdin ? Ub("stdin", m.stdin) : Nb("/dev/tty", "/dev/stdin"), m.stdout ? Ub("stdout", null, m.stdout) : Nb("/dev/tty", "/dev/stdout"), m.stderr ? Ub("stderr", null, m.stderr) : Nb("/dev/tty1", "/dev/stderr"), Pb("/dev/stdin", 0), Pb("/dev/stdout", 1), Pb("/dev/stderr", 1));
|
|
3484
3497
|
yb = !1;
|
|
3485
3498
|
Ua(Ba);
|
|
@@ -3516,7 +3529,7 @@ if (m.preInit) {
|
|
|
3516
3529
|
m.preInit.pop()();
|
|
3517
3530
|
}
|
|
3518
3531
|
}
|
|
3519
|
-
|
|
3532
|
+
$d();
|
|
3520
3533
|
|
|
3521
3534
|
|
|
3522
3535
|
|
|
@@ -3531,7 +3544,7 @@ Zd();
|
|
|
3531
3544
|
/* 2 */
|
|
3532
3545
|
/***/ ((module) => {
|
|
3533
3546
|
|
|
3534
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.
|
|
3547
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.26.0","description":"Rive\'s webgl2 based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)","Chris Dalton <chris@rive.app> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
3535
3548
|
|
|
3536
3549
|
/***/ }),
|
|
3537
3550
|
/* 3 */
|
|
@@ -4064,6 +4077,21 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
|
|
|
4064
4077
|
|
|
4065
4078
|
|
|
4066
4079
|
|
|
4080
|
+
var RiveError = /** @class */ (function (_super) {
|
|
4081
|
+
__extends(RiveError, _super);
|
|
4082
|
+
function RiveError() {
|
|
4083
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
4084
|
+
_this.isHandledError = true;
|
|
4085
|
+
return _this;
|
|
4086
|
+
}
|
|
4087
|
+
return RiveError;
|
|
4088
|
+
}(Error));
|
|
4089
|
+
// #regions helpers
|
|
4090
|
+
var resolveErrorMessage = function (error) {
|
|
4091
|
+
return error && error.isHandledError
|
|
4092
|
+
? error.message
|
|
4093
|
+
: "Problem loading file; may be corrupt!";
|
|
4094
|
+
};
|
|
4067
4095
|
// #region layout
|
|
4068
4096
|
// Fit options for the canvas
|
|
4069
4097
|
var Fit;
|
|
@@ -5150,6 +5178,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
5150
5178
|
// Allow the runtime to automatically load assets hosted in Rive's runtime.
|
|
5151
5179
|
this.enableRiveAssetCDN = true;
|
|
5152
5180
|
this.referenceCount = 0;
|
|
5181
|
+
this.destroyed = false;
|
|
5153
5182
|
this.src = params.src;
|
|
5154
5183
|
this.buffer = params.buffer;
|
|
5155
5184
|
if (params.assetLoader)
|
|
@@ -5168,16 +5197,20 @@ var RiveFile = /** @class */ (function () {
|
|
|
5168
5197
|
RiveFile.prototype.initData = function () {
|
|
5169
5198
|
return __awaiter(this, void 0, void 0, function () {
|
|
5170
5199
|
var _a, loader, _b;
|
|
5171
|
-
|
|
5172
|
-
|
|
5200
|
+
var _c;
|
|
5201
|
+
return __generator(this, function (_d) {
|
|
5202
|
+
switch (_d.label) {
|
|
5173
5203
|
case 0:
|
|
5174
5204
|
if (!this.src) return [3 /*break*/, 2];
|
|
5175
5205
|
_a = this;
|
|
5176
5206
|
return [4 /*yield*/, loadRiveFile(this.src)];
|
|
5177
5207
|
case 1:
|
|
5178
|
-
_a.buffer =
|
|
5179
|
-
|
|
5208
|
+
_a.buffer = _d.sent();
|
|
5209
|
+
_d.label = 2;
|
|
5180
5210
|
case 2:
|
|
5211
|
+
if (this.destroyed) {
|
|
5212
|
+
return [2 /*return*/];
|
|
5213
|
+
}
|
|
5181
5214
|
if (this.assetLoader) {
|
|
5182
5215
|
loader = new this.runtime.CustomFileAssetLoader({
|
|
5183
5216
|
loadContents: this.assetLoader,
|
|
@@ -5188,7 +5221,12 @@ var RiveFile = /** @class */ (function () {
|
|
|
5188
5221
|
return [4 /*yield*/, this.runtime.load(new Uint8Array(this.buffer), loader, this.enableRiveAssetCDN)];
|
|
5189
5222
|
case 3:
|
|
5190
5223
|
// Load the Rive file
|
|
5191
|
-
_b.file =
|
|
5224
|
+
_b.file = _d.sent();
|
|
5225
|
+
if (this.destroyed) {
|
|
5226
|
+
(_c = this.file) === null || _c === void 0 ? void 0 : _c.delete();
|
|
5227
|
+
this.file = null;
|
|
5228
|
+
return [2 /*return*/];
|
|
5229
|
+
}
|
|
5192
5230
|
if (this.file !== null) {
|
|
5193
5231
|
this.eventManager.fire({
|
|
5194
5232
|
type: EventType.Load,
|
|
@@ -5221,6 +5259,9 @@ var RiveFile = /** @class */ (function () {
|
|
|
5221
5259
|
return [4 /*yield*/, RuntimeLoader.awaitInstance()];
|
|
5222
5260
|
case 1:
|
|
5223
5261
|
_a.runtime = _b.sent();
|
|
5262
|
+
if (this.destroyed) {
|
|
5263
|
+
return [2 /*return*/];
|
|
5264
|
+
}
|
|
5224
5265
|
return [4 /*yield*/, this.initData()];
|
|
5225
5266
|
case 2:
|
|
5226
5267
|
_b.sent();
|
|
@@ -5257,6 +5298,8 @@ var RiveFile = /** @class */ (function () {
|
|
|
5257
5298
|
if (this.referenceCount <= 0) {
|
|
5258
5299
|
this.removeAllRiveEventListeners();
|
|
5259
5300
|
(_a = this.file) === null || _a === void 0 ? void 0 : _a.delete();
|
|
5301
|
+
this.file = null;
|
|
5302
|
+
this.destroyed = true;
|
|
5260
5303
|
}
|
|
5261
5304
|
};
|
|
5262
5305
|
/**
|
|
@@ -5317,14 +5360,22 @@ var Rive = /** @class */ (function () {
|
|
|
5317
5360
|
this._hasZeroSize = false;
|
|
5318
5361
|
// Audio event listener
|
|
5319
5362
|
this._audioEventListener = null;
|
|
5363
|
+
// draw method bound to the class
|
|
5364
|
+
this._boundDraw = null;
|
|
5320
5365
|
// Durations to generate a frame for the last second. Used for performance profiling.
|
|
5321
5366
|
this.durations = [];
|
|
5322
5367
|
this.frameTimes = [];
|
|
5323
5368
|
this.frameCount = 0;
|
|
5324
5369
|
this.isTouchScrollEnabled = false;
|
|
5325
5370
|
this.onCanvasResize = function (hasZeroSize) {
|
|
5371
|
+
var toggledDisplay = _this._hasZeroSize !== hasZeroSize;
|
|
5326
5372
|
_this._hasZeroSize = hasZeroSize;
|
|
5327
|
-
if (!
|
|
5373
|
+
if (!hasZeroSize) {
|
|
5374
|
+
if (toggledDisplay) {
|
|
5375
|
+
_this.resizeDrawingSurfaceToCanvas();
|
|
5376
|
+
}
|
|
5377
|
+
}
|
|
5378
|
+
else if (!_this._layout.maxX || !_this._layout.maxY) {
|
|
5328
5379
|
_this.resizeToCanvas();
|
|
5329
5380
|
}
|
|
5330
5381
|
};
|
|
@@ -5333,6 +5384,7 @@ var Rive = /** @class */ (function () {
|
|
|
5333
5384
|
* Used for debugging purposes
|
|
5334
5385
|
*/
|
|
5335
5386
|
this.renderSecondTimer = 0;
|
|
5387
|
+
this._boundDraw = this.draw.bind(this);
|
|
5336
5388
|
this.canvas = params.canvas;
|
|
5337
5389
|
if (params.canvas.constructor === HTMLCanvasElement) {
|
|
5338
5390
|
this._observed = observers.add(this.canvas, this.onCanvasResize);
|
|
@@ -5543,6 +5595,10 @@ var Rive = /** @class */ (function () {
|
|
|
5543
5595
|
_b.sent();
|
|
5544
5596
|
_b.label = 2;
|
|
5545
5597
|
case 2:
|
|
5598
|
+
// Check for riveFile in case it has been cleaned up while initializing;
|
|
5599
|
+
if (!this.riveFile) {
|
|
5600
|
+
throw new RiveError(Rive.cleanupErrorMessage);
|
|
5601
|
+
}
|
|
5546
5602
|
this.file = this.riveFile.getInstance();
|
|
5547
5603
|
// Initialize and draw frame
|
|
5548
5604
|
this.initArtboard(artboardName, animationNames, stateMachineNames, autoplay);
|
|
@@ -5564,7 +5620,7 @@ var Rive = /** @class */ (function () {
|
|
|
5564
5620
|
return [2 /*return*/, Promise.resolve()];
|
|
5565
5621
|
case 3:
|
|
5566
5622
|
error_1 = _b.sent();
|
|
5567
|
-
msg =
|
|
5623
|
+
msg = resolveErrorMessage(error_1);
|
|
5568
5624
|
console.warn(msg);
|
|
5569
5625
|
this.eventManager.fire({ type: EventType.LoadError, data: msg });
|
|
5570
5626
|
return [2 /*return*/, Promise.reject(msg)];
|
|
@@ -5622,7 +5678,15 @@ var Rive = /** @class */ (function () {
|
|
|
5622
5678
|
};
|
|
5623
5679
|
// Draws the current artboard frame
|
|
5624
5680
|
Rive.prototype.drawFrame = function () {
|
|
5625
|
-
|
|
5681
|
+
var _a;
|
|
5682
|
+
if ((_a = document === null || document === void 0 ? void 0 : document.timeline) === null || _a === void 0 ? void 0 : _a.currentTime) {
|
|
5683
|
+
if (this.loaded && this.artboard && !this.frameRequestId) {
|
|
5684
|
+
this._boundDraw(document.timeline.currentTime);
|
|
5685
|
+
}
|
|
5686
|
+
}
|
|
5687
|
+
else {
|
|
5688
|
+
this.startRendering();
|
|
5689
|
+
}
|
|
5626
5690
|
};
|
|
5627
5691
|
/**
|
|
5628
5692
|
* Draw rendering loop; renders animation frames at the correct time interval.
|
|
@@ -6032,8 +6096,8 @@ var Rive = /** @class */ (function () {
|
|
|
6032
6096
|
this.devicePixelRatioUsed = dpr;
|
|
6033
6097
|
this.canvas.width = dpr * width;
|
|
6034
6098
|
this.canvas.height = dpr * height;
|
|
6035
|
-
this.startRendering();
|
|
6036
6099
|
this.resizeToCanvas();
|
|
6100
|
+
this.drawFrame();
|
|
6037
6101
|
if (this.layout.fit === Fit.Layout) {
|
|
6038
6102
|
var scaleFactor = this._layout.layoutScaleFactor;
|
|
6039
6103
|
this.artboard.width = width / scaleFactor;
|
|
@@ -6422,10 +6486,10 @@ var Rive = /** @class */ (function () {
|
|
|
6422
6486
|
Rive.prototype.startRendering = function () {
|
|
6423
6487
|
if (this.loaded && this.artboard && !this.frameRequestId) {
|
|
6424
6488
|
if (this.runtime.requestAnimationFrame) {
|
|
6425
|
-
this.frameRequestId = this.runtime.requestAnimationFrame(this.
|
|
6489
|
+
this.frameRequestId = this.runtime.requestAnimationFrame(this._boundDraw);
|
|
6426
6490
|
}
|
|
6427
6491
|
else {
|
|
6428
|
-
this.frameRequestId = requestAnimationFrame(this.
|
|
6492
|
+
this.frameRequestId = requestAnimationFrame(this._boundDraw);
|
|
6429
6493
|
}
|
|
6430
6494
|
}
|
|
6431
6495
|
};
|
|
@@ -6593,6 +6657,8 @@ var Rive = /** @class */ (function () {
|
|
|
6593
6657
|
});
|
|
6594
6658
|
// Error message for missing source or buffer
|
|
6595
6659
|
Rive.missingErrorMessage = "Rive source file or data buffer required";
|
|
6660
|
+
// Error message for removed rive file
|
|
6661
|
+
Rive.cleanupErrorMessage = "Attempt to use file after calling cleanup.";
|
|
6596
6662
|
return Rive;
|
|
6597
6663
|
}());
|
|
6598
6664
|
|