@rive-app/canvas-lite 2.39.2 → 2.40.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.js +167 -2225
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_fallback.wasm +0 -0
- package/utils/registerKeyboardInteractions.d.ts +46 -21
package/rive.js
CHANGED
|
@@ -349,2196 +349,99 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
349
349
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
350
350
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
351
351
|
/* harmony export */ });
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
function(
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}),
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
}
|
|
425
|
-
const
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
k.ptrToAsset = f => {
|
|
446
|
-
let l = k.ptrToFileAsset(f);
|
|
447
|
-
return l.isImage ? k.ptrToImageAsset(f) : l.isFont ? k.ptrToFontAsset(f) : l.isAudio ? k.ptrToAudioAsset(f) : l;
|
|
448
|
-
};
|
|
449
|
-
k.CustomFileAssetLoader = d.extend("CustomFileAssetLoader", {__construct:function({loadContents:f}) {
|
|
450
|
-
this.__parent.__construct.call(this);
|
|
451
|
-
this.Ea = f;
|
|
452
|
-
}, loadContents:function(f, l) {
|
|
453
|
-
f = k.ptrToAsset(f);
|
|
454
|
-
return this.Ea(f, l);
|
|
455
|
-
},});
|
|
456
|
-
k.CDNFileAssetLoader = d.extend("CDNFileAssetLoader", {__construct:function() {
|
|
457
|
-
this.__parent.__construct.call(this);
|
|
458
|
-
}, loadContents:function(f) {
|
|
459
|
-
let l = k.ptrToAsset(f);
|
|
460
|
-
f = l.cdnUuid;
|
|
461
|
-
if ("" === f) {
|
|
462
|
-
return !1;
|
|
463
|
-
}
|
|
464
|
-
(function(h, n) {
|
|
465
|
-
var m = new XMLHttpRequest();
|
|
466
|
-
m.responseType = "arraybuffer";
|
|
467
|
-
m.onreadystatechange = function() {
|
|
468
|
-
4 == m.readyState && 200 == m.status && n(m);
|
|
469
|
-
};
|
|
470
|
-
m.open("GET", h, !0);
|
|
471
|
-
m.send(null);
|
|
472
|
-
})(l.cdnBaseUrl + "/" + f, h => {
|
|
473
|
-
l.decode(new Uint8Array(h.response));
|
|
474
|
-
});
|
|
475
|
-
return !0;
|
|
476
|
-
},});
|
|
477
|
-
k.FallbackFileAssetLoader = d.extend("FallbackFileAssetLoader", {__construct:function() {
|
|
478
|
-
this.__parent.__construct.call(this);
|
|
479
|
-
this.ua = [];
|
|
480
|
-
}, addLoader:function(f) {
|
|
481
|
-
this.ua.push(f);
|
|
482
|
-
}, loadContents:function(f, l) {
|
|
483
|
-
for (let h of this.ua) {
|
|
484
|
-
if (h.loadContents(f, l)) {
|
|
485
|
-
return !0;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
return !1;
|
|
489
|
-
},});
|
|
490
|
-
let e = k.computeAlignment;
|
|
491
|
-
k.computeAlignment = function(f, l, h, n, m = 1.0) {
|
|
492
|
-
return e.call(this, f, l, h, n, m);
|
|
493
|
-
};
|
|
494
|
-
};
|
|
495
|
-
const pa = "createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "), qa = new function() {
|
|
496
|
-
function b() {
|
|
497
|
-
if (!a) {
|
|
498
|
-
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,};
|
|
499
|
-
let q;
|
|
500
|
-
if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
|
|
501
|
-
if (q = g.getContext("webgl", t), c = 1, !q) {
|
|
502
|
-
return console.log("No WebGL support. Image mesh will not be drawn."), !1;
|
|
503
|
-
}
|
|
504
|
-
} else {
|
|
505
|
-
if (q = g.getContext("webgl2", t)) {
|
|
506
|
-
c = 2;
|
|
507
|
-
} else {
|
|
508
|
-
if (q = g.getContext("webgl", t)) {
|
|
509
|
-
c = 1;
|
|
510
|
-
} else {
|
|
511
|
-
return console.log("No WebGL support. Image mesh will not be drawn."), !1;
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
q = new Proxy(q, {get(F, v) {
|
|
516
|
-
if (F.isContextLost()) {
|
|
517
|
-
if (n || (console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ", v), n = !0), "function" === typeof F[v]) {
|
|
518
|
-
return function() {
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
} else {
|
|
522
|
-
return "function" === typeof F[v] ? function(...H) {
|
|
523
|
-
return F[v].apply(F, H);
|
|
524
|
-
} : F[v];
|
|
525
|
-
}
|
|
526
|
-
}, set(F, v, H) {
|
|
527
|
-
if (F.isContextLost()) {
|
|
528
|
-
n || (console.error("Cannot render the mesh because the GL Context was lost. Tried to set property " + v), n = !0);
|
|
529
|
-
} else {
|
|
530
|
-
return F[v] = H, !0;
|
|
531
|
-
}
|
|
532
|
-
},});
|
|
533
|
-
d = Math.min(q.getParameter(q.MAX_RENDERBUFFER_SIZE), q.getParameter(q.MAX_TEXTURE_SIZE));
|
|
534
|
-
function G(F, v, H) {
|
|
535
|
-
v = q.createShader(v);
|
|
536
|
-
q.shaderSource(v, H);
|
|
537
|
-
q.compileShader(v);
|
|
538
|
-
H = q.getShaderInfoLog(v);
|
|
539
|
-
if (0 < (H || "").length) {
|
|
540
|
-
throw H;
|
|
541
|
-
}
|
|
542
|
-
q.attachShader(F, v);
|
|
543
|
-
}
|
|
544
|
-
g = q.createProgram();
|
|
545
|
-
G(g, q.VERTEX_SHADER, "attribute vec2 vertex;\n attribute vec2 uv;\n uniform vec4 mat;\n uniform vec2 translate;\n varying vec2 st;\n void main() {\n st = uv;\n gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n }");
|
|
546
|
-
G(g, q.FRAGMENT_SHADER, "precision highp float;\n uniform sampler2D image;\n varying vec2 st;\n void main() {\n gl_FragColor = texture2D(image, st);\n }");
|
|
547
|
-
q.bindAttribLocation(g, 0, "vertex");
|
|
548
|
-
q.bindAttribLocation(g, 1, "uv");
|
|
549
|
-
q.linkProgram(g);
|
|
550
|
-
t = q.getProgramInfoLog(g);
|
|
551
|
-
if (0 < (t || "").trim().length) {
|
|
552
|
-
throw t;
|
|
553
|
-
}
|
|
554
|
-
e = q.getUniformLocation(g, "mat");
|
|
555
|
-
f = q.getUniformLocation(g, "translate");
|
|
556
|
-
q.useProgram(g);
|
|
557
|
-
q.bindBuffer(q.ARRAY_BUFFER, q.createBuffer());
|
|
558
|
-
q.enableVertexAttribArray(0);
|
|
559
|
-
q.enableVertexAttribArray(1);
|
|
560
|
-
q.bindBuffer(q.ELEMENT_ARRAY_BUFFER, q.createBuffer());
|
|
561
|
-
q.uniform1i(q.getUniformLocation(g, "image"), 0);
|
|
562
|
-
q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0);
|
|
563
|
-
a = q;
|
|
564
|
-
}
|
|
565
|
-
return !0;
|
|
566
|
-
}
|
|
567
|
-
let a = null, c = 0, d = 0, e = null, f = null, l = 0, h = 0, n = !1;
|
|
568
|
-
b();
|
|
569
|
-
this.Xa = function() {
|
|
570
|
-
b();
|
|
571
|
-
return d;
|
|
572
|
-
};
|
|
573
|
-
this.Ja = function(g) {
|
|
574
|
-
a.deleteTexture && a.deleteTexture(g);
|
|
575
|
-
};
|
|
576
|
-
this.Ia = function(g) {
|
|
577
|
-
if (!b()) {
|
|
578
|
-
return null;
|
|
579
|
-
}
|
|
580
|
-
const t = a.createTexture();
|
|
581
|
-
if (!t) {
|
|
582
|
-
return null;
|
|
583
|
-
}
|
|
584
|
-
a.bindTexture(a.TEXTURE_2D, t);
|
|
585
|
-
a.texImage2D(a.TEXTURE_2D, 0, a.RGBA, a.RGBA, a.UNSIGNED_BYTE, g);
|
|
586
|
-
a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.CLAMP_TO_EDGE);
|
|
587
|
-
a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.CLAMP_TO_EDGE);
|
|
588
|
-
a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR);
|
|
589
|
-
2 == c ? (a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR_MIPMAP_LINEAR), a.generateMipmap(a.TEXTURE_2D)) : a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR);
|
|
590
|
-
return t;
|
|
591
|
-
};
|
|
592
|
-
const m = new la(8), r = new la(8), w = new la(10), z = new la(10);
|
|
593
|
-
this.Ma = function(g, t, q, G, F) {
|
|
594
|
-
if (b()) {
|
|
595
|
-
var v = m.push(g), H = r.push(t);
|
|
596
|
-
if (a.canvas) {
|
|
597
|
-
if (a.canvas.width != v || a.canvas.height != H) {
|
|
598
|
-
a.canvas.width = v, a.canvas.height = H;
|
|
599
|
-
}
|
|
600
|
-
a.viewport(0, H - t, g, t);
|
|
601
|
-
a.disable(a.SCISSOR_TEST);
|
|
602
|
-
a.clearColor(0, 0, 0, 0);
|
|
603
|
-
a.clear(a.COLOR_BUFFER_BIT);
|
|
604
|
-
a.enable(a.SCISSOR_TEST);
|
|
605
|
-
q.sort((E, V) => V.ya - E.ya);
|
|
606
|
-
v = w.push(G);
|
|
607
|
-
l != v && (a.bufferData(a.ARRAY_BUFFER, 8 * v, a.DYNAMIC_DRAW), l = v);
|
|
608
|
-
v = 0;
|
|
609
|
-
for (var L of q) {
|
|
610
|
-
a.bufferSubData(a.ARRAY_BUFFER, v, L.ia), v += 4 * L.ia.length;
|
|
611
|
-
}
|
|
612
|
-
console.assert(v == 4 * G);
|
|
613
|
-
for (var Q of q) {
|
|
614
|
-
a.bufferSubData(a.ARRAY_BUFFER, v, Q.Ba), v += 4 * Q.Ba.length;
|
|
615
|
-
}
|
|
616
|
-
console.assert(v == 8 * G);
|
|
617
|
-
v = z.push(F);
|
|
618
|
-
h != v && (a.bufferData(a.ELEMENT_ARRAY_BUFFER, 2 * v, a.DYNAMIC_DRAW), h = v);
|
|
619
|
-
L = 0;
|
|
620
|
-
for (var ha of q) {
|
|
621
|
-
a.bufferSubData(a.ELEMENT_ARRAY_BUFFER, L, ha.indices), L += 2 * ha.indices.length;
|
|
622
|
-
}
|
|
623
|
-
console.assert(L == 2 * F);
|
|
624
|
-
ha = 0;
|
|
625
|
-
Q = !0;
|
|
626
|
-
v = L = 0;
|
|
627
|
-
for (const E of q) {
|
|
628
|
-
E.image.da != ha && (a.bindTexture(a.TEXTURE_2D, E.image.ca || null), ha = E.image.da);
|
|
629
|
-
E.$a ? (a.scissor(E.na, H - E.oa - E.ta, E.lb, E.ta), Q = !0) : Q && (a.scissor(0, H - t, g, t), Q = !1);
|
|
630
|
-
q = 2 / g;
|
|
631
|
-
const V = -2 / t;
|
|
632
|
-
a.uniform4f(e, E.N[0] * q * E.X, E.N[1] * V * E.Y, E.N[2] * q * E.X, E.N[3] * V * E.Y);
|
|
633
|
-
a.uniform2f(f, E.N[4] * q * E.X + q * (E.na - E.Ya * E.X) - 1, E.N[5] * V * E.Y + V * (E.oa - E.Za * E.Y) + 1);
|
|
634
|
-
a.vertexAttribPointer(0, 2, a.FLOAT, !1, 0, v);
|
|
635
|
-
a.vertexAttribPointer(1, 2, a.FLOAT, !1, 0, v + 4 * G);
|
|
636
|
-
a.drawElements(a.TRIANGLES, E.indices.length, a.UNSIGNED_SHORT, L);
|
|
637
|
-
v += 4 * E.ia.length;
|
|
638
|
-
L += 2 * E.indices.length;
|
|
639
|
-
}
|
|
640
|
-
console.assert(v == 4 * G);
|
|
641
|
-
console.assert(L == 2 * F);
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
};
|
|
645
|
-
this.canvas = function() {
|
|
646
|
-
return b() && a.canvas;
|
|
647
|
-
};
|
|
648
|
-
}(), ra = k.onRuntimeInitialized;
|
|
649
|
-
k.onRuntimeInitialized = function() {
|
|
650
|
-
function b(p) {
|
|
651
|
-
switch(p) {
|
|
652
|
-
case m.srcOver:
|
|
653
|
-
return "source-over";
|
|
654
|
-
case m.screen:
|
|
655
|
-
return "screen";
|
|
656
|
-
case m.overlay:
|
|
657
|
-
return "overlay";
|
|
658
|
-
case m.darken:
|
|
659
|
-
return "darken";
|
|
660
|
-
case m.lighten:
|
|
661
|
-
return "lighten";
|
|
662
|
-
case m.colorDodge:
|
|
663
|
-
return "color-dodge";
|
|
664
|
-
case m.colorBurn:
|
|
665
|
-
return "color-burn";
|
|
666
|
-
case m.hardLight:
|
|
667
|
-
return "hard-light";
|
|
668
|
-
case m.softLight:
|
|
669
|
-
return "soft-light";
|
|
670
|
-
case m.difference:
|
|
671
|
-
return "difference";
|
|
672
|
-
case m.exclusion:
|
|
673
|
-
return "exclusion";
|
|
674
|
-
case m.multiply:
|
|
675
|
-
return "multiply";
|
|
676
|
-
case m.hue:
|
|
677
|
-
return "hue";
|
|
678
|
-
case m.saturation:
|
|
679
|
-
return "saturation";
|
|
680
|
-
case m.color:
|
|
681
|
-
return "color";
|
|
682
|
-
case m.luminosity:
|
|
683
|
-
return "luminosity";
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
function a(p) {
|
|
687
|
-
return "rgba(" + ((16711680 & p) >>> 16) + "," + ((65280 & p) >>> 8) + "," + ((255 & p) >>> 0) + "," + ((4278190080 & p) >>> 24) / 255 + ")";
|
|
688
|
-
}
|
|
689
|
-
function c() {
|
|
690
|
-
0 < H.length && (qa.Ma(v.drawWidth(), v.drawHeight(), H, L, Q), H = [], Q = L = 0, v.reset(512, 512));
|
|
691
|
-
for (const p of F) {
|
|
692
|
-
for (const u of p.v) {
|
|
693
|
-
u();
|
|
694
|
-
}
|
|
695
|
-
p.v = [];
|
|
696
|
-
}
|
|
697
|
-
F.clear();
|
|
698
|
-
}
|
|
699
|
-
ra && ra();
|
|
700
|
-
var d = k.RenderPaintStyle;
|
|
701
|
-
const e = k.RenderPath, f = k.RenderPaint, l = k.Renderer, h = k.StrokeCap, n = k.StrokeJoin, m = k.BlendMode, r = d.fill, w = d.stroke, z = k.FillRule.evenOdd;
|
|
702
|
-
let g = 1;
|
|
703
|
-
var t = k.RenderImage.extend("CanvasRenderImage", {__construct:function({R:p, W:u} = {}) {
|
|
704
|
-
this.__parent.__construct.call(this);
|
|
705
|
-
this.da = g;
|
|
706
|
-
g = g + 1 & 2147483647 || 1;
|
|
707
|
-
this.R = p;
|
|
708
|
-
this.W = u;
|
|
709
|
-
}, __destruct:function() {
|
|
710
|
-
this.ca && (qa.Ja(this.ca), URL.revokeObjectURL(this.la));
|
|
711
|
-
this.__parent.__destruct.call(this);
|
|
712
|
-
}, decode:function(p) {
|
|
713
|
-
var u = this;
|
|
714
|
-
u.W && u.W(u);
|
|
715
|
-
var D = new Image();
|
|
716
|
-
u.la = URL.createObjectURL(new Blob([p], {type:"image/png",}));
|
|
717
|
-
D.onload = function() {
|
|
718
|
-
u.Da = D;
|
|
719
|
-
u.ca = qa.Ia(D);
|
|
720
|
-
u.size(D.width, D.height);
|
|
721
|
-
u.R && u.R(u);
|
|
722
|
-
};
|
|
723
|
-
D.src = u.la;
|
|
724
|
-
},}), q = e.extend("CanvasRenderPath", {__construct:function() {
|
|
725
|
-
this.__parent.__construct.call(this);
|
|
726
|
-
this.H = new Path2D();
|
|
727
|
-
}, rewind:function() {
|
|
728
|
-
this.H = new Path2D();
|
|
729
|
-
}, addPath:function(p, u, D, B, x, C, A) {
|
|
730
|
-
var I = this.H, na = I.addPath;
|
|
731
|
-
p = p.H;
|
|
732
|
-
const P = new DOMMatrix();
|
|
733
|
-
P.a = u;
|
|
734
|
-
P.b = D;
|
|
735
|
-
P.c = B;
|
|
736
|
-
P.d = x;
|
|
737
|
-
P.e = C;
|
|
738
|
-
P.f = A;
|
|
739
|
-
na.call(I, p, P);
|
|
740
|
-
}, fillRule:function(p) {
|
|
741
|
-
this.ka = p;
|
|
742
|
-
}, moveTo:function(p, u) {
|
|
743
|
-
this.H.moveTo(p, u);
|
|
744
|
-
}, lineTo:function(p, u) {
|
|
745
|
-
this.H.lineTo(p, u);
|
|
746
|
-
}, cubicTo:function(p, u, D, B, x, C) {
|
|
747
|
-
this.H.bezierCurveTo(p, u, D, B, x, C);
|
|
748
|
-
}, close:function() {
|
|
749
|
-
this.H.closePath();
|
|
750
|
-
},}), G = f.extend("CanvasRenderPaint", {color:function(p) {
|
|
751
|
-
this.ma = a(p);
|
|
752
|
-
}, thickness:function(p) {
|
|
753
|
-
this.Ga = p;
|
|
754
|
-
}, join:function(p) {
|
|
755
|
-
switch(p) {
|
|
756
|
-
case n.miter:
|
|
757
|
-
this.ba = "miter";
|
|
758
|
-
break;
|
|
759
|
-
case n.round:
|
|
760
|
-
this.ba = "round";
|
|
761
|
-
break;
|
|
762
|
-
case n.bevel:
|
|
763
|
-
this.ba = "bevel";
|
|
764
|
-
}
|
|
765
|
-
}, cap:function(p) {
|
|
766
|
-
switch(p) {
|
|
767
|
-
case h.butt:
|
|
768
|
-
this.aa = "butt";
|
|
769
|
-
break;
|
|
770
|
-
case h.round:
|
|
771
|
-
this.aa = "round";
|
|
772
|
-
break;
|
|
773
|
-
case h.square:
|
|
774
|
-
this.aa = "square";
|
|
775
|
-
}
|
|
776
|
-
}, style:function(p) {
|
|
777
|
-
this.Fa = p;
|
|
778
|
-
}, blendMode:function(p) {
|
|
779
|
-
this.Ca = b(p);
|
|
780
|
-
}, clearGradient:function() {
|
|
781
|
-
this.P = null;
|
|
782
|
-
}, linearGradient:function(p, u, D, B) {
|
|
783
|
-
this.P = {za:p, Aa:u, qa:D, ra:B, ga:[],};
|
|
784
|
-
}, radialGradient:function(p, u, D, B) {
|
|
785
|
-
this.P = {za:p, Aa:u, qa:D, ra:B, ga:[], Wa:!0,};
|
|
786
|
-
}, addStop:function(p, u) {
|
|
787
|
-
this.P.ga.push({color:p, stop:u,});
|
|
788
|
-
}, completeGradient:function() {
|
|
789
|
-
}, draw:function(p, u, D, B) {
|
|
790
|
-
let x = this.Fa;
|
|
791
|
-
var C = this.ma, A = this.P;
|
|
792
|
-
const I = p.globalCompositeOperation, na = p.globalAlpha;
|
|
793
|
-
p.globalCompositeOperation = this.Ca;
|
|
794
|
-
p.globalAlpha = B;
|
|
795
|
-
if (null != A) {
|
|
796
|
-
C = A.za;
|
|
797
|
-
const T = A.Aa, ca = A.qa;
|
|
798
|
-
var P = A.ra;
|
|
799
|
-
B = A.ga;
|
|
800
|
-
A.Wa ? (A = ca - C, P -= T, C = p.createRadialGradient(C, T, 0, C, T, Math.sqrt(A * A + P * P))) : C = p.createLinearGradient(C, T, ca, P);
|
|
801
|
-
for (let U = 0, W = B.length; U < W; U++) {
|
|
802
|
-
A = B[U], C.addColorStop(A.stop, a(A.color));
|
|
803
|
-
}
|
|
804
|
-
this.ma = C;
|
|
805
|
-
this.P = null;
|
|
806
|
-
}
|
|
807
|
-
switch(x) {
|
|
808
|
-
case w:
|
|
809
|
-
p.strokeStyle = C;
|
|
810
|
-
p.lineWidth = this.Ga;
|
|
811
|
-
p.lineCap = this.aa;
|
|
812
|
-
p.lineJoin = this.ba;
|
|
813
|
-
p.stroke(u);
|
|
814
|
-
break;
|
|
815
|
-
case r:
|
|
816
|
-
p.fillStyle = C, p.fill(u, D);
|
|
817
|
-
}
|
|
818
|
-
p.globalCompositeOperation = I;
|
|
819
|
-
p.globalAlpha = na;
|
|
820
|
-
},});
|
|
821
|
-
const F = new Set();
|
|
822
|
-
let v = null, H = [], L = 0, Q = 0;
|
|
823
|
-
var ha = k.CanvasRenderer = l.extend("Renderer", {__construct:function(p) {
|
|
824
|
-
this.__parent.__construct.call(this);
|
|
825
|
-
this.G = [1, 0, 0, 1, 0, 0];
|
|
826
|
-
this.u = [1.0];
|
|
827
|
-
this.m = p.getContext("2d");
|
|
828
|
-
this.ja = p;
|
|
829
|
-
this.v = [];
|
|
830
|
-
}, save:function() {
|
|
831
|
-
this.G.push(...this.G.slice(this.G.length - 6));
|
|
832
|
-
this.u.push(this.u[this.u.length - 1]);
|
|
833
|
-
this.v.push(this.m.save.bind(this.m));
|
|
834
|
-
}, restore:function() {
|
|
835
|
-
const p = this.G.length - 6;
|
|
836
|
-
if (6 > p) {
|
|
837
|
-
throw "restore() called without matching save().";
|
|
838
|
-
}
|
|
839
|
-
this.G.splice(p);
|
|
840
|
-
this.u.pop();
|
|
841
|
-
this.v.push(this.m.restore.bind(this.m));
|
|
842
|
-
}, transform:function(p, u, D, B, x, C) {
|
|
843
|
-
const A = this.G, I = A.length - 6;
|
|
844
|
-
A.splice(I, 6, A[I] * p + A[I + 2] * u, A[I + 1] * p + A[I + 3] * u, A[I] * D + A[I + 2] * B, A[I + 1] * D + A[I + 3] * B, A[I] * x + A[I + 2] * C + A[I + 4], A[I + 1] * x + A[I + 3] * C + A[I + 5]);
|
|
845
|
-
this.v.push(this.m.transform.bind(this.m, p, u, D, B, x, C));
|
|
846
|
-
}, rotate:function(p) {
|
|
847
|
-
const u = Math.sin(p);
|
|
848
|
-
p = Math.cos(p);
|
|
849
|
-
this.transform(p, u, -u, p, 0, 0);
|
|
850
|
-
}, modulateOpacity:function(p) {
|
|
851
|
-
this.u[this.u.length - 1] *= p;
|
|
852
|
-
}, _drawPath:function(p, u) {
|
|
853
|
-
this.v.push(u.draw.bind(u, this.m, p.H, p.ka === z ? "evenodd" : "nonzero", Math.max(0, this.u[this.u.length - 1])));
|
|
854
|
-
}, _drawRiveImage:function(p, u, D, B) {
|
|
855
|
-
var x = p.Da;
|
|
856
|
-
if (x) {
|
|
857
|
-
var C = this.m, A = b(D), I = Math.max(0, B * this.u[this.u.length - 1]);
|
|
858
|
-
this.v.push(function() {
|
|
859
|
-
C.globalCompositeOperation = A;
|
|
860
|
-
C.globalAlpha = I;
|
|
861
|
-
C.drawImage(x, 0, 0);
|
|
862
|
-
C.globalAlpha = 1;
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
}, _getMatrix:function(p) {
|
|
866
|
-
const u = this.G, D = u.length - 6;
|
|
867
|
-
for (let B = 0; 6 > B; ++B) {
|
|
868
|
-
p[B] = u[D + B];
|
|
869
|
-
}
|
|
870
|
-
}, _drawImageMesh:function(p, u, D, B, x, C, A, I, na, P, T, ca, U, W) {
|
|
871
|
-
let ub, vb, wb;
|
|
872
|
-
try {
|
|
873
|
-
ub = k.HEAPF32.slice(x >> 2, (x >> 2) + C), vb = k.HEAPF32.slice(A >> 2, (A >> 2) + I), wb = k.HEAPU16.slice(na >> 1, (na >> 1) + P);
|
|
874
|
-
} catch (Ya) {
|
|
875
|
-
console.error("[Rive] _drawImageMesh: failed to read mesh data from WASM heap. Mesh skipped for this frame.");
|
|
876
|
-
return;
|
|
877
|
-
}
|
|
878
|
-
u = this.m.canvas.width;
|
|
879
|
-
x = this.m.canvas.height;
|
|
880
|
-
A = U - T;
|
|
881
|
-
I = W - ca;
|
|
882
|
-
T = Math.max(T, 0);
|
|
883
|
-
ca = Math.max(ca, 0);
|
|
884
|
-
U = Math.min(U, u);
|
|
885
|
-
W = Math.min(W, x);
|
|
886
|
-
const va = U - T, wa = W - ca;
|
|
887
|
-
console.assert(va <= Math.min(A, u));
|
|
888
|
-
console.assert(wa <= Math.min(I, x));
|
|
889
|
-
if (!(0 >= va || 0 >= wa)) {
|
|
890
|
-
U = va < A || wa < I;
|
|
891
|
-
u = W = 1;
|
|
892
|
-
var ia = Math.ceil(va * W), ja = Math.ceil(wa * u);
|
|
893
|
-
x = qa.Xa();
|
|
894
|
-
ia > x && (W *= x / ia, ia = x);
|
|
895
|
-
ja > x && (u *= x / ja, ja = x);
|
|
896
|
-
v || (v = new k.DynamicRectanizer(x), v.reset(512, 512));
|
|
897
|
-
x = v.addRect(ia, ja);
|
|
898
|
-
0 > x && (c(), F.add(this), x = v.addRect(ia, ja), console.assert(0 <= x));
|
|
899
|
-
var xb = x & 65535, yb = x >> 16;
|
|
900
|
-
H.push({N:this.G.slice(this.G.length - 6), image:p, na:xb, oa:yb, Ya:T, Za:ca, lb:ia, ta:ja, X:W, Y:u, ia:ub, Ba:vb, indices:wb, $a:U, ya:p.da << 1 | (U ? 1 : 0),});
|
|
901
|
-
L += C;
|
|
902
|
-
Q += P;
|
|
903
|
-
var oa = this.m, oc = b(D), pc = Math.max(0, B * this.u[this.u.length - 1]);
|
|
904
|
-
this.v.push(function() {
|
|
905
|
-
oa.save();
|
|
906
|
-
oa.resetTransform();
|
|
907
|
-
oa.globalCompositeOperation = oc;
|
|
908
|
-
oa.globalAlpha = pc;
|
|
909
|
-
const Ya = qa.canvas();
|
|
910
|
-
Ya && oa.drawImage(Ya, xb, yb, ia, ja, T, ca, va, wa);
|
|
911
|
-
oa.restore();
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
|
-
}, _clipPath:function(p) {
|
|
915
|
-
this.v.push(this.m.clip.bind(this.m, p.H, p.ka === z ? "evenodd" : "nonzero"));
|
|
916
|
-
}, clear:function() {
|
|
917
|
-
F.add(this);
|
|
918
|
-
this.v.push(this.m.clearRect.bind(this.m, 0, 0, this.ja.width, this.ja.height));
|
|
919
|
-
}, flush:function() {
|
|
920
|
-
}, translate:function(p, u) {
|
|
921
|
-
this.transform(1, 0, 0, 1, p, u);
|
|
922
|
-
},});
|
|
923
|
-
k.makeRenderer = function(p) {
|
|
924
|
-
const u = new ha(p), D = u.m;
|
|
925
|
-
return new Proxy(u, {get(B, x) {
|
|
926
|
-
if ("function" === typeof B[x]) {
|
|
927
|
-
return function(...C) {
|
|
928
|
-
return B[x].apply(B, C);
|
|
929
|
-
};
|
|
930
|
-
}
|
|
931
|
-
if ("function" === typeof D[x]) {
|
|
932
|
-
if (-1 < pa.indexOf(x)) {
|
|
933
|
-
throw Error("RiveException: Method call to '" + x + "()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");
|
|
934
|
-
}
|
|
935
|
-
return function(...C) {
|
|
936
|
-
u.v.push(D[x].bind(D, ...C));
|
|
937
|
-
};
|
|
938
|
-
}
|
|
939
|
-
return B[x];
|
|
940
|
-
}, set(B, x, C) {
|
|
941
|
-
if (x in D) {
|
|
942
|
-
return u.v.push(() => {
|
|
943
|
-
D[x] = C;
|
|
944
|
-
}), !0;
|
|
945
|
-
}
|
|
946
|
-
},});
|
|
947
|
-
};
|
|
948
|
-
k.decodeImage = function(p, u) {
|
|
949
|
-
(new t({R:u})).decode(p);
|
|
950
|
-
};
|
|
951
|
-
k.renderFactory = {makeRenderPaint:function() {
|
|
952
|
-
return new G();
|
|
953
|
-
}, makeRenderPath:function() {
|
|
954
|
-
return new q();
|
|
955
|
-
}, makeRenderImage:function() {
|
|
956
|
-
let p = V;
|
|
957
|
-
return new t({W:() => {
|
|
958
|
-
p.total++;
|
|
959
|
-
}, R:() => {
|
|
960
|
-
p.loaded++;
|
|
961
|
-
if (p.loaded === p.total) {
|
|
962
|
-
const u = p.ready;
|
|
963
|
-
u && (u(), p.ready = null);
|
|
964
|
-
}
|
|
965
|
-
},});
|
|
966
|
-
},};
|
|
967
|
-
let E = k.load, V = null;
|
|
968
|
-
k.load = function(p, u, D = !0) {
|
|
969
|
-
const B = new k.FallbackFileAssetLoader();
|
|
970
|
-
void 0 !== u && B.addLoader(u);
|
|
971
|
-
D && (u = new k.CDNFileAssetLoader(), B.addLoader(u));
|
|
972
|
-
return new Promise(function(x) {
|
|
973
|
-
let C = null;
|
|
974
|
-
V = {total:0, loaded:0, ready:function() {
|
|
975
|
-
x(C);
|
|
976
|
-
},};
|
|
977
|
-
C = E(p, B);
|
|
978
|
-
0 == V.total && x(C);
|
|
979
|
-
});
|
|
980
|
-
};
|
|
981
|
-
let qc = k.RendererWrapper.prototype.align;
|
|
982
|
-
k.RendererWrapper.prototype.align = function(p, u, D, B, x = 1.0) {
|
|
983
|
-
qc.call(this, p, u, D, B, x);
|
|
984
|
-
};
|
|
985
|
-
d = new ka();
|
|
986
|
-
k.requestAnimationFrame = d.requestAnimationFrame.bind(d);
|
|
987
|
-
k.cancelAnimationFrame = d.cancelAnimationFrame.bind(d);
|
|
988
|
-
k.enableFPSCounter = d.Na.bind(d);
|
|
989
|
-
k.disableFPSCounter = d.Ka;
|
|
990
|
-
d.va = c;
|
|
991
|
-
k.resolveAnimationFrame = c;
|
|
992
|
-
k.cleanup = function() {
|
|
993
|
-
v && v.delete();
|
|
994
|
-
};
|
|
995
|
-
};
|
|
996
|
-
var sa = Object.assign({}, k), ta = "./this.program", y = "", ua, xa;
|
|
997
|
-
if (ea || fa) {
|
|
998
|
-
fa ? y = self.location.href : "undefined" != typeof document && document.currentScript && (y = document.currentScript.src), _scriptName && (y = _scriptName), y.startsWith("blob:") ? y = "" : y = y.substr(0, y.replace(/[?#].*/, "").lastIndexOf("/") + 1), fa && (xa = b => {
|
|
999
|
-
var a = new XMLHttpRequest();
|
|
1000
|
-
a.open("GET", b, !1);
|
|
1001
|
-
a.responseType = "arraybuffer";
|
|
1002
|
-
a.send(null);
|
|
1003
|
-
return new Uint8Array(a.response);
|
|
1004
|
-
}), ua = (b, a, c) => {
|
|
1005
|
-
if (ya(b)) {
|
|
1006
|
-
var d = new XMLHttpRequest();
|
|
1007
|
-
d.open("GET", b, !0);
|
|
1008
|
-
d.responseType = "arraybuffer";
|
|
1009
|
-
d.onload = () => {
|
|
1010
|
-
200 == d.status || 0 == d.status && d.response ? a(d.response) : c();
|
|
1011
|
-
};
|
|
1012
|
-
d.onerror = c;
|
|
1013
|
-
d.send(null);
|
|
1014
|
-
} else {
|
|
1015
|
-
fetch(b, {credentials:"same-origin"}).then(e => e.ok ? e.arrayBuffer() : Promise.reject(Error(e.status + " : " + e.url))).then(a, c);
|
|
1016
|
-
}
|
|
1017
|
-
};
|
|
1018
|
-
}
|
|
1019
|
-
var za = k.print || console.log.bind(console), Aa = k.printErr || console.error.bind(console);
|
|
1020
|
-
Object.assign(k, sa);
|
|
1021
|
-
sa = null;
|
|
1022
|
-
k.thisProgram && (ta = k.thisProgram);
|
|
1023
|
-
var Ba;
|
|
1024
|
-
k.wasmBinary && (Ba = k.wasmBinary);
|
|
1025
|
-
var Ca, Da = !1, Ea, J, Fa, Ga, K, M, Ha, Ia;
|
|
1026
|
-
function Ja() {
|
|
1027
|
-
var b = Ca.buffer;
|
|
1028
|
-
k.HEAP8 = Ea = new Int8Array(b);
|
|
1029
|
-
k.HEAP16 = Fa = new Int16Array(b);
|
|
1030
|
-
k.HEAPU8 = J = new Uint8Array(b);
|
|
1031
|
-
k.HEAPU16 = Ga = new Uint16Array(b);
|
|
1032
|
-
k.HEAP32 = K = new Int32Array(b);
|
|
1033
|
-
k.HEAPU32 = M = new Uint32Array(b);
|
|
1034
|
-
k.HEAPF32 = Ha = new Float32Array(b);
|
|
1035
|
-
k.HEAPF64 = Ia = new Float64Array(b);
|
|
1036
|
-
}
|
|
1037
|
-
var Ka = [], La = [], Ma = [];
|
|
1038
|
-
function Na() {
|
|
1039
|
-
var b = k.preRun.shift();
|
|
1040
|
-
Ka.unshift(b);
|
|
1041
|
-
}
|
|
1042
|
-
var Oa = 0, Pa = null, Qa = null;
|
|
1043
|
-
function Ra(b) {
|
|
1044
|
-
k.onAbort?.(b);
|
|
1045
|
-
b = "Aborted(" + b + ")";
|
|
1046
|
-
Aa(b);
|
|
1047
|
-
Da = !0;
|
|
1048
|
-
b = new WebAssembly.RuntimeError(b + ". Build with -sASSERTIONS for more info.");
|
|
1049
|
-
ba(b);
|
|
1050
|
-
throw b;
|
|
1051
|
-
}
|
|
1052
|
-
var Sa = b => b.startsWith("data:application/octet-stream;base64,"), ya = b => b.startsWith("file://"), Ta;
|
|
1053
|
-
function Ua(b) {
|
|
1054
|
-
if (b == Ta && Ba) {
|
|
1055
|
-
return new Uint8Array(Ba);
|
|
1056
|
-
}
|
|
1057
|
-
if (xa) {
|
|
1058
|
-
return xa(b);
|
|
1059
|
-
}
|
|
1060
|
-
throw "both async and sync fetching of the wasm failed";
|
|
1061
|
-
}
|
|
1062
|
-
function Va(b) {
|
|
1063
|
-
return Ba ? Promise.resolve().then(() => Ua(b)) : new Promise((a, c) => {
|
|
1064
|
-
ua(b, d => a(new Uint8Array(d)), () => {
|
|
1065
|
-
try {
|
|
1066
|
-
a(Ua(b));
|
|
1067
|
-
} catch (d) {
|
|
1068
|
-
c(d);
|
|
1069
|
-
}
|
|
1070
|
-
});
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
function Wa(b, a, c) {
|
|
1074
|
-
return Va(b).then(d => WebAssembly.instantiate(d, a)).then(c, d => {
|
|
1075
|
-
Aa(`failed to asynchronously prepare wasm: ${d}`);
|
|
1076
|
-
Ra(d);
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
function Xa(b, a) {
|
|
1080
|
-
var c = Ta;
|
|
1081
|
-
return Ba || "function" != typeof WebAssembly.instantiateStreaming || Sa(c) || ya(c) || "function" != typeof fetch ? Wa(c, b, a) : fetch(c, {credentials:"same-origin"}).then(d => WebAssembly.instantiateStreaming(d, b).then(a, function(e) {
|
|
1082
|
-
Aa(`wasm streaming compile failed: ${e}`);
|
|
1083
|
-
Aa("falling back to ArrayBuffer instantiation");
|
|
1084
|
-
return Wa(c, b, a);
|
|
1085
|
-
}));
|
|
1086
|
-
}
|
|
1087
|
-
var Za = b => {
|
|
1088
|
-
for (; 0 < b.length;) {
|
|
1089
|
-
b.shift()(k);
|
|
1090
|
-
}
|
|
1091
|
-
}, $a = (b, a) => Object.defineProperty(a, "name", {value:b}), ab = [], N = [], O, R = b => {
|
|
1092
|
-
if (!b) {
|
|
1093
|
-
throw new O("Cannot use deleted val. handle = " + b);
|
|
1094
|
-
}
|
|
1095
|
-
return N[b];
|
|
1096
|
-
}, bb = b => {
|
|
1097
|
-
switch(b) {
|
|
1098
|
-
case void 0:
|
|
1099
|
-
return 2;
|
|
1100
|
-
case null:
|
|
1101
|
-
return 4;
|
|
1102
|
-
case !0:
|
|
1103
|
-
return 6;
|
|
1104
|
-
case !1:
|
|
1105
|
-
return 8;
|
|
1106
|
-
default:
|
|
1107
|
-
const a = ab.pop() || N.length;
|
|
1108
|
-
N[a] = b;
|
|
1109
|
-
N[a + 1] = 1;
|
|
1110
|
-
return a;
|
|
1111
|
-
}
|
|
1112
|
-
}, cb = b => {
|
|
1113
|
-
var a = Error, c = $a(b, function(d) {
|
|
1114
|
-
this.name = b;
|
|
1115
|
-
this.message = d;
|
|
1116
|
-
d = Error(d).stack;
|
|
1117
|
-
void 0 !== d && (this.stack = this.toString() + "\n" + d.replace(/^Error(:[^\n]*)?\n/, ""));
|
|
1118
|
-
});
|
|
1119
|
-
c.prototype = Object.create(a.prototype);
|
|
1120
|
-
c.prototype.constructor = c;
|
|
1121
|
-
c.prototype.toString = function() {
|
|
1122
|
-
return void 0 === this.message ? this.name : `${this.name}: ${this.message}`;
|
|
1123
|
-
};
|
|
1124
|
-
return c;
|
|
1125
|
-
}, db, eb, S = b => {
|
|
1126
|
-
for (var a = ""; J[b];) {
|
|
1127
|
-
a += eb[J[b++]];
|
|
1128
|
-
}
|
|
1129
|
-
return a;
|
|
1130
|
-
}, fb = [], gb = () => {
|
|
1131
|
-
for (; fb.length;) {
|
|
1132
|
-
var b = fb.pop();
|
|
1133
|
-
b.g.M = !1;
|
|
1134
|
-
b["delete"]();
|
|
1135
|
-
}
|
|
1136
|
-
}, hb, ib = {}, jb = (b, a) => {
|
|
1137
|
-
if (void 0 === a) {
|
|
1138
|
-
throw new O("ptr should not be undefined");
|
|
1139
|
-
}
|
|
1140
|
-
for (; b.o;) {
|
|
1141
|
-
a = b.S(a), b = b.o;
|
|
1142
|
-
}
|
|
1143
|
-
return a;
|
|
1144
|
-
}, kb = {}, nb = b => {
|
|
1145
|
-
b = lb(b);
|
|
1146
|
-
var a = S(b);
|
|
1147
|
-
mb(b);
|
|
1148
|
-
return a;
|
|
1149
|
-
}, ob = (b, a) => {
|
|
1150
|
-
var c = kb[b];
|
|
1151
|
-
if (void 0 === c) {
|
|
1152
|
-
throw b = `${a} has unknown type ${nb(b)}`, new O(b);
|
|
1153
|
-
}
|
|
1154
|
-
return c;
|
|
1155
|
-
}, pb = () => {
|
|
1156
|
-
}, qb = !1, rb = (b, a, c) => {
|
|
1157
|
-
if (a === c) {
|
|
1158
|
-
return b;
|
|
1159
|
-
}
|
|
1160
|
-
if (void 0 === c.o) {
|
|
1161
|
-
return null;
|
|
1162
|
-
}
|
|
1163
|
-
b = rb(b, a, c.o);
|
|
1164
|
-
return null === b ? null : c.La(b);
|
|
1165
|
-
}, sb = {}, tb = (b, a) => {
|
|
1166
|
-
a = jb(b, a);
|
|
1167
|
-
return ib[a];
|
|
1168
|
-
}, zb, Bb = (b, a) => {
|
|
1169
|
-
if (!a.j || !a.i) {
|
|
1170
|
-
throw new zb("makeClassHandle requires ptr and ptrType");
|
|
1171
|
-
}
|
|
1172
|
-
if (!!a.A !== !!a.s) {
|
|
1173
|
-
throw new zb("Both smartPtrType and smartPtr must be specified");
|
|
1174
|
-
}
|
|
1175
|
-
a.count = {value:1};
|
|
1176
|
-
return Ab(Object.create(b, {g:{value:a, writable:!0,},}));
|
|
1177
|
-
}, Ab = b => {
|
|
1178
|
-
if ("undefined" === typeof FinalizationRegistry) {
|
|
1179
|
-
return Ab = a => a, b;
|
|
1180
|
-
}
|
|
1181
|
-
qb = new FinalizationRegistry(a => {
|
|
1182
|
-
a = a.g;
|
|
1183
|
-
--a.count.value;
|
|
1184
|
-
0 === a.count.value && (a.s ? a.A.D(a.s) : a.j.h.D(a.i));
|
|
1185
|
-
});
|
|
1186
|
-
Ab = a => {
|
|
1187
|
-
var c = a.g;
|
|
1188
|
-
c.s && qb.register(a, {g:c}, a);
|
|
1189
|
-
return a;
|
|
1190
|
-
};
|
|
1191
|
-
pb = a => {
|
|
1192
|
-
qb.unregister(a);
|
|
1193
|
-
};
|
|
1194
|
-
return Ab(b);
|
|
1195
|
-
}, Cb = {}, Db = b => {
|
|
1196
|
-
for (; b.length;) {
|
|
1197
|
-
var a = b.pop();
|
|
1198
|
-
b.pop()(a);
|
|
1199
|
-
}
|
|
1200
|
-
};
|
|
1201
|
-
function Eb(b) {
|
|
1202
|
-
return this.fromWireType(M[b >> 2]);
|
|
1203
|
-
}
|
|
1204
|
-
var Fb = {}, Gb = {}, X = (b, a, c) => {
|
|
1205
|
-
function d(h) {
|
|
1206
|
-
h = c(h);
|
|
1207
|
-
if (h.length !== b.length) {
|
|
1208
|
-
throw new zb("Mismatched type converter count");
|
|
1209
|
-
}
|
|
1210
|
-
for (var n = 0; n < b.length; ++n) {
|
|
1211
|
-
Hb(b[n], h[n]);
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
b.forEach(function(h) {
|
|
1215
|
-
Gb[h] = a;
|
|
1216
|
-
});
|
|
1217
|
-
var e = Array(a.length), f = [], l = 0;
|
|
1218
|
-
a.forEach((h, n) => {
|
|
1219
|
-
kb.hasOwnProperty(h) ? e[n] = kb[h] : (f.push(h), Fb.hasOwnProperty(h) || (Fb[h] = []), Fb[h].push(() => {
|
|
1220
|
-
e[n] = kb[h];
|
|
1221
|
-
++l;
|
|
1222
|
-
l === f.length && d(e);
|
|
1223
|
-
}));
|
|
1224
|
-
});
|
|
1225
|
-
0 === f.length && d(e);
|
|
1226
|
-
};
|
|
1227
|
-
function Ib(b, a, c = {}) {
|
|
1228
|
-
var d = a.name;
|
|
1229
|
-
if (!b) {
|
|
1230
|
-
throw new O(`type "${d}" must have a positive integer typeid pointer`);
|
|
1231
|
-
}
|
|
1232
|
-
if (kb.hasOwnProperty(b)) {
|
|
1233
|
-
if (c.Va) {
|
|
1234
|
-
return;
|
|
1235
|
-
}
|
|
1236
|
-
throw new O(`Cannot register type '${d}' twice`);
|
|
1237
|
-
}
|
|
1238
|
-
kb[b] = a;
|
|
1239
|
-
delete Gb[b];
|
|
1240
|
-
Fb.hasOwnProperty(b) && (a = Fb[b], delete Fb[b], a.forEach(e => e()));
|
|
1241
|
-
}
|
|
1242
|
-
function Hb(b, a, c = {}) {
|
|
1243
|
-
if (!("argPackAdvance" in a)) {
|
|
1244
|
-
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
1245
|
-
}
|
|
1246
|
-
return Ib(b, a, c);
|
|
1247
|
-
}
|
|
1248
|
-
var Jb = b => {
|
|
1249
|
-
throw new O(b.g.j.h.name + " instance already deleted");
|
|
1250
|
-
};
|
|
1251
|
-
function Kb() {
|
|
1252
|
-
}
|
|
1253
|
-
var Lb = (b, a, c) => {
|
|
1254
|
-
if (void 0 === b[a].l) {
|
|
1255
|
-
var d = b[a];
|
|
1256
|
-
b[a] = function(...e) {
|
|
1257
|
-
if (!b[a].l.hasOwnProperty(e.length)) {
|
|
1258
|
-
throw new O(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${b[a].l})!`);
|
|
1259
|
-
}
|
|
1260
|
-
return b[a].l[e.length].apply(this, e);
|
|
1261
|
-
};
|
|
1262
|
-
b[a].l = [];
|
|
1263
|
-
b[a].l[d.L] = d;
|
|
1264
|
-
}
|
|
1265
|
-
}, Mb = (b, a, c) => {
|
|
1266
|
-
if (k.hasOwnProperty(b)) {
|
|
1267
|
-
if (void 0 === c || void 0 !== k[b].l && void 0 !== k[b].l[c]) {
|
|
1268
|
-
throw new O(`Cannot register public name '${b}' twice`);
|
|
1269
|
-
}
|
|
1270
|
-
Lb(k, b, b);
|
|
1271
|
-
if (k.hasOwnProperty(c)) {
|
|
1272
|
-
throw new O(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
|
|
1273
|
-
}
|
|
1274
|
-
k[b].l[c] = a;
|
|
1275
|
-
} else {
|
|
1276
|
-
k[b] = a, void 0 !== c && (k[b].nb = c);
|
|
1277
|
-
}
|
|
1278
|
-
}, Nb = b => {
|
|
1279
|
-
if (void 0 === b) {
|
|
1280
|
-
return "_unknown";
|
|
1281
|
-
}
|
|
1282
|
-
b = b.replace(/[^a-zA-Z0-9_]/g, "$");
|
|
1283
|
-
var a = b.charCodeAt(0);
|
|
1284
|
-
return 48 <= a && 57 >= a ? `_${b}` : b;
|
|
1285
|
-
};
|
|
1286
|
-
function Ob(b, a, c, d, e, f, l, h) {
|
|
1287
|
-
this.name = b;
|
|
1288
|
-
this.constructor = a;
|
|
1289
|
-
this.C = c;
|
|
1290
|
-
this.D = d;
|
|
1291
|
-
this.o = e;
|
|
1292
|
-
this.Qa = f;
|
|
1293
|
-
this.S = l;
|
|
1294
|
-
this.La = h;
|
|
1295
|
-
this.wa = [];
|
|
1296
|
-
}
|
|
1297
|
-
var Pb = (b, a, c) => {
|
|
1298
|
-
for (; a !== c;) {
|
|
1299
|
-
if (!a.S) {
|
|
1300
|
-
throw new O(`Expected null or instance of ${c.name}, got an instance of ${a.name}`);
|
|
1301
|
-
}
|
|
1302
|
-
b = a.S(b);
|
|
1303
|
-
a = a.o;
|
|
1304
|
-
}
|
|
1305
|
-
return b;
|
|
1306
|
-
};
|
|
1307
|
-
function Qb(b, a) {
|
|
1308
|
-
if (null === a) {
|
|
1309
|
-
if (this.ea) {
|
|
1310
|
-
throw new O(`null is not a valid ${this.name}`);
|
|
1311
|
-
}
|
|
1312
|
-
return 0;
|
|
1313
|
-
}
|
|
1314
|
-
if (!a.g) {
|
|
1315
|
-
throw new O(`Cannot pass "${Rb(a)}" as a ${this.name}`);
|
|
1316
|
-
}
|
|
1317
|
-
if (!a.g.i) {
|
|
1318
|
-
throw new O(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1319
|
-
}
|
|
1320
|
-
return Pb(a.g.i, a.g.j.h, this.h);
|
|
1321
|
-
}
|
|
1322
|
-
function Sb(b, a) {
|
|
1323
|
-
if (null === a) {
|
|
1324
|
-
if (this.ea) {
|
|
1325
|
-
throw new O(`null is not a valid ${this.name}`);
|
|
1326
|
-
}
|
|
1327
|
-
if (this.V) {
|
|
1328
|
-
var c = this.fa();
|
|
1329
|
-
null !== b && b.push(this.D, c);
|
|
1330
|
-
return c;
|
|
1331
|
-
}
|
|
1332
|
-
return 0;
|
|
1333
|
-
}
|
|
1334
|
-
if (!a || !a.g) {
|
|
1335
|
-
throw new O(`Cannot pass "${Rb(a)}" as a ${this.name}`);
|
|
1336
|
-
}
|
|
1337
|
-
if (!a.g.i) {
|
|
1338
|
-
throw new O(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1339
|
-
}
|
|
1340
|
-
if (!this.U && a.g.j.U) {
|
|
1341
|
-
throw new O(`Cannot convert argument of type ${a.g.A ? a.g.A.name : a.g.j.name} to parameter type ${this.name}`);
|
|
1342
|
-
}
|
|
1343
|
-
c = Pb(a.g.i, a.g.j.h, this.h);
|
|
1344
|
-
if (this.V) {
|
|
1345
|
-
if (void 0 === a.g.s) {
|
|
1346
|
-
throw new O("Passing raw pointer to smart pointer is illegal");
|
|
1347
|
-
}
|
|
1348
|
-
switch(this.gb) {
|
|
1349
|
-
case 0:
|
|
1350
|
-
if (a.g.A === this) {
|
|
1351
|
-
c = a.g.s;
|
|
1352
|
-
} else {
|
|
1353
|
-
throw new O(`Cannot convert argument of type ${a.g.A ? a.g.A.name : a.g.j.name} to parameter type ${this.name}`);
|
|
1354
|
-
}
|
|
1355
|
-
break;
|
|
1356
|
-
case 1:
|
|
1357
|
-
c = a.g.s;
|
|
1358
|
-
break;
|
|
1359
|
-
case 2:
|
|
1360
|
-
if (a.g.A === this) {
|
|
1361
|
-
c = a.g.s;
|
|
1362
|
-
} else {
|
|
1363
|
-
var d = a.clone();
|
|
1364
|
-
c = this.bb(c, bb(() => d["delete"]()));
|
|
1365
|
-
null !== b && b.push(this.D, c);
|
|
1366
|
-
}
|
|
1367
|
-
break;
|
|
1368
|
-
default:
|
|
1369
|
-
throw new O("Unsupporting sharing policy");
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
return c;
|
|
1373
|
-
}
|
|
1374
|
-
function Tb(b, a) {
|
|
1375
|
-
if (null === a) {
|
|
1376
|
-
if (this.ea) {
|
|
1377
|
-
throw new O(`null is not a valid ${this.name}`);
|
|
1378
|
-
}
|
|
1379
|
-
return 0;
|
|
1380
|
-
}
|
|
1381
|
-
if (!a.g) {
|
|
1382
|
-
throw new O(`Cannot pass "${Rb(a)}" as a ${this.name}`);
|
|
1383
|
-
}
|
|
1384
|
-
if (!a.g.i) {
|
|
1385
|
-
throw new O(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1386
|
-
}
|
|
1387
|
-
if (a.g.j.U) {
|
|
1388
|
-
throw new O(`Cannot convert argument of type ${a.g.j.name} to parameter type ${this.name}`);
|
|
1389
|
-
}
|
|
1390
|
-
return Pb(a.g.i, a.g.j.h, this.h);
|
|
1391
|
-
}
|
|
1392
|
-
function Ub(b, a, c, d, e, f, l, h, n, m, r) {
|
|
1393
|
-
this.name = b;
|
|
1394
|
-
this.h = a;
|
|
1395
|
-
this.ea = c;
|
|
1396
|
-
this.U = d;
|
|
1397
|
-
this.V = e;
|
|
1398
|
-
this.ab = f;
|
|
1399
|
-
this.gb = l;
|
|
1400
|
-
this.xa = h;
|
|
1401
|
-
this.fa = n;
|
|
1402
|
-
this.bb = m;
|
|
1403
|
-
this.D = r;
|
|
1404
|
-
e || void 0 !== a.o ? this.toWireType = Sb : (this.toWireType = d ? Qb : Tb, this.B = null);
|
|
1405
|
-
}
|
|
1406
|
-
var Vb = (b, a, c) => {
|
|
1407
|
-
if (!k.hasOwnProperty(b)) {
|
|
1408
|
-
throw new zb("Replacing nonexistent public symbol");
|
|
1409
|
-
}
|
|
1410
|
-
void 0 !== k[b].l && void 0 !== c ? k[b].l[c] = a : (k[b] = a, k[b].L = c);
|
|
1411
|
-
}, Wb = [], Xb, Yb = b => {
|
|
1412
|
-
var a = Wb[b];
|
|
1413
|
-
a || (b >= Wb.length && (Wb.length = b + 1), Wb[b] = a = Xb.get(b));
|
|
1414
|
-
return a;
|
|
1415
|
-
}, Zb = (b, a, c = []) => {
|
|
1416
|
-
b.includes("j") ? (b = b.replace(/p/g, "i"), a = (0,k["dynCall_" + b])(a, ...c)) : a = Yb(a)(...c);
|
|
1417
|
-
return a;
|
|
1418
|
-
}, $b = (b, a) => (...c) => Zb(b, a, c), Y = (b, a) => {
|
|
1419
|
-
b = S(b);
|
|
1420
|
-
var c = b.includes("j") ? $b(b, a) : Yb(a);
|
|
1421
|
-
if ("function" != typeof c) {
|
|
1422
|
-
throw new O(`unknown function pointer with signature ${b}: ${a}`);
|
|
1423
|
-
}
|
|
1424
|
-
return c;
|
|
1425
|
-
}, ac, bc = (b, a) => {
|
|
1426
|
-
function c(f) {
|
|
1427
|
-
e[f] || kb[f] || (Gb[f] ? Gb[f].forEach(c) : (d.push(f), e[f] = !0));
|
|
1428
|
-
}
|
|
1429
|
-
var d = [], e = {};
|
|
1430
|
-
a.forEach(c);
|
|
1431
|
-
throw new ac(`${b}: ` + d.map(nb).join([", "]));
|
|
1432
|
-
};
|
|
1433
|
-
function cc(b) {
|
|
1434
|
-
for (var a = 1; a < b.length; ++a) {
|
|
1435
|
-
if (null !== b[a] && void 0 === b[a].B) {
|
|
1436
|
-
return !0;
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
return !1;
|
|
1440
|
-
}
|
|
1441
|
-
function dc(b, a, c, d, e) {
|
|
1442
|
-
var f = a.length;
|
|
1443
|
-
if (2 > f) {
|
|
1444
|
-
throw new O("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1445
|
-
}
|
|
1446
|
-
var l = null !== a[1] && null !== c, h = cc(a), n = "void" !== a[0].name, m = f - 2, r = Array(m), w = [], z = [];
|
|
1447
|
-
return $a(b, function(...g) {
|
|
1448
|
-
if (g.length !== m) {
|
|
1449
|
-
throw new O(`function ${b} called with ${g.length} arguments, expected ${m}`);
|
|
1450
|
-
}
|
|
1451
|
-
z.length = 0;
|
|
1452
|
-
w.length = l ? 2 : 1;
|
|
1453
|
-
w[0] = e;
|
|
1454
|
-
if (l) {
|
|
1455
|
-
var t = a[1].toWireType(z, this);
|
|
1456
|
-
w[1] = t;
|
|
1457
|
-
}
|
|
1458
|
-
for (var q = 0; q < m; ++q) {
|
|
1459
|
-
r[q] = a[q + 2].toWireType(z, g[q]), w.push(r[q]);
|
|
1460
|
-
}
|
|
1461
|
-
g = d(...w);
|
|
1462
|
-
if (h) {
|
|
1463
|
-
Db(z);
|
|
1464
|
-
} else {
|
|
1465
|
-
for (q = l ? 1 : 2; q < a.length; q++) {
|
|
1466
|
-
var G = 1 === q ? t : r[q - 2];
|
|
1467
|
-
null !== a[q].B && a[q].B(G);
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
t = n ? a[0].fromWireType(g) : void 0;
|
|
1471
|
-
return t;
|
|
1472
|
-
});
|
|
1473
|
-
}
|
|
1474
|
-
var ec = (b, a) => {
|
|
1475
|
-
for (var c = [], d = 0; d < b; d++) {
|
|
1476
|
-
c.push(M[a + 4 * d >> 2]);
|
|
1477
|
-
}
|
|
1478
|
-
return c;
|
|
1479
|
-
}, fc = b => {
|
|
1480
|
-
b = b.trim();
|
|
1481
|
-
const a = b.indexOf("(");
|
|
1482
|
-
return -1 !== a ? b.substr(0, a) : b;
|
|
1483
|
-
}, gc = (b, a, c) => {
|
|
1484
|
-
if (!(b instanceof Object)) {
|
|
1485
|
-
throw new O(`${c} with invalid "this": ${b}`);
|
|
1486
|
-
}
|
|
1487
|
-
if (!(b instanceof a.h.constructor)) {
|
|
1488
|
-
throw new O(`${c} incompatible with "this" of type ${b.constructor.name}`);
|
|
1489
|
-
}
|
|
1490
|
-
if (!b.g.i) {
|
|
1491
|
-
throw new O(`cannot call emscripten binding method ${c} on deleted object`);
|
|
1492
|
-
}
|
|
1493
|
-
return Pb(b.g.i, b.g.j.h, a.h);
|
|
1494
|
-
}, hc = b => {
|
|
1495
|
-
9 < b && 0 === --N[b + 1] && (N[b] = void 0, ab.push(b));
|
|
1496
|
-
}, ic = {name:"emscripten::val", fromWireType:b => {
|
|
1497
|
-
var a = R(b);
|
|
1498
|
-
hc(b);
|
|
1499
|
-
return a;
|
|
1500
|
-
}, toWireType:(b, a) => bb(a), argPackAdvance:8, readValueFromPointer:Eb, B:null,}, jc = (b, a, c) => {
|
|
1501
|
-
switch(a) {
|
|
1502
|
-
case 1:
|
|
1503
|
-
return c ? function(d) {
|
|
1504
|
-
return this.fromWireType(Ea[d]);
|
|
1505
|
-
} : function(d) {
|
|
1506
|
-
return this.fromWireType(J[d]);
|
|
1507
|
-
};
|
|
1508
|
-
case 2:
|
|
1509
|
-
return c ? function(d) {
|
|
1510
|
-
return this.fromWireType(Fa[d >> 1]);
|
|
1511
|
-
} : function(d) {
|
|
1512
|
-
return this.fromWireType(Ga[d >> 1]);
|
|
1513
|
-
};
|
|
1514
|
-
case 4:
|
|
1515
|
-
return c ? function(d) {
|
|
1516
|
-
return this.fromWireType(K[d >> 2]);
|
|
1517
|
-
} : function(d) {
|
|
1518
|
-
return this.fromWireType(M[d >> 2]);
|
|
1519
|
-
};
|
|
1520
|
-
default:
|
|
1521
|
-
throw new TypeError(`invalid integer width (${a}): ${b}`);
|
|
1522
|
-
}
|
|
1523
|
-
}, Rb = b => {
|
|
1524
|
-
if (null === b) {
|
|
1525
|
-
return "null";
|
|
1526
|
-
}
|
|
1527
|
-
var a = typeof b;
|
|
1528
|
-
return "object" === a || "array" === a || "function" === a ? b.toString() : "" + b;
|
|
1529
|
-
}, kc = (b, a) => {
|
|
1530
|
-
switch(a) {
|
|
1531
|
-
case 4:
|
|
1532
|
-
return function(c) {
|
|
1533
|
-
return this.fromWireType(Ha[c >> 2]);
|
|
1534
|
-
};
|
|
1535
|
-
case 8:
|
|
1536
|
-
return function(c) {
|
|
1537
|
-
return this.fromWireType(Ia[c >> 3]);
|
|
1538
|
-
};
|
|
1539
|
-
default:
|
|
1540
|
-
throw new TypeError(`invalid float width (${a}): ${b}`);
|
|
1541
|
-
}
|
|
1542
|
-
}, lc = (b, a, c) => {
|
|
1543
|
-
switch(a) {
|
|
1544
|
-
case 1:
|
|
1545
|
-
return c ? d => Ea[d] : d => J[d];
|
|
1546
|
-
case 2:
|
|
1547
|
-
return c ? d => Fa[d >> 1] : d => Ga[d >> 1];
|
|
1548
|
-
case 4:
|
|
1549
|
-
return c ? d => K[d >> 2] : d => M[d >> 2];
|
|
1550
|
-
default:
|
|
1551
|
-
throw new TypeError(`invalid integer width (${a}): ${b}`);
|
|
1552
|
-
}
|
|
1553
|
-
}, mc = (b, a, c, d) => {
|
|
1554
|
-
if (0 < d) {
|
|
1555
|
-
d = c + d - 1;
|
|
1556
|
-
for (var e = 0; e < b.length; ++e) {
|
|
1557
|
-
var f = b.charCodeAt(e);
|
|
1558
|
-
if (55296 <= f && 57343 >= f) {
|
|
1559
|
-
var l = b.charCodeAt(++e);
|
|
1560
|
-
f = 65536 + ((f & 1023) << 10) | l & 1023;
|
|
1561
|
-
}
|
|
1562
|
-
if (127 >= f) {
|
|
1563
|
-
if (c >= d) {
|
|
1564
|
-
break;
|
|
1565
|
-
}
|
|
1566
|
-
a[c++] = f;
|
|
1567
|
-
} else {
|
|
1568
|
-
if (2047 >= f) {
|
|
1569
|
-
if (c + 1 >= d) {
|
|
1570
|
-
break;
|
|
1571
|
-
}
|
|
1572
|
-
a[c++] = 192 | f >> 6;
|
|
1573
|
-
} else {
|
|
1574
|
-
if (65535 >= f) {
|
|
1575
|
-
if (c + 2 >= d) {
|
|
1576
|
-
break;
|
|
1577
|
-
}
|
|
1578
|
-
a[c++] = 224 | f >> 12;
|
|
1579
|
-
} else {
|
|
1580
|
-
if (c + 3 >= d) {
|
|
1581
|
-
break;
|
|
1582
|
-
}
|
|
1583
|
-
a[c++] = 240 | f >> 18;
|
|
1584
|
-
a[c++] = 128 | f >> 12 & 63;
|
|
1585
|
-
}
|
|
1586
|
-
a[c++] = 128 | f >> 6 & 63;
|
|
1587
|
-
}
|
|
1588
|
-
a[c++] = 128 | f & 63;
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
a[c] = 0;
|
|
1592
|
-
}
|
|
1593
|
-
}, nc = b => {
|
|
1594
|
-
for (var a = 0, c = 0; c < b.length; ++c) {
|
|
1595
|
-
var d = b.charCodeAt(c);
|
|
1596
|
-
127 >= d ? a++ : 2047 >= d ? a += 2 : 55296 <= d && 57343 >= d ? (a += 4, ++c) : a += 3;
|
|
1597
|
-
}
|
|
1598
|
-
return a;
|
|
1599
|
-
}, rc = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0, sc = (b, a, c) => {
|
|
1600
|
-
var d = a + c;
|
|
1601
|
-
for (c = a; b[c] && !(c >= d);) {
|
|
1602
|
-
++c;
|
|
1603
|
-
}
|
|
1604
|
-
if (16 < c - a && b.buffer && rc) {
|
|
1605
|
-
return rc.decode(b.subarray(a, c));
|
|
1606
|
-
}
|
|
1607
|
-
for (d = ""; a < c;) {
|
|
1608
|
-
var e = b[a++];
|
|
1609
|
-
if (e & 128) {
|
|
1610
|
-
var f = b[a++] & 63;
|
|
1611
|
-
if (192 == (e & 224)) {
|
|
1612
|
-
d += String.fromCharCode((e & 31) << 6 | f);
|
|
1613
|
-
} else {
|
|
1614
|
-
var l = b[a++] & 63;
|
|
1615
|
-
e = 224 == (e & 240) ? (e & 15) << 12 | f << 6 | l : (e & 7) << 18 | f << 12 | l << 6 | b[a++] & 63;
|
|
1616
|
-
65536 > e ? d += String.fromCharCode(e) : (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023));
|
|
1617
|
-
}
|
|
1618
|
-
} else {
|
|
1619
|
-
d += String.fromCharCode(e);
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
return d;
|
|
1623
|
-
}, tc = "undefined" != typeof TextDecoder ? new TextDecoder("utf-16le") : void 0, uc = (b, a) => {
|
|
1624
|
-
var c = b >> 1;
|
|
1625
|
-
for (var d = c + a / 2; !(c >= d) && Ga[c];) {
|
|
1626
|
-
++c;
|
|
1627
|
-
}
|
|
1628
|
-
c <<= 1;
|
|
1629
|
-
if (32 < c - b && tc) {
|
|
1630
|
-
return tc.decode(J.subarray(b, c));
|
|
1631
|
-
}
|
|
1632
|
-
c = "";
|
|
1633
|
-
for (d = 0; !(d >= a / 2); ++d) {
|
|
1634
|
-
var e = Fa[b + 2 * d >> 1];
|
|
1635
|
-
if (0 == e) {
|
|
1636
|
-
break;
|
|
1637
|
-
}
|
|
1638
|
-
c += String.fromCharCode(e);
|
|
1639
|
-
}
|
|
1640
|
-
return c;
|
|
1641
|
-
}, vc = (b, a, c) => {
|
|
1642
|
-
c ??= 2147483647;
|
|
1643
|
-
if (2 > c) {
|
|
1644
|
-
return 0;
|
|
1645
|
-
}
|
|
1646
|
-
c -= 2;
|
|
1647
|
-
var d = a;
|
|
1648
|
-
c = c < 2 * b.length ? c / 2 : b.length;
|
|
1649
|
-
for (var e = 0; e < c; ++e) {
|
|
1650
|
-
Fa[a >> 1] = b.charCodeAt(e), a += 2;
|
|
1651
|
-
}
|
|
1652
|
-
Fa[a >> 1] = 0;
|
|
1653
|
-
return a - d;
|
|
1654
|
-
}, wc = b => 2 * b.length, xc = (b, a) => {
|
|
1655
|
-
for (var c = 0, d = ""; !(c >= a / 4);) {
|
|
1656
|
-
var e = K[b + 4 * c >> 2];
|
|
1657
|
-
if (0 == e) {
|
|
1658
|
-
break;
|
|
1659
|
-
}
|
|
1660
|
-
++c;
|
|
1661
|
-
65536 <= e ? (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : d += String.fromCharCode(e);
|
|
1662
|
-
}
|
|
1663
|
-
return d;
|
|
1664
|
-
}, yc = (b, a, c) => {
|
|
1665
|
-
c ??= 2147483647;
|
|
1666
|
-
if (4 > c) {
|
|
1667
|
-
return 0;
|
|
1668
|
-
}
|
|
1669
|
-
var d = a;
|
|
1670
|
-
c = d + c - 4;
|
|
1671
|
-
for (var e = 0; e < b.length; ++e) {
|
|
1672
|
-
var f = b.charCodeAt(e);
|
|
1673
|
-
if (55296 <= f && 57343 >= f) {
|
|
1674
|
-
var l = b.charCodeAt(++e);
|
|
1675
|
-
f = 65536 + ((f & 1023) << 10) | l & 1023;
|
|
1676
|
-
}
|
|
1677
|
-
K[a >> 2] = f;
|
|
1678
|
-
a += 4;
|
|
1679
|
-
if (a + 4 > c) {
|
|
1680
|
-
break;
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
K[a >> 2] = 0;
|
|
1684
|
-
return a - d;
|
|
1685
|
-
}, zc = b => {
|
|
1686
|
-
for (var a = 0, c = 0; c < b.length; ++c) {
|
|
1687
|
-
var d = b.charCodeAt(c);
|
|
1688
|
-
55296 <= d && 57343 >= d && ++c;
|
|
1689
|
-
a += 4;
|
|
1690
|
-
}
|
|
1691
|
-
return a;
|
|
1692
|
-
}, Ac = (b, a, c) => {
|
|
1693
|
-
var d = [];
|
|
1694
|
-
b = b.toWireType(d, c);
|
|
1695
|
-
d.length && (M[a >> 2] = bb(d));
|
|
1696
|
-
return b;
|
|
1697
|
-
}, Bc = {}, Cc = b => {
|
|
1698
|
-
var a = Bc[b];
|
|
1699
|
-
return void 0 === a ? S(b) : a;
|
|
1700
|
-
}, Dc = [], Ec = b => {
|
|
1701
|
-
var a = Dc.length;
|
|
1702
|
-
Dc.push(b);
|
|
1703
|
-
return a;
|
|
1704
|
-
}, Fc = (b, a) => {
|
|
1705
|
-
for (var c = Array(b), d = 0; d < b; ++d) {
|
|
1706
|
-
c[d] = ob(M[a + 4 * d >> 2], "parameter " + d);
|
|
1707
|
-
}
|
|
1708
|
-
return c;
|
|
1709
|
-
}, Gc = Reflect.construct, Hc = {}, Jc = () => {
|
|
1710
|
-
if (!Ic) {
|
|
1711
|
-
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", _:ta || "./this.program"}, a;
|
|
1712
|
-
for (a in Hc) {
|
|
1713
|
-
void 0 === Hc[a] ? delete b[a] : b[a] = Hc[a];
|
|
1714
|
-
}
|
|
1715
|
-
var c = [];
|
|
1716
|
-
for (a in b) {
|
|
1717
|
-
c.push(`${a}=${b[a]}`);
|
|
1718
|
-
}
|
|
1719
|
-
Ic = c;
|
|
1720
|
-
}
|
|
1721
|
-
return Ic;
|
|
1722
|
-
}, Ic, Kc = [null, [], []], Lc = b => 0 === b % 4 && (0 !== b % 100 || 0 === b % 400), Mc = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Nc = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1723
|
-
function Oc(b) {
|
|
1724
|
-
var a = Array(nc(b) + 1);
|
|
1725
|
-
mc(b, a, 0, a.length);
|
|
1726
|
-
return a;
|
|
1727
|
-
}
|
|
1728
|
-
var Pc = (b, a, c, d) => {
|
|
1729
|
-
function e(g, t, q) {
|
|
1730
|
-
for (g = "number" == typeof g ? g.toString() : g || ""; g.length < t;) {
|
|
1731
|
-
g = q[0] + g;
|
|
1732
|
-
}
|
|
1733
|
-
return g;
|
|
1734
|
-
}
|
|
1735
|
-
function f(g, t) {
|
|
1736
|
-
return e(g, t, "0");
|
|
1737
|
-
}
|
|
1738
|
-
function l(g, t) {
|
|
1739
|
-
function q(F) {
|
|
1740
|
-
return 0 > F ? -1 : 0 < F ? 1 : 0;
|
|
1741
|
-
}
|
|
1742
|
-
var G;
|
|
1743
|
-
0 === (G = q(g.getFullYear() - t.getFullYear())) && 0 === (G = q(g.getMonth() - t.getMonth())) && (G = q(g.getDate() - t.getDate()));
|
|
1744
|
-
return G;
|
|
1745
|
-
}
|
|
1746
|
-
function h(g) {
|
|
1747
|
-
switch(g.getDay()) {
|
|
1748
|
-
case 0:
|
|
1749
|
-
return new Date(g.getFullYear() - 1, 11, 29);
|
|
1750
|
-
case 1:
|
|
1751
|
-
return g;
|
|
1752
|
-
case 2:
|
|
1753
|
-
return new Date(g.getFullYear(), 0, 3);
|
|
1754
|
-
case 3:
|
|
1755
|
-
return new Date(g.getFullYear(), 0, 2);
|
|
1756
|
-
case 4:
|
|
1757
|
-
return new Date(g.getFullYear(), 0, 1);
|
|
1758
|
-
case 5:
|
|
1759
|
-
return new Date(g.getFullYear() - 1, 11, 31);
|
|
1760
|
-
case 6:
|
|
1761
|
-
return new Date(g.getFullYear() - 1, 11, 30);
|
|
1762
|
-
}
|
|
1763
|
-
}
|
|
1764
|
-
function n(g) {
|
|
1765
|
-
var t = g.J;
|
|
1766
|
-
for (g = new Date((new Date(g.K + 1900, 0, 1)).getTime()); 0 < t;) {
|
|
1767
|
-
var q = g.getMonth(), G = (Lc(g.getFullYear()) ? Mc : Nc)[q];
|
|
1768
|
-
if (t > G - g.getDate()) {
|
|
1769
|
-
t -= G - g.getDate() + 1, g.setDate(1), 11 > q ? g.setMonth(q + 1) : (g.setMonth(0), g.setFullYear(g.getFullYear() + 1));
|
|
1770
|
-
} else {
|
|
1771
|
-
g.setDate(g.getDate() + t);
|
|
1772
|
-
break;
|
|
1773
|
-
}
|
|
1774
|
-
}
|
|
1775
|
-
q = new Date(g.getFullYear() + 1, 0, 4);
|
|
1776
|
-
t = h(new Date(g.getFullYear(), 0, 4));
|
|
1777
|
-
q = h(q);
|
|
1778
|
-
return 0 >= l(t, g) ? 0 >= l(q, g) ? g.getFullYear() + 1 : g.getFullYear() : g.getFullYear() - 1;
|
|
1779
|
-
}
|
|
1780
|
-
var m = M[d + 40 >> 2];
|
|
1781
|
-
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:m ? m ? sc(J, m) : "" : ""};
|
|
1782
|
-
c = c ? sc(J, c) : "";
|
|
1783
|
-
m = {"%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",};
|
|
1784
|
-
for (var r in m) {
|
|
1785
|
-
c = c.replace(new RegExp(r, "g"), m[r]);
|
|
1786
|
-
}
|
|
1787
|
-
var w = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), z = "January February March April May June July August September October November December".split(" ");
|
|
1788
|
-
m = {"%a":g => w[g.F].substring(0, 3), "%A":g => w[g.F], "%b":g => z[g.$].substring(0, 3), "%B":g => z[g.$], "%C":g => f((g.K + 1900) / 100 | 0, 2), "%d":g => f(g.ha, 2), "%e":g => e(g.ha, 2, " "), "%g":g => n(g).toString().substring(2), "%G":n, "%H":g => f(g.Z, 2), "%I":g => {
|
|
1789
|
-
g = g.Z;
|
|
1790
|
-
0 == g ? g = 12 : 12 < g && (g -= 12);
|
|
1791
|
-
return f(g, 2);
|
|
1792
|
-
}, "%j":g => {
|
|
1793
|
-
for (var t = 0, q = 0; q <= g.$ - 1; t += (Lc(g.K + 1900) ? Mc : Nc)[q++]) {
|
|
1794
|
-
}
|
|
1795
|
-
return f(g.ha + t, 3);
|
|
1796
|
-
}, "%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 => {
|
|
1797
|
-
var t = Math.floor((g.J + 7 - (g.F + 6) % 7) / 7);
|
|
1798
|
-
2 >= (g.F + 371 - g.J - 2) % 7 && t++;
|
|
1799
|
-
if (t) {
|
|
1800
|
-
53 == t && (q = (g.F + 371 - g.J) % 7, 4 == q || 3 == q && Lc(g.K) || (t = 1));
|
|
1801
|
-
} else {
|
|
1802
|
-
t = 52;
|
|
1803
|
-
var q = (g.F + 7 - g.J - 1) % 7;
|
|
1804
|
-
(4 == q || 5 == q && Lc(g.K % 400 - 1)) && t++;
|
|
1805
|
-
}
|
|
1806
|
-
return f(t, 2);
|
|
1807
|
-
}, "%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 => {
|
|
1808
|
-
g = g.hb;
|
|
1809
|
-
var t = 0 <= g;
|
|
1810
|
-
g = Math.abs(g) / 60;
|
|
1811
|
-
return (t ? "+" : "-") + String("0000" + (g / 60 * 100 + g % 60)).slice(-4);
|
|
1812
|
-
}, "%Z":g => g.kb, "%%":() => "%"};
|
|
1813
|
-
c = c.replace(/%%/g, "\x00\x00");
|
|
1814
|
-
for (r in m) {
|
|
1815
|
-
c.includes(r) && (c = c.replace(new RegExp(r, "g"), m[r](d)));
|
|
1816
|
-
}
|
|
1817
|
-
c = c.replace(/\0\0/g, "%");
|
|
1818
|
-
r = Oc(c);
|
|
1819
|
-
if (r.length > a) {
|
|
1820
|
-
return 0;
|
|
1821
|
-
}
|
|
1822
|
-
Ea.set(r, b);
|
|
1823
|
-
return r.length - 1;
|
|
1824
|
-
};
|
|
1825
|
-
O = k.BindingError = class extends Error {
|
|
1826
|
-
constructor(b) {
|
|
1827
|
-
super(b);
|
|
1828
|
-
this.name = "BindingError";
|
|
1829
|
-
}
|
|
1830
|
-
};
|
|
1831
|
-
N.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1,);
|
|
1832
|
-
k.count_emval_handles = () => N.length / 2 - 5 - ab.length;
|
|
1833
|
-
db = k.PureVirtualError = cb("PureVirtualError");
|
|
1834
|
-
for (var Qc = Array(256), Rc = 0; 256 > Rc; ++Rc) {
|
|
1835
|
-
Qc[Rc] = String.fromCharCode(Rc);
|
|
1836
|
-
}
|
|
1837
|
-
eb = Qc;
|
|
1838
|
-
k.getInheritedInstanceCount = () => Object.keys(ib).length;
|
|
1839
|
-
k.getLiveInheritedInstances = () => {
|
|
1840
|
-
var b = [], a;
|
|
1841
|
-
for (a in ib) {
|
|
1842
|
-
ib.hasOwnProperty(a) && b.push(ib[a]);
|
|
1843
|
-
}
|
|
1844
|
-
return b;
|
|
1845
|
-
};
|
|
1846
|
-
k.flushPendingDeletes = gb;
|
|
1847
|
-
k.setDelayFunction = b => {
|
|
1848
|
-
hb = b;
|
|
1849
|
-
fb.length && hb && hb(gb);
|
|
1850
|
-
};
|
|
1851
|
-
zb = k.InternalError = class extends Error {
|
|
1852
|
-
constructor(b) {
|
|
1853
|
-
super(b);
|
|
1854
|
-
this.name = "InternalError";
|
|
1855
|
-
}
|
|
1856
|
-
};
|
|
1857
|
-
Object.assign(Kb.prototype, {isAliasOf:function(b) {
|
|
1858
|
-
if (!(this instanceof Kb && b instanceof Kb)) {
|
|
1859
|
-
return !1;
|
|
1860
|
-
}
|
|
1861
|
-
var a = this.g.j.h, c = this.g.i;
|
|
1862
|
-
b.g = b.g;
|
|
1863
|
-
var d = b.g.j.h;
|
|
1864
|
-
for (b = b.g.i; a.o;) {
|
|
1865
|
-
c = a.S(c), a = a.o;
|
|
1866
|
-
}
|
|
1867
|
-
for (; d.o;) {
|
|
1868
|
-
b = d.S(b), d = d.o;
|
|
1869
|
-
}
|
|
1870
|
-
return a === d && c === b;
|
|
1871
|
-
}, clone:function() {
|
|
1872
|
-
this.g.i || Jb(this);
|
|
1873
|
-
if (this.g.O) {
|
|
1874
|
-
return this.g.count.value += 1, this;
|
|
1875
|
-
}
|
|
1876
|
-
var b = Ab, a = Object, c = a.create, d = Object.getPrototypeOf(this), e = this.g;
|
|
1877
|
-
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,},}}));
|
|
1878
|
-
b.g.count.value += 1;
|
|
1879
|
-
b.g.M = !1;
|
|
1880
|
-
return b;
|
|
1881
|
-
}, ["delete"]() {
|
|
1882
|
-
this.g.i || Jb(this);
|
|
1883
|
-
if (this.g.M && !this.g.O) {
|
|
1884
|
-
throw new O("Object already scheduled for deletion");
|
|
1885
|
-
}
|
|
1886
|
-
pb(this);
|
|
1887
|
-
var b = this.g;
|
|
1888
|
-
--b.count.value;
|
|
1889
|
-
0 === b.count.value && (b.s ? b.A.D(b.s) : b.j.h.D(b.i));
|
|
1890
|
-
this.g.O || (this.g.s = void 0, this.g.i = void 0);
|
|
1891
|
-
}, isDeleted:function() {
|
|
1892
|
-
return !this.g.i;
|
|
1893
|
-
}, deleteLater:function() {
|
|
1894
|
-
this.g.i || Jb(this);
|
|
1895
|
-
if (this.g.M && !this.g.O) {
|
|
1896
|
-
throw new O("Object already scheduled for deletion");
|
|
1897
|
-
}
|
|
1898
|
-
fb.push(this);
|
|
1899
|
-
1 === fb.length && hb && hb(gb);
|
|
1900
|
-
this.g.M = !0;
|
|
1901
|
-
return this;
|
|
1902
|
-
},});
|
|
1903
|
-
Object.assign(Ub.prototype, {Ra(b) {
|
|
1904
|
-
this.xa && (b = this.xa(b));
|
|
1905
|
-
return b;
|
|
1906
|
-
}, pa(b) {
|
|
1907
|
-
this.D?.(b);
|
|
1908
|
-
}, argPackAdvance:8, readValueFromPointer:Eb, fromWireType:function(b) {
|
|
1909
|
-
function a() {
|
|
1910
|
-
return this.V ? Bb(this.h.C, {j:this.ab, i:c, A:this, s:b,}) : Bb(this.h.C, {j:this, i:b,});
|
|
1911
|
-
}
|
|
1912
|
-
var c = this.Ra(b);
|
|
1913
|
-
if (!c) {
|
|
1914
|
-
return this.pa(b), null;
|
|
1915
|
-
}
|
|
1916
|
-
var d = tb(this.h, c);
|
|
1917
|
-
if (void 0 !== d) {
|
|
1918
|
-
if (0 === d.g.count.value) {
|
|
1919
|
-
return d.g.i = c, d.g.s = b, d.clone();
|
|
1920
|
-
}
|
|
1921
|
-
d = d.clone();
|
|
1922
|
-
this.pa(b);
|
|
1923
|
-
return d;
|
|
1924
|
-
}
|
|
1925
|
-
d = this.h.Qa(c);
|
|
1926
|
-
d = sb[d];
|
|
1927
|
-
if (!d) {
|
|
1928
|
-
return a.call(this);
|
|
1929
|
-
}
|
|
1930
|
-
d = this.U ? d.Ha : d.pointerType;
|
|
1931
|
-
var e = rb(c, this.h, d.h);
|
|
1932
|
-
return null === e ? a.call(this) : this.V ? Bb(d.h.C, {j:d, i:e, A:this, s:b,}) : Bb(d.h.C, {j:d, i:e,});
|
|
1933
|
-
},});
|
|
1934
|
-
ac = k.UnboundTypeError = cb("UnboundTypeError");
|
|
1935
|
-
var Tc = {_abort_js:() => {
|
|
1936
|
-
Ra("");
|
|
1937
|
-
}, _embind_create_inheriting_constructor:(b, a, c) => {
|
|
1938
|
-
b = S(b);
|
|
1939
|
-
a = ob(a, "wrapper");
|
|
1940
|
-
c = R(c);
|
|
1941
|
-
var d = a.h, e = d.C, f = d.o.C, l = d.o.constructor;
|
|
1942
|
-
b = $a(b, function(...h) {
|
|
1943
|
-
d.o.wa.forEach(function(n) {
|
|
1944
|
-
if (this[n] === f[n]) {
|
|
1945
|
-
throw new db(`Pure virtual function ${n} must be implemented in JavaScript`);
|
|
1946
|
-
}
|
|
1947
|
-
}.bind(this));
|
|
1948
|
-
Object.defineProperty(this, "__parent", {value:e});
|
|
1949
|
-
this.__construct(...h);
|
|
1950
|
-
});
|
|
1951
|
-
e.__construct = function(...h) {
|
|
1952
|
-
if (this === e) {
|
|
1953
|
-
throw new O("Pass correct 'this' to __construct");
|
|
1954
|
-
}
|
|
1955
|
-
h = l.implement(this, ...h);
|
|
1956
|
-
pb(h);
|
|
1957
|
-
var n = h.g;
|
|
1958
|
-
h.notifyOnDestruction();
|
|
1959
|
-
n.O = !0;
|
|
1960
|
-
Object.defineProperties(this, {g:{value:n}});
|
|
1961
|
-
Ab(this);
|
|
1962
|
-
h = n.i;
|
|
1963
|
-
h = jb(d, h);
|
|
1964
|
-
if (ib.hasOwnProperty(h)) {
|
|
1965
|
-
throw new O(`Tried to register registered instance: ${h}`);
|
|
1966
|
-
}
|
|
1967
|
-
ib[h] = this;
|
|
1968
|
-
};
|
|
1969
|
-
e.__destruct = function() {
|
|
1970
|
-
if (this === e) {
|
|
1971
|
-
throw new O("Pass correct 'this' to __destruct");
|
|
1972
|
-
}
|
|
1973
|
-
pb(this);
|
|
1974
|
-
var h = this.g.i;
|
|
1975
|
-
h = jb(d, h);
|
|
1976
|
-
if (ib.hasOwnProperty(h)) {
|
|
1977
|
-
delete ib[h];
|
|
1978
|
-
} else {
|
|
1979
|
-
throw new O(`Tried to unregister unregistered instance: ${h}`);
|
|
1980
|
-
}
|
|
1981
|
-
};
|
|
1982
|
-
b.prototype = Object.create(e);
|
|
1983
|
-
Object.assign(b.prototype, c);
|
|
1984
|
-
return bb(b);
|
|
1985
|
-
}, _embind_finalize_value_object:b => {
|
|
1986
|
-
var a = Cb[b];
|
|
1987
|
-
delete Cb[b];
|
|
1988
|
-
var c = a.fa, d = a.D, e = a.sa, f = e.map(l => l.Ua).concat(e.map(l => l.eb));
|
|
1989
|
-
X([b], f, l => {
|
|
1990
|
-
var h = {};
|
|
1991
|
-
e.forEach((n, m) => {
|
|
1992
|
-
var r = l[m], w = n.Sa, z = n.Ta, g = l[m + e.length], t = n.cb, q = n.fb;
|
|
1993
|
-
h[n.Oa] = {read:G => r.fromWireType(w(z, G)), write:(G, F) => {
|
|
1994
|
-
var v = [];
|
|
1995
|
-
t(q, G, g.toWireType(v, F));
|
|
1996
|
-
Db(v);
|
|
1997
|
-
}};
|
|
1998
|
-
});
|
|
1999
|
-
return [{name:a.name, fromWireType:n => {
|
|
2000
|
-
var m = {}, r;
|
|
2001
|
-
for (r in h) {
|
|
2002
|
-
m[r] = h[r].read(n);
|
|
2003
|
-
}
|
|
2004
|
-
d(n);
|
|
2005
|
-
return m;
|
|
2006
|
-
}, toWireType:(n, m) => {
|
|
2007
|
-
for (var r in h) {
|
|
2008
|
-
if (!(r in m)) {
|
|
2009
|
-
throw new TypeError(`Missing field: "${r}"`);
|
|
2010
|
-
}
|
|
2011
|
-
}
|
|
2012
|
-
var w = c();
|
|
2013
|
-
for (r in h) {
|
|
2014
|
-
h[r].write(w, m[r]);
|
|
2015
|
-
}
|
|
2016
|
-
null !== n && n.push(d, w);
|
|
2017
|
-
return w;
|
|
2018
|
-
}, argPackAdvance:8, readValueFromPointer:Eb, B:d,}];
|
|
2019
|
-
});
|
|
2020
|
-
}, _embind_register_bigint:() => {
|
|
2021
|
-
}, _embind_register_bool:(b, a, c, d) => {
|
|
2022
|
-
a = S(a);
|
|
2023
|
-
Hb(b, {name:a, fromWireType:function(e) {
|
|
2024
|
-
return !!e;
|
|
2025
|
-
}, toWireType:function(e, f) {
|
|
2026
|
-
return f ? c : d;
|
|
2027
|
-
}, argPackAdvance:8, readValueFromPointer:function(e) {
|
|
2028
|
-
return this.fromWireType(J[e]);
|
|
2029
|
-
}, B:null,});
|
|
2030
|
-
}, _embind_register_class:(b, a, c, d, e, f, l, h, n, m, r, w, z) => {
|
|
2031
|
-
r = S(r);
|
|
2032
|
-
f = Y(e, f);
|
|
2033
|
-
h &&= Y(l, h);
|
|
2034
|
-
m &&= Y(n, m);
|
|
2035
|
-
z = Y(w, z);
|
|
2036
|
-
var g = Nb(r);
|
|
2037
|
-
Mb(g, function() {
|
|
2038
|
-
bc(`Cannot construct ${r} due to unbound types`, [d]);
|
|
2039
|
-
});
|
|
2040
|
-
X([b, a, c], d ? [d] : [], t => {
|
|
2041
|
-
t = t[0];
|
|
2042
|
-
if (d) {
|
|
2043
|
-
var q = t.h;
|
|
2044
|
-
var G = q.C;
|
|
2045
|
-
} else {
|
|
2046
|
-
G = Kb.prototype;
|
|
2047
|
-
}
|
|
2048
|
-
t = $a(r, function(...L) {
|
|
2049
|
-
if (Object.getPrototypeOf(this) !== F) {
|
|
2050
|
-
throw new O("Use 'new' to construct " + r);
|
|
2051
|
-
}
|
|
2052
|
-
if (void 0 === v.I) {
|
|
2053
|
-
throw new O(r + " has no accessible constructor");
|
|
2054
|
-
}
|
|
2055
|
-
var Q = v.I[L.length];
|
|
2056
|
-
if (void 0 === Q) {
|
|
2057
|
-
throw new O(`Tried to invoke ctor of ${r} with invalid number of parameters (${L.length}) - expected (${Object.keys(v.I).toString()}) parameters instead!`);
|
|
2058
|
-
}
|
|
2059
|
-
return Q.apply(this, L);
|
|
2060
|
-
});
|
|
2061
|
-
var F = Object.create(G, {constructor:{value:t},});
|
|
2062
|
-
t.prototype = F;
|
|
2063
|
-
var v = new Ob(r, t, F, z, q, f, h, m);
|
|
2064
|
-
if (v.o) {
|
|
2065
|
-
var H;
|
|
2066
|
-
(H = v.o).T ?? (H.T = []);
|
|
2067
|
-
v.o.T.push(v);
|
|
2068
|
-
}
|
|
2069
|
-
q = new Ub(r, v, !0, !1, !1);
|
|
2070
|
-
H = new Ub(r + "*", v, !1, !1, !1);
|
|
2071
|
-
G = new Ub(r + " const*", v, !1, !0, !1);
|
|
2072
|
-
sb[b] = {pointerType:H, Ha:G};
|
|
2073
|
-
Vb(g, t);
|
|
2074
|
-
return [q, H, G];
|
|
2075
|
-
});
|
|
2076
|
-
}, _embind_register_class_class_function:(b, a, c, d, e, f, l) => {
|
|
2077
|
-
var h = ec(c, d);
|
|
2078
|
-
a = S(a);
|
|
2079
|
-
a = fc(a);
|
|
2080
|
-
f = Y(e, f);
|
|
2081
|
-
X([], [b], n => {
|
|
2082
|
-
function m() {
|
|
2083
|
-
bc(`Cannot call ${r} due to unbound types`, h);
|
|
2084
|
-
}
|
|
2085
|
-
n = n[0];
|
|
2086
|
-
var r = `${n.name}.${a}`;
|
|
2087
|
-
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
2088
|
-
var w = n.h.constructor;
|
|
2089
|
-
void 0 === w[a] ? (m.L = c - 1, w[a] = m) : (Lb(w, a, r), w[a].l[c - 1] = m);
|
|
2090
|
-
X([], h, z => {
|
|
2091
|
-
z = dc(r, [z[0], null].concat(z.slice(1)), null, f, l);
|
|
2092
|
-
void 0 === w[a].l ? (z.L = c - 1, w[a] = z) : w[a].l[c - 1] = z;
|
|
2093
|
-
if (n.h.T) {
|
|
2094
|
-
for (const g of n.h.T) {
|
|
2095
|
-
g.constructor.hasOwnProperty(a) || (g.constructor[a] = z);
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
return [];
|
|
2099
|
-
});
|
|
2100
|
-
return [];
|
|
2101
|
-
});
|
|
2102
|
-
}, _embind_register_class_class_property:(b, a, c, d, e, f, l, h) => {
|
|
2103
|
-
a = S(a);
|
|
2104
|
-
f = Y(e, f);
|
|
2105
|
-
X([], [b], n => {
|
|
2106
|
-
n = n[0];
|
|
2107
|
-
var m = `${n.name}.${a}`, r = {get() {
|
|
2108
|
-
bc(`Cannot access ${m} due to unbound types`, [c]);
|
|
2109
|
-
}, enumerable:!0, configurable:!0};
|
|
2110
|
-
r.set = h ? () => {
|
|
2111
|
-
bc(`Cannot access ${m} due to unbound types`, [c]);
|
|
2112
|
-
} : () => {
|
|
2113
|
-
throw new O(`${m} is a read-only property`);
|
|
2114
|
-
};
|
|
2115
|
-
Object.defineProperty(n.h.constructor, a, r);
|
|
2116
|
-
X([], [c], w => {
|
|
2117
|
-
w = w[0];
|
|
2118
|
-
var z = {get() {
|
|
2119
|
-
return w.fromWireType(f(d));
|
|
2120
|
-
}, enumerable:!0};
|
|
2121
|
-
h && (h = Y(l, h), z.set = g => {
|
|
2122
|
-
var t = [];
|
|
2123
|
-
h(d, w.toWireType(t, g));
|
|
2124
|
-
Db(t);
|
|
2125
|
-
});
|
|
2126
|
-
Object.defineProperty(n.h.constructor, a, z);
|
|
2127
|
-
return [];
|
|
2128
|
-
});
|
|
2129
|
-
return [];
|
|
2130
|
-
});
|
|
2131
|
-
}, _embind_register_class_constructor:(b, a, c, d, e, f) => {
|
|
2132
|
-
var l = ec(a, c);
|
|
2133
|
-
e = Y(d, e);
|
|
2134
|
-
X([], [b], h => {
|
|
2135
|
-
h = h[0];
|
|
2136
|
-
var n = `constructor ${h.name}`;
|
|
2137
|
-
void 0 === h.h.I && (h.h.I = []);
|
|
2138
|
-
if (void 0 !== h.h.I[a - 1]) {
|
|
2139
|
-
throw new O(`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!`);
|
|
2140
|
-
}
|
|
2141
|
-
h.h.I[a - 1] = () => {
|
|
2142
|
-
bc(`Cannot construct ${h.name} due to unbound types`, l);
|
|
2143
|
-
};
|
|
2144
|
-
X([], l, m => {
|
|
2145
|
-
m.splice(1, 0, null);
|
|
2146
|
-
h.h.I[a - 1] = dc(n, m, null, e, f);
|
|
2147
|
-
return [];
|
|
2148
|
-
});
|
|
2149
|
-
return [];
|
|
2150
|
-
});
|
|
2151
|
-
}, _embind_register_class_function:(b, a, c, d, e, f, l, h) => {
|
|
2152
|
-
var n = ec(c, d);
|
|
2153
|
-
a = S(a);
|
|
2154
|
-
a = fc(a);
|
|
2155
|
-
f = Y(e, f);
|
|
2156
|
-
X([], [b], m => {
|
|
2157
|
-
function r() {
|
|
2158
|
-
bc(`Cannot call ${w} due to unbound types`, n);
|
|
2159
|
-
}
|
|
2160
|
-
m = m[0];
|
|
2161
|
-
var w = `${m.name}.${a}`;
|
|
2162
|
-
a.startsWith("@@") && (a = Symbol[a.substring(2)]);
|
|
2163
|
-
h && m.h.wa.push(a);
|
|
2164
|
-
var z = m.h.C, g = z[a];
|
|
2165
|
-
void 0 === g || void 0 === g.l && g.className !== m.name && g.L === c - 2 ? (r.L = c - 2, r.className = m.name, z[a] = r) : (Lb(z, a, w), z[a].l[c - 2] = r);
|
|
2166
|
-
X([], n, t => {
|
|
2167
|
-
t = dc(w, t, m, f, l);
|
|
2168
|
-
void 0 === z[a].l ? (t.L = c - 2, z[a] = t) : z[a].l[c - 2] = t;
|
|
2169
|
-
return [];
|
|
2170
|
-
});
|
|
2171
|
-
return [];
|
|
2172
|
-
});
|
|
2173
|
-
}, _embind_register_class_property:(b, a, c, d, e, f, l, h, n, m) => {
|
|
2174
|
-
a = S(a);
|
|
2175
|
-
e = Y(d, e);
|
|
2176
|
-
X([], [b], r => {
|
|
2177
|
-
r = r[0];
|
|
2178
|
-
var w = `${r.name}.${a}`, z = {get() {
|
|
2179
|
-
bc(`Cannot access ${w} due to unbound types`, [c, l]);
|
|
2180
|
-
}, enumerable:!0, configurable:!0};
|
|
2181
|
-
z.set = n ? () => bc(`Cannot access ${w} due to unbound types`, [c, l]) : () => {
|
|
2182
|
-
throw new O(w + " is a read-only property");
|
|
2183
|
-
};
|
|
2184
|
-
Object.defineProperty(r.h.C, a, z);
|
|
2185
|
-
X([], n ? [c, l] : [c], g => {
|
|
2186
|
-
var t = g[0], q = {get() {
|
|
2187
|
-
var F = gc(this, r, w + " getter");
|
|
2188
|
-
return t.fromWireType(e(f, F));
|
|
2189
|
-
}, enumerable:!0};
|
|
2190
|
-
if (n) {
|
|
2191
|
-
n = Y(h, n);
|
|
2192
|
-
var G = g[1];
|
|
2193
|
-
q.set = function(F) {
|
|
2194
|
-
var v = gc(this, r, w + " setter"), H = [];
|
|
2195
|
-
n(m, v, G.toWireType(H, F));
|
|
2196
|
-
Db(H);
|
|
2197
|
-
};
|
|
2198
|
-
}
|
|
2199
|
-
Object.defineProperty(r.h.C, a, q);
|
|
2200
|
-
return [];
|
|
2201
|
-
});
|
|
2202
|
-
return [];
|
|
2203
|
-
});
|
|
2204
|
-
}, _embind_register_emval:b => Hb(b, ic), _embind_register_enum:(b, a, c, d) => {
|
|
2205
|
-
function e() {
|
|
2206
|
-
}
|
|
2207
|
-
a = S(a);
|
|
2208
|
-
e.values = {};
|
|
2209
|
-
Hb(b, {name:a, constructor:e, fromWireType:function(f) {
|
|
2210
|
-
return this.constructor.values[f];
|
|
2211
|
-
}, toWireType:(f, l) => l.value, argPackAdvance:8, readValueFromPointer:jc(a, c, d), B:null,});
|
|
2212
|
-
Mb(a, e);
|
|
2213
|
-
}, _embind_register_enum_value:(b, a, c) => {
|
|
2214
|
-
var d = ob(b, "enum");
|
|
2215
|
-
a = S(a);
|
|
2216
|
-
b = d.constructor;
|
|
2217
|
-
d = Object.create(d.constructor.prototype, {value:{value:c}, constructor:{value:$a(`${d.name}_${a}`, function() {
|
|
2218
|
-
})},});
|
|
2219
|
-
b.values[c] = d;
|
|
2220
|
-
b[a] = d;
|
|
2221
|
-
}, _embind_register_float:(b, a, c) => {
|
|
2222
|
-
a = S(a);
|
|
2223
|
-
Hb(b, {name:a, fromWireType:d => d, toWireType:(d, e) => e, argPackAdvance:8, readValueFromPointer:kc(a, c), B:null,});
|
|
2224
|
-
}, _embind_register_function:(b, a, c, d, e, f) => {
|
|
2225
|
-
var l = ec(a, c);
|
|
2226
|
-
b = S(b);
|
|
2227
|
-
b = fc(b);
|
|
2228
|
-
e = Y(d, e);
|
|
2229
|
-
Mb(b, function() {
|
|
2230
|
-
bc(`Cannot call ${b} due to unbound types`, l);
|
|
2231
|
-
}, a - 1);
|
|
2232
|
-
X([], l, h => {
|
|
2233
|
-
Vb(b, dc(b, [h[0], null].concat(h.slice(1)), null, e, f), a - 1);
|
|
2234
|
-
return [];
|
|
2235
|
-
});
|
|
2236
|
-
}, _embind_register_integer:(b, a, c, d, e) => {
|
|
2237
|
-
a = S(a);
|
|
2238
|
-
-1 === e && (e = 4294967295);
|
|
2239
|
-
e = h => h;
|
|
2240
|
-
if (0 === d) {
|
|
2241
|
-
var f = 32 - 8 * c;
|
|
2242
|
-
e = h => h << f >>> f;
|
|
2243
|
-
}
|
|
2244
|
-
var l = a.includes("unsigned") ? function(h, n) {
|
|
2245
|
-
return n >>> 0;
|
|
2246
|
-
} : function(h, n) {
|
|
2247
|
-
return n;
|
|
2248
|
-
};
|
|
2249
|
-
Hb(b, {name:a, fromWireType:e, toWireType:l, argPackAdvance:8, readValueFromPointer:lc(a, c, 0 !== d), B:null,});
|
|
2250
|
-
}, _embind_register_memory_view:(b, a, c) => {
|
|
2251
|
-
function d(f) {
|
|
2252
|
-
return new e(Ea.buffer, M[f + 4 >> 2], M[f >> 2]);
|
|
2253
|
-
}
|
|
2254
|
-
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array,][a];
|
|
2255
|
-
c = S(c);
|
|
2256
|
-
Hb(b, {name:c, fromWireType:d, argPackAdvance:8, readValueFromPointer:d,}, {Va:!0,});
|
|
2257
|
-
}, _embind_register_std_string:(b, a) => {
|
|
2258
|
-
a = S(a);
|
|
2259
|
-
var c = "std::string" === a;
|
|
2260
|
-
Hb(b, {name:a, fromWireType:function(d) {
|
|
2261
|
-
var e = M[d >> 2], f = d + 4;
|
|
2262
|
-
if (c) {
|
|
2263
|
-
for (var l = f, h = 0; h <= e; ++h) {
|
|
2264
|
-
var n = f + h;
|
|
2265
|
-
if (h == e || 0 == J[n]) {
|
|
2266
|
-
l = l ? sc(J, l, n - l) : "";
|
|
2267
|
-
if (void 0 === m) {
|
|
2268
|
-
var m = l;
|
|
2269
|
-
} else {
|
|
2270
|
-
m += String.fromCharCode(0), m += l;
|
|
2271
|
-
}
|
|
2272
|
-
l = n + 1;
|
|
2273
|
-
}
|
|
2274
|
-
}
|
|
2275
|
-
} else {
|
|
2276
|
-
m = Array(e);
|
|
2277
|
-
for (h = 0; h < e; ++h) {
|
|
2278
|
-
m[h] = String.fromCharCode(J[f + h]);
|
|
2279
|
-
}
|
|
2280
|
-
m = m.join("");
|
|
2281
|
-
}
|
|
2282
|
-
mb(d);
|
|
2283
|
-
return m;
|
|
2284
|
-
}, toWireType:function(d, e) {
|
|
2285
|
-
e instanceof ArrayBuffer && (e = new Uint8Array(e));
|
|
2286
|
-
var f = "string" == typeof e;
|
|
2287
|
-
if (!(f || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int8Array)) {
|
|
2288
|
-
throw new O("Cannot pass non-string to std::string");
|
|
2289
|
-
}
|
|
2290
|
-
var l = c && f ? nc(e) : e.length;
|
|
2291
|
-
var h = Sc(4 + l + 1), n = h + 4;
|
|
2292
|
-
M[h >> 2] = l;
|
|
2293
|
-
if (c && f) {
|
|
2294
|
-
mc(e, J, n, l + 1);
|
|
2295
|
-
} else {
|
|
2296
|
-
if (f) {
|
|
2297
|
-
for (f = 0; f < l; ++f) {
|
|
2298
|
-
var m = e.charCodeAt(f);
|
|
2299
|
-
if (255 < m) {
|
|
2300
|
-
throw mb(n), new O("String has UTF-16 code units that do not fit in 8 bits");
|
|
2301
|
-
}
|
|
2302
|
-
J[n + f] = m;
|
|
2303
|
-
}
|
|
2304
|
-
} else {
|
|
2305
|
-
for (f = 0; f < l; ++f) {
|
|
2306
|
-
J[n + f] = e[f];
|
|
2307
|
-
}
|
|
2308
|
-
}
|
|
2309
|
-
}
|
|
2310
|
-
null !== d && d.push(mb, h);
|
|
2311
|
-
return h;
|
|
2312
|
-
}, argPackAdvance:8, readValueFromPointer:Eb, B(d) {
|
|
2313
|
-
mb(d);
|
|
2314
|
-
},});
|
|
2315
|
-
}, _embind_register_std_wstring:(b, a, c) => {
|
|
2316
|
-
c = S(c);
|
|
2317
|
-
if (2 === a) {
|
|
2318
|
-
var d = uc;
|
|
2319
|
-
var e = vc;
|
|
2320
|
-
var f = wc;
|
|
2321
|
-
var l = h => Ga[h >> 1];
|
|
2322
|
-
} else {
|
|
2323
|
-
4 === a && (d = xc, e = yc, f = zc, l = h => M[h >> 2]);
|
|
2324
|
-
}
|
|
2325
|
-
Hb(b, {name:c, fromWireType:h => {
|
|
2326
|
-
for (var n = M[h >> 2], m, r = h + 4, w = 0; w <= n; ++w) {
|
|
2327
|
-
var z = h + 4 + w * a;
|
|
2328
|
-
if (w == n || 0 == l(z)) {
|
|
2329
|
-
r = d(r, z - r), void 0 === m ? m = r : (m += String.fromCharCode(0), m += r), r = z + a;
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
mb(h);
|
|
2333
|
-
return m;
|
|
2334
|
-
}, toWireType:(h, n) => {
|
|
2335
|
-
if ("string" != typeof n) {
|
|
2336
|
-
throw new O(`Cannot pass non-string to C++ string type ${c}`);
|
|
2337
|
-
}
|
|
2338
|
-
var m = f(n), r = Sc(4 + m + a);
|
|
2339
|
-
M[r >> 2] = m / a;
|
|
2340
|
-
e(n, r + 4, m + a);
|
|
2341
|
-
null !== h && h.push(mb, r);
|
|
2342
|
-
return r;
|
|
2343
|
-
}, argPackAdvance:8, readValueFromPointer:Eb, B(h) {
|
|
2344
|
-
mb(h);
|
|
2345
|
-
}});
|
|
2346
|
-
}, _embind_register_value_object:(b, a, c, d, e, f) => {
|
|
2347
|
-
Cb[b] = {name:S(a), fa:Y(c, d), D:Y(e, f), sa:[],};
|
|
2348
|
-
}, _embind_register_value_object_field:(b, a, c, d, e, f, l, h, n, m) => {
|
|
2349
|
-
Cb[b].sa.push({Oa:S(a), Ua:c, Sa:Y(d, e), Ta:f, eb:l, cb:Y(h, n), fb:m,});
|
|
2350
|
-
}, _embind_register_void:(b, a) => {
|
|
2351
|
-
a = S(a);
|
|
2352
|
-
Hb(b, {mb:!0, name:a, argPackAdvance:0, fromWireType:() => {
|
|
2353
|
-
}, toWireType:() => {
|
|
2354
|
-
},});
|
|
2355
|
-
}, _emscripten_get_now_is_monotonic:() => 1, _emscripten_memcpy_js:(b, a, c) => J.copyWithin(b, a, a + c), _emval_as:(b, a, c) => {
|
|
2356
|
-
b = R(b);
|
|
2357
|
-
a = ob(a, "emval::as");
|
|
2358
|
-
return Ac(a, c, b);
|
|
2359
|
-
}, _emval_call_method:(b, a, c, d, e) => {
|
|
2360
|
-
b = Dc[b];
|
|
2361
|
-
a = R(a);
|
|
2362
|
-
c = Cc(c);
|
|
2363
|
-
return b(a, a[c], d, e);
|
|
2364
|
-
}, _emval_decref:hc, _emval_get_method_caller:(b, a, c) => {
|
|
2365
|
-
var d = Fc(b, a), e = d.shift();
|
|
2366
|
-
b--;
|
|
2367
|
-
var f = Array(b);
|
|
2368
|
-
a = `methodCaller<(${d.map(l => l.name).join(", ")}) => ${e.name}>`;
|
|
2369
|
-
return Ec($a(a, (l, h, n, m) => {
|
|
2370
|
-
for (var r = 0, w = 0; w < b; ++w) {
|
|
2371
|
-
f[w] = d[w].readValueFromPointer(m + r), r += d[w].argPackAdvance;
|
|
2372
|
-
}
|
|
2373
|
-
l = 1 === c ? Gc(h, f) : h.apply(l, f);
|
|
2374
|
-
return Ac(e, n, l);
|
|
2375
|
-
}));
|
|
2376
|
-
}, _emval_get_module_property:b => {
|
|
2377
|
-
b = Cc(b);
|
|
2378
|
-
return bb(k[b]);
|
|
2379
|
-
}, _emval_get_property:(b, a) => {
|
|
2380
|
-
b = R(b);
|
|
2381
|
-
a = R(a);
|
|
2382
|
-
return bb(b[a]);
|
|
2383
|
-
}, _emval_incref:b => {
|
|
2384
|
-
9 < b && (N[b + 1] += 1);
|
|
2385
|
-
}, _emval_new_array:() => bb([]), _emval_new_cstring:b => bb(Cc(b)), _emval_new_object:() => bb({}), _emval_run_destructors:b => {
|
|
2386
|
-
var a = R(b);
|
|
2387
|
-
Db(a);
|
|
2388
|
-
hc(b);
|
|
2389
|
-
}, _emval_set_property:(b, a, c) => {
|
|
2390
|
-
b = R(b);
|
|
2391
|
-
a = R(a);
|
|
2392
|
-
c = R(c);
|
|
2393
|
-
b[a] = c;
|
|
2394
|
-
}, _emval_take_value:(b, a) => {
|
|
2395
|
-
b = ob(b, "_emval_take_value");
|
|
2396
|
-
b = b.readValueFromPointer(a);
|
|
2397
|
-
return bb(b);
|
|
2398
|
-
}, emscripten_date_now:() => Date.now(), emscripten_get_now:() => performance.now(), emscripten_resize_heap:b => {
|
|
2399
|
-
var a = J.length;
|
|
2400
|
-
b >>>= 0;
|
|
2401
|
-
if (2147483648 < b) {
|
|
2402
|
-
return !1;
|
|
2403
|
-
}
|
|
2404
|
-
for (var c = 1; 4 >= c; c *= 2) {
|
|
2405
|
-
var d = a * (1 + 0.2 / c);
|
|
2406
|
-
d = Math.min(d, b + 100663296);
|
|
2407
|
-
var e = Math;
|
|
2408
|
-
d = Math.max(b, d);
|
|
2409
|
-
a: {
|
|
2410
|
-
e = (e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536) - Ca.buffer.byteLength + 65535) / 65536;
|
|
2411
|
-
try {
|
|
2412
|
-
Ca.grow(e);
|
|
2413
|
-
Ja();
|
|
2414
|
-
var f = 1;
|
|
2415
|
-
break a;
|
|
2416
|
-
} catch (l) {
|
|
2417
|
-
}
|
|
2418
|
-
f = void 0;
|
|
2419
|
-
}
|
|
2420
|
-
if (f) {
|
|
2421
|
-
return !0;
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
return !1;
|
|
2425
|
-
}, environ_get:(b, a) => {
|
|
2426
|
-
var c = 0;
|
|
2427
|
-
Jc().forEach((d, e) => {
|
|
2428
|
-
var f = a + c;
|
|
2429
|
-
e = M[b + 4 * e >> 2] = f;
|
|
2430
|
-
for (f = 0; f < d.length; ++f) {
|
|
2431
|
-
Ea[e++] = d.charCodeAt(f);
|
|
2432
|
-
}
|
|
2433
|
-
Ea[e] = 0;
|
|
2434
|
-
c += d.length + 1;
|
|
2435
|
-
});
|
|
2436
|
-
return 0;
|
|
2437
|
-
}, environ_sizes_get:(b, a) => {
|
|
2438
|
-
var c = Jc();
|
|
2439
|
-
M[b >> 2] = c.length;
|
|
2440
|
-
var d = 0;
|
|
2441
|
-
c.forEach(e => d += e.length + 1);
|
|
2442
|
-
M[a >> 2] = d;
|
|
2443
|
-
return 0;
|
|
2444
|
-
}, fd_close:() => 52, fd_seek:function() {
|
|
2445
|
-
return 70;
|
|
2446
|
-
}, fd_write:(b, a, c, d) => {
|
|
2447
|
-
for (var e = 0, f = 0; f < c; f++) {
|
|
2448
|
-
var l = M[a >> 2], h = M[a + 4 >> 2];
|
|
2449
|
-
a += 8;
|
|
2450
|
-
for (var n = 0; n < h; n++) {
|
|
2451
|
-
var m = J[l + n], r = Kc[b];
|
|
2452
|
-
0 === m || 10 === m ? ((1 === b ? za : Aa)(sc(r, 0)), r.length = 0) : r.push(m);
|
|
2453
|
-
}
|
|
2454
|
-
e += h;
|
|
2455
|
-
}
|
|
2456
|
-
M[d >> 2] = e;
|
|
2457
|
-
return 0;
|
|
2458
|
-
}, strftime_l:(b, a, c, d) => Pc(b, a, c, d)}, Z = function() {
|
|
2459
|
-
function b(c) {
|
|
2460
|
-
Z = c.exports;
|
|
2461
|
-
Ca = Z.memory;
|
|
2462
|
-
Ja();
|
|
2463
|
-
Xb = Z.__indirect_function_table;
|
|
2464
|
-
La.unshift(Z.__wasm_call_ctors);
|
|
2465
|
-
Oa--;
|
|
2466
|
-
k.monitorRunDependencies?.(Oa);
|
|
2467
|
-
0 == Oa && (null !== Pa && (clearInterval(Pa), Pa = null), Qa && (c = Qa, Qa = null, c()));
|
|
2468
|
-
return Z;
|
|
2469
|
-
}
|
|
2470
|
-
var a = {env:Tc, wasi_snapshot_preview1:Tc,};
|
|
2471
|
-
Oa++;
|
|
2472
|
-
k.monitorRunDependencies?.(Oa);
|
|
2473
|
-
if (k.instantiateWasm) {
|
|
2474
|
-
try {
|
|
2475
|
-
return k.instantiateWasm(a, b);
|
|
2476
|
-
} catch (c) {
|
|
2477
|
-
Aa(`Module.instantiateWasm callback failed with error: ${c}`), ba(c);
|
|
2478
|
-
}
|
|
2479
|
-
}
|
|
2480
|
-
Ta ||= Sa("canvas_advanced.wasm") ? "canvas_advanced.wasm" : k.locateFile ? k.locateFile("canvas_advanced.wasm", y) : y + "canvas_advanced.wasm";
|
|
2481
|
-
Xa(a, function(c) {
|
|
2482
|
-
b(c.instance);
|
|
2483
|
-
}).catch(ba);
|
|
2484
|
-
return {};
|
|
2485
|
-
}(), mb = b => (mb = Z.free)(b), Sc = b => (Sc = Z.malloc)(b), lb = b => (lb = Z.__getTypeName)(b);
|
|
2486
|
-
k.dynCall_jiji = (b, a, c, d, e) => (k.dynCall_jiji = Z.dynCall_jiji)(b, a, c, d, e);
|
|
2487
|
-
k.dynCall_viijii = (b, a, c, d, e, f, l) => (k.dynCall_viijii = Z.dynCall_viijii)(b, a, c, d, e, f, l);
|
|
2488
|
-
k.dynCall_iiiiij = (b, a, c, d, e, f, l) => (k.dynCall_iiiiij = Z.dynCall_iiiiij)(b, a, c, d, e, f, l);
|
|
2489
|
-
k.dynCall_iiiiijj = (b, a, c, d, e, f, l, h, n) => (k.dynCall_iiiiijj = Z.dynCall_iiiiijj)(b, a, c, d, e, f, l, h, n);
|
|
2490
|
-
k.dynCall_iiiiiijj = (b, a, c, d, e, f, l, h, n, m) => (k.dynCall_iiiiiijj = Z.dynCall_iiiiiijj)(b, a, c, d, e, f, l, h, n, m);
|
|
2491
|
-
var Uc;
|
|
2492
|
-
Qa = function Vc() {
|
|
2493
|
-
Uc || Wc();
|
|
2494
|
-
Uc || (Qa = Vc);
|
|
2495
|
-
};
|
|
2496
|
-
function Wc() {
|
|
2497
|
-
function b() {
|
|
2498
|
-
if (!Uc && (Uc = !0, k.calledRun = !0, !Da)) {
|
|
2499
|
-
Za(La);
|
|
2500
|
-
aa(k);
|
|
2501
|
-
if (k.onRuntimeInitialized) {
|
|
2502
|
-
k.onRuntimeInitialized();
|
|
2503
|
-
}
|
|
2504
|
-
if (k.postRun) {
|
|
2505
|
-
for ("function" == typeof k.postRun && (k.postRun = [k.postRun]); k.postRun.length;) {
|
|
2506
|
-
var a = k.postRun.shift();
|
|
2507
|
-
Ma.unshift(a);
|
|
2508
|
-
}
|
|
2509
|
-
}
|
|
2510
|
-
Za(Ma);
|
|
2511
|
-
}
|
|
2512
|
-
}
|
|
2513
|
-
if (!(0 < Oa)) {
|
|
2514
|
-
if (k.preRun) {
|
|
2515
|
-
for ("function" == typeof k.preRun && (k.preRun = [k.preRun]); k.preRun.length;) {
|
|
2516
|
-
Na();
|
|
2517
|
-
}
|
|
2518
|
-
}
|
|
2519
|
-
Za(Ka);
|
|
2520
|
-
0 < Oa || (k.setStatus ? (k.setStatus("Running..."), setTimeout(function() {
|
|
2521
|
-
setTimeout(function() {
|
|
2522
|
-
k.setStatus("");
|
|
2523
|
-
}, 1);
|
|
2524
|
-
b();
|
|
2525
|
-
}, 1)) : b());
|
|
2526
|
-
}
|
|
2527
|
-
}
|
|
2528
|
-
if (k.preInit) {
|
|
2529
|
-
for ("function" == typeof k.preInit && (k.preInit = [k.preInit]); 0 < k.preInit.length;) {
|
|
2530
|
-
k.preInit.pop()();
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
Wc();
|
|
2534
|
-
moduleRtn = da;
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
return moduleRtn;
|
|
2539
|
-
}
|
|
2540
|
-
);
|
|
2541
|
-
})();
|
|
352
|
+
var Rive=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;var k=moduleArg,aa=!!globalThis.window,ba=!!globalThis.WorkerGlobalScope;
|
|
353
|
+
function fa(){function b(h){const g=d;c=a=0;d=new Map;g.forEach(m=>{try{m(h)}catch(n){console.error(n)}});this.ab();e&&e.xb()}let a=0,c=0,d=new Map,e=null,f=null;this.requestAnimationFrame=function(h){a||=requestAnimationFrame(b.bind(this));const g=++c;d.set(g,h);return g};this.cancelAnimationFrame=function(h){d.delete(h);a&&0==d.size&&(cancelAnimationFrame(a),a=0)};this.vb=function(h){f&&(document.body.remove(f),f=null);h||(f=document.createElement("div"),f.style.backgroundColor="black",f.style.position=
|
|
354
|
+
"fixed",f.style.right=0,f.style.top=0,f.style.color="white",f.style.padding="4px",f.innerHTML="RIVE FPS",h=function(g){f.innerHTML="RIVE FPS "+g.toFixed(1)},document.body.appendChild(f));e=new function(){let g=0,m=0;this.xb=function(){var n=performance.now();m?(++g,n-=m,1E3<n&&(h(1E3*g/n),g=m=0)):(m=n,g=0)}}};this.sb=function(){f&&(document.body.remove(f),f=null);e=null};this.ab=function(){}}
|
|
355
|
+
function ja(b){console.assert(!0);const a=new Map;let c=-Infinity;this.push=function(d){d=d+((1<<b)-1)>>b;a.has(d)&&clearTimeout(a.get(d));a.set(d,setTimeout(function(){a.delete(d);0==a.length?c=-Infinity:d==c&&(c=Math.max(...a.keys()),console.assert(c<d))},1E3));c=Math.max(d,c);return c<<b}}const ka=k.onRuntimeInitialized;
|
|
356
|
+
k.onRuntimeInitialized=function(){ka&&ka();let b=k.decodeAudio;k.decodeAudio=function(f,h){f=b(f);h(f)};let a=k.decodeFont;k.decodeFont=function(f,h){f=a(f);h(f)};let c=k.setFallbackFontCb;k.setFallbackFontCallback="function"===typeof c?function(f){c(f)}:function(){console.warn("Module.setFallbackFontCallback called, but text support is not enabled in this build.")};const d=k.FileAssetLoader;k.ptrToAsset=f=>{let h=k.ptrToFileAsset(f);return h.isImage?k.ptrToImageAsset(f):h.isFont?k.ptrToFontAsset(f):
|
|
357
|
+
h.isAudio?k.ptrToAudioAsset(f):h};k.CustomFileAssetLoader=d.extend("CustomFileAssetLoader",{__construct:function({loadContents:f}){this.__parent.__construct.call(this);this.mb=f},loadContents:function(f,h){f=k.ptrToAsset(f);return this.mb(f,h)}});k.CDNFileAssetLoader=d.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(f){let h=k.ptrToAsset(f);f=h.cdnUuid;if(""===f)return!1;(function(g,m){var n=new XMLHttpRequest;n.responseType="arraybuffer";
|
|
358
|
+
n.onreadystatechange=function(){4==n.readyState&&200==n.status&&m(n)};n.open("GET",g,!0);n.send(null)})(h.cdnBaseUrl+"/"+f,g=>{h.decode(new Uint8Array(g.response))});return!0}});k.FallbackFileAssetLoader=d.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this);this.$a=[]},addLoader:function(f){this.$a.push(f)},loadContents:function(f,h){for(let g of this.$a)if(g.loadContents(f,h))return!0;return!1}});let e=k.computeAlignment;k.computeAlignment=function(f,h,g,
|
|
359
|
+
m,n=1){return e.call(this,f,h,g,m,n)}};
|
|
360
|
+
const la="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),ma=new function(){function b(){if(!a){var t=document.createElement("canvas"),v={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,
|
|
361
|
+
renderViaOffscreenBackBuffer:1};let p;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(p=t.getContext("webgl",v),c=1,!p)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(p=t.getContext("webgl2",v))c=2;else if(p=t.getContext("webgl",v))c=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;p=new Proxy(p,{get(F,r){if(F.isContextLost()){if(m||(console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",r),m=!0),
|
|
362
|
+
"function"===typeof F[r])return function(){}}else return"function"===typeof F[r]?function(...G){return F[r].apply(F,G)}:F[r]},set(F,r,G){if(F.isContextLost())m||(console.error("Cannot render the mesh because the GL Context was lost. Tried to set property "+r),m=!0);else return F[r]=G,!0}});d=Math.min(p.getParameter(p.MAX_RENDERBUFFER_SIZE),p.getParameter(p.MAX_TEXTURE_SIZE));function I(F,r,G){r=p.createShader(r);p.shaderSource(r,G);p.compileShader(r);G=p.getShaderInfoLog(r);if(0<(G||"").length)throw G;
|
|
363
|
+
p.attachShader(F,r)}t=p.createProgram();I(t,p.VERTEX_SHADER,"attribute vec2 vertex;\n attribute vec2 uv;\n uniform vec4 mat;\n uniform vec2 translate;\n varying vec2 st;\n void main() {\n st = uv;\n gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n }");I(t,p.FRAGMENT_SHADER,"precision highp float;\n uniform sampler2D image;\n varying vec2 st;\n void main() {\n gl_FragColor = texture2D(image, st);\n }");
|
|
364
|
+
p.bindAttribLocation(t,0,"vertex");p.bindAttribLocation(t,1,"uv");p.linkProgram(t);v=p.getProgramInfoLog(t);if(0<(v||"").trim().length)throw v;e=p.getUniformLocation(t,"mat");f=p.getUniformLocation(t,"translate");p.useProgram(t);p.bindBuffer(p.ARRAY_BUFFER,p.createBuffer());p.enableVertexAttribArray(0);p.enableVertexAttribArray(1);p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,p.createBuffer());p.uniform1i(p.getUniformLocation(t,"image"),0);p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);a=p}return!0}let a=
|
|
365
|
+
null,c=0,d=0,e=null,f=null,h=0,g=0,m=!1;b();this.Gb=function(){b();return d};this.rb=function(t){a.deleteTexture&&a.deleteTexture(t)};this.qb=function(t){if(!b())return null;const v=a.createTexture();if(!v)return null;a.bindTexture(a.TEXTURE_2D,v);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,t);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);2==c?(a.texParameteri(a.TEXTURE_2D,
|
|
366
|
+
a.TEXTURE_MIN_FILTER,a.LINEAR_MIPMAP_LINEAR),a.generateMipmap(a.TEXTURE_2D)):a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);return v};const n=new ja(8),u=new ja(8),x=new ja(10),w=new ja(10);this.ub=function(t,v,p,I,F){if(b()){var r=n.push(t),G=u.push(v);if(a.canvas){if(a.canvas.width!=r||a.canvas.height!=G)a.canvas.width=r,a.canvas.height=G;a.viewport(0,G-v,t,v);a.disable(a.SCISSOR_TEST);a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);a.enable(a.SCISSOR_TEST);p.sort((E,U)=>U.fb-E.fb);
|
|
367
|
+
r=x.push(I);h!=r&&(a.bufferData(a.ARRAY_BUFFER,8*r,a.DYNAMIC_DRAW),h=r);r=0;for(var L of p)a.bufferSubData(a.ARRAY_BUFFER,r,L.Oa),r+=4*L.Oa.length;console.assert(r==4*I);for(var O of p)a.bufferSubData(a.ARRAY_BUFFER,r,O.ib),r+=4*O.ib.length;console.assert(r==8*I);r=w.push(F);g!=r&&(a.bufferData(a.ELEMENT_ARRAY_BUFFER,2*r,a.DYNAMIC_DRAW),g=r);L=0;for(var ca of p)a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,L,ca.indices),L+=2*ca.indices.length;console.assert(L==2*F);ca=0;O=!0;r=L=0;for(const E of p){E.image.Ja!=
|
|
368
|
+
ca&&(a.bindTexture(a.TEXTURE_2D,E.image.Ia||null),ca=E.image.Ja);E.Jb?(a.scissor(E.Ta,G-E.Ua-E.Za,E.Qb,E.Za),O=!0):O&&(a.scissor(0,G-v,t,v),O=!1);p=2/t;const U=-2/v;a.uniform4f(e,E.ua[0]*p*E.Ea,E.ua[1]*U*E.Fa,E.ua[2]*p*E.Ea,E.ua[3]*U*E.Fa);a.uniform2f(f,E.ua[4]*p*E.Ea+p*(E.Ta-E.Hb*E.Ea)-1,E.ua[5]*U*E.Fa+U*(E.Ua-E.Ib*E.Fa)+1);a.vertexAttribPointer(0,2,a.FLOAT,!1,0,r);a.vertexAttribPointer(1,2,a.FLOAT,!1,0,r+4*I);a.drawElements(a.TRIANGLES,E.indices.length,a.UNSIGNED_SHORT,L);r+=4*E.Oa.length;L+=2*
|
|
369
|
+
E.indices.length}console.assert(r==4*I);console.assert(L==2*F)}}};this.canvas=function(){return b()&&a.canvas}},na=k.onRuntimeInitialized;
|
|
370
|
+
k.onRuntimeInitialized=function(){function b(l){switch(l){case n.srcOver:return"source-over";case n.screen:return"screen";case n.overlay:return"overlay";case n.darken:return"darken";case n.lighten:return"lighten";case n.colorDodge:return"color-dodge";case n.colorBurn:return"color-burn";case n.hardLight:return"hard-light";case n.softLight:return"soft-light";case n.difference:return"difference";case n.exclusion:return"exclusion";case n.multiply:return"multiply";case n.hue:return"hue";case n.saturation:return"saturation";
|
|
371
|
+
case n.color:return"color";case n.luminosity:return"luminosity"}}function a(l){return"rgba("+((16711680&l)>>>16)+","+((65280&l)>>>8)+","+((255&l)>>>0)+","+((4278190080&l)>>>24)/255+")"}function c(){0<G.length&&(ma.ub(r.drawWidth(),r.drawHeight(),G,L,O),G=[],O=L=0,r.reset(512,512));for(const l of F){for(const q of l.ma)q();l.ma=[]}F.clear()}na&&na();var d=k.RenderPaintStyle;const e=k.RenderPath,f=k.RenderPaint,h=k.Renderer,g=k.StrokeCap,m=k.StrokeJoin,n=k.BlendMode,u=d.fill,x=d.stroke,w=k.FillRule.evenOdd;
|
|
372
|
+
let t=1;var v=k.RenderImage.extend("CanvasRenderImage",{__construct:function({ya:l,Da:q}={}){this.__parent.__construct.call(this);this.Ja=t;t=t+1&2147483647||1;this.ya=l;this.Da=q},__destruct:function(){this.Ia&&(ma.rb(this.Ia),URL.revokeObjectURL(this.Ra));this.__parent.__destruct.call(this)},decode:function(l){var q=this;q.Da&&q.Da(q);var D=new Image;q.Ra=URL.createObjectURL(new Blob([l],{type:"image/png"}));D.onload=function(){q.lb=D;q.Ia=ma.qb(D);q.size(D.width,D.height);q.ya&&q.ya(q)};D.src=
|
|
373
|
+
q.Ra}}),p=e.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this);this.ra=new Path2D},rewind:function(){this.ra=new Path2D},addPath:function(l,q,D,B,y,C,A){var H=this.ra,ha=H.addPath;l=l.ra;const N=new DOMMatrix;N.a=q;N.b=D;N.c=B;N.d=y;N.e=C;N.f=A;ha.call(H,l,N)},fillRule:function(l){this.Qa=l},moveTo:function(l,q){this.ra.moveTo(l,q)},lineTo:function(l,q){this.ra.lineTo(l,q)},cubicTo:function(l,q,D,B,y,C){this.ra.bezierCurveTo(l,q,D,B,y,C)},close:function(){this.ra.closePath()}}),
|
|
374
|
+
I=f.extend("CanvasRenderPaint",{color:function(l){this.Sa=a(l)},thickness:function(l){this.ob=l},join:function(l){switch(l){case m.miter:this.Ha="miter";break;case m.round:this.Ha="round";break;case m.bevel:this.Ha="bevel"}},cap:function(l){switch(l){case g.butt:this.Ga="butt";break;case g.round:this.Ga="round";break;case g.square:this.Ga="square"}},style:function(l){this.nb=l},blendMode:function(l){this.kb=b(l)},clearGradient:function(){this.wa=null},linearGradient:function(l,q,D,B){this.wa={gb:l,
|
|
375
|
+
hb:q,Wa:D,Xa:B,Na:[]}},radialGradient:function(l,q,D,B){this.wa={gb:l,hb:q,Wa:D,Xa:B,Na:[],Eb:!0}},addStop:function(l,q){this.wa.Na.push({color:l,stop:q})},completeGradient:function(){},draw:function(l,q,D,B){let y=this.nb;var C=this.Sa,A=this.wa;const H=l.globalCompositeOperation,ha=l.globalAlpha;l.globalCompositeOperation=this.kb;l.globalAlpha=B;if(null!=A){C=A.gb;const R=A.hb,X=A.Wa;var N=A.Xa;B=A.Na;A.Eb?(A=X-C,N-=R,C=l.createRadialGradient(C,R,0,C,R,Math.sqrt(A*A+N*N))):C=l.createLinearGradient(C,
|
|
376
|
+
R,X,N);for(let S=0,V=B.length;S<V;S++)A=B[S],C.addColorStop(A.stop,a(A.color));this.Sa=C;this.wa=null}switch(y){case x:l.strokeStyle=C;l.lineWidth=this.ob;l.lineCap=this.Ga;l.lineJoin=this.Ha;l.stroke(q);break;case u:l.fillStyle=C,l.fill(q,D)}l.globalCompositeOperation=H;l.globalAlpha=ha}});const F=new Set;let r=null,G=[],L=0,O=0;var ca=k.CanvasRenderer=h.extend("Renderer",{__construct:function(l){this.__parent.__construct.call(this);this.qa=[1,0,0,1,0,0];this.ja=[1];this.ga=l.getContext("2d");this.Pa=
|
|
377
|
+
l;this.ma=[]},save:function(){this.qa.push(...this.qa.slice(this.qa.length-6));this.ja.push(this.ja[this.ja.length-1]);this.ma.push(this.ga.save.bind(this.ga))},restore:function(){const l=this.qa.length-6;if(6>l)throw"restore() called without matching save().";this.qa.splice(l);this.ja.pop();this.ma.push(this.ga.restore.bind(this.ga))},transform:function(l,q,D,B,y,C){const A=this.qa,H=A.length-6;A.splice(H,6,A[H]*l+A[H+2]*q,A[H+1]*l+A[H+3]*q,A[H]*D+A[H+2]*B,A[H+1]*D+A[H+3]*B,A[H]*y+A[H+2]*C+A[H+4],
|
|
378
|
+
A[H+1]*y+A[H+3]*C+A[H+5]);this.ma.push(this.ga.transform.bind(this.ga,l,q,D,B,y,C))},rotate:function(l){const q=Math.sin(l);l=Math.cos(l);this.transform(l,q,-q,l,0,0)},modulateOpacity:function(l){this.ja[this.ja.length-1]*=l},_drawPath:function(l,q){this.ma.push(q.draw.bind(q,this.ga,l.ra,l.Qa===w?"evenodd":"nonzero",Math.max(0,this.ja[this.ja.length-1])))},_drawRiveImage:function(l,q,D,B){var y=l.lb;if(y){var C=this.ga,A=b(D),H=Math.max(0,B*this.ja[this.ja.length-1]);this.ma.push(function(){C.globalCompositeOperation=
|
|
379
|
+
A;C.globalAlpha=H;C.drawImage(y,0,0);C.globalAlpha=1})}},_getMatrix:function(l){const q=this.qa,D=q.length-6;for(let B=0;6>B;++B)l[B]=q[D+B]},_drawImageMesh:function(l,q,D,B,y,C,A,H,ha,N,R,X,S,V){let nb,ob,pb;try{nb=k.HEAPF32.slice(y>>2,(y>>2)+C),ob=k.HEAPF32.slice(A>>2,(A>>2)+H),pb=k.HEAPU16.slice(ha>>1,(ha>>1)+N)}catch(Ra){console.error("[Rive] _drawImageMesh: failed to read mesh data from WASM heap. Mesh skipped for this frame.");return}q=this.ga.canvas.width;y=this.ga.canvas.height;A=S-R;H=V-
|
|
380
|
+
X;R=Math.max(R,0);X=Math.max(X,0);S=Math.min(S,q);V=Math.min(V,y);const qa=S-R,ra=V-X;console.assert(qa<=Math.min(A,q));console.assert(ra<=Math.min(H,y));if(!(0>=qa||0>=ra)){S=qa<A||ra<H;q=V=1;var da=Math.ceil(qa*V),ea=Math.ceil(ra*q);y=ma.Gb();da>y&&(V*=y/da,da=y);ea>y&&(q*=y/ea,ea=y);r||(r=new k.DynamicRectanizer(y),r.reset(512,512));y=r.addRect(da,ea);0>y&&(c(),F.add(this),y=r.addRect(da,ea),console.assert(0<=y));var qb=y&65535,rb=y>>16;G.push({ua:this.qa.slice(this.qa.length-6),image:l,Ta:qb,
|
|
381
|
+
Ua:rb,Hb:R,Ib:X,Qb:da,Za:ea,Ea:V,Fa:q,Oa:nb,ib:ob,indices:pb,Jb:S,fb:l.Ja<<1|(S?1:0)});L+=C;O+=N;var ia=this.ga,cc=b(D),dc=Math.max(0,B*this.ja[this.ja.length-1]);this.ma.push(function(){ia.save();ia.resetTransform();ia.globalCompositeOperation=cc;ia.globalAlpha=dc;const Ra=ma.canvas();Ra&&ia.drawImage(Ra,qb,rb,da,ea,R,X,qa,ra);ia.restore()})}},_clipPath:function(l){this.ma.push(this.ga.clip.bind(this.ga,l.ra,l.Qa===w?"evenodd":"nonzero"))},clear:function(){F.add(this);this.ma.push(this.ga.clearRect.bind(this.ga,
|
|
382
|
+
0,0,this.Pa.width,this.Pa.height))},flush:function(){},translate:function(l,q){this.transform(1,0,0,1,l,q)}});k.makeRenderer=function(l){const q=new ca(l),D=q.ga;return new Proxy(q,{get(B,y){if("function"===typeof B[y])return function(...C){return B[y].apply(B,C)};if("function"===typeof D[y]){if(-1<la.indexOf(y))throw Error("RiveException: Method call to '"+y+"()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");
|
|
383
|
+
return function(...C){q.ma.push(D[y].bind(D,...C))}}return B[y]},set(B,y,C){if(y in D)return q.ma.push(()=>{D[y]=C}),!0}})};k.decodeImage=function(l,q){(new v({ya:q})).decode(l)};k.renderFactory={makeRenderPaint:function(){return new I},makeRenderPath:function(){return new p},makeRenderImage:function(){let l=U;return new v({Da:()=>{l.total++},ya:()=>{l.loaded++;if(l.loaded===l.total){const q=l.ready;q&&(q(),l.ready=null)}}})}};let E=k.load,U=null;k.load=function(l,q,D=!0){const B=new k.FallbackFileAssetLoader;
|
|
384
|
+
void 0!==q&&B.addLoader(q);D&&(q=new k.CDNFileAssetLoader,B.addLoader(q));return new Promise(function(y){let C=null;U={total:0,loaded:0,ready:function(){y(C)}};C=E(l,B);0==U.total&&y(C)})};let ec=k.RendererWrapper.prototype.align;k.RendererWrapper.prototype.align=function(l,q,D,B,y=1){ec.call(this,l,q,D,B,y)};d=new fa;k.requestAnimationFrame=d.requestAnimationFrame.bind(d);k.cancelAnimationFrame=d.cancelAnimationFrame.bind(d);k.enableFPSCounter=d.vb.bind(d);k.disableFPSCounter=d.sb;d.ab=c;k.resolveAnimationFrame=
|
|
385
|
+
c;k.cleanup=function(){r&&r.delete()}};var oa="./this.program";ba&&(_scriptName=self.location.href);var pa="",sa,ta;
|
|
386
|
+
if(aa||ba){try{pa=(new URL(".",_scriptName)).href}catch{}ba&&(ta=b=>{var a=new XMLHttpRequest;a.open("GET",b,!1);a.responseType="arraybuffer";a.send(null);return new Uint8Array(a.response)});sa=async b=>{if(ua(b))return new Promise((c,d)=>{var e=new XMLHttpRequest;e.open("GET",b,!0);e.responseType="arraybuffer";e.onload=()=>{200==e.status||0==e.status&&e.response?c(e.response):d(e.status)};e.onerror=d;e.send(null)});var a=await fetch(b,{credentials:"same-origin"});if(a.ok)return a.arrayBuffer();throw Error(a.status+
|
|
387
|
+
" : "+a.url);}}var va=console.log.bind(console),wa=console.error.bind(console),xa,ya=!1,za,ua=b=>b.startsWith("file://"),Aa,Ba,Ca,z,Da,Ea,Fa,J,Ga,Ha,Ia,Ja,Ka=!1;function La(){var b=Ma.buffer;k.HEAP8=Ca=new Int8Array(b);Da=new Int16Array(b);k.HEAPU8=z=new Uint8Array(b);k.HEAPU16=Ea=new Uint16Array(b);k.HEAP32=Fa=new Int32Array(b);k.HEAPU32=J=new Uint32Array(b);k.HEAPF32=Ga=new Float32Array(b);Ha=new Float64Array(b);Ia=new BigInt64Array(b);Ja=new BigUint64Array(b)}
|
|
388
|
+
function Na(b){k.onAbort?.(b);b="Aborted("+b+")";wa(b);ya=!0;b=new WebAssembly.RuntimeError(b+". Build with -sASSERTIONS for more info.");Ba?.(b);throw b;}var Oa;async function Pa(b){if(!xa)try{var a=await sa(b);return new Uint8Array(a)}catch{}if(b==Oa&&xa)b=new Uint8Array(xa);else if(ta)b=ta(b);else throw"both async and sync fetching of the wasm failed";return b}
|
|
389
|
+
async function Qa(b,a){try{var c=await Pa(b);return await WebAssembly.instantiate(c,a)}catch(d){wa(`failed to asynchronously prepare wasm: ${d}`),Na(d)}}async function Sa(b){var a=Oa;if(!xa&&!ua(a))try{var c=fetch(a,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(c,b)}catch(d){wa(`wasm streaming compile failed: ${d}`),wa("falling back to ArrayBuffer instantiation")}return Qa(a,b)}
|
|
390
|
+
class Ta{name="ExitStatus";constructor(b){this.message=`Program terminated with exit(${b})`;this.status=b}}
|
|
391
|
+
var Ua=b=>{for(;0<b.length;)b.shift()(k)},Va=[],Wa=[],Xa=()=>{var b=k.preRun.shift();Wa.push(b)},Ya=!0,Za=(b,a)=>Object.defineProperty(a,"name",{value:b}),$a=[],ab=[0,1,,1,null,1,!0,1,!1,1],K=class extends Error{constructor(b){super(b);this.name="BindingError"}},M=b=>{if(!b)throw new K(`Cannot use deleted val. handle = ${b}`);return ab[b]},P=b=>{switch(b){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const a=$a.pop()||ab.length;ab[a]=b;ab[a+1]=1;return a}};
|
|
392
|
+
class bb extends Error{}
|
|
393
|
+
var Q=b=>{for(var a="";;){var c=z[b++];if(!c)return a;a+=String.fromCharCode(c)}},cb={},db=(b,a)=>{if(void 0===a)throw new K("ptr should not be undefined");for(;b.ha;)a=b.za(a),b=b.ha;return a},eb={},hb=b=>{b=fb(b);var a=Q(b);gb(b);return a},ib=(b,a)=>{var c=eb[b];if(void 0===c)throw b=`${a} has unknown type ${hb(b)}`,new K(b);return c},jb=()=>{},kb=!1,lb=b=>{if(!globalThis.FinalizationRegistry)return lb=a=>a,b;kb=new FinalizationRegistry(a=>{a=a.$;--a.count.value;0===a.count.value&&(a.ia?a.na.pa(a.ia):
|
|
394
|
+
a.da.aa.pa(a.ca))});lb=a=>{var c=a.$;c.ia&&kb.register(a,{$:c},a);return a};jb=a=>{kb.unregister(a)};return lb(b)},mb={},sb=b=>{for(;b.length;){var a=b.pop();b.pop()(a)}};function tb(b){return this.ba(J[b>>2])}
|
|
395
|
+
var ub={},vb={},wb=class extends Error{constructor(b){super(b);this.name="InternalError"}},W=(b,a,c)=>{function d(g){g=c(g);if(g.length!==b.length)throw new wb("Mismatched type converter count");for(var m=0;m<b.length;++m)T(b[m],g[m])}b.forEach(g=>vb[g]=a);var e=Array(a.length),f=[],h=0;for(let [g,m]of a.entries())eb.hasOwnProperty(m)?e[g]=eb[m]:(f.push(m),ub.hasOwnProperty(m)||(ub[m]=[]),ub[m].push(()=>{e[g]=eb[m];++h;h===f.length&&d(e)}));0===f.length&&d(e)};
|
|
396
|
+
function xb(b,a,c={}){var d=a.name;if(!b)throw new K(`type "${d}" must have a positive integer typeid pointer`);if(eb.hasOwnProperty(b)){if(c.Db)return;throw new K(`Cannot register type '${d}' twice`);}eb[b]=a;delete vb[b];ub.hasOwnProperty(b)&&(a=ub[b],delete ub[b],a.forEach(e=>e()))}function T(b,a,c={}){return xb(b,a,c)}
|
|
397
|
+
var yb=(b,a,c)=>{switch(a){case 1:return c?d=>Ca[d]:d=>z[d];case 2:return c?d=>Da[d>>1]:d=>Ea[d>>1];case 4:return c?d=>Fa[d>>2]:d=>J[d>>2];case 8:return c?d=>Ia[d>>3]:d=>Ja[d>>3];default:throw new TypeError(`invalid integer width (${a}): ${b}`);}},zb=b=>{throw new K(b.$.da.aa.name+" instance already deleted");},Ab=[];function Bb(){}
|
|
398
|
+
var Cb={},Db=(b,a,c)=>{if(void 0===b[a].fa){var d=b[a];b[a]=function(...e){if(!b[a].fa.hasOwnProperty(e.length))throw new K(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${b[a].fa})!`);return b[a].fa[e.length].apply(this,e)};b[a].fa=[];b[a].fa[d.sa]=d}},Eb=(b,a,c)=>{if(k.hasOwnProperty(b)){if(void 0===c||void 0!==k[b].fa&&void 0!==k[b].fa[c])throw new K(`Cannot register public name '${b}' twice`);Db(k,b,b);if(k[b].fa.hasOwnProperty(c))throw new K(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
|
|
399
|
+
k[b].fa[c]=a}else k[b]=a,k[b].sa=c},Fb=b=>{b=b.replace(/[^a-zA-Z0-9_]/g,"$");var a=b.charCodeAt(0);return 48<=a&&57>=a?`_${b}`:b};function Gb(b,a,c,d,e,f,h,g){this.name=b;this.constructor=a;this.oa=c;this.pa=d;this.ha=e;this.yb=f;this.za=h;this.tb=g;this.bb=[]}
|
|
400
|
+
var Hb=(b,a,c)=>{for(;a!==c;){if(!a.za)throw new K(`Expected null or instance of ${c.name}, got an instance of ${a.name}`);b=a.za(b);a=a.ha}return b},Ib=b=>{if(null===b)return"null";var a=typeof b;return"object"===a||"array"===a||"function"===a?b.toString():""+b};
|
|
401
|
+
function Jb(b,a){if(null===a){if(this.Ka)throw new K(`null is not a valid ${this.name}`);return 0}if(!a.$)throw new K(`Cannot pass "${Ib(a)}" as a ${this.name}`);if(!a.$.ca)throw new K(`Cannot pass deleted object as a pointer of type ${this.name}`);return Hb(a.$.ca,a.$.da.aa,this.aa)}
|
|
402
|
+
function Kb(b,a){if(null===a){if(this.Ka)throw new K(`null is not a valid ${this.name}`);if(this.Ca){var c=this.Ma();null!==b&&b.push(this.pa,c);return c}return 0}if(!a||!a.$)throw new K(`Cannot pass "${Ib(a)}" as a ${this.name}`);if(!a.$.ca)throw new K(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Ba&&a.$.da.Ba)throw new K(`Cannot convert argument of type ${a.$.na?a.$.na.name:a.$.da.name} to parameter type ${this.name}`);c=Hb(a.$.ca,a.$.da.aa,this.aa);if(this.Ca){if(void 0===
|
|
403
|
+
a.$.ia)throw new K("Passing raw pointer to smart pointer is illegal");switch(this.Pb){case 0:if(a.$.na===this)c=a.$.ia;else throw new K(`Cannot convert argument of type ${a.$.na?a.$.na.name:a.$.da.name} to parameter type ${this.name}`);break;case 1:c=a.$.ia;break;case 2:if(a.$.na===this)c=a.$.ia;else{var d=a.clone();c=this.Lb(c,P(()=>d["delete"]()));null!==b&&b.push(this.pa,c)}break;default:throw new K("Unsupported sharing policy");}}return c}
|
|
404
|
+
function Lb(b,a){if(null===a){if(this.Ka)throw new K(`null is not a valid ${this.name}`);return 0}if(!a.$)throw new K(`Cannot pass "${Ib(a)}" as a ${this.name}`);if(!a.$.ca)throw new K(`Cannot pass deleted object as a pointer of type ${this.name}`);if(a.$.da.Ba)throw new K(`Cannot convert argument of type ${a.$.da.name} to parameter type ${this.name}`);return Hb(a.$.ca,a.$.da.aa,this.aa)}
|
|
405
|
+
var Mb=(b,a,c)=>{if(a===c)return b;if(void 0===c.ha)return null;b=Mb(b,a,c.ha);return null===b?null:c.tb(b)},Nb=(b,a)=>{a=db(b,a);return cb[a]},Ob=(b,a)=>{if(!a.da||!a.ca)throw new wb("makeClassHandle requires ptr and ptrType");if(!!a.na!==!!a.ia)throw new wb("Both smartPtrType and smartPtr must be specified");a.count={value:1};return lb(Object.create(b,{$:{value:a,writable:!0}}))};
|
|
406
|
+
function Pb(b,a,c,d,e,f,h,g,m,n,u){this.name=b;this.aa=a;this.Ka=c;this.Ba=d;this.Ca=e;this.Kb=f;this.Pb=h;this.cb=g;this.Ma=m;this.Lb=n;this.pa=u;e||void 0!==a.ha?this.ea=Kb:(this.ea=d?Jb:Lb,this.ka=null)}var Qb=(b,a,c)=>{if(!k.hasOwnProperty(b))throw new wb("Replacing nonexistent public symbol");void 0!==k[b].fa&&void 0!==c?k[b].fa[c]=a:(k[b]=a,k[b].sa=c)},Y=(b,a)=>{b=Q(b);var c=Rb.get(a);if("function"!=typeof c)throw new K(`unknown function pointer with signature ${b}: ${a}`);return c};
|
|
407
|
+
class Sb extends Error{}var Z=(b,a)=>{function c(f){e[f]||eb[f]||(vb[f]?vb[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};a.forEach(c);throw new Sb(`${b}: `+d.map(hb).join([", "]));};function Tb(b){for(var a=1;a<b.length;++a)if(null!==b[a]&&void 0===b[a].ka)return!0;return!1}
|
|
408
|
+
function Ub(b,a,c,d,e){var f=a.length;if(2>f)throw new K("argTypes array size mismatch! Must at least get return value and 'this' types!");var h=null!==a[1]&&null!==c,g=Tb(a),m=!a[0].Fb,n=f-2,u=Array(n),x=[],w=[];return Za(b,function(...t){w.length=0;x.length=h?2:1;x[0]=e;if(h){var v=a[1].ea(w,this);x[1]=v}for(var p=0;p<n;++p)u[p]=a[p+2].ea(w,t[p]),x.push(u[p]);t=d(...x);if(g)sb(w);else for(p=h?1:2;p<a.length;p++){var I=1===p?v:u[p-2];null!==a[p].ka&&a[p].ka(I)}v=m?a[0].ba(t):void 0;return v})}
|
|
409
|
+
var Vb=(b,a)=>{for(var c=[],d=0;d<b;d++)c.push(J[a+4*d>>2]);return c},Wb=b=>{b=b.trim();const a=b.indexOf("(");return-1===a?b:b.slice(0,a)},Xb=(b,a,c)=>{if(!(b instanceof Object))throw new K(`${c} with invalid "this": ${b}`);if(!(b instanceof a.aa.constructor))throw new K(`${c} incompatible with "this" of type ${b.constructor.name}`);if(!b.$.ca)throw new K(`cannot call emscripten binding method ${c} on deleted object`);return Hb(b.$.ca,b.$.da.aa,a.aa)},Yb=b=>{9<b&&0===--ab[b+1]&&(ab[b]=void 0,$a.push(b))},
|
|
410
|
+
Zb={name:"emscripten::val",ba:b=>{var a=M(b);Yb(b);return a},ea:(b,a)=>P(a),la:tb,ka:null},$b=(b,a,c)=>{switch(a){case 1:return c?function(d){return this.ba(Ca[d])}:function(d){return this.ba(z[d])};case 2:return c?function(d){return this.ba(Da[d>>1])}:function(d){return this.ba(Ea[d>>1])};case 4:return c?function(d){return this.ba(Fa[d>>2])}:function(d){return this.ba(J[d>>2])};default:throw new TypeError(`invalid integer width (${a}): ${b}`);}},ac=(b,a)=>{switch(a){case 4:return function(c){return this.ba(Ga[c>>
|
|
411
|
+
2])};case 8:return function(c){return this.ba(Ha[c>>3])};default:throw new TypeError(`invalid float width (${a}): ${b}`);}},bc=(b,a,c)=>{var d=z;if(!(0<c))return 0;var e=a;c=a+c-1;for(var f=0;f<b.length;++f){var h=b.codePointAt(f);if(127>=h){if(a>=c)break;d[a++]=h}else if(2047>=h){if(a+1>=c)break;d[a++]=192|h>>6;d[a++]=128|h&63}else if(65535>=h){if(a+2>=c)break;d[a++]=224|h>>12;d[a++]=128|h>>6&63;d[a++]=128|h&63}else{if(a+3>=c)break;d[a++]=240|h>>18;d[a++]=128|h>>12&63;d[a++]=128|h>>6&63;d[a++]=128|
|
|
412
|
+
h&63;f++}}d[a]=0;return a-e},fc=b=>{for(var a=0,c=0;c<b.length;++c){var d=b.charCodeAt(c);127>=d?a++:2047>=d?a+=2:55296<=d&&57343>=d?(a+=4,++c):a+=3}return a},gc=globalThis.TextDecoder&&new TextDecoder,hc=(b,a,c,d)=>{c=a+c;if(d)return c;for(;b[a]&&!(a>=c);)++a;return a},ic=(b,a=0,c,d)=>{c=hc(b,a,c,d);if(16<c-a&&b.buffer&&gc)return gc.decode(b.subarray(a,c));for(d="";a<c;){var e=b[a++];if(e&128){var f=b[a++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var h=b[a++]&63;e=224==(e&240)?
|
|
413
|
+
(e&15)<<12|f<<6|h:(e&7)<<18|f<<12|h<<6|b[a++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d},jc=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,kc=(b,a,c)=>{b>>=1;a=hc(Ea,b,a/2,c);if(16<a-b&&jc)return jc.decode(Ea.subarray(b,a));for(c="";b<a;++b)c+=String.fromCharCode(Ea[b]);return c},lc=(b,a,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var d=a;c=c<2*b.length?c/2:b.length;for(var e=0;e<c;++e)Da[a>>1]=
|
|
414
|
+
b.charCodeAt(e),a+=2;Da[a>>1]=0;return a-d},mc=b=>2*b.length,nc=(b,a,c)=>{var d="";b>>=2;for(var e=0;!(e>=a/4);e++){var f=J[b+e];if(!f&&!c)break;d+=String.fromCodePoint(f)}return d},oc=(b,a,c)=>{c??=2147483647;if(4>c)return 0;var d=a;c=d+c-4;for(var e=0;e<b.length;++e){var f=b.codePointAt(e);65535<f&&e++;Fa[a>>2]=f;a+=4;if(a+4>c)break}Fa[a>>2]=0;return a-d},pc=b=>{for(var a=0,c=0;c<b.length;++c)65535<b.codePointAt(c)&&c++,a+=4;return a},qc=0,rc=[],sc=b=>{var a=rc.length;rc.push(b);return a},tc=(b,
|
|
415
|
+
a)=>{for(var c=Array(b),d=0;d<b;++d)c[d]=ib(J[a+4*d>>2],`parameter ${d}`);return c},uc={},vc=b=>{var a=uc[b];return void 0===a?Q(b):a},wc={},xc=b=>{if(!(b instanceof Ta||"unwind"==b))throw b;},yc=b=>{za=b;Ya||0<qc||(k.onExit?.(b),ya=!0);throw new Ta(b);},zc=b=>{if(!ya)try{if(b(),!(Ya||0<qc))try{za=b=za,yc(b)}catch(a){xc(a)}}catch(a){xc(a)}},Ac={},Cc=()=>{if(!Bc){var b={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-",
|
|
416
|
+
"_")+".UTF-8",_:oa||"./this.program"},a;for(a in Ac)void 0===Ac[a]?delete b[a]:b[a]=Ac[a];var c=[];for(a in b)c.push(`${a}=${b[a]}`);Bc=c}return Bc},Bc,Dc=[null,[],[]];
|
|
417
|
+
(()=>{let b=Bb.prototype;Object.assign(b,{isAliasOf:function(c){if(!(this instanceof Bb&&c instanceof Bb))return!1;var d=this.$.da.aa,e=this.$.ca;c.$=c.$;var f=c.$.da.aa;for(c=c.$.ca;d.ha;)e=d.za(e),d=d.ha;for(;f.ha;)c=f.za(c),f=f.ha;return d===f&&e===c},clone:function(){this.$.ca||zb(this);if(this.$.va)return this.$.count.value+=1,this;var c=lb,d=Object,e=d.create,f=Object.getPrototypeOf(this),h=this.$;c=c(e.call(d,f,{$:{value:{count:h.count,xa:h.xa,va:h.va,ca:h.ca,da:h.da,ia:h.ia,na:h.na}}}));c.$.count.value+=
|
|
418
|
+
1;c.$.xa=!1;return c},["delete"](){this.$.ca||zb(this);if(this.$.xa&&!this.$.va)throw new K("Object already scheduled for deletion");jb(this);var c=this.$;--c.count.value;0===c.count.value&&(c.ia?c.na.pa(c.ia):c.da.aa.pa(c.ca));this.$.va||(this.$.ia=void 0,this.$.ca=void 0)},isDeleted:function(){return!this.$.ca},deleteLater:function(){this.$.ca||zb(this);if(this.$.xa&&!this.$.va)throw new K("Object already scheduled for deletion");Ab.push(this);this.$.xa=!0;return this}});const a=Symbol.dispose;
|
|
419
|
+
a&&(b[a]=b["delete"])})();
|
|
420
|
+
Object.assign(Pb.prototype,{zb(b){this.cb&&(b=this.cb(b));return b},Va(b){this.pa?.(b)},la:tb,ba:function(b){function a(){return this.Ca?Ob(this.aa.oa,{da:this.Kb,ca:c,na:this,ia:b}):Ob(this.aa.oa,{da:this,ca:b})}var c=this.zb(b);if(!c)return this.Va(b),null;var d=Nb(this.aa,c);if(void 0!==d){if(0===d.$.count.value)return d.$.ca=c,d.$.ia=b,d.clone();d=d.clone();this.Va(b);return d}d=this.aa.yb(c);d=Cb[d];if(!d)return a.call(this);d=this.Ba?d.pb:d.pointerType;var e=Mb(c,this.aa,d.aa);return null===
|
|
421
|
+
e?a.call(this):this.Ca?Ob(d.aa.oa,{da:d,ca:e,na:this,ia:b}):Ob(d.aa.oa,{da:d,ca:e})}});k.noExitRuntime&&(Ya=k.noExitRuntime);k.print&&(va=k.print);k.printErr&&(wa=k.printErr);k.wasmBinary&&(xa=k.wasmBinary);k.thisProgram&&(oa=k.thisProgram);if(k.preInit)for("function"==typeof k.preInit&&(k.preInit=[k.preInit]);0<k.preInit.length;)k.preInit.shift()();
|
|
422
|
+
var gb,Ec,fb,Fc,Ma,Rb,Gc={E:()=>Na(""),n:(b,a,c)=>{b=Q(b);a=ib(a,"wrapper");c=M(c);var d=a.aa,e=d.oa,f=d.ha.oa,h=d.ha.constructor;b=Za(b,function(...g){for(var m of d.ha.bb)if(this[m]===f[m])throw new bb(`Pure virtual function ${m} must be implemented in JavaScript`);Object.defineProperty(this,"__parent",{value:e});this.__construct(...g)});e.__construct=function(...g){if(this===e)throw new K("Pass correct 'this' to __construct");g=h.implement(this,...g);jb(g);var m=g.$;g.notifyOnDestruction();m.va=
|
|
423
|
+
!0;Object.defineProperties(this,{$:{value:m}});lb(this);g=m.ca;g=db(d,g);if(cb.hasOwnProperty(g))throw new K(`Tried to register registered instance: ${g}`);cb[g]=this};e.__destruct=function(){if(this===e)throw new K("Pass correct 'this' to __destruct");jb(this);var g=this.$.ca;g=db(d,g);if(cb.hasOwnProperty(g))delete cb[g];else throw new K(`Tried to unregister unregistered instance: ${g}`);};b.prototype=Object.create(e);Object.assign(b.prototype,c);return P(b)},N:b=>{var a=mb[b];delete mb[b];var c=
|
|
424
|
+
a.Ma,d=a.pa,e=a.Ya,f=e.map(h=>h.Cb).concat(e.map(h=>h.Nb));W([b],f,h=>{var g={},m,n;for([m,n]of e.entries()){const u=h[m],x=n.Ab,w=n.Bb,t=h[m+e.length],v=n.Mb,p=n.Ob;g[n.wb]={read:I=>u.ba(x(w,I)),write:(I,F)=>{var r=[];v(p,I,t.ea(r,F));sb(r)},optional:u.optional}}return[{name:a.name,ba:u=>{var x={},w;for(w in g)x[w]=g[w].read(u);d(u);return x},ea:(u,x)=>{for(var w in g)if(!(w in x||g[w].optional))throw new TypeError(`Missing field: "${w}"`);var t=c();for(w in g)g[w].write(t,x[w]);null!==u&&u.push(d,
|
|
425
|
+
t);return t},la:tb,ka:d}]})},r:(b,a,c,d,e)=>{a=Q(a);d=0n===d;let f=h=>h;if(d){const h=8*c;f=g=>BigInt.asUintN(h,g);e=f(e)}T(b,{name:a,ba:f,ea:(h,g)=>{"number"==typeof g&&(g=BigInt(g));return g},la:yb(a,c,!d),ka:null})},H:(b,a,c,d)=>{a=Q(a);T(b,{name:a,ba:function(e){return!!e},ea:function(e,f){return f?c:d},la:function(e){return this.ba(z[e])},ka:null})},c:(b,a,c,d,e,f,h,g,m,n,u,x,w)=>{u=Q(u);f=Y(e,f);g&&=Y(h,g);n&&=Y(m,n);w=Y(x,w);var t=Fb(u);Eb(t,function(){Z(`Cannot construct ${u} due to unbound types`,
|
|
426
|
+
[d])});W([b,a,c],d?[d]:[],v=>{v=v[0];if(d){var p=v.aa;var I=p.oa}else I=Bb.prototype;v=Za(u,function(...L){if(Object.getPrototypeOf(this)!==F)throw new K(`Use 'new' to construct ${u}`);if(void 0===r.ta)throw new K(`${u} has no accessible constructor`);var O=r.ta[L.length];if(void 0===O)throw new K(`Tried to invoke ctor of ${u} with invalid number of parameters (${L.length}) - expected (${Object.keys(r.ta).toString()}) parameters instead!`);return O.apply(this,L)});var F=Object.create(I,{constructor:{value:v}});
|
|
427
|
+
v.prototype=F;var r=new Gb(u,v,F,w,p,f,g,n);if(r.ha){var G;(G=r.ha).Aa??(G.Aa=[]);r.ha.Aa.push(r)}p=new Pb(u,r,!0,!1,!1);G=new Pb(u+"*",r,!1,!1,!1);I=new Pb(u+" const*",r,!1,!0,!1);Cb[b]={pointerType:G,pb:I};Qb(t,v);return[p,G,I]})},j:(b,a,c,d,e,f,h)=>{var g=Vb(c,d);a=Q(a);a=Wb(a);f=Y(e,f);W([],[b],m=>{function n(){Z(`Cannot call ${u} due to unbound types`,g)}m=m[0];var u=`${m.name}.${a}`;a.startsWith("@@")&&(a=Symbol[a.substring(2)]);var x=m.aa.constructor;void 0===x[a]?(n.sa=c-1,x[a]=n):(Db(x,a,
|
|
428
|
+
u),x[a].fa[c-1]=n);W([],g,w=>{w=Ub(u,[w[0],null].concat(w.slice(1)),null,f,h);void 0===x[a].fa?(w.sa=c-1,x[a]=w):x[a].fa[c-1]=w;if(m.aa.Aa)for(const t of m.aa.Aa)t.constructor.hasOwnProperty(a)||(t.constructor[a]=w);return[]});return[]})},p:(b,a,c,d,e,f,h,g)=>{a=Q(a);f=Y(e,f);W([],[b],m=>{m=m[0];var n=`${m.name}.${a}`,u={get(){Z(`Cannot access ${n} due to unbound types`,[c])},enumerable:!0,configurable:!0};u.set=g?()=>{Z(`Cannot access ${n} due to unbound types`,[c])}:()=>{throw new K(`${n} is a read-only property`);
|
|
429
|
+
};Object.defineProperty(m.aa.constructor,a,u);W([],[c],x=>{x=x[0];var w={get(){return x.ba(f(d))},enumerable:!0};g&&(g=Y(h,g),w.set=t=>{var v=[];g(d,x.ea(v,t));sb(v)});Object.defineProperty(m.aa.constructor,a,w);return[]});return[]})},m:(b,a,c,d,e,f)=>{var h=Vb(a,c);e=Y(d,e);W([],[b],g=>{g=g[0];var m=`constructor ${g.name}`;void 0===g.aa.ta&&(g.aa.ta=[]);if(void 0!==g.aa.ta[a-1])throw new K(`Cannot register multiple constructors with identical number of parameters (${a-1}) for class '${g.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
430
|
+
g.aa.ta[a-1]=()=>{Z(`Cannot construct ${g.name} due to unbound types`,h)};W([],h,n=>{n.splice(1,0,null);g.aa.ta[a-1]=Ub(m,n,null,e,f);return[]});return[]})},a:(b,a,c,d,e,f,h,g)=>{var m=Vb(c,d);a=Q(a);a=Wb(a);f=Y(e,f);W([],[b],n=>{function u(){Z(`Cannot call ${x} due to unbound types`,m)}n=n[0];var x=`${n.name}.${a}`;a.startsWith("@@")&&(a=Symbol[a.substring(2)]);g&&n.aa.bb.push(a);var w=n.aa.oa,t=w[a];void 0===t||void 0===t.fa&&t.className!==n.name&&t.sa===c-2?(u.sa=c-2,u.className=n.name,w[a]=u):
|
|
431
|
+
(Db(w,a,x),w[a].fa[c-2]=u);W([],m,v=>{v=Ub(x,v,n,f,h);void 0===w[a].fa?(v.sa=c-2,w[a]=v):w[a].fa[c-2]=v;return[]});return[]})},b:(b,a,c,d,e,f,h,g,m,n)=>{a=Q(a);e=Y(d,e);W([],[b],u=>{u=u[0];var x=`${u.name}.${a}`,w={get(){Z(`Cannot access ${x} due to unbound types`,[c,h])},enumerable:!0,configurable:!0};w.set=m?()=>Z(`Cannot access ${x} due to unbound types`,[c,h]):()=>{throw new K(x+" is a read-only property");};Object.defineProperty(u.aa.oa,a,w);W([],m?[c,h]:[c],t=>{var v=t[0],p={get(){var F=Xb(this,
|
|
432
|
+
u,x+" getter");return v.ba(e(f,F))},enumerable:!0};if(m){m=Y(g,m);var I=t[1];p.set=function(F){var r=Xb(this,u,x+" setter"),G=[];m(n,r,I.ea(G,F));sb(G)}}Object.defineProperty(u.aa.oa,a,p);return[]});return[]})},F:b=>T(b,Zb),l:(b,a,c,d,e)=>{a=Q(a);e=0===e?"object":1===e?"number":"string";switch(e){case "object":function h(){}h.values={};T(b,{name:a,constructor:h,valueType:e,ba:function(g){return this.constructor.values[g]},ea:(g,m)=>m.value,la:$b(a,c,d),ka:null});Eb(a,h);break;case "number":var f=
|
|
433
|
+
{};T(b,{name:a,La:f,valueType:e,ba:g=>g,ea:(g,m)=>m,la:$b(a,c,d),ka:null});Eb(a,f);delete k[a].sa;break;case "string":f={},T(b,{name:a,jb:{},eb:{},La:f,valueType:e,ba:function(g){return this.eb[g]},ea:function(g,m){return this.jb[m]},la:$b(a,c,d),ka:null}),Eb(a,f),delete k[a].sa}},d:(b,a,c)=>{var d=ib(b,"enum");a=Q(a);switch(d.valueType){case "object":b=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:Za(`${d.name}_${a}`,function(){})}});b.values[c]=d;b[a]=
|
|
434
|
+
d;break;case "number":d.La[a]=c;break;case "string":d.jb[a]=c,d.eb[c]=a,d.La[a]=a}},q:(b,a,c)=>{a=Q(a);T(b,{name:a,ba:d=>d,ea:(d,e)=>e,la:ac(a,c),ka:null})},i:(b,a,c,d,e,f)=>{var h=Vb(a,c);b=Q(b);b=Wb(b);e=Y(d,e);Eb(b,function(){Z(`Cannot call ${b} due to unbound types`,h)},a-1);W([],h,g=>{Qb(b,Ub(b,[g[0],null].concat(g.slice(1)),null,e,f),a-1);return[]})},k:(b,a,c,d,e)=>{a=Q(a);let f=g=>g;if(0===d){var h=32-8*c;f=g=>g<<h>>>h;e=f(e)}T(b,{name:a,ba:f,ea:(g,m)=>m,la:yb(a,c,0!==d),ka:null})},h:(b,a,
|
|
435
|
+
c)=>{function d(f){return new e(Ca.buffer,J[f+4>>2],J[f>>2])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][a];c=Q(c);T(b,{name:c,ba:d,la:d},{Db:!0})},G:(b,a)=>{a=Q(a);T(b,{name:a,ba(c){var d=(d=c+4)?ic(z,d,J[c>>2],!0):"";gb(c);return d},ea(c,d){d instanceof ArrayBuffer&&(d=new Uint8Array(d));var e="string"==typeof d;if(!(e||ArrayBuffer.isView(d)&&1==d.BYTES_PER_ELEMENT))throw new K("Cannot pass non-string to std::string");
|
|
436
|
+
var f=e?fc(d):d.length;var h=Ec(4+f+1),g=h+4;J[h>>2]=f;e?bc(d,g,f+1):z.set(d,g);null!==c&&c.push(gb,h);return h},la:tb,ka(c){gb(c)}})},o:(b,a,c)=>{c=Q(c);if(2===a){var d=kc;var e=lc;var f=mc}else d=nc,e=oc,f=pc;T(b,{name:c,ba:h=>{var g=d(h+4,J[h>>2]*a,!0);gb(h);return g},ea:(h,g)=>{if("string"!=typeof g)throw new K(`Cannot pass non-string to C++ string type ${c}`);var m=f(g),n=Ec(4+m+a);J[n>>2]=m/a;e(g,n+4,m+a);null!==h&&h.push(gb,n);return n},la:tb,ka(h){gb(h)}})},P:(b,a,c,d,e,f)=>{mb[b]={name:Q(a),
|
|
437
|
+
Ma:Y(c,d),pa:Y(e,f),Ya:[]}},O:(b,a,c,d,e,f,h,g,m,n)=>{mb[b].Ya.push({wb:Q(a),Cb:c,Ab:Y(d,e),Bb:f,Nb:h,Mb:Y(g,m),Ob:n})},I:(b,a)=>{a=Q(a);T(b,{Fb:!0,name:a,ba:()=>{},ea:()=>{}})},u:()=>{Ya=!1;qc=0},f:(b,a,c)=>{var [d,...e]=tc(b,a),f=d.ea.bind(d),h=e.map(m=>m.la.bind(m));b--;var g=Array(b);a=`methodCaller<(${e.map(m=>m.name)}) => ${d.name}>`;return sc(Za(a,(m,n,u,x)=>{for(var w=0,t=0;t<b;++t)g[t]=h[t](x+w),w+=8;switch(c){case 0:var v=M(m).apply(null,g);break;case 2:v=Reflect.construct(M(m),g);break;
|
|
438
|
+
case 3:v=g[0];break;case 1:v=M(m)[vc(n)](...g)}m=[];v=f(m,v);m.length&&(J[u>>2]=P(m));return v}))},R:Yb,J:b=>{b=vc(b);return P(k[b])},K:(b,a)=>{b=M(b);a=M(a);return P(b[a])},L:b=>{9<b&&(ab[b+1]+=1)},e:(b,a,c,d,e)=>rc[b](a,c,d,e),M:()=>P([]),s:b=>P(vc(b)),S:()=>P({}),Q:b=>{var a=M(b);sb(a);Yb(b)},g:(b,a,c)=>{b=M(b);a=M(a);c=M(c);b[a]=c},v:(b,a)=>{wc[b]&&(clearTimeout(wc[b].id),delete wc[b]);if(!a)return 0;var c=setTimeout(()=>{delete wc[b];zc(()=>Fc(b,performance.now()))},a);wc[b]={id:c,Rb:a};return 0},
|
|
439
|
+
w:(b,a,c,d)=>{var e=(new Date).getFullYear(),f=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();J[b>>2]=60*Math.max(f,e);Fa[a>>2]=Number(f!=e);a=h=>{var g=Math.abs(h);return`UTC${0<=h?"-":"+"}${String(Math.floor(g/60)).padStart(2,"0")}${String(g%60).padStart(2,"0")}`};b=a(f);a=a(e);e<f?(bc(b,c,17),bc(a,d,17)):(bc(b,d,17),bc(a,c,17))},z:function(b,a,c){if(!(0<=b&&3>=b))return 28;Ia[c>>3]=BigInt(Math.round(1E6*(0===b?Date.now():performance.now())));return 0},A:b=>{var a=
|
|
440
|
+
z.length;b>>>=0;if(2147483648<b)return!1;for(var c=1;4>=c;c*=2){var d=a*(1+.2/c);d=Math.min(d,b+100663296);a:{d=(Math.min(2147483648,65536*Math.ceil(Math.max(b,d)/65536))-Ma.buffer.byteLength+65535)/65536|0;try{Ma.grow(d);La();var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},x:(b,a)=>{var c=0,d=0,e;for(e of Cc()){var f=a+c;J[b+d>>2]=f;c+=bc(e,f,Infinity)+1;d+=4}return 0},y:(b,a)=>{var c=Cc();J[b>>2]=c.length;b=0;for(var d of c)b+=fc(d)+1;J[a>>2]=b;return 0},D:()=>52,B:function(){return 70},
|
|
441
|
+
C:(b,a,c,d)=>{for(var e=0,f=0;f<c;f++){var h=J[a>>2],g=J[a+4>>2];a+=8;for(var m=0;m<g;m++){var n=b,u=z[h+m],x=Dc[n];0===u||10===u?((1===n?va:wa)(ic(x)),x.length=0):x.push(u)}e+=g}J[d>>2]=e;return 0},t:yc},Hc;
|
|
442
|
+
Hc=await (async function(){function b(c){c=Hc=c.exports;gb=c.V;Ec=c.W;fb=c.X;Fc=c.Z;Ma=c.T;Rb=c.Y;La();return Hc}var a={a:Gc};if(k.instantiateWasm)return new Promise(c=>{k.instantiateWasm(a,(d,e)=>{c(b(d,e))})});Oa??=k.locateFile?k.locateFile("canvas_advanced.wasm",pa):pa+"canvas_advanced.wasm";return b((await Sa(a)).instance)}());
|
|
443
|
+
(function(){function b(){k.calledRun=!0;if(!ya){Ka=!0;Hc.U();Aa?.(k);k.onRuntimeInitialized?.();if(k.postRun)for("function"==typeof k.postRun&&(k.postRun=[k.postRun]);k.postRun.length;){var a=k.postRun.shift();Va.push(a)}Ua(Va)}}if(k.preRun)for("function"==typeof k.preRun&&(k.preRun=[k.preRun]);k.preRun.length;)Xa();Ua(Wa);k.setStatus?(k.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>k.setStatus(""),1);b()},1)):b()})();Ka?moduleRtn=k:moduleRtn=new Promise((b,a)=>{Aa=b;Ba=a});
|
|
444
|
+
;return moduleRtn}})();
|
|
2542
445
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Rive);
|
|
2543
446
|
|
|
2544
447
|
|
|
@@ -2546,7 +449,7 @@ moduleRtn = da;
|
|
|
2546
449
|
/* 5 */
|
|
2547
450
|
/***/ ((module) => {
|
|
2548
451
|
|
|
2549
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.
|
|
452
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.40.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","runtimeLoader.d.ts","utils","semantics"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
2550
453
|
|
|
2551
454
|
/***/ }),
|
|
2552
455
|
/* 6 */
|
|
@@ -4702,21 +2605,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4702
2605
|
/* harmony export */ KeyboardInteractions: () => (/* binding */ KeyboardInteractions)
|
|
4703
2606
|
/* harmony export */ });
|
|
4704
2607
|
/**
|
|
4705
|
-
* Tracks the relationship between
|
|
4706
|
-
* current focus session.
|
|
2608
|
+
* Tracks the relationship between DOM focus inside this Rive focus domain (canvas or semantic overlay)
|
|
2609
|
+
* and Rive's internal focus for the current focus session.
|
|
4707
2610
|
*
|
|
4708
|
-
* NotFocused —
|
|
4709
|
-
*
|
|
4710
|
-
*
|
|
4711
|
-
* EntryPending —
|
|
4712
|
-
* the focus tree.
|
|
4713
|
-
*
|
|
4714
|
-
* RiveFocused — a Rive node
|
|
4715
|
-
*
|
|
2611
|
+
* NotFocused — DOM focus left the domain, Rive released focus internally, or Tab walked
|
|
2612
|
+
* off the end of the tree. Keyboard input isn't ours, so Tab is ignored and
|
|
2613
|
+
* reaches the next page element.
|
|
2614
|
+
* EntryPending — DOM focus is inside the domain but Rive holds no node yet, so the next Tab
|
|
2615
|
+
* enters the focus tree. Set by pointer focus on the canvas, by assistive technology (AT) focus landing
|
|
2616
|
+
* in the overlay, and by keyboard focus whose entry attempt found no eligible node.
|
|
2617
|
+
* RiveFocused — a Rive node holds focus. Tab/Shift+Tab route to the Rive focus manager and stay
|
|
2618
|
+
* inside the domain until either Rive reports focus ended (pollFocusState) or
|
|
2619
|
+
* focusNext()/focusPrevious() returns false at the edge of the tree.
|
|
4716
2620
|
*
|
|
4717
|
-
*
|
|
4718
|
-
*
|
|
4719
|
-
* where focusNext()/focusPrevious() return false but respects tabindex).
|
|
2621
|
+
* Keyboard focus on the canvas enters the tree immediately: onCanvasFocus infers direction from
|
|
2622
|
+
* where focus came from and goes straight to RiveFocused when a node accepts.
|
|
4720
2623
|
*/
|
|
4721
2624
|
var FocusSessionState;
|
|
4722
2625
|
(function (FocusSessionState) {
|
|
@@ -4725,7 +2628,9 @@ var FocusSessionState;
|
|
|
4725
2628
|
FocusSessionState["RiveFocused"] = "riveFocused";
|
|
4726
2629
|
})(FocusSessionState || (FocusSessionState = {}));
|
|
4727
2630
|
/**
|
|
4728
|
-
* Manages keyboard and DOM focus interactions for
|
|
2631
|
+
* Manages keyboard and DOM focus interactions for Rive's focus domain (<canvas> or semantic overlay).
|
|
2632
|
+
* Because keyboard events can apply on either part of the domain, we need to track what events we should
|
|
2633
|
+
* handle/intercept, and when to release focus back to the page outside of the domain.
|
|
4729
2634
|
*
|
|
4730
2635
|
* Tracks the canvas focus session state (focusSessionState) and routes
|
|
4731
2636
|
* Tab/Shift+Tab to the Rive state machine's focus manager. Exposes shared
|
|
@@ -4771,17 +2676,45 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
4771
2676
|
_this.focusSessionState = FocusSessionState.RiveFocused;
|
|
4772
2677
|
}
|
|
4773
2678
|
};
|
|
4774
|
-
|
|
2679
|
+
/**
|
|
2680
|
+
* Marks internal state that the canvas has lost DOM focus. Do not actually clear
|
|
2681
|
+
* Rive focus though if:
|
|
2682
|
+
* 1. DOM focus is still within Rive domain (i.e., semantic overlay)
|
|
2683
|
+
* 2. Document just lost focus (i.e. tab switching)
|
|
2684
|
+
*
|
|
2685
|
+
* When we're not in either of those buckets, it's safe to call `clearFocus()` on the SMI.
|
|
2686
|
+
*/
|
|
2687
|
+
this.onCanvasBlur = function (event) {
|
|
4775
2688
|
_this.focusSessionState = FocusSessionState.NotFocused;
|
|
4776
2689
|
_this.canvasHasFocus = false;
|
|
2690
|
+
var movedWithinFocusDomain = _this.isInFocusDomain(event.relatedTarget);
|
|
2691
|
+
var documentLostFocus = event.relatedTarget === null && !document.hasFocus();
|
|
2692
|
+
if (movedWithinFocusDomain || documentLostFocus)
|
|
2693
|
+
return;
|
|
2694
|
+
_this.mainSm.clearFocus();
|
|
4777
2695
|
};
|
|
2696
|
+
/**
|
|
2697
|
+
* Assistive technology (AT) focus landing inside the overlay is DOM focus inside the Rive focus domain, so open a
|
|
2698
|
+
* session even when no Rive node holds focus yet. shouldRiveHandleKeyEvent treats NotFocused
|
|
2699
|
+
* as authoritative, so without this the overlay's Tab keydowns reach onKeyDown and get dropped
|
|
2700
|
+
* at that gate — the browser would move focus out of Rive instead of to the next focus node.
|
|
2701
|
+
*/
|
|
4778
2702
|
this.onOverlayFocusIn = function (event) {
|
|
4779
|
-
if (_this.isInOverlay(event.target))
|
|
4780
|
-
|
|
4781
|
-
|
|
2703
|
+
if (!_this.isInOverlay(event.target))
|
|
2704
|
+
return;
|
|
2705
|
+
_this.focusDomainReleased = false;
|
|
2706
|
+
if (!_this.hasFocusNodes)
|
|
2707
|
+
return;
|
|
2708
|
+
if (_this.focusSessionState !== FocusSessionState.NotFocused)
|
|
2709
|
+
return;
|
|
2710
|
+
_this.focusSessionState = _this.mainSm.focusState().hasFocus
|
|
2711
|
+
? FocusSessionState.RiveFocused
|
|
2712
|
+
: FocusSessionState.EntryPending;
|
|
4782
2713
|
};
|
|
4783
|
-
|
|
2714
|
+
/** Overlay listeners attach lazily, so the first focusin only ever lands here. */
|
|
2715
|
+
this.onFocusDomainHostFocusIn = function (event) {
|
|
4784
2716
|
_this.syncOverlayListener();
|
|
2717
|
+
_this.onOverlayFocusIn(event);
|
|
4785
2718
|
};
|
|
4786
2719
|
this.onKeyDown = function (event) {
|
|
4787
2720
|
_this.syncOverlayListener();
|
|
@@ -4794,7 +2727,7 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
4794
2727
|
var forward = !event.shiftKey;
|
|
4795
2728
|
var focusMoved = forward ? _this.mainSm.focusNext() : _this.mainSm.focusPrevious();
|
|
4796
2729
|
if (focusMoved) {
|
|
4797
|
-
// A Rive node accepted focus — keep trapping Tab inside
|
|
2730
|
+
// A Rive node accepted focus — keep trapping Tab inside Rive.
|
|
4798
2731
|
_this.focusSessionState = FocusSessionState.RiveFocused;
|
|
4799
2732
|
event.preventDefault();
|
|
4800
2733
|
}
|
|
@@ -4830,27 +2763,34 @@ var KeyboardInteractions = /** @class */ (function () {
|
|
|
4830
2763
|
/**
|
|
4831
2764
|
* Called by pollFocusState on the Rive instance when it observes hasFocus=true. Rive acquired
|
|
4832
2765
|
* focus internally (e.g. via a listener action or state transition) without a DOM focus event,
|
|
4833
|
-
* so mark the session RiveFocused.
|
|
2766
|
+
* so mark the session RiveFocused. This cannot resurrect a session that a DOM blur ended,
|
|
2767
|
+
* because onCanvasBlur clears Rive's focus alongside it.
|
|
4834
2768
|
*/
|
|
4835
2769
|
KeyboardInteractions.prototype.notifyRiveFocused = function () {
|
|
4836
2770
|
this.focusSessionState = FocusSessionState.RiveFocused;
|
|
4837
2771
|
};
|
|
4838
2772
|
/**
|
|
4839
|
-
*
|
|
4840
|
-
*
|
|
4841
|
-
*
|
|
4842
|
-
*
|
|
2773
|
+
* Determine if Rive should handle keyboard input. If session state is `NotFocused` - no.
|
|
2774
|
+
* DOM focus stays parked on the canvas after Rive releases focus internally, and that Tab
|
|
2775
|
+
* has to reach the page rather than re-enter the tree.
|
|
2776
|
+
*
|
|
2777
|
+
* Otherwise, the event still has to belong to Rive:
|
|
2778
|
+
* 1. If the current DOM focus is in Rive domain (canvas or semantic overlay)
|
|
2779
|
+
* 2. If the target for the key input is for the semantic overlay, or the canvas
|
|
4843
2780
|
*/
|
|
4844
2781
|
KeyboardInteractions.prototype.shouldRiveHandleKeyEvent = function (event) {
|
|
2782
|
+
if (this.focusSessionState === FocusSessionState.NotFocused)
|
|
2783
|
+
return false;
|
|
4845
2784
|
var inFocusDomain = this.isInFocusDomain(document.activeElement) ||
|
|
4846
2785
|
this.isInOverlay(event.target);
|
|
4847
|
-
if (inFocusDomain)
|
|
4848
|
-
return true;
|
|
4849
|
-
var sessionActive = this.focusSessionState !== FocusSessionState.NotFocused;
|
|
4850
2786
|
var eventOnCanvas = event.target === this.canvas;
|
|
4851
|
-
return
|
|
2787
|
+
return inFocusDomain || this.canvasHasFocus || eventOnCanvas;
|
|
4852
2788
|
};
|
|
4853
|
-
/**
|
|
2789
|
+
/**
|
|
2790
|
+
* The Rive focus domain: the DOM that counts as "inside" Rive for focus purposes — today the
|
|
2791
|
+
* canvas itself OR the accessibility overlay subtree. Anything added later belongs here, so
|
|
2792
|
+
* session bookkeeping and keydown routing pick it up for free.
|
|
2793
|
+
*/
|
|
4854
2794
|
KeyboardInteractions.prototype.isInFocusDomain = function (target) {
|
|
4855
2795
|
if (target === this.canvas)
|
|
4856
2796
|
return true;
|
|
@@ -7557,8 +5497,9 @@ var Rive = /** @class */ (function () {
|
|
|
7557
5497
|
// Rive has an active focus node. Mark the session RiveFocused so Tab stays
|
|
7558
5498
|
// trapped and a later internal release (hasFocus true → false) is detected.
|
|
7559
5499
|
this._keyboardInteractions.notifyRiveFocused();
|
|
7560
|
-
// Only steal DOM focus on the false→true transition.
|
|
7561
|
-
//
|
|
5500
|
+
// Only steal DOM focus on the false→true transition. Rive can hold focus across
|
|
5501
|
+
// frames while DOM focus sits elsewhere — a window switch preserves runtime focus
|
|
5502
|
+
// by design — and that must not re-focus the canvas again.
|
|
7562
5503
|
if (!this._prevHasFocus) {
|
|
7563
5504
|
// Steal DOM focus to the canvas only when focus isn't already held
|
|
7564
5505
|
// somewhere inside this instance's focus scope. When the accessibility
|
|
@@ -7579,8 +5520,9 @@ var Rive = /** @class */ (function () {
|
|
|
7579
5520
|
this._prevHasFocus = false;
|
|
7580
5521
|
// hasFocus is false — only act when Rive previously held focus and released it internally
|
|
7581
5522
|
// (state change clears focus). Release the DOM Tab trap so the next Tab moves to the next
|
|
7582
|
-
// page element.
|
|
7583
|
-
//
|
|
5523
|
+
// page element. A DOM blur reaches here too now that onCanvasBlur clears Rive focus, but it
|
|
5524
|
+
// has already set NotFocused, so this is a no-op. EntryPending and NotFocused are likewise
|
|
5525
|
+
// intentional no-ops — EntryPending must stay put (a click awaiting its first Tab).
|
|
7584
5526
|
if (this._keyboardInteractions.focusSessionState === _utils__WEBPACK_IMPORTED_MODULE_3__.FocusSessionState.RiveFocused) {
|
|
7585
5527
|
this._keyboardInteractions.setFocusSessionState(_utils__WEBPACK_IMPORTED_MODULE_3__.FocusSessionState.NotFocused);
|
|
7586
5528
|
}
|