@rive-app/canvas-lite 2.49.3 → 2.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
  # Rive
3
3
  A lite high-level Rive API using CanvasRenderingContext2D. Please see https://rive.app/community/doc/canvas-vs-webgl/docanjXoQ1uT for a list of all the available web runtimes and their details.
4
4
 
5
+ [Rive](https://rive.app) is an agent-native 2D and 3D engine for games, apps, and interactive UI. Use it as your whole engine, or add it to the products you already have. Build with your coding agent through the [Rive CLI](https://rive.app/agents), or draw, rig, and animate by hand with the professional design and animation tools in the [Rive Editor](https://rive.app/editor). Both work on the same files. Open-source runtimes, no royalties or runtime fees. Rive files (`.riv`) play natively on web, mobile, desktop, game engines, consoles, smart TVs, and cars.
6
+
5
7
  ## Canvas Lite
6
8
  ```
7
9
  npm install @rive-app/canvas-lite
@@ -19,3 +21,13 @@ An easy-to-use high-level Rive API using a backing [CanvasRenderingContext2D](ht
19
21
  The current `@rive-app/canvas` dependency supports all Rive features and contains the necessary backing dependencies to render those graphics. This `lite` version has the same API, but does not compile and build with certain dependencies in order to keep the package size as small as possible.
20
22
 
21
23
  At this time, this lite version of `@rive-app/canvas-lite` will not render Rive Text onto the canvas or play Rive Audio. Note however, that even if your Rive file may include Rive Text components, rendering the graphic should not cause any app errors, or cease to render. The same is true for playing audio.
24
+
25
+ ## Build with your agent
26
+
27
+ Paste this into Claude Code, Codex, Cursor, or any agent that runs commands on your computer:
28
+
29
+ ```text
30
+ Install the Rive CLI from rive.app/cli. Build an interactive hero for my website as a Rive file and add it to the page with the Rive web runtime.
31
+ ```
32
+
33
+ Your agent installs the [Rive CLI](https://rive.app/agents), writes the scene, and opens a preview window that rebuilds every time it saves. Keep giving it notes, or open the same file in the [Rive Editor](https://editor.rive.app/) and shape it by hand. Trying it needs no account. Writing the `.riv` that ships on your site needs a free Rive account. Free exports play a short Rive splash screen; [paid plans](https://rive.app/pricing) export without it. See [Getting started with the Rive CLI](https://rive.app/docs/cli/getting-started).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rive-app/canvas-lite",
3
- "version": "2.49.3",
4
- "description": "A lite version of Rive's canvas based web api.",
3
+ "version": "2.50.0",
4
+ "description": "Rive web runtime, lite version, canvas renderer. Rive is an agent-native 2D and 3D engine for games, apps, and interactive UI.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
7
7
  "repository": {
@@ -10,7 +10,11 @@
10
10
  },
11
11
  "keywords": [
12
12
  "rive",
13
- "animation"
13
+ "animation",
14
+ "interactive",
15
+ "ui",
16
+ "game-engine",
17
+ "graphics"
14
18
  ],
15
19
  "author": "Rive",
16
20
  "contributors": [
package/rive.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as rc from "./rive_advanced.mjs";
2
- import { RuntimeLoader, type RuntimeCallback } from "./runtimeLoader";
2
+ import { RuntimeLoader, type RuntimeCallback, type ScriptFetchOptions } from "./runtimeLoader";
3
3
  import { SemanticTreeModel, AccessibilityOverlay, SemanticMode, type RiveSemanticsOptions } from "./semantics";
4
4
  import { ImageWrapper, AudioWrapper, FontWrapper, RiveFont as RiveFontClassUtil } from "./utils";
5
5
  export type AssetLoadCallback = (asset: rc.FileAsset, bytes: Uint8Array) => boolean;
@@ -97,7 +97,7 @@ export declare class Layout {
97
97
  runtimeFit(rive: rc.RiveCanvas): rc.Fit;
98
98
  runtimeAlignment(rive: rc.RiveCanvas): rc.Alignment;
99
99
  }
100
- export { RuntimeLoader, type RuntimeCallback };
100
+ export { RuntimeLoader, type RuntimeCallback, type ScriptFetchOptions };
101
101
  /**
102
102
  * @deprecated State machine inputs are deprecated and will be removed in a
103
103
  * future major version: please use data binding properties instead. See
@@ -837,7 +837,7 @@ export declare class Rive {
837
837
  private ensureKeyboardInteractions;
838
838
  /** Runs inside touchend/mouseup so focusing the proxy raises the mobile keyboard. */
839
839
  private summonKeyboardForGesture;
840
- /** expectsKeyboardInput, and (with semantics on) the focused node is a textField. */
840
+ /** expectsTextInput (not key listeners alone), and with semantics on a textField. */
841
841
  private wantsTextInputSession;
842
842
  private advanceAndDrainForPointer;
843
843
  private cleanupKeyboardInteractions;
package/rive.js CHANGED
@@ -198,6 +198,53 @@ function threadsRefusal() {
198
198
  }
199
199
  return null;
200
200
  }
201
+ var defaultScriptFetchRequestsPerMinute = 60;
202
+ // The runtime's ceiling for maxResponseBytes.
203
+ var maxScriptFetchResponseBytes = 64 * 1024 * 1024;
204
+ // A non-negative integer that fits in a uint32, else the fallback.
205
+ var uint32Option = function (value, fallback) {
206
+ return typeof value === "number" &&
207
+ Number.isInteger(value) &&
208
+ value >= 0 &&
209
+ value <= 0xffffffff
210
+ ? value
211
+ : fallback;
212
+ };
213
+ var hostPattern = /^(\*\.)?[a-z0-9-]+(\.[a-z0-9-]+)*$/;
214
+ // Warns about allowedHosts entries that never match, or match a whole
215
+ // top-level domain.
216
+ var checkAllowedHosts = function (hosts) {
217
+ for (var _i = 0, hosts_1 = hosts; _i < hosts_1.length; _i++) {
218
+ var entry = hosts_1[_i];
219
+ var host = String(entry).trim().toLowerCase();
220
+ if (host === "*") {
221
+ continue;
222
+ }
223
+ if (!hostPattern.test(host)) {
224
+ console.warn("[Rive] allowedHosts entry \"".concat(entry, "\" never matches. Use a host name ") +
225
+ "(\"api.example.com\"), \"*.example.com\" or \"*\".");
226
+ }
227
+ else if (host.startsWith("*.") && !host.includes(".", 2)) {
228
+ console.warn("[Rive] allowedHosts entry \"".concat(entry, "\" allows every host under a ") +
229
+ "top-level domain.");
230
+ }
231
+ }
232
+ };
233
+ // Warns about a proxy on this page's own origin, where the iframe's sandbox
234
+ // keeps nothing apart from the page.
235
+ var checkProxyUrl = function (proxyUrl) {
236
+ var origin;
237
+ try {
238
+ origin = new URL(proxyUrl, document.baseURI).origin;
239
+ }
240
+ catch (_a) {
241
+ return;
242
+ }
243
+ if (origin === location.origin) {
244
+ console.warn("[Rive] proxyUrl \"".concat(proxyUrl, "\" is on this page's origin, so the proxy ") +
245
+ "is not isolated from it. Host it on a separate domain.");
246
+ }
247
+ };
201
248
  // Runtime singleton; use getInstance to provide a callback that returns the
202
249
  // Rive runtime
203
250
  var RuntimeLoader = /** @class */ (function () {
@@ -227,6 +274,7 @@ var RuntimeLoader = /** @class */ (function () {
227
274
  if (RuntimeLoader.replayWorker) {
228
275
  (_a = rive.enableReplayWorker) === null || _a === void 0 ? void 0 : _a.call(rive);
229
276
  }
277
+ RuntimeLoader.applyScriptFetch();
230
278
  // Fire all the callbacks
231
279
  while (RuntimeLoader.callBackQueue.length > 0) {
232
280
  (_b = RuntimeLoader.callBackQueue.shift()) === null || _b === void 0 ? void 0 : _b(RuntimeLoader.runtime);
@@ -450,6 +498,90 @@ var RuntimeLoader = /** @class */ (function () {
450
498
  RuntimeLoader.getReplayWorker = function () {
451
499
  return RuntimeLoader.replayWorker;
452
500
  };
501
+ /**
502
+ * @experimental Lets scripts in Rive files call `fetch()`. Pass `true` or
503
+ * options to enable it for every file on the page, `false` to disable it.
504
+ * Only `@rive-app/webgl2-threads` running its threaded build has it;
505
+ * elsewhere this warns once and does nothing.
506
+ *
507
+ * Enabling it lets any script in any file this page loads send what it
508
+ * can read to the hosts it may reach. Limit them with `allowedHosts`.
509
+ * Scripts can't fetch this page's own host unless `allowedHosts` names it.
510
+ *
511
+ * Each call replaces the previous options, and any option left out goes
512
+ * back to its default (an omitted `allowedHosts` allows every host). To
513
+ * change one option, spread the current ones:
514
+ *
515
+ * ```ts
516
+ * RuntimeLoader.setScriptFetch({
517
+ * ...RuntimeLoader.getScriptFetch(),
518
+ * maxResponseBytes: 32 * 1024 * 1024,
519
+ * });
520
+ * ```
521
+ *
522
+ * Disabled by default.
523
+ */
524
+ RuntimeLoader.setScriptFetch = function (options) {
525
+ var _a;
526
+ if (options === true) {
527
+ RuntimeLoader.scriptFetch = {};
528
+ }
529
+ else if (options && typeof options === "object") {
530
+ var hosts = options.allowedHosts;
531
+ // Anything else, such as a single host as a string, allows no host
532
+ // rather than falling back to every host.
533
+ if (hosts != null && !Array.isArray(hosts)) {
534
+ console.warn("[Rive] allowedHosts must be an array of host names. Scripts may " +
535
+ "fetch from no host.");
536
+ hosts = [];
537
+ }
538
+ if (hosts) {
539
+ checkAllowedHosts(hosts);
540
+ }
541
+ if (options.proxyUrl) {
542
+ checkProxyUrl(options.proxyUrl);
543
+ }
544
+ if (((_a = options.maxResponseBytes) !== null && _a !== void 0 ? _a : 0) > maxScriptFetchResponseBytes) {
545
+ console.warn("[Rive] maxResponseBytes is capped at 64 MiB " +
546
+ "(".concat(maxScriptFetchResponseBytes, " bytes)."));
547
+ }
548
+ RuntimeLoader.scriptFetch = __assign(__assign({}, options), { allowedHosts: hosts === null || hosts === void 0 ? void 0 : hosts.slice() });
549
+ }
550
+ else {
551
+ RuntimeLoader.scriptFetch = null;
552
+ }
553
+ RuntimeLoader.applyScriptFetch();
554
+ };
555
+ // Gets the script fetch options (null means disabled)
556
+ RuntimeLoader.getScriptFetch = function () {
557
+ var _a;
558
+ var options = RuntimeLoader.scriptFetch;
559
+ return options
560
+ ? __assign(__assign({}, options), { allowedHosts: (_a = options.allowedHosts) === null || _a === void 0 ? void 0 : _a.slice() }) : null;
561
+ };
562
+ RuntimeLoader.applyScriptFetch = function () {
563
+ var _a;
564
+ var runtime = RuntimeLoader.runtime;
565
+ if (!runtime) {
566
+ return;
567
+ }
568
+ var options = RuntimeLoader.scriptFetch;
569
+ if (!runtime.configureScriptFetch) {
570
+ if (options && !RuntimeLoader.warnedNoScriptFetch) {
571
+ RuntimeLoader.warnedNoScriptFetch = true;
572
+ console.warn("[Rive] Script fetch is only available in @rive-app/webgl2-threads " +
573
+ "on a cross origin isolated page. Scripts' fetch() stays disabled.");
574
+ }
575
+ return;
576
+ }
577
+ runtime.configureScriptFetch(options && {
578
+ proxyUrl: options.proxyUrl || null,
579
+ allowedHosts: (_a = options.allowedHosts) !== null && _a !== void 0 ? _a : null,
580
+ maxRequestsPerMinute: uint32Option(options.maxRequestsPerMinute, defaultScriptFetchRequestsPerMinute),
581
+ // 0 keeps the runtime's default.
582
+ maxResponseBytes: uint32Option(options.maxResponseBytes, 0),
583
+ });
584
+ };
453
585
  // Manually sets the wasm binary or clears it with null
454
586
  RuntimeLoader.setWasmBinary = function (value) {
455
587
  if ((value instanceof ArrayBuffer) || value === null) {
@@ -486,6 +618,9 @@ var RuntimeLoader = /** @class */ (function () {
486
618
  RuntimeLoader.replayWorker = true;
487
619
  RuntimeLoader.replayCapsArrived = false;
488
620
  RuntimeLoader.replayCapsTimeoutMs = 2000;
621
+ // Script fetch options, or null while disabled.
622
+ RuntimeLoader.scriptFetch = null;
623
+ RuntimeLoader.warnedNoScriptFetch = false;
489
624
  // Error callbacks enqueued from .getInstance()
490
625
  RuntimeLoader.errorCallbackQueue = [];
491
626
  /**
@@ -508,54 +643,54 @@ __webpack_require__.r(__webpack_exports__);
508
643
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
509
644
  /* harmony export */ });
510
645
  var Rive=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;var l=moduleArg,aa=!!globalThis.window,ba=!!globalThis.WorkerGlobalScope;
511
- function da(){function b(h){const g=d;c=a=0;d=new Map;g.forEach(n=>{try{n(h)}catch(r){console.error(r)}});this.$a();f&&f.Db()}let a=0,c=0,d=new Map,f=null,m=null;this.requestAnimationFrame=function(h){a||=requestAnimationFrame(b.bind(this));const g=++c;d.set(g,h);return g};this.cancelAnimationFrame=function(h){d.delete(h);a&&0==d.size&&(cancelAnimationFrame(a),a=0)};this.Bb=function(h){m&&(document.body.remove(m),m=null);h||(m=document.createElement("div"),m.style.backgroundColor="black",m.style.position=
512
- "fixed",m.style.right=0,m.style.top=0,m.style.color="white",m.style.padding="4px",m.innerHTML="RIVE FPS",h=function(g){m.innerHTML="RIVE FPS "+g.toFixed(1)},document.body.appendChild(m));f=new function(){let g=0,n=0;this.Db=function(){var r=performance.now();n?(++g,r-=n,1E3<r&&(h(1E3*g/r),g=n=0)):(n=r,g=0)}}};this.yb=function(){m&&(document.body.remove(m),m=null);f=null};this.$a=function(){}}
646
+ function da(){function b(h){const g=d;c=a=0;d=new Map;g.forEach(n=>{try{n(h)}catch(r){console.error(r)}});this.ab();f&&f.Db()}let a=0,c=0,d=new Map,f=null,m=null;this.requestAnimationFrame=function(h){a||=requestAnimationFrame(b.bind(this));const g=++c;d.set(g,h);return g};this.cancelAnimationFrame=function(h){d.delete(h);a&&0==d.size&&(cancelAnimationFrame(a),a=0)};this.Bb=function(h){m&&(document.body.remove(m),m=null);h||(m=document.createElement("div"),m.style.backgroundColor="black",m.style.position=
647
+ "fixed",m.style.right=0,m.style.top=0,m.style.color="white",m.style.padding="4px",m.innerHTML="RIVE FPS",h=function(g){m.innerHTML="RIVE FPS "+g.toFixed(1)},document.body.appendChild(m));f=new function(){let g=0,n=0;this.Db=function(){var r=performance.now();n?(++g,r-=n,1E3<r&&(h(1E3*g/r),g=n=0)):(n=r,g=0)}}};this.yb=function(){m&&(document.body.remove(m),m=null);f=null};this.ab=function(){}}
513
648
  function ea(b){console.assert(!0);const a=new Map;let c=-Infinity;this.push=function(d){d=d+((1<<b)-1)>>b;a.has(d)&&clearTimeout(a.get(d));a.set(d,setTimeout(function(){a.delete(d);0==a.length?c=-Infinity:d==c&&(c=Math.max(...a.keys()),console.assert(c<d))},1E3));c=Math.max(d,c);return c<<b}}function ha(b){return function(){b();const a=l.riveScripting;if(a)for(const c of a.frameBoundary())console.warn(c)}}const ia=l.onRuntimeInitialized;
514
649
  l.onRuntimeInitialized=function(){ia&&ia();l.startFileScripts=function(h){const g=l.riveScripting;return h&&g&&h.startScripts?g.prepare().then(function(){h.startScripts();return h}):Promise.resolve(h)};let b=l.decodeAudio;l.decodeAudio=function(h,g,n=null){h=b(h,n??null);g(h)};let a=l.decodeFont;l.decodeFont=function(h,g,n=null){h=a(h,n??null);g(h)};const c=l.FileAsset.prototype.decode;l.FileAsset.prototype.decode=function(h,g){return c.call(this,h,g??null)};let d=l.setFallbackFontCb;l.setFallbackFontCallback=
515
650
  "function"===typeof d?function(h){d(h)}:function(){console.warn("Module.setFallbackFontCallback called, but text support is not enabled in this build.")};const f=l.FileAssetLoader;l.ptrToAsset=h=>{let g=l.ptrToFileAsset(h);return g.isImage?l.ptrToImageAsset(h):g.isFont?l.ptrToFontAsset(h):g.isAudio?l.ptrToAudioAsset(h):g};l.CustomFileAssetLoader=f.extend("CustomFileAssetLoader",{__construct:function({loadContents:h}){this.__parent.__construct.call(this);this.nb=h},loadContents:function(h,g){h=l.ptrToAsset(h);
516
651
  return this.nb(h,g)}});l.CDNFileAssetLoader=f.extend("CDNFileAssetLoader",{__construct:function(h){this.__parent.__construct.call(this);this.ob=h??null},loadContents:function(h){let g=l.ptrToAsset(h);h=g.cdnUuid;if(""===h)return!1;const n=this.ob??null;(function(r,A){var q=new XMLHttpRequest;q.responseType="arraybuffer";q.onreadystatechange=function(){4==q.readyState&&200==q.status&&A(q)};q.open("GET",r,!0);q.send(null)})(g.cdnBaseUrl+"/"+h,r=>{g.decode(new Uint8Array(r.response),n)});return!0}});
517
- l.FallbackFileAssetLoader=f.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this);this.Ya=[]},addLoader:function(h){this.Ya.push(h)},loadContents:function(h,g){for(let n of this.Ya)if(n.loadContents(h,g))return!0;return!1}});let m=l.computeAlignment;l.computeAlignment=function(h,g,n,r,A=1){return m.call(this,h,g,n,r,A)}};function la(){}const F=new Int32Array(5);
652
+ l.FallbackFileAssetLoader=f.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this);this.Za=[]},addLoader:function(h){this.Za.push(h)},loadContents:function(h,g){for(let n of this.Za)if(n.loadContents(h,g))return!0;return!1}});let m=l.computeAlignment;l.computeAlignment=function(h,g,n,r,A=1){return m.call(this,h,g,n,r,A)}};function la(){}const F=new Int32Array(5);
518
653
  function ma(b,a,c,d,f){b(a,c,F);b=Math.max(F[0],0);const m=Math.max(F[1],0);a=Math.min(F[2],Math.ceil(d*a));c=Math.min(F[3],Math.ceil(f*c));F[4]=b!==F[0]||m!==F[1]||a!==F[2]||c!==F[3]?1:0;F[0]=b;F[1]=m;F[2]=a;F[3]=c;return a>b&&c>m}function na(){const b=oa.Mb();return 0===b?0:b}
519
654
  function pa(b,a,c,d,f,m,h,g,n,r,A){var q=na(),w=q-1,p=w-6;if(!(0<p))return r(),la;let z=1,C=1;if(!ma(g,z,C,c,d))return r(),la;const G=F[2]-F[0],E=F[3]-F[1];if(G>w||E>w)if(z*=Math.min(1,p/G),C*=Math.min(1,p/E),!ma(g,z,C,c,d))return r(),la;c=F[0];d=F[1];w=F[2];p=F[3];g=0!==F[4];if(1>z||1>C)--c,--d,w+=1,p+=1;const H=w-c,L=p-d;b.i||(b.i=new l.DynamicRectanizer(q),b.i.reset(512,512));q=b.i.addRect(H+1,L+1);if(0>q&&(A(),q=b.i.addRect(H+1,L+1),0>q))return console.assert(!1,"draw does not fit in an empty atlas"),
520
- r(),la;const R=q&65535,I=q>>16;b.m.push({pb:[z*f[0],C*f[1],z*f[2],C*f[3],z*f[4]-c+R,C*f[5]-d+I],qb:R,rb:I,Vb:H,Xa:L,Za:g,N:n,Pb:()=>{r()}});const S=c/z,Y=d/C,ca=H/z,ra=L/C,sa=b.M;return function(){const Ea=sa.canvas();Ea&&(a.save(),a.resetTransform(),a.globalCompositeOperation=m,a.globalAlpha=h,a.drawImage(Ea,R,I,H,L,S,Y,ca,ra),a.restore())}}class qa{constructor(){this.M=new ua;this.i=null;this.m=[];this.na=new ea(8);this.$=new ea(8)}}
655
+ r(),la;const R=q&65535,I=q>>16;b.m.push({pb:[z*f[0],C*f[1],z*f[2],C*f[3],z*f[4]-c+R,C*f[5]-d+I],qb:R,rb:I,Vb:H,Ya:L,$a:g,N:n,Pb:()=>{r()}});const S=c/z,Y=d/C,ca=H/z,ra=L/C,sa=b.M;return function(){const Ea=sa.canvas();Ea&&(a.save(),a.resetTransform(),a.globalCompositeOperation=m,a.globalAlpha=h,a.drawImage(Ea,R,I,H,L,S,Y,ca,ra),a.restore())}}class qa{constructor(){this.M=new ua;this.i=null;this.m=[];this.na=new ea(8);this.$=new ea(8)}}
521
656
  const oa=new function(){function b(){if(!a){var q=document.createElement("canvas"),w={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let p;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(p=q.getContext("webgl",w),c=1,!p)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(p=q.getContext("webgl2",
522
657
  w))c=2;else if(p=q.getContext("webgl",w))c=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;p=new Proxy(p,{get(C,G){if(C.isContextLost()){if(n||(console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",G),n=!0),"function"===typeof C[G])return function(){}}else return"function"===typeof C[G]?function(...E){return C[G].apply(C,E)}:C[G]},set(C,G,E){if(C.isContextLost())n||(console.error("Cannot render the mesh because the GL Context was lost. Tried to set property "+
523
658
  G),n=!0);else return C[G]=E,!0}});d=Math.min(p.getParameter(p.MAX_RENDERBUFFER_SIZE),p.getParameter(p.MAX_TEXTURE_SIZE));function z(C,G,E){G=p.createShader(G);p.shaderSource(G,E);p.compileShader(G);E=p.getShaderInfoLog(G);if(0<(E||"").length)throw E;p.attachShader(C,G)}q=p.createProgram();z(q,p.VERTEX_SHADER,"attribute vec2 vertex;\n attribute vec2 uv;\n uniform vec4 mat;\n uniform vec2 translate;\n varying vec2 st;\n void main() {\n st = uv;\n gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n }");
524
659
  z(q,p.FRAGMENT_SHADER,"precision highp float;\n uniform sampler2D image;\n varying vec2 st;\n void main() {\n gl_FragColor = texture2D(image, st);\n }");p.bindAttribLocation(q,0,"vertex");p.bindAttribLocation(q,1,"uv");p.linkProgram(q);w=p.getProgramInfoLog(q);if(0<(w||"").trim().length)throw w;f=p.getUniformLocation(q,"mat");m=p.getUniformLocation(q,"translate");p.useProgram(q);p.bindBuffer(p.ARRAY_BUFFER,p.createBuffer());
525
660
  p.enableVertexAttribArray(0);p.enableVertexAttribArray(1);p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,p.createBuffer());p.uniform1i(p.getUniformLocation(q,"image"),0);p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);a=p}return!0}let a=null,c=0,d=0,f=null,m=null,h=0,g=0,n=!1;b();this.Mb=function(){b();return d};this.xb=function(q){a&&a.deleteTexture&&a.deleteTexture(q)};this.vb=function(q){if(!b())return null;const w=a.createTexture();if(!w)return null;a.bindTexture(a.TEXTURE_2D,w);a.texImage2D(a.TEXTURE_2D,
526
661
  0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,q);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);2==c?(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR_MIPMAP_LINEAR),a.generateMipmap(a.TEXTURE_2D)):a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);return w};const r=new ea(10),A=new ea(10);this.Ab=function(q,w,p){if(b()&&a.canvas){if(a.canvas.width!=q||a.canvas.height!=
527
- w)a.canvas.width=q,a.canvas.height=w;a.viewport(0,0,q,w);a.disable(a.SCISSOR_TEST);a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);var z=I=>I.N.image.Ca<<1|(I.Za?1:0);p.sort((I,S)=>z(S)-z(I));var C=0,G=0;for(var E of p)C+=E.N.pa.length,G+=E.N.indices.length;E=r.push(C);h!=E&&(a.bufferData(a.ARRAY_BUFFER,8*E,a.DYNAMIC_DRAW),h=E);E=0;for(var H of p)a.bufferSubData(a.ARRAY_BUFFER,E,H.N.pa),E+=4*H.N.pa.length;console.assert(E==4*C);for(var L of p)a.bufferSubData(a.ARRAY_BUFFER,E,L.N.hb),E+=4*L.N.hb.length;
528
- console.assert(E==8*C);E=A.push(G);g!=E&&(a.bufferData(a.ELEMENT_ARRAY_BUFFER,2*E,a.DYNAMIC_DRAW),g=E);H=0;for(var R of p)a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,H,R.N.indices),H+=2*R.N.indices.length;console.assert(H==2*G);R=0;L=!1;E=H=0;for(const I of p){p=I.N;p.image.Ca!=R&&(a.bindTexture(a.TEXTURE_2D,p.image.V||null),R=p.image.Ca);I.Za?(a.scissor(I.qb,w-I.rb-I.Xa,I.Vb,I.Xa),L||(a.enable(a.SCISSOR_TEST),L=!0)):L&&(a.disable(a.SCISSOR_TEST),L=!1);const S=I.pb,Y=2/q,ca=-2/w;a.uniform4f(f,S[0]*Y,S[1]*
529
- ca,S[2]*Y,S[3]*ca);a.uniform2f(m,S[4]*Y-1,S[5]*ca+1);a.vertexAttribPointer(0,2,a.FLOAT,!1,0,E);a.vertexAttribPointer(1,2,a.FLOAT,!1,0,E+4*C);a.drawElements(a.TRIANGLES,p.indices.length,a.UNSIGNED_SHORT,H);E+=4*p.pa.length;H+=2*p.indices.length}console.assert(E==4*C);console.assert(H==2*G)}};this.canvas=function(){return b()&&a.canvas}};class ua{constructor(){this.eb=!1}canvas(){return oa.canvas()||null}}const va=new qa;
662
+ w)a.canvas.width=q,a.canvas.height=w;a.viewport(0,0,q,w);a.disable(a.SCISSOR_TEST);a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);var z=I=>I.N.image.Ca<<1|(I.$a?1:0);p.sort((I,S)=>z(S)-z(I));var C=0,G=0;for(var E of p)C+=E.N.pa.length,G+=E.N.indices.length;E=r.push(C);h!=E&&(a.bufferData(a.ARRAY_BUFFER,8*E,a.DYNAMIC_DRAW),h=E);E=0;for(var H of p)a.bufferSubData(a.ARRAY_BUFFER,E,H.N.pa),E+=4*H.N.pa.length;console.assert(E==4*C);for(var L of p)a.bufferSubData(a.ARRAY_BUFFER,E,L.N.hb),E+=4*L.N.hb.length;
663
+ console.assert(E==8*C);E=A.push(G);g!=E&&(a.bufferData(a.ELEMENT_ARRAY_BUFFER,2*E,a.DYNAMIC_DRAW),g=E);H=0;for(var R of p)a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,H,R.N.indices),H+=2*R.N.indices.length;console.assert(H==2*G);R=0;L=!1;E=H=0;for(const I of p){p=I.N;p.image.Ca!=R&&(a.bindTexture(a.TEXTURE_2D,p.image.V||null),R=p.image.Ca);I.$a?(a.scissor(I.qb,w-I.rb-I.Ya,I.Vb,I.Ya),L||(a.enable(a.SCISSOR_TEST),L=!0)):L&&(a.disable(a.SCISSOR_TEST),L=!1);const S=I.pb,Y=2/q,ca=-2/w;a.uniform4f(f,S[0]*Y,S[1]*
664
+ ca,S[2]*Y,S[3]*ca);a.uniform2f(m,S[4]*Y-1,S[5]*ca+1);a.vertexAttribPointer(0,2,a.FLOAT,!1,0,E);a.vertexAttribPointer(1,2,a.FLOAT,!1,0,E+4*C);a.drawElements(a.TRIANGLES,p.indices.length,a.UNSIGNED_SHORT,H);E+=4*p.pa.length;H+=2*p.indices.length}console.assert(E==4*C);console.assert(H==2*G)}};this.canvas=function(){return b()&&a.canvas}};class ua{constructor(){this.La=!1}canvas(){return oa.canvas()||null}}const va=new qa;
530
665
  function wa(b,a,c,d,f,m){const h=new DOMMatrix;h.a=b;h.b=a;h.c=c;h.d=d;h.e=f;h.f=m;return h}const xa="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),ya=l.onRuntimeInitialized;
531
666
  l.onRuntimeInitialized=function(){function b(e){switch(e){case z.srcOver:return"source-over";case z.additive:return"lighter";case z.screen:return"screen";case z.overlay:return"overlay";case z.darken:return"darken";case z.lighten:return"lighten";case z.colorDodge:return"color-dodge";case z.colorBurn:return"color-burn";case z.hardLight:return"hard-light";case z.softLight:return"soft-light";case z.difference:return"difference";case z.exclusion:return"exclusion";case z.multiply:return"multiply";case z.hue:return"hue";
532
- case z.saturation:return"saturation";case z.color:return"color";case z.luminosity:return"luminosity"}}function a(e){return"rgba("+((16711680&e)>>>16)+","+((65280&e)>>>8)+","+((255&e)>>>0)+","+((4278190080&e)>>>24)/255+")"}function c(e,k,t,u,v){return{fb:e,gb:k,Sa:t,Ta:u,type:v,Ka:[],T:null}}function d(e,k,t,u){if(k.Y===H&&!(0<k.Z))return null;t=1===t;return{Ha:e.La(t?k.xa:null),gradientTransform:t?k.ca:null,Ub:t?k.Z*k.Ba:k.Z,fillRule:e.ha===L?"evenodd":"nonzero",opacity:u,style:k.Y,color:k.sa,Wa:k.I,
667
+ case z.saturation:return"saturation";case z.color:return"color";case z.luminosity:return"luminosity"}}function a(e){return"rgba("+((16711680&e)>>>16)+","+((65280&e)>>>8)+","+((255&e)>>>0)+","+((4278190080&e)>>>24)/255+")"}function c(e,k,t,u,v){return{fb:e,gb:k,Ta:t,Ua:u,type:v,Ka:[],T:null}}function d(e,k,t,u){if(k.Y===H&&!(0<k.Z))return null;t=1===t;return{Ha:e.Ma(t?k.xa:null),gradientTransform:t?k.ca:null,Ub:t?k.Z*k.Ba:k.Z,fillRule:e.ha===L?"evenodd":"nonzero",opacity:u,style:k.Y,color:k.sa,Xa:k.I,
533
668
  tb:k.ra,join:k.ya,sb:k.qa}}function f(e,k){return k.Y!==H||0<k.Z?{path:e.kb(e.ha),Ga:k.lb()}:null}function m(){if(0!==I.m.length){var e=na();if(0!==e){var k=Math.min(I.na.push(I.i.drawWidth()),e);e=Math.min(I.$.push(I.i.drawHeight()),e);oa.Ab(k,e,I.m)}}for(const t of ta){for(const u of t.G)u();t.G=[]}ta.clear();for(const t of I.m)t.Pb();I.m=[];I.i&&I.i.reset(512,512)}ya&&ya();var h=l.RenderPaintStyle,g=l.FillRule;const n=l.RenderPath,r=l.RenderPaint,A=l.Renderer,q=l.StrokeCap,w=l.StrokeJoin,p=l.StrokePosition,
534
- z=l.BlendMode,C=l.ImageFilter,G=l.ImageWrap,E=h.fill,H=h.stroke,L=g.evenOdd,R=g.nonZero,I=va,S=I.M;let Y=1;var ca=l.RenderImage.extend("CanvasRenderImage",{__construct:function({ea:e,oa:k}={}){this.__parent.__construct.call(this);this.Ca=Y;Y=Y+1&2147483647||1;this.ea=e;this.oa=k;this.V=this.Pa=this.ia=this.wa=null},__destruct:function(){this.V&&(oa.xb(this.V),this.V=null);this.ia&&URL.revokeObjectURL(this.ia);this.__parent.__destruct.call(this)},decode:function(e){var k=this;k.oa&&k.oa(k);var t=new Image;
669
+ z=l.BlendMode,C=l.ImageFilter,G=l.ImageWrap,E=h.fill,H=h.stroke,L=g.evenOdd,R=g.nonZero,I=va,S=I.M;let Y=1;var ca=l.RenderImage.extend("CanvasRenderImage",{__construct:function({ea:e,oa:k}={}){this.__parent.__construct.call(this);this.Ca=Y;Y=Y+1&2147483647||1;this.ea=e;this.oa=k;this.V=this.Qa=this.ia=this.wa=null},__destruct:function(){this.V&&(oa.xb(this.V),this.V=null);this.ia&&URL.revokeObjectURL(this.ia);this.__parent.__destruct.call(this)},decode:function(e){var k=this;k.oa&&k.oa(k);var t=new Image;
535
670
  k.ia=URL.createObjectURL(new Blob([e],{type:"image/png"}));t.onload=function(){k.wa=t;k.V=oa.vb(t);k.size(t.width,t.height);k.ea&&k.ea(k)};t.src=k.ia}});class ra{constructor(e){this.i=e;this.path=new Path2D;this.m=null;this.ua=!1}M(){null!==this.m&&(this.path.lineTo(this.m.x,this.m.y),this.m=null)}moveTo(e,k){this.M();let t=e,u=k;null!==this.i&&(e=this.i.transformPoint({x:e,y:k}),t=e.x,u=e.y);this.path.moveTo(t,u);this.m={x:t,y:u}}lineTo(e,k){this.m=null;null!==this.i?(e=this.i.transformPoint({x:e,
536
- y:k}),this.path.lineTo(e.x,e.y)):this.path.lineTo(e,k)}wb(e,k,t,u,v,B){this.m=null;null!==this.i?(e=this.i.transformPoint({x:e,y:k}),t=this.i.transformPoint({x:t,y:u}),v=this.i.transformPoint({x:v,y:B}),this.path.bezierCurveTo(e.x,e.y,t.x,t.y,v.x,v.y)):this.path.bezierCurveTo(e,k,t,u,v,B)}close(){this.m=null;this.path.closePath()}addPath(e,k,t,u,v,B,D){this.M();const y=new ra(null);for(const x of e)x(y);y.Va();e=wa(k,t,u,v,B,D);null!==this.i&&(e=this.i.multiply(e));this.path.addPath(y.path,e)}Va(){null===
537
- this.m||this.ua||(this.M(),this.ua=!0)}dispose(){}}class sa{constructor(e){this.Lb=e;this.$=this.M=0;this.m=null;this.i=e(null)}clear(){this.na(null)}Da(e,k){for(((null===k?null!==this.m:null===this.m||this.m.a!==k.a||this.m.b!==k.b||this.m.c!==k.c||this.m.d!==k.d||this.m.e!==k.e||this.m.f!==k.f)||this.$<e.length&&(0<this.M||this.i.ua))&&this.na(k);this.$<e.length;)e[this.$++](this.i);this.i.Va();this.M++;return this.i.path}Ja(e){null!==this.i&&e===this.i.path&&this.M--}dispose(){this.i.dispose();
671
+ y:k}),this.path.lineTo(e.x,e.y)):this.path.lineTo(e,k)}wb(e,k,t,u,v,B){this.m=null;null!==this.i?(e=this.i.transformPoint({x:e,y:k}),t=this.i.transformPoint({x:t,y:u}),v=this.i.transformPoint({x:v,y:B}),this.path.bezierCurveTo(e.x,e.y,t.x,t.y,v.x,v.y)):this.path.bezierCurveTo(e,k,t,u,v,B)}close(){this.m=null;this.path.closePath()}addPath(e,k,t,u,v,B,D){this.M();const y=new ra(null);for(const x of e)x(y);y.Wa();e=wa(k,t,u,v,B,D);null!==this.i&&(e=this.i.multiply(e));this.path.addPath(y.path,e)}Wa(){null===
672
+ this.m||this.ua||(this.M(),this.ua=!0)}dispose(){}}class sa{constructor(e){this.Lb=e;this.$=this.M=0;this.m=null;this.i=e(null)}clear(){this.na(null)}Da(e,k){for(((null===k?null!==this.m:null===this.m||this.m.a!==k.a||this.m.b!==k.b||this.m.c!==k.c||this.m.d!==k.d||this.m.e!==k.e||this.m.f!==k.f)||this.$<e.length&&(0<this.M||this.i.ua))&&this.na(k);this.$<e.length;)e[this.$++](this.i);this.i.Wa();this.M++;return this.i.path}Ja(e){null!==this.i&&e===this.i.path&&this.M--}dispose(){this.i.dispose();
538
673
  this.i=null}na(e){this.i.dispose();this.$=this.M=0;this.m=e;this.i=this.Lb(e)}}var Ea=n.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this);this.W=[];this.ja=new sa(e=>new ra(e));this.ka=new sa(e=>new ra(e));this.X=new Map;this.ha=R;this.va=!1},__destruct:function(){this.ja.dispose();this.ka.dispose();for(const e of this.X.values())e.dispose();this.X.clear();this.__parent.__destruct.call(this)},rewind:function(){this.W.length=0;this.ja.clear();this.ka.clear();for(const e of this.X.values())e.clear();
539
- this.va=!1},addPath:function(e,k,t,u,v,B,D){const y=e.W.slice();this.ba(x=>x.addPath(y,k,t,u,v,B,D))},fillRule:function(e){this.ha=e},moveTo:function(e,k){this.va=!0;this.ba(t=>t.moveTo(e,k))},lineTo:function(e,k){this.Oa();this.ba(t=>t.lineTo(e,k))},cubicTo:function(e,k,t,u,v,B){this.Oa();this.ba(D=>D.wb(e,k,t,u,v,B))},close:function(){this.ba(e=>e.close())},Oa:function(){this.va||this.moveTo(0,0)},ba:function(e){this.W.push(e)},La:function(e){e=null===e?this.ja.Da(this.W,null):this.ka.Da(this.W,
674
+ this.va=!1},addPath:function(e,k,t,u,v,B,D){const y=e.W.slice();this.ba(x=>x.addPath(y,k,t,u,v,B,D))},fillRule:function(e){this.ha=e},moveTo:function(e,k){this.va=!0;this.ba(t=>t.moveTo(e,k))},lineTo:function(e,k){this.Pa();this.ba(t=>t.lineTo(e,k))},cubicTo:function(e,k,t,u,v,B){this.Pa();this.ba(D=>D.wb(e,k,t,u,v,B))},close:function(){this.ba(e=>e.close())},Pa:function(){this.va||this.moveTo(0,0)},ba:function(e){this.W.push(e)},Ma:function(e){e=null===e?this.ja.Da(this.W,null):this.ka.Da(this.W,
540
675
  e);e.ref&&e.ref();return e},kb:function(e){var k=this.X.get(e);void 0===k&&(k=new sa(()=>S.Yb(e)),this.X.set(e,k));k=k.Da(this.W,null);k.ref&&k.ref();return k},za:function(e){this.ja.Ja(e);this.ka.Ja(e);for(const k of this.X.values())k.Ja(e);e.unref&&e.unref()}});const bc=c(0,0,0,0,0);var dc=r.extend("CanvasRenderPaint",{__construct:function(){this.__parent.__construct.call(this);this.Y=E;this.sa=4278190080;this.Z=1;this.ya=w.miter;this.ra=q.butt;this.Aa=p.center;this.ta=0;this.qa=b(z.srcOver);this.xa=
541
- this.A=this.ca=this.I=null;this.Ba=1;this.B=0;this.S=null;this.Qa=-1},__destruct:function(){null!==this.S&&(l.unrefWebGL2Paint(this.S),this.S=null);this.__parent.__destruct.call(this)},color:function(e){this.sa=e;this.I=null;this.B++},thickness:function(e){this.Z=Math.abs(e);this.B++},join:function(e){this.ya=e;this.B++},cap:function(e){this.ra=e;this.B++},strokePosition:function(e){this.Aa=e;this.B++},feather:function(e){this.ta=Math.abs(e);this.B++},style:function(e){this.Y=e;this.B++},blendMode:function(e){this.qa=
542
- b(e);this.B++},clearGradient:function(){this.I=null;this.B++},linearGradient:function(e,k,t,u){this.I=c(e,k,t,u,0);this.B++},radialGradient:function(e,k,t,u){this.I=c(e,k,t,u,1);this.B++},angularGradient:function(){this.I=c(0,0,0,0,2);this.B++},addStop:function(e,k){this.I.Ka.push({color:e,stop:k});this.I.T=null;this.B++},modulatedImage:function(e,k,t,u,v,B,D,y,x,J){const K=e.wa;K?this.A={image:K,jb:e.Pa,filter:k,Wb:t,Xb:u,transform:wa(v,B,D,y,x,J)}:this.A=null},completeGradient:function(){},_setGradientTransform:function(e,
543
- k,t,u,v,B,D,y,x,J,K,P,T){1===e&&0===k&&0===t&&1===u&&0===v&&0===B?this.xa=this.ca=null:(this.ca=wa(e,k,t,u,v,B),this.xa=wa(D,y,x,J,K,P));this.Ba=T;this.B++},lb:function(){if(this.Qa!==this.B){null!==this.S&&l.unrefWebGL2Paint(this.S);const k=null!==this.I?this.I:bc;let t=null,u=null;if(null!==this.I){var e=k.Ka;t=new Uint32Array(e.length);u=new Float32Array(e.length);for(let ja=0,cc=e.length;ja<cc;ja++)t[ja]=e[ja].color,u[ja]=e[ja].stop}e=null;let v=C.bilinear,B=G.clamp,D=G.clamp,y=1,x=0,J=0,K=1,
544
- P=0,T=0;null!==this.A&&(e=this.A.jb,v=this.A.filter,B=this.A.Wb,D=this.A.Xb,y=this.A.transform.a,x=this.A.transform.b,J=this.A.transform.c,K=this.A.transform.d,P=this.A.transform.e,T=this.A.transform.f);let Z=1,ka=0,Ga=0,Va=1,sb=0,tb=0;const fa=this.ca;null!==fa&&(Z=fa.a,ka=fa.b,Ga=fa.c,Va=fa.d,sb=fa.e,tb=fa.f);this.S=l.makeWebGL2Paint(this.Y,this.sa,this.Z,this.ya,this.ra,this.Aa,this.ta,t,u,k.type,k.fb,k.gb,k.Sa,k.Ta,Z,ka,Ga,Va,sb,tb,e,v,B,D,y,x,J,K,P,T);this.Qa=this.B}l.refWebGL2Paint(this.S);
545
- return this.S}});const ta=new Set,ub=Object.prototype.hasOwnProperty;var ec=l.CanvasRenderer=A.extend("Renderer",{__construct:function(e){this.__parent.__construct.call(this);this.L=[1,0,0,1,0,0];this.F=[1];this.s=e.getContext("2d");this.Na=e;this.G=[]},save:function(){this.L.push(...this.L.slice(this.L.length-6));this.F.push(this.F[this.F.length-1]);this.G.push(this.s.save.bind(this.s))},restore:function(){const e=this.L.length-6;if(6>e)throw"restore() called without matching save().";this.L.splice(e);
676
+ this.A=this.ca=this.I=null;this.Ba=1;this.B=0;this.S=null;this.Ra=-1},__destruct:function(){null!==this.S&&(l.unrefWebGL2Paint(this.S),this.S=null);this.__parent.__destruct.call(this)},color:function(e){this.sa=e;this.I=null;this.B++},thickness:function(e){this.Z=Math.abs(e);this.B++},join:function(e){this.ya=e;this.B++},cap:function(e){this.ra=e;this.B++},strokePosition:function(e){this.Aa=e;this.B++},feather:function(e){this.ta=Math.abs(e);this.B++},style:function(e){this.Y=e;this.B++},blendMode:function(e){this.qa=
677
+ b(e);this.B++},clearGradient:function(){this.I=null;this.B++},linearGradient:function(e,k,t,u){this.I=c(e,k,t,u,0);this.B++},radialGradient:function(e,k,t,u){this.I=c(e,k,t,u,1);this.B++},angularGradient:function(){this.I=c(0,0,0,0,2);this.B++},addStop:function(e,k){this.I.Ka.push({color:e,stop:k});this.I.T=null;this.B++},modulatedImage:function(e,k,t,u,v,B,D,y,x,J){const K=e.wa;K?this.A={image:K,jb:e.Qa,filter:k,Wb:t,Xb:u,transform:wa(v,B,D,y,x,J)}:this.A=null},completeGradient:function(){},_setGradientTransform:function(e,
678
+ k,t,u,v,B,D,y,x,J,K,P,T){1===e&&0===k&&0===t&&1===u&&0===v&&0===B?this.xa=this.ca=null:(this.ca=wa(e,k,t,u,v,B),this.xa=wa(D,y,x,J,K,P));this.Ba=T;this.B++},lb:function(){if(this.Ra!==this.B){null!==this.S&&l.unrefWebGL2Paint(this.S);const k=null!==this.I?this.I:bc;let t=null,u=null;if(null!==this.I){var e=k.Ka;t=new Uint32Array(e.length);u=new Float32Array(e.length);for(let ja=0,cc=e.length;ja<cc;ja++)t[ja]=e[ja].color,u[ja]=e[ja].stop}e=null;let v=C.bilinear,B=G.clamp,D=G.clamp,y=1,x=0,J=0,K=1,
679
+ P=0,T=0;null!==this.A&&(e=this.A.jb,v=this.A.filter,B=this.A.Wb,D=this.A.Xb,y=this.A.transform.a,x=this.A.transform.b,J=this.A.transform.c,K=this.A.transform.d,P=this.A.transform.e,T=this.A.transform.f);let Z=1,ka=0,Ga=0,Va=1,sb=0,tb=0;const fa=this.ca;null!==fa&&(Z=fa.a,ka=fa.b,Ga=fa.c,Va=fa.d,sb=fa.e,tb=fa.f);this.S=l.makeWebGL2Paint(this.Y,this.sa,this.Z,this.ya,this.ra,this.Aa,this.ta,t,u,k.type,k.fb,k.gb,k.Ta,k.Ua,Z,ka,Ga,Va,sb,tb,e,v,B,D,y,x,J,K,P,T);this.Ra=this.B}l.refWebGL2Paint(this.S);
680
+ return this.S}});const ta=new Set,ub=Object.prototype.hasOwnProperty;var ec=l.CanvasRenderer=A.extend("Renderer",{__construct:function(e){this.__parent.__construct.call(this);this.L=[1,0,0,1,0,0];this.F=[1];this.s=e.getContext("2d");this.Oa=e;this.G=[]},save:function(){this.L.push(...this.L.slice(this.L.length-6));this.F.push(this.F[this.F.length-1]);this.G.push(this.s.save.bind(this.s))},restore:function(){const e=this.L.length-6;if(6>e)throw"restore() called without matching save().";this.L.splice(e);
546
681
  this.F.pop();this.G.push(this.s.restore.bind(this.s))},transform:function(e,k,t,u,v,B){const D=this.L,y=D.length-6;D.splice(y,6,D[y]*e+D[y+2]*k,D[y+1]*e+D[y+3]*k,D[y]*t+D[y+2]*u,D[y+1]*t+D[y+3]*u,D[y]*v+D[y+2]*B+D[y+4],D[y+1]*v+D[y+3]*B+D[y+5]);this.G.push(this.s.transform.bind(this.s,e,k,t,u,v,B))},rotate:function(e){const k=Math.sin(e);e=Math.cos(e);this.transform(e,k,-k,e,0,0)},modulateOpacity:function(e){this.F[this.F.length-1]*=e},_drawPath:function(e,k){const t=Math.max(0,this.F[this.F.length-
547
- 1]),u=k.A||k.Aa!==p.center?2:0!==k.ta?S.eb?2:0:null===k.I||null===k.ca?0:k.Y!==H||0<k.Ba?1:S.eb?2:0;if(2===u)(null===k.A||k.A.jb)&&this.mb(e,k,t);else{var v=d(e,k,u,t);null!==v&&this.G.push(()=>{var B=this.s;const D=B.globalCompositeOperation,y=B.globalAlpha;B.globalCompositeOperation=v.sb;B.globalAlpha=v.opacity;if(null!==v.Wa){var x=v.Wa;if(null===x.T){var J=x.fb;const T=x.gb;var K=x.Sa,P=x.Ta;0==x.type?x.T=B.createLinearGradient(J,T,K,P):1==x.type?(K-=J,P-=T,x.T=B.createRadialGradient(J,T,0,J,
548
- T,Math.sqrt(K*K+P*P))):x.T=B.createConicGradient(0,0,0);J=x.Ka;for(let Z=0,ka=J.length;Z<ka;Z++)x.T.addColorStop(J[Z].stop,a(J[Z].color))}x=x.T}else x=a(v.color);null!==v.gradientTransform&&(B.save(),B.transform(v.gradientTransform.a,v.gradientTransform.b,v.gradientTransform.c,v.gradientTransform.d,v.gradientTransform.e,v.gradientTransform.f));switch(v.style){case H:B.strokeStyle=x;B.lineWidth=v.Ub;a:{switch(v.tb){case q.butt:x="butt";break a;case q.round:x="round";break a;case q.square:x="square";
682
+ 1]),u=k.A||k.Aa!==p.center&&S.La?2:0!==k.ta?S.La?2:0:null===k.I||null===k.ca?0:k.Y!==H||0<k.Ba?1:S.La?2:0;if(2===u)(null===k.A||k.A.jb)&&this.mb(e,k,t);else{var v=d(e,k,u,t);null!==v&&this.G.push(()=>{var B=this.s;const D=B.globalCompositeOperation,y=B.globalAlpha;B.globalCompositeOperation=v.sb;B.globalAlpha=v.opacity;if(null!==v.Xa){var x=v.Xa;if(null===x.T){var J=x.fb;const T=x.gb;var K=x.Ta,P=x.Ua;0==x.type?x.T=B.createLinearGradient(J,T,K,P):1==x.type?(K-=J,P-=T,x.T=B.createRadialGradient(J,
683
+ T,0,J,T,Math.sqrt(K*K+P*P))):x.T=B.createConicGradient(0,0,0);J=x.Ka;for(let Z=0,ka=J.length;Z<ka;Z++)x.T.addColorStop(J[Z].stop,a(J[Z].color))}x=x.T}else x=a(v.color);null!==v.gradientTransform&&(B.save(),B.transform(v.gradientTransform.a,v.gradientTransform.b,v.gradientTransform.c,v.gradientTransform.d,v.gradientTransform.e,v.gradientTransform.f));switch(v.style){case H:B.strokeStyle=x;B.lineWidth=v.Ub;a:{switch(v.tb){case q.butt:x="butt";break a;case q.round:x="round";break a;case q.square:x="square";
549
684
  break a}x=void 0}B.lineCap=x;a:{switch(v.join){case w.miter:x="miter";break a;case w.round:x="round";break a;case w.bevel:x="bevel";break a}x=void 0}B.lineJoin=x;B.miterLimit=4;B.stroke(v.Ha);break;case E:B.fillStyle=x,B.fill(v.Ha,v.fillRule)}null!==v.gradientTransform&&B.restore();B.globalCompositeOperation=D;B.globalAlpha=y;e.za(v.Ha)})}},mb:function(e,k,t){const u=f(e,k);if(null!==u){var v=this.L.slice(this.L.length-6);k=pa(I,this.s,this.s.canvas.width,this.s.canvas.height,v,k.qa,t,(B,D,y)=>l.webGL2PathPixelBounds(u.path,
550
685
  u.Ga,B*v[0],D*v[1],B*v[2],D*v[3],B*v[4],D*v[5],y),B=>B.drawPath(u.path,u.Ga),()=>{e.za(u.path);l.unrefWebGL2Paint(u.Ga)},m);ta.add(this);this.G.push(k)}},_drawRiveImage:function(e,k,t){var u=e.wa;if(u){var v=this.s,B=b(k),D=Math.max(0,t*this.F[this.F.length-1]);this.G.push(function(){v.globalCompositeOperation=B;v.globalAlpha=D;v.drawImage(u,0,0);v.globalAlpha=1})}},_getMatrix:function(e){const k=this.L,t=k.length-6;for(let u=0;6>u;++u)e[u]=k[t+u]},_drawImageMesh:function(e,k,t,u,v,B,D,y){const x=
551
- e.Pa;x?this.Ma(t,u,v,B,D,y,J=>l.drawWebGL2PendingMesh(J,k,x),()=>k.unref()):k.unref()},_drawImageMeshFromHeap:function(e,k,t,u,v,B,D,y,x,J,K,P,T){if(e.V){try{var Z=l.HEAPF32.slice(u>>2,(u>>2)+v);var ka=l.HEAPF32.slice(B>>2,(B>>2)+D);var Ga=l.HEAPU16.slice(y>>1,(y>>1)+x)}catch(Va){console.error("[Rive] _drawImageMesh: failed to read mesh data from WASM heap. Mesh skipped for this frame.");return}this.Ma(k,t,J,K,P,T,{image:e,pa:Z,hb:ka,indices:Ga},()=>{})}},Ma:function(e,k,t,u,v,B,D,y){e=pa(I,this.s,
552
- this.s.canvas.width,this.s.canvas.height,this.L.slice(this.L.length-6),b(e),Math.max(0,k*this.F[this.F.length-1]),(x,J,K)=>{K[0]=Math.floor(t*x);K[1]=Math.floor(u*J);K[2]=Math.ceil(v*x);K[3]=Math.ceil(B*J)},D,y,m);ta.add(this);this.G.push(e)},_clipPath:function(e){const k=e.ha===L?"evenodd":"nonzero",t=e.La(null);this.G.push(()=>{this.s.clip(t,k);e.za(t)})},beginFrame:function(e=!0){ta.add(this);e&&this.G.push(this.s.clearRect.bind(this.s,0,0,this.Na.width,this.Na.height))},clear:function(){this.beginFrame(!0)},
686
+ e.Qa;x?this.Na(t,u,v,B,D,y,J=>l.drawWebGL2PendingMesh(J,k,x),()=>k.unref()):k.unref()},_drawImageMeshFromHeap:function(e,k,t,u,v,B,D,y,x,J,K,P,T){if(e.V){try{var Z=l.HEAPF32.slice(u>>2,(u>>2)+v);var ka=l.HEAPF32.slice(B>>2,(B>>2)+D);var Ga=l.HEAPU16.slice(y>>1,(y>>1)+x)}catch(Va){console.error("[Rive] _drawImageMesh: failed to read mesh data from WASM heap. Mesh skipped for this frame.");return}this.Na(k,t,J,K,P,T,{image:e,pa:Z,hb:ka,indices:Ga},()=>{})}},Na:function(e,k,t,u,v,B,D,y){e=pa(I,this.s,
687
+ this.s.canvas.width,this.s.canvas.height,this.L.slice(this.L.length-6),b(e),Math.max(0,k*this.F[this.F.length-1]),(x,J,K)=>{K[0]=Math.floor(t*x);K[1]=Math.floor(u*J);K[2]=Math.ceil(v*x);K[3]=Math.ceil(B*J)},D,y,m);ta.add(this);this.G.push(e)},_clipPath:function(e){const k=e.ha===L?"evenodd":"nonzero",t=e.Ma(null);this.G.push(()=>{this.s.clip(t,k);e.za(t)})},beginFrame:function(e=!0){ta.add(this);e&&this.G.push(this.s.clearRect.bind(this.s,0,0,this.Oa.width,this.Oa.height))},clear:function(){this.beginFrame(!0)},
553
688
  flush:function(){},translate:function(e,k){this.transform(1,0,0,1,e,k)}});l.makeRenderer=function(e){const k=new ec(e),t=k.s;let u=null,v=null;const B={attachSession:function(y){if(y&&u===y)return!0;if(!y||u||"function"!==typeof l.c2dDeferredClaim||"function"!==typeof l.c2dDeferredRenderer||!l.c2dDeferredClaim(y))return!1;const x=l.c2dDeferredRenderer(y);if(!x)return!1;u=y;v=x;return!0},detachSession:function(){u&&l.c2dDeferredDetach(u);v=u=null},deferredActive:function(){return null!==v}},D={save:function(){l.c2dDeferredSave(u)},
554
689
  restore:function(){l.c2dDeferredRestore(u)},transform:function(y,x,J,K,P,T){l.c2dDeferredTransform(u,y,x,J,K,P,T)},translate:function(y,x){l.c2dDeferredTransform(u,1,0,0,1,y,x)},rotate:function(y){const x=Math.sin(y);y=Math.cos(y);l.c2dDeferredTransform(u,y,x,-x,y,0,0)},align:function(y,x,J,K,P){l.c2dDeferredAlign(u,y,x,J.minX,J.minY,J.maxX,J.maxY,K.minX,K.minY,K.maxX,K.maxY,void 0===P?1:P)},beginFrame:function(y=!0){k.beginFrame(y);l.c2dDeferredBeginFrame(u)},clear:function(){k.beginFrame(!0);l.c2dDeferredBeginFrame(u)},
555
690
  flush:function(){l.c2dDeferredReplay(u,k)}};return new Proxy(k,{get(y,x){if(ub.call(B,x))return B[x];if("_deferredRecorder"===x)return v;if(null!==v&&ub.call(D,x))return D[x];if("function"===typeof y[x])return function(...J){return y[x].apply(y,J)};if("function"===typeof t[x]){if(-1<xa.indexOf(x))throw Error("RiveException: Method call to '"+x+"()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");return function(...J){k.G.push(t[x].bind(t,
556
691
  ...J))}}return y[x]},set(y,x,J){if(x in t)return k.G.push(()=>{t[x]=J}),!0}})};l.decodeImage=function(e,k){(new ca({ea:k})).decode(e)};l.renderFactory={makeRenderPaint:function(){return new dc},makeRenderPath:function(){return new Ea},makeRenderImage:function(){let e=Wa;return new ca({oa:()=>{e.total++},ea:()=>{e.loaded++;if(e.loaded===e.total){const k=e.ready;k&&(k(),e.ready=null)}}})}};let fc=l.load,Wa=null;l.load=function(e,k,t=!0,u=null){const v=new l.FallbackFileAssetLoader;void 0!==k&&v.addLoader(k);
557
692
  t&&(k=new l.CDNFileAssetLoader(u),v.addLoader(k));return(new Promise(function(B){let D=null;Wa={total:0,loaded:0,ready:function(){B(D)}};D=fc(e,v,u??null);const y=l.riveScripting;y&&y.prepare();0==Wa.total&&B(D)})).then(l.startFileScripts)};const gc=l.Artboard.prototype.draw;l.Artboard.prototype.draw=function(e){gc.call(this,e._deferredRecorder||e)};let hc=l.RendererWrapper.prototype.align;l.RendererWrapper.prototype.align=function(e,k,t,u,v=1){hc.call(this,e,k,t,u,v)};h=new da;l.requestAnimationFrame=
558
- h.requestAnimationFrame.bind(h);l.cancelAnimationFrame=h.cancelAnimationFrame.bind(h);l.enableFPSCounter=h.Bb.bind(h);l.disableFPSCounter=h.yb;g=ha(m);h.$a=g;l.resolveAnimationFrame=g;l.cleanup=function(){I.i&&(I.i["delete"](),I.i=null)}};ba&&(_scriptName=self.location.href);var za="",Aa,Ba;
693
+ h.requestAnimationFrame.bind(h);l.cancelAnimationFrame=h.cancelAnimationFrame.bind(h);l.enableFPSCounter=h.Bb.bind(h);l.disableFPSCounter=h.yb;g=ha(m);h.ab=g;l.resolveAnimationFrame=g;l.cleanup=function(){I.i&&(I.i["delete"](),I.i=null)}};ba&&(_scriptName=self.location.href);var za="",Aa,Ba;
559
694
  if(aa||ba){try{za=(new URL(".",_scriptName)).href}catch{}ba&&(Ba=b=>{var a=new XMLHttpRequest;a.open("GET",b,!1);a.responseType="arraybuffer";a.send(null);return new Uint8Array(a.response)});Aa=async b=>{if(Ca(b))return new Promise((c,d)=>{var f=new XMLHttpRequest;f.open("GET",b,!0);f.responseType="arraybuffer";f.onload=()=>{200==f.status||0==f.status&&f.response?c(f.response):d(f.status)};f.onerror=d;f.send(null)});var a=await fetch(b,{credentials:"same-origin"});if(a.ok)return a.arrayBuffer();throw Error(a.status+
560
695
  " : "+a.url);}}var Da=console.log.bind(console),Fa=console.error.bind(console),Ha,Ia=!1,Ca=b=>b.startsWith("file://"),Ja,Ka,La,M,Ma,Na,Oa,N,Pa,Qa,Ra=!1;function Sa(){var b=Ta.buffer;l.HEAP8=La=new Int8Array(b);Ma=new Int16Array(b);l.HEAPU8=M=new Uint8Array(b);l.HEAPU16=Na=new Uint16Array(b);l.HEAP32=Oa=new Int32Array(b);l.HEAPU32=N=new Uint32Array(b);l.HEAPF32=Pa=new Float32Array(b);Qa=new Float64Array(b)}
561
696
  function Ua(b){l.onAbort?.(b);b="Aborted("+b+")";Fa(b);Ia=!0;b=new WebAssembly.RuntimeError(b+". Build with -sASSERTIONS for more info.");Ka?.(b);throw b;}var Xa;async function Ya(b){if(!Ha)try{var a=await Aa(b);return new Uint8Array(a)}catch{}if(b==Xa&&Ha)b=new Uint8Array(Ha);else if(Ba)b=Ba(b);else throw"both async and sync fetching of the wasm failed";return b}
@@ -567,14 +702,14 @@ a.o.h.P(a.l))});xb=a=>{var c=a.g;c.D&&wb.register(a,{g:c},a);return a};vb=a=>{wb
567
702
  var Bb={},Cb={},Db=class extends Error{constructor(b){super(b);this.name="InternalError"}},W=(b,a,c)=>{function d(g){g=c(g);if(g.length!==b.length)throw new Db("Mismatched type converter count");for(var n=0;n<b.length;++n)V(b[n],g[n])}b.forEach(g=>Cb[g]=a);var f=Array(a.length),m=[],h=0;for(let [g,n]of a.entries())nb.hasOwnProperty(n)?f[g]=nb[n]:(m.push(n),Bb.hasOwnProperty(n)||(Bb[n]=[]),Bb[n].push(()=>{f[g]=nb[n];++h;h===m.length&&d(f)}));0===m.length&&d(f)};
568
703
  function Eb(b,a,c={}){var d=a.name;if(!b)throw new O(`type "${d}" must have a positive integer typeid pointer`);if(nb.hasOwnProperty(b)){if(c.Jb)return;throw new O(`Cannot register type '${d}' twice`);}nb[b]=a;delete Cb[b];Bb.hasOwnProperty(b)&&(a=Bb[b],delete Bb[b],a.forEach(f=>f()))}function V(b,a,c={}){return Eb(b,a,c)}var Fb=b=>{throw new O(b.g.o.h.name+" instance already deleted");},Gb=[];function Hb(){}
569
704
  var Ib={},Jb=(b,a,c)=>{if(void 0===b[a].u){var d=b[a];b[a]=function(...f){if(!b[a].u.hasOwnProperty(f.length))throw new O(`Function '${c}' called with an invalid number of arguments (${f.length}) - expects one of (${b[a].u})!`);return b[a].u[f.length].apply(this,f)};b[a].u=[];b[a].u[d.R]=d}},Kb=(b,a,c)=>{if(l.hasOwnProperty(b)){if(void 0===c||void 0!==l[b].u&&void 0!==l[b].u[c])throw new O(`Cannot register public name '${b}' twice`);Jb(l,b,b);if(l[b].u.hasOwnProperty(c))throw new O(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
570
- l[b].u[c]=a}else l[b]=a,l[b].R=c},Lb=b=>{b=b.replace(/[^a-zA-Z0-9_]/g,"$");var a=b.charCodeAt(0);return 48<=a&&57>=a?`_${b}`:b};function Mb(b,a,c,d,f,m,h,g){this.name=b;this.constructor=a;this.O=c;this.P=d;this.C=f;this.Eb=m;this.fa=h;this.zb=g;this.ab=[]}
705
+ l[b].u[c]=a}else l[b]=a,l[b].R=c},Lb=b=>{b=b.replace(/[^a-zA-Z0-9_]/g,"$");var a=b.charCodeAt(0);return 48<=a&&57>=a?`_${b}`:b};function Mb(b,a,c,d,f,m,h,g){this.name=b;this.constructor=a;this.O=c;this.P=d;this.C=f;this.Eb=m;this.fa=h;this.zb=g;this.bb=[]}
571
706
  var Nb=(b,a,c)=>{for(;a!==c;){if(!a.fa)throw new O(`Expected null or instance of ${c.name}, got an instance of ${a.name}`);b=a.fa(b);a=a.C}return b},Ob=b=>{if(null===b)return"null";var a=typeof b;return"object"===a||"array"===a||"function"===a?b.toString():""+b};
572
707
  function Pb(b,a){if(null===a){if(this.Ea)throw new O(`null is not a valid ${this.name}`);return 0}if(!a.g)throw new O(`Cannot pass "${Ob(a)}" as a ${this.name}`);if(!a.g.l)throw new O(`Cannot pass deleted object as a pointer of type ${this.name}`);return Nb(a.g.l,a.g.o.h,this.h)}
573
708
  function Qb(b,a){if(null===a){if(this.Ea)throw new O(`null is not a valid ${this.name}`);if(this.ma){var c=this.Ia();null!==b&&b.push(this.P,c);return c}return 0}if(!a||!a.g)throw new O(`Cannot pass "${Ob(a)}" as a ${this.name}`);if(!a.g.l)throw new O(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.la&&a.g.o.la)throw new O(`Cannot convert argument of type ${a.g.K?a.g.K.name:a.g.o.name} to parameter type ${this.name}`);c=Nb(a.g.l,a.g.o.h,this.h);if(this.ma){if(void 0===a.g.D)throw new O("Passing raw pointer to smart pointer is illegal");
574
709
  switch(this.Tb){case 0:if(a.g.K===this)c=a.g.D;else throw new O(`Cannot convert argument of type ${a.g.K?a.g.K.name:a.g.o.name} to parameter type ${this.name}`);break;case 1:c=a.g.D;break;case 2:if(a.g.K===this)c=a.g.D;else{var d=a.clone();c=this.Ob(c,jb(()=>d["delete"]()));null!==b&&b.push(this.P,c)}break;default:throw new O("Unsupported sharing policy");}}return c}
575
710
  function Rb(b,a){if(null===a){if(this.Ea)throw new O(`null is not a valid ${this.name}`);return 0}if(!a.g)throw new O(`Cannot pass "${Ob(a)}" as a ${this.name}`);if(!a.g.l)throw new O(`Cannot pass deleted object as a pointer of type ${this.name}`);if(a.g.o.la)throw new O(`Cannot convert argument of type ${a.g.o.name} to parameter type ${this.name}`);return Nb(a.g.l,a.g.o.h,this.h)}
576
711
  var Sb=(b,a,c)=>{if(a===c)return b;if(void 0===c.C)return null;b=Sb(b,a,c.C);return null===b?null:c.zb(b)},Tb=(b,a)=>{a=mb(b,a);return lb[a]},Ub=(b,a)=>{if(!a.o||!a.l)throw new Db("makeClassHandle requires ptr and ptrType");if(!!a.K!==!!a.D)throw new Db("Both smartPtrType and smartPtr must be specified");a.count={value:1};return xb(Object.create(b,{g:{value:a,writable:!0}}))};
577
- function Vb(b,a,c,d,f,m,h,g,n,r,A){this.name=b;this.h=a;this.Ea=c;this.la=d;this.ma=f;this.Nb=m;this.Tb=h;this.bb=g;this.Ia=n;this.Ob=r;this.P=A;f||void 0!==a.C?this.v=Qb:(this.v=d?Pb:Rb,this.H=null)}
712
+ function Vb(b,a,c,d,f,m,h,g,n,r,A){this.name=b;this.h=a;this.Ea=c;this.la=d;this.ma=f;this.Nb=m;this.Tb=h;this.cb=g;this.Ia=n;this.Ob=r;this.P=A;f||void 0!==a.C?this.v=Qb:(this.v=d?Pb:Rb,this.H=null)}
578
713
  var Wb=(b,a,c)=>{if(!l.hasOwnProperty(b))throw new Db("Replacing nonexistent public symbol");void 0!==l[b].u&&void 0!==c?l[b].u[c]=a:(l[b]=a,l[b].R=c)},Xb={},Zb=(b,a,c=[])=>{b.includes("j")?(b=b.replace(/p/g,"i"),a=(0,Xb[b])(a,...c)):a=Yb.get(a)(...c);return a},$b=(b,a)=>(...c)=>Zb(b,a,c),X=(b,a)=>{b=U(b);var c=b.includes("j")?$b(b,a):Yb.get(a);if("function"!=typeof c)throw new O(`unknown function pointer with signature ${b}: ${a}`);return c};class ac extends Error{}
579
714
  var ic=(b,a)=>{function c(m){f[m]||nb[m]||(Cb[m]?Cb[m].forEach(c):(d.push(m),f[m]=!0))}var d=[],f={};a.forEach(c);throw new ac(`${b}: `+d.map(qb).join([", "]));};function jc(b){for(var a=1;a<b.length;++a)if(null!==b[a]&&void 0===b[a].H)return!0;return!1}
580
715
  function kc(b,a,c,d,f){var m=a.length;if(2>m)throw new O("argTypes array size mismatch! Must at least get return value and 'this' types!");var h=null!==a[1]&&null!==c,g=jc(a),n=!a[0].Kb,r=m-2,A=Array(r),q=[],w=[];return gb(b,function(...p){w.length=0;q.length=h?2:1;q[0]=f;if(h){var z=a[1].v(w,this);q[1]=z}for(var C=0;C<r;++C)A[C]=a[C+2].v(w,p[C]),q.push(A[C]);p=d(...q);if(g)zb(w);else for(C=h?1:2;C<a.length;C++){var G=1===C?z:A[C-2];null!==a[C].H&&a[C].H(G)}z=n?a[0].j(p):void 0;return z})}
@@ -586,25 +721,25 @@ return c},yc=(b,a,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var d=a;c=c<2*b.lengt
586
721
  0,c=0;c<b.length;++c)65535<b.codePointAt(c)&&c++,a+=4;return a},Dc=[],Ec=b=>{var a=Dc.length;Dc.push(b);return a},Fc=(b,a)=>{for(var c=Array(b),d=0;d<b;++d)c[d]=rb(N[a+4*d>>2],`parameter ${d}`);return c},Gc={},Hc=b=>{var a=Gc[b];return void 0===a?U(b):a},Ic=[null,[],[]];
587
722
  (()=>{let b=Hb.prototype;Object.assign(b,{isAliasOf:function(c){if(!(this instanceof Hb&&c instanceof Hb))return!1;var d=this.g.o.h,f=this.g.l;c.g=c.g;var m=c.g.o.h;for(c=c.g.l;d.C;)f=d.fa(f),d=d.C;for(;m.C;)c=m.fa(c),m=m.C;return d===m&&f===c},clone:function(){this.g.l||Fb(this);if(this.g.aa)return this.g.count.value+=1,this;var c=xb,d=Object,f=d.create,m=Object.getPrototypeOf(this),h=this.g;c=c(f.call(d,m,{g:{value:{count:h.count,da:h.da,aa:h.aa,l:h.l,o:h.o,D:h.D,K:h.K}}}));c.g.count.value+=1;c.g.da=
588
723
  !1;return c},["delete"](){this.g.l||Fb(this);if(this.g.da&&!this.g.aa)throw new O("Object already scheduled for deletion");vb(this);var c=this.g;--c.count.value;0===c.count.value&&(c.D?c.K.P(c.D):c.o.h.P(c.l));this.g.aa||(this.g.D=void 0,this.g.l=void 0)},isDeleted:function(){return!this.g.l},deleteLater:function(){this.g.l||Fb(this);if(this.g.da&&!this.g.aa)throw new O("Object already scheduled for deletion");Gb.push(this);this.g.da=!0;return this}});const a=Symbol.dispose;a&&(b[a]=b["delete"])})();
589
- Object.assign(Vb.prototype,{Fb(b){this.bb&&(b=this.bb(b));return b},Ra(b){this.P?.(b)},J:Ab,j:function(b){function a(){return this.ma?Ub(this.h.O,{o:this.Nb,l:c,K:this,D:b}):Ub(this.h.O,{o:this,l:b})}var c=this.Fb(b);if(!c)return this.Ra(b),null;var d=Tb(this.h,c);if(void 0!==d){if(0===d.g.count.value)return d.g.l=c,d.g.D=b,d.clone();d=d.clone();this.Ra(b);return d}d=this.h.Eb(c);d=Ib[d];if(!d)return a.call(this);d=this.la?d.ub:d.pointerType;var f=Sb(c,this.h,d.h);return null===f?a.call(this):this.ma?
724
+ Object.assign(Vb.prototype,{Fb(b){this.cb&&(b=this.cb(b));return b},Sa(b){this.P?.(b)},J:Ab,j:function(b){function a(){return this.ma?Ub(this.h.O,{o:this.Nb,l:c,K:this,D:b}):Ub(this.h.O,{o:this,l:b})}var c=this.Fb(b);if(!c)return this.Sa(b),null;var d=Tb(this.h,c);if(void 0!==d){if(0===d.g.count.value)return d.g.l=c,d.g.D=b,d.clone();d=d.clone();this.Sa(b);return d}d=this.h.Eb(c);d=Ib[d];if(!d)return a.call(this);d=this.la?d.ub:d.pointerType;var f=Sb(c,this.h,d.h);return null===f?a.call(this):this.ma?
590
725
  Ub(d.h.O,{o:d,l:f,K:this,D:b}):Ub(d.h.O,{o:d,l:f})}});l.print&&(Da=l.print);l.printErr&&(Fa=l.printErr);l.wasmBinary&&(Ha=l.wasmBinary);if(l.preInit)for("function"==typeof l.preInit&&(l.preInit=[l.preInit]);0<l.preInit.length;)l.preInit.shift()();
591
- var pb,Jc,ob,Ta,Yb,Kc={_abort_js:()=>Ua(""),_embind_create_inheriting_constructor:(b,a,c)=>{b=U(b);a=rb(a,"wrapper");c=Q(c);var d=a.h,f=d.O,m=d.C.O,h=d.C.constructor;b=gb(b,function(...g){for(var n of d.C.ab)if(this[n]===m[n])throw new kb(`Pure virtual function ${n} must be implemented in JavaScript`);Object.defineProperty(this,"__parent",{value:f});this.__construct(...g)});f.__construct=function(...g){if(this===f)throw new O("Pass correct 'this' to __construct");g=h.implement(this,...g);vb(g);var n=
726
+ var pb,Jc,ob,Ta,Yb,Kc={_abort_js:()=>Ua(""),_embind_create_inheriting_constructor:(b,a,c)=>{b=U(b);a=rb(a,"wrapper");c=Q(c);var d=a.h,f=d.O,m=d.C.O,h=d.C.constructor;b=gb(b,function(...g){for(var n of d.C.bb)if(this[n]===m[n])throw new kb(`Pure virtual function ${n} must be implemented in JavaScript`);Object.defineProperty(this,"__parent",{value:f});this.__construct(...g)});f.__construct=function(...g){if(this===f)throw new O("Pass correct 'this' to __construct");g=h.implement(this,...g);vb(g);var n=
592
727
  g.g;g.notifyOnDestruction();n.aa=!0;Object.defineProperties(this,{g:{value:n}});xb(this);g=n.l;g=mb(d,g);if(lb.hasOwnProperty(g))throw new O(`Tried to register registered instance: ${g}`);lb[g]=this};f.__destruct=function(){if(this===f)throw new O("Pass correct 'this' to __destruct");vb(this);var g=this.g.l;g=mb(d,g);if(lb.hasOwnProperty(g))delete lb[g];else throw new O(`Tried to unregister unregistered instance: ${g}`);};b.prototype=Object.create(f);Object.assign(b.prototype,c);return jb(b)},_embind_finalize_value_object:b=>
593
- {var a=yb[b];delete yb[b];var c=a.Ia,d=a.P,f=a.Ua,m=f.map(h=>h.Ib).concat(f.map(h=>h.Rb));W([b],m,h=>{var g={},n,r;for([n,r]of f.entries()){const A=h[n],q=r.Gb,w=r.Hb,p=h[n+f.length],z=r.Qb,C=r.Sb;g[r.Cb]={read:G=>A.j(q(w,G)),write:(G,E)=>{var H=[];z(C,G,p.v(H,E));zb(H)},optional:A.optional}}return[{name:a.name,j:A=>{var q={},w;for(w in g)q[w]=g[w].read(A);d(A);return q},v:(A,q)=>{for(var w in g)if(!(w in q||g[w].optional))throw new TypeError(`Missing field: "${w}"`);var p=c();for(w in g)g[w].write(p,
728
+ {var a=yb[b];delete yb[b];var c=a.Ia,d=a.P,f=a.Va,m=f.map(h=>h.Ib).concat(f.map(h=>h.Rb));W([b],m,h=>{var g={},n,r;for([n,r]of f.entries()){const A=h[n],q=r.Gb,w=r.Hb,p=h[n+f.length],z=r.Qb,C=r.Sb;g[r.Cb]={read:G=>A.j(q(w,G)),write:(G,E)=>{var H=[];z(C,G,p.v(H,E));zb(H)},optional:A.optional}}return[{name:a.name,j:A=>{var q={},w;for(w in g)q[w]=g[w].read(A);d(A);return q},v:(A,q)=>{for(var w in g)if(!(w in q||g[w].optional))throw new TypeError(`Missing field: "${w}"`);var p=c();for(w in g)g[w].write(p,
594
729
  q[w]);null!==A&&A.push(d,p);return p},J:Ab,H:d}]})},_embind_register_bigint:()=>{},_embind_register_bool:(b,a,c,d)=>{a=U(a);V(b,{name:a,j:function(f){return!!f},v:function(f,m){return m?c:d},J:function(f){return this.j(M[f])},H:null})},_embind_register_class:(b,a,c,d,f,m,h,g,n,r,A,q,w)=>{A=U(A);m=X(f,m);g&&=X(h,g);r&&=X(n,r);w=X(q,w);var p=Lb(A);Kb(p,function(){ic(`Cannot construct ${A} due to unbound types`,[d])});W([b,a,c],d?[d]:[],z=>{z=z[0];if(d){var C=z.h;var G=C.O}else G=Hb.prototype;z=gb(A,
595
730
  function(...R){if(Object.getPrototypeOf(this)!==E)throw new O(`Use 'new' to construct ${A}`);if(void 0===H.U)throw new O(`${A} has no accessible constructor`);var I=H.U[R.length];if(void 0===I)throw new O(`Tried to invoke ctor of ${A} with invalid number of parameters (${R.length}) - expected (${Object.keys(H.U).toString()}) parameters instead!`);return I.apply(this,R)});var E=Object.create(G,{constructor:{value:z}});z.prototype=E;var H=new Mb(A,z,E,w,C,m,g,r);if(H.C){var L;(L=H.C).ga??(L.ga=[]);
596
731
  H.C.ga.push(H)}C=new Vb(A,H,!0,!1,!1);L=new Vb(A+"*",H,!1,!1,!1);G=new Vb(A+" const*",H,!1,!0,!1);Ib[b]={pointerType:L,ub:G};Wb(p,z);return[C,L,G]})},_embind_register_class_class_function:(b,a,c,d,f,m,h)=>{var g=lc(c,d);a=U(a);a=mc(a);m=X(f,m);W([],[b],n=>{function r(){ic(`Cannot call ${A} due to unbound types`,g)}n=n[0];var A=`${n.name}.${a}`;a.startsWith("@@")&&(a=Symbol[a.substring(2)]);var q=n.h.constructor;void 0===q[a]?(r.R=c-1,q[a]=r):(Jb(q,a,A),q[a].u[c-1]=r);W([],g,w=>{w=kc(A,[w[0],null].concat(w.slice(1)),
597
732
  null,m,h);void 0===q[a].u?(w.R=c-1,q[a]=w):q[a].u[c-1]=w;if(n.h.ga)for(const p of n.h.ga)p.constructor.hasOwnProperty(a)||(p.constructor[a]=w);return[]});return[]})},_embind_register_class_class_property:(b,a,c,d,f,m,h,g)=>{a=U(a);m=X(f,m);W([],[b],n=>{n=n[0];var r=`${n.name}.${a}`,A={get(){ic(`Cannot access ${r} due to unbound types`,[c])},enumerable:!0,configurable:!0};A.set=g?()=>{ic(`Cannot access ${r} due to unbound types`,[c])}:()=>{throw new O(`${r} is a read-only property`);};Object.defineProperty(n.h.constructor,
598
733
  a,A);W([],[c],q=>{q=q[0];var w={get(){return q.j(m(d))},enumerable:!0};g&&(g=X(h,g),w.set=p=>{var z=[];g(d,q.v(z,p));zb(z)});Object.defineProperty(n.h.constructor,a,w);return[]});return[]})},_embind_register_class_constructor:(b,a,c,d,f,m)=>{var h=lc(a,c);f=X(d,f);W([],[b],g=>{g=g[0];var n=`constructor ${g.name}`;void 0===g.h.U&&(g.h.U=[]);if(void 0!==g.h.U[a-1])throw new O(`Cannot register multiple constructors with identical number of parameters (${a-1}) for class '${g.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
599
- g.h.U[a-1]=()=>{ic(`Cannot construct ${g.name} due to unbound types`,h)};W([],h,r=>{r.splice(1,0,null);g.h.U[a-1]=kc(n,r,null,f,m);return[]});return[]})},_embind_register_class_function:(b,a,c,d,f,m,h,g)=>{var n=lc(c,d);a=U(a);a=mc(a);m=X(f,m);W([],[b],r=>{function A(){ic(`Cannot call ${q} due to unbound types`,n)}r=r[0];var q=`${r.name}.${a}`;a.startsWith("@@")&&(a=Symbol[a.substring(2)]);g&&r.h.ab.push(a);var w=r.h.O,p=w[a];void 0===p||void 0===p.u&&p.className!==r.name&&p.R===c-2?(A.R=c-2,A.className=
734
+ g.h.U[a-1]=()=>{ic(`Cannot construct ${g.name} due to unbound types`,h)};W([],h,r=>{r.splice(1,0,null);g.h.U[a-1]=kc(n,r,null,f,m);return[]});return[]})},_embind_register_class_function:(b,a,c,d,f,m,h,g)=>{var n=lc(c,d);a=U(a);a=mc(a);m=X(f,m);W([],[b],r=>{function A(){ic(`Cannot call ${q} due to unbound types`,n)}r=r[0];var q=`${r.name}.${a}`;a.startsWith("@@")&&(a=Symbol[a.substring(2)]);g&&r.h.bb.push(a);var w=r.h.O,p=w[a];void 0===p||void 0===p.u&&p.className!==r.name&&p.R===c-2?(A.R=c-2,A.className=
600
735
  r.name,w[a]=A):(Jb(w,a,q),w[a].u[c-2]=A);W([],n,z=>{z=kc(q,z,r,m,h);void 0===w[a].u?(z.R=c-2,w[a]=z):w[a].u[c-2]=z;return[]});return[]})},_embind_register_class_property:(b,a,c,d,f,m,h,g,n,r)=>{a=U(a);f=X(d,f);W([],[b],A=>{A=A[0];var q=`${A.name}.${a}`,w={get(){ic(`Cannot access ${q} due to unbound types`,[c,h])},enumerable:!0,configurable:!0};w.set=n?()=>ic(`Cannot access ${q} due to unbound types`,[c,h]):()=>{throw new O(q+" is a read-only property");};Object.defineProperty(A.h.O,a,w);W([],n?[c,
601
736
  h]:[c],p=>{var z=p[0],C={get(){var E=nc(this,A,q+" getter");return z.j(f(m,E))},enumerable:!0};if(n){n=X(g,n);var G=p[1];C.set=function(E){var H=nc(this,A,q+" setter"),L=[];n(r,H,G.v(L,E));zb(L)}}Object.defineProperty(A.h.O,a,C);return[]});return[]})},_embind_register_emval:b=>V(b,pc),_embind_register_enum:(b,a,c,d,f)=>{a=U(a);f=0===f?"object":1===f?"number":"string";switch(f){case "object":function h(){}h.values={};V(b,{name:a,constructor:h,valueType:f,j:function(g){return this.constructor.values[g]},
602
- v:(g,n)=>n.value,J:qc(a,c,d),H:null});Kb(a,h);break;case "number":var m={};V(b,{name:a,Fa:m,valueType:f,j:g=>g,v:(g,n)=>n,J:qc(a,c,d),H:null});Kb(a,m);delete l[a].R;break;case "string":m={},V(b,{name:a,ib:{},cb:{},Fa:m,valueType:f,j:function(g){return this.cb[g]},v:function(g,n){return this.ib[n]},J:qc(a,c,d),H:null}),Kb(a,m),delete l[a].R}},_embind_register_enum_value:(b,a,c)=>{var d=rb(b,"enum");a=U(a);switch(d.valueType){case "object":b=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},
603
- constructor:{value:gb(`${d.name}_${a}`,function(){})}});b.values[c]=d;b[a]=d;break;case "number":d.Fa[a]=c;break;case "string":d.ib[a]=c,d.cb[c]=a,d.Fa[a]=a}},_embind_register_float:(b,a,c)=>{a=U(a);V(b,{name:a,j:d=>d,v:(d,f)=>f,J:rc(a,c),H:null})},_embind_register_function:(b,a,c,d,f,m)=>{var h=lc(a,c);b=U(b);b=mc(b);f=X(d,f);Kb(b,function(){ic(`Cannot call ${b} due to unbound types`,h)},a-1);W([],h,g=>{Wb(b,kc(b,[g[0],null].concat(g.slice(1)),null,f,m),a-1);return[]})},_embind_register_integer:(b,
737
+ v:(g,n)=>n.value,J:qc(a,c,d),H:null});Kb(a,h);break;case "number":var m={};V(b,{name:a,Fa:m,valueType:f,j:g=>g,v:(g,n)=>n,J:qc(a,c,d),H:null});Kb(a,m);delete l[a].R;break;case "string":m={},V(b,{name:a,ib:{},eb:{},Fa:m,valueType:f,j:function(g){return this.eb[g]},v:function(g,n){return this.ib[n]},J:qc(a,c,d),H:null}),Kb(a,m),delete l[a].R}},_embind_register_enum_value:(b,a,c)=>{var d=rb(b,"enum");a=U(a);switch(d.valueType){case "object":b=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},
738
+ constructor:{value:gb(`${d.name}_${a}`,function(){})}});b.values[c]=d;b[a]=d;break;case "number":d.Fa[a]=c;break;case "string":d.ib[a]=c,d.eb[c]=a,d.Fa[a]=a}},_embind_register_float:(b,a,c)=>{a=U(a);V(b,{name:a,j:d=>d,v:(d,f)=>f,J:rc(a,c),H:null})},_embind_register_function:(b,a,c,d,f,m)=>{var h=lc(a,c);b=U(b);b=mc(b);f=X(d,f);Kb(b,function(){ic(`Cannot call ${b} due to unbound types`,h)},a-1);W([],h,g=>{Wb(b,kc(b,[g[0],null].concat(g.slice(1)),null,f,m),a-1);return[]})},_embind_register_integer:(b,
604
739
  a,c,d,f)=>{a=U(a);let m=g=>g;if(0===d){var h=32-8*c;m=g=>g<<h>>>h;f=m(f)}V(b,{name:a,j:m,v:(g,n)=>n,J:sc(a,c,0!==d),H:null})},_embind_register_memory_view:(b,a,c)=>{function d(m){return new f(La.buffer,N[m+4>>2],N[m>>2])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][a];c=U(c);V(b,{name:c,j:d,J:d},{Jb:!0})},_embind_register_std_string:(b,a)=>{a=U(a);V(b,{name:a,j(c){var d=(d=c+4)?vc(M,d,N[c>>2],!0):"";pb(c);return d},v(c,d){d instanceof ArrayBuffer&&
605
740
  (d=new Uint8Array(d));var f,m="string"==typeof d;if(!(m||ArrayBuffer.isView(d)&&1==d.BYTES_PER_ELEMENT))throw new O("Cannot pass non-string to std::string");var h;if(m)for(f=h=0;f<d.length;++f){var g=d.charCodeAt(f);127>=g?h++:2047>=g?h+=2:55296<=g&&57343>=g?(h+=4,++f):h+=3}else h=d.length;f=h;h=Jc(4+f+1);g=h+4;N[h>>2]=f;if(m){if(m=g,g=f+1,f=M,0<g){g=m+g-1;for(var n=0;n<d.length;++n){var r=d.codePointAt(n);if(127>=r){if(m>=g)break;f[m++]=r}else if(2047>=r){if(m+1>=g)break;f[m++]=192|r>>6;f[m++]=128|
606
741
  r&63}else if(65535>=r){if(m+2>=g)break;f[m++]=224|r>>12;f[m++]=128|r>>6&63;f[m++]=128|r&63}else{if(m+3>=g)break;f[m++]=240|r>>18;f[m++]=128|r>>12&63;f[m++]=128|r>>6&63;f[m++]=128|r&63;n++}}f[m]=0}}else M.set(d,g);null!==c&&c.push(pb,h);return h},J:Ab,H(c){pb(c)}})},_embind_register_std_wstring:(b,a,c)=>{c=U(c);if(2===a){var d=xc;var f=yc;var m=zc}else d=Ac,f=Bc,m=Cc;V(b,{name:c,j:h=>{var g=d(h+4,N[h>>2]*a,!0);pb(h);return g},v:(h,g)=>{if("string"!=typeof g)throw new O(`Cannot pass non-string to C++ string type ${c}`);
607
- var n=m(g),r=Jc(4+n+a);N[r>>2]=n/a;f(g,r+4,n+a);null!==h&&h.push(pb,r);return r},J:Ab,H(h){pb(h)}})},_embind_register_value_object:(b,a,c,d,f,m)=>{yb[b]={name:U(a),Ia:X(c,d),P:X(f,m),Ua:[]}},_embind_register_value_object_field:(b,a,c,d,f,m,h,g,n,r)=>{yb[b].Ua.push({Cb:U(a),Ib:c,Gb:X(d,f),Hb:m,Rb:h,Qb:X(g,n),Sb:r})},_embind_register_void:(b,a)=>{a=U(a);V(b,{Kb:!0,name:a,j:()=>{},v:()=>{}})},_emval_create_invoker:(b,a,c)=>{var [d,...f]=Fc(b,a),m=d.v.bind(d),h=f.map(n=>n.J.bind(n));b--;var g=Array(b);
742
+ var n=m(g),r=Jc(4+n+a);N[r>>2]=n/a;f(g,r+4,n+a);null!==h&&h.push(pb,r);return r},J:Ab,H(h){pb(h)}})},_embind_register_value_object:(b,a,c,d,f,m)=>{yb[b]={name:U(a),Ia:X(c,d),P:X(f,m),Va:[]}},_embind_register_value_object_field:(b,a,c,d,f,m,h,g,n,r)=>{yb[b].Va.push({Cb:U(a),Ib:c,Gb:X(d,f),Hb:m,Rb:h,Qb:X(g,n),Sb:r})},_embind_register_void:(b,a)=>{a=U(a);V(b,{Kb:!0,name:a,j:()=>{},v:()=>{}})},_emval_create_invoker:(b,a,c)=>{var [d,...f]=Fc(b,a),m=d.v.bind(d),h=f.map(n=>n.J.bind(n));b--;var g=Array(b);
608
743
  a=`methodCaller<(${f.map(n=>n.name)}) => ${d.name}>`;return Ec(gb(a,(n,r,A,q)=>{for(var w=0,p=0;p<b;++p)g[p]=h[p](q+w),w+=8;switch(c){case 0:var z=Q(n).apply(null,g);break;case 2:z=Reflect.construct(Q(n),g);break;case 3:z=g[0];break;case 1:z=Q(n)[Hc(r)](...g)}n=[];z=m(n,z);n.length&&(N[A>>2]=jb(n));return z}))},_emval_decref:oc,_emval_get_module_property:b=>{b=Hc(b);return jb(l[b])},_emval_get_property:(b,a)=>{b=Q(b);a=Q(a);return jb(b[a])},_emval_incref:b=>{9<b&&(ib[b+1]+=1)},_emval_invoke:(b,a,
609
744
  c,d,f)=>Dc[b](a,c,d,f),_emval_new_array:()=>jb([]),_emval_new_cstring:b=>jb(Hc(b)),_emval_new_object:()=>jb({}),_emval_run_destructors:b=>{var a=Q(b);zb(a);oc(b)},_emval_set_property:(b,a,c)=>{b=Q(b);a=Q(a);c=Q(c);b[a]=c},clock_time_get:function(b,a,c,d){if(!(0<=b&&3>=b))return 28;b=Math.round(1E6*(0===b?Date.now():performance.now()));bb=[b>>>0,(ab=b,1<=+Math.abs(ab)?0<ab?+Math.floor(ab/4294967296)>>>0:~~+Math.ceil((ab-+(~~ab>>>0))/4294967296)>>>0:0)];Oa[d>>2]=bb[0];Oa[d+4>>2]=bb[1];return 0},emscripten_resize_heap:b=>
