@rive-app/canvas-lite 2.33.3 → 2.34.1
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 +7 -0
- package/rive.js +644 -593
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +1 -0
- package/rive_fallback.wasm +0 -0
package/rive.js
CHANGED
|
@@ -43,8 +43,8 @@ function ja() {
|
|
|
43
43
|
console.error(n);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
this.
|
|
47
|
-
e && e.
|
|
46
|
+
this.va();
|
|
47
|
+
e && e.Pa();
|
|
48
48
|
}
|
|
49
49
|
let a = 0, c = 0, d = new Map(), e = null, f = null;
|
|
50
50
|
this.requestAnimationFrame = function(m) {
|
|
@@ -57,24 +57,24 @@ function ja() {
|
|
|
57
57
|
d.delete(m);
|
|
58
58
|
a && 0 == d.size && (cancelAnimationFrame(a), a = 0);
|
|
59
59
|
};
|
|
60
|
-
this.
|
|
60
|
+
this.Na = function(m) {
|
|
61
61
|
f && (document.body.remove(f), f = null);
|
|
62
62
|
m || (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", m = function(h) {
|
|
63
63
|
f.innerHTML = "RIVE FPS " + h.toFixed(1);
|
|
64
64
|
}, document.body.appendChild(f));
|
|
65
65
|
e = new function() {
|
|
66
66
|
let h = 0, l = 0;
|
|
67
|
-
this.
|
|
67
|
+
this.Pa = function() {
|
|
68
68
|
var n = performance.now();
|
|
69
69
|
l ? (++h, n -= l, 1000 < n && (m(1000 * h / n), h = l = 0)) : (l = n, h = 0);
|
|
70
70
|
};
|
|
71
71
|
}();
|
|
72
72
|
};
|
|
73
|
-
this.
|
|
73
|
+
this.Ka = function() {
|
|
74
74
|
f && (document.body.remove(f), f = null);
|
|
75
75
|
e = null;
|
|
76
76
|
};
|
|
77
|
-
this.
|
|
77
|
+
this.va = function() {
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
function ka(b) {
|
|
@@ -112,10 +112,10 @@ k.onRuntimeInitialized = function() {
|
|
|
112
112
|
};
|
|
113
113
|
k.CustomFileAssetLoader = c.extend("CustomFileAssetLoader", {__construct:function({loadContents:e}) {
|
|
114
114
|
this.__parent.__construct.call(this);
|
|
115
|
-
this.
|
|
115
|
+
this.Ea = e;
|
|
116
116
|
}, loadContents:function(e, f) {
|
|
117
117
|
e = k.ptrToAsset(e);
|
|
118
|
-
return this.
|
|
118
|
+
return this.Ea(e, f);
|
|
119
119
|
},});
|
|
120
120
|
k.CDNFileAssetLoader = c.extend("CDNFileAssetLoader", {__construct:function() {
|
|
121
121
|
this.__parent.__construct.call(this);
|
|
@@ -140,11 +140,11 @@ k.onRuntimeInitialized = function() {
|
|
|
140
140
|
},});
|
|
141
141
|
k.FallbackFileAssetLoader = c.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
142
142
|
this.__parent.__construct.call(this);
|
|
143
|
-
this.
|
|
143
|
+
this.ua = [];
|
|
144
144
|
}, addLoader:function(e) {
|
|
145
|
-
this.
|
|
145
|
+
this.ua.push(e);
|
|
146
146
|
}, loadContents:function(e, f) {
|
|
147
|
-
for (let m of this.
|
|
147
|
+
for (let m of this.ua) {
|
|
148
148
|
if (m.loadContents(e, f)) {
|
|
149
149
|
return !0;
|
|
150
150
|
}
|
|
@@ -156,7 +156,7 @@ k.onRuntimeInitialized = function() {
|
|
|
156
156
|
return d.call(this, e, f, m, h, l);
|
|
157
157
|
};
|
|
158
158
|
};
|
|
159
|
-
const
|
|
159
|
+
const oa = "createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "), pa = new function() {
|
|
160
160
|
function b() {
|
|
161
161
|
if (!a) {
|
|
162
162
|
var g = document.createElement("canvas"), t = {alpha:1, depth:0, stencil:0, antialias:0, premultipliedAlpha:1, preserveDrawingBuffer:0, powerPreference:"high-performance", failIfMajorPerformanceCaveat:0, enableExtensionsByDefault:1, explicitSwapControl:1, renderViaOffscreenBackBuffer:1,};
|
|
@@ -230,14 +230,14 @@ const na = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
230
230
|
}
|
|
231
231
|
let a = null, c = 0, d = 0, e = null, f = null, m = 0, h = 0, l = !1;
|
|
232
232
|
b();
|
|
233
|
-
this.
|
|
233
|
+
this.Xa = function() {
|
|
234
234
|
b();
|
|
235
235
|
return d;
|
|
236
236
|
};
|
|
237
|
-
this.
|
|
237
|
+
this.Ja = function(g) {
|
|
238
238
|
a.deleteTexture && a.deleteTexture(g);
|
|
239
239
|
};
|
|
240
|
-
this.
|
|
240
|
+
this.Ia = function(g) {
|
|
241
241
|
if (!b()) {
|
|
242
242
|
return null;
|
|
243
243
|
}
|
|
@@ -254,7 +254,7 @@ const na = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
254
254
|
return t;
|
|
255
255
|
};
|
|
256
256
|
const n = new ka(8), r = new ka(8), w = new ka(10), y = new ka(10);
|
|
257
|
-
this.
|
|
257
|
+
this.Ma = function(g, t, q, F, E) {
|
|
258
258
|
if (b()) {
|
|
259
259
|
var v = n.push(g), I = r.push(t);
|
|
260
260
|
if (a.canvas) {
|
|
@@ -266,50 +266,50 @@ const na = "createConicGradient createImageData createLinearGradient createPatte
|
|
|
266
266
|
a.clearColor(0, 0, 0, 0);
|
|
267
267
|
a.clear(a.COLOR_BUFFER_BIT);
|
|
268
268
|
a.enable(a.SCISSOR_TEST);
|
|
269
|
-
q.sort((
|
|
269
|
+
q.sort((D, V) => V.ya - D.ya);
|
|
270
270
|
v = w.push(F);
|
|
271
271
|
m != v && (a.bufferData(a.ARRAY_BUFFER, 8 * v, a.DYNAMIC_DRAW), m = v);
|
|
272
272
|
v = 0;
|
|
273
|
-
for (var
|
|
274
|
-
a.bufferSubData(a.ARRAY_BUFFER, v,
|
|
273
|
+
for (var N of q) {
|
|
274
|
+
a.bufferSubData(a.ARRAY_BUFFER, v, N.ia), v += 4 * N.ia.length;
|
|
275
275
|
}
|
|
276
276
|
console.assert(v == 4 * F);
|
|
277
277
|
for (var R of q) {
|
|
278
|
-
a.bufferSubData(a.ARRAY_BUFFER, v, R.
|
|
278
|
+
a.bufferSubData(a.ARRAY_BUFFER, v, R.Ba), v += 4 * R.Ba.length;
|
|
279
279
|
}
|
|
280
280
|
console.assert(v == 8 * F);
|
|
281
281
|
v = y.push(E);
|
|
282
282
|
h != v && (a.bufferData(a.ELEMENT_ARRAY_BUFFER, 2 * v, a.DYNAMIC_DRAW), h = v);
|
|
283
|
-
|
|
283
|
+
N = 0;
|
|
284
284
|
for (var fa of q) {
|
|
285
|
-
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,
|
|
285
|
+
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER, N, fa.indices), N += 2 * fa.indices.length;
|
|
286
286
|
}
|
|
287
|
-
console.assert(
|
|
287
|
+
console.assert(N == 2 * E);
|
|
288
288
|
fa = 0;
|
|
289
289
|
R = !0;
|
|
290
|
-
v =
|
|
291
|
-
for (const
|
|
292
|
-
|
|
293
|
-
|
|
290
|
+
v = N = 0;
|
|
291
|
+
for (const D of q) {
|
|
292
|
+
D.image.da != fa && (a.bindTexture(a.TEXTURE_2D, D.image.ca || null), fa = D.image.da);
|
|
293
|
+
D.$a ? (a.scissor(D.na, I - D.oa - D.ta, D.lb, D.ta), R = !0) : R && (a.scissor(0, I - t, g, t), R = !1);
|
|
294
294
|
q = 2 / g;
|
|
295
|
-
const
|
|
296
|
-
a.uniform4f(e,
|
|
297
|
-
a.uniform2f(f,
|
|
295
|
+
const V = -2 / t;
|
|
296
|
+
a.uniform4f(e, D.N[0] * q * D.X, D.N[1] * V * D.Y, D.N[2] * q * D.X, D.N[3] * V * D.Y);
|
|
297
|
+
a.uniform2f(f, D.N[4] * q * D.X + q * (D.na - D.Ya * D.X) - 1, D.N[5] * V * D.Y + V * (D.oa - D.Za * D.Y) + 1);
|
|
298
298
|
a.vertexAttribPointer(0, 2, a.FLOAT, !1, 0, v);
|
|
299
299
|
a.vertexAttribPointer(1, 2, a.FLOAT, !1, 0, v + 4 * F);
|
|
300
|
-
a.drawElements(a.TRIANGLES,
|
|
301
|
-
v += 4 *
|
|
302
|
-
|
|
300
|
+
a.drawElements(a.TRIANGLES, D.indices.length, a.UNSIGNED_SHORT, N);
|
|
301
|
+
v += 4 * D.ia.length;
|
|
302
|
+
N += 2 * D.indices.length;
|
|
303
303
|
}
|
|
304
304
|
console.assert(v == 4 * F);
|
|
305
|
-
console.assert(
|
|
305
|
+
console.assert(N == 2 * E);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
};
|
|
309
309
|
this.canvas = function() {
|
|
310
310
|
return b() && a.canvas;
|
|
311
311
|
};
|
|
312
|
-
}(),
|
|
312
|
+
}(), qa = k.onRuntimeInitialized;
|
|
313
313
|
k.onRuntimeInitialized = function() {
|
|
314
314
|
function b(p) {
|
|
315
315
|
switch(p) {
|
|
@@ -351,260 +351,268 @@ k.onRuntimeInitialized = function() {
|
|
|
351
351
|
return "rgba(" + ((16711680 & p) >>> 16) + "," + ((65280 & p) >>> 8) + "," + ((255 & p) >>> 0) + "," + ((4278190080 & p) >>> 24) / 255 + ")";
|
|
352
352
|
}
|
|
353
353
|
function c() {
|
|
354
|
-
0 < I.length && (
|
|
354
|
+
0 < I.length && (pa.Ma(v.drawWidth(), v.drawHeight(), I, N, R), I = [], R = N = 0, v.reset(512, 512));
|
|
355
355
|
for (const p of E) {
|
|
356
|
-
for (const u of p.
|
|
356
|
+
for (const u of p.v) {
|
|
357
357
|
u();
|
|
358
358
|
}
|
|
359
|
-
p.
|
|
359
|
+
p.v = [];
|
|
360
360
|
}
|
|
361
361
|
E.clear();
|
|
362
362
|
}
|
|
363
|
-
|
|
363
|
+
qa && qa();
|
|
364
364
|
var d = k.RenderPaintStyle;
|
|
365
365
|
const e = k.RenderPath, f = k.RenderPaint, m = k.Renderer, h = k.StrokeCap, l = k.StrokeJoin, n = k.BlendMode, r = d.fill, w = d.stroke, y = k.FillRule.evenOdd;
|
|
366
366
|
let g = 1;
|
|
367
|
-
var t = k.RenderImage.extend("CanvasRenderImage", {__construct:function({
|
|
367
|
+
var t = k.RenderImage.extend("CanvasRenderImage", {__construct:function({R:p, W:u} = {}) {
|
|
368
368
|
this.__parent.__construct.call(this);
|
|
369
|
-
this.
|
|
369
|
+
this.da = g;
|
|
370
370
|
g = g + 1 & 2147483647 || 1;
|
|
371
|
-
this.
|
|
372
|
-
this.
|
|
371
|
+
this.R = p;
|
|
372
|
+
this.W = u;
|
|
373
373
|
}, __destruct:function() {
|
|
374
|
-
this.
|
|
374
|
+
this.ca && (pa.Ja(this.ca), URL.revokeObjectURL(this.la));
|
|
375
375
|
this.__parent.__destruct.call(this);
|
|
376
376
|
}, decode:function(p) {
|
|
377
377
|
var u = this;
|
|
378
|
-
u.
|
|
379
|
-
var
|
|
380
|
-
u.
|
|
381
|
-
|
|
382
|
-
u.
|
|
383
|
-
u.
|
|
384
|
-
u.size(
|
|
385
|
-
u.
|
|
386
|
-
};
|
|
387
|
-
|
|
378
|
+
u.W && u.W(u);
|
|
379
|
+
var B = new Image();
|
|
380
|
+
u.la = URL.createObjectURL(new Blob([p], {type:"image/png",}));
|
|
381
|
+
B.onload = function() {
|
|
382
|
+
u.Da = B;
|
|
383
|
+
u.ca = pa.Ia(B);
|
|
384
|
+
u.size(B.width, B.height);
|
|
385
|
+
u.R && u.R(u);
|
|
386
|
+
};
|
|
387
|
+
B.src = u.la;
|
|
388
388
|
},}), q = e.extend("CanvasRenderPath", {__construct:function() {
|
|
389
389
|
this.__parent.__construct.call(this);
|
|
390
|
-
this.
|
|
390
|
+
this.H = new Path2D();
|
|
391
391
|
}, rewind:function() {
|
|
392
|
-
this.
|
|
393
|
-
}, addPath:function(p, u,
|
|
394
|
-
var H = this.
|
|
395
|
-
p = p.
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
392
|
+
this.H = new Path2D();
|
|
393
|
+
}, addPath:function(p, u, B, z, G, C, A) {
|
|
394
|
+
var H = this.H, W = H.addPath;
|
|
395
|
+
p = p.H;
|
|
396
|
+
const L = new DOMMatrix();
|
|
397
|
+
L.a = u;
|
|
398
|
+
L.b = B;
|
|
399
|
+
L.c = z;
|
|
400
|
+
L.d = G;
|
|
401
|
+
L.e = C;
|
|
402
|
+
L.f = A;
|
|
403
|
+
W.call(H, p, L);
|
|
404
404
|
}, fillRule:function(p) {
|
|
405
|
-
this.
|
|
405
|
+
this.ka = p;
|
|
406
406
|
}, moveTo:function(p, u) {
|
|
407
|
-
this.
|
|
407
|
+
this.H.moveTo(p, u);
|
|
408
408
|
}, lineTo:function(p, u) {
|
|
409
|
-
this.
|
|
410
|
-
}, cubicTo:function(p, u,
|
|
411
|
-
this.
|
|
409
|
+
this.H.lineTo(p, u);
|
|
410
|
+
}, cubicTo:function(p, u, B, z, G, C) {
|
|
411
|
+
this.H.bezierCurveTo(p, u, B, z, G, C);
|
|
412
412
|
}, close:function() {
|
|
413
|
-
this.
|
|
413
|
+
this.H.closePath();
|
|
414
414
|
},}), F = f.extend("CanvasRenderPaint", {color:function(p) {
|
|
415
|
-
this.
|
|
415
|
+
this.ma = a(p);
|
|
416
416
|
}, thickness:function(p) {
|
|
417
|
-
this.
|
|
417
|
+
this.Ga = p;
|
|
418
418
|
}, join:function(p) {
|
|
419
419
|
switch(p) {
|
|
420
420
|
case l.miter:
|
|
421
|
-
this.
|
|
421
|
+
this.ba = "miter";
|
|
422
422
|
break;
|
|
423
423
|
case l.round:
|
|
424
|
-
this.
|
|
424
|
+
this.ba = "round";
|
|
425
425
|
break;
|
|
426
426
|
case l.bevel:
|
|
427
|
-
this.
|
|
427
|
+
this.ba = "bevel";
|
|
428
428
|
}
|
|
429
429
|
}, cap:function(p) {
|
|
430
430
|
switch(p) {
|
|
431
431
|
case h.butt:
|
|
432
|
-
this
|
|
432
|
+
this.aa = "butt";
|
|
433
433
|
break;
|
|
434
434
|
case h.round:
|
|
435
|
-
this
|
|
435
|
+
this.aa = "round";
|
|
436
436
|
break;
|
|
437
437
|
case h.square:
|
|
438
|
-
this
|
|
438
|
+
this.aa = "square";
|
|
439
439
|
}
|
|
440
440
|
}, style:function(p) {
|
|
441
|
-
this.
|
|
441
|
+
this.Fa = p;
|
|
442
442
|
}, blendMode:function(p) {
|
|
443
|
-
this.
|
|
443
|
+
this.Ca = b(p);
|
|
444
444
|
}, clearGradient:function() {
|
|
445
|
-
this.
|
|
446
|
-
}, linearGradient:function(p, u,
|
|
447
|
-
this.
|
|
448
|
-
}, radialGradient:function(p, u,
|
|
449
|
-
this.
|
|
445
|
+
this.P = null;
|
|
446
|
+
}, linearGradient:function(p, u, B, z) {
|
|
447
|
+
this.P = {za:p, Aa:u, qa:B, ra:z, ga:[],};
|
|
448
|
+
}, radialGradient:function(p, u, B, z) {
|
|
449
|
+
this.P = {za:p, Aa:u, qa:B, ra:z, ga:[], Wa:!0,};
|
|
450
450
|
}, addStop:function(p, u) {
|
|
451
|
-
this.
|
|
451
|
+
this.P.ga.push({color:p, stop:u,});
|
|
452
452
|
}, completeGradient:function() {
|
|
453
|
-
}, draw:function(p, u,
|
|
454
|
-
let
|
|
455
|
-
var
|
|
456
|
-
p.globalCompositeOperation =
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
453
|
+
}, draw:function(p, u, B, z) {
|
|
454
|
+
let G = this.Fa;
|
|
455
|
+
var C = this.ma, A = this.P;
|
|
456
|
+
const H = p.globalCompositeOperation, W = p.globalAlpha;
|
|
457
|
+
p.globalCompositeOperation = this.Ca;
|
|
458
|
+
p.globalAlpha = z;
|
|
459
|
+
if (null != A) {
|
|
460
|
+
C = A.za;
|
|
461
|
+
const S = A.Aa, M = A.qa;
|
|
462
|
+
var L = A.ra;
|
|
463
|
+
z = A.ga;
|
|
464
|
+
A.Wa ? (A = M - C, L -= S, C = p.createRadialGradient(C, S, 0, C, S, Math.sqrt(A * A + L * L))) : C = p.createLinearGradient(C, S, M, L);
|
|
465
|
+
for (let ma = 0, Ha = z.length; ma < Ha; ma++) {
|
|
466
|
+
A = z[ma], C.addColorStop(A.stop, a(A.color));
|
|
466
467
|
}
|
|
467
|
-
this.
|
|
468
|
-
this.
|
|
468
|
+
this.ma = C;
|
|
469
|
+
this.P = null;
|
|
469
470
|
}
|
|
470
|
-
switch(
|
|
471
|
+
switch(G) {
|
|
471
472
|
case w:
|
|
472
|
-
p.strokeStyle =
|
|
473
|
-
p.lineWidth = this.
|
|
474
|
-
p.lineCap = this
|
|
475
|
-
p.lineJoin = this.
|
|
473
|
+
p.strokeStyle = C;
|
|
474
|
+
p.lineWidth = this.Ga;
|
|
475
|
+
p.lineCap = this.aa;
|
|
476
|
+
p.lineJoin = this.ba;
|
|
476
477
|
p.stroke(u);
|
|
477
478
|
break;
|
|
478
479
|
case r:
|
|
479
|
-
p.fillStyle =
|
|
480
|
+
p.fillStyle = C, p.fill(u, B);
|
|
480
481
|
}
|
|
482
|
+
p.globalCompositeOperation = H;
|
|
483
|
+
p.globalAlpha = W;
|
|
481
484
|
},});
|
|
482
485
|
const E = new Set();
|
|
483
|
-
let v = null, I = [],
|
|
486
|
+
let v = null, I = [], N = 0, R = 0;
|
|
484
487
|
var fa = k.CanvasRenderer = m.extend("Renderer", {__construct:function(p) {
|
|
485
488
|
this.__parent.__construct.call(this);
|
|
486
|
-
this.
|
|
489
|
+
this.G = [1, 0, 0, 1, 0, 0];
|
|
490
|
+
this.u = [1.0];
|
|
487
491
|
this.m = p.getContext("2d");
|
|
488
|
-
this.
|
|
489
|
-
this.
|
|
492
|
+
this.ja = p;
|
|
493
|
+
this.v = [];
|
|
490
494
|
}, save:function() {
|
|
491
|
-
this.
|
|
492
|
-
this.u.push(this.
|
|
495
|
+
this.G.push(...this.G.slice(this.G.length - 6));
|
|
496
|
+
this.u.push(this.u[this.u.length - 1]);
|
|
497
|
+
this.v.push(this.m.save.bind(this.m));
|
|
493
498
|
}, restore:function() {
|
|
494
|
-
const p = this.
|
|
499
|
+
const p = this.G.length - 6;
|
|
495
500
|
if (6 > p) {
|
|
496
501
|
throw "restore() called without matching save().";
|
|
497
502
|
}
|
|
498
|
-
this.
|
|
499
|
-
this.u.
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
503
|
+
this.G.splice(p);
|
|
504
|
+
this.u.pop();
|
|
505
|
+
this.v.push(this.m.restore.bind(this.m));
|
|
506
|
+
}, transform:function(p, u, B, z, G, C) {
|
|
507
|
+
const A = this.G, H = A.length - 6;
|
|
508
|
+
A.splice(H, 6, A[H] * p + A[H + 2] * u, A[H + 1] * p + A[H + 3] * u, A[H] * B + A[H + 2] * z, A[H + 1] * B + A[H + 3] * z, A[H] * G + A[H + 2] * C + A[H + 4], A[H + 1] * G + A[H + 3] * C + A[H + 5]);
|
|
509
|
+
this.v.push(this.m.transform.bind(this.m, p, u, B, z, G, C));
|
|
504
510
|
}, rotate:function(p) {
|
|
505
511
|
const u = Math.sin(p);
|
|
506
512
|
p = Math.cos(p);
|
|
507
513
|
this.transform(p, u, -u, p, 0, 0);
|
|
514
|
+
}, modulateOpacity:function(p) {
|
|
515
|
+
this.u[this.u.length - 1] *= p;
|
|
508
516
|
}, _drawPath:function(p, u) {
|
|
509
|
-
this.
|
|
510
|
-
}, _drawRiveImage:function(p, u,
|
|
511
|
-
var
|
|
512
|
-
if (
|
|
513
|
-
var
|
|
514
|
-
this.
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
517
|
+
this.v.push(u.draw.bind(u, this.m, p.H, p.ka === y ? "evenodd" : "nonzero", Math.max(0, this.u[this.u.length - 1])));
|
|
518
|
+
}, _drawRiveImage:function(p, u, B, z) {
|
|
519
|
+
var G = p.Da;
|
|
520
|
+
if (G) {
|
|
521
|
+
var C = this.m, A = b(B), H = Math.max(0, z * this.u[this.u.length - 1]);
|
|
522
|
+
this.v.push(function() {
|
|
523
|
+
C.globalCompositeOperation = A;
|
|
524
|
+
C.globalAlpha = H;
|
|
525
|
+
C.drawImage(G, 0, 0);
|
|
526
|
+
C.globalAlpha = 1;
|
|
519
527
|
});
|
|
520
528
|
}
|
|
521
529
|
}, _getMatrix:function(p) {
|
|
522
|
-
const u = this.
|
|
523
|
-
for (let
|
|
524
|
-
p[
|
|
530
|
+
const u = this.G, B = u.length - 6;
|
|
531
|
+
for (let z = 0; 6 > z; ++z) {
|
|
532
|
+
p[z] = u[B + z];
|
|
525
533
|
}
|
|
526
|
-
}, _drawImageMesh:function(p, u,
|
|
534
|
+
}, _drawImageMesh:function(p, u, B, z, G, C, A, H, W, L, S) {
|
|
527
535
|
u = this.m.canvas.width;
|
|
528
|
-
var
|
|
529
|
-
const
|
|
536
|
+
var M = this.m.canvas.height;
|
|
537
|
+
const ma = L - H, Ha = S - W;
|
|
530
538
|
H = Math.max(H, 0);
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
const
|
|
535
|
-
console.assert(
|
|
536
|
-
console.assert(
|
|
537
|
-
if (!(0 >=
|
|
538
|
-
|
|
539
|
-
u =
|
|
540
|
-
var ha = Math.ceil(
|
|
541
|
-
|
|
542
|
-
ha >
|
|
543
|
-
ia >
|
|
544
|
-
v || (v = new k.DynamicRectanizer(
|
|
545
|
-
|
|
546
|
-
0 >
|
|
547
|
-
var tb =
|
|
548
|
-
I.push({
|
|
549
|
-
|
|
550
|
-
R +=
|
|
551
|
-
var
|
|
552
|
-
this.
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
const vb =
|
|
558
|
-
vb &&
|
|
559
|
-
|
|
539
|
+
W = Math.max(W, 0);
|
|
540
|
+
L = Math.min(L, u);
|
|
541
|
+
S = Math.min(S, M);
|
|
542
|
+
const ua = L - H, va = S - W;
|
|
543
|
+
console.assert(ua <= Math.min(ma, u));
|
|
544
|
+
console.assert(va <= Math.min(Ha, M));
|
|
545
|
+
if (!(0 >= ua || 0 >= va)) {
|
|
546
|
+
L = ua < ma || va < Ha;
|
|
547
|
+
u = S = 1;
|
|
548
|
+
var ha = Math.ceil(ua * S), ia = Math.ceil(va * u);
|
|
549
|
+
M = pa.Xa();
|
|
550
|
+
ha > M && (S *= M / ha, ha = M);
|
|
551
|
+
ia > M && (u *= M / ia, ia = M);
|
|
552
|
+
v || (v = new k.DynamicRectanizer(M), v.reset(512, 512));
|
|
553
|
+
M = v.addRect(ha, ia);
|
|
554
|
+
0 > M && (c(), E.add(this), M = v.addRect(ha, ia), console.assert(0 <= M));
|
|
555
|
+
var tb = M & 65535, ub = M >> 16;
|
|
556
|
+
I.push({N:this.G.slice(this.G.length - 6), image:p, na:tb, oa:ub, Ya:H, Za:W, lb:ha, ta:ia, X:S, Y:u, ia:new Float32Array(G), Ba:new Float32Array(C), indices:new Uint16Array(A), $a:L, ya:p.da << 1 | (L ? 1 : 0),});
|
|
557
|
+
N += G.length;
|
|
558
|
+
R += A.length;
|
|
559
|
+
var na = this.m, lc = b(B), mc = Math.max(0, z * this.u[this.u.length - 1]);
|
|
560
|
+
this.v.push(function() {
|
|
561
|
+
na.save();
|
|
562
|
+
na.resetTransform();
|
|
563
|
+
na.globalCompositeOperation = lc;
|
|
564
|
+
na.globalAlpha = mc;
|
|
565
|
+
const vb = pa.canvas();
|
|
566
|
+
vb && na.drawImage(vb, tb, ub, ha, ia, H, W, ua, va);
|
|
567
|
+
na.restore();
|
|
560
568
|
});
|
|
561
569
|
}
|
|
562
570
|
}, _clipPath:function(p) {
|
|
563
|
-
this.
|
|
571
|
+
this.v.push(this.m.clip.bind(this.m, p.H, p.ka === y ? "evenodd" : "nonzero"));
|
|
564
572
|
}, clear:function() {
|
|
565
573
|
E.add(this);
|
|
566
|
-
this.
|
|
574
|
+
this.v.push(this.m.clearRect.bind(this.m, 0, 0, this.ja.width, this.ja.height));
|
|
567
575
|
}, flush:function() {
|
|
568
576
|
}, translate:function(p, u) {
|
|
569
577
|
this.transform(1, 0, 0, 1, p, u);
|
|
570
578
|
},});
|
|
571
579
|
k.makeRenderer = function(p) {
|
|
572
|
-
const u = new fa(p),
|
|
573
|
-
return new Proxy(u, {get(
|
|
574
|
-
if ("function" === typeof
|
|
575
|
-
return function(...
|
|
576
|
-
return
|
|
580
|
+
const u = new fa(p), B = u.m;
|
|
581
|
+
return new Proxy(u, {get(z, G) {
|
|
582
|
+
if ("function" === typeof z[G]) {
|
|
583
|
+
return function(...C) {
|
|
584
|
+
return z[G].apply(z, C);
|
|
577
585
|
};
|
|
578
586
|
}
|
|
579
|
-
if ("function" === typeof
|
|
580
|
-
if (-1 <
|
|
581
|
-
throw Error("RiveException: Method call to '" +
|
|
587
|
+
if ("function" === typeof B[G]) {
|
|
588
|
+
if (-1 < oa.indexOf(G)) {
|
|
589
|
+
throw Error("RiveException: Method call to '" + G + "()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");
|
|
582
590
|
}
|
|
583
|
-
return function(...
|
|
584
|
-
u.
|
|
591
|
+
return function(...C) {
|
|
592
|
+
u.v.push(B[G].bind(B, ...C));
|
|
585
593
|
};
|
|
586
594
|
}
|
|
587
|
-
return
|
|
588
|
-
}, set(
|
|
589
|
-
if (
|
|
590
|
-
return u.
|
|
591
|
-
|
|
595
|
+
return z[G];
|
|
596
|
+
}, set(z, G, C) {
|
|
597
|
+
if (G in B) {
|
|
598
|
+
return u.v.push(() => {
|
|
599
|
+
B[G] = C;
|
|
592
600
|
}), !0;
|
|
593
601
|
}
|
|
594
602
|
},});
|
|
595
603
|
};
|
|
596
604
|
k.decodeImage = function(p, u) {
|
|
597
|
-
(new t({
|
|
605
|
+
(new t({R:u})).decode(p);
|
|
598
606
|
};
|
|
599
607
|
k.renderFactory = {makeRenderPaint:function() {
|
|
600
608
|
return new F();
|
|
601
609
|
}, makeRenderPath:function() {
|
|
602
610
|
return new q();
|
|
603
611
|
}, makeRenderImage:function() {
|
|
604
|
-
let p =
|
|
605
|
-
return new t({
|
|
612
|
+
let p = V;
|
|
613
|
+
return new t({W:() => {
|
|
606
614
|
p.total++;
|
|
607
|
-
},
|
|
615
|
+
}, R:() => {
|
|
608
616
|
p.loaded++;
|
|
609
617
|
if (p.loaded === p.total) {
|
|
610
618
|
const u = p.ready;
|
|
@@ -612,45 +620,45 @@ k.onRuntimeInitialized = function() {
|
|
|
612
620
|
}
|
|
613
621
|
},});
|
|
614
622
|
},};
|
|
615
|
-
let
|
|
616
|
-
k.load = function(p, u,
|
|
617
|
-
const
|
|
618
|
-
void 0 !== u &&
|
|
619
|
-
|
|
620
|
-
return new Promise(function(
|
|
621
|
-
let
|
|
622
|
-
|
|
623
|
-
|
|
623
|
+
let D = k.load, V = null;
|
|
624
|
+
k.load = function(p, u, B = !0) {
|
|
625
|
+
const z = new k.FallbackFileAssetLoader();
|
|
626
|
+
void 0 !== u && z.addLoader(u);
|
|
627
|
+
B && (u = new k.CDNFileAssetLoader(), z.addLoader(u));
|
|
628
|
+
return new Promise(function(G) {
|
|
629
|
+
let C = null;
|
|
630
|
+
V = {total:0, loaded:0, ready:function() {
|
|
631
|
+
G(C);
|
|
624
632
|
},};
|
|
625
|
-
|
|
626
|
-
0 ==
|
|
633
|
+
C = D(p, z);
|
|
634
|
+
0 == V.total && G(C);
|
|
627
635
|
});
|
|
628
636
|
};
|
|
629
|
-
let
|
|
630
|
-
k.RendererWrapper.prototype.align = function(p, u,
|
|
631
|
-
|
|
637
|
+
let nc = k.RendererWrapper.prototype.align;
|
|
638
|
+
k.RendererWrapper.prototype.align = function(p, u, B, z, G = 1.0) {
|
|
639
|
+
nc.call(this, p, u, B, z, G);
|
|
632
640
|
};
|
|
633
641
|
d = new ja();
|
|
634
642
|
k.requestAnimationFrame = d.requestAnimationFrame.bind(d);
|
|
635
643
|
k.cancelAnimationFrame = d.cancelAnimationFrame.bind(d);
|
|
636
|
-
k.enableFPSCounter = d.
|
|
637
|
-
k.disableFPSCounter = d.
|
|
638
|
-
d.
|
|
644
|
+
k.enableFPSCounter = d.Na.bind(d);
|
|
645
|
+
k.disableFPSCounter = d.Ka;
|
|
646
|
+
d.va = c;
|
|
639
647
|
k.resolveAnimationFrame = c;
|
|
640
648
|
k.cleanup = function() {
|
|
641
649
|
v && v.delete();
|
|
642
650
|
};
|
|
643
651
|
};
|
|
644
|
-
var
|
|
652
|
+
var ra = Object.assign({}, k), sa = "./this.program", x = "", ta, wa;
|
|
645
653
|
if (da || ea) {
|
|
646
|
-
ea ? x = self.location.href : "undefined" != typeof document && document.currentScript && (x = document.currentScript.src), _scriptName && (x = _scriptName), x.startsWith("blob:") ? x = "" : x = x.substr(0, x.replace(/[?#].*/, "").lastIndexOf("/") + 1), ea && (
|
|
654
|
+
ea ? x = self.location.href : "undefined" != typeof document && document.currentScript && (x = document.currentScript.src), _scriptName && (x = _scriptName), x.startsWith("blob:") ? x = "" : x = x.substr(0, x.replace(/[?#].*/, "").lastIndexOf("/") + 1), ea && (wa = b => {
|
|
647
655
|
var a = new XMLHttpRequest();
|
|
648
656
|
a.open("GET", b, !1);
|
|
649
657
|
a.responseType = "arraybuffer";
|
|
650
658
|
a.send(null);
|
|
651
659
|
return new Uint8Array(a.response);
|
|
652
|
-
}),
|
|
653
|
-
if (
|
|
660
|
+
}), ta = (b, a, c) => {
|
|
661
|
+
if (xa(b)) {
|
|
654
662
|
var d = new XMLHttpRequest();
|
|
655
663
|
d.open("GET", b, !0);
|
|
656
664
|
d.responseType = "arraybuffer";
|
|
@@ -664,84 +672,84 @@ if (da || ea) {
|
|
|
664
672
|
}
|
|
665
673
|
};
|
|
666
674
|
}
|
|
667
|
-
var
|
|
668
|
-
Object.assign(k,
|
|
669
|
-
|
|
670
|
-
k.thisProgram && (
|
|
671
|
-
var
|
|
672
|
-
k.wasmBinary && (
|
|
673
|
-
var
|
|
674
|
-
function
|
|
675
|
-
var b =
|
|
676
|
-
k.HEAP8 =
|
|
677
|
-
k.HEAP16 =
|
|
675
|
+
var ya = k.print || console.log.bind(console), za = k.printErr || console.error.bind(console);
|
|
676
|
+
Object.assign(k, ra);
|
|
677
|
+
ra = null;
|
|
678
|
+
k.thisProgram && (sa = k.thisProgram);
|
|
679
|
+
var Aa;
|
|
680
|
+
k.wasmBinary && (Aa = k.wasmBinary);
|
|
681
|
+
var Ba, Ca = !1, Da, J, Ea, Fa, K, O, Ga, Ia;
|
|
682
|
+
function Ja() {
|
|
683
|
+
var b = Ba.buffer;
|
|
684
|
+
k.HEAP8 = Da = new Int8Array(b);
|
|
685
|
+
k.HEAP16 = Ea = new Int16Array(b);
|
|
678
686
|
k.HEAPU8 = J = new Uint8Array(b);
|
|
679
|
-
k.HEAPU16 =
|
|
687
|
+
k.HEAPU16 = Fa = new Uint16Array(b);
|
|
680
688
|
k.HEAP32 = K = new Int32Array(b);
|
|
681
689
|
k.HEAPU32 = O = new Uint32Array(b);
|
|
682
|
-
k.HEAPF32 =
|
|
683
|
-
k.HEAPF64 =
|
|
690
|
+
k.HEAPF32 = Ga = new Float32Array(b);
|
|
691
|
+
k.HEAPF64 = Ia = new Float64Array(b);
|
|
684
692
|
}
|
|
685
|
-
var
|
|
686
|
-
function
|
|
693
|
+
var Ka = [], La = [], Ma = [];
|
|
694
|
+
function Na() {
|
|
687
695
|
var b = k.preRun.shift();
|
|
688
|
-
|
|
696
|
+
Ka.unshift(b);
|
|
689
697
|
}
|
|
690
|
-
var
|
|
691
|
-
function
|
|
698
|
+
var Oa = 0, Pa = null, Qa = null;
|
|
699
|
+
function Ra(b) {
|
|
692
700
|
k.onAbort?.(b);
|
|
693
701
|
b = "Aborted(" + b + ")";
|
|
694
|
-
|
|
695
|
-
|
|
702
|
+
za(b);
|
|
703
|
+
Ca = !0;
|
|
696
704
|
b = new WebAssembly.RuntimeError(b + ". Build with -sASSERTIONS for more info.");
|
|
697
705
|
ba(b);
|
|
698
706
|
throw b;
|
|
699
707
|
}
|
|
700
|
-
var
|
|
701
|
-
function
|
|
702
|
-
if (b ==
|
|
703
|
-
return new Uint8Array(
|
|
708
|
+
var Sa = b => b.startsWith("data:application/octet-stream;base64,"), xa = b => b.startsWith("file://"), Ta;
|
|
709
|
+
function Ua(b) {
|
|
710
|
+
if (b == Ta && Aa) {
|
|
711
|
+
return new Uint8Array(Aa);
|
|
704
712
|
}
|
|
705
|
-
if (
|
|
706
|
-
return
|
|
713
|
+
if (wa) {
|
|
714
|
+
return wa(b);
|
|
707
715
|
}
|
|
708
716
|
throw "both async and sync fetching of the wasm failed";
|
|
709
717
|
}
|
|
710
|
-
function
|
|
711
|
-
return
|
|
712
|
-
|
|
718
|
+
function Va(b) {
|
|
719
|
+
return Aa ? Promise.resolve().then(() => Ua(b)) : new Promise((a, c) => {
|
|
720
|
+
ta(b, d => a(new Uint8Array(d)), () => {
|
|
713
721
|
try {
|
|
714
|
-
a(
|
|
722
|
+
a(Ua(b));
|
|
715
723
|
} catch (d) {
|
|
716
724
|
c(d);
|
|
717
725
|
}
|
|
718
726
|
});
|
|
719
727
|
});
|
|
720
728
|
}
|
|
721
|
-
function
|
|
722
|
-
return
|
|
723
|
-
|
|
724
|
-
|
|
729
|
+
function Wa(b, a, c) {
|
|
730
|
+
return Va(b).then(d => WebAssembly.instantiate(d, a)).then(c, d => {
|
|
731
|
+
za(`failed to asynchronously prepare wasm: ${d}`);
|
|
732
|
+
Ra(d);
|
|
725
733
|
});
|
|
726
734
|
}
|
|
727
|
-
function
|
|
728
|
-
var c =
|
|
729
|
-
return
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
return
|
|
735
|
+
function Xa(b, a) {
|
|
736
|
+
var c = Ta;
|
|
737
|
+
return Aa || "function" != typeof WebAssembly.instantiateStreaming || Sa(c) || xa(c) || "function" != typeof fetch ? Wa(c, b, a) : fetch(c, {credentials:"same-origin"}).then(d => WebAssembly.instantiateStreaming(d, b).then(a, function(e) {
|
|
738
|
+
za(`wasm streaming compile failed: ${e}`);
|
|
739
|
+
za("falling back to ArrayBuffer instantiation");
|
|
740
|
+
return Wa(c, b, a);
|
|
733
741
|
}));
|
|
734
742
|
}
|
|
735
|
-
var
|
|
743
|
+
var Ya = b => {
|
|
736
744
|
for (; 0 < b.length;) {
|
|
737
745
|
b.shift()(k);
|
|
738
746
|
}
|
|
739
|
-
},
|
|
747
|
+
}, Za = (b, a) => Object.defineProperty(a, "name", {value:b}), $a = [], P = [], Q, T = b => {
|
|
740
748
|
if (!b) {
|
|
741
749
|
throw new Q("Cannot use deleted val. handle = " + b);
|
|
742
750
|
}
|
|
743
751
|
return P[b];
|
|
744
|
-
},
|
|
752
|
+
}, ab = b => {
|
|
745
753
|
switch(b) {
|
|
746
754
|
case void 0:
|
|
747
755
|
return 2;
|
|
@@ -752,13 +760,13 @@ var Wa = b => {
|
|
|
752
760
|
case !1:
|
|
753
761
|
return 8;
|
|
754
762
|
default:
|
|
755
|
-
const a =
|
|
763
|
+
const a = $a.pop() || P.length;
|
|
756
764
|
P[a] = b;
|
|
757
765
|
P[a + 1] = 1;
|
|
758
766
|
return a;
|
|
759
767
|
}
|
|
760
|
-
},
|
|
761
|
-
var a = Error, c =
|
|
768
|
+
}, bb = b => {
|
|
769
|
+
var a = Error, c = Za(b, function(d) {
|
|
762
770
|
this.name = b;
|
|
763
771
|
this.message = d;
|
|
764
772
|
d = Error(d).stack;
|
|
@@ -770,54 +778,54 @@ var Wa = b => {
|
|
|
770
778
|
return void 0 === this.message ? this.name : `${this.name}: ${this.message}`;
|
|
771
779
|
};
|
|
772
780
|
return c;
|
|
773
|
-
},
|
|
781
|
+
}, cb, db, U = b => {
|
|
774
782
|
for (var a = ""; J[b];) {
|
|
775
|
-
a +=
|
|
783
|
+
a += db[J[b++]];
|
|
776
784
|
}
|
|
777
785
|
return a;
|
|
778
|
-
},
|
|
779
|
-
for (;
|
|
780
|
-
var b =
|
|
781
|
-
b.g.
|
|
786
|
+
}, eb = [], fb = () => {
|
|
787
|
+
for (; eb.length;) {
|
|
788
|
+
var b = eb.pop();
|
|
789
|
+
b.g.M = !1;
|
|
782
790
|
b["delete"]();
|
|
783
791
|
}
|
|
784
|
-
},
|
|
792
|
+
}, gb, hb = {}, ib = (b, a) => {
|
|
785
793
|
if (void 0 === a) {
|
|
786
794
|
throw new Q("ptr should not be undefined");
|
|
787
795
|
}
|
|
788
796
|
for (; b.o;) {
|
|
789
|
-
a = b.
|
|
797
|
+
a = b.S(a), b = b.o;
|
|
790
798
|
}
|
|
791
799
|
return a;
|
|
792
|
-
},
|
|
793
|
-
b =
|
|
794
|
-
var a =
|
|
795
|
-
|
|
800
|
+
}, jb = {}, mb = b => {
|
|
801
|
+
b = kb(b);
|
|
802
|
+
var a = U(b);
|
|
803
|
+
lb(b);
|
|
796
804
|
return a;
|
|
797
|
-
},
|
|
798
|
-
var c =
|
|
805
|
+
}, nb = (b, a) => {
|
|
806
|
+
var c = jb[b];
|
|
799
807
|
if (void 0 === c) {
|
|
800
|
-
throw b = `${a} has unknown type ${
|
|
808
|
+
throw b = `${a} has unknown type ${mb(b)}`, new Q(b);
|
|
801
809
|
}
|
|
802
810
|
return c;
|
|
803
|
-
},
|
|
804
|
-
},
|
|
811
|
+
}, ob = () => {
|
|
812
|
+
}, pb = !1, qb = (b, a, c) => {
|
|
805
813
|
if (a === c) {
|
|
806
814
|
return b;
|
|
807
815
|
}
|
|
808
816
|
if (void 0 === c.o) {
|
|
809
817
|
return null;
|
|
810
818
|
}
|
|
811
|
-
b =
|
|
812
|
-
return null === b ? null : c.
|
|
813
|
-
},
|
|
814
|
-
a =
|
|
815
|
-
return
|
|
819
|
+
b = qb(b, a, c.o);
|
|
820
|
+
return null === b ? null : c.La(b);
|
|
821
|
+
}, rb = {}, sb = (b, a) => {
|
|
822
|
+
a = ib(b, a);
|
|
823
|
+
return hb[a];
|
|
816
824
|
}, wb, yb = (b, a) => {
|
|
817
825
|
if (!a.j || !a.i) {
|
|
818
826
|
throw new wb("makeClassHandle requires ptr and ptrType");
|
|
819
827
|
}
|
|
820
|
-
if (!!a.
|
|
828
|
+
if (!!a.A !== !!a.s) {
|
|
821
829
|
throw new wb("Both smartPtrType and smartPtr must be specified");
|
|
822
830
|
}
|
|
823
831
|
a.count = {value:1};
|
|
@@ -826,18 +834,18 @@ var Wa = b => {
|
|
|
826
834
|
if ("undefined" === typeof FinalizationRegistry) {
|
|
827
835
|
return xb = a => a, b;
|
|
828
836
|
}
|
|
829
|
-
|
|
837
|
+
pb = new FinalizationRegistry(a => {
|
|
830
838
|
a = a.g;
|
|
831
839
|
--a.count.value;
|
|
832
|
-
0 === a.count.value && (a.s ? a.
|
|
840
|
+
0 === a.count.value && (a.s ? a.A.D(a.s) : a.j.h.D(a.i));
|
|
833
841
|
});
|
|
834
842
|
xb = a => {
|
|
835
843
|
var c = a.g;
|
|
836
|
-
c.s &&
|
|
844
|
+
c.s && pb.register(a, {g:c}, a);
|
|
837
845
|
return a;
|
|
838
846
|
};
|
|
839
|
-
|
|
840
|
-
|
|
847
|
+
ob = a => {
|
|
848
|
+
pb.unregister(a);
|
|
841
849
|
};
|
|
842
850
|
return xb(b);
|
|
843
851
|
}, zb = {}, Ab = b => {
|
|
@@ -864,8 +872,8 @@ var Cb = {}, Db = {}, X = (b, a, c) => {
|
|
|
864
872
|
});
|
|
865
873
|
var e = Array(a.length), f = [], m = 0;
|
|
866
874
|
a.forEach((h, l) => {
|
|
867
|
-
|
|
868
|
-
e[l] =
|
|
875
|
+
jb.hasOwnProperty(h) ? e[l] = jb[h] : (f.push(h), Cb.hasOwnProperty(h) || (Cb[h] = []), Cb[h].push(() => {
|
|
876
|
+
e[l] = jb[h];
|
|
869
877
|
++m;
|
|
870
878
|
m === f.length && d(e);
|
|
871
879
|
}));
|
|
@@ -877,13 +885,13 @@ function Fb(b, a, c = {}) {
|
|
|
877
885
|
if (!b) {
|
|
878
886
|
throw new Q(`type "${d}" must have a positive integer typeid pointer`);
|
|
879
887
|
}
|
|
880
|
-
if (
|
|
881
|
-
if (c.
|
|
888
|
+
if (jb.hasOwnProperty(b)) {
|
|
889
|
+
if (c.Va) {
|
|
882
890
|
return;
|
|
883
891
|
}
|
|
884
892
|
throw new Q(`Cannot register type '${d}' twice`);
|
|
885
893
|
}
|
|
886
|
-
|
|
894
|
+
jb[b] = a;
|
|
887
895
|
delete Db[b];
|
|
888
896
|
Cb.hasOwnProperty(b) && (a = Cb[b], delete Cb[b], a.forEach(e => e()));
|
|
889
897
|
}
|
|
@@ -908,7 +916,7 @@ var Ib = (b, a, c) => {
|
|
|
908
916
|
return b[a].l[e.length].apply(this, e);
|
|
909
917
|
};
|
|
910
918
|
b[a].l = [];
|
|
911
|
-
b[a].l[d.
|
|
919
|
+
b[a].l[d.L] = d;
|
|
912
920
|
}
|
|
913
921
|
}, Jb = (b, a, c) => {
|
|
914
922
|
if (k.hasOwnProperty(b)) {
|
|
@@ -921,7 +929,7 @@ var Ib = (b, a, c) => {
|
|
|
921
929
|
}
|
|
922
930
|
k[b].l[c] = a;
|
|
923
931
|
} else {
|
|
924
|
-
k[b] = a, void 0 !== c && (k[b].
|
|
932
|
+
k[b] = a, void 0 !== c && (k[b].nb = c);
|
|
925
933
|
}
|
|
926
934
|
}, Kb = b => {
|
|
927
935
|
if (void 0 === b) {
|
|
@@ -934,27 +942,27 @@ var Ib = (b, a, c) => {
|
|
|
934
942
|
function Lb(b, a, c, d, e, f, m, h) {
|
|
935
943
|
this.name = b;
|
|
936
944
|
this.constructor = a;
|
|
937
|
-
this.
|
|
938
|
-
this.
|
|
945
|
+
this.C = c;
|
|
946
|
+
this.D = d;
|
|
939
947
|
this.o = e;
|
|
940
|
-
this.
|
|
941
|
-
this.
|
|
942
|
-
this.
|
|
943
|
-
this.
|
|
948
|
+
this.Qa = f;
|
|
949
|
+
this.S = m;
|
|
950
|
+
this.La = h;
|
|
951
|
+
this.wa = [];
|
|
944
952
|
}
|
|
945
953
|
var Mb = (b, a, c) => {
|
|
946
954
|
for (; a !== c;) {
|
|
947
|
-
if (!a.
|
|
955
|
+
if (!a.S) {
|
|
948
956
|
throw new Q(`Expected null or instance of ${c.name}, got an instance of ${a.name}`);
|
|
949
957
|
}
|
|
950
|
-
b = a.
|
|
958
|
+
b = a.S(b);
|
|
951
959
|
a = a.o;
|
|
952
960
|
}
|
|
953
961
|
return b;
|
|
954
962
|
};
|
|
955
963
|
function Nb(b, a) {
|
|
956
964
|
if (null === a) {
|
|
957
|
-
if (this.
|
|
965
|
+
if (this.ea) {
|
|
958
966
|
throw new Q(`null is not a valid ${this.name}`);
|
|
959
967
|
}
|
|
960
968
|
return 0;
|
|
@@ -969,12 +977,12 @@ function Nb(b, a) {
|
|
|
969
977
|
}
|
|
970
978
|
function Pb(b, a) {
|
|
971
979
|
if (null === a) {
|
|
972
|
-
if (this.
|
|
980
|
+
if (this.ea) {
|
|
973
981
|
throw new Q(`null is not a valid ${this.name}`);
|
|
974
982
|
}
|
|
975
|
-
if (this.
|
|
976
|
-
var c = this.
|
|
977
|
-
null !== b && b.push(this.
|
|
983
|
+
if (this.V) {
|
|
984
|
+
var c = this.fa();
|
|
985
|
+
null !== b && b.push(this.D, c);
|
|
978
986
|
return c;
|
|
979
987
|
}
|
|
980
988
|
return 0;
|
|
@@ -985,32 +993,32 @@ function Pb(b, a) {
|
|
|
985
993
|
if (!a.g.i) {
|
|
986
994
|
throw new Q(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
987
995
|
}
|
|
988
|
-
if (!this.
|
|
989
|
-
throw new Q(`Cannot convert argument of type ${a.g.
|
|
996
|
+
if (!this.U && a.g.j.U) {
|
|
997
|
+
throw new Q(`Cannot convert argument of type ${a.g.A ? a.g.A.name : a.g.j.name} to parameter type ${this.name}`);
|
|
990
998
|
}
|
|
991
999
|
c = Mb(a.g.i, a.g.j.h, this.h);
|
|
992
|
-
if (this.
|
|
1000
|
+
if (this.V) {
|
|
993
1001
|
if (void 0 === a.g.s) {
|
|
994
1002
|
throw new Q("Passing raw pointer to smart pointer is illegal");
|
|
995
1003
|
}
|
|
996
|
-
switch(this.
|
|
1004
|
+
switch(this.gb) {
|
|
997
1005
|
case 0:
|
|
998
|
-
if (a.g.
|
|
1006
|
+
if (a.g.A === this) {
|
|
999
1007
|
c = a.g.s;
|
|
1000
1008
|
} else {
|
|
1001
|
-
throw new Q(`Cannot convert argument of type ${a.g.
|
|
1009
|
+
throw new Q(`Cannot convert argument of type ${a.g.A ? a.g.A.name : a.g.j.name} to parameter type ${this.name}`);
|
|
1002
1010
|
}
|
|
1003
1011
|
break;
|
|
1004
1012
|
case 1:
|
|
1005
1013
|
c = a.g.s;
|
|
1006
1014
|
break;
|
|
1007
1015
|
case 2:
|
|
1008
|
-
if (a.g.
|
|
1016
|
+
if (a.g.A === this) {
|
|
1009
1017
|
c = a.g.s;
|
|
1010
1018
|
} else {
|
|
1011
1019
|
var d = a.clone();
|
|
1012
|
-
c = this.
|
|
1013
|
-
null !== b && b.push(this.
|
|
1020
|
+
c = this.bb(c, ab(() => d["delete"]()));
|
|
1021
|
+
null !== b && b.push(this.D, c);
|
|
1014
1022
|
}
|
|
1015
1023
|
break;
|
|
1016
1024
|
default:
|
|
@@ -1021,7 +1029,7 @@ function Pb(b, a) {
|
|
|
1021
1029
|
}
|
|
1022
1030
|
function Qb(b, a) {
|
|
1023
1031
|
if (null === a) {
|
|
1024
|
-
if (this.
|
|
1032
|
+
if (this.ea) {
|
|
1025
1033
|
throw new Q(`null is not a valid ${this.name}`);
|
|
1026
1034
|
}
|
|
1027
1035
|
return 0;
|
|
@@ -1032,7 +1040,7 @@ function Qb(b, a) {
|
|
|
1032
1040
|
if (!a.g.i) {
|
|
1033
1041
|
throw new Q(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1034
1042
|
}
|
|
1035
|
-
if (a.g.j.
|
|
1043
|
+
if (a.g.j.U) {
|
|
1036
1044
|
throw new Q(`Cannot convert argument of type ${a.g.j.name} to parameter type ${this.name}`);
|
|
1037
1045
|
}
|
|
1038
1046
|
return Mb(a.g.i, a.g.j.h, this.h);
|
|
@@ -1040,22 +1048,22 @@ function Qb(b, a) {
|
|
|
1040
1048
|
function Rb(b, a, c, d, e, f, m, h, l, n, r) {
|
|
1041
1049
|
this.name = b;
|
|
1042
1050
|
this.h = a;
|
|
1043
|
-
this.
|
|
1044
|
-
this.
|
|
1045
|
-
this.
|
|
1046
|
-
this
|
|
1047
|
-
this.
|
|
1048
|
-
this.
|
|
1049
|
-
this.
|
|
1050
|
-
this.
|
|
1051
|
-
this.
|
|
1052
|
-
e || void 0 !== a.o ? this.toWireType = Pb : (this.toWireType = d ? Nb : Qb, this.
|
|
1051
|
+
this.ea = c;
|
|
1052
|
+
this.U = d;
|
|
1053
|
+
this.V = e;
|
|
1054
|
+
this.ab = f;
|
|
1055
|
+
this.gb = m;
|
|
1056
|
+
this.xa = h;
|
|
1057
|
+
this.fa = l;
|
|
1058
|
+
this.bb = n;
|
|
1059
|
+
this.D = r;
|
|
1060
|
+
e || void 0 !== a.o ? this.toWireType = Pb : (this.toWireType = d ? Nb : Qb, this.B = null);
|
|
1053
1061
|
}
|
|
1054
1062
|
var Sb = (b, a, c) => {
|
|
1055
1063
|
if (!k.hasOwnProperty(b)) {
|
|
1056
1064
|
throw new wb("Replacing nonexistent public symbol");
|
|
1057
1065
|
}
|
|
1058
|
-
void 0 !== k[b].l && void 0 !== c ? k[b].l[c] = a : (k[b] = a, k[b].
|
|
1066
|
+
void 0 !== k[b].l && void 0 !== c ? k[b].l[c] = a : (k[b] = a, k[b].L = c);
|
|
1059
1067
|
}, Tb = [], Ub, Vb = b => {
|
|
1060
1068
|
var a = Tb[b];
|
|
1061
1069
|
a || (b >= Tb.length && (Tb.length = b + 1), Tb[b] = a = Ub.get(b));
|
|
@@ -1064,7 +1072,7 @@ var Sb = (b, a, c) => {
|
|
|
1064
1072
|
b.includes("j") ? (b = b.replace(/p/g, "i"), a = (0,k["dynCall_" + b])(a, ...c)) : a = Vb(a)(...c);
|
|
1065
1073
|
return a;
|
|
1066
1074
|
}, Xb = (b, a) => (...c) => Wb(b, a, c), Y = (b, a) => {
|
|
1067
|
-
b =
|
|
1075
|
+
b = U(b);
|
|
1068
1076
|
var c = b.includes("j") ? Xb(b, a) : Vb(a);
|
|
1069
1077
|
if ("function" != typeof c) {
|
|
1070
1078
|
throw new Q(`unknown function pointer with signature ${b}: ${a}`);
|
|
@@ -1072,15 +1080,15 @@ var Sb = (b, a, c) => {
|
|
|
1072
1080
|
return c;
|
|
1073
1081
|
}, Yb, Zb = (b, a) => {
|
|
1074
1082
|
function c(f) {
|
|
1075
|
-
e[f] ||
|
|
1083
|
+
e[f] || jb[f] || (Db[f] ? Db[f].forEach(c) : (d.push(f), e[f] = !0));
|
|
1076
1084
|
}
|
|
1077
1085
|
var d = [], e = {};
|
|
1078
1086
|
a.forEach(c);
|
|
1079
|
-
throw new Yb(`${b}: ` + d.map(
|
|
1087
|
+
throw new Yb(`${b}: ` + d.map(mb).join([", "]));
|
|
1080
1088
|
};
|
|
1081
1089
|
function $b(b) {
|
|
1082
1090
|
for (var a = 1; a < b.length; ++a) {
|
|
1083
|
-
if (null !== b[a] && void 0 === b[a].
|
|
1091
|
+
if (null !== b[a] && void 0 === b[a].B) {
|
|
1084
1092
|
return !0;
|
|
1085
1093
|
}
|
|
1086
1094
|
}
|
|
@@ -1092,7 +1100,7 @@ function ac(b, a, c, d, e) {
|
|
|
1092
1100
|
throw new Q("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1093
1101
|
}
|
|
1094
1102
|
var m = null !== a[1] && null !== c, h = $b(a), l = "void" !== a[0].name, n = f - 2, r = Array(n), w = [], y = [];
|
|
1095
|
-
return
|
|
1103
|
+
return Za(b, function(...g) {
|
|
1096
1104
|
if (g.length !== n) {
|
|
1097
1105
|
throw new Q(`function ${b} called with ${g.length} arguments, expected ${n}`);
|
|
1098
1106
|
}
|
|
@@ -1112,7 +1120,7 @@ function ac(b, a, c, d, e) {
|
|
|
1112
1120
|
} else {
|
|
1113
1121
|
for (q = m ? 1 : 2; q < a.length; q++) {
|
|
1114
1122
|
var F = 1 === q ? t : r[q - 2];
|
|
1115
|
-
null !== a[q].
|
|
1123
|
+
null !== a[q].B && a[q].B(F);
|
|
1116
1124
|
}
|
|
1117
1125
|
}
|
|
1118
1126
|
t = l ? a[0].fromWireType(g) : void 0;
|
|
@@ -1140,24 +1148,24 @@ var bc = (b, a) => {
|
|
|
1140
1148
|
}
|
|
1141
1149
|
return Mb(b.g.i, b.g.j.h, a.h);
|
|
1142
1150
|
}, ec = b => {
|
|
1143
|
-
9 < b && 0 === --P[b + 1] && (P[b] = void 0,
|
|
1151
|
+
9 < b && 0 === --P[b + 1] && (P[b] = void 0, $a.push(b));
|
|
1144
1152
|
}, fc = {name:"emscripten::val", fromWireType:b => {
|
|
1145
|
-
var a =
|
|
1153
|
+
var a = T(b);
|
|
1146
1154
|
ec(b);
|
|
1147
1155
|
return a;
|
|
1148
|
-
}, toWireType:(b, a) =>
|
|
1156
|
+
}, toWireType:(b, a) => ab(a), argPackAdvance:8, readValueFromPointer:Bb, B:null,}, gc = (b, a, c) => {
|
|
1149
1157
|
switch(a) {
|
|
1150
1158
|
case 1:
|
|
1151
1159
|
return c ? function(d) {
|
|
1152
|
-
return this.fromWireType(
|
|
1160
|
+
return this.fromWireType(Da[d]);
|
|
1153
1161
|
} : function(d) {
|
|
1154
1162
|
return this.fromWireType(J[d]);
|
|
1155
1163
|
};
|
|
1156
1164
|
case 2:
|
|
1157
1165
|
return c ? function(d) {
|
|
1158
|
-
return this.fromWireType(Da[d >> 1]);
|
|
1159
|
-
} : function(d) {
|
|
1160
1166
|
return this.fromWireType(Ea[d >> 1]);
|
|
1167
|
+
} : function(d) {
|
|
1168
|
+
return this.fromWireType(Fa[d >> 1]);
|
|
1161
1169
|
};
|
|
1162
1170
|
case 4:
|
|
1163
1171
|
return c ? function(d) {
|
|
@@ -1178,11 +1186,11 @@ var bc = (b, a) => {
|
|
|
1178
1186
|
switch(a) {
|
|
1179
1187
|
case 4:
|
|
1180
1188
|
return function(c) {
|
|
1181
|
-
return this.fromWireType(
|
|
1189
|
+
return this.fromWireType(Ga[c >> 2]);
|
|
1182
1190
|
};
|
|
1183
1191
|
case 8:
|
|
1184
1192
|
return function(c) {
|
|
1185
|
-
return this.fromWireType(
|
|
1193
|
+
return this.fromWireType(Ia[c >> 3]);
|
|
1186
1194
|
};
|
|
1187
1195
|
default:
|
|
1188
1196
|
throw new TypeError(`invalid float width (${a}): ${b}`);
|
|
@@ -1190,9 +1198,9 @@ var bc = (b, a) => {
|
|
|
1190
1198
|
}, ic = (b, a, c) => {
|
|
1191
1199
|
switch(a) {
|
|
1192
1200
|
case 1:
|
|
1193
|
-
return c ? d =>
|
|
1201
|
+
return c ? d => Da[d] : d => J[d];
|
|
1194
1202
|
case 2:
|
|
1195
|
-
return c ? d =>
|
|
1203
|
+
return c ? d => Ea[d >> 1] : d => Fa[d >> 1];
|
|
1196
1204
|
case 4:
|
|
1197
1205
|
return c ? d => K[d >> 2] : d => O[d >> 2];
|
|
1198
1206
|
default:
|
|
@@ -1244,13 +1252,13 @@ var bc = (b, a) => {
|
|
|
1244
1252
|
127 >= d ? a++ : 2047 >= d ? a += 2 : 55296 <= d && 57343 >= d ? (a += 4, ++c) : a += 3;
|
|
1245
1253
|
}
|
|
1246
1254
|
return a;
|
|
1247
|
-
},
|
|
1255
|
+
}, oc = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, pc = (b, a, c) => {
|
|
1248
1256
|
var d = a + c;
|
|
1249
1257
|
for (c = a; b[c] && !(c >= d);) {
|
|
1250
1258
|
++c;
|
|
1251
1259
|
}
|
|
1252
|
-
if (16 < c - a && b.buffer &&
|
|
1253
|
-
return
|
|
1260
|
+
if (16 < c - a && b.buffer && oc) {
|
|
1261
|
+
return oc.decode(b.subarray(a, c));
|
|
1254
1262
|
}
|
|
1255
1263
|
for (d = ""; a < c;) {
|
|
1256
1264
|
var e = b[a++];
|
|
@@ -1268,25 +1276,25 @@ var bc = (b, a) => {
|
|
|
1268
1276
|
}
|
|
1269
1277
|
}
|
|
1270
1278
|
return d;
|
|
1271
|
-
},
|
|
1279
|
+
}, qc = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, rc = (b, a) => {
|
|
1272
1280
|
var c = b >> 1;
|
|
1273
|
-
for (var d = c + a / 2; !(c >= d) &&
|
|
1281
|
+
for (var d = c + a / 2; !(c >= d) && Fa[c];) {
|
|
1274
1282
|
++c;
|
|
1275
1283
|
}
|
|
1276
1284
|
c <<= 1;
|
|
1277
|
-
if (32 < c - b &&
|
|
1278
|
-
return
|
|
1285
|
+
if (32 < c - b && qc) {
|
|
1286
|
+
return qc.decode(J.subarray(b, c));
|
|
1279
1287
|
}
|
|
1280
1288
|
c = "";
|
|
1281
1289
|
for (d = 0; !(d >= a / 2); ++d) {
|
|
1282
|
-
var e =
|
|
1290
|
+
var e = Ea[b + 2 * d >> 1];
|
|
1283
1291
|
if (0 == e) {
|
|
1284
1292
|
break;
|
|
1285
1293
|
}
|
|
1286
1294
|
c += String.fromCharCode(e);
|
|
1287
1295
|
}
|
|
1288
1296
|
return c;
|
|
1289
|
-
},
|
|
1297
|
+
}, sc = (b, a, c) => {
|
|
1290
1298
|
c ??= 2147483647;
|
|
1291
1299
|
if (2 > c) {
|
|
1292
1300
|
return 0;
|
|
@@ -1295,11 +1303,11 @@ var bc = (b, a) => {
|
|
|
1295
1303
|
var d = a;
|
|
1296
1304
|
c = c < 2 * b.length ? c / 2 : b.length;
|
|
1297
1305
|
for (var e = 0; e < c; ++e) {
|
|
1298
|
-
|
|
1306
|
+
Ea[a >> 1] = b.charCodeAt(e), a += 2;
|
|
1299
1307
|
}
|
|
1300
|
-
|
|
1308
|
+
Ea[a >> 1] = 0;
|
|
1301
1309
|
return a - d;
|
|
1302
|
-
},
|
|
1310
|
+
}, tc = b => 2 * b.length, uc = (b, a) => {
|
|
1303
1311
|
for (var c = 0, d = ""; !(c >= a / 4);) {
|
|
1304
1312
|
var e = K[b + 4 * c >> 2];
|
|
1305
1313
|
if (0 == e) {
|
|
@@ -1309,7 +1317,7 @@ var bc = (b, a) => {
|
|
|
1309
1317
|
65536 <= e ? (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : d += String.fromCharCode(e);
|
|
1310
1318
|
}
|
|
1311
1319
|
return d;
|
|
1312
|
-
},
|
|
1320
|
+
}, vc = (b, a, c) => {
|
|
1313
1321
|
c ??= 2147483647;
|
|
1314
1322
|
if (4 > c) {
|
|
1315
1323
|
return 0;
|
|
@@ -1330,50 +1338,50 @@ var bc = (b, a) => {
|
|
|
1330
1338
|
}
|
|
1331
1339
|
K[a >> 2] = 0;
|
|
1332
1340
|
return a - d;
|
|
1333
|
-
},
|
|
1341
|
+
}, wc = b => {
|
|
1334
1342
|
for (var a = 0, c = 0; c < b.length; ++c) {
|
|
1335
1343
|
var d = b.charCodeAt(c);
|
|
1336
1344
|
55296 <= d && 57343 >= d && ++c;
|
|
1337
1345
|
a += 4;
|
|
1338
1346
|
}
|
|
1339
1347
|
return a;
|
|
1340
|
-
},
|
|
1348
|
+
}, xc = (b, a, c) => {
|
|
1341
1349
|
var d = [];
|
|
1342
1350
|
b = b.toWireType(d, c);
|
|
1343
|
-
d.length && (O[a >> 2] =
|
|
1351
|
+
d.length && (O[a >> 2] = ab(d));
|
|
1344
1352
|
return b;
|
|
1345
|
-
},
|
|
1346
|
-
var a =
|
|
1347
|
-
return void 0 === a ?
|
|
1348
|
-
},
|
|
1349
|
-
var a =
|
|
1350
|
-
|
|
1353
|
+
}, yc = {}, zc = b => {
|
|
1354
|
+
var a = yc[b];
|
|
1355
|
+
return void 0 === a ? U(b) : a;
|
|
1356
|
+
}, Ac = [], Bc = b => {
|
|
1357
|
+
var a = Ac.length;
|
|
1358
|
+
Ac.push(b);
|
|
1351
1359
|
return a;
|
|
1352
|
-
},
|
|
1360
|
+
}, Cc = (b, a) => {
|
|
1353
1361
|
for (var c = Array(b), d = 0; d < b; ++d) {
|
|
1354
|
-
c[d] =
|
|
1362
|
+
c[d] = nb(O[a + 4 * d >> 2], "parameter " + d);
|
|
1355
1363
|
}
|
|
1356
1364
|
return c;
|
|
1357
|
-
},
|
|
1358
|
-
if (!
|
|
1359
|
-
var b = {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", _:
|
|
1360
|
-
for (a in
|
|
1361
|
-
void 0 ===
|
|
1365
|
+
}, Dc = Reflect.construct, Ec = {}, Gc = () => {
|
|
1366
|
+
if (!Fc) {
|
|
1367
|
+
var b = {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", _:sa || "./this.program"}, a;
|
|
1368
|
+
for (a in Ec) {
|
|
1369
|
+
void 0 === Ec[a] ? delete b[a] : b[a] = Ec[a];
|
|
1362
1370
|
}
|
|
1363
1371
|
var c = [];
|
|
1364
1372
|
for (a in b) {
|
|
1365
1373
|
c.push(`${a}=${b[a]}`);
|
|
1366
1374
|
}
|
|
1367
|
-
|
|
1375
|
+
Fc = c;
|
|
1368
1376
|
}
|
|
1369
|
-
return
|
|
1370
|
-
},
|
|
1371
|
-
function
|
|
1377
|
+
return Fc;
|
|
1378
|
+
}, Fc, Hc = [null, [], []], Ic = b => 0 === b % 4 && (0 !== b % 100 || 0 === b % 400), Jc = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Kc = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1379
|
+
function Lc(b) {
|
|
1372
1380
|
var a = Array(kc(b) + 1);
|
|
1373
1381
|
jc(b, a, 0, a.length);
|
|
1374
1382
|
return a;
|
|
1375
1383
|
}
|
|
1376
|
-
var
|
|
1384
|
+
var Mc = (b, a, c, d) => {
|
|
1377
1385
|
function e(g, t, q) {
|
|
1378
1386
|
for (g = "number" == typeof g ? g.toString() : g || ""; g.length < t;) {
|
|
1379
1387
|
g = q[0] + g;
|
|
@@ -1410,9 +1418,9 @@ var Lc = (b, a, c, d) => {
|
|
|
1410
1418
|
}
|
|
1411
1419
|
}
|
|
1412
1420
|
function l(g) {
|
|
1413
|
-
var t = g.
|
|
1414
|
-
for (g = new Date((new Date(g.
|
|
1415
|
-
var q = g.getMonth(), F = (
|
|
1421
|
+
var t = g.J;
|
|
1422
|
+
for (g = new Date((new Date(g.K + 1900, 0, 1)).getTime()); 0 < t;) {
|
|
1423
|
+
var q = g.getMonth(), F = (Ic(g.getFullYear()) ? Jc : Kc)[q];
|
|
1416
1424
|
if (t > F - g.getDate()) {
|
|
1417
1425
|
t -= F - g.getDate() + 1, g.setDate(1), 11 > q ? g.setMonth(q + 1) : (g.setMonth(0), g.setFullYear(g.getFullYear() + 1));
|
|
1418
1426
|
} else {
|
|
@@ -1426,48 +1434,48 @@ var Lc = (b, a, c, d) => {
|
|
|
1426
1434
|
return 0 >= m(t, g) ? 0 >= m(q, g) ? g.getFullYear() + 1 : g.getFullYear() : g.getFullYear() - 1;
|
|
1427
1435
|
}
|
|
1428
1436
|
var n = O[d + 40 >> 2];
|
|
1429
|
-
d = {
|
|
1430
|
-
c = c ?
|
|
1437
|
+
d = {jb:K[d >> 2], ib:K[d + 4 >> 2], Z:K[d + 8 >> 2], ha:K[d + 12 >> 2], $:K[d + 16 >> 2], K:K[d + 20 >> 2], F:K[d + 24 >> 2], J:K[d + 28 >> 2], ob:K[d + 32 >> 2], hb:K[d + 36 >> 2], kb:n ? n ? pc(J, n) : "" : ""};
|
|
1438
|
+
c = c ? pc(J, c) : "";
|
|
1431
1439
|
n = {"%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",};
|
|
1432
1440
|
for (var r in n) {
|
|
1433
1441
|
c = c.replace(new RegExp(r, "g"), n[r]);
|
|
1434
1442
|
}
|
|
1435
1443
|
var w = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), y = "January February March April May June July August September October November December".split(" ");
|
|
1436
|
-
n = {"%a":g => w[g.
|
|
1437
|
-
g = g.
|
|
1444
|
+
n = {"%a":g => w[g.F].substring(0, 3), "%A":g => w[g.F], "%b":g => y[g.$].substring(0, 3), "%B":g => y[g.$], "%C":g => f((g.K + 1900) / 100 | 0, 2), "%d":g => f(g.ha, 2), "%e":g => e(g.ha, 2, " "), "%g":g => l(g).toString().substring(2), "%G":l, "%H":g => f(g.Z, 2), "%I":g => {
|
|
1445
|
+
g = g.Z;
|
|
1438
1446
|
0 == g ? g = 12 : 12 < g && (g -= 12);
|
|
1439
1447
|
return f(g, 2);
|
|
1440
1448
|
}, "%j":g => {
|
|
1441
|
-
for (var t = 0, q = 0; q <= g
|
|
1449
|
+
for (var t = 0, q = 0; q <= g.$ - 1; t += (Ic(g.K + 1900) ? Jc : Kc)[q++]) {
|
|
1442
1450
|
}
|
|
1443
|
-
return f(g.
|
|
1444
|
-
}, "%m":g => f(g
|
|
1445
|
-
var t = Math.floor((g.
|
|
1446
|
-
2 >= (g.
|
|
1451
|
+
return f(g.ha + t, 3);
|
|
1452
|
+
}, "%m":g => f(g.$ + 1, 2), "%M":g => f(g.ib, 2), "%n":() => "\n", "%p":g => 0 <= g.Z && 12 > g.Z ? "AM" : "PM", "%S":g => f(g.jb, 2), "%t":() => "\t", "%u":g => g.F || 7, "%U":g => f(Math.floor((g.J + 7 - g.F) / 7), 2), "%V":g => {
|
|
1453
|
+
var t = Math.floor((g.J + 7 - (g.F + 6) % 7) / 7);
|
|
1454
|
+
2 >= (g.F + 371 - g.J - 2) % 7 && t++;
|
|
1447
1455
|
if (t) {
|
|
1448
|
-
53 == t && (q = (g.
|
|
1456
|
+
53 == t && (q = (g.F + 371 - g.J) % 7, 4 == q || 3 == q && Ic(g.K) || (t = 1));
|
|
1449
1457
|
} else {
|
|
1450
1458
|
t = 52;
|
|
1451
|
-
var q = (g.
|
|
1452
|
-
(4 == q || 5 == q &&
|
|
1459
|
+
var q = (g.F + 7 - g.J - 1) % 7;
|
|
1460
|
+
(4 == q || 5 == q && Ic(g.K % 400 - 1)) && t++;
|
|
1453
1461
|
}
|
|
1454
1462
|
return f(t, 2);
|
|
1455
|
-
}, "%w":g => g.
|
|
1456
|
-
g = g.
|
|
1463
|
+
}, "%w":g => g.F, "%W":g => f(Math.floor((g.J + 7 - (g.F + 6) % 7) / 7), 2), "%y":g => (g.K + 1900).toString().substring(2), "%Y":g => g.K + 1900, "%z":g => {
|
|
1464
|
+
g = g.hb;
|
|
1457
1465
|
var t = 0 <= g;
|
|
1458
1466
|
g = Math.abs(g) / 60;
|
|
1459
1467
|
return (t ? "+" : "-") + String("0000" + (g / 60 * 100 + g % 60)).slice(-4);
|
|
1460
|
-
}, "%Z":g => g.
|
|
1468
|
+
}, "%Z":g => g.kb, "%%":() => "%"};
|
|
1461
1469
|
c = c.replace(/%%/g, "\x00\x00");
|
|
1462
1470
|
for (r in n) {
|
|
1463
1471
|
c.includes(r) && (c = c.replace(new RegExp(r, "g"), n[r](d)));
|
|
1464
1472
|
}
|
|
1465
1473
|
c = c.replace(/\0\0/g, "%");
|
|
1466
|
-
r =
|
|
1474
|
+
r = Lc(c);
|
|
1467
1475
|
if (r.length > a) {
|
|
1468
1476
|
return 0;
|
|
1469
1477
|
}
|
|
1470
|
-
|
|
1478
|
+
Da.set(r, b);
|
|
1471
1479
|
return r.length - 1;
|
|
1472
1480
|
};
|
|
1473
1481
|
Q = k.BindingError = class extends Error {
|
|
@@ -1477,24 +1485,24 @@ Q = k.BindingError = class extends Error {
|
|
|
1477
1485
|
}
|
|
1478
1486
|
};
|
|
1479
1487
|
P.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1,);
|
|
1480
|
-
k.count_emval_handles = () => P.length / 2 - 5 -
|
|
1481
|
-
|
|
1482
|
-
for (var
|
|
1483
|
-
|
|
1488
|
+
k.count_emval_handles = () => P.length / 2 - 5 - $a.length;
|
|
1489
|
+
cb = k.PureVirtualError = bb("PureVirtualError");
|
|
1490
|
+
for (var Nc = Array(256), Oc = 0; 256 > Oc; ++Oc) {
|
|
1491
|
+
Nc[Oc] = String.fromCharCode(Oc);
|
|
1484
1492
|
}
|
|
1485
|
-
|
|
1486
|
-
k.getInheritedInstanceCount = () => Object.keys(
|
|
1493
|
+
db = Nc;
|
|
1494
|
+
k.getInheritedInstanceCount = () => Object.keys(hb).length;
|
|
1487
1495
|
k.getLiveInheritedInstances = () => {
|
|
1488
1496
|
var b = [], a;
|
|
1489
|
-
for (a in
|
|
1490
|
-
|
|
1497
|
+
for (a in hb) {
|
|
1498
|
+
hb.hasOwnProperty(a) && b.push(hb[a]);
|
|
1491
1499
|
}
|
|
1492
1500
|
return b;
|
|
1493
1501
|
};
|
|
1494
|
-
k.flushPendingDeletes =
|
|
1502
|
+
k.flushPendingDeletes = fb;
|
|
1495
1503
|
k.setDelayFunction = b => {
|
|
1496
|
-
|
|
1497
|
-
|
|
1504
|
+
gb = b;
|
|
1505
|
+
eb.length && gb && gb(fb);
|
|
1498
1506
|
};
|
|
1499
1507
|
wb = k.InternalError = class extends Error {
|
|
1500
1508
|
constructor(b) {
|
|
@@ -1510,87 +1518,87 @@ Object.assign(Hb.prototype, {isAliasOf:function(b) {
|
|
|
1510
1518
|
b.g = b.g;
|
|
1511
1519
|
var d = b.g.j.h;
|
|
1512
1520
|
for (b = b.g.i; a.o;) {
|
|
1513
|
-
c = a.
|
|
1521
|
+
c = a.S(c), a = a.o;
|
|
1514
1522
|
}
|
|
1515
1523
|
for (; d.o;) {
|
|
1516
|
-
b = d.
|
|
1524
|
+
b = d.S(b), d = d.o;
|
|
1517
1525
|
}
|
|
1518
1526
|
return a === d && c === b;
|
|
1519
1527
|
}, clone:function() {
|
|
1520
1528
|
this.g.i || Gb(this);
|
|
1521
|
-
if (this.g.
|
|
1529
|
+
if (this.g.O) {
|
|
1522
1530
|
return this.g.count.value += 1, this;
|
|
1523
1531
|
}
|
|
1524
1532
|
var b = xb, a = Object, c = a.create, d = Object.getPrototypeOf(this), e = this.g;
|
|
1525
|
-
b = b(c.call(a, d, {g:{value:{count:e.count,
|
|
1533
|
+
b = b(c.call(a, d, {g:{value:{count:e.count, M:e.M, O:e.O, i:e.i, j:e.j, s:e.s, A:e.A,},}}));
|
|
1526
1534
|
b.g.count.value += 1;
|
|
1527
|
-
b.g.
|
|
1535
|
+
b.g.M = !1;
|
|
1528
1536
|
return b;
|
|
1529
1537
|
}, ["delete"]() {
|
|
1530
1538
|
this.g.i || Gb(this);
|
|
1531
|
-
if (this.g.
|
|
1539
|
+
if (this.g.M && !this.g.O) {
|
|
1532
1540
|
throw new Q("Object already scheduled for deletion");
|
|
1533
1541
|
}
|
|
1534
|
-
|
|
1542
|
+
ob(this);
|
|
1535
1543
|
var b = this.g;
|
|
1536
1544
|
--b.count.value;
|
|
1537
|
-
0 === b.count.value && (b.s ? b.
|
|
1538
|
-
this.g.
|
|
1545
|
+
0 === b.count.value && (b.s ? b.A.D(b.s) : b.j.h.D(b.i));
|
|
1546
|
+
this.g.O || (this.g.s = void 0, this.g.i = void 0);
|
|
1539
1547
|
}, isDeleted:function() {
|
|
1540
1548
|
return !this.g.i;
|
|
1541
1549
|
}, deleteLater:function() {
|
|
1542
1550
|
this.g.i || Gb(this);
|
|
1543
|
-
if (this.g.
|
|
1551
|
+
if (this.g.M && !this.g.O) {
|
|
1544
1552
|
throw new Q("Object already scheduled for deletion");
|
|
1545
1553
|
}
|
|
1546
|
-
|
|
1547
|
-
1 ===
|
|
1548
|
-
this.g.
|
|
1554
|
+
eb.push(this);
|
|
1555
|
+
1 === eb.length && gb && gb(fb);
|
|
1556
|
+
this.g.M = !0;
|
|
1549
1557
|
return this;
|
|
1550
1558
|
},});
|
|
1551
|
-
Object.assign(Rb.prototype, {
|
|
1552
|
-
this.
|
|
1559
|
+
Object.assign(Rb.prototype, {Ra(b) {
|
|
1560
|
+
this.xa && (b = this.xa(b));
|
|
1553
1561
|
return b;
|
|
1554
|
-
},
|
|
1555
|
-
this.
|
|
1562
|
+
}, pa(b) {
|
|
1563
|
+
this.D?.(b);
|
|
1556
1564
|
}, argPackAdvance:8, readValueFromPointer:Bb, fromWireType:function(b) {
|
|
1557
1565
|
function a() {
|
|
1558
|
-
return this.
|
|
1566
|
+
return this.V ? yb(this.h.C, {j:this.ab, i:c, A:this, s:b,}) : yb(this.h.C, {j:this, i:b,});
|
|
1559
1567
|
}
|
|
1560
|
-
var c = this.
|
|
1568
|
+
var c = this.Ra(b);
|
|
1561
1569
|
if (!c) {
|
|
1562
|
-
return this.
|
|
1570
|
+
return this.pa(b), null;
|
|
1563
1571
|
}
|
|
1564
|
-
var d =
|
|
1572
|
+
var d = sb(this.h, c);
|
|
1565
1573
|
if (void 0 !== d) {
|
|
1566
1574
|
if (0 === d.g.count.value) {
|
|
1567
1575
|
return d.g.i = c, d.g.s = b, d.clone();
|
|
1568
1576
|
}
|
|
1569
1577
|
d = d.clone();
|
|
1570
|
-
this.
|
|
1578
|
+
this.pa(b);
|
|
1571
1579
|
return d;
|
|
1572
1580
|
}
|
|
1573
|
-
d = this.h.
|
|
1574
|
-
d =
|
|
1581
|
+
d = this.h.Qa(c);
|
|
1582
|
+
d = rb[d];
|
|
1575
1583
|
if (!d) {
|
|
1576
1584
|
return a.call(this);
|
|
1577
1585
|
}
|
|
1578
|
-
d = this.
|
|
1579
|
-
var e =
|
|
1580
|
-
return null === e ? a.call(this) : this.
|
|
1586
|
+
d = this.U ? d.Ha : d.pointerType;
|
|
1587
|
+
var e = qb(c, this.h, d.h);
|
|
1588
|
+
return null === e ? a.call(this) : this.V ? yb(d.h.C, {j:d, i:e, A:this, s:b,}) : yb(d.h.C, {j:d, i:e,});
|
|
1581
1589
|
},});
|
|
1582
|
-
Yb = k.UnboundTypeError =
|
|
1583
|
-
var
|
|
1584
|
-
|
|
1590
|
+
Yb = k.UnboundTypeError = bb("UnboundTypeError");
|
|
1591
|
+
var Qc = {_abort_js:() => {
|
|
1592
|
+
Ra("");
|
|
1585
1593
|
}, _embind_create_inheriting_constructor:(b, a, c) => {
|
|
1586
|
-
b =
|
|
1587
|
-
a =
|
|
1588
|
-
c =
|
|
1589
|
-
var d = a.h, e = d.
|
|
1590
|
-
b =
|
|
1591
|
-
d.o.
|
|
1594
|
+
b = U(b);
|
|
1595
|
+
a = nb(a, "wrapper");
|
|
1596
|
+
c = T(c);
|
|
1597
|
+
var d = a.h, e = d.C, f = d.o.C, m = d.o.constructor;
|
|
1598
|
+
b = Za(b, function(...h) {
|
|
1599
|
+
d.o.wa.forEach(function(l) {
|
|
1592
1600
|
if (this[l] === f[l]) {
|
|
1593
|
-
throw new
|
|
1601
|
+
throw new cb(`Pure virtual function ${l} must be implemented in JavaScript`);
|
|
1594
1602
|
}
|
|
1595
1603
|
}.bind(this));
|
|
1596
1604
|
Object.defineProperty(this, "__parent", {value:e});
|
|
@@ -1601,44 +1609,44 @@ var Pc = {_abort_js:() => {
|
|
|
1601
1609
|
throw new Q("Pass correct 'this' to __construct");
|
|
1602
1610
|
}
|
|
1603
1611
|
h = m.implement(this, ...h);
|
|
1604
|
-
|
|
1612
|
+
ob(h);
|
|
1605
1613
|
var l = h.g;
|
|
1606
1614
|
h.notifyOnDestruction();
|
|
1607
|
-
l.
|
|
1615
|
+
l.O = !0;
|
|
1608
1616
|
Object.defineProperties(this, {g:{value:l}});
|
|
1609
1617
|
xb(this);
|
|
1610
1618
|
h = l.i;
|
|
1611
|
-
h =
|
|
1612
|
-
if (
|
|
1619
|
+
h = ib(d, h);
|
|
1620
|
+
if (hb.hasOwnProperty(h)) {
|
|
1613
1621
|
throw new Q(`Tried to register registered instance: ${h}`);
|
|
1614
1622
|
}
|
|
1615
|
-
|
|
1623
|
+
hb[h] = this;
|
|
1616
1624
|
};
|
|
1617
1625
|
e.__destruct = function() {
|
|
1618
1626
|
if (this === e) {
|
|
1619
1627
|
throw new Q("Pass correct 'this' to __destruct");
|
|
1620
1628
|
}
|
|
1621
|
-
|
|
1629
|
+
ob(this);
|
|
1622
1630
|
var h = this.g.i;
|
|
1623
|
-
h =
|
|
1624
|
-
if (
|
|
1625
|
-
delete
|
|
1631
|
+
h = ib(d, h);
|
|
1632
|
+
if (hb.hasOwnProperty(h)) {
|
|
1633
|
+
delete hb[h];
|
|
1626
1634
|
} else {
|
|
1627
1635
|
throw new Q(`Tried to unregister unregistered instance: ${h}`);
|
|
1628
1636
|
}
|
|
1629
1637
|
};
|
|
1630
1638
|
b.prototype = Object.create(e);
|
|
1631
1639
|
Object.assign(b.prototype, c);
|
|
1632
|
-
return
|
|
1640
|
+
return ab(b);
|
|
1633
1641
|
}, _embind_finalize_value_object:b => {
|
|
1634
1642
|
var a = zb[b];
|
|
1635
1643
|
delete zb[b];
|
|
1636
|
-
var c = a.
|
|
1644
|
+
var c = a.fa, d = a.D, e = a.sa, f = e.map(m => m.Ua).concat(e.map(m => m.eb));
|
|
1637
1645
|
X([b], f, m => {
|
|
1638
1646
|
var h = {};
|
|
1639
1647
|
e.forEach((l, n) => {
|
|
1640
|
-
var r = m[n], w = l.
|
|
1641
|
-
h[l.
|
|
1648
|
+
var r = m[n], w = l.Sa, y = l.Ta, g = m[n + e.length], t = l.cb, q = l.fb;
|
|
1649
|
+
h[l.Oa] = {read:F => r.fromWireType(w(y, F)), write:(F, E) => {
|
|
1642
1650
|
var v = [];
|
|
1643
1651
|
t(q, F, g.toWireType(v, E));
|
|
1644
1652
|
Ab(v);
|
|
@@ -1663,20 +1671,20 @@ var Pc = {_abort_js:() => {
|
|
|
1663
1671
|
}
|
|
1664
1672
|
null !== l && l.push(d, w);
|
|
1665
1673
|
return w;
|
|
1666
|
-
}, argPackAdvance:8, readValueFromPointer:Bb,
|
|
1674
|
+
}, argPackAdvance:8, readValueFromPointer:Bb, B:d,}];
|
|
1667
1675
|
});
|
|
1668
1676
|
}, _embind_register_bigint:() => {
|
|
1669
1677
|
}, _embind_register_bool:(b, a, c, d) => {
|
|
1670
|
-
a =
|
|
1678
|
+
a = U(a);
|
|
1671
1679
|
Eb(b, {name:a, fromWireType:function(e) {
|
|
1672
1680
|
return !!e;
|
|
1673
1681
|
}, toWireType:function(e, f) {
|
|
1674
1682
|
return f ? c : d;
|
|
1675
1683
|
}, argPackAdvance:8, readValueFromPointer:function(e) {
|
|
1676
1684
|
return this.fromWireType(J[e]);
|
|
1677
|
-
},
|
|
1685
|
+
}, B:null,});
|
|
1678
1686
|
}, _embind_register_class:(b, a, c, d, e, f, m, h, l, n, r, w, y) => {
|
|
1679
|
-
r =
|
|
1687
|
+
r = U(r);
|
|
1680
1688
|
f = Y(e, f);
|
|
1681
1689
|
h &&= Y(m, h);
|
|
1682
1690
|
n &&= Y(l, n);
|
|
@@ -1689,41 +1697,41 @@ var Pc = {_abort_js:() => {
|
|
|
1689
1697
|
t = t[0];
|
|
1690
1698
|
if (d) {
|
|
1691
1699
|
var q = t.h;
|
|
1692
|
-
var F = q.
|
|
1700
|
+
var F = q.C;
|
|
1693
1701
|
} else {
|
|
1694
1702
|
F = Hb.prototype;
|
|
1695
1703
|
}
|
|
1696
|
-
t =
|
|
1704
|
+
t = Za(r, function(...N) {
|
|
1697
1705
|
if (Object.getPrototypeOf(this) !== E) {
|
|
1698
1706
|
throw new Q("Use 'new' to construct " + r);
|
|
1699
1707
|
}
|
|
1700
|
-
if (void 0 === v.
|
|
1708
|
+
if (void 0 === v.I) {
|
|
1701
1709
|
throw new Q(r + " has no accessible constructor");
|
|
1702
1710
|
}
|
|
1703
|
-
var R = v.
|
|
1711
|
+
var R = v.I[N.length];
|
|
1704
1712
|
if (void 0 === R) {
|
|
1705
|
-
throw new Q(`Tried to invoke ctor of ${r} with invalid number of parameters (${
|
|
1713
|
+
throw new Q(`Tried to invoke ctor of ${r} with invalid number of parameters (${N.length}) - expected (${Object.keys(v.I).toString()}) parameters instead!`);
|
|
1706
1714
|
}
|
|
1707
|
-
return R.apply(this,
|
|
1715
|
+
return R.apply(this, N);
|
|
1708
1716
|
});
|
|
1709
1717
|
var E = Object.create(F, {constructor:{value:t},});
|
|
1710
1718
|
t.prototype = E;
|
|
1711
1719
|
var v = new Lb(r, t, E, y, q, f, h, n);
|
|
1712
1720
|
if (v.o) {
|
|
1713
1721
|
var I;
|
|
1714
|
-
(I = v.o).
|
|
1715
|
-
v.o.
|
|
1722
|
+
(I = v.o).T ?? (I.T = []);
|
|
1723
|
+
v.o.T.push(v);
|
|
1716
1724
|
}
|
|
1717
1725
|
q = new Rb(r, v, !0, !1, !1);
|
|
1718
1726
|
I = new Rb(r + "*", v, !1, !1, !1);
|
|
1719
1727
|
F = new Rb(r + " const*", v, !1, !0, !1);
|
|
1720
|
-
|
|
1728
|
+
rb[b] = {pointerType:I, Ha:F};
|
|
1721
1729
|
Sb(g, t);
|
|
1722
1730
|
return [q, I, F];
|
|
1723
1731
|
});
|
|
1724
1732
|
}, _embind_register_class_class_function:(b, a, c, d, e, f, m) => {
|
|
1725
1733
|
var h = bc(c, d);
|
|
1726
|
-
a =
|
|
1734
|
+
a = U(a);
|
|
1727
1735
|
a = cc(a);
|
|
1728
1736
|
f = Y(e, f);
|
|
1729
1737
|
X([], [b], l => {
|
|
@@ -1734,12 +1742,12 @@ var Pc = {_abort_js:() => {
|
|
|
1734
1742
|
var r = `${l.name}.${a}`;
|
|
1735
1743
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1736
1744
|
var w = l.h.constructor;
|
|
1737
|
-
void 0 === w[a] ? (n.
|
|
1745
|
+
void 0 === w[a] ? (n.L = c - 1, w[a] = n) : (Ib(w, a, r), w[a].l[c - 1] = n);
|
|
1738
1746
|
X([], h, y => {
|
|
1739
1747
|
y = ac(r, [y[0], null].concat(y.slice(1)), null, f, m);
|
|
1740
|
-
void 0 === w[a].l ? (y.
|
|
1741
|
-
if (l.h.
|
|
1742
|
-
for (const g of l.h.
|
|
1748
|
+
void 0 === w[a].l ? (y.L = c - 1, w[a] = y) : w[a].l[c - 1] = y;
|
|
1749
|
+
if (l.h.T) {
|
|
1750
|
+
for (const g of l.h.T) {
|
|
1743
1751
|
g.constructor.hasOwnProperty(a) || (g.constructor[a] = y);
|
|
1744
1752
|
}
|
|
1745
1753
|
}
|
|
@@ -1748,7 +1756,7 @@ var Pc = {_abort_js:() => {
|
|
|
1748
1756
|
return [];
|
|
1749
1757
|
});
|
|
1750
1758
|
}, _embind_register_class_class_property:(b, a, c, d, e, f, m, h) => {
|
|
1751
|
-
a =
|
|
1759
|
+
a = U(a);
|
|
1752
1760
|
f = Y(e, f);
|
|
1753
1761
|
X([], [b], l => {
|
|
1754
1762
|
l = l[0];
|
|
@@ -1782,23 +1790,23 @@ var Pc = {_abort_js:() => {
|
|
|
1782
1790
|
X([], [b], h => {
|
|
1783
1791
|
h = h[0];
|
|
1784
1792
|
var l = `constructor ${h.name}`;
|
|
1785
|
-
void 0 === h.h.
|
|
1786
|
-
if (void 0 !== h.h.
|
|
1793
|
+
void 0 === h.h.I && (h.h.I = []);
|
|
1794
|
+
if (void 0 !== h.h.I[a - 1]) {
|
|
1787
1795
|
throw new Q(`Cannot register multiple constructors with identical number of parameters (${a - 1}) for class '${h.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
1788
1796
|
}
|
|
1789
|
-
h.h.
|
|
1797
|
+
h.h.I[a - 1] = () => {
|
|
1790
1798
|
Zb(`Cannot construct ${h.name} due to unbound types`, m);
|
|
1791
1799
|
};
|
|
1792
1800
|
X([], m, n => {
|
|
1793
1801
|
n.splice(1, 0, null);
|
|
1794
|
-
h.h.
|
|
1802
|
+
h.h.I[a - 1] = ac(l, n, null, e, f);
|
|
1795
1803
|
return [];
|
|
1796
1804
|
});
|
|
1797
1805
|
return [];
|
|
1798
1806
|
});
|
|
1799
1807
|
}, _embind_register_class_function:(b, a, c, d, e, f, m, h) => {
|
|
1800
1808
|
var l = bc(c, d);
|
|
1801
|
-
a =
|
|
1809
|
+
a = U(a);
|
|
1802
1810
|
a = cc(a);
|
|
1803
1811
|
f = Y(e, f);
|
|
1804
1812
|
X([], [b], n => {
|
|
@@ -1808,18 +1816,18 @@ var Pc = {_abort_js:() => {
|
|
|
1808
1816
|
n = n[0];
|
|
1809
1817
|
var w = `${n.name}.${a}`;
|
|
1810
1818
|
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
1811
|
-
h && n.h.
|
|
1812
|
-
var y = n.h.
|
|
1813
|
-
void 0 === g || void 0 === g.l && g.className !== n.name && g.
|
|
1819
|
+
h && n.h.wa.push(a);
|
|
1820
|
+
var y = n.h.C, g = y[a];
|
|
1821
|
+
void 0 === g || void 0 === g.l && g.className !== n.name && g.L === c - 2 ? (r.L = c - 2, r.className = n.name, y[a] = r) : (Ib(y, a, w), y[a].l[c - 2] = r);
|
|
1814
1822
|
X([], l, t => {
|
|
1815
1823
|
t = ac(w, t, n, f, m);
|
|
1816
|
-
void 0 === y[a].l ? (t.
|
|
1824
|
+
void 0 === y[a].l ? (t.L = c - 2, y[a] = t) : y[a].l[c - 2] = t;
|
|
1817
1825
|
return [];
|
|
1818
1826
|
});
|
|
1819
1827
|
return [];
|
|
1820
1828
|
});
|
|
1821
1829
|
}, _embind_register_class_property:(b, a, c, d, e, f, m, h, l, n) => {
|
|
1822
|
-
a =
|
|
1830
|
+
a = U(a);
|
|
1823
1831
|
e = Y(d, e);
|
|
1824
1832
|
X([], [b], r => {
|
|
1825
1833
|
r = r[0];
|
|
@@ -1829,7 +1837,7 @@ var Pc = {_abort_js:() => {
|
|
|
1829
1837
|
y.set = l ? () => Zb(`Cannot access ${w} due to unbound types`, [c, m]) : () => {
|
|
1830
1838
|
throw new Q(w + " is a read-only property");
|
|
1831
1839
|
};
|
|
1832
|
-
Object.defineProperty(r.h.
|
|
1840
|
+
Object.defineProperty(r.h.C, a, y);
|
|
1833
1841
|
X([], l ? [c, m] : [c], g => {
|
|
1834
1842
|
var t = g[0], q = {get() {
|
|
1835
1843
|
var E = dc(this, r, w + " getter");
|
|
@@ -1844,7 +1852,7 @@ var Pc = {_abort_js:() => {
|
|
|
1844
1852
|
Ab(I);
|
|
1845
1853
|
};
|
|
1846
1854
|
}
|
|
1847
|
-
Object.defineProperty(r.h.
|
|
1855
|
+
Object.defineProperty(r.h.C, a, q);
|
|
1848
1856
|
return [];
|
|
1849
1857
|
});
|
|
1850
1858
|
return [];
|
|
@@ -1852,26 +1860,26 @@ var Pc = {_abort_js:() => {
|
|
|
1852
1860
|
}, _embind_register_emval:b => Eb(b, fc), _embind_register_enum:(b, a, c, d) => {
|
|
1853
1861
|
function e() {
|
|
1854
1862
|
}
|
|
1855
|
-
a =
|
|
1863
|
+
a = U(a);
|
|
1856
1864
|
e.values = {};
|
|
1857
1865
|
Eb(b, {name:a, constructor:e, fromWireType:function(f) {
|
|
1858
1866
|
return this.constructor.values[f];
|
|
1859
|
-
}, toWireType:(f, m) => m.value, argPackAdvance:8, readValueFromPointer:gc(a, c, d),
|
|
1867
|
+
}, toWireType:(f, m) => m.value, argPackAdvance:8, readValueFromPointer:gc(a, c, d), B:null,});
|
|
1860
1868
|
Jb(a, e);
|
|
1861
1869
|
}, _embind_register_enum_value:(b, a, c) => {
|
|
1862
|
-
var d =
|
|
1863
|
-
a =
|
|
1870
|
+
var d = nb(b, "enum");
|
|
1871
|
+
a = U(a);
|
|
1864
1872
|
b = d.constructor;
|
|
1865
|
-
d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value:
|
|
1873
|
+
d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value:Za(`${d.name}_${a}`, function() {
|
|
1866
1874
|
})},});
|
|
1867
1875
|
b.values[c] = d;
|
|
1868
1876
|
b[a] = d;
|
|
1869
1877
|
}, _embind_register_float:(b, a, c) => {
|
|
1870
|
-
a =
|
|
1871
|
-
Eb(b, {name:a, fromWireType:d => d, toWireType:(d, e) => e, argPackAdvance:8, readValueFromPointer:hc(a, c),
|
|
1878
|
+
a = U(a);
|
|
1879
|
+
Eb(b, {name:a, fromWireType:d => d, toWireType:(d, e) => e, argPackAdvance:8, readValueFromPointer:hc(a, c), B:null,});
|
|
1872
1880
|
}, _embind_register_function:(b, a, c, d, e, f) => {
|
|
1873
1881
|
var m = bc(a, c);
|
|
1874
|
-
b =
|
|
1882
|
+
b = U(b);
|
|
1875
1883
|
b = cc(b);
|
|
1876
1884
|
e = Y(d, e);
|
|
1877
1885
|
Jb(b, function() {
|
|
@@ -1882,7 +1890,7 @@ var Pc = {_abort_js:() => {
|
|
|
1882
1890
|
return [];
|
|
1883
1891
|
});
|
|
1884
1892
|
}, _embind_register_integer:(b, a, c, d, e) => {
|
|
1885
|
-
a =
|
|
1893
|
+
a = U(a);
|
|
1886
1894
|
-1 === e && (e = 4294967295);
|
|
1887
1895
|
e = h => h;
|
|
1888
1896
|
if (0 === d) {
|
|
@@ -1894,16 +1902,16 @@ var Pc = {_abort_js:() => {
|
|
|
1894
1902
|
} : function(h, l) {
|
|
1895
1903
|
return l;
|
|
1896
1904
|
};
|
|
1897
|
-
Eb(b, {name:a, fromWireType:e, toWireType:m, argPackAdvance:8, readValueFromPointer:ic(a, c, 0 !== d),
|
|
1905
|
+
Eb(b, {name:a, fromWireType:e, toWireType:m, argPackAdvance:8, readValueFromPointer:ic(a, c, 0 !== d), B:null,});
|
|
1898
1906
|
}, _embind_register_memory_view:(b, a, c) => {
|
|
1899
1907
|
function d(f) {
|
|
1900
|
-
return new e(
|
|
1908
|
+
return new e(Da.buffer, O[f + 4 >> 2], O[f >> 2]);
|
|
1901
1909
|
}
|
|
1902
1910
|
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][a];
|
|
1903
|
-
c =
|
|
1904
|
-
Eb(b, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {
|
|
1911
|
+
c = U(c);
|
|
1912
|
+
Eb(b, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Va:!0,});
|
|
1905
1913
|
}, _embind_register_std_string:(b, a) => {
|
|
1906
|
-
a =
|
|
1914
|
+
a = U(a);
|
|
1907
1915
|
var c = "std::string" === a;
|
|
1908
1916
|
Eb(b, {name:a, fromWireType:function(d) {
|
|
1909
1917
|
var e = O[d >> 2], f = d + 4;
|
|
@@ -1911,7 +1919,7 @@ var Pc = {_abort_js:() => {
|
|
|
1911
1919
|
for (var m = f, h = 0; h <= e; ++h) {
|
|
1912
1920
|
var l = f + h;
|
|
1913
1921
|
if (h == e || 0 == J[l]) {
|
|
1914
|
-
m = m ?
|
|
1922
|
+
m = m ? pc(J, m, l - m) : "";
|
|
1915
1923
|
if (void 0 === n) {
|
|
1916
1924
|
var n = m;
|
|
1917
1925
|
} else {
|
|
@@ -1927,7 +1935,7 @@ var Pc = {_abort_js:() => {
|
|
|
1927
1935
|
}
|
|
1928
1936
|
n = n.join("");
|
|
1929
1937
|
}
|
|
1930
|
-
|
|
1938
|
+
lb(d);
|
|
1931
1939
|
return n;
|
|
1932
1940
|
}, toWireType:function(d, e) {
|
|
1933
1941
|
e instanceof ArrayBuffer && (e = new Uint8Array(e));
|
|
@@ -1936,7 +1944,7 @@ var Pc = {_abort_js:() => {
|
|
|
1936
1944
|
throw new Q("Cannot pass non-string to std::string");
|
|
1937
1945
|
}
|
|
1938
1946
|
var m = c && f ? kc(e) : e.length;
|
|
1939
|
-
var h =
|
|
1947
|
+
var h = Pc(4 + m + 1), l = h + 4;
|
|
1940
1948
|
O[h >> 2] = m;
|
|
1941
1949
|
if (c && f) {
|
|
1942
1950
|
jc(e, J, l, m + 1);
|
|
@@ -1945,7 +1953,7 @@ var Pc = {_abort_js:() => {
|
|
|
1945
1953
|
for (f = 0; f < m; ++f) {
|
|
1946
1954
|
var n = e.charCodeAt(f);
|
|
1947
1955
|
if (255 < n) {
|
|
1948
|
-
throw
|
|
1956
|
+
throw lb(l), new Q("String has UTF-16 code units that do not fit in 8 bits");
|
|
1949
1957
|
}
|
|
1950
1958
|
J[l + f] = n;
|
|
1951
1959
|
}
|
|
@@ -1955,20 +1963,20 @@ var Pc = {_abort_js:() => {
|
|
|
1955
1963
|
}
|
|
1956
1964
|
}
|
|
1957
1965
|
}
|
|
1958
|
-
null !== d && d.push(
|
|
1966
|
+
null !== d && d.push(lb, h);
|
|
1959
1967
|
return h;
|
|
1960
|
-
}, argPackAdvance:8, readValueFromPointer:Bb,
|
|
1961
|
-
|
|
1968
|
+
}, argPackAdvance:8, readValueFromPointer:Bb, B(d) {
|
|
1969
|
+
lb(d);
|
|
1962
1970
|
},});
|
|
1963
1971
|
}, _embind_register_std_wstring:(b, a, c) => {
|
|
1964
|
-
c =
|
|
1972
|
+
c = U(c);
|
|
1965
1973
|
if (2 === a) {
|
|
1966
|
-
var d =
|
|
1967
|
-
var e =
|
|
1968
|
-
var f =
|
|
1969
|
-
var m = h =>
|
|
1974
|
+
var d = rc;
|
|
1975
|
+
var e = sc;
|
|
1976
|
+
var f = tc;
|
|
1977
|
+
var m = h => Fa[h >> 1];
|
|
1970
1978
|
} else {
|
|
1971
|
-
4 === a && (d =
|
|
1979
|
+
4 === a && (d = uc, e = vc, f = wc, m = h => O[h >> 2]);
|
|
1972
1980
|
}
|
|
1973
1981
|
Eb(b, {name:c, fromWireType:h => {
|
|
1974
1982
|
for (var l = O[h >> 2], n, r = h + 4, w = 0; w <= l; ++w) {
|
|
@@ -1977,72 +1985,72 @@ var Pc = {_abort_js:() => {
|
|
|
1977
1985
|
r = d(r, y - r), void 0 === n ? n = r : (n += String.fromCharCode(0), n += r), r = y + a;
|
|
1978
1986
|
}
|
|
1979
1987
|
}
|
|
1980
|
-
|
|
1988
|
+
lb(h);
|
|
1981
1989
|
return n;
|
|
1982
1990
|
}, toWireType:(h, l) => {
|
|
1983
1991
|
if ("string" != typeof l) {
|
|
1984
1992
|
throw new Q(`Cannot pass non-string to C++ string type ${c}`);
|
|
1985
1993
|
}
|
|
1986
|
-
var n = f(l), r =
|
|
1994
|
+
var n = f(l), r = Pc(4 + n + a);
|
|
1987
1995
|
O[r >> 2] = n / a;
|
|
1988
1996
|
e(l, r + 4, n + a);
|
|
1989
|
-
null !== h && h.push(
|
|
1997
|
+
null !== h && h.push(lb, r);
|
|
1990
1998
|
return r;
|
|
1991
|
-
}, argPackAdvance:8, readValueFromPointer:Bb,
|
|
1992
|
-
|
|
1999
|
+
}, argPackAdvance:8, readValueFromPointer:Bb, B(h) {
|
|
2000
|
+
lb(h);
|
|
1993
2001
|
}});
|
|
1994
2002
|
}, _embind_register_value_object:(b, a, c, d, e, f) => {
|
|
1995
|
-
zb[b] = {name:
|
|
2003
|
+
zb[b] = {name:U(a), fa:Y(c, d), D:Y(e, f), sa:[],};
|
|
1996
2004
|
}, _embind_register_value_object_field:(b, a, c, d, e, f, m, h, l, n) => {
|
|
1997
|
-
zb[b].
|
|
2005
|
+
zb[b].sa.push({Oa:U(a), Ua:c, Sa:Y(d, e), Ta:f, eb:m, cb:Y(h, l), fb:n,});
|
|
1998
2006
|
}, _embind_register_void:(b, a) => {
|
|
1999
|
-
a =
|
|
2000
|
-
Eb(b, {
|
|
2007
|
+
a = U(a);
|
|
2008
|
+
Eb(b, {mb:!0, name:a, argPackAdvance:0, fromWireType:() => {
|
|
2001
2009
|
}, toWireType:() => {
|
|
2002
2010
|
},});
|
|
2003
2011
|
}, _emscripten_get_now_is_monotonic:() => 1, _emscripten_memcpy_js:(b, a, c) => J.copyWithin(b, a, a + c), _emval_as:(b, a, c) => {
|
|
2004
|
-
b =
|
|
2005
|
-
a =
|
|
2006
|
-
return
|
|
2012
|
+
b = T(b);
|
|
2013
|
+
a = nb(a, "emval::as");
|
|
2014
|
+
return xc(a, c, b);
|
|
2007
2015
|
}, _emval_call_method:(b, a, c, d, e) => {
|
|
2008
|
-
b =
|
|
2009
|
-
a =
|
|
2010
|
-
c =
|
|
2016
|
+
b = Ac[b];
|
|
2017
|
+
a = T(a);
|
|
2018
|
+
c = zc(c);
|
|
2011
2019
|
return b(a, a[c], d, e);
|
|
2012
2020
|
}, _emval_decref:ec, _emval_get_method_caller:(b, a, c) => {
|
|
2013
|
-
var d =
|
|
2021
|
+
var d = Cc(b, a), e = d.shift();
|
|
2014
2022
|
b--;
|
|
2015
2023
|
var f = Array(b);
|
|
2016
2024
|
a = `methodCaller<(${d.map(m => m.name).join(", ")}) => ${e.name}>`;
|
|
2017
|
-
return
|
|
2025
|
+
return Bc(Za(a, (m, h, l, n) => {
|
|
2018
2026
|
for (var r = 0, w = 0; w < b; ++w) {
|
|
2019
2027
|
f[w] = d[w].readValueFromPointer(n + r), r += d[w].argPackAdvance;
|
|
2020
2028
|
}
|
|
2021
|
-
m = 1 === c ?
|
|
2022
|
-
return
|
|
2029
|
+
m = 1 === c ? Dc(h, f) : h.apply(m, f);
|
|
2030
|
+
return xc(e, l, m);
|
|
2023
2031
|
}));
|
|
2024
2032
|
}, _emval_get_module_property:b => {
|
|
2025
|
-
b =
|
|
2026
|
-
return
|
|
2033
|
+
b = zc(b);
|
|
2034
|
+
return ab(k[b]);
|
|
2027
2035
|
}, _emval_get_property:(b, a) => {
|
|
2028
|
-
b =
|
|
2029
|
-
a =
|
|
2030
|
-
return
|
|
2036
|
+
b = T(b);
|
|
2037
|
+
a = T(a);
|
|
2038
|
+
return ab(b[a]);
|
|
2031
2039
|
}, _emval_incref:b => {
|
|
2032
2040
|
9 < b && (P[b + 1] += 1);
|
|
2033
|
-
}, _emval_new_array:() =>
|
|
2034
|
-
var a =
|
|
2041
|
+
}, _emval_new_array:() => ab([]), _emval_new_cstring:b => ab(zc(b)), _emval_new_object:() => ab({}), _emval_run_destructors:b => {
|
|
2042
|
+
var a = T(b);
|
|
2035
2043
|
Ab(a);
|
|
2036
2044
|
ec(b);
|
|
2037
2045
|
}, _emval_set_property:(b, a, c) => {
|
|
2038
|
-
b =
|
|
2039
|
-
a =
|
|
2040
|
-
c =
|
|
2046
|
+
b = T(b);
|
|
2047
|
+
a = T(a);
|
|
2048
|
+
c = T(c);
|
|
2041
2049
|
b[a] = c;
|
|
2042
2050
|
}, _emval_take_value:(b, a) => {
|
|
2043
|
-
b =
|
|
2051
|
+
b = nb(b, "_emval_take_value");
|
|
2044
2052
|
b = b.readValueFromPointer(a);
|
|
2045
|
-
return
|
|
2053
|
+
return ab(b);
|
|
2046
2054
|
}, emscripten_date_now:() => Date.now(), emscripten_get_now:() => performance.now(), emscripten_resize_heap:b => {
|
|
2047
2055
|
var a = J.length;
|
|
2048
2056
|
b >>>= 0;
|
|
@@ -2055,10 +2063,10 @@ var Pc = {_abort_js:() => {
|
|
|
2055
2063
|
var e = Math;
|
|
2056
2064
|
d = Math.max(b, d);
|
|
2057
2065
|
a: {
|
|
2058
|
-
e = (e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536) -
|
|
2066
|
+
e = (e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536) - Ba.buffer.byteLength + 65535) / 65536;
|
|
2059
2067
|
try {
|
|
2060
|
-
|
|
2061
|
-
|
|
2068
|
+
Ba.grow(e);
|
|
2069
|
+
Ja();
|
|
2062
2070
|
var f = 1;
|
|
2063
2071
|
break a;
|
|
2064
2072
|
} catch (m) {
|
|
@@ -2072,18 +2080,18 @@ var Pc = {_abort_js:() => {
|
|
|
2072
2080
|
return !1;
|
|
2073
2081
|
}, environ_get:(b, a) => {
|
|
2074
2082
|
var c = 0;
|
|
2075
|
-
|
|
2083
|
+
Gc().forEach((d, e) => {
|
|
2076
2084
|
var f = a + c;
|
|
2077
2085
|
e = O[b + 4 * e >> 2] = f;
|
|
2078
2086
|
for (f = 0; f < d.length; ++f) {
|
|
2079
|
-
|
|
2087
|
+
Da[e++] = d.charCodeAt(f);
|
|
2080
2088
|
}
|
|
2081
|
-
|
|
2089
|
+
Da[e] = 0;
|
|
2082
2090
|
c += d.length + 1;
|
|
2083
2091
|
});
|
|
2084
2092
|
return 0;
|
|
2085
2093
|
}, environ_sizes_get:(b, a) => {
|
|
2086
|
-
var c =
|
|
2094
|
+
var c = Gc();
|
|
2087
2095
|
O[b >> 2] = c.length;
|
|
2088
2096
|
var d = 0;
|
|
2089
2097
|
c.forEach(e => d += e.length + 1);
|
|
@@ -2096,55 +2104,55 @@ var Pc = {_abort_js:() => {
|
|
|
2096
2104
|
var m = O[a >> 2], h = O[a + 4 >> 2];
|
|
2097
2105
|
a += 8;
|
|
2098
2106
|
for (var l = 0; l < h; l++) {
|
|
2099
|
-
var n = J[m + l], r =
|
|
2100
|
-
0 === n || 10 === n ? ((1 === b ?
|
|
2107
|
+
var n = J[m + l], r = Hc[b];
|
|
2108
|
+
0 === n || 10 === n ? ((1 === b ? ya : za)(pc(r, 0)), r.length = 0) : r.push(n);
|
|
2101
2109
|
}
|
|
2102
2110
|
e += h;
|
|
2103
2111
|
}
|
|
2104
2112
|
O[d >> 2] = e;
|
|
2105
2113
|
return 0;
|
|
2106
|
-
}, strftime_l:(b, a, c, d) =>
|
|
2114
|
+
}, strftime_l:(b, a, c, d) => Mc(b, a, c, d)}, Z = function() {
|
|
2107
2115
|
function b(c) {
|
|
2108
2116
|
Z = c.exports;
|
|
2109
|
-
|
|
2110
|
-
|
|
2117
|
+
Ba = Z.memory;
|
|
2118
|
+
Ja();
|
|
2111
2119
|
Ub = Z.__indirect_function_table;
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
k.monitorRunDependencies?.(
|
|
2115
|
-
0 ==
|
|
2120
|
+
La.unshift(Z.__wasm_call_ctors);
|
|
2121
|
+
Oa--;
|
|
2122
|
+
k.monitorRunDependencies?.(Oa);
|
|
2123
|
+
0 == Oa && (null !== Pa && (clearInterval(Pa), Pa = null), Qa && (c = Qa, Qa = null, c()));
|
|
2116
2124
|
return Z;
|
|
2117
2125
|
}
|
|
2118
|
-
var a = {env:
|
|
2119
|
-
|
|
2120
|
-
k.monitorRunDependencies?.(
|
|
2126
|
+
var a = {env:Qc, wasi_snapshot_preview1:Qc,};
|
|
2127
|
+
Oa++;
|
|
2128
|
+
k.monitorRunDependencies?.(Oa);
|
|
2121
2129
|
if (k.instantiateWasm) {
|
|
2122
2130
|
try {
|
|
2123
2131
|
return k.instantiateWasm(a, b);
|
|
2124
2132
|
} catch (c) {
|
|
2125
|
-
|
|
2133
|
+
za(`Module.instantiateWasm callback failed with error: ${c}`), ba(c);
|
|
2126
2134
|
}
|
|
2127
2135
|
}
|
|
2128
|
-
|
|
2129
|
-
|
|
2136
|
+
Ta ||= Sa("canvas_advanced.wasm") ? "canvas_advanced.wasm" : k.locateFile ? k.locateFile("canvas_advanced.wasm", x) : x + "canvas_advanced.wasm";
|
|
2137
|
+
Xa(a, function(c) {
|
|
2130
2138
|
b(c.instance);
|
|
2131
2139
|
}).catch(ba);
|
|
2132
2140
|
return {};
|
|
2133
|
-
}(),
|
|
2141
|
+
}(), lb = b => (lb = Z.free)(b), Pc = b => (Pc = Z.malloc)(b), kb = b => (kb = Z.__getTypeName)(b);
|
|
2134
2142
|
k.dynCall_jiji = (b, a, c, d, e) => (k.dynCall_jiji = Z.dynCall_jiji)(b, a, c, d, e);
|
|
2135
2143
|
k.dynCall_viijii = (b, a, c, d, e, f, m) => (k.dynCall_viijii = Z.dynCall_viijii)(b, a, c, d, e, f, m);
|
|
2136
2144
|
k.dynCall_iiiiij = (b, a, c, d, e, f, m) => (k.dynCall_iiiiij = Z.dynCall_iiiiij)(b, a, c, d, e, f, m);
|
|
2137
2145
|
k.dynCall_iiiiijj = (b, a, c, d, e, f, m, h, l) => (k.dynCall_iiiiijj = Z.dynCall_iiiiijj)(b, a, c, d, e, f, m, h, l);
|
|
2138
2146
|
k.dynCall_iiiiiijj = (b, a, c, d, e, f, m, h, l, n) => (k.dynCall_iiiiiijj = Z.dynCall_iiiiiijj)(b, a, c, d, e, f, m, h, l, n);
|
|
2139
|
-
var
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2147
|
+
var Rc;
|
|
2148
|
+
Qa = function Sc() {
|
|
2149
|
+
Rc || Tc();
|
|
2150
|
+
Rc || (Qa = Sc);
|
|
2143
2151
|
};
|
|
2144
|
-
function
|
|
2152
|
+
function Tc() {
|
|
2145
2153
|
function b() {
|
|
2146
|
-
if (!
|
|
2147
|
-
|
|
2154
|
+
if (!Rc && (Rc = !0, k.calledRun = !0, !Ca)) {
|
|
2155
|
+
Ya(La);
|
|
2148
2156
|
aa(k);
|
|
2149
2157
|
if (k.onRuntimeInitialized) {
|
|
2150
2158
|
k.onRuntimeInitialized();
|
|
@@ -2152,20 +2160,20 @@ function Sc() {
|
|
|
2152
2160
|
if (k.postRun) {
|
|
2153
2161
|
for ("function" == typeof k.postRun && (k.postRun = [k.postRun]); k.postRun.length;) {
|
|
2154
2162
|
var a = k.postRun.shift();
|
|
2155
|
-
|
|
2163
|
+
Ma.unshift(a);
|
|
2156
2164
|
}
|
|
2157
2165
|
}
|
|
2158
|
-
|
|
2166
|
+
Ya(Ma);
|
|
2159
2167
|
}
|
|
2160
2168
|
}
|
|
2161
|
-
if (!(0 <
|
|
2169
|
+
if (!(0 < Oa)) {
|
|
2162
2170
|
if (k.preRun) {
|
|
2163
2171
|
for ("function" == typeof k.preRun && (k.preRun = [k.preRun]); k.preRun.length;) {
|
|
2164
|
-
|
|
2172
|
+
Na();
|
|
2165
2173
|
}
|
|
2166
2174
|
}
|
|
2167
|
-
|
|
2168
|
-
0 <
|
|
2175
|
+
Ya(Ka);
|
|
2176
|
+
0 < Oa || (k.setStatus ? (k.setStatus("Running..."), setTimeout(function() {
|
|
2169
2177
|
setTimeout(function() {
|
|
2170
2178
|
k.setStatus("");
|
|
2171
2179
|
}, 1);
|
|
@@ -2178,7 +2186,7 @@ if (k.preInit) {
|
|
|
2178
2186
|
k.preInit.pop()();
|
|
2179
2187
|
}
|
|
2180
2188
|
}
|
|
2181
|
-
|
|
2189
|
+
Tc();
|
|
2182
2190
|
moduleRtn = ca;
|
|
2183
2191
|
|
|
2184
2192
|
|
|
@@ -2194,7 +2202,7 @@ moduleRtn = ca;
|
|
|
2194
2202
|
/* 2 */
|
|
2195
2203
|
/***/ ((module) => {
|
|
2196
2204
|
|
|
2197
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.
|
|
2205
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.34.1","description":"A lite version of Rive\'s canvas 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)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
2198
2206
|
|
|
2199
2207
|
/***/ }),
|
|
2200
2208
|
/* 3 */
|
|
@@ -3437,9 +3445,18 @@ var BindableArtboard = /** @class */ (function (_super) {
|
|
|
3437
3445
|
_this.nativeArtboard = artboard;
|
|
3438
3446
|
return _this;
|
|
3439
3447
|
}
|
|
3448
|
+
Object.defineProperty(BindableArtboard.prototype, "viewModel", {
|
|
3449
|
+
set: function (value) {
|
|
3450
|
+
this.nativeViewModel = value.nativeInstance;
|
|
3451
|
+
},
|
|
3452
|
+
enumerable: false,
|
|
3453
|
+
configurable: true
|
|
3454
|
+
});
|
|
3440
3455
|
BindableArtboard.prototype.destroy = function () {
|
|
3456
|
+
var _a;
|
|
3441
3457
|
if (this.selfUnref) {
|
|
3442
3458
|
this.nativeArtboard.unref();
|
|
3459
|
+
(_a = this.nativeViewModel) === null || _a === void 0 ? void 0 : _a.unref();
|
|
3443
3460
|
}
|
|
3444
3461
|
};
|
|
3445
3462
|
return BindableArtboard;
|
|
@@ -4475,6 +4492,13 @@ var RiveFile = /** @class */ (function () {
|
|
|
4475
4492
|
var nativeBindableArtboard = this.file.internalBindableArtboardFromArtboard(artboard);
|
|
4476
4493
|
return this.createBindableArtboard(nativeBindableArtboard);
|
|
4477
4494
|
};
|
|
4495
|
+
RiveFile.prototype.viewModelByName = function (name) {
|
|
4496
|
+
var viewModel = this.file.viewModelByName(name);
|
|
4497
|
+
if (viewModel !== null) {
|
|
4498
|
+
return new ViewModel(viewModel);
|
|
4499
|
+
}
|
|
4500
|
+
return null;
|
|
4501
|
+
};
|
|
4478
4502
|
// Error message for missing source or buffer
|
|
4479
4503
|
RiveFile.missingErrorMessage = "Rive source file or data buffer required";
|
|
4480
4504
|
// Error message for file load error
|
|
@@ -4521,6 +4545,12 @@ var Rive = /** @class */ (function () {
|
|
|
4521
4545
|
this._devicePixelRatioUsed = 1;
|
|
4522
4546
|
// Whether the canvas element's size is 0
|
|
4523
4547
|
this._hasZeroSize = false;
|
|
4548
|
+
// Whether a draw operation needs to be forced
|
|
4549
|
+
this._needsRedraw = false;
|
|
4550
|
+
// Canvas width and height. Values are lazily updated so they might
|
|
4551
|
+
// not be in sync with current canvas size.
|
|
4552
|
+
this._currentCanvasWidth = 0;
|
|
4553
|
+
this._currentCanvasHeight = 0;
|
|
4524
4554
|
// Audio event listener
|
|
4525
4555
|
this._audioEventListener = null;
|
|
4526
4556
|
// draw method bound to the class
|
|
@@ -4555,6 +4585,8 @@ var Rive = /** @class */ (function () {
|
|
|
4555
4585
|
if (params.canvas.constructor === HTMLCanvasElement) {
|
|
4556
4586
|
this._observed = observers.add(this.canvas, this.onCanvasResize);
|
|
4557
4587
|
}
|
|
4588
|
+
this._currentCanvasWidth = this.canvas.width;
|
|
4589
|
+
this._currentCanvasHeight = this.canvas.height;
|
|
4558
4590
|
this.src = params.src;
|
|
4559
4591
|
this.buffer = params.buffer;
|
|
4560
4592
|
this.riveFile = params.riveFile;
|
|
@@ -4895,6 +4927,20 @@ var Rive = /** @class */ (function () {
|
|
|
4895
4927
|
this.scheduleRendering();
|
|
4896
4928
|
}
|
|
4897
4929
|
};
|
|
4930
|
+
Rive.prototype._canvasSizeChanged = function () {
|
|
4931
|
+
var changed = false;
|
|
4932
|
+
if (this.canvas) {
|
|
4933
|
+
if (this.canvas.width !== this._currentCanvasWidth) {
|
|
4934
|
+
this._currentCanvasWidth = this.canvas.width;
|
|
4935
|
+
changed = true;
|
|
4936
|
+
}
|
|
4937
|
+
if (this.canvas.height !== this._currentCanvasHeight) {
|
|
4938
|
+
this._currentCanvasHeight = this.canvas.height;
|
|
4939
|
+
changed = true;
|
|
4940
|
+
}
|
|
4941
|
+
}
|
|
4942
|
+
return changed;
|
|
4943
|
+
};
|
|
4898
4944
|
/**
|
|
4899
4945
|
* Draw rendering loop; renders animation frames at the correct time interval.
|
|
4900
4946
|
* @param time the time at which to render a frame
|
|
@@ -4983,7 +5029,9 @@ var Rive = /** @class */ (function () {
|
|
|
4983
5029
|
if (!this._hasZeroSize) {
|
|
4984
5030
|
// If there was no dirt on this frame, do not clear and draw
|
|
4985
5031
|
if (this.drawOptimization == DrawOptimizationOptions.AlwaysDraw ||
|
|
4986
|
-
this.artboard.didChange()
|
|
5032
|
+
this.artboard.didChange() ||
|
|
5033
|
+
this._needsRedraw ||
|
|
5034
|
+
this._canvasSizeChanged()) {
|
|
4987
5035
|
// Canvas must be wiped to prevent artifacts
|
|
4988
5036
|
renderer.clear();
|
|
4989
5037
|
renderer.save();
|
|
@@ -4992,6 +5040,7 @@ var Rive = /** @class */ (function () {
|
|
|
4992
5040
|
this.artboard.draw(renderer);
|
|
4993
5041
|
renderer.restore();
|
|
4994
5042
|
renderer.flush();
|
|
5043
|
+
this._needsRedraw = false;
|
|
4995
5044
|
}
|
|
4996
5045
|
}
|
|
4997
5046
|
// Check for any animations that looped
|
|
@@ -5316,6 +5365,7 @@ var Rive = /** @class */ (function () {
|
|
|
5316
5365
|
this.devicePixelRatioUsed = dpr;
|
|
5317
5366
|
this.canvas.width = dpr * width;
|
|
5318
5367
|
this.canvas.height = dpr * height;
|
|
5368
|
+
this._needsRedraw = true;
|
|
5319
5369
|
this.resizeToCanvas();
|
|
5320
5370
|
this.drawFrame();
|
|
5321
5371
|
if (this.layout.fit === Fit.Layout) {
|
|
@@ -5612,7 +5662,8 @@ var Rive = /** @class */ (function () {
|
|
|
5612
5662
|
* @returns true if no animations are playing or paused
|
|
5613
5663
|
*/
|
|
5614
5664
|
get: function () {
|
|
5615
|
-
|
|
5665
|
+
var _a, _b;
|
|
5666
|
+
return (_b = (_a = this.animator) === null || _a === void 0 ? void 0 : _a.isStopped) !== null && _b !== void 0 ? _b : true;
|
|
5616
5667
|
},
|
|
5617
5668
|
enumerable: false,
|
|
5618
5669
|
configurable: true
|
|
@@ -5914,11 +5965,8 @@ var Rive = /** @class */ (function () {
|
|
|
5914
5965
|
return null;
|
|
5915
5966
|
};
|
|
5916
5967
|
Rive.prototype.viewModelByName = function (name) {
|
|
5917
|
-
var
|
|
5918
|
-
|
|
5919
|
-
return new ViewModel(viewModel);
|
|
5920
|
-
}
|
|
5921
|
-
return null;
|
|
5968
|
+
var _a;
|
|
5969
|
+
return (_a = this.riveFile) === null || _a === void 0 ? void 0 : _a.viewModelByName(name);
|
|
5922
5970
|
};
|
|
5923
5971
|
Rive.prototype.enums = function () {
|
|
5924
5972
|
if (this._dataEnums === null) {
|
|
@@ -6761,7 +6809,7 @@ var ViewModelInstanceArtboard = /** @class */ (function (_super) {
|
|
|
6761
6809
|
}
|
|
6762
6810
|
Object.defineProperty(ViewModelInstanceArtboard.prototype, "value", {
|
|
6763
6811
|
set: function (artboard) {
|
|
6764
|
-
var _a;
|
|
6812
|
+
var _a, _b;
|
|
6765
6813
|
var bindableArtboard;
|
|
6766
6814
|
if (artboard.isBindableArtboard) {
|
|
6767
6815
|
bindableArtboard = artboard;
|
|
@@ -6770,6 +6818,9 @@ var ViewModelInstanceArtboard = /** @class */ (function (_super) {
|
|
|
6770
6818
|
bindableArtboard = artboard.file.internalBindableArtboardFromArtboard(artboard.nativeArtboard);
|
|
6771
6819
|
}
|
|
6772
6820
|
this._viewModelInstanceValue.value((_a = bindableArtboard === null || bindableArtboard === void 0 ? void 0 : bindableArtboard.nativeArtboard) !== null && _a !== void 0 ? _a : null);
|
|
6821
|
+
if (bindableArtboard === null || bindableArtboard === void 0 ? void 0 : bindableArtboard.nativeViewModel) {
|
|
6822
|
+
this._viewModelInstanceValue.viewModelInstance((_b = bindableArtboard === null || bindableArtboard === void 0 ? void 0 : bindableArtboard.nativeViewModel) !== null && _b !== void 0 ? _b : null);
|
|
6823
|
+
}
|
|
6773
6824
|
},
|
|
6774
6825
|
enumerable: false,
|
|
6775
6826
|
configurable: true
|