@rive-app/webgl2 2.37.8 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rive.d.ts +40 -1
- package/rive.js +553 -387
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +24 -0
- package/rive_fallback.wasm +0 -0
- package/utils/finalizationRegistry.d.ts +1 -1
- package/utils/index.d.ts +1 -1
- package/utils/registerKeyboardInteractions.d.ts +67 -7
- package/utils/registerTouchInteractions.d.ts +2 -1
package/rive.js
CHANGED
|
@@ -366,9 +366,9 @@ function fa() {
|
|
|
366
366
|
const k = d;
|
|
367
367
|
c = b = 0;
|
|
368
368
|
d = new Map();
|
|
369
|
-
k.forEach(
|
|
369
|
+
k.forEach(n => {
|
|
370
370
|
try {
|
|
371
|
-
|
|
371
|
+
n(g);
|
|
372
372
|
} catch (m) {
|
|
373
373
|
console.error(m);
|
|
374
374
|
}
|
|
@@ -393,10 +393,10 @@ function fa() {
|
|
|
393
393
|
f.innerHTML = "RIVE FPS " + k.toFixed(1);
|
|
394
394
|
}, document.body.appendChild(f));
|
|
395
395
|
e = new function() {
|
|
396
|
-
let k = 0,
|
|
396
|
+
let k = 0, n = 0;
|
|
397
397
|
this.Nb = function() {
|
|
398
398
|
var m = performance.now();
|
|
399
|
-
|
|
399
|
+
n ? (++k, m -= n, 1000 < m && (g(1000 * k / m), k = n = 0)) : (n = m, k = 0);
|
|
400
400
|
};
|
|
401
401
|
}();
|
|
402
402
|
};
|
|
@@ -457,11 +457,11 @@ l.onRuntimeInitialized = function() {
|
|
|
457
457
|
if ("" === f) {
|
|
458
458
|
return !1;
|
|
459
459
|
}
|
|
460
|
-
(function(k,
|
|
460
|
+
(function(k, n) {
|
|
461
461
|
var m = new XMLHttpRequest();
|
|
462
462
|
m.responseType = "arraybuffer";
|
|
463
463
|
m.onreadystatechange = function() {
|
|
464
|
-
4 == m.readyState && 200 == m.status &&
|
|
464
|
+
4 == m.readyState && 200 == m.status && n(m);
|
|
465
465
|
};
|
|
466
466
|
m.open("GET", k, !0);
|
|
467
467
|
m.send(null);
|
|
@@ -484,8 +484,8 @@ l.onRuntimeInitialized = function() {
|
|
|
484
484
|
return !1;
|
|
485
485
|
},});
|
|
486
486
|
let e = l.computeAlignment;
|
|
487
|
-
l.computeAlignment = function(f, g, k,
|
|
488
|
-
return e.call(this, f, g, k,
|
|
487
|
+
l.computeAlignment = function(f, g, k, n, m = 1.0) {
|
|
488
|
+
return e.call(this, f, g, k, n, m);
|
|
489
489
|
};
|
|
490
490
|
};
|
|
491
491
|
const ja = l.onRuntimeInitialized;
|
|
@@ -531,19 +531,19 @@ l.onRuntimeInitialized = function() {
|
|
|
531
531
|
z = ka(u, z);
|
|
532
532
|
la(z);
|
|
533
533
|
const A = f(r.width, r.height);
|
|
534
|
-
A.
|
|
534
|
+
A.Ma = z;
|
|
535
535
|
A.G = r;
|
|
536
|
-
A.
|
|
536
|
+
A.Na = r.width;
|
|
537
537
|
A.Za = r.height;
|
|
538
538
|
A.T = u;
|
|
539
539
|
var C = A.delete;
|
|
540
540
|
A.delete = function() {
|
|
541
541
|
C.call(this);
|
|
542
|
-
var H = this.
|
|
542
|
+
var H = this.Ma;
|
|
543
543
|
q === w[H] && (q = null);
|
|
544
544
|
"object" == typeof JSEvents && JSEvents.Qc(w[H].F.canvas);
|
|
545
545
|
w[H] && w[H].F.canvas && (w[H].F.canvas.zb = void 0);
|
|
546
|
-
this.
|
|
546
|
+
this.Ma = this.G = this.Na = this.T = w[H] = null;
|
|
547
547
|
};
|
|
548
548
|
return A;
|
|
549
549
|
}
|
|
@@ -551,7 +551,7 @@ l.onRuntimeInitialized = function() {
|
|
|
551
551
|
if (d) {
|
|
552
552
|
var r = d.Db, u = 0, z = 0, A = 0, C = Array(e.size), H = 0;
|
|
553
553
|
for (var J of e) {
|
|
554
|
-
J.ea = Math.min(J.G.width, r), J.da = Math.min(J.G.height, r), J.
|
|
554
|
+
J.ea = Math.min(J.G.width, r), J.da = Math.min(J.G.height, r), J.Ka = J.da * J.ea, u = Math.max(u, J.ea), z = Math.max(z, J.da), A += J.Ka, C[H++] = J;
|
|
555
555
|
}
|
|
556
556
|
e.clear();
|
|
557
557
|
if (!(0 >= A)) {
|
|
@@ -561,7 +561,7 @@ l.onRuntimeInitialized = function() {
|
|
|
561
561
|
}
|
|
562
562
|
u = Math.min(u, r);
|
|
563
563
|
u = Math.min(z, r);
|
|
564
|
-
C.sort((Z, ob) => ob.
|
|
564
|
+
C.sort((Z, ob) => ob.Ka - Z.Ka);
|
|
565
565
|
A = new l.DynamicRectanizer(r);
|
|
566
566
|
for (J = 0; J < C.length;) {
|
|
567
567
|
A.reset(u, z);
|
|
@@ -574,7 +574,7 @@ l.onRuntimeInitialized = function() {
|
|
|
574
574
|
K.pa = I & 65535;
|
|
575
575
|
K.qa = I >> 16;
|
|
576
576
|
}
|
|
577
|
-
K =
|
|
577
|
+
K = n.push(A.drawWidth());
|
|
578
578
|
I = m.push(A.drawHeight());
|
|
579
579
|
console.assert(K >= A.drawWidth());
|
|
580
580
|
console.assert(I >= A.drawHeight());
|
|
@@ -622,9 +622,9 @@ l.onRuntimeInitialized = function() {
|
|
|
622
622
|
}
|
|
623
623
|
d.Ya = !!d.T.getExtension("WEBGL_shader_pixel_local_storage");
|
|
624
624
|
d.Db = Math.min(d.T.getParameter(d.T.MAX_RENDERBUFFER_SIZE), d.T.getParameter(d.T.MAX_TEXTURE_SIZE));
|
|
625
|
-
d.
|
|
625
|
+
d.La = !d.Ya;
|
|
626
626
|
if (A = d.T.getExtension("WEBGL_debug_renderer_info")) {
|
|
627
|
-
C = d.T.getParameter(A.UNMASKED_RENDERER_WEBGL), d.T.getParameter(A.UNMASKED_VENDOR_WEBGL).includes("Google") && C.includes("ANGLE Metal Renderer") && (d.
|
|
627
|
+
C = d.T.getParameter(A.UNMASKED_RENDERER_WEBGL), d.T.getParameter(A.UNMASKED_VENDOR_WEBGL).includes("Google") && C.includes("ANGLE Metal Renderer") && (d.La = !1);
|
|
628
628
|
}
|
|
629
629
|
return d;
|
|
630
630
|
}
|
|
@@ -632,9 +632,9 @@ l.onRuntimeInitialized = function() {
|
|
|
632
632
|
if (!d) {
|
|
633
633
|
throw "Unable to create WebGL context, your environment may not support WebGL. Try out @rive-app/canvas as an alternative.";
|
|
634
634
|
}
|
|
635
|
-
d.
|
|
635
|
+
d.La || (d = z(!1));
|
|
636
636
|
}
|
|
637
|
-
return u ? new a(r) : b(r, d.
|
|
637
|
+
return u ? new a(r) : b(r, d.La);
|
|
638
638
|
};
|
|
639
639
|
const g = l.Artboard.prototype["delete"];
|
|
640
640
|
l.Artboard.prototype["delete"] = function() {
|
|
@@ -647,7 +647,7 @@ l.onRuntimeInitialized = function() {
|
|
|
647
647
|
this.Fb || k.call(this, r.Eb);
|
|
648
648
|
}) : k.call(this, r);
|
|
649
649
|
};
|
|
650
|
-
const
|
|
650
|
+
const n = new ha(), m = new ha(), t = new fa();
|
|
651
651
|
l.requestAnimationFrame = t.requestAnimationFrame.bind(t);
|
|
652
652
|
l.cancelAnimationFrame = t.cancelAnimationFrame.bind(t);
|
|
653
653
|
l.enableFPSCounter = t.Lb.bind(t);
|
|
@@ -662,10 +662,10 @@ l.onRuntimeInitialized = function() {
|
|
|
662
662
|
};
|
|
663
663
|
const x = l.WebGL2Renderer.prototype.clear;
|
|
664
664
|
l.WebGL2Renderer.prototype.clear = function() {
|
|
665
|
-
la(this.
|
|
665
|
+
la(this.Ma);
|
|
666
666
|
const r = this.G;
|
|
667
|
-
if (this.
|
|
668
|
-
this.resize(r.width, r.height), this.
|
|
667
|
+
if (this.Na != r.width || this.Za != r.height) {
|
|
668
|
+
this.resize(r.width, r.height), this.Na = r.width, this.Za = r.height;
|
|
669
669
|
}
|
|
670
670
|
x.call(this);
|
|
671
671
|
};
|
|
@@ -673,9 +673,9 @@ l.onRuntimeInitialized = function() {
|
|
|
673
673
|
r = l.decodeWebGL2Image(r);
|
|
674
674
|
u(r);
|
|
675
675
|
};
|
|
676
|
-
let
|
|
676
|
+
let p = l.Renderer.prototype.align;
|
|
677
677
|
l.Renderer.prototype.align = function(r, u, z, A, C = 1.0) {
|
|
678
|
-
|
|
678
|
+
p.call(this, r, u, z, A, C);
|
|
679
679
|
};
|
|
680
680
|
};
|
|
681
681
|
var ma = Object.assign({}, l), na = "./this.program", y = "", oa, pa;
|
|
@@ -769,14 +769,14 @@ function Na(a, b) {
|
|
|
769
769
|
return Ma(c, a, b);
|
|
770
770
|
}));
|
|
771
771
|
}
|
|
772
|
-
var Oa, Pa, Ta = {
|
|
772
|
+
var Oa, Pa, Ta = {570520:(a, b, c, d, e) => {
|
|
773
773
|
if ("undefined" === typeof window || void 0 === (window.AudioContext || window.webkitAudioContext)) {
|
|
774
774
|
return 0;
|
|
775
775
|
}
|
|
776
776
|
if ("undefined" === typeof window.h) {
|
|
777
|
-
window.h = {
|
|
777
|
+
window.h = {Fa:0};
|
|
778
778
|
window.h.I = {};
|
|
779
|
-
window.h.I.
|
|
779
|
+
window.h.I.Ca = a;
|
|
780
780
|
window.h.I.capture = b;
|
|
781
781
|
window.h.I.Pa = c;
|
|
782
782
|
window.h.ha = {};
|
|
@@ -809,7 +809,7 @@ var Oa, Pa, Ta = {569016:(a, b, c, d, e) => {
|
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
811
|
};
|
|
812
|
-
f.
|
|
812
|
+
f.ta = function(g) {
|
|
813
813
|
return f.C[g];
|
|
814
814
|
};
|
|
815
815
|
f.Xa = ["touchend", "click"];
|
|
@@ -818,25 +818,25 @@ var Oa, Pa, Ta = {569016:(a, b, c, d, e) => {
|
|
|
818
818
|
var k = f.C[g];
|
|
819
819
|
null != k && null != k.K && k.state === f.ha.ub && k.K.resume().then(() => {
|
|
820
820
|
Qa(k.nb);
|
|
821
|
-
},
|
|
822
|
-
console.error("Failed to resume audiocontext",
|
|
821
|
+
}, n => {
|
|
822
|
+
console.error("Failed to resume audiocontext", n);
|
|
823
823
|
});
|
|
824
824
|
}
|
|
825
|
-
f.Xa.map(function(
|
|
826
|
-
document.removeEventListener(
|
|
825
|
+
f.Xa.map(function(n) {
|
|
826
|
+
document.removeEventListener(n, f.unlock, !0);
|
|
827
827
|
});
|
|
828
828
|
};
|
|
829
829
|
f.Xa.map(function(g) {
|
|
830
830
|
document.addEventListener(g, f.unlock, !0);
|
|
831
831
|
});
|
|
832
832
|
}
|
|
833
|
-
window.h.
|
|
833
|
+
window.h.Fa += 1;
|
|
834
834
|
return 1;
|
|
835
|
-
},
|
|
835
|
+
}, 572698:() => {
|
|
836
836
|
"undefined" !== typeof window.h && (window.h.Xa.map(function(a) {
|
|
837
837
|
document.removeEventListener(a, window.h.unlock, !0);
|
|
838
|
-
}), --window.h.
|
|
839
|
-
},
|
|
838
|
+
}), --window.h.Fa, 0 === window.h.Fa && delete window.h);
|
|
839
|
+
}, 573002:() => void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia, 573106:() => {
|
|
840
840
|
try {
|
|
841
841
|
var a = new (window.AudioContext || window.webkitAudioContext)(), b = a.sampleRate;
|
|
842
842
|
a.close();
|
|
@@ -844,68 +844,68 @@ var Oa, Pa, Ta = {569016:(a, b, c, d, e) => {
|
|
|
844
844
|
} catch (c) {
|
|
845
845
|
return 0;
|
|
846
846
|
}
|
|
847
|
-
},
|
|
847
|
+
}, 573277:(a, b, c, d, e, f) => {
|
|
848
848
|
if ("undefined" === typeof window.h) {
|
|
849
849
|
return -1;
|
|
850
850
|
}
|
|
851
851
|
var g = {}, k = {};
|
|
852
|
-
a == window.h.I.
|
|
852
|
+
a == window.h.I.Ca && 0 != c && (k.sampleRate = c);
|
|
853
853
|
g.K = new (window.AudioContext || window.webkitAudioContext)(k);
|
|
854
854
|
g.K.suspend();
|
|
855
855
|
g.state = window.h.ha.stopped;
|
|
856
856
|
c = 0;
|
|
857
|
-
a != window.h.I.
|
|
857
|
+
a != window.h.I.Ca && (c = b);
|
|
858
858
|
g.Y = g.K.createScriptProcessor(d, c, b);
|
|
859
|
-
g.Y.onaudioprocess = function(
|
|
860
|
-
if (null == g.
|
|
861
|
-
g.
|
|
859
|
+
g.Y.onaudioprocess = function(n) {
|
|
860
|
+
if (null == g.ua || 0 == g.ua.length) {
|
|
861
|
+
g.ua = new Float32Array(xa.buffer, e, d * b);
|
|
862
862
|
}
|
|
863
863
|
if (a == window.h.I.capture || a == window.h.I.Pa) {
|
|
864
864
|
for (var m = 0; m < b; m += 1) {
|
|
865
|
-
for (var t =
|
|
865
|
+
for (var t = n.inputBuffer.getChannelData(m), v = g.ua, x = 0; x < d; x += 1) {
|
|
866
866
|
v[x * b + m] = t[x];
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
Ra(f, d, e);
|
|
870
870
|
}
|
|
871
|
-
if (a == window.h.I.
|
|
872
|
-
for (Sa(f, d, e), m = 0; m <
|
|
873
|
-
for (t =
|
|
871
|
+
if (a == window.h.I.Ca || a == window.h.I.Pa) {
|
|
872
|
+
for (Sa(f, d, e), m = 0; m < n.outputBuffer.numberOfChannels; ++m) {
|
|
873
|
+
for (t = n.outputBuffer.getChannelData(m), v = g.ua, x = 0; x < d; x += 1) {
|
|
874
874
|
t[x] = v[x * b + m];
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
} else {
|
|
878
|
-
for (m = 0; m <
|
|
879
|
-
|
|
878
|
+
for (m = 0; m < n.outputBuffer.numberOfChannels; ++m) {
|
|
879
|
+
n.outputBuffer.getChannelData(m).fill(0.0);
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
882
|
};
|
|
883
|
-
a != window.h.I.capture && a != window.h.I.Pa || navigator.mediaDevices.getUserMedia({audio:!0, video:!1}).then(function(
|
|
884
|
-
g.
|
|
885
|
-
g.
|
|
883
|
+
a != window.h.I.capture && a != window.h.I.Pa || navigator.mediaDevices.getUserMedia({audio:!0, video:!1}).then(function(n) {
|
|
884
|
+
g.Ga = g.K.createMediaStreamSource(n);
|
|
885
|
+
g.Ga.connect(g.Y);
|
|
886
886
|
g.Y.connect(g.K.destination);
|
|
887
|
-
}).catch(function(
|
|
888
|
-
console.log("Failed to get user media: " +
|
|
887
|
+
}).catch(function(n) {
|
|
888
|
+
console.log("Failed to get user media: " + n);
|
|
889
889
|
});
|
|
890
|
-
a == window.h.I.
|
|
890
|
+
a == window.h.I.Ca && g.Y.connect(g.K.destination);
|
|
891
891
|
g.nb = f;
|
|
892
892
|
return window.h.mc(g);
|
|
893
|
-
},
|
|
894
|
-
a = window.h.
|
|
893
|
+
}, 576154:a => window.h.ta(a).K.sampleRate, 576227:a => {
|
|
894
|
+
a = window.h.ta(a);
|
|
895
895
|
void 0 !== a.Y && (a.Y.onaudioprocess = function() {
|
|
896
896
|
}, a.Y.disconnect(), a.Y = void 0);
|
|
897
|
-
void 0 !== a.
|
|
897
|
+
void 0 !== a.Ga && (a.Ga.disconnect(), a.Ga = void 0);
|
|
898
898
|
a.K.close();
|
|
899
899
|
a.K = void 0;
|
|
900
900
|
a.nb = void 0;
|
|
901
|
-
},
|
|
901
|
+
}, 576627:a => {
|
|
902
902
|
window.h.yb(a);
|
|
903
|
-
},
|
|
904
|
-
a = window.h.
|
|
903
|
+
}, 576677:a => {
|
|
904
|
+
a = window.h.ta(a);
|
|
905
905
|
a.K.resume();
|
|
906
906
|
a.state = window.h.ha.ub;
|
|
907
|
-
},
|
|
908
|
-
a = window.h.
|
|
907
|
+
}, 576816:a => {
|
|
908
|
+
a = window.h.ta(a);
|
|
909
909
|
a.K.suspend();
|
|
910
910
|
a.state = window.h.ha.stopped;
|
|
911
911
|
}}, Ua = a => {
|
|
@@ -1056,16 +1056,16 @@ function jb(a, b) {
|
|
|
1056
1056
|
kb(a, lb);
|
|
1057
1057
|
}
|
|
1058
1058
|
var lb = {open(a) {
|
|
1059
|
-
var b = ib[a.node.
|
|
1059
|
+
var b = ib[a.node.Ea];
|
|
1060
1060
|
if (!b) {
|
|
1061
1061
|
throw new M(43);
|
|
1062
1062
|
}
|
|
1063
1063
|
a.s = b;
|
|
1064
1064
|
a.seekable = !1;
|
|
1065
1065
|
}, close(a) {
|
|
1066
|
-
a.s.V.
|
|
1067
|
-
},
|
|
1068
|
-
a.s.V.
|
|
1066
|
+
a.s.V.sa(a.s);
|
|
1067
|
+
}, sa(a) {
|
|
1068
|
+
a.s.V.sa(a.s);
|
|
1069
1069
|
}, read(a, b, c, d) {
|
|
1070
1070
|
if (!a.s || !a.s.V.hb) {
|
|
1071
1071
|
throw new M(60);
|
|
@@ -1116,7 +1116,7 @@ var lb = {open(a) {
|
|
|
1116
1116
|
return a;
|
|
1117
1117
|
}, Sa(a, b) {
|
|
1118
1118
|
null === b || 10 === b ? (ra(L(a.H, 0)), a.H = []) : 0 != b && a.H.push(b);
|
|
1119
|
-
},
|
|
1119
|
+
}, sa(a) {
|
|
1120
1120
|
a.H && 0 < a.H.length && (ra(L(a.H, 0)), a.H = []);
|
|
1121
1121
|
}, Wb() {
|
|
1122
1122
|
return {xc:25856, zc:5, wc:191, yc:35387, vc:[3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]};
|
|
@@ -1126,7 +1126,7 @@ var lb = {open(a) {
|
|
|
1126
1126
|
return [24, 80];
|
|
1127
1127
|
},}, nb = {Sa(a, b) {
|
|
1128
1128
|
null === b || 10 === b ? (sa(L(a.H, 0)), a.H = []) : 0 != b && a.H.push(b);
|
|
1129
|
-
},
|
|
1129
|
+
}, sa(a) {
|
|
1130
1130
|
a.H && 0 < a.H.length && (sa(L(a.H, 0)), a.H = []);
|
|
1131
1131
|
},};
|
|
1132
1132
|
function pb(a, b) {
|
|
@@ -1139,7 +1139,7 @@ var N = {N:null, U() {
|
|
|
1139
1139
|
if (24576 === (c & 61440) || 4096 === (c & 61440)) {
|
|
1140
1140
|
throw new M(63);
|
|
1141
1141
|
}
|
|
1142
|
-
N.N || (N.N = {dir:{node:{X:N.j.X, P:N.j.P, ka:N.j.ka,
|
|
1142
|
+
N.N || (N.N = {dir:{node:{X:N.j.X, P:N.j.P, ka:N.j.ka, Aa:N.j.Aa, sb:N.j.sb, xb:N.j.xb, tb:N.j.tb, rb:N.j.rb, Ha:N.j.Ha}, stream:{aa:N.m.aa}}, file:{node:{X:N.j.X, P:N.j.P}, stream:{aa:N.m.aa, read:N.m.read, write:N.m.write, $a:N.m.$a, jb:N.m.jb, lb:N.m.lb}}, link:{node:{X:N.j.X, P:N.j.P, la:N.j.la}, stream:{}}, ab:{node:{X:N.j.X, P:N.j.P}, stream:qb}});
|
|
1143
1143
|
c = rb(a, b, c, d);
|
|
1144
1144
|
16384 === (c.mode & 61440) ? (c.j = N.N.dir.node, c.m = N.N.dir.stream, c.l = {}) : 32768 === (c.mode & 61440) ? (c.j = N.N.file.node, c.m = N.N.file.stream, c.v = 0, c.l = null) : 40960 === (c.mode & 61440) ? (c.j = N.N.link.node, c.m = N.N.link.stream) : 8192 === (c.mode & 61440) && (c.j = N.N.ab.node, c.m = N.N.ab.stream);
|
|
1145
1145
|
c.timestamp = Date.now();
|
|
@@ -1155,7 +1155,7 @@ var N = {N:null, U() {
|
|
|
1155
1155
|
b.Nc = 1;
|
|
1156
1156
|
b.uid = 0;
|
|
1157
1157
|
b.Gc = 0;
|
|
1158
|
-
b.
|
|
1158
|
+
b.Ea = a.Ea;
|
|
1159
1159
|
16384 === (a.mode & 61440) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.v : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
|
|
1160
1160
|
b.tc = new Date(a.timestamp);
|
|
1161
1161
|
b.Mc = new Date(a.timestamp);
|
|
@@ -1178,7 +1178,7 @@ var N = {N:null, U() {
|
|
|
1178
1178
|
}
|
|
1179
1179
|
}, ka() {
|
|
1180
1180
|
throw sb[44];
|
|
1181
|
-
},
|
|
1181
|
+
}, Aa(a, b, c, d) {
|
|
1182
1182
|
return N.createNode(a, b, c, d);
|
|
1183
1183
|
}, sb(a, b, c) {
|
|
1184
1184
|
if (16384 === (a.mode & 61440)) {
|
|
@@ -1213,7 +1213,7 @@ var N = {N:null, U() {
|
|
|
1213
1213
|
b.push(c);
|
|
1214
1214
|
}
|
|
1215
1215
|
return b;
|
|
1216
|
-
},
|
|
1216
|
+
}, Ha(a, b, c) {
|
|
1217
1217
|
a = N.createNode(a, b, 41471, 0);
|
|
1218
1218
|
a.link = c;
|
|
1219
1219
|
return a;
|
|
@@ -1328,13 +1328,13 @@ var N = {N:null, U() {
|
|
|
1328
1328
|
a ||= this;
|
|
1329
1329
|
this.parent = a;
|
|
1330
1330
|
this.U = a.U;
|
|
1331
|
-
this.
|
|
1331
|
+
this.Ba = null;
|
|
1332
1332
|
this.id = yb++;
|
|
1333
1333
|
this.name = b;
|
|
1334
1334
|
this.mode = c;
|
|
1335
1335
|
this.j = {};
|
|
1336
1336
|
this.m = {};
|
|
1337
|
-
this.
|
|
1337
|
+
this.Ea = d;
|
|
1338
1338
|
}
|
|
1339
1339
|
get read() {
|
|
1340
1340
|
return 365 === (this.mode & 365);
|
|
@@ -1366,7 +1366,7 @@ function Db(a, b = {}) {
|
|
|
1366
1366
|
}
|
|
1367
1367
|
c = tb(c, a[e]);
|
|
1368
1368
|
d = Ya(d + "/" + a[e]);
|
|
1369
|
-
c.
|
|
1369
|
+
c.Ba && (!f || f && b.gb) && (c = c.Ba.root);
|
|
1370
1370
|
if (!f || b.fb) {
|
|
1371
1371
|
for (f = 0; 40960 === (c.mode & 61440);) {
|
|
1372
1372
|
if (c = Eb(d), d = cb(Za(d), c), c = Db(d, {Ua:b.Ua + 1}).node, 40 < f++) {
|
|
@@ -1464,7 +1464,7 @@ function Mb(a, b = -1) {
|
|
|
1464
1464
|
return a;
|
|
1465
1465
|
}
|
|
1466
1466
|
var qb = {open(a) {
|
|
1467
|
-
a.m = wb[a.node.
|
|
1467
|
+
a.m = wb[a.node.Ea].m;
|
|
1468
1468
|
a.m.open?.(a);
|
|
1469
1469
|
}, aa() {
|
|
1470
1470
|
throw new M(70);
|
|
@@ -1481,7 +1481,7 @@ function Nb(a, b) {
|
|
|
1481
1481
|
var d = Db(b, {gb:!1});
|
|
1482
1482
|
b = d.path;
|
|
1483
1483
|
d = d.node;
|
|
1484
|
-
if (d.
|
|
1484
|
+
if (d.Ba) {
|
|
1485
1485
|
throw new M(10);
|
|
1486
1486
|
}
|
|
1487
1487
|
if (16384 !== (d.mode & 61440)) {
|
|
@@ -1492,7 +1492,7 @@ function Nb(a, b) {
|
|
|
1492
1492
|
a = a.U(b);
|
|
1493
1493
|
a.U = b;
|
|
1494
1494
|
b.root = a;
|
|
1495
|
-
c ? vb = a : d && (d.
|
|
1495
|
+
c ? vb = a : d && (d.Ba = b, d.U && d.U.Zb.push(b));
|
|
1496
1496
|
}
|
|
1497
1497
|
function Ob(a, b, c) {
|
|
1498
1498
|
var d = Db(a, {parent:!0}).node;
|
|
@@ -1504,10 +1504,10 @@ function Ob(a, b, c) {
|
|
|
1504
1504
|
if (e) {
|
|
1505
1505
|
throw new M(e);
|
|
1506
1506
|
}
|
|
1507
|
-
if (!d.j.
|
|
1507
|
+
if (!d.j.Aa) {
|
|
1508
1508
|
throw new M(63);
|
|
1509
1509
|
}
|
|
1510
|
-
return d.j.
|
|
1510
|
+
return d.j.Aa(d, a, b, c);
|
|
1511
1511
|
}
|
|
1512
1512
|
function Pb(a) {
|
|
1513
1513
|
return Ob(a, 16895, 0);
|
|
@@ -1529,10 +1529,10 @@ function Rb(a, b) {
|
|
|
1529
1529
|
if (d) {
|
|
1530
1530
|
throw new M(d);
|
|
1531
1531
|
}
|
|
1532
|
-
if (!c.j.
|
|
1532
|
+
if (!c.j.Ha) {
|
|
1533
1533
|
throw new M(63);
|
|
1534
1534
|
}
|
|
1535
|
-
c.j.
|
|
1535
|
+
c.j.Ha(c, b, a);
|
|
1536
1536
|
}
|
|
1537
1537
|
function Eb(a) {
|
|
1538
1538
|
a = Db(a).node;
|
|
@@ -1631,8 +1631,8 @@ function Wb(a, b, c) {
|
|
|
1631
1631
|
f.seekable = !1;
|
|
1632
1632
|
}, close() {
|
|
1633
1633
|
c?.buffer?.length && c(10);
|
|
1634
|
-
}, read(f, g, k,
|
|
1635
|
-
for (var m = 0, t = 0; t <
|
|
1634
|
+
}, read(f, g, k, n) {
|
|
1635
|
+
for (var m = 0, t = 0; t < n; t++) {
|
|
1636
1636
|
try {
|
|
1637
1637
|
var v = b();
|
|
1638
1638
|
} catch (x) {
|
|
@@ -1649,15 +1649,15 @@ function Wb(a, b, c) {
|
|
|
1649
1649
|
}
|
|
1650
1650
|
m && (f.node.timestamp = Date.now());
|
|
1651
1651
|
return m;
|
|
1652
|
-
}, write(f, g, k,
|
|
1653
|
-
for (var m = 0; m <
|
|
1652
|
+
}, write(f, g, k, n) {
|
|
1653
|
+
for (var m = 0; m < n; m++) {
|
|
1654
1654
|
try {
|
|
1655
1655
|
c(g[k + m]);
|
|
1656
1656
|
} catch (t) {
|
|
1657
1657
|
throw new M(29);
|
|
1658
1658
|
}
|
|
1659
1659
|
}
|
|
1660
|
-
|
|
1660
|
+
n && (f.node.timestamp = Date.now());
|
|
1661
1661
|
return m;
|
|
1662
1662
|
}});
|
|
1663
1663
|
Qb(a, d, e);
|
|
@@ -1781,17 +1781,17 @@ var zc = {}, Ac = {}, T = (a, b, c) => {
|
|
|
1781
1781
|
if (k.length !== a.length) {
|
|
1782
1782
|
throw new tc("Mismatched type converter count");
|
|
1783
1783
|
}
|
|
1784
|
-
for (var
|
|
1785
|
-
S(a[
|
|
1784
|
+
for (var n = 0; n < a.length; ++n) {
|
|
1785
|
+
S(a[n], k[n]);
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
1788
|
a.forEach(function(k) {
|
|
1789
1789
|
Ac[k] = b;
|
|
1790
1790
|
});
|
|
1791
1791
|
var e = Array(b.length), f = [], g = 0;
|
|
1792
|
-
b.forEach((k,
|
|
1793
|
-
jc.hasOwnProperty(k) ? e[
|
|
1794
|
-
e[
|
|
1792
|
+
b.forEach((k, n) => {
|
|
1793
|
+
jc.hasOwnProperty(k) ? e[n] = jc[k] : (f.push(k), zc.hasOwnProperty(k) || (zc[k] = []), zc[k].push(() => {
|
|
1794
|
+
e[n] = jc[k];
|
|
1795
1795
|
++g;
|
|
1796
1796
|
g === f.length && d(e);
|
|
1797
1797
|
}));
|
|
@@ -1898,7 +1898,7 @@ function Lc(a, b) {
|
|
|
1898
1898
|
if (this.Ra) {
|
|
1899
1899
|
throw new P(`null is not a valid ${this.name}`);
|
|
1900
1900
|
}
|
|
1901
|
-
if (this.
|
|
1901
|
+
if (this.wa) {
|
|
1902
1902
|
var c = this.Ta();
|
|
1903
1903
|
null !== a && a.push(this.O, c);
|
|
1904
1904
|
return c;
|
|
@@ -1911,11 +1911,11 @@ function Lc(a, b) {
|
|
|
1911
1911
|
if (!b.g.o) {
|
|
1912
1912
|
throw new P(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1913
1913
|
}
|
|
1914
|
-
if (!this.
|
|
1914
|
+
if (!this.va && b.g.u.va) {
|
|
1915
1915
|
throw new P(`Cannot convert argument of type ${b.g.J ? b.g.J.name : b.g.u.name} to parameter type ${this.name}`);
|
|
1916
1916
|
}
|
|
1917
1917
|
c = Ic(b.g.o, b.g.u.i, this.i);
|
|
1918
|
-
if (this.
|
|
1918
|
+
if (this.wa) {
|
|
1919
1919
|
if (void 0 === b.g.D) {
|
|
1920
1920
|
throw new P("Passing raw pointer to smart pointer is illegal");
|
|
1921
1921
|
}
|
|
@@ -1958,21 +1958,21 @@ function Mc(a, b) {
|
|
|
1958
1958
|
if (!b.g.o) {
|
|
1959
1959
|
throw new P(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1960
1960
|
}
|
|
1961
|
-
if (b.g.u.
|
|
1961
|
+
if (b.g.u.va) {
|
|
1962
1962
|
throw new P(`Cannot convert argument of type ${b.g.u.name} to parameter type ${this.name}`);
|
|
1963
1963
|
}
|
|
1964
1964
|
return Ic(b.g.o, b.g.u.i, this.i);
|
|
1965
1965
|
}
|
|
1966
|
-
function Nc(a, b, c, d, e, f, g, k,
|
|
1966
|
+
function Nc(a, b, c, d, e, f, g, k, n, m, t) {
|
|
1967
1967
|
this.name = a;
|
|
1968
1968
|
this.i = b;
|
|
1969
1969
|
this.Ra = c;
|
|
1970
|
-
this.
|
|
1971
|
-
this.
|
|
1970
|
+
this.va = d;
|
|
1971
|
+
this.wa = e;
|
|
1972
1972
|
this.bc = f;
|
|
1973
1973
|
this.hc = g;
|
|
1974
1974
|
this.qb = k;
|
|
1975
|
-
this.Ta =
|
|
1975
|
+
this.Ta = n;
|
|
1976
1976
|
this.cc = m;
|
|
1977
1977
|
this.O = t;
|
|
1978
1978
|
e || void 0 !== b.B ? this.toWireType = Lc : (this.toWireType = d ? Jc : Mc, this.L = null);
|
|
@@ -2017,10 +2017,10 @@ function Xc(a, b, c, d, e) {
|
|
|
2017
2017
|
if (2 > f) {
|
|
2018
2018
|
throw new P("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
2019
2019
|
}
|
|
2020
|
-
var g = null !== b[1] && null !== c, k = Wc(b),
|
|
2021
|
-
return Zb(a, function(...
|
|
2022
|
-
if (
|
|
2023
|
-
throw new P(`function ${a} called with ${
|
|
2020
|
+
var g = null !== b[1] && null !== c, k = Wc(b), n = "void" !== b[0].name, m = f - 2, t = Array(m), v = [], x = [];
|
|
2021
|
+
return Zb(a, function(...p) {
|
|
2022
|
+
if (p.length !== m) {
|
|
2023
|
+
throw new P(`function ${a} called with ${p.length} arguments, expected ${m}`);
|
|
2024
2024
|
}
|
|
2025
2025
|
x.length = 0;
|
|
2026
2026
|
v.length = g ? 2 : 1;
|
|
@@ -2030,9 +2030,9 @@ function Xc(a, b, c, d, e) {
|
|
|
2030
2030
|
v[1] = r;
|
|
2031
2031
|
}
|
|
2032
2032
|
for (var u = 0; u < m; ++u) {
|
|
2033
|
-
t[u] = b[u + 2].toWireType(x,
|
|
2033
|
+
t[u] = b[u + 2].toWireType(x, p[u]), v.push(t[u]);
|
|
2034
2034
|
}
|
|
2035
|
-
|
|
2035
|
+
p = d(...v);
|
|
2036
2036
|
if (k) {
|
|
2037
2037
|
xc(x);
|
|
2038
2038
|
} else {
|
|
@@ -2041,7 +2041,7 @@ function Xc(a, b, c, d, e) {
|
|
|
2041
2041
|
null !== b[u].L && b[u].L(z);
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
2044
|
-
r =
|
|
2044
|
+
r = n ? b[0].fromWireType(p) : void 0;
|
|
2045
2045
|
return r;
|
|
2046
2046
|
});
|
|
2047
2047
|
}
|
|
@@ -2377,90 +2377,90 @@ var Td = (a, b) => {
|
|
|
2377
2377
|
a -= 5120;
|
|
2378
2378
|
return 0 == a ? B : 1 == a ? D : 2 == a ? E : 4 == a ? F : 6 == a ? xa : 5 == a || 28922 == a || 28520 == a || 30779 == a || 30782 == a ? G : wa;
|
|
2379
2379
|
}, Yd = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Zd = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], $d = (a, b, c, d) => {
|
|
2380
|
-
function e(
|
|
2381
|
-
for (
|
|
2382
|
-
|
|
2380
|
+
function e(p, r, u) {
|
|
2381
|
+
for (p = "number" == typeof p ? p.toString() : p || ""; p.length < r;) {
|
|
2382
|
+
p = u[0] + p;
|
|
2383
2383
|
}
|
|
2384
|
-
return
|
|
2384
|
+
return p;
|
|
2385
2385
|
}
|
|
2386
|
-
function f(
|
|
2387
|
-
return e(
|
|
2386
|
+
function f(p, r) {
|
|
2387
|
+
return e(p, r, "0");
|
|
2388
2388
|
}
|
|
2389
|
-
function g(
|
|
2389
|
+
function g(p, r) {
|
|
2390
2390
|
function u(A) {
|
|
2391
2391
|
return 0 > A ? -1 : 0 < A ? 1 : 0;
|
|
2392
2392
|
}
|
|
2393
2393
|
var z;
|
|
2394
|
-
0 === (z = u(
|
|
2394
|
+
0 === (z = u(p.getFullYear() - r.getFullYear())) && 0 === (z = u(p.getMonth() - r.getMonth())) && (z = u(p.getDate() - r.getDate()));
|
|
2395
2395
|
return z;
|
|
2396
2396
|
}
|
|
2397
|
-
function k(
|
|
2398
|
-
switch(
|
|
2397
|
+
function k(p) {
|
|
2398
|
+
switch(p.getDay()) {
|
|
2399
2399
|
case 0:
|
|
2400
|
-
return new Date(
|
|
2400
|
+
return new Date(p.getFullYear() - 1, 11, 29);
|
|
2401
2401
|
case 1:
|
|
2402
|
-
return
|
|
2402
|
+
return p;
|
|
2403
2403
|
case 2:
|
|
2404
|
-
return new Date(
|
|
2404
|
+
return new Date(p.getFullYear(), 0, 3);
|
|
2405
2405
|
case 3:
|
|
2406
|
-
return new Date(
|
|
2406
|
+
return new Date(p.getFullYear(), 0, 2);
|
|
2407
2407
|
case 4:
|
|
2408
|
-
return new Date(
|
|
2408
|
+
return new Date(p.getFullYear(), 0, 1);
|
|
2409
2409
|
case 5:
|
|
2410
|
-
return new Date(
|
|
2410
|
+
return new Date(p.getFullYear() - 1, 11, 31);
|
|
2411
2411
|
case 6:
|
|
2412
|
-
return new Date(
|
|
2412
|
+
return new Date(p.getFullYear() - 1, 11, 30);
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
|
-
function p
|
|
2416
|
-
var r =
|
|
2417
|
-
for (
|
|
2418
|
-
var u =
|
|
2419
|
-
if (r > z -
|
|
2420
|
-
r -= z -
|
|
2415
|
+
function n(p) {
|
|
2416
|
+
var r = p.ba;
|
|
2417
|
+
for (p = new Date((new Date(p.ca + 1900, 0, 1)).getTime()); 0 < r;) {
|
|
2418
|
+
var u = p.getMonth(), z = (ud(p.getFullYear()) ? Yd : Zd)[u];
|
|
2419
|
+
if (r > z - p.getDate()) {
|
|
2420
|
+
r -= z - p.getDate() + 1, p.setDate(1), 11 > u ? p.setMonth(u + 1) : (p.setMonth(0), p.setFullYear(p.getFullYear() + 1));
|
|
2421
2421
|
} else {
|
|
2422
|
-
|
|
2422
|
+
p.setDate(p.getDate() + r);
|
|
2423
2423
|
break;
|
|
2424
2424
|
}
|
|
2425
2425
|
}
|
|
2426
|
-
u = new Date(
|
|
2427
|
-
r = k(new Date(
|
|
2426
|
+
u = new Date(p.getFullYear() + 1, 0, 4);
|
|
2427
|
+
r = k(new Date(p.getFullYear(), 0, 4));
|
|
2428
2428
|
u = k(u);
|
|
2429
|
-
return 0 >= g(r,
|
|
2429
|
+
return 0 >= g(r, p) ? 0 >= g(u, p) ? p.getFullYear() + 1 : p.getFullYear() : p.getFullYear() - 1;
|
|
2430
2430
|
}
|
|
2431
2431
|
var m = G[d + 40 >> 2];
|
|
2432
|
-
d = {kc:F[d >> 2], jc:F[d + 4 >> 2],
|
|
2432
|
+
d = {kc:F[d >> 2], jc:F[d + 4 >> 2], Ia:F[d + 8 >> 2], Va:F[d + 12 >> 2], Ja:F[d + 16 >> 2], ca:F[d + 20 >> 2], R:F[d + 24 >> 2], ba:F[d + 28 >> 2], Sc:F[d + 32 >> 2], ic:F[d + 36 >> 2], lc:m ? m ? L(D, m) : "" : ""};
|
|
2433
2433
|
c = c ? L(D, c) : "";
|
|
2434
2434
|
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",};
|
|
2435
2435
|
for (var t in m) {
|
|
2436
2436
|
c = c.replace(new RegExp(t, "g"), m[t]);
|
|
2437
2437
|
}
|
|
2438
2438
|
var v = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), x = "January February March April May June July August September October November December".split(" ");
|
|
2439
|
-
m = {"%a":
|
|
2440
|
-
|
|
2441
|
-
0 ==
|
|
2442
|
-
return f(
|
|
2443
|
-
}, "%j":
|
|
2444
|
-
for (var r = 0, u = 0; u <=
|
|
2445
|
-
}
|
|
2446
|
-
return f(
|
|
2447
|
-
}, "%m":
|
|
2448
|
-
var r = Math.floor((
|
|
2449
|
-
2 >= (
|
|
2439
|
+
m = {"%a":p => v[p.R].substring(0, 3), "%A":p => v[p.R], "%b":p => x[p.Ja].substring(0, 3), "%B":p => x[p.Ja], "%C":p => f((p.ca + 1900) / 100 | 0, 2), "%d":p => f(p.Va, 2), "%e":p => e(p.Va, 2, " "), "%g":p => n(p).toString().substring(2), "%G":n, "%H":p => f(p.Ia, 2), "%I":p => {
|
|
2440
|
+
p = p.Ia;
|
|
2441
|
+
0 == p ? p = 12 : 12 < p && (p -= 12);
|
|
2442
|
+
return f(p, 2);
|
|
2443
|
+
}, "%j":p => {
|
|
2444
|
+
for (var r = 0, u = 0; u <= p.Ja - 1; r += (ud(p.ca + 1900) ? Yd : Zd)[u++]) {
|
|
2445
|
+
}
|
|
2446
|
+
return f(p.Va + r, 3);
|
|
2447
|
+
}, "%m":p => f(p.Ja + 1, 2), "%M":p => f(p.jc, 2), "%n":() => "\n", "%p":p => 0 <= p.Ia && 12 > p.Ia ? "AM" : "PM", "%S":p => f(p.kc, 2), "%t":() => "\t", "%u":p => p.R || 7, "%U":p => f(Math.floor((p.ba + 7 - p.R) / 7), 2), "%V":p => {
|
|
2448
|
+
var r = Math.floor((p.ba + 7 - (p.R + 6) % 7) / 7);
|
|
2449
|
+
2 >= (p.R + 371 - p.ba - 2) % 7 && r++;
|
|
2450
2450
|
if (r) {
|
|
2451
|
-
53 == r && (u = (
|
|
2451
|
+
53 == r && (u = (p.R + 371 - p.ba) % 7, 4 == u || 3 == u && ud(p.ca) || (r = 1));
|
|
2452
2452
|
} else {
|
|
2453
2453
|
r = 52;
|
|
2454
|
-
var u = (
|
|
2455
|
-
(4 == u || 5 == u && ud(
|
|
2454
|
+
var u = (p.R + 7 - p.ba - 1) % 7;
|
|
2455
|
+
(4 == u || 5 == u && ud(p.ca % 400 - 1)) && r++;
|
|
2456
2456
|
}
|
|
2457
2457
|
return f(r, 2);
|
|
2458
|
-
}, "%w":
|
|
2459
|
-
|
|
2460
|
-
var r = 0 <=
|
|
2461
|
-
|
|
2462
|
-
return (r ? "+" : "-") + String("0000" + (
|
|
2463
|
-
}, "%Z":
|
|
2458
|
+
}, "%w":p => p.R, "%W":p => f(Math.floor((p.ba + 7 - (p.R + 6) % 7) / 7), 2), "%y":p => (p.ca + 1900).toString().substring(2), "%Y":p => p.ca + 1900, "%z":p => {
|
|
2459
|
+
p = p.ic;
|
|
2460
|
+
var r = 0 <= p;
|
|
2461
|
+
p = Math.abs(p) / 60;
|
|
2462
|
+
return (r ? "+" : "-") + String("0000" + (p / 60 * 100 + p % 60)).slice(-4);
|
|
2463
|
+
}, "%Z":p => p.lc, "%%":() => "%"};
|
|
2464
2464
|
c = c.replace(/%%/g, "\x00\x00");
|
|
2465
2465
|
for (t in m) {
|
|
2466
2466
|
c.includes(t) && (c = c.replace(new RegExp(t, "g"), m[t](d)));
|
|
@@ -2598,7 +2598,7 @@ Object.assign(Nc.prototype, {Pb(a) {
|
|
|
2598
2598
|
this.O?.(a);
|
|
2599
2599
|
}, argPackAdvance:8, readValueFromPointer:yc, fromWireType:function(a) {
|
|
2600
2600
|
function b() {
|
|
2601
|
-
return this.
|
|
2601
|
+
return this.wa ? vc(this.i.M, {u:this.bc, o:c, J:this, D:a,}) : vc(this.i.M, {u:this, o:a,});
|
|
2602
2602
|
}
|
|
2603
2603
|
var c = this.Pb(a);
|
|
2604
2604
|
if (!c) {
|
|
@@ -2618,9 +2618,9 @@ Object.assign(Nc.prototype, {Pb(a) {
|
|
|
2618
2618
|
if (!d) {
|
|
2619
2619
|
return b.call(this);
|
|
2620
2620
|
}
|
|
2621
|
-
d = this.
|
|
2621
|
+
d = this.va ? d.Hb : d.pointerType;
|
|
2622
2622
|
var e = qc(c, this.i, d.i);
|
|
2623
|
-
return null === e ? b.call(this) : this.
|
|
2623
|
+
return null === e ? b.call(this) : this.wa ? vc(d.i.M, {u:d, o:e, J:this, D:a,}) : vc(d.i.M, {u:d, o:e,});
|
|
2624
2624
|
},});
|
|
2625
2625
|
Uc = l.UnboundTypeError = bc("UnboundTypeError");
|
|
2626
2626
|
for (var W, ce = 0; 32 > ce; ++ce) {
|
|
@@ -2762,9 +2762,9 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2762
2762
|
c = Q(c);
|
|
2763
2763
|
var d = b.i, e = d.M, f = d.B.M, g = d.B.constructor;
|
|
2764
2764
|
a = Zb(a, function(...k) {
|
|
2765
|
-
d.B.ob.forEach(function(
|
|
2766
|
-
if (this[
|
|
2767
|
-
throw new cc(`Pure virtual function ${
|
|
2765
|
+
d.B.ob.forEach(function(n) {
|
|
2766
|
+
if (this[n] === f[n]) {
|
|
2767
|
+
throw new cc(`Pure virtual function ${n} must be implemented in JavaScript`);
|
|
2768
2768
|
}
|
|
2769
2769
|
}.bind(this));
|
|
2770
2770
|
Object.defineProperty(this, "__parent", {value:e});
|
|
@@ -2776,12 +2776,12 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2776
2776
|
}
|
|
2777
2777
|
k = g.implement(this, ...k);
|
|
2778
2778
|
oc(k);
|
|
2779
|
-
var
|
|
2779
|
+
var n = k.g;
|
|
2780
2780
|
k.notifyOnDestruction();
|
|
2781
|
-
|
|
2782
|
-
Object.defineProperties(this, {g:{value:
|
|
2781
|
+
n.ia = !0;
|
|
2782
|
+
Object.defineProperties(this, {g:{value:n}});
|
|
2783
2783
|
uc(this);
|
|
2784
|
-
k =
|
|
2784
|
+
k = n.o;
|
|
2785
2785
|
k = ic(d, k);
|
|
2786
2786
|
if (hc.hasOwnProperty(k)) {
|
|
2787
2787
|
throw new P(`Tried to register registered instance: ${k}`);
|
|
@@ -2810,22 +2810,22 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2810
2810
|
var c = b.Ta, d = b.O, e = b.eb, f = e.map(g => g.Sb).concat(e.map(g => g.ec));
|
|
2811
2811
|
T([a], f, g => {
|
|
2812
2812
|
var k = {};
|
|
2813
|
-
e.forEach((
|
|
2814
|
-
var t = g[m], v =
|
|
2815
|
-
k[
|
|
2813
|
+
e.forEach((n, m) => {
|
|
2814
|
+
var t = g[m], v = n.Qb, x = n.Rb, p = g[m + e.length], r = n.dc, u = n.fc;
|
|
2815
|
+
k[n.Mb] = {read:z => t.fromWireType(v(x, z)), write:(z, A) => {
|
|
2816
2816
|
var C = [];
|
|
2817
|
-
r(u, z,
|
|
2817
|
+
r(u, z, p.toWireType(C, A));
|
|
2818
2818
|
xc(C);
|
|
2819
2819
|
}};
|
|
2820
2820
|
});
|
|
2821
|
-
return [{name:b.name, fromWireType:
|
|
2821
|
+
return [{name:b.name, fromWireType:n => {
|
|
2822
2822
|
var m = {}, t;
|
|
2823
2823
|
for (t in k) {
|
|
2824
|
-
m[t] = k[t].read(
|
|
2824
|
+
m[t] = k[t].read(n);
|
|
2825
2825
|
}
|
|
2826
|
-
d(
|
|
2826
|
+
d(n);
|
|
2827
2827
|
return m;
|
|
2828
|
-
}, toWireType:(
|
|
2828
|
+
}, toWireType:(n, m) => {
|
|
2829
2829
|
for (var t in k) {
|
|
2830
2830
|
if (!(t in m)) {
|
|
2831
2831
|
throw new TypeError(`Missing field: "${t}"`);
|
|
@@ -2835,7 +2835,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2835
2835
|
for (t in k) {
|
|
2836
2836
|
k[t].write(v, m[t]);
|
|
2837
2837
|
}
|
|
2838
|
-
null !==
|
|
2838
|
+
null !== n && n.push(d, v);
|
|
2839
2839
|
return v;
|
|
2840
2840
|
}, argPackAdvance:8, readValueFromPointer:yc, L:d,}];
|
|
2841
2841
|
});
|
|
@@ -2849,14 +2849,14 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2849
2849
|
}, argPackAdvance:8, readValueFromPointer:function(e) {
|
|
2850
2850
|
return this.fromWireType(D[e]);
|
|
2851
2851
|
}, L:null,});
|
|
2852
|
-
}, _embind_register_class:(a, b, c, d, e, f, g, k,
|
|
2852
|
+
}, _embind_register_class:(a, b, c, d, e, f, g, k, n, m, t, v, x) => {
|
|
2853
2853
|
t = R(t);
|
|
2854
2854
|
f = U(e, f);
|
|
2855
2855
|
k &&= U(g, k);
|
|
2856
|
-
m &&= U(
|
|
2856
|
+
m &&= U(n, m);
|
|
2857
2857
|
x = U(v, x);
|
|
2858
|
-
var
|
|
2859
|
-
Fc(
|
|
2858
|
+
var p = Gc(t);
|
|
2859
|
+
Fc(p, function() {
|
|
2860
2860
|
Vc(`Cannot construct ${t} due to unbound types`, [d]);
|
|
2861
2861
|
});
|
|
2862
2862
|
T([a, b, c], d ? [d] : [], r => {
|
|
@@ -2892,7 +2892,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2892
2892
|
H = new Nc(t + "*", C, !1, !1, !1);
|
|
2893
2893
|
z = new Nc(t + " const*", C, !1, !0, !1);
|
|
2894
2894
|
rc[a] = {pointerType:H, Hb:z};
|
|
2895
|
-
Oc(
|
|
2895
|
+
Oc(p, r);
|
|
2896
2896
|
return [u, H, z];
|
|
2897
2897
|
});
|
|
2898
2898
|
}, _embind_register_class_class_function:(a, b, c, d, e, f, g) => {
|
|
@@ -2900,21 +2900,21 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2900
2900
|
b = R(b);
|
|
2901
2901
|
b = Zc(b);
|
|
2902
2902
|
f = U(e, f);
|
|
2903
|
-
T([], [a],
|
|
2903
|
+
T([], [a], n => {
|
|
2904
2904
|
function m() {
|
|
2905
2905
|
Vc(`Cannot call ${t} due to unbound types`, k);
|
|
2906
2906
|
}
|
|
2907
|
-
|
|
2908
|
-
var t = `${
|
|
2907
|
+
n = n[0];
|
|
2908
|
+
var t = `${n.name}.${b}`;
|
|
2909
2909
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2910
|
-
var v =
|
|
2910
|
+
var v = n.i.constructor;
|
|
2911
2911
|
void 0 === v[b] ? (m.fa = c - 1, v[b] = m) : (Ec(v, b, t), v[b].A[c - 1] = m);
|
|
2912
2912
|
T([], k, x => {
|
|
2913
2913
|
x = Xc(t, [x[0], null].concat(x.slice(1)), null, f, g);
|
|
2914
2914
|
void 0 === v[b].A ? (x.fa = c - 1, v[b] = x) : v[b].A[c - 1] = x;
|
|
2915
|
-
if (
|
|
2916
|
-
for (const
|
|
2917
|
-
|
|
2915
|
+
if (n.i.oa) {
|
|
2916
|
+
for (const p of n.i.oa) {
|
|
2917
|
+
p.constructor.hasOwnProperty(b) || (p.constructor[b] = x);
|
|
2918
2918
|
}
|
|
2919
2919
|
}
|
|
2920
2920
|
return [];
|
|
@@ -2924,9 +2924,9 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2924
2924
|
}, _embind_register_class_class_property:(a, b, c, d, e, f, g, k) => {
|
|
2925
2925
|
b = R(b);
|
|
2926
2926
|
f = U(e, f);
|
|
2927
|
-
T([], [a],
|
|
2928
|
-
|
|
2929
|
-
var m = `${
|
|
2927
|
+
T([], [a], n => {
|
|
2928
|
+
n = n[0];
|
|
2929
|
+
var m = `${n.name}.${b}`, t = {get() {
|
|
2930
2930
|
Vc(`Cannot access ${m} due to unbound types`, [c]);
|
|
2931
2931
|
}, enumerable:!0, configurable:!0};
|
|
2932
2932
|
t.set = k ? () => {
|
|
@@ -2934,18 +2934,18 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2934
2934
|
} : () => {
|
|
2935
2935
|
throw new P(`${m} is a read-only property`);
|
|
2936
2936
|
};
|
|
2937
|
-
Object.defineProperty(
|
|
2937
|
+
Object.defineProperty(n.i.constructor, b, t);
|
|
2938
2938
|
T([], [c], v => {
|
|
2939
2939
|
v = v[0];
|
|
2940
2940
|
var x = {get() {
|
|
2941
2941
|
return v.fromWireType(f(d));
|
|
2942
2942
|
}, enumerable:!0};
|
|
2943
|
-
k && (k = U(g, k), x.set =
|
|
2943
|
+
k && (k = U(g, k), x.set = p => {
|
|
2944
2944
|
var r = [];
|
|
2945
|
-
k(d, v.toWireType(r,
|
|
2945
|
+
k(d, v.toWireType(r, p));
|
|
2946
2946
|
xc(r);
|
|
2947
2947
|
});
|
|
2948
|
-
Object.defineProperty(
|
|
2948
|
+
Object.defineProperty(n.i.constructor, b, x);
|
|
2949
2949
|
return [];
|
|
2950
2950
|
});
|
|
2951
2951
|
return [];
|
|
@@ -2955,7 +2955,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2955
2955
|
e = U(d, e);
|
|
2956
2956
|
T([], [a], k => {
|
|
2957
2957
|
k = k[0];
|
|
2958
|
-
var
|
|
2958
|
+
var n = `constructor ${k.name}`;
|
|
2959
2959
|
void 0 === k.i.Z && (k.i.Z = []);
|
|
2960
2960
|
if (void 0 !== k.i.Z[b - 1]) {
|
|
2961
2961
|
throw new P(`Cannot register multiple constructors with identical number of parameters (${b - 1}) for class '${k.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
@@ -2965,34 +2965,34 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
2965
2965
|
};
|
|
2966
2966
|
T([], g, m => {
|
|
2967
2967
|
m.splice(1, 0, null);
|
|
2968
|
-
k.i.Z[b - 1] = Xc(
|
|
2968
|
+
k.i.Z[b - 1] = Xc(n, m, null, e, f);
|
|
2969
2969
|
return [];
|
|
2970
2970
|
});
|
|
2971
2971
|
return [];
|
|
2972
2972
|
});
|
|
2973
2973
|
}, _embind_register_class_function:(a, b, c, d, e, f, g, k) => {
|
|
2974
|
-
var
|
|
2974
|
+
var n = Yc(c, d);
|
|
2975
2975
|
b = R(b);
|
|
2976
2976
|
b = Zc(b);
|
|
2977
2977
|
f = U(e, f);
|
|
2978
2978
|
T([], [a], m => {
|
|
2979
2979
|
function t() {
|
|
2980
|
-
Vc(`Cannot call ${v} due to unbound types`,
|
|
2980
|
+
Vc(`Cannot call ${v} due to unbound types`, n);
|
|
2981
2981
|
}
|
|
2982
2982
|
m = m[0];
|
|
2983
2983
|
var v = `${m.name}.${b}`;
|
|
2984
2984
|
b.startsWith("@@") && (b = Symbol[b.substring(2)]);
|
|
2985
2985
|
k && m.i.ob.push(b);
|
|
2986
|
-
var x = m.i.M,
|
|
2987
|
-
void 0 ===
|
|
2988
|
-
T([],
|
|
2986
|
+
var x = m.i.M, p = x[b];
|
|
2987
|
+
void 0 === p || void 0 === p.A && p.className !== m.name && p.fa === c - 2 ? (t.fa = c - 2, t.className = m.name, x[b] = t) : (Ec(x, b, v), x[b].A[c - 2] = t);
|
|
2988
|
+
T([], n, r => {
|
|
2989
2989
|
r = Xc(v, r, m, f, g);
|
|
2990
2990
|
void 0 === x[b].A ? (r.fa = c - 2, x[b] = r) : x[b].A[c - 2] = r;
|
|
2991
2991
|
return [];
|
|
2992
2992
|
});
|
|
2993
2993
|
return [];
|
|
2994
2994
|
});
|
|
2995
|
-
}, _embind_register_class_property:(a, b, c, d, e, f, g, k,
|
|
2995
|
+
}, _embind_register_class_property:(a, b, c, d, e, f, g, k, n, m) => {
|
|
2996
2996
|
b = R(b);
|
|
2997
2997
|
e = U(d, e);
|
|
2998
2998
|
T([], [a], t => {
|
|
@@ -3000,21 +3000,21 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3000
3000
|
var v = `${t.name}.${b}`, x = {get() {
|
|
3001
3001
|
Vc(`Cannot access ${v} due to unbound types`, [c, g]);
|
|
3002
3002
|
}, enumerable:!0, configurable:!0};
|
|
3003
|
-
x.set =
|
|
3003
|
+
x.set = n ? () => Vc(`Cannot access ${v} due to unbound types`, [c, g]) : () => {
|
|
3004
3004
|
throw new P(v + " is a read-only property");
|
|
3005
3005
|
};
|
|
3006
3006
|
Object.defineProperty(t.i.M, b, x);
|
|
3007
|
-
T([],
|
|
3008
|
-
var r =
|
|
3007
|
+
T([], n ? [c, g] : [c], p => {
|
|
3008
|
+
var r = p[0], u = {get() {
|
|
3009
3009
|
var A = $c(this, t, v + " getter");
|
|
3010
3010
|
return r.fromWireType(e(f, A));
|
|
3011
3011
|
}, enumerable:!0};
|
|
3012
|
-
if (
|
|
3013
|
-
|
|
3014
|
-
var z =
|
|
3012
|
+
if (n) {
|
|
3013
|
+
n = U(k, n);
|
|
3014
|
+
var z = p[1];
|
|
3015
3015
|
u.set = function(A) {
|
|
3016
3016
|
var C = $c(this, t, v + " setter"), H = [];
|
|
3017
|
-
|
|
3017
|
+
n(m, C, z.toWireType(H, A));
|
|
3018
3018
|
xc(H);
|
|
3019
3019
|
};
|
|
3020
3020
|
}
|
|
@@ -3063,10 +3063,10 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3063
3063
|
var f = 32 - 8 * c;
|
|
3064
3064
|
e = k => k << f >>> f;
|
|
3065
3065
|
}
|
|
3066
|
-
var g = b.includes("unsigned") ? function(k,
|
|
3067
|
-
return
|
|
3068
|
-
} : function(k,
|
|
3069
|
-
return
|
|
3066
|
+
var g = b.includes("unsigned") ? function(k, n) {
|
|
3067
|
+
return n >>> 0;
|
|
3068
|
+
} : function(k, n) {
|
|
3069
|
+
return n;
|
|
3070
3070
|
};
|
|
3071
3071
|
S(a, {name:b, fromWireType:e, toWireType:g, argPackAdvance:8, readValueFromPointer:ed(b, c, 0 !== d), L:null,});
|
|
3072
3072
|
}, _embind_register_memory_view:(a, b, c) => {
|
|
@@ -3083,15 +3083,15 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3083
3083
|
var e = G[d >> 2], f = d + 4;
|
|
3084
3084
|
if (c) {
|
|
3085
3085
|
for (var g = f, k = 0; k <= e; ++k) {
|
|
3086
|
-
var
|
|
3087
|
-
if (k == e || 0 == D[
|
|
3088
|
-
g = g ? L(D, g,
|
|
3086
|
+
var n = f + k;
|
|
3087
|
+
if (k == e || 0 == D[n]) {
|
|
3088
|
+
g = g ? L(D, g, n - g) : "";
|
|
3089
3089
|
if (void 0 === m) {
|
|
3090
3090
|
var m = g;
|
|
3091
3091
|
} else {
|
|
3092
3092
|
m += String.fromCharCode(0), m += g;
|
|
3093
3093
|
}
|
|
3094
|
-
g =
|
|
3094
|
+
g = n + 1;
|
|
3095
3095
|
}
|
|
3096
3096
|
}
|
|
3097
3097
|
} else {
|
|
@@ -3110,22 +3110,22 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3110
3110
|
throw new P("Cannot pass non-string to std::string");
|
|
3111
3111
|
}
|
|
3112
3112
|
var g = c && f ? fb(e) : e.length;
|
|
3113
|
-
var k = Ud(4 + g + 1),
|
|
3113
|
+
var k = Ud(4 + g + 1), n = k + 4;
|
|
3114
3114
|
G[k >> 2] = g;
|
|
3115
3115
|
if (c && f) {
|
|
3116
|
-
gb(e, D,
|
|
3116
|
+
gb(e, D, n, g + 1);
|
|
3117
3117
|
} else {
|
|
3118
3118
|
if (f) {
|
|
3119
3119
|
for (f = 0; f < g; ++f) {
|
|
3120
3120
|
var m = e.charCodeAt(f);
|
|
3121
3121
|
if (255 < m) {
|
|
3122
|
-
throw lc(
|
|
3122
|
+
throw lc(n), new P("String has UTF-16 code units that do not fit in 8 bits");
|
|
3123
3123
|
}
|
|
3124
|
-
D[
|
|
3124
|
+
D[n + f] = m;
|
|
3125
3125
|
}
|
|
3126
3126
|
} else {
|
|
3127
3127
|
for (f = 0; f < g; ++f) {
|
|
3128
|
-
D[
|
|
3128
|
+
D[n + f] = e[f];
|
|
3129
3129
|
}
|
|
3130
3130
|
}
|
|
3131
3131
|
}
|
|
@@ -3145,21 +3145,21 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3145
3145
|
4 === b && (d = kd, e = ld, f = md, g = k => G[k >> 2]);
|
|
3146
3146
|
}
|
|
3147
3147
|
S(a, {name:c, fromWireType:k => {
|
|
3148
|
-
for (var
|
|
3148
|
+
for (var n = G[k >> 2], m, t = k + 4, v = 0; v <= n; ++v) {
|
|
3149
3149
|
var x = k + 4 + v * b;
|
|
3150
|
-
if (v ==
|
|
3150
|
+
if (v == n || 0 == g(x)) {
|
|
3151
3151
|
t = d(t, x - t), void 0 === m ? m = t : (m += String.fromCharCode(0), m += t), t = x + b;
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
3154
|
lc(k);
|
|
3155
3155
|
return m;
|
|
3156
|
-
}, toWireType:(k,
|
|
3157
|
-
if ("string" != typeof
|
|
3156
|
+
}, toWireType:(k, n) => {
|
|
3157
|
+
if ("string" != typeof n) {
|
|
3158
3158
|
throw new P(`Cannot pass non-string to C++ string type ${c}`);
|
|
3159
3159
|
}
|
|
3160
|
-
var m = f(
|
|
3160
|
+
var m = f(n), t = Ud(4 + m + b);
|
|
3161
3161
|
G[t >> 2] = m / b;
|
|
3162
|
-
e(
|
|
3162
|
+
e(n, t + 4, m + b);
|
|
3163
3163
|
null !== k && k.push(lc, t);
|
|
3164
3164
|
return t;
|
|
3165
3165
|
}, argPackAdvance:8, readValueFromPointer:yc, L(k) {
|
|
@@ -3167,8 +3167,8 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3167
3167
|
}});
|
|
3168
3168
|
}, _embind_register_value_object:(a, b, c, d, e, f) => {
|
|
3169
3169
|
wc[a] = {name:R(b), Ta:U(c, d), O:U(e, f), eb:[],};
|
|
3170
|
-
}, _embind_register_value_object_field:(a, b, c, d, e, f, g, k,
|
|
3171
|
-
wc[a].eb.push({Mb:R(b), Sb:c, Qb:U(d, e), Rb:f, ec:g, dc:U(k,
|
|
3170
|
+
}, _embind_register_value_object_field:(a, b, c, d, e, f, g, k, n, m) => {
|
|
3171
|
+
wc[a].eb.push({Mb:R(b), Sb:c, Qb:U(d, e), Rb:f, ec:g, dc:U(k, n), fc:m,});
|
|
3172
3172
|
}, _embind_register_void:(a, b) => {
|
|
3173
3173
|
b = R(b);
|
|
3174
3174
|
S(a, {Ic:!0, name:b, argPackAdvance:0, fromWireType:() => {
|
|
@@ -3194,12 +3194,12 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3194
3194
|
a--;
|
|
3195
3195
|
var f = Array(a);
|
|
3196
3196
|
b = `methodCaller<(${d.map(g => g.name).join(", ")}) => ${e.name}>`;
|
|
3197
|
-
return rd(Zb(b, (g, k,
|
|
3197
|
+
return rd(Zb(b, (g, k, n, m) => {
|
|
3198
3198
|
for (var t = 0, v = 0; v < a; ++v) {
|
|
3199
3199
|
f[v] = d[v].readValueFromPointer(m + t), t += d[v].argPackAdvance;
|
|
3200
3200
|
}
|
|
3201
3201
|
g = 1 === c ? td(k, f) : k.apply(g, f);
|
|
3202
|
-
return nd(e,
|
|
3202
|
+
return nd(e, n, g);
|
|
3203
3203
|
}));
|
|
3204
3204
|
}, _emval_get_property:(a, b) => {
|
|
3205
3205
|
a = Q(a);
|
|
@@ -3250,12 +3250,12 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3250
3250
|
var k = g.getTimezoneOffset();
|
|
3251
3251
|
G[a >> 2] = 60 * Math.max(e, k);
|
|
3252
3252
|
F[b >> 2] = Number(e != k);
|
|
3253
|
-
a =
|
|
3253
|
+
a = n => n.toLocaleTimeString(void 0, {hour12:!1, timeZoneName:"short"}).split(" ")[1];
|
|
3254
3254
|
f = a(f);
|
|
3255
3255
|
g = a(g);
|
|
3256
3256
|
k < e ? (gb(f, D, c, 17), gb(g, D, d, 17)) : (gb(f, D, d, 17), gb(g, D, c, 17));
|
|
3257
3257
|
}, beginPixelLocalStorageWEBGL:function(a, b, c) {
|
|
3258
|
-
(a = w[a].F.
|
|
3258
|
+
(a = w[a].F.Da) && a.beginPixelLocalStorageWEBGL(l.HEAPU32.subarray(c, c + b));
|
|
3259
3259
|
}, decode_image:function(a, b, c) {
|
|
3260
3260
|
var d = l.images;
|
|
3261
3261
|
d || (d = new Map(), l.images = d);
|
|
@@ -3323,9 +3323,9 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3323
3323
|
}, enable_WEBGL_shader_pixel_local_storage_coherent:function(a) {
|
|
3324
3324
|
a = w[a].F;
|
|
3325
3325
|
const b = a.getExtension("WEBGL_shader_pixel_local_storage");
|
|
3326
|
-
return b && b.isCoherent() && 5 == b.framebufferTexturePixelLocalStorageWEBGL.length ? (a.
|
|
3326
|
+
return b && b.isCoherent() && 5 == b.framebufferTexturePixelLocalStorageWEBGL.length ? (a.Da = b, !0) : !1;
|
|
3327
3327
|
}, endPixelLocalStorageWEBGL:function(a, b, c) {
|
|
3328
|
-
(a = w[a].F.
|
|
3328
|
+
(a = w[a].F.Da) && a.endPixelLocalStorageWEBGL(l.HEAPU32.subarray(c, c + b));
|
|
3329
3329
|
}, environ_get:(a, b) => {
|
|
3330
3330
|
var c = 0;
|
|
3331
3331
|
Qd().forEach((d, e) => {
|
|
@@ -3373,10 +3373,10 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3373
3373
|
var e = Kb(a);
|
|
3374
3374
|
a = b;
|
|
3375
3375
|
for (var f, g = b = 0; g < c; g++) {
|
|
3376
|
-
var k = G[a >> 2],
|
|
3376
|
+
var k = G[a >> 2], n = G[a + 4 >> 2];
|
|
3377
3377
|
a += 8;
|
|
3378
3378
|
var m = e, t = f, v = B;
|
|
3379
|
-
if (0 >
|
|
3379
|
+
if (0 > n || 0 > t) {
|
|
3380
3380
|
throw new M(28);
|
|
3381
3381
|
}
|
|
3382
3382
|
if (null === m.W) {
|
|
@@ -3397,15 +3397,15 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3397
3397
|
} else if (!m.seekable) {
|
|
3398
3398
|
throw new M(70);
|
|
3399
3399
|
}
|
|
3400
|
-
var
|
|
3401
|
-
x || (m.position +=
|
|
3402
|
-
var r =
|
|
3400
|
+
var p = m.m.read(m, v, k, n, t);
|
|
3401
|
+
x || (m.position += p);
|
|
3402
|
+
var r = p;
|
|
3403
3403
|
if (0 > r) {
|
|
3404
3404
|
var u = -1;
|
|
3405
3405
|
break a;
|
|
3406
3406
|
}
|
|
3407
3407
|
b += r;
|
|
3408
|
-
if (r <
|
|
3408
|
+
if (r < n) {
|
|
3409
3409
|
break;
|
|
3410
3410
|
}
|
|
3411
3411
|
"undefined" != typeof f && (f += r);
|
|
@@ -3445,9 +3445,9 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3445
3445
|
var e = Kb(a);
|
|
3446
3446
|
a = b;
|
|
3447
3447
|
for (var f, g = b = 0; g < c; g++) {
|
|
3448
|
-
var k = G[a >> 2],
|
|
3448
|
+
var k = G[a >> 2], n = G[a + 4 >> 2];
|
|
3449
3449
|
a += 8;
|
|
3450
|
-
var m = e, t = k, v =
|
|
3450
|
+
var m = e, t = k, v = n, x = f, p = B;
|
|
3451
3451
|
if (0 > v || 0 > x) {
|
|
3452
3452
|
throw new M(28);
|
|
3453
3453
|
}
|
|
@@ -3470,7 +3470,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3470
3470
|
} else if (!m.seekable) {
|
|
3471
3471
|
throw new M(70);
|
|
3472
3472
|
}
|
|
3473
|
-
var u = m.m.write(m,
|
|
3473
|
+
var u = m.m.write(m, p, t, v, x, void 0);
|
|
3474
3474
|
r || (m.position += u);
|
|
3475
3475
|
var z = u;
|
|
3476
3476
|
if (0 > z) {
|
|
@@ -3491,13 +3491,13 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3491
3491
|
return C.$;
|
|
3492
3492
|
}
|
|
3493
3493
|
}, framebufferPixelLocalClearValuefvWEBGL:function(a, b, c, d, e, f) {
|
|
3494
|
-
(a = w[a].F.
|
|
3494
|
+
(a = w[a].F.Da) && a.framebufferPixelLocalClearValuefvWEBGL(b, [c, d, e, f]);
|
|
3495
3495
|
}, framebufferTexturePixelLocalStorageWEBGL:function(a, b, c, d, e, f) {
|
|
3496
|
-
(a = w[a].F.
|
|
3496
|
+
(a = w[a].F.Da) && a.framebufferTexturePixelLocalStorageWEBGL(b, Fd[c], d, e, f);
|
|
3497
3497
|
}, glActiveTexture:a => W.activeTexture(a), glAttachShader:(a, b) => {
|
|
3498
3498
|
W.attachShader(V[a], Gd[b]);
|
|
3499
3499
|
}, glBindBuffer:(a, b) => {
|
|
3500
|
-
35051 == a ? W.
|
|
3500
|
+
35051 == a ? W.Oa = b : 35052 == a && (W.ra = b);
|
|
3501
3501
|
W.bindBuffer(a, Cd[b]);
|
|
3502
3502
|
}, glBindBufferRange:(a, b, c, d, e) => {
|
|
3503
3503
|
W.bindBufferRange(a, b, Cd[c], d, e);
|
|
@@ -3509,7 +3509,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3509
3509
|
W.bindTexture(a, Fd[b]);
|
|
3510
3510
|
}, glBindVertexArray:a => {
|
|
3511
3511
|
W.bindVertexArray(Hd[a]);
|
|
3512
|
-
}, glBlendEquation:a => W.blendEquation(a), glBlendFunc:(a, b) => W.blendFunc(a, b), glBlitFramebuffer:(a, b, c, d, e, f, g, k,
|
|
3512
|
+
}, glBlendEquation:a => W.blendEquation(a), glBlendFunc:(a, b) => W.blendFunc(a, b), glBlitFramebuffer:(a, b, c, d, e, f, g, k, n, m) => W.blitFramebuffer(a, b, c, d, e, f, g, k, n, m), glBufferData:(a, b, c, d) => {
|
|
3513
3513
|
c && b ? W.bufferData(a, D, d, c, b) : W.bufferData(a, b, d);
|
|
3514
3514
|
}, glBufferSubData:(a, b, c, d) => {
|
|
3515
3515
|
c && W.bufferSubData(a, b, D, d, c);
|
|
@@ -3521,10 +3521,12 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3521
3521
|
W.colorMask(!!a, !!b, !!c, !!d);
|
|
3522
3522
|
}, glCompileShader:a => {
|
|
3523
3523
|
W.compileShader(Gd[a]);
|
|
3524
|
+
}, glCompressedTexSubImage2D:(a, b, c, d, e, f, g, k, n) => {
|
|
3525
|
+
W.ra || !k ? W.compressedTexSubImage2D(a, b, c, d, e, f, g, k, n) : W.compressedTexSubImage2D(a, b, c, d, e, f, g, D, n, k);
|
|
3524
3526
|
}, glCreateProgram:() => {
|
|
3525
3527
|
var a = Ld(V), b = W.createProgram();
|
|
3526
3528
|
b.name = a;
|
|
3527
|
-
b.
|
|
3529
|
+
b.za = b.xa = b.ya = 0;
|
|
3528
3530
|
b.Wa = 1;
|
|
3529
3531
|
V[a] = b;
|
|
3530
3532
|
return a;
|
|
@@ -3535,7 +3537,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3535
3537
|
}, glCullFace:a => W.cullFace(a), glDeleteBuffers:(a, b) => {
|
|
3536
3538
|
for (var c = 0; c < a; c++) {
|
|
3537
3539
|
var d = F[b + 4 * c >> 2], e = Cd[d];
|
|
3538
|
-
e && (W.deleteBuffer(e), e.name = 0, Cd[d] = null, d == W.
|
|
3540
|
+
e && (W.deleteBuffer(e), e.name = 0, Cd[d] = null, d == W.Oa && (W.Oa = 0), d == W.ra && (W.ra = 0));
|
|
3539
3541
|
}
|
|
3540
3542
|
}, glDeleteFramebuffers:(a, b) => {
|
|
3541
3543
|
for (var c = 0; c < a; ++c) {
|
|
@@ -3607,26 +3609,26 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3607
3609
|
if (a = V[a], 35716 == b) {
|
|
3608
3610
|
a = W.getProgramInfoLog(a), null === a && (a = "(unknown error)"), F[c >> 2] = a.length + 1;
|
|
3609
3611
|
} else if (35719 == b) {
|
|
3610
|
-
if (!a.
|
|
3612
|
+
if (!a.za) {
|
|
3611
3613
|
for (b = 0; b < W.getProgramParameter(a, 35718); ++b) {
|
|
3612
|
-
a.
|
|
3614
|
+
a.za = Math.max(a.za, W.getActiveUniform(a, b).name.length + 1);
|
|
3613
3615
|
}
|
|
3614
3616
|
}
|
|
3615
|
-
F[c >> 2] = a.
|
|
3617
|
+
F[c >> 2] = a.za;
|
|
3616
3618
|
} else if (35722 == b) {
|
|
3617
|
-
if (!a.
|
|
3619
|
+
if (!a.xa) {
|
|
3618
3620
|
for (b = 0; b < W.getProgramParameter(a, 35721); ++b) {
|
|
3619
|
-
a.
|
|
3621
|
+
a.xa = Math.max(a.xa, W.getActiveAttrib(a, b).name.length + 1);
|
|
3620
3622
|
}
|
|
3621
3623
|
}
|
|
3622
|
-
F[c >> 2] = a.
|
|
3624
|
+
F[c >> 2] = a.xa;
|
|
3623
3625
|
} else if (35381 == b) {
|
|
3624
|
-
if (!a.
|
|
3626
|
+
if (!a.ya) {
|
|
3625
3627
|
for (b = 0; b < W.getProgramParameter(a, 35382); ++b) {
|
|
3626
|
-
a.
|
|
3628
|
+
a.ya = Math.max(a.ya, W.getActiveUniformBlockName(a, b).length + 1);
|
|
3627
3629
|
}
|
|
3628
3630
|
}
|
|
3629
|
-
F[c >> 2] = a.
|
|
3631
|
+
F[c >> 2] = a.ya;
|
|
3630
3632
|
} else {
|
|
3631
3633
|
F[c >> 2] = W.getProgramParameter(a, b);
|
|
3632
3634
|
}
|
|
@@ -3672,13 +3674,13 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3672
3674
|
var g = W.getActiveUniform(c, f);
|
|
3673
3675
|
var k = g.name;
|
|
3674
3676
|
g = g.size;
|
|
3675
|
-
var
|
|
3676
|
-
|
|
3677
|
+
var n = Wd(k);
|
|
3678
|
+
n = 0 < n ? k.slice(0, n) : k;
|
|
3677
3679
|
var m = c.Wa;
|
|
3678
3680
|
c.Wa += g;
|
|
3679
|
-
e[
|
|
3681
|
+
e[n] = [g, m];
|
|
3680
3682
|
for (k = 0; k < g; ++k) {
|
|
3681
|
-
d[m] = k, c.vb[m++] =
|
|
3683
|
+
d[m] = k, c.vb[m++] = n;
|
|
3682
3684
|
}
|
|
3683
3685
|
}
|
|
3684
3686
|
}
|
|
@@ -3708,7 +3710,7 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3708
3710
|
3317 == a ? Jd = b : 3314 == a && (Kd = b);
|
|
3709
3711
|
W.pixelStorei(a, b);
|
|
3710
3712
|
}, glReadPixels:(a, b, c, d, e, f, g) => {
|
|
3711
|
-
if (W.
|
|
3713
|
+
if (W.Oa) {
|
|
3712
3714
|
W.readPixels(a, b, c, d, e, f, g);
|
|
3713
3715
|
} else {
|
|
3714
3716
|
var k = Xd(f);
|
|
@@ -3722,22 +3724,22 @@ var ee = {__syscall_fcntl64:function(a, b, c) {
|
|
|
3722
3724
|
}
|
|
3723
3725
|
W.shaderSource(Gd[a], e);
|
|
3724
3726
|
}, glStencilFunc:(a, b, c) => W.stencilFunc(a, b, c), glStencilFuncSeparate:(a, b, c, d) => W.stencilFuncSeparate(a, b, c, d), glStencilMask:a => W.stencilMask(a), glStencilOp:(a, b, c) => W.stencilOp(a, b, c), glStencilOpSeparate:(a, b, c, d) => W.stencilOpSeparate(a, b, c, d), glTexParameteri:(a, b, c) => W.texParameteri(a, b, c), glTexStorage2D:(a, b, c, d, e) => W.texStorage2D(a, b, c, d, e), glTexStorage3D:(a, b, c, d, e, f) => W.texStorage3D(a, b, c, d, e, f), glTexSubImage2D:(a, b, c, d, e,
|
|
3725
|
-
f, g, k,
|
|
3726
|
-
if (W.
|
|
3727
|
-
W.texSubImage2D(a, b, c, d, e, f, g, k,
|
|
3727
|
+
f, g, k, n) => {
|
|
3728
|
+
if (W.ra) {
|
|
3729
|
+
W.texSubImage2D(a, b, c, d, e, f, g, k, n);
|
|
3728
3730
|
} else {
|
|
3729
|
-
if (
|
|
3731
|
+
if (n) {
|
|
3730
3732
|
var m = Xd(k);
|
|
3731
|
-
W.texSubImage2D(a, b, c, d, e, f, g, k, m,
|
|
3733
|
+
W.texSubImage2D(a, b, c, d, e, f, g, k, m, n >>> 31 - Math.clz32(m.BYTES_PER_ELEMENT));
|
|
3732
3734
|
} else {
|
|
3733
|
-
if (
|
|
3735
|
+
if (n) {
|
|
3734
3736
|
m = Xd(k);
|
|
3735
3737
|
var t = f * ((Kd || e) * ({5:3, 6:4, 8:2, 29502:3, 29504:4, 26917:2, 26918:2, 29846:3, 29847:4}[g - 6402] || 1) * m.BYTES_PER_ELEMENT + Jd - 1 & -Jd);
|
|
3736
|
-
|
|
3738
|
+
n = m.subarray(n >>> 31 - Math.clz32(m.BYTES_PER_ELEMENT), n + t >>> 31 - Math.clz32(m.BYTES_PER_ELEMENT));
|
|
3737
3739
|
} else {
|
|
3738
|
-
|
|
3740
|
+
n = null;
|
|
3739
3741
|
}
|
|
3740
|
-
W.texSubImage2D(a, b, c, d, e, f, g, k,
|
|
3742
|
+
W.texSubImage2D(a, b, c, d, e, f, g, k, n);
|
|
3741
3743
|
}
|
|
3742
3744
|
}
|
|
3743
3745
|
}, glUniform1i:(a, b) => {
|
|
@@ -3833,8 +3835,8 @@ l.dynCall_vijj = (a, b, c, d, e, f) => (l.dynCall_vijj = Y.dynCall_vijj)(a, b, c
|
|
|
3833
3835
|
l.dynCall_jiji = (a, b, c, d, e) => (l.dynCall_jiji = Y.dynCall_jiji)(a, b, c, d, e);
|
|
3834
3836
|
l.dynCall_viijii = (a, b, c, d, e, f, g) => (l.dynCall_viijii = Y.dynCall_viijii)(a, b, c, d, e, f, g);
|
|
3835
3837
|
l.dynCall_iiiiij = (a, b, c, d, e, f, g) => (l.dynCall_iiiiij = Y.dynCall_iiiiij)(a, b, c, d, e, f, g);
|
|
3836
|
-
l.dynCall_iiiiijj = (a, b, c, d, e, f, g, k,
|
|
3837
|
-
l.dynCall_iiiiiijj = (a, b, c, d, e, f, g, k,
|
|
3838
|
+
l.dynCall_iiiiijj = (a, b, c, d, e, f, g, k, n) => (l.dynCall_iiiiijj = Y.dynCall_iiiiijj)(a, b, c, d, e, f, g, k, n);
|
|
3839
|
+
l.dynCall_iiiiiijj = (a, b, c, d, e, f, g, k, n, m) => (l.dynCall_iiiiiijj = Y.dynCall_iiiiiijj)(a, b, c, d, e, f, g, k, n, m);
|
|
3838
3840
|
function de(a, b, c) {
|
|
3839
3841
|
var d = he();
|
|
3840
3842
|
try {
|
|
@@ -3907,7 +3909,7 @@ moduleRtn = ca;
|
|
|
3907
3909
|
/* 5 */
|
|
3908
3910
|
/***/ ((module) => {
|
|
3909
3911
|
|
|
3910
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.
|
|
3912
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/webgl2","version":"2.38.0","description":"Rive\'s webgl2 based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)","Chris Dalton <chris@rive.app> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.wasm","rive_fallback.wasm","rive.js.map","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
|
|
3911
3913
|
|
|
3912
3914
|
/***/ }),
|
|
3913
3915
|
/* 6 */
|
|
@@ -3921,14 +3923,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3921
3923
|
/* harmony export */ CustomFileAssetLoaderWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__.CustomFileAssetLoaderWrapper),
|
|
3922
3924
|
/* harmony export */ FileAssetWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__.FileAssetWrapper),
|
|
3923
3925
|
/* harmony export */ FileFinalizer: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__.FileFinalizer),
|
|
3926
|
+
/* harmony export */ FocusSessionState: () => (/* reexport safe */ _registerKeyboardInteractions__WEBPACK_IMPORTED_MODULE_1__.FocusSessionState),
|
|
3924
3927
|
/* harmony export */ FontAssetWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__.FontAssetWrapper),
|
|
3925
3928
|
/* harmony export */ FontWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__.FontWrapper),
|
|
3926
3929
|
/* harmony export */ ImageAssetWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__.ImageAssetWrapper),
|
|
3927
3930
|
/* harmony export */ ImageWrapper: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__.ImageWrapper),
|
|
3931
|
+
/* harmony export */ KeyboardInteractions: () => (/* reexport safe */ _registerKeyboardInteractions__WEBPACK_IMPORTED_MODULE_1__.KeyboardInteractions),
|
|
3928
3932
|
/* harmony export */ RiveFont: () => (/* reexport safe */ _riveFont__WEBPACK_IMPORTED_MODULE_4__.RiveFont),
|
|
3929
3933
|
/* harmony export */ createFinalization: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__.createFinalization),
|
|
3930
3934
|
/* harmony export */ finalizationRegistry: () => (/* reexport safe */ _finalizationRegistry__WEBPACK_IMPORTED_MODULE_3__.finalizationRegistry),
|
|
3931
|
-
/* harmony export */ registerKeyboardInteractions: () => (/* reexport safe */ _registerKeyboardInteractions__WEBPACK_IMPORTED_MODULE_1__.registerKeyboardInteractions),
|
|
3932
3935
|
/* harmony export */ registerTouchInteractions: () => (/* reexport safe */ _registerTouchInteractions__WEBPACK_IMPORTED_MODULE_0__.registerTouchInteractions),
|
|
3933
3936
|
/* harmony export */ sanitizeUrl: () => (/* reexport safe */ _sanitizeUrl__WEBPACK_IMPORTED_MODULE_2__.sanitizeUrl)
|
|
3934
3937
|
/* harmony export */ });
|
|
@@ -4024,7 +4027,7 @@ var getClientCoordinates = function (event, isTouchScrollEnabled, enableMultiTou
|
|
|
4024
4027
|
* the state machine pointer move/up/down functions based on cursor interaction
|
|
4025
4028
|
*/
|
|
4026
4029
|
var registerTouchInteractions = function (_a) {
|
|
4027
|
-
var canvas = _a.canvas, artboard = _a.artboard, _b = _a.stateMachines, stateMachines = _b === void 0 ? [] : _b, renderer = _a.renderer, rive = _a.rive, fit = _a.fit, alignment = _a.alignment, _c = _a.isTouchScrollEnabled, isTouchScrollEnabled = _c === void 0 ? false : _c, _d = _a.dispatchPointerExit, dispatchPointerExit = _d === void 0 ? true : _d, _e = _a.enableMultiTouch, enableMultiTouch = _e === void 0 ? false : _e, _f = _a.layoutScaleFactor, layoutScaleFactor = _f === void 0 ? 1.0 : _f;
|
|
4030
|
+
var canvas = _a.canvas, artboard = _a.artboard, _b = _a.stateMachines, stateMachines = _b === void 0 ? [] : _b, renderer = _a.renderer, rive = _a.rive, fit = _a.fit, alignment = _a.alignment, _c = _a.isTouchScrollEnabled, isTouchScrollEnabled = _c === void 0 ? false : _c, _d = _a.dispatchPointerExit, dispatchPointerExit = _d === void 0 ? true : _d, _e = _a.enableMultiTouch, enableMultiTouch = _e === void 0 ? false : _e, _f = _a.layoutScaleFactor, layoutScaleFactor = _f === void 0 ? 1.0 : _f, advanceAndDrain = _a.advanceAndDrain;
|
|
4028
4031
|
if (!canvas ||
|
|
4029
4032
|
!stateMachines.length ||
|
|
4030
4033
|
!renderer ||
|
|
@@ -4167,6 +4170,8 @@ var registerTouchInteractions = function (_a) {
|
|
|
4167
4170
|
var stateMachine = stateMachines_3[_c];
|
|
4168
4171
|
_loop_3(stateMachine);
|
|
4169
4172
|
}
|
|
4173
|
+
// Advance the state machine immediately so pointer down(s) takes effect synchronously
|
|
4174
|
+
advanceAndDrain(0);
|
|
4170
4175
|
break;
|
|
4171
4176
|
}
|
|
4172
4177
|
// Pointer click released on the canvas
|
|
@@ -4181,6 +4186,8 @@ var registerTouchInteractions = function (_a) {
|
|
|
4181
4186
|
var stateMachine = stateMachines_4[_d];
|
|
4182
4187
|
_loop_4(stateMachine);
|
|
4183
4188
|
}
|
|
4189
|
+
// Advance the state machine immediately so pointer up(s) takes effect synchronously
|
|
4190
|
+
advanceAndDrain(0);
|
|
4184
4191
|
// Release the primary touch lock once that finger lifts so the next
|
|
4185
4192
|
// touchstart can claim a new primary finger.
|
|
4186
4193
|
if (!enableMultiTouch &&
|
|
@@ -4199,6 +4206,8 @@ var registerTouchInteractions = function (_a) {
|
|
|
4199
4206
|
var stateMachine = stateMachines_5[_e];
|
|
4200
4207
|
_loop_5(stateMachine);
|
|
4201
4208
|
}
|
|
4209
|
+
// Advance the state machine immediately so pointer up(s) takes effect synchronously
|
|
4210
|
+
advanceAndDrain(0);
|
|
4202
4211
|
break;
|
|
4203
4212
|
}
|
|
4204
4213
|
default:
|
|
@@ -4241,60 +4250,145 @@ var registerTouchInteractions = function (_a) {
|
|
|
4241
4250
|
|
|
4242
4251
|
__webpack_require__.r(__webpack_exports__);
|
|
4243
4252
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4244
|
-
/* harmony export */
|
|
4253
|
+
/* harmony export */ FocusSessionState: () => (/* binding */ FocusSessionState),
|
|
4254
|
+
/* harmony export */ KeyboardInteractions: () => (/* binding */ KeyboardInteractions)
|
|
4245
4255
|
/* harmony export */ });
|
|
4246
4256
|
/**
|
|
4247
|
-
*
|
|
4248
|
-
*
|
|
4257
|
+
* Tracks the relationship between the canvas's DOM focus and Rive's internal focus for the
|
|
4258
|
+
* current focus session.
|
|
4249
4259
|
*
|
|
4250
|
-
*
|
|
4260
|
+
* NotFocused — the canvas is not the active DOM element, or Rive entered and then released focus
|
|
4261
|
+
* internally this session. Either way the next Tab should move on to the next page
|
|
4262
|
+
* element, so Tab events are ignored.
|
|
4263
|
+
* EntryPending — the canvas has DOM focus but Rive holds no active focus node yet, and the next Tab should enter
|
|
4264
|
+
* the focus tree. This is the resting state for pointer-driven focus (a click on the
|
|
4265
|
+
* canvas), or an edge case for keyboard focus where initial focus action did not land on a focus node.
|
|
4266
|
+
* RiveFocused — a Rive node currently holds focus. Tab/Shift+Tab are routed to the Rive focus
|
|
4267
|
+
* manager and trapped inside the canvas until Rive notifies focus has ended.
|
|
4251
4268
|
*
|
|
4252
|
-
*
|
|
4253
|
-
*
|
|
4269
|
+
* When keyboard focus lands on the canvas, onCanvasFocus reads the direction focus came from and
|
|
4270
|
+
* moves into the focus tree immediately, going straight to RiveFocused. EntryPending is only set via pointer focus (or keyboard focus
|
|
4271
|
+
* where focusNext()/focusPrevious() return false but respects tabindex).
|
|
4254
4272
|
*/
|
|
4255
|
-
var
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4273
|
+
var FocusSessionState;
|
|
4274
|
+
(function (FocusSessionState) {
|
|
4275
|
+
FocusSessionState["NotFocused"] = "notFocused";
|
|
4276
|
+
FocusSessionState["EntryPending"] = "entryPending";
|
|
4277
|
+
FocusSessionState["RiveFocused"] = "riveFocused";
|
|
4278
|
+
})(FocusSessionState || (FocusSessionState = {}));
|
|
4279
|
+
/**
|
|
4280
|
+
* Manages keyboard and DOM focus interactions for a Rive canvas.
|
|
4281
|
+
*
|
|
4282
|
+
* Tracks the canvas focus session state (focusSessionState) and routes
|
|
4283
|
+
* Tab/Shift+Tab to the Rive state machine's focus manager. Exposes shared
|
|
4284
|
+
* state as properties so the Rive render loop can read them directly.
|
|
4285
|
+
*/
|
|
4286
|
+
var KeyboardInteractions = /** @class */ (function () {
|
|
4287
|
+
function KeyboardInteractions(_a) {
|
|
4288
|
+
var canvas = _a.canvas, stateMachine = _a.stateMachine, hasFocusNodes = _a.hasFocusNodes;
|
|
4289
|
+
var _this = this;
|
|
4290
|
+
this.focusSessionState = FocusSessionState.NotFocused;
|
|
4291
|
+
/**
|
|
4292
|
+
* Handles the canvas gaining browser focus. The behavior differs based on how focus was gained -
|
|
4293
|
+
*
|
|
4294
|
+
* Pointer-driven focus: the canvas now has focus but Rive holds nothing yet, so we move to EntryPending — this lets the
|
|
4295
|
+
* next Tab enter the focus tree even when the focus is pointer-driven
|
|
4296
|
+
*
|
|
4297
|
+
* Keyboard-driven focus: we enter the Rive focus tree immediately once canvas gains focus.
|
|
4298
|
+
* The direction is inferred from where focus came from: an element before the canvas in DOM order
|
|
4299
|
+
* means a forward Tab (focusNext), one after means a Shift+Tab (focusPrevious). :focus-visible
|
|
4300
|
+
* gates this so a click doesn't yank Rive focus to the first node on the focus event itself.
|
|
4301
|
+
*/
|
|
4302
|
+
this.onCanvasFocus = function (event) {
|
|
4303
|
+
if (!_this.hasFocusNodes)
|
|
4304
|
+
return;
|
|
4305
|
+
if (_this.mainSm.focusState().hasFocus)
|
|
4306
|
+
return;
|
|
4307
|
+
_this.focusSessionState = FocusSessionState.EntryPending;
|
|
4308
|
+
// Pointer focus waits for the user's next Tab (handled in onKeyDown). Keyboard focus enters now.
|
|
4309
|
+
if (!_this.isKeyboardDrivenFocus())
|
|
4310
|
+
return;
|
|
4311
|
+
var forward = _this.cameFromBeforeCanvas(event.relatedTarget);
|
|
4312
|
+
if (forward ? _this.mainSm.focusNext() : _this.mainSm.focusPrevious()) {
|
|
4313
|
+
_this.focusSessionState = FocusSessionState.RiveFocused;
|
|
4281
4314
|
}
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4315
|
+
};
|
|
4316
|
+
this.onCanvasBlur = function (_event) {
|
|
4317
|
+
_this.focusSessionState = FocusSessionState.NotFocused;
|
|
4318
|
+
};
|
|
4319
|
+
this.onKeyDown = function (event) {
|
|
4320
|
+
if (_this.focusSessionState === FocusSessionState.NotFocused)
|
|
4321
|
+
return;
|
|
4322
|
+
if (event.code === "Tab" && _this.hasFocusNodes) {
|
|
4323
|
+
var forward = !event.shiftKey;
|
|
4324
|
+
var focusMoved = forward ? _this.mainSm.focusNext() : _this.mainSm.focusPrevious();
|
|
4325
|
+
if (focusMoved) {
|
|
4326
|
+
// A Rive node accepted focus — keep trapping Tab inside the canvas.
|
|
4327
|
+
_this.focusSessionState = FocusSessionState.RiveFocused;
|
|
4328
|
+
event.preventDefault();
|
|
4329
|
+
}
|
|
4330
|
+
else {
|
|
4331
|
+
// No more traversable nodes — release Tab to the page.
|
|
4332
|
+
// Set state immediately; onCanvasBlur will also fire naturally.
|
|
4333
|
+
_this.focusSessionState = FocusSessionState.NotFocused;
|
|
4334
|
+
}
|
|
4286
4335
|
}
|
|
4287
|
-
}
|
|
4336
|
+
};
|
|
4337
|
+
this.canvas = canvas;
|
|
4338
|
+
this.mainSm = stateMachine;
|
|
4339
|
+
this.hasFocusNodes = hasFocusNodes;
|
|
4340
|
+
canvas.addEventListener("focus", this.onCanvasFocus);
|
|
4341
|
+
canvas.addEventListener("blur", this.onCanvasBlur);
|
|
4342
|
+
canvas.addEventListener("keydown", this.onKeyDown);
|
|
4343
|
+
}
|
|
4344
|
+
/**
|
|
4345
|
+
* Set the FocusSessionState. Useful for invoking a Rive "blur" without actually blurring from the <canvas>. This
|
|
4346
|
+
* helps put the DOM focus state on the canvas rather than the <body>, so the user doesn't lose the spot in page navigation
|
|
4347
|
+
*
|
|
4348
|
+
* @param state FocusSessionState enum
|
|
4349
|
+
*/
|
|
4350
|
+
KeyboardInteractions.prototype.setFocusSessionState = function (state) {
|
|
4351
|
+
this.focusSessionState = state;
|
|
4288
4352
|
};
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4353
|
+
/**
|
|
4354
|
+
* Called by pollFocusState on the Rive instance when it observes hasFocus=true. Rive acquired
|
|
4355
|
+
* focus internally (e.g. via a listener action or state transition) without a DOM focus event,
|
|
4356
|
+
* so mark the session RiveFocused.
|
|
4357
|
+
*/
|
|
4358
|
+
KeyboardInteractions.prototype.notifyRiveFocused = function () {
|
|
4359
|
+
this.focusSessionState = FocusSessionState.RiveFocused;
|
|
4296
4360
|
};
|
|
4297
|
-
|
|
4361
|
+
/**
|
|
4362
|
+
* Whether the canvas currently matches :focus-visible — the browser's heuristic for keyboard-
|
|
4363
|
+
* (vs pointer-) driven focus. For older browser versions that don't support this selector, return false
|
|
4364
|
+
* so that we don't incorrectly assume pointer vs keyboard focus. Next tab would enter the focus tree in those edge cases.
|
|
4365
|
+
*/
|
|
4366
|
+
KeyboardInteractions.prototype.isKeyboardDrivenFocus = function () {
|
|
4367
|
+
try {
|
|
4368
|
+
return this.canvas.matches(":focus-visible");
|
|
4369
|
+
}
|
|
4370
|
+
catch (_a) {
|
|
4371
|
+
return false;
|
|
4372
|
+
}
|
|
4373
|
+
};
|
|
4374
|
+
KeyboardInteractions.prototype.cameFromBeforeCanvas = function (from) {
|
|
4375
|
+
if (!from)
|
|
4376
|
+
return true;
|
|
4377
|
+
var position = this.canvas.compareDocumentPosition(from);
|
|
4378
|
+
if (position & Node.DOCUMENT_POSITION_PRECEDING)
|
|
4379
|
+
return true;
|
|
4380
|
+
if (position & Node.DOCUMENT_POSITION_FOLLOWING)
|
|
4381
|
+
return false;
|
|
4382
|
+
return true;
|
|
4383
|
+
};
|
|
4384
|
+
KeyboardInteractions.prototype.cleanup = function () {
|
|
4385
|
+
this.canvas.removeEventListener("focus", this.onCanvasFocus);
|
|
4386
|
+
this.canvas.removeEventListener("blur", this.onCanvasBlur);
|
|
4387
|
+
this.canvas.removeEventListener("keydown", this.onKeyDown);
|
|
4388
|
+
};
|
|
4389
|
+
return KeyboardInteractions;
|
|
4390
|
+
}());
|
|
4391
|
+
|
|
4298
4392
|
|
|
4299
4393
|
|
|
4300
4394
|
/***/ }),
|
|
@@ -4492,6 +4586,9 @@ var CustomFileAssetLoaderWrapper = /** @class */ (function () {
|
|
|
4492
4586
|
else if (asset.isFont) {
|
|
4493
4587
|
assetWrapper = new FontAssetWrapper(asset);
|
|
4494
4588
|
}
|
|
4589
|
+
else {
|
|
4590
|
+
return false;
|
|
4591
|
+
}
|
|
4495
4592
|
return this._assetLoaderCallback(assetWrapper, bytes);
|
|
4496
4593
|
};
|
|
4497
4594
|
return CustomFileAssetLoaderWrapper;
|
|
@@ -5131,6 +5228,7 @@ var StateMachine = /** @class */ (function () {
|
|
|
5131
5228
|
this.inputs = [];
|
|
5132
5229
|
this.instance = new runtime.StateMachineInstance(stateMachine, artboard);
|
|
5133
5230
|
this.initInputs(runtime);
|
|
5231
|
+
this.hasFocusNodes = this.instance.hasFocusNodes();
|
|
5134
5232
|
}
|
|
5135
5233
|
Object.defineProperty(StateMachine.prototype, "name", {
|
|
5136
5234
|
get: function () {
|
|
@@ -5226,6 +5324,19 @@ var StateMachine = /** @class */ (function () {
|
|
|
5226
5324
|
this.instance.bindViewModelInstance(viewModelInstance.runtimeInstance);
|
|
5227
5325
|
}
|
|
5228
5326
|
};
|
|
5327
|
+
/**
|
|
5328
|
+
* Get metadata about the state of focus if applicable for this state machine.
|
|
5329
|
+
* @returns FocusState - { hasFocus: boolean, expectsKeyboardInput: boolean }
|
|
5330
|
+
*/
|
|
5331
|
+
StateMachine.prototype.focusState = function () {
|
|
5332
|
+
return this.instance.focusState();
|
|
5333
|
+
};
|
|
5334
|
+
/**
|
|
5335
|
+
* Clear focus from the Rive focus node tree.
|
|
5336
|
+
*/
|
|
5337
|
+
StateMachine.prototype.clearFocus = function () {
|
|
5338
|
+
this.instance.clearFocus();
|
|
5339
|
+
};
|
|
5229
5340
|
return StateMachine;
|
|
5230
5341
|
}());
|
|
5231
5342
|
// #endregion
|
|
@@ -6232,7 +6343,7 @@ var RiveFile = /** @class */ (function () {
|
|
|
6232
6343
|
var Rive = /** @class */ (function () {
|
|
6233
6344
|
function Rive(params) {
|
|
6234
6345
|
var _this = this;
|
|
6235
|
-
var _a, _b;
|
|
6346
|
+
var _a, _b, _c;
|
|
6236
6347
|
// Tracks if a Rive file is loaded
|
|
6237
6348
|
this.loaded = false;
|
|
6238
6349
|
// Tracks if a Rive file is destroyed
|
|
@@ -6251,8 +6362,8 @@ var Rive = /** @class */ (function () {
|
|
|
6251
6362
|
this.artboard = null;
|
|
6252
6363
|
// place to clear up pointer/touch event listeners
|
|
6253
6364
|
this.eventCleanup = null;
|
|
6254
|
-
//
|
|
6255
|
-
this.
|
|
6365
|
+
// Manages keyboard and DOM-focus interactions for the canvas.
|
|
6366
|
+
this._keyboardInteractions = null;
|
|
6256
6367
|
this.shouldDisableRiveListeners = false;
|
|
6257
6368
|
this.automaticallyHandleEvents = false;
|
|
6258
6369
|
this.dispatchPointerExit = true;
|
|
@@ -6290,6 +6401,10 @@ var Rive = /** @class */ (function () {
|
|
|
6290
6401
|
this._viewModelInstance = null;
|
|
6291
6402
|
this._dataEnums = null;
|
|
6292
6403
|
this._tabIndex = null;
|
|
6404
|
+
this._prevHasFocus = false;
|
|
6405
|
+
this._focusOptions = {
|
|
6406
|
+
allowFocusInterrupt: false,
|
|
6407
|
+
};
|
|
6293
6408
|
this.drawOptimization = DrawOptimizationOptions.DrawOnChanged;
|
|
6294
6409
|
// When true, emits performance.mark/measure entries for load and render.
|
|
6295
6410
|
this.enablePerfMarks = false;
|
|
@@ -6348,6 +6463,7 @@ var Rive = /** @class */ (function () {
|
|
|
6348
6463
|
this.enablePerfMarks = !!params.enablePerfMarks;
|
|
6349
6464
|
if (this.enablePerfMarks)
|
|
6350
6465
|
_runtimeLoader__WEBPACK_IMPORTED_MODULE_1__.RuntimeLoader.enablePerfMarks = true;
|
|
6466
|
+
this._focusOptions = (_c = params.focusOptions) !== null && _c !== void 0 ? _c : this._focusOptions;
|
|
6351
6467
|
// New event management system
|
|
6352
6468
|
this.eventManager = new EventManager();
|
|
6353
6469
|
if (params.onLoad)
|
|
@@ -6500,10 +6616,7 @@ var Rive = /** @class */ (function () {
|
|
|
6500
6616
|
if (this.eventCleanup) {
|
|
6501
6617
|
this.eventCleanup();
|
|
6502
6618
|
}
|
|
6503
|
-
|
|
6504
|
-
this.keyboardEventCleanup();
|
|
6505
|
-
this.keyboardEventCleanup = null;
|
|
6506
|
-
}
|
|
6619
|
+
this.cleanupKeyboardInteractions();
|
|
6507
6620
|
if (!this.shouldDisableRiveListeners) {
|
|
6508
6621
|
var playingStateMachines = this.animator.stateMachines.filter(function (sm) { return sm.playing; });
|
|
6509
6622
|
var activeStateMachines = playingStateMachines
|
|
@@ -6528,12 +6641,11 @@ var Rive = /** @class */ (function () {
|
|
|
6528
6641
|
dispatchPointerExit: dispatchPointerExit,
|
|
6529
6642
|
enableMultiTouch: enableMultiTouch,
|
|
6530
6643
|
layoutScaleFactor: this._layout.layoutScaleFactor,
|
|
6644
|
+
advanceAndDrain: this.advanceAndReportChanges.bind(this)
|
|
6531
6645
|
});
|
|
6532
6646
|
// Wire up keyboard interactions for state machines that have focus nodes.
|
|
6533
6647
|
// hasFocusNodes — unified focus tree check, gates tab traversal
|
|
6534
|
-
var smWithFocusNodes = playingStateMachines
|
|
6535
|
-
.filter(function (sm) { return sm.instance.hasFocusNodes(); })
|
|
6536
|
-
.map(function (sm) { return sm.instance; });
|
|
6648
|
+
var smWithFocusNodes = playingStateMachines.filter(function (sm) { return sm.hasFocusNodes; });
|
|
6537
6649
|
if (smWithFocusNodes.length) {
|
|
6538
6650
|
// Set the canvas as a tabbable element if there are any focus nodes.
|
|
6539
6651
|
// Prefer the tabIndex param set by the user, otherwise use 0.
|
|
@@ -6543,15 +6655,22 @@ var Rive = /** @class */ (function () {
|
|
|
6543
6655
|
if (currentCanvasTabIndex === -1 || isNaN(currentCanvasTabIndex)) {
|
|
6544
6656
|
this.canvas.tabIndex = (this._tabIndex !== null ? this._tabIndex : 0);
|
|
6545
6657
|
}
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6658
|
+
if (typeof window !== "undefined") {
|
|
6659
|
+
this._keyboardInteractions = new _utils__WEBPACK_IMPORTED_MODULE_2__.KeyboardInteractions({
|
|
6660
|
+
canvas: this.canvas,
|
|
6661
|
+
stateMachine: smWithFocusNodes[0].instance, // work off assumption of single state machine
|
|
6662
|
+
hasFocusNodes: true,
|
|
6663
|
+
});
|
|
6664
|
+
}
|
|
6552
6665
|
}
|
|
6553
6666
|
}
|
|
6554
6667
|
};
|
|
6668
|
+
Rive.prototype.cleanupKeyboardInteractions = function () {
|
|
6669
|
+
if (this._keyboardInteractions) {
|
|
6670
|
+
this._keyboardInteractions.cleanup();
|
|
6671
|
+
this._keyboardInteractions = null;
|
|
6672
|
+
}
|
|
6673
|
+
};
|
|
6555
6674
|
/**
|
|
6556
6675
|
* Remove Rive Listeners setup on the canvas
|
|
6557
6676
|
*/
|
|
@@ -6560,10 +6679,7 @@ var Rive = /** @class */ (function () {
|
|
|
6560
6679
|
this.eventCleanup();
|
|
6561
6680
|
this.eventCleanup = null;
|
|
6562
6681
|
}
|
|
6563
|
-
|
|
6564
|
-
this.keyboardEventCleanup();
|
|
6565
|
-
this.keyboardEventCleanup = null;
|
|
6566
|
-
}
|
|
6682
|
+
this.cleanupKeyboardInteractions();
|
|
6567
6683
|
};
|
|
6568
6684
|
/**
|
|
6569
6685
|
* If the instance has audio and the system audio is not ready
|
|
@@ -6741,27 +6857,53 @@ var Rive = /** @class */ (function () {
|
|
|
6741
6857
|
return changed;
|
|
6742
6858
|
};
|
|
6743
6859
|
/**
|
|
6744
|
-
*
|
|
6745
|
-
*
|
|
6860
|
+
* Poll focus state each frame to see if we should focus/blur the canvas in case
|
|
6861
|
+
* Rive internally updated focus outside of user interaction (e.g., via listener action)
|
|
6746
6862
|
*/
|
|
6747
|
-
Rive.prototype.
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
var before = performance.now();
|
|
6752
|
-
// On the first pass, make sure lastTime has a valid value
|
|
6753
|
-
if (!this.lastRenderTime) {
|
|
6754
|
-
this.lastRenderTime = time;
|
|
6863
|
+
Rive.prototype.pollFocusState = function () {
|
|
6864
|
+
if (!this._keyboardInteractions) {
|
|
6865
|
+
this._prevHasFocus = false;
|
|
6866
|
+
return;
|
|
6755
6867
|
}
|
|
6756
|
-
//
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
onSecond === null || onSecond === void 0 ? void 0 : onSecond();
|
|
6868
|
+
var activeSm = this.animator.stateMachines.find(function (sm) { return sm.playing && sm.hasFocusNodes; }); // work off assumption of single state machine
|
|
6869
|
+
if (!activeSm) {
|
|
6870
|
+
this._prevHasFocus = false;
|
|
6871
|
+
return;
|
|
6761
6872
|
}
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6873
|
+
if (this.canvas instanceof HTMLCanvasElement) {
|
|
6874
|
+
var hasFocus = activeSm.focusState().hasFocus;
|
|
6875
|
+
if (hasFocus) {
|
|
6876
|
+
// Rive has an active focus node. Mark the session RiveFocused so Tab stays
|
|
6877
|
+
// trapped and a later internal release (hasFocus true → false) is detected.
|
|
6878
|
+
this._keyboardInteractions.notifyRiveFocused();
|
|
6879
|
+
// Only steal DOM focus on the false→true transition. If hasFocus stays
|
|
6880
|
+
// true across frames and the user clicks away, do not re-focus the canvas again.
|
|
6881
|
+
if (!this._prevHasFocus) {
|
|
6882
|
+
if (this.canvas !== document.activeElement && this._focusOptions.allowFocusInterrupt) {
|
|
6883
|
+
this.canvas.focus();
|
|
6884
|
+
}
|
|
6885
|
+
this._prevHasFocus = true;
|
|
6886
|
+
}
|
|
6887
|
+
return;
|
|
6888
|
+
}
|
|
6889
|
+
this._prevHasFocus = false;
|
|
6890
|
+
// hasFocus is false — only act when Rive previously held focus and released it internally
|
|
6891
|
+
// (state change clears focus). Release the DOM Tab trap so the next Tab moves to the next
|
|
6892
|
+
// page element. EntryPending and NotFocused cases are intentional no-ops — EntryPending in
|
|
6893
|
+
// particular must stay in its state (a click awaiting its first Tab) rather than be reset here.
|
|
6894
|
+
if (this._keyboardInteractions.focusSessionState === _utils__WEBPACK_IMPORTED_MODULE_2__.FocusSessionState.RiveFocused) {
|
|
6895
|
+
this._keyboardInteractions.setFocusSessionState(_utils__WEBPACK_IMPORTED_MODULE_2__.FocusSessionState.NotFocused);
|
|
6896
|
+
}
|
|
6897
|
+
}
|
|
6898
|
+
};
|
|
6899
|
+
/**
|
|
6900
|
+
* Handles important sequence of reporting Rive events, advancing the state machine or animation, and invoking various callbacks
|
|
6901
|
+
* due to state changes, view model property changes, etc.
|
|
6902
|
+
*
|
|
6903
|
+
* @param elapsedTime time to advance the state machine by
|
|
6904
|
+
*/
|
|
6905
|
+
Rive.prototype.advanceAndReportChanges = function (elapsedTime) {
|
|
6906
|
+
var _a;
|
|
6765
6907
|
// - Advance non-paused animations by the elapsed number of seconds
|
|
6766
6908
|
// - Advance any animations that require scrubbing
|
|
6767
6909
|
// - Advance to the first frame even when autoplay is false
|
|
@@ -6825,13 +6967,48 @@ var Rive = /** @class */ (function () {
|
|
|
6825
6967
|
performance.mark("rive:sm-advance:end:f".concat(_perfFrame));
|
|
6826
6968
|
performance.measure("rive:sm-advance:f".concat(_perfFrame), "rive:sm-advance:start:f".concat(_perfFrame), "rive:sm-advance:end:f".concat(_perfFrame));
|
|
6827
6969
|
}
|
|
6828
|
-
// stateMachine.instance.apply(this.artboard);
|
|
6829
6970
|
}
|
|
6830
|
-
//
|
|
6971
|
+
// For linear animations that have been applied to the artboard, advance it
|
|
6831
6972
|
// by the elapsed time.
|
|
6832
6973
|
if (this.animator.stateMachines.length == 0) {
|
|
6833
6974
|
this.artboard.advance(elapsedTime);
|
|
6834
6975
|
}
|
|
6976
|
+
// Check for any animations that looped
|
|
6977
|
+
this.animator.handleLooping();
|
|
6978
|
+
// Check for any state machines that had a state change
|
|
6979
|
+
this.animator.handleStateChanges();
|
|
6980
|
+
// Report advanced time
|
|
6981
|
+
this.animator.handleAdvancing(elapsedTime);
|
|
6982
|
+
// Poll focus state to see whether or not to blur or pull up a virtual keyboard for any change to a text input node.
|
|
6983
|
+
this.pollFocusState();
|
|
6984
|
+
// Handle callbacks for view model property changes
|
|
6985
|
+
(_a = this._viewModelInstance) === null || _a === void 0 ? void 0 : _a.handleCallbacks();
|
|
6986
|
+
};
|
|
6987
|
+
/**
|
|
6988
|
+
* Draw rendering loop; renders animation frames at the correct time interval.
|
|
6989
|
+
* @param time the time at which to render a frame
|
|
6990
|
+
*/
|
|
6991
|
+
Rive.prototype.draw = function (time, onSecond) {
|
|
6992
|
+
// Clear the frameRequestId, as we're now rendering a fresh frame
|
|
6993
|
+
this.frameRequestId = null;
|
|
6994
|
+
var before = performance.now();
|
|
6995
|
+
// Instrument the first 3 frames so the Performance timeline shows precise
|
|
6996
|
+
// per-call latency for advance, draw, and flush without polluting the trace.
|
|
6997
|
+
var _perfFrame = this.enablePerfMarks && this.frameCount < 3 ? this.frameCount : -1;
|
|
6998
|
+
// On the first pass, make sure lastTime has a valid value
|
|
6999
|
+
if (!this.lastRenderTime) {
|
|
7000
|
+
this.lastRenderTime = time;
|
|
7001
|
+
}
|
|
7002
|
+
// Handle the onSecond callback
|
|
7003
|
+
this.renderSecondTimer += time - this.lastRenderTime;
|
|
7004
|
+
if (this.renderSecondTimer > 5000) {
|
|
7005
|
+
this.renderSecondTimer = 0;
|
|
7006
|
+
onSecond === null || onSecond === void 0 ? void 0 : onSecond();
|
|
7007
|
+
}
|
|
7008
|
+
// Calculate the elapsed time between frames in seconds
|
|
7009
|
+
var elapsedTime = (time - this.lastRenderTime) / 1000;
|
|
7010
|
+
this.lastRenderTime = time;
|
|
7011
|
+
this.advanceAndReportChanges(elapsedTime);
|
|
6835
7012
|
var renderer = this.renderer;
|
|
6836
7013
|
// Do not draw on 0 canvas size
|
|
6837
7014
|
if (!this._hasZeroSize) {
|
|
@@ -6869,12 +7046,6 @@ var Rive = /** @class */ (function () {
|
|
|
6869
7046
|
this._needsRedraw = false;
|
|
6870
7047
|
}
|
|
6871
7048
|
}
|
|
6872
|
-
// Check for any animations that looped
|
|
6873
|
-
this.animator.handleLooping();
|
|
6874
|
-
// Check for any state machines that had a state change
|
|
6875
|
-
this.animator.handleStateChanges();
|
|
6876
|
-
// Report advanced time
|
|
6877
|
-
this.animator.handleAdvancing(elapsedTime);
|
|
6878
7049
|
// Add duration to create frame to durations array
|
|
6879
7050
|
this.frameCount++;
|
|
6880
7051
|
var after = performance.now();
|
|
@@ -6884,7 +7055,6 @@ var Rive = /** @class */ (function () {
|
|
|
6884
7055
|
this.frameTimes.shift();
|
|
6885
7056
|
this.durations.shift();
|
|
6886
7057
|
}
|
|
6887
|
-
(_a = this._viewModelInstance) === null || _a === void 0 ? void 0 : _a.handleCallbacks();
|
|
6888
7058
|
// Calling requestAnimationFrame will rerun draw() at the correct rate:
|
|
6889
7059
|
// https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_animations
|
|
6890
7060
|
if (this.animator.isPlaying) {
|
|
@@ -6991,10 +7161,7 @@ var Rive = /** @class */ (function () {
|
|
|
6991
7161
|
if (this.eventCleanup !== null) {
|
|
6992
7162
|
this.eventCleanup();
|
|
6993
7163
|
}
|
|
6994
|
-
|
|
6995
|
-
this.keyboardEventCleanup();
|
|
6996
|
-
this.keyboardEventCleanup = null;
|
|
6997
|
-
}
|
|
7164
|
+
this.cleanupKeyboardInteractions();
|
|
6998
7165
|
// Delete all animation and state machine instances
|
|
6999
7166
|
this.stop();
|
|
7000
7167
|
if (this.artboard) {
|
|
@@ -7063,10 +7230,7 @@ var Rive = /** @class */ (function () {
|
|
|
7063
7230
|
if (this.eventCleanup) {
|
|
7064
7231
|
this.eventCleanup();
|
|
7065
7232
|
}
|
|
7066
|
-
|
|
7067
|
-
this.keyboardEventCleanup();
|
|
7068
|
-
this.keyboardEventCleanup = null;
|
|
7069
|
-
}
|
|
7233
|
+
this.cleanupKeyboardInteractions();
|
|
7070
7234
|
this.setupRiveListeners();
|
|
7071
7235
|
this.startRendering();
|
|
7072
7236
|
};
|
|
@@ -7084,10 +7248,7 @@ var Rive = /** @class */ (function () {
|
|
|
7084
7248
|
if (this.eventCleanup) {
|
|
7085
7249
|
this.eventCleanup();
|
|
7086
7250
|
}
|
|
7087
|
-
|
|
7088
|
-
this.keyboardEventCleanup();
|
|
7089
|
-
this.keyboardEventCleanup = null;
|
|
7090
|
-
}
|
|
7251
|
+
this.cleanupKeyboardInteractions();
|
|
7091
7252
|
this.animator.pause(animationNames);
|
|
7092
7253
|
};
|
|
7093
7254
|
Rive.prototype.scrub = function (animationNames, value) {
|
|
@@ -7123,10 +7284,7 @@ var Rive = /** @class */ (function () {
|
|
|
7123
7284
|
if (this.eventCleanup) {
|
|
7124
7285
|
this.eventCleanup();
|
|
7125
7286
|
}
|
|
7126
|
-
|
|
7127
|
-
this.keyboardEventCleanup();
|
|
7128
|
-
this.keyboardEventCleanup = null;
|
|
7129
|
-
}
|
|
7287
|
+
this.cleanupKeyboardInteractions();
|
|
7130
7288
|
};
|
|
7131
7289
|
/**
|
|
7132
7290
|
* Resets the animation
|
|
@@ -7877,6 +8035,14 @@ var Rive = /** @class */ (function () {
|
|
|
7877
8035
|
var _a, _b;
|
|
7878
8036
|
return (_b = (_a = this.riveFile) === null || _a === void 0 ? void 0 : _a.getDefaultBindableArtboard()) !== null && _b !== void 0 ? _b : null;
|
|
7879
8037
|
};
|
|
8038
|
+
/**
|
|
8039
|
+
* Clear focus applicable to active state machines with focus nodes. Useful if users want to
|
|
8040
|
+
* reset focus state and behavior within the Rive graphic at any point (i.e. blurring off the canvas)
|
|
8041
|
+
*/
|
|
8042
|
+
Rive.prototype.clearFocus = function () {
|
|
8043
|
+
var playingStateMachines = this.animator.stateMachines.filter(function (sm) { return sm.playing && sm.hasFocusNodes; });
|
|
8044
|
+
playingStateMachines.forEach(function (sm) { return sm.clearFocus(); });
|
|
8045
|
+
};
|
|
7880
8046
|
// Error message for missing source or buffer
|
|
7881
8047
|
Rive.missingErrorMessage = "Rive source file or data buffer required";
|
|
7882
8048
|
// Error message for removed rive file
|