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