610
745
  {var a=M.length;b>>>=0;if(2147483648<b)return!1;for(var c=1;4>=c;c*=2){var d=a*(1+.2/c);d=Math.min(d,b+100663296);a:{d=(Math.min(2147483648,65536*Math.ceil(Math.max(b,d)/65536))-Ta.buffer.byteLength+65535)/65536|0;try{Ta.grow(d);Sa();var f=1;break a}catch(m){}f=void 0}if(f)return!0}return!1},fd_close:()=>52,fd_seek:function(){return 70},fd_write:(b,a,c,d)=>{for(var f=0,m=0;m<c;m++){var h=N[a>>2],g=N[a+4>>2];a+=8;for(var n=0;n<g;n++){var r=b,A=M[h+n],q=Ic[r];0===A||10===A?((1===r?Da:Fa)(vc(q)),q.length=
@@ -626,7 +761,7 @@ Lc=await (async function(){function b(c){c=Lc=c.exports;pb=c.free;Jc=c.malloc;ob
626
761
  /***/ ((module) => {
627
762
 
628
763
  "use strict";
629
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.49.3","description":"A lite version of Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils","semantics"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
764
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@rive-app/canvas-lite","version":"2.50.0","description":"Rive web runtime, lite version, canvas renderer. Rive is an agent-native 2D and 3D engine for games, apps, and interactive UI.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation","interactive","ui","game-engine","graphics"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils","semantics"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}');
630
765
 
631
766
  /***/ }),
632
767
  /* 7 */
@@ -5960,7 +6095,7 @@ var StateMachine = /** @class */ (function () {
5960
6095
  };
5961
6096
  /**
5962
6097
  * Get metadata about the state of focus if applicable for this state machine.
5963
- * @returns FocusState - { hasFocus: boolean, expectsKeyboardInput: boolean }
6098
+ * @returns FocusState - { hasFocus: boolean, expectsKeyboardInput: boolean, expectsTextInput: boolean }
5964
6099
  */
5965
6100
  StateMachine.prototype.focusState = function () {
5966
6101
  return this.instance.focusState();
@@ -7829,14 +7964,14 @@ var Rive = /** @class */ (function () {
7829
7964
  var activeSm = this.focusStateMachine;
7830
7965
  if (!activeSm)
7831
7966
  return;
7832
- if (this.wantsTextInputSession(activeSm.focusState().expectsKeyboardInput)) {
7967
+ if (this.wantsTextInputSession(activeSm.focusState().expectsTextInput)) {
7833
7968
  this._keyboardInteractions.summonForPointer();
7834
7969
  }
7835
7970
  };
7836
- /** expectsKeyboardInput, and (with semantics on) the focused node is a textField. */
7837
- Rive.prototype.wantsTextInputSession = function (expectsKeyboardInput) {
7971
+ /** expectsTextInput (not key listeners alone), and with semantics on a textField. */
7972
+ Rive.prototype.wantsTextInputSession = function (expectsTextInput) {
7838
7973
  var _a;
7839
- if (!expectsKeyboardInput)
7974
+ if (!expectsTextInput)
7840
7975
  return false;
7841
7976
  var node = (_a = this._semanticTree) === null || _a === void 0 ? void 0 : _a.focusedNode();
7842
7977
  return node === undefined || node.role === _semantics__WEBPACK_IMPORTED_MODULE_2__.SemanticRole.textField;
@@ -8298,8 +8433,8 @@ var Rive = /** @class */ (function () {
8298
8433
  this._prevWantsTextInputSession = false;
8299
8434
  return;
8300
8435
  }
8301
- var _a = activeSm.focusState(), hasFocus = _a.hasFocus, expectsKeyboardInput = _a.expectsKeyboardInput;
8302
- this.syncTextInputSession(ki, this.wantsTextInputSession(expectsKeyboardInput));
8436
+ var _a = activeSm.focusState(), hasFocus = _a.hasFocus, expectsTextInput = _a.expectsTextInput;
8437
+ this.syncTextInputSession(ki, this.wantsTextInputSession(expectsTextInput));
8303
8438
  this.syncRiveFocus(ki, this.canvas, hasFocus);
8304
8439
  };
8305
8440
  /** Begin/end the text session on wantsSession edges; decorate the proxy while it has DOM focus. */