1import{J as e,q as t}from"./chunk-62JRHF6Z-DWJCvDmk.js";var n=e(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.rive=r():n.rive=r()})(e,()=>(()=>{var e=[,((e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r.Animation});var r=n(2)}),((e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r});var r=function(){function e(e,t,n,r){this.animation=e,this.artboard=t,this.playing=r,this.loopCount=0,this.scrubTo=null,this.instance=new n.LinearAnimationInstance(e,t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){return this.instance.time},set:function(e){this.instance.time=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.scrubTo===null?this.instance.advance(e):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},e.prototype.apply=function(e){this.instance.apply(e)},e.prototype.cleanup=function(){this.instance.delete()},e}()}),((e,t,n)=>{n.r(t),n.d(t,{RuntimeLoader:()=>o});var r=n(4),i=n(5),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)},o=function(){function e(){}return e.notifyError=function(t){var n;for(e.isLoading=!1;e.errorCallbackQueue.length>0;)(n=e.errorCallbackQueue.shift())==null||n(t);e.callBackQueue=[]},e.loadRuntime=function(){var t=e.wasmURL,n=e.wasmBinary;e.enablePerfMarks&&performance.mark(`rive:wasm-init:start`),r.default(a({locateFile:function(){return t}},n?{wasmBinary:n}:{})).then(function(t){var n;for(e.enablePerfMarks&&(performance.mark(`rive:wasm-init:end`),performance.measure(`rive:wasm-init`,`rive:wasm-init:start`,`r
1ive:wasm-init:end`)),e.runtime=t,e.errorCallbackQueue=[];e.callBackQueue.length>0;)(n=e.callBackQueue.shift())==null||n(e.runtime)}).catch(function(n){var r={message:n?.message||`Unknown error`,type:n?.name||`Error`,wasmError:n instanceof WebAssembly.CompileError||n instanceof WebAssembly.RuntimeError,originalError:n};console.debug(`Rive WASM load error details:`,r);var i=e.wasmFallbackURL,a=i!==null&&t.toLowerCase()===i.toLowerCase();if(i!==null&&!a)console.warn(`Failed to load WASM from ${t} (${r.message}), trying fallback URL: ${i}`),e.wasmBinary=null,e.setWasmUrl(i),e.loadRuntime();else{var o=[`Could not load Rive WASM file from ${a?`the configured WASM URL or its fallback (${i})`:t}.`,`Possible reasons:`,`- Network connection is down`,`- WebAssembly is not supported in this environment`,`- The WASM file is corrupted or incompatible`,` 2Error details:`,`- Type: ${r.type}`,`- Message: ${r.message}`,`- WebAssembly-specific error: ${r.wasmError}`,` 3To resolve, you may need to:`,`1. Check your network connection`,`2. Set a new WASM source via RuntimeLoader.setWasmUrl()`,`3. Call RuntimeLoader.awaitInstance() again`].join(` 4`);console.error(o),e.notifyError(Error(o))}})},e.getInstance=function(t,n){e.isLoading||(e.isLoading=!0,e.loadRuntime()),e.runtime?t(e.runtime):(e.callBackQueue.push(t),n&&e.errorCallbackQueue.push(n))},e.awaitInstance=function(){return new Promise(function(t,n){return e.getInstance(t,n)})},e.setWasmUrl=function(t){e.wasmURL=t},e.getWasmUrl=function(){return e.wasmURL},e.setWasmFallbackUrl=function(t){e.wasmFallbackURL=t},e.getWasmFallbackUrl=function(){return e.wasmFallbackURL},e.setWasmBinary=function(t){if(t instanceof ArrayBuffer||t===null){e.wasmBinary=t;return}console.error(`setWasmBinary expects an ArrayBuffer or null`)},e.getWasmBinary=function(){return e.wasmBinary},e.isLoading=!1,e.callBackQueue=[],e.wasmURL=`https://unpkg.com/${i.name}@${i.version}/rive.wasm`,e.wasmFallbackURL=`https://cdn.jsdelivr.net/npm/${i.name}@${i.version}/rive_fallback.wasm`,e.wasmBinary=null,e.errorCallbackQueue=[],e.enablePerfMarks=!1,e}()}),((e,t,n)=>{n.r(t),n.d(t,{default:()=>r});let r=(()=>{var e=typeof document<`u`?document.currentScript?.src:void 0;return(function(t={}){var n,r=t,i,a,o=new Promise((e,t)=>{i=e,a=t}),s=typeof window==`object`,c=typeof importScripts==`function`;function l(){function e(e){let a=r;n=t=0,r=new Map,a.forEach(t=>{try{t(e)}catch(e){console.error(e)}}),this.mb(),i&&i.Nb()}let t=0,n=0,r=new Map,i=null,a=null;this.requestAnimationFrame=function(i){t||=requestAnimationFrame(e.bind(this));let a=++n;return r.set(a,i),a},this.cancelAnimationFrame=function(e){r.delete(e),t&&r.size==0&&(cancelAnimationFrame(t),t=0)},this.Lb=function(e){a&&=(document.body.remove(a),null),e||(a=document.createElement(`div`),a.style.backgroundColor=`black`,a.style.position=`fixed`,a.style.right=0,a.style.top=0,a.style.color=`white`,a.style.padding=`4px`,a.innerHTML=`RIVE FPS`,e=function(e){a.innerHTML=`RIVE FPS `+e.toFixed(1)},document.body.appendChild(a)),i=new function(){let t=0,n=0;this.Nb=function(){var r=performance.now();n?(++t,r-=n,1e3<r&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.mb=function(){}}function u(){console.assert(!0);let e=new Map,t=-1/0;this.push=function(n){return n=n+255>>8,e.has(n)&&clearTimeout(e.get(n)),e.set(n,setTimeout(function(){e.delete(n),e.length==0?t=-1/0:n==t&&(t=Math.max(...e.keys()),console.assert(t<n))},1e3)),t=Math.max(n,t),t<<8}}let d=r.onRuntimeInitialized;r.onRuntimeInitialized=function(){d&&d();let e=r.decodeAudio;r.decodeAudio=function(t,n){t=e(t),n(t)};let t=r.decodeFont;r.decodeFont=function(e,n){e=t(e),n(e)};let n=r.setFallbackFontCb;r.setFallbackFontCallback=typeof n==`function`?function(e){n(e)}:function(){console.warn(`Module.setFallbackFontCallback called, but text support is not enabled in this build.`)};let i=r.FileAssetLoader;r.ptrToAsset=e=>{let t=r.ptrToFileAsset(e);return t.isImage?r.ptrToImageAsset(e):t.isFont?r.ptrToFontAsset(e):t.isAudio?r.ptrToAudioAsset(e):t},r.CustomFileAssetLoader=i.extend(`CustomFileAssetLoader`,{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Bb=e},loadContents:function(e,t){return e=r.ptrToAsset(e),this.Bb(e,t)}}),r.CDNFileAssetLoader=i.extend(`CDNFileAssetLoader`,{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(e){let t=r.ptrToAsset(e);return e=t.cdnUuid,e===``?!1:((function(e,t){var n=new XMLHttpRequest;n.responseType=`arraybuffer`,n.onreadystatechange=function(){n.readyState==4&&n.status==200&&t(n)},n.open(`GET`,e,!0),n.send(null)})(t.cdnBaseUrl+`/`+e,e=>{t.decode(new Uint8Array(e.response))}),!0)}}),r.FallbackFileAssetLoader=i.extend(`FallbackFileAssetLoader`,{__construct:function(){this.__parent.__construct.call(this),this.ib=[]},addLoader:function(e){this.ib.push(e)},loadContents:function(e,t){for(let n of this.ib)if(n.loadContents(e,t))return!0;return!1}});let a=r.computeAlignment;r.computeAlignment=function(e,t,n,r,i=1){return a.call(this,e,t,n,r,i)}};let f=r.onRuntimeInitialized;r.onRuntimeInitialized=function(){function e(e){this.G=e,this.Ab=e.getContext(`2d`),this.Eb=i,this.S=[],this.ja=0,this.clear=function(){console.assert(this.ja==0),this.S=[],a.delete(this)},this.save=function(){++this.ja,this.S.push(i.save.bind(i))},this.restore=function(){0<this.ja&&(this.S.push(i.restore.bind(i)),--this.ja)},this.transform=function(e){this.S.push(i.transform.bind(i,e))},this.align=function(e,t,n,r,a=1){this.S.push(i.align.bind(i,e,t,n,r,a))},this.flush=function(){console.assert(this.ja==0),a.add(this),i.Ya||n()},this.delete=function(){}}function t(e,t=!1){var n={alpha:!0,depth:t,stencil:t,antialias:t,premultipliedAlpha:!0,preserveDrawingBuffer:0,powerPreference:`high-performance`,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:!1,explicitSwapControl:0,renderViaOffscreenBackBuffer:0};if(t=e.getContext(`webgl2`,n),!t)return null;n=Qn(t,n),$n(n);let r=o(e.width,e.height);
4r.La=n,r.G=e,r.Ma=e.width,r.Za=e.height,r.T=t;var i=r.delete;return r.delete=function(){i.call(this);var e=this.La;tr===X[e]&&(tr=null),typeof JSEvents==`object`&&JSEvents.Qc(X[e].F.canvas),X[e]&&X[e].F.canvas&&(X[e].F.canvas.zb=void 0),this.La=this.G=this.Ma=this.T=X[e]=null},r}function n(){if(i){var e=i.Db,t=0,n=0,o=0,s=Array(a.size),c=0;for(var l of a)l.ea=Math.min(l.G.width,e),l.da=Math.min(l.G.height,e),l.Ja=l.da*l.ea,t=Math.max(t,l.ea),n=Math.max(n,l.da),o+=l.Ja,s[c++]=l;if(a.clear(),!(0>=o)){for(t=1<<(0>=t?0:32-Math.clz32(t-1)),n=1<<(0>=n?0:32-Math.clz32(n-1));n*t<o;)t<=n?t*=2:n*=2;for(t=Math.min(t,e),t=Math.min(n,e),s.sort((e,t)=>t.Ja-e.Ja),o=new r.DynamicRectanizer(e),l=0;l<s.length;){for(o.reset(t,n),c=l;c<s.length;++c){var u=s[c],f=o.addRect(u.ea,u.da);if(0>f){console.assert(c>l);break}u.pa=f&65535,u.qa=f>>16}for(u=d.push(o.drawWidth()),f=p.push(o.drawHeight()),console.assert(u>=o.drawWidth()),console.assert(f>=o.drawHeight()),console.assert(u<=e),console.assert(f<=e),i.G.width!=u&&(i.G.width=u),i.G.height!=f&&(i.G.height=f),i.clear(),u=l;u<c;++u){f=s[u],i.saveClipRect(f.pa,f.qa,f.pa+f.ea,f.qa+f.da);let e=new r.Mat2D;e.xx=f.ea/f.G.width,e.yy=f.da/f.G.height,e.xy=e.yx=0,e.tx=f.pa,e.ty=f.qa,i.transform(e);for(let e of f.S)e();i.restoreClipRect(),f.S=[]}for(i.flush();l<c;++l)u=s[l],f=u.Ab,f.globalCompositeOperation=`copy`,f.drawImage(i.G,u.pa,u.qa,u.ea,u.da,0,0,u.G.width,u.G.height);l=c}}}}f&&f();let i=null,a=new Set,o=r.makeRenderer;r.makeRenderer=function(n,r){if(!i){function e(e){var n=document.createElement(`canvas`);return n.width=1,n.height=1,i=t(n,e),i.Ya=!!i.T.getExtension(`WEBGL_shader_pixel_local_storage`),i.Db=Math.min(i.T.getParameter(i.T.MAX_RENDERBUFFER_SIZE),i.T.getParameter(i.T.MAX_TEXTURE_SIZE)),i.Ka=!i.Ya,(e=i.T.getExtension(`WEBGL_debug_renderer_info`))&&(n=i.T.getParameter(e.UNMASKED_RENDERER_WEBGL),i.T.getParameter(e.UNMASKED_VENDOR_WEBGL).includes(`Google`)&&n.includes(`ANGLE Metal Renderer`)&&(i.Ka=!1)),i}i=e(!0),i.Ka||(i=e(!1))}return r?new e(n):t(n,i.Ka)};let s=r.Artboard.prototype.delete;r.Artboard.prototype.delete=function(){this.Fb=!0,s.call(this)};let c=r.Artboard.prototype.draw;r.Artboard.prototype.draw=function(e){e.S?e.S.push(()=>{this.Fb||c.call(this,e.Eb)}):c.call(this,e)};let d=new u,p=new u,m=new l;r.requestAnimationFrame=m.requestAnimationFrame.bind(m),r.cancelAnimationFrame=m.cancelAnimationFrame.bind(m),r.enableFPSCounter=m.Lb.bind(m),m.mb=n,r.resolveAnimationFrame=n;let h=r.load;r.load=function(e,t,n=!0){let i=new r.FallbackFileAssetLoader;return t!==void 0&&i.addLoader(t),n&&(t=new r.CDNFileAssetLoader,i.addLoader(t)),Promise.resolve(h(e,i))};let g=r.WebGL2Renderer.prototype.clear;r.WebGL2Renderer.prototype.clear=function(){$n(this.La);let e=this.G;(this.Ma!=e.width||this.Za!=e.height)&&(this.resize(e.width,e.height),this.Ma=e.width,this.Za=e.height),g.call(this)},r.decodeImage=function(e,t){e=r.decodeWebGL2Image(e),t(e)};let _=r.Renderer.prototype.align;r.Renderer.prototype.align=function(e,t,n,r,i=1){_.call(this,e,t,n,r,i)}};var p=Object.assign({},r),m=`./this.program`,h=``,g,_;(s||c)&&(c?h=self.location.href:typeof document<`u`&&document.currentScript&&(h=document.currentScript.src),e&&(h=e),h=h.startsWith(`blob:`)?``:h.substr(0,h.replace(/[?#].*/,``).lastIndexOf(`/`)+1),c&&(_=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),g=(e,t,n)=>{if(re(e)){var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n()},r.onerror=n,r.send(null)}else fetch(e,{credentials:`same-origin`}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+` : `+e.url))).then(t,n)});var v=r.print||console.log.bind(console),y=r.printErr||console.error.bind(console);Object.assign(r,p),p=null,r.thisProgram&&(m=r.thisProgram);var b;r.wasmBinary&&(b=r.wasmBinary);var x,S=!1,C,w,T,E,D,O,k,A;function j(){var e=x.buffer;r.HEAP8=C=new Int8Array(e),r.HEAP16=T=new Int16Array(e),r.HEAPU8=w=new Uint8Array(e),r.HEAPU16=E=new Uint16Array(e),r.HEAP32=D=new Int32Array(e),r.HEAPU32
4=O=new Uint32Array(e),r.HEAPF32=k=new Float32Array(e),r.HEAPF64=A=new Float64Array(e)}var ee=[],M=[],N=[];function te(){var e=r.preRun.shift();ee.unshift(e)}var P=0,ne=null,F=null;function I(e){throw r.onAbort?.(e),e=`Aborted(`+e+`)`,y(e),S=!0,e=new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`),a(e),e}var L=e=>e.startsWith(`data:application/octet-stream;base64,`),re=e=>e.startsWith(`file://`),ie;function ae(e){if(e==ie&&b)return new Uint8Array(b);if(_)return _(e);throw`both async and sync fetching of the wasm failed`}function oe(e){return b?Promise.resolve().then(()=>ae(e)):new Promise((t,n)=>{g(e,e=>t(new Uint8Array(e)),()=>{try{t(ae(e))}catch(e){n(e)}})})}function se(e,t,n){return oe(e).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{y(`failed to asynchronously prepare wasm: ${e}`),I(e)})}function ce(e,t){var n=ie;return b||typeof WebAssembly.instantiateStreaming!=`function`||L(n)||re(n)||typeof fetch!=`function`?se(n,e,t):fetch(n,{credentials:`same-origin`}).then(r=>WebAssembly.instantiateStreaming(r,e).then(t,function(r){return y(`wasm streaming compile failed: ${r}`),y(`falling back to ArrayBuffer instantiation`),se(n,e,t)}))}var le,ue,de={569592:(e,t,n,r,i)=>{if(typeof window>`u`||(window.AudioContext||window.webkitAudioContext)===void 0)return 0;if(window.h===void 0){window.h={Ea:0},window.h.I={},window.h.I.Ba=e,window.h.I.capture=t,window.h.I.Pa=n,window.h.ha={},window.h.ha.stopped=r,window.h.ha.ub=i;let a=window.h;a.C=[],a.mc=function(e){for(var t=0;t<a.C.length;++t)if(a.C[t]==null)return a.C[t]=e,t;return a.C.push(e),a.C.length-1},a.yb=function(e){for(a.C[e]=null;0<a.C.length&&a.C[a.C.length-1]==null;)a.C.pop()},a.Tc=function(e){for(var t=0;t<a.C.length;++t)if(a.C[t]==e)return a.yb(t)},a.sa=function(e){return a.C[e]},a.Xa=[`touchend`,`click`],a.unlock=function(){for(var e=0;e<a.C.length;++e){var t=a.C[e];t!=null&&t.K!=null&&t.state===a.ha.ub&&t.K.resume().then(()=>{xr(t.nb)},e=>{console.error(`Failed to resume audiocontext`,e)})}a.Xa.map(function(e){document.removeEventListener(e,a.unlock,!0)})},a.Xa.map(function(e){document.addEventListener(e,a.unlock,!0)})}return window.h.Ea+=1,1},571770:()=>{window.h!==void 0&&(window.h.Xa.map(function(e){document.removeEventListener(e,window.h.unlock,!0)}),--window.h.Ea,window.h.Ea===0&&delete window.h)},572074:()=>navigator.mediaDevices!==void 0&&navigator.mediaDevices.getUserMedia!==void 0,572178:()=>{try{var e=new(window.AudioContext||window.webkitAudioContext),t=e.sampleRate;return e.close(),t}catch{return 0}},572349:(e,t,n,r,i,a)=>{if(window.h===void 0)return-1;var o={},s={};return e==window.h.I.Ba&&n!=0&&(s.sampleRate=n),o.K=new(window.AudioContext||window.webkitAudioContext)(s),o.K.suspend(),o.state=window.h.ha.stopped,n=0,e!=window.h.I.Ba&&(n=t),o.Y=o.K.createScriptProcessor(r,n,t),o.Y.onaudioprocess=function(n){if((o.ta==null||o.ta.length==0)&&(o.ta=new Float32Array(k.buffer,i,r*t)),e==window.h.I.capture||e==window.h.I.Pa){for(var s=0;s<t;s+=1)for(var c=n.inputBuffer.getChannelData(s),l=o.ta,u=0;u<r;u+=1)l[u*t+s]=c[u];Sr(a,r,i)}if(e==window.h.I.Ba||e==window.h.I.Pa)for(Cr(a,r,i),s=0;s<n.outputBuffer.numberOfChannels;++s)for(c=n.outputBuffer.getChannelData(s),l=o.ta,u=0;u<r;u+=1)c[u]=l[u*t+s];else for(s=0;s<n.outputBuffer.numberOfChannels;++s)n.outputBuffer.getChannelData(s).fill(0)},e!=window.h.I.capture&&e!=window.h.I.Pa||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(e){o.Fa=o.K.createMediaStreamSource(e),o.Fa.connect(o.Y),o.Y.connect(o.K.destination)}).catch(function(e){console.log(`Failed to get user media: `+e)}),e==window.h.I.Ba&&o.Y.connect(o.K.destination),o.nb=a,window.h.mc(o)},575226:e=>window.h.sa(e).K.sampleRate,575299:e=>{e=window.h.sa(e),e.Y!==void 0&&(e.Y.onaudioprocess=function(){},e.Y.disconnect(),e.Y=void 0),e.Fa!==void 0&&(e.Fa.disconnect(),e.Fa=void 0),e.K.close(),e.K=void 0,e.nb=void 0},575699:e=>{window.h.yb(e)},575749:e=>{e=window.h.sa(e),e.K.resume(),e.state=window.h.ha.ub},575888:e=>{e=window.h.sa(e),e.K.suspend(),e.state=window.h.ha.stopped}},fe=e=>{for(;0<e.length;)e.shift()(r)};function R(){var e=D[ft>>2];return ft+=4,e}var pe=(e,t)=>{for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];i===`.`?e.splice(r,1):i===`..`?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift(`..`);return e},me=e=>{var t=e.charAt(0)===`/`,n=e.substr(-1)===`/`;return(e=pe(e.split(`/`).filter(e=>!!e),!t).join(`/`))||t||(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},he=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],!e&&!t?`.`:(t&&=t.substr(0,t.length-1),e+t)},ge=e=>{if(e===`/`)return`/`;e=me(e),e=e.replace(/\/$/,``);var t=e.lastIndexOf(`/`);return t===-1?e:e.substr(t+1)},_e=()=>{if(typeof crypto==`object`&&typeof crypto.getRandomValues==`function`)return e=>crypto.getRandomValues(e);I(`initRandomDevice`)},ve=e=>(ve=_e())(e),ye=(...e)=>{for(var t=``,n=!1,r=e.length-1;-1<=r&&!n;r--){if(n=0<=r?e[r]:`/`,typeof n!=`string`)throw TypeError(`Arguments to path.resolve must be strings`);if(!n)return``;
4t=n+`/`+t,n=n.charAt(0)===`/`}return t=pe(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`},be=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0,z=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&be)return be.decode(e.subarray(t,n));for(r=``;t<n;){var i=e[t++];if(i&128){var a=e[t++]&63;if((i&224)==192)r+=String.fromCharCode((i&31)<<6|a);else{var o=e[t++]&63;i=(i&240)==224?(i&15)<<12|a<<6|o:(i&7)<<18|a<<12|o<<6|e[t++]&63,65536>i?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}}else r+=String.fromCharCode(i)}return r},xe=[],Se=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},Ce=(e,t,n,r)=>{if(!(0<r))return 0;var i=n;r=n+r-1;for(var a=0;a<e.length;++a){var o=e.charCodeAt(a);if(55296<=o&&57343>=o){var s=e.charCodeAt(++a);o=65536+((o&1023)<<10)|s&1023}if(127>=o){if(n>=r)break;t[n++]=o}else{if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6}else{if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63}t[n++]=128|o>>6&63}t[n++]=128|o&63}}return t[n]=0,n-i};function we(e,t){var n=Array(Se(e)+1);return e=Ce(e,n,0,n.length),t&&(n.length=e),n}var Te=[];function Ee(e,t){Te[e]={input:[],H:[],V:t},$e(e,De)}var De={open(e){var t=Te[e.node.Da];if(!t)throw new V(43);e.s=t,e.seekable=!1},close(e){e.s.V.ra(e.s)},ra(e){e.s.V.ra(e.s)},read(e,t,n,r){if(!e.s||!e.s.V.hb)throw new V(60);for(var i=0,a=0;a<r;a++){try{var o=e.s.V.hb(e.s)}catch{throw new V(29)}if(o===void 0&&i===0)throw new V(6);if(o==null)break;i++,t[n+a]=o}return i&&(e.node.timestamp=Date.now()),i},write(e,t,n,r){if(!e.s||!e.s.V.Sa)throw new V(60);try{for(var i=0;i<r;i++)e.s.V.Sa(e.s,t[n+i])}catch{throw new V(29)}return r&&(e.node.timestamp=Date.now()),i}},Oe={hb(){a:{if(!xe.length){var e=null;if(typeof window<`u`&&typeof window.prompt==`function`&&(e=window.prompt(`Input: `),e!==null&&(e+=` 5`)),!e){e=null;break a}xe=we(e,!0)}e=xe.shift()}return e},Sa(e,t){t===null||t===10?(v(z(e.H,0)),e.H=[]):t!=0&&e.H.push(t)},ra(e){e.H&&0<e.H.length&&(v(z(e.H,0)),e.H=[])},Wb(){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]}},Xb(){return 0},Yb(){return[24,80]}},ke={Sa(e,t){t===null||t===10?(y(z(e.H,0)),e.H=[]):t!=0&&e.H.push(t)},ra(e){e.H&&0<e.H.length&&(y(z(e.H,0)),e.H=[])}};function Ae(e,t){var n=e.l?e.l.length:0;n>=t||(t=Math.max(t,n*(1048576>n?2:1.125)>>>0),n!=0&&(t=Math.max(t,256)),n=e.l,e.l=new Uint8Array(t),0<e.v&&e.l.set(n.subarray(0,e.v),0))}var B={N:null,U(){return B.createNode(null,`/`,16895,0)},createNode(e,t,n,r){if((n&61440)==24576||(n&61440)==4096)throw new V(63);return B.N||={dir:{node:{X:B.j.X,P:B.j.P,ka:B.j.ka,za:B.j.za,sb:B.j.sb,xb:B.j.xb,tb:B.j.tb,rb:B.j.rb,Ga:B.j.Ga},stream:{aa:B.m.aa}},file:{node:{X:B.j.X,P:B.j.P},stream:{aa:B.m.aa,read:B.m.read,write:B.m.write,$a:B.m.$a,jb:B.m.jb,lb:B.m.lb}},link:{node:{X:B.j.X,P:B.j.P,la:B.j.la},stream:{}},ab:{node:{X:B.j.X,P:B.j.P},stream:Qe}},n=Ge(e,t,n,r),(n.mode&61440)==16384?(n.j=B.N.dir.node,n.m=B.N.dir.stream,n.l={}):(n.mode&61440)==32768?(n.j=B.N.file.node,n.m=B.N.file.stream,n.v=0,n.l=null):(n.mode&61440)==40960?(n.j=B.N.link.node,n.m=B.N.link.stream):(n.mode&61440)==8192&&(n.j=B.N.ab.node,n.m=B.N.ab.stream),n.timestamp=Date.now(),e&&(e.l[t]=n,e.timestamp=n.timestamp),n},Fc(e){return e.l?e.l.subarray?e.l.subarray(0,e.v):new Uint8Array(e.l):new Uint8Array},j:{X(e){var t={};return t.Cc=(e.mode&61440)==8192?e.id:1,t.Hc=e.id,t.mode=e.mode,t.Nc=1,t.uid=0,t.Gc=0,t.Da=e.Da,(e.mode&61440)==16384?t.size=4096:(e.mode&61440)==32768?t.size=e.v:(e.mode&61440)==40960?t.size=e.link.length:t.size=0,t.tc=new Date(e.timestamp),t.Mc=new Date(e.timestamp),t.Ac=new Date(e.timestamp),t.Gb=4096,t.uc=Math.ceil(t.size/t.Gb),t},P(e,t){if(t.mode!==void 0&&(e.mode=t.mode),t.timestamp!==void 0&&(e.timestamp=t.timestamp),t.size!==void 0&&(t=t.size,e.v!=t))if(t==0)e.l=null,e.v=0;else{var n=e.l;e.l=new Uint8Array(t),n&&e.l.set(n.subarray(0,Math.min(t,e.v))),e.v=t}},ka(){throw Re[44]},za(e,t,n,r){return B.createNode(e,t,n,r)},sb(e,t,n){if((e.mode&61440)==16384){try{var r=We(t,n)}catch{}if(r)for(var i in r.l)throw new V(55)}delete e.parent.l[e.name],e.parent.timestamp=Date.now(),e.name=n,t.l[n]=e,t.timestamp=e.parent.timestamp},xb(e,t){delete e.l[t],e.timestamp=Date.now()},tb(e,t){var n=We(e,t),r;for(r in n.l)throw new V(55);delete e.l[t],e.timestamp=Date.now()},rb(e){var t=[`.`,`..`],n;for(n of Object.keys(e.l))t.push(n);return t},Ga(e,t,n){return e=B.createNode(e,t,41471,0),e.link=n,e},la(e){if((e.mode&61440)!=40960)throw new V(28);return e.link}}
5,m:{read(e,t,n,r,i){var a=e.node.l;if(i>=e.node.v)return 0;if(e=Math.min(e.node.v-i,r),8<e&&a.subarray)t.set(a.subarray(i,i+e),n);else for(r=0;r<e;r++)t[n+r]=a[i+r];return e},write(e,t,n,r,i,a){if(t.buffer===C.buffer&&(a=!1),!r)return 0;if(e=e.node,e.timestamp=Date.now(),t.subarray&&(!e.l||e.l.subarray)){if(a)return e.l=t.subarray(n,n+r),e.v=r;if(e.v===0&&i===0)return e.l=t.slice(n,n+r),e.v=r;if(i+r<=e.v)return e.l.set(t.subarray(n,n+r),i),r}if(Ae(e,i+r),e.l.subarray&&t.subarray)e.l.set(t.subarray(n,n+r),i);else for(a=0;a<r;a++)e.l[i+a]=t[n+a];return e.v=Math.max(e.v,i+r),r},aa(e,t,n){if(n===1?t+=e.position:n===2&&(e.node.mode&61440)==32768&&(t+=e.node.v),0>t)throw new V(28);return t},$a(e,t,n){Ae(e.node,t+n),e.node.v=Math.max(e.node.v,t+n)},jb(e,t,n,r,i){if((e.node.mode&61440)!=32768)throw new V(43);if(e=e.node.l,i&2||e.buffer!==C.buffer){if((0<n||n+t<e.length)&&(e=e.subarray?e.subarray(n,n+t):Array.prototype.slice.call(e,n,n+t)),n=!0,I(),t=void 0,!t)throw new V(48);C.set(e,t)}else n=!1,t=e.byteOffset;return{o:t,sc:n}},lb(e,t,n,r){return B.m.write(e,t,0,r,n,!1),0}}},je=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},Me=null,Ne={},Pe=[],Fe=1,Ie=null,Le=!0,V=class{constructor(e){this.name=`ErrnoError`,this.$=e}},Re={},ze=class{constructor(){this.h={},this.node=null}get flags(){return this.h.flags}set flags(e){this.h.flags=e}get position(){return this.h.position}set position(e){this.h.position=e}},Be=class{constructor(e,t,n,r){e||=this,this.parent=e,this.U=e.U,this.Aa=null,this.id=Fe++,this.name=t,this.mode=n,this.j={},this.m={},this.Da=r}get read(){return(this.mode&365)==365}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)==146}set write(e){e?this.mode|=146:this.mode&=-147}};function Ve(e,t={}){if(e=ye(e),!e)return{path:``,node:null};if(t=Object.assign({gb:!0,Ua:0},t),8<t.Ua)throw new V(32);e=e.split(`/`).filter(e=>!!e);for(var n=Me,r=`/`,i=0;i<e.length;i++){var a=i===e.length-1;if(a&&t.parent)break;if(n=We(n,e[i]),r=me(r+`/`+e[i]),n.Aa&&(!a||a&&t.gb)&&(n=n.Aa.root),!a||t.fb){for(a=0;(n.mode&61440)==40960;)if(n=it(r),r=ye(he(r),n),n=Ve(r,{Ua:t.Ua+1}).node,40<a++)throw new V(32)}}return{path:r,node:n}}function He(e){for(var t;;){if(e===e.parent)return e=e.U.kb,t?e[e.length-1]===`/`?e+t:`${e}/${t}`:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function Ue(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%Ie.length}function We(e,t){var n=(e.mode&61440)==16384?(n=qe(e,`x`))?n:e.j.ka?0:2:54;if(n)throw new V(n);for(n=Ie[Ue(e.id,t)];n;n=n.ac){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return e.j.ka(e,t)}function Ge(e,t,n,r){return e=new Be(e,t,n,r),t=Ue(e.parent.id,e.name),e.ac=Ie[t],Ie[t]=e}function Ke(e){var t=[`r`,`w`,`rw`][e&3];return e&512&&(t+=`w`),t}function qe(e,t){if(Le)return 0;if(!t.includes(`r`)||e.mode&292){if(t.includes(`w`)&&!(e.mode&146)||t.includes(`x`)&&!(e.mode&73))return 2}else return 2;return 0}function Je(e,t){try{return We(e,t),20}catch{}return qe(e,`wx`)}function Ye(e){if(e=Pe[e],!e)throw new V(8);return e}function Xe(e,t=-1){if(e=Object.assign(new ze,e),t==-1)a:{for(t=0;4096>=t;t++)if(!Pe[t])break a;throw new V(33)}return e.W=t,Pe[t]=e}function Ze(e,t=-1){return e=Xe(e,t),e.m?.Ec?.(e),e}var Qe={open(e){e.m=Ne[e.node.Da].m,e.m.open?.(e)},aa(){throw new V(70)}};function $e(e,t){Ne[e]={m:t}}function et(e,t){var n=t===`/`;if(n&&Me)throw new V(10);if(!n&&t){var r=Ve(t,{gb:!1});if(t=r.path,r=r.node,r.Aa)throw new V(10);if((r.mode&61440)!=16384)throw new V(54)}t={type:e,Pc:{},kb:t,Zb:[]},e=e.U(t),e.U=t,t.root=e,n?Me=e:r&&(r.Aa=t,r.U&&r.U.Zb.push(t))}function tt(e,t,n){var r=Ve(e,{parent:!0}).node;if(e=ge(e),!e||e===`.`||e===`..`)throw new V(28);var i=Je(r,e);if(i)throw new V(i);if(!r.j.za)throw new V(63);return r.j.za(r,e,t,n)}function H(e){return tt(e,16895,0)}function nt(e,t,n){n===void 0&&(n=t,t=438),tt(e,t|8192,n)}function rt(e,t){if(!ye(e))throw new V(44);var n=Ve(t,{parent:!0}).node;if(!n)throw new V(44);t=ge(t);var r=Je(n,t);if(r)throw new V(r);if(!n.j.Ga)throw new V(63);n.j.Ga(n,t,e)}function it(e){if(e=Ve(e).node,!e)throw new V(44);if(!e.j.la)throw new V(28);return ye(He(e.parent),e.j.la(e))}function at(e,t,n){if(e===``)throw new V(44);if(typeof t==`string`){var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(i===void 0)throw Error(`Unknown file open mode: ${t}`);t=i}if(n=t&64?(n===void 0?438:n)&4095|32768:0,typeof e==`object`)var a=e;else{e=me(e);try{a=Ve(e,{fb:!(t&131072)}).node}catch{}}if(i=!1,t&64)if(a){if(t&128)throw new V(20)}else a=tt(e,n,0),i=!0;if(!a)throw new V(44);if((a.mode&61440)==8192&&(t&=-513),t&65536&&(a.mode&61440)!=16384)throw new V(54);if(!i&&(n=a?(a.mode&61440)==40960?32:(a.mode&61440)==16384&&(Ke(t)!==`r`||t&512)?31:qe(a,Ke(t)):44))throw new V(n);if(t&512&&!i){if(n=a,n=typeof n==`string`?Ve(n,{fb:!0}).node:n,!n.j.P)throw new V(63);if((n.mode&61440)==16384)throw new V(31);if((n.mode&61440)!=32768)throw new V(28);if(i=qe(n,`w`))throw new V(i);n.j.P(n,{size:0,timestamp:Date.now()})}return t&=-131713,a=Xe({node:a,path:He(a),flags:t,seekable:!0,position:0,m:a.m,nc:[],error:!1}),a.m.open&&a.m.open(a),!r.logReadFiles||t&1||(dt||={},e in dt||(dt[e]=1)),a}function ot(e,t,n){if(e.W===null)throw new V(8);if(!e.seekable||!e.m.aa)throw new V(70);if(n!=0&&n!=1&&n!=2)throw new V(28);
5e.position=e.m.aa(e,t,n),e.nc=[]}var st;function ct(e,t,n){e=me(`/dev/`+e);var r=je(!!t,!!n);lt||=64;var i=lt++<<8|0;$e(i,{open(e){e.seekable=!1},close(){n?.buffer?.length&&n(10)},read(e,n,r,i){for(var a=0,o=0;o<i;o++){try{var s=t()}catch{throw new V(29)}if(s===void 0&&a===0)throw new V(6);if(s==null)break;a++,n[r+o]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,i){for(var a=0;a<i;a++)try{n(t[r+a])}catch{throw new V(29)}return i&&(e.node.timestamp=Date.now()),a}}),nt(e,r,i)}var lt,ut={},dt,ft=void 0,pt=(e,t)=>Object.defineProperty(t,"name",{value:e}),mt=[],ht=[],U,W=e=>{if(!e)throw new U(`Cannot use deleted val. handle = `+e);return ht[e]},gt=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=mt.pop()||ht.length;return ht[t]=e,ht[t+1]=1,t}},_t=e=>{var t=Error,n=pt(e,function(t){this.name=e,this.message=t,t=Error(t).stack,t!==void 0&&(this.stack=this.toString()+` 6`+t.replace(/^Error(:[^\n]*)?\n/,``))});return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},vt,yt,G=e=>{for(var t=``;w[e];)t+=yt[w[e++]];return t},bt=[],xt=()=>{for(;bt.length;){var e=bt.pop();e.g.ga=!1,e.delete()}},St,Ct={},wt=(e,t)=>{if(t===void 0)throw new U(`ptr should not be undefined`);for(;e.B;)t=e.na(t),e=e.B;return t},Tt={},Et=e=>{e=br(e);var t=G(e);return vr(e),t},Dt=(e,t)=>{var n=Tt[e];if(n===void 0)throw e=`${t} has unknown type ${Et(e)}`,new U(e);return n},Ot=()=>{},kt=!1,At=(e,t,n)=>t===n?e:n.B===void 0?null:(e=At(e,t,n.B),e===null?null:n.Jb(e)),jt={},Mt=(e,t)=>(t=wt(e,t),Ct[t]),Nt,Pt=(e,t)=>{if(!t.u||!t.o)throw new Nt(`makeClassHandle requires ptr and ptrType`);if(!!t.J!=!!t.D)throw new Nt(`Both smartPtrType and smartPtr must be specified`);return t.count={value:1},Ft(Object.create(e,{g:{value:t,writable:!0}}))},Ft=e=>typeof FinalizationRegistry>`u`?(Ft=e=>e,e):(kt=new FinalizationRegistry(e=>{e=e.g,--e.count.value,e.count.value===0&&(e.D?e.J.O(e.D):e.u.i.O(e.o))}),Ft=e=>{var t=e.g;return t.D&&kt.register(e,{g:t},e),e},Ot=e=>{kt.unregister(e)},Ft(e)),It={},Lt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Rt(e){return this.fromWireType(O[e>>2])}var zt={},Bt={},K=(e,t,n)=>{function r(t){if(t=n(t),t.length!==e.length)throw new Nt(`Mismatched type converter count`);for(var r=0;r<e.length;++r)q(e[r],t[r])}e.forEach(function(e){Bt[e]=t});var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{Tt.hasOwnProperty(e)?i[t]=Tt[e]:(a.push(e),zt.hasOwnProperty(e)||(zt[e]=[]),zt[e].push(()=>{i[t]=Tt[e],++o,o===a.length&&r(i)}))}),a.length===0&&r(i)};function Vt(e,t,n={}){var r=t.name;if(!e)throw new U(`type "${r}" must have a positive integer typeid pointer`);if(Tt.hasOwnProperty(e)){if(n.Tb)return;throw new U(`Cannot register type '${r}' twice`)}Tt[e]=t,delete Bt[e],zt.hasOwnProperty(e)&&(t=zt[e],delete zt[e],t.forEach(e=>e()))}function q(e,t,n={}){if(!(`argPackAdvance`in t))throw TypeError(`registerType registeredInstance requires argPackAdvance`);return Vt(e,t,n)}var Ht=e=>{throw new U(e.g.u.i.name+` instance already deleted`)};function Ut(){}var Wt=(e,t,n)=>{if(e[t].A===void 0){var r=e[t];e[t]=function(...r){if(!e[t].A.hasOwnProperty(r.length))throw new U(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].A})!`);return e[t].A[r.length].apply(this,r)},e[t].A=[],e[t].A[r.fa]=r}},Gt=(e,t,n)=>{if(r.hasOwnProperty(e)){if(n===void 0||r[e].A!==void 0&&r[e].A[n]!==void 0)throw new U(`Cannot register public name '${e}' twice`);if(Wt(r,e,e),r.hasOwnProperty(n))throw new U(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`);r[e].A[n]=t}else r[e]=t,n!==void 0&&(r[e].Oc=n)},Kt=e=>{if(e===void 0)return`_unknown`;e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e};function qt(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.M=n,this.O=r,this.B=i,this.Ob=a,this.na=o,this.Jb=s,this.ob=[]}var Jt=(e,t,n)=>{for(;t!==n;){if(!t.na)throw new U(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.na(e),t=t.B}return e};function Yt(e,t){if(t===null){if(this.Ra)throw new U(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new U(`Cannot pass "${gn(t)}" as a ${this.name}`);if(!t.g.o)throw new U(`Cannot pass deleted object as a pointer of type ${this.name}`);return Jt(t.g.o,t.g.u.i,this.i)}function Xt(e,t){if(t===null){if(this.Ra)throw new U(`null is not a valid ${this.name}`);if(this.va){var n=this.Ta();return e!==null&&e.push(this.O,n),n}return 0}if(!t||!t.g)throw new U(`Cannot pass "${gn(t)}" as a ${this.name}`);if(!t.g.o)throw new U(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ua&&t.g.u.ua)throw new U(`Cannot convert argument of type ${t.g.J?t.g.J.name:t.g.u.name} to parameter type ${this.name}`);if(n=Jt(t.g.o,t.g.u.i,this.i),this.va){if(t.g.D===void 0)throw new U(`Passing raw pointer to smart pointer is illegal`);switch(this.hc){case 0:if(t.g.J===this)n=t.g.D;else throw new U(`Cannot convert argument of type ${t.g.J?t.g.J.name:t.g.u.name} to parameter type ${this.name}`);break;case 1:n=t.g.D;break;case 2:if(t.g.J===this)n=t.g.D;else{var r=t.clone();n=this.cc(n,gt(()=>r.delete())),e!==null&&e.push(this.O,n)}break;default:throw new U(`Unsupporting sharing policy`)}}return n}function Zt(e,t){if(t===null){if(this.Ra)throw new U(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new U(`Cannot pass "${gn(t)}" as a ${this.name}`);if(!t.g.o)throw new U(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.g.u.ua)throw new U(`Cannot convert argument of type ${t.g.u.name} to parameter type ${this.name}`);return Jt(t.g.o,t.g.u.i,this.i)}function Qt(e,t,n,r,i,a,o,s,c,l,u){this.name=e,this.i=t,this.Ra=n,this.ua=r,this.va=i,this.bc=a,this.hc=o,this.qb=s,this.Ta=c,this.cc=l,this.O=u,i||t.B!==void 0?this.toWireType=Xt:(this.toWireType=r?Yt:Zt,this.L=null)}var $t=(e,t,n)=>{if(!r.hasOwnProperty(e))throw new Nt(`Replacing nonexistent public symbol`);r[e].A!==void 0&&n!==void 0?r[e].A[n]=t:(r[e]=t,r[e].fa=n)},en=[],tn,nn=e=>{var t=en[e];return t||(e>=en.length&&(en.length=e+1),en[e]=t=tn.get(e)),t},rn=(e,t,n=[])=>(e.includes(`j`)?(e=e.replace(/p/g,`i`),t=(0,r[`dynCall_`+e])(t,...n)):t=nn(t)(...n),t),an=(e,t)=>(...n)=>
6rn(e,t,n),J=(e,t)=>{e=G(e);var n=e.includes(`j`)?an(e,t):nn(t);if(typeof n!=`function`)throw new U(`unknown function pointer with signature ${e}: ${t}`);return n},on,sn=(e,t)=>{function n(e){i[e]||Tt[e]||(Bt[e]?Bt[e].forEach(n):(r.push(e),i[e]=!0))}var r=[],i={};throw t.forEach(n),new on(`${e}: `+r.map(Et).join([`, `]))};function cn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].L===void 0)return!0;return!1}function ln(e,t,n,r,i){var a=t.length;if(2>a)throw new U(`argTypes array size mismatch! Must at least get return value and 'this' types!`);var o=t[1]!==null&&n!==null,s=cn(t),c=t[0].name!==`void`,l=a-2,u=Array(l),d=[],f=[];return pt(e,function(...n){if(n.length!==l)throw new U(`function ${e} called with ${n.length} arguments, expected ${l}`);if(f.length=0,d.length=o?2:1,d[0]=i,o){var a=t[1].toWireType(f,this);d[1]=a}for(var p=0;p<l;++p)u[p]=t[p+2].toWireType(f,n[p]),d.push(u[p]);if(n=r(...d),s)Lt(f);else for(p=o?1:2;p<t.length;p++){var m=p===1?a:u[p-2];t[p].L!==null&&t[p].L(m)}return a=c?t[0].fromWireType(n):void 0,a})}var un=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(O[t+4*r>>2]);return n},dn=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.substr(0,t)},fn=(e,t,n)=>{if(!(e instanceof Object))throw new U(`${n} with invalid "this": ${e}`);if(!(e instanceof t.i.constructor))throw new U(`${n} incompatible with "this" of type ${e.constructor.name}`);if(!e.g.o)throw new U(`cannot call emscripten binding method ${n} on deleted object`);return Jt(e.g.o,e.g.u.i,t.i)},pn=e=>{9<e&&--ht[e+1]===0&&(ht[e]=void 0,mt.push(e))},mn={name:`emscripten::val`,fromWireType:e=>{var t=W(e);return pn(e),t},toWireType:(e,t)=>gt(t),argPackAdvance:8,readValueFromPointer:Rt,L:null},hn=(e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(C[e])}:function(e){return this.fromWireType(w[e])};case 2:return n?function(e){return this.fromWireType(T[e>>1])}:function(e){return this.fromWireType(E[e>>1])};case 4:return n?function(e){return this.fromWireType(D[e>>2])}:function(e){return this.fromWireType(O[e>>2])};default:throw TypeError(`invalid integer width (${t}): ${e}`)}},gn=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e},_n=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(k[e>>2])};case 8:return function(e){return this.fromWireType(A[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},vn=(e,t,n)=>{switch(t){case 1:return n?e=>C[e]:e=>w[e];case 2:return n?e=>T[e>>1]:e=>E[e>>1];case 4:return n?e=>D[e>>2]:e=>O[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},yn=typeof TextDecoder<`u`?new TextDecoder(`utf-16le`):void 0,bn=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&E[n];)++n;if(n<<=1,32<n-e&&yn)return yn.decode(w.subarray(e,n));for(n=``,r=0;!(r>=t/2);++r){var i=T[e+2*r>>1];if(i==0)break;n+=String.fromCharCode(i)}return n},xn=(e,t,n)=>{if(n??=2147483647,2>n)return 0;n-=2;var r=t;n=n<2*e.length?n/2:e.length;for(var i=0;i<n;++i)T[t>>1]=e.charCodeAt(i),t+=2;return T[t>>1]=0,t-r},Sn=e=>2*e.length,Cn=(e,t)=>{for(var n=0,r=``;!(n>=t/4);){var i=D[e+4*n>>2];if(i==0)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023)):r+=String.fromCharCode(i)}return r},wn=(e,t,n)=>{if(n??=2147483647,4>n)return 0;var r=t;n=r+n-4;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a){var o=e.charCodeAt(++i);a=65536+((a&1023)<<10)|o&1023}if(D[t>>2]=a,t+=4,t+4>n)break}return D[t>>2]=0,t-r},Tn=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);55296<=r&&57343>=r&&++n,t+=4}return t},En=(e,t,n)=>{var r=[];return e=e.toWireType(r,n),r.length&&(O[t>>2]=gt(r)),e},Dn=[],On={},kn=e=>{var t=On[e];return t===void 0?G(e):t},An=e=>{var t=Dn.length;return Dn.push(e),t},jn=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=Dt(O[t+4*r>>2],`parameter `+r);return n},Mn=Reflect.construct,Nn=e=>e%4==0&&(e%100!=0||e%400==0),Pn=[0,31,60,91,121,152,182,213,244,274,305,335],Fn=[0,31,59,90,120,151,181,212,243,273,304,334],In=[],Ln=e=>{e.Dc=e.getExtension(`WEBGL_draw_instanced_base_vertex_base_instance`)},Rn=e=>{e.Lc=e.getExtension(`WEBGL_multi_draw_instanced_base_vertex_base_instance`)},zn=e=>{var t=`EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw`.split(` `);
6return(e.getSupportedExtensions()||[]).filter(e=>t.includes(e))},Bn=1,Vn=[],Y=[],Hn=[],Un=[],Wn=[],Gn=[],Kn=[],X=[],qn={},Jn=4,Yn=0,Xn=e=>{for(var t=Bn++,n=e.length;n<t;n++)e[n]=null;return t},Zn=(e,t,n,r)=>{for(var i=0;i<e;i++){var a=Q[n](),o=a&&Xn(r);a?(a.name=o,r[o]=a):Z||=1282,D[t+4*i>>2]=o}},Qn=(e,t)=>{var n=Xn(X),r={handle:n,attributes:t,version:t.Kc,F:e};return e.canvas&&(e.canvas.zb=r),X[n]=r,(t.Kb===void 0||t.Kb)&&er(r),n},$n=e=>(tr=X[e],r.Bc=Q=tr?.F,!(e&&!Q)),er=e=>{if(e||=tr,!e.Ub){e.Ub=!0;var t=e.F;Ln(t),Rn(t),2<=e.version&&(t.cb=t.getExtension(`EXT_disjoint_timer_query_webgl2`)),(2>e.version||!t.cb)&&(t.cb=t.getExtension(`EXT_disjoint_timer_query`)),t.$b=t.getExtension(`WEBGL_multi_draw`),zn(t).forEach(e=>{e.includes(`lose_context`)||e.includes(`debug`)||t.getExtension(e)})}},Z,tr,nr={},rr=()=>{if(!ir){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(typeof navigator==`object`&&navigator.languages&&navigator.languages[0]||`C`).replace(`-`,`_`)+`.UTF-8`,_:m||`./this.program`},t;for(t in nr)nr[t]===void 0?delete e[t]:e[t]=nr[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);ir=n}return ir},ir,ar=[];function or(){var e=zn(Q);return e=e.concat(e.map(e=>`GL_`+e))}var sr=(e,t)=>
6{if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return;case 34814:case 36345:n=0;break;case 34466:var r=Q.getParameter(34467);n=r?r.length:0;break;case 33309:if(2>tr.version){Z||=1282;return}n=or().length;break;case 33307:case 33308:if(2>tr.version){Z||=1280;return}n=e==33307?3:0}if(n===void 0)switch(r=Q.getParameter(e),typeof r){case`number`:n=r;break;case`boolean`:n=+!!r;break;case`string`:Z||=1280;return;case`object`:if(r===null)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:Z||=1280;return}else{if(r instanceof Float32Array||r instanceof Uint32Array||r instanceof Int32Array||r instanceof Array){for(e=0;e<r.length;++e)D[t+4*e>>2]=r[e];return}try{n=r.name|0}catch(t){Z||=1280,y(`GL_INVALID_ENUM in glGet0v: Unknown object returned from WebGL getParameter(${e})! (error: ${t})`);return}}break;default:Z||=1280,y(`GL_INVALID_ENUM in glGet0v: Native code calling glGet0v(${e}) and it returns ${r} of type ${typeof r}!`);return}D[t>>2]=n}else Z||=1281},cr=e=>{var t=Se(e)+1,n=yr(t);return n&&Ce(e,w,n,t),n},lr=e=>e.slice(-1)==`]`&&e.lastIndexOf(`[`),ur=e=>(e-=5120,e==0?C:e==1?w:e==2?T:e==4?D:e==6?k:e==5||e==28922||e==28520||e==30779||e==30782?O:E),dr=[31,29,31,30,31,30,31,31,30,31,30,31],fr=[31,28,31,30,31,30,31,31,30,31,30,31],pr=(e,t,n,r)=>{function i(e,t,n){for(e=typeof e==`number`?e.toString():e||``;e.length<t;)e=n[0]+e;return e}function a(e,t){return i(e,t,`0`)}function o(e,t){function n(e){return 0>e?-1:+(0<e)}var r;return(r=n(e.getFullYear()-t.getFullYear()))===0&&(r=n(e.getMonth()-t.getMonth()))===0&&(r=n(e.getDate()-t.getDate())),r}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function c(e){var t=e.ba;for(e=new Date(new Date(e.ca+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(Nn(e.getFullYear())?dr:fr)[n];if(t>r-e.getDate())t-=r-e.getDate()+1,e.setDate(1),11>n?e.setMonth(n+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1));else{e.setDate(e.getDate()+t);break}}return n=new Date(e.getFullYear()+1,0,4),t=s(new Date(e.getFullYear(),0,4)),n=s(n),0>=o(t,e)?0>=o(n,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var l=O[r+40>>2];for(var u in r={kc:D[r>>2],jc:D[r+4>>2],Ha:D[r+8>>2],Va:D[r+12>>2],Ia:D[r+16>>2],ca:D[r+20>>2],R:D[r+24>>2],ba:D[r+28>>2],Sc:D[r+32>>2],ic:D[r+36>>2],lc:l&&l?z(w,l):``},n=n?z(w,n):``,l={"%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`},l)n=n.replace(new RegExp(u,`g`),l[u]);var d=`Sunday Monday Tuesday Wednesday Thursday Friday Saturday`.split(` `),f=`January February March April May June July August September October November December`.split(` `);for(u in l={"%a":e=>d[e.R].substring(0,3),"%A":e=>d[e.R],"%b":e=>f[e.Ia].substring(0,3),"%B":e=>f[e.Ia],"%C":e=>a((e.ca+1900)/100|0,2),"%d":e=>a(e.Va,2),"%e":e=>i(e.Va,2,` `),"%g":e=>c(e).toString().substring(2),"%G":c,"%H":e=>a(e.Ha,2),"%I":e=>(e=e.Ha,e==0?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.Ia-1;t+=(Nn(e.ca+1900)?dr:fr)[n++]);return a(e.Va+t,3)},"%m":e=>a(e.Ia+1,2),"%M":e=>a(e.jc,2),"%n":()=>` 7`,"%p":e=>0<=e.Ha&&12>e.Ha?`AM`:`PM`,"%S":e=>a(e.kc,2),"%t":()=>` `,"%u":e=>e.R||7,"%U":e=>a(Math.floor((e.ba+7-e.R)/7),2),"%V":e=>{var t=Math.floor((e.ba+7-(e.R+6)%7)/7);if(2>=(e.R+371-e.ba-2)%7&&t++,t)t==53&&(n=(e.R+371-e.ba)%7,n==4||n==3&&Nn(e.ca)||(t=1));else{t=52;var n=(e.R+7-e.ba-1)%7;(n==4||n==5&&Nn(e.ca%400-1))&&t++}return a(t,2)},"%w":e=>e.R,"%W":e=>a(Math.floor((e.ba+7-(e.R+6)%7)/7),2),"%y":e=>(e.ca+1900).toString().substring(2),"%Y":e=>e.ca+1900,"%z":e=>{e=e.ic;var t=0<=e;return e=Math.abs(e)/60,(t?`+`:`-`)+String(`0000`+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.lc,"%%":()=>`%`},n=n.replace(/%%/g,`\0\0`),l)n.includes(u)&&(n=n.replace(new RegExp(u,`g`),l[u](r)));return n=n.replace(/\0\0/g,`%`),u=we(n,!1),u.length>t?0:(C.set(u,e),u.length-1)};
7[44].forEach(e=>{Re[e]=new V(e),Re[e].stack=`<generic error, no stack>`}),Ie=Array(4096),et(B,`/`),H(`/tmp`),H(`/home`),H(`/home/web_user`),(function(){H(`/dev`),$e(259,{read:()=>0,write:(e,t,n,r)=>r}),nt(`/dev/null`,259),Ee(1280,Oe),Ee(1536,ke),nt(`/dev/tty`,1280),nt(`/dev/tty1`,1536);var e=new Uint8Array(1024),t=0,n=()=>(t===0&&(t=ve(e).byteLength),e[--t]);ct(`random`,n),ct(`urandom`,n),H(`/dev/shm`),H(`/dev/shm/tmp`)})(),(function(){H(`/proc`);var e=H(`/proc/self`);H(`/proc/self/fd`),et({U(){var t=Ge(e,`fd`,16895,73);return t.j={ka(e,t){var n=Ye(+t);return e={parent:null,U:{kb:`fake`},j:{la:()=>n.path}},e.parent=e}},t}},`/proc/self/fd`)})(),U=r.BindingError=class extends Error{constructor(e){super(e),this.name=`BindingError`}},ht.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=()=>ht.length/2-5-mt.length,vt=r.PureVirtualError=_t(`PureVirtualError`);for(var mr=Array(256),hr=0;256>hr;++hr)mr[hr]=String.fromCharCode(hr);yt=mr,r.getInheritedInstanceCount=()=>Object.keys(Ct).length,r.getLiveInheritedInstances=()=>{var e=[],t;for(t in Ct)Ct.hasOwnProperty(t)&&e.push(Ct[t]);return e},r.flushPendingDeletes=xt,r.setDelayFunction=e=>{St=e,bt.length&&St&&St(xt)},Nt=r.InternalError=class extends Error{constructor(e){super(e),this.name=`InternalError`}},Object.assign(Ut.prototype,{isAliasOf:function(e){if(!(this instanceof Ut&&e instanceof Ut))return!1;var t=this.g.u.i,n=this.g.o;e.g=e.g;var r=e.g.u.i;for(e=e.g.o;t.B;)n=t.na(n),t=t.B;for(;r.B;)e=r.na(e),r=r.B;return t===r&&n===e},clone:function(){if(this.g.o||Ht(this),this.g.ia)return this.g.count.value+=1,this;var e=Ft,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.g;return e=e(n.call(t,r,{g:{value:{count:i.count,ga:i.ga,ia:i.ia,o:i.o,u:i.u,D:i.D,J:i.J}}})),e.g.count.value+=1,e.g.ga=!1,e},delete(){if(this.g.o||Ht(this),this.g.ga&&!this.g.ia)throw new U(`Object already scheduled for deletion`);Ot(this);var e=this.g;--e.count.value,e.count.value===0&&(e.D?e.J.O(e.D):e.u.i.O(e.o)),this.g.ia||(this.g.D=void 0,this.g.o=void 0)},isDeleted:function(){return!this.g.o},deleteLater:function(){if(this.g.o||Ht(this),this.g.ga&&!this.g.ia)throw new U(`Object already scheduled for deletion`);return bt.push(this),bt.length===1&&St&&St(xt),this.g.ga=!0,this}}),Object.assign(Qt.prototype,{Pb(e){return this.qb&&(e=this.qb(e)),e},bb(e){this.O?.(e)},argPackAdvance:8,readValueFromPointer:Rt,fromWireType:function(e){function t(){return this.va?Pt(this.i.M,{u:this.bc,o:n,J:this,D:e}):Pt(this.i.M,{u:this,o:e})}var n=this.Pb(e);if(!n)return this.bb(e),null;var r=Mt(this.i,n);if(r!==void 0)return r.g.count.value===0?(r.g.o=n,r.g.D=e,r.clone()):(r=r.clone(),this.bb(e),r);if(r=this.i.Ob(n),r=jt[r],!r)return t.call(this);r=this.ua?r.Hb:r.pointerType;var i=At(n,this.i,r.i);return i===null?t.call(this):this.va?Pt(r.i.M,{u:r,o:i,J:this,D:e}):Pt(r.i.M,{u:r,o:i})}}),on=r.UnboundTypeError=_t(`UnboundTypeError`);for(var Q,gr=0;32>gr;++gr)ar.push(Array(gr));var _r={__syscall_fcntl64:function(e,t,n){ft=n;try{var r=Ye(e);switch(t){case 0:var i=R();if(0>i)break;for(;Pe[i];)i++;return Ze(r,i).W;case 1:case 2:return 0;case 3:return r.flags;case 4:return i=R(),r.flags|=i,0;case 12:return i=R(),T[i+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return-e.$}},__syscall_ioctl:function(e,t,n){ft=n;try{var r=Ye(e);switch(t){case 21509:return r.s?0:-59;case 21505:if(!r.s)return-59;if(r.s.V.Wb){e=[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];var i=R();D[i>>2]=25856,D[i+4>>2]=5,D[i+8>>2]=191,D[i+12>>2]=35387;for(var a=0;32>a;a++)C[i+a+17]=e[a]||0}return 0;case 21510:case 21511:case 21512:return r.s?0:-59;case 21506:case 21507:case 21508:if(!r.s)return-59;if(r.s.V.Xb)for(i=R(),e=[],a=0;32>a;a++)e.push(C[i+a+17]);return 0;case 21519:return r.s?(i=R(),D[i>>2]=0):-59;case 21520:return r.s?-28:-59;case 21531:if(i=R(),!r.m.Vb)throw new V(59);return r.m.Vb(r,t,i);case 21523:return r.s?(r.s.V.Yb&&(a=[24,80],i=R(),T[i>>1]=a[0],T[i+2>>1]=a[1]),0):-59;case 21524:return r.s?0:-59;case 21515:return r.s?0:-59;default:return-28}}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return-e.$}}
7,__syscall_openat:function(e,t,n,r){ft=r;try{t=t?z(w,t):``;var i=t;if(i.charAt(0)===`/`)t=i;else{var a=e===-100?`/`:Ye(e).path;if(i.length==0)throw new V(44);t=me(a+`/`+i)}var o=r?R():0;return at(t,n,o).W}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return-e.$}},_abort_js:()=>{I(``)},_embind_create_inheriting_constructor:(e,t,n)=>{e=G(e),t=Dt(t,`wrapper`),n=W(n);var r=t.i,i=r.M,a=r.B.M,o=r.B.constructor;return e=pt(e,function(...e){r.B.ob.forEach(function(e){if(this[e]===a[e])throw new vt(`Pure virtual function ${e} must be implemented in JavaScript`)}.bind(this)),Object.defineProperty(this,"__parent",{value:i}),this.__construct(...e)}),i.__construct=function(...e){if(this===i)throw new U(`Pass correct 'this' to __construct`);e=o.implement(this,...e),Ot(e);var t=e.g;if(e.notifyOnDestruction(),t.ia=!0,Object.defineProperties(this,{g:{value:t}}),Ft(this),e=t.o,e=wt(r,e),Ct.hasOwnProperty(e))throw new U(`Tried to register registered instance: ${e}`);Ct[e]=this},i.__destruct=function(){if(this===i)throw new U(`Pass correct 'this' to __destruct`);Ot(this);var e=this.g.o;if(e=wt(r,e),Ct.hasOwnProperty(e))delete Ct[e];else throw new U(`Tried to unregister unregistered instance: ${e}`)},e.prototype=Object.create(i),Object.assign(e.prototype,n),gt(e)},_embind_finalize_value_object:e=>{var t=It[e];delete It[e];var n=t.Ta,r=t.O,i=t.eb,a=i.map(e=>e.Sb).concat(i.map(e=>e.ec));K([e],a,e=>{var a={};return i.forEach((t,n)=>{var r=e[n],o=t.Qb,s=t.Rb,c=e[n+i.length],l=t.dc,u=t.fc;a[t.Mb]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];l(u,e,c.toWireType(n,t)),Lt(n)}}}),[{name:t.name,fromWireType:e=>{var t={},n;for(n in a)t[n]=a[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var i in a)if(!(i in t))throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return e!==null&&e.push(r,o),o},argPackAdvance:8,readValueFromPointer:Rt,L:r}]})},_embind_register_bigint:()=>{},_embind_register_bool:(e,t,n,r)=>{t=G(t),q(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(w[e])},L:null})},_embind_register_class:(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=G(u),a=J(i,a),s&&=J(o,s),l&&=J(c,l),f=J(d,f);var p=Kt(u);Gt(p,function(){sn(`Cannot construct ${u} due to unbound types`,[r])}),K([e,t,n],r?[r]:[],t=>{if(t=t[0],r)var n=t.i,i=n.M;else i=Ut.prototype;t=pt(u,function(...e){if(Object.getPrototypeOf(this)!==o)throw new U(`Use 'new' to construct `+u);if(c.Z===void 0)throw new U(u+` has no accessible constructor`);var t=c.Z[e.length];if(t===void 0)throw new U(`Tried to invoke ctor of ${u} with invalid number of parameters (${e.length}) - expected (${Object.keys(c.Z).toString()}) parameters instead!`);return t.apply(this,e)});var o=Object.create(i,{constructor:{value:t}});t.prototype=o;var c=new qt(u,t,o,f,n,a,s,l);if(c.B){var d;(d=c.B).oa??(d.oa=[]),c.B.oa.push(c)}
7return n=new Qt(u,c,!0,!1,!1),d=new Qt(u+`*`,c,!1,!1,!1),i=new Qt(u+` const*`,c,!1,!0,!1),jt[e]={pointerType:d,Hb:i},$t(p,t),[n,d,i]})},_embind_register_class_class_function:(e,t,n,r,i,a,o)=>{var s=un(n,r);t=G(t),t=dn(t),a=J(i,a),K([],[e],e=>{function r(){sn(`Cannot call ${i} due to unbound types`,s)}e=e[0];var i=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]);var c=e.i.constructor;return c[t]===void 0?(r.fa=n-1,c[t]=r):(Wt(c,t,i),c[t].A[n-1]=r),K([],s,r=>{if(r=ln(i,[r[0],null].concat(r.slice(1)),null,a,o),c[t].A===void 0?(r.fa=n-1,c[t]=r):c[t].A[n-1]=r,e.i.oa)for(let n of e.i.oa)n.constructor.hasOwnProperty(t)||(n.constructor[t]=r);return[]}),[]})},_embind_register_class_class_property:(e,t,n,r,i,a,o,s)=>{t=G(t),a=J(i,a),K([],[e],e=>{e=e[0];var i=`${e.name}.${t}`,c={get(){sn(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return c.set=s?()=>{sn(`Cannot access ${i} due to unbound types`,[n])}:()=>{throw new U(`${i} is a read-only property`)},Object.defineProperty(e.i.constructor,t,c),K([],[n],n=>{n=n[0];var i={get(){return n.fromWireType(a(r))},enumerable:!0};return s&&(s=J(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),Lt(t)}),Object.defineProperty(e.i.constructor,t,i),[]}),[]})},_embind_register_class_constructor:(e,t,n,r,i,a)=>{var o=un(t,n);i=J(r,i),K([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(e.i.Z===void 0&&(e.i.Z=[]),e.i.Z[t-1]!==void 0)throw new U(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.i.Z[t-1]=()=>{sn(`Cannot construct ${e.name} due to unbound types`,o)},K([],o,r=>(r.splice(1,0,null),e.i.Z[t-1]=ln(n,r,null,i,a),[])),[]})},_embind_register_class_function:(e,t,n,r,i,a,o,s)=>{var c=un(n,r);t=G(t),t=dn(t),a=J(i,a),K([],[e],e=>{function r(){sn(`Cannot call ${i} due to unbound types`,c)}e=e[0];var i=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]),s&&e.i.ob.push(t);var l=e.i.M,u=l[t];return u===void 0||u.A===void 0&&u.className!==e.name&&u.fa===n-2?(r.fa=n-2,r.className=e.name,l[t]=r):(Wt(l,t,i),l[t].A[n-2]=r),K([],c,r=>(r=ln(i,r,e,a,o),l[t].A===void 0?(r.fa=n-2,l[t]=r):l[t].A[n-2]=r,[])),[]})},_embind_register_class_property:(e,t,n,r,i,a,o,s,c,l)=>{t=G(t),i=J(r,i),K([],[e],e=>{e=e[0];var r=`${e.name}.${t}`,u={get(){sn(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return u.set=c?()=>sn(`Cannot access ${r} due to unbound types`,[n,o]):()=>{throw new U(r+` is a read-only property`)},Object.defineProperty(e.i.M,t,u),K([],c?[n,o]:[n],n=>{var o=n[0],u={get(){var t=fn(this,e,r+` getter`);return o.fromWireType(i(a,t))},enumerable:!0};if(c){c=J(s,c);var d=n[1];u.set=function(t){var n=fn(this,e,r+` setter`),i=[];c(l,n,d.toWireType(i,t)),Lt(i)}}return Object.defineProperty(e.i.M,t,u),[]}),[]})},_embind_register_emval:e=>q(e,mn),_embind_register_enum:(e,t,n,r)=>{function i(){}t=G(t),i.values={},q(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,argPackAdvance:8,readValueFromPointer:hn(t,n,r),L:null}),Gt(t,i)},_embind_register_enum_value:(e,t,n)=>{var r=Dt(e,`enum`);t=G(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:pt(`${r.name}_${t}`,function(){})}}),e.values[n]=r,e[t]=r},_embind_register_float:(e,t,n)=>{t=G(t),q(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:_n(t,n),L:null})},_embind_register_function:(e,t,n,r,i,a)=>{var o=un(t,n);e=G(e),e=dn(e),i=J(r,i),Gt(e,function(){sn(`Cannot call ${e} due to unbound types`,o)},t-1),K([],o,n=>($t(e,ln(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]))},_embind_register_integer:(e,t,n,r,i)=>{if(t=G(t),i===-1&&(i=4294967295),i=e=>e,r===0){var a=32-8*n;i=e=>e<<a>>>a}var o=t.includes(`unsigned`)?function(e,t){return t>>>0}:function(e,t){return t};q(e,{name:t,fromWireType:i,toWireType:o,argPackAdvance:8,readValueFromPointer:vn(t,n,r!==0),L:null})},_embind_register_memory_view:(e,t,n)=>{function r(e){return new i(C.buffer,O[e+4>>2],O[e>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array
7][t];n=G(n),q(e,{name:n,fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Tb:!0})},_embind_register_std_string:(e,t)=>{t=G(t);var n=t===`std::string`;q(e,{name:t,fromWireType:function(e){var t=O[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||w[o]==0){if(i=i?z(w,i,o-i):``,s===void 0)var s=i;else s+=`\0`,s+=i;i=o+1}}else{for(s=Array(t),a=0;a<t;++a)s[a]=String.fromCharCode(w[r+a]);s=s.join(``)}return vr(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r=typeof t==`string`;if(!(r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array))throw new U(`Cannot pass non-string to std::string`);var i=n&&r?Se(t):t.length,a=yr(4+i+1),o=a+4;if(O[a>>2]=i,n&&r)Ce(t,w,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);if(255<s)throw vr(o),new U(`String has UTF-16 code units that do not fit in 8 bits`);w[o+r]=s}else for(r=0;r<i;++r)w[o+r]=t[r];return e!==null&&e.push(vr,a),a},argPackAdvance:8,readValueFromPointer:Rt,L(e){vr(e)}})},_embind_register_std_wstring:(e,t,n)=>{if(n=G(n),t===2)var r=bn,i=xn,a=Sn,o=e=>E[e>>1];else t===4&&(r=Cn,i=wn,a=Tn,o=e=>O[e>>2]);q(e,{name:n,fromWireType:e=>{for(var n=O[e>>2],i,a=e+4,s=0;s<=n;++s){var c=e+4+s*t;(s==n||o(c)==0)&&(a=r(a,c-a),i===void 0?i=a:(i+=`\0`,i+=a),a=c+t)}return vr(e),i},toWireType:(e,r)=>{if(typeof r!=`string`)throw new U(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=yr(4+o+t);return O[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(vr,s),s},argPackAdvance:8,readValueFromPointer:Rt,L(e){vr(e)}})},_embind_register_value_object:(e,t,n,r,i,a)=>{It[e]={name:G(t),Ta:J(n,r),O:J(i,a),eb:[]}},_embind_register_value_object_field:(e,t,n,r,i,a,o,s,c,l)=>{It[e].eb.push({Mb:G(t),Sb:n,Qb:J(r,i),Rb:a,ec:o,dc:J(s,c),fc:l})},_embind_register_void:(e,t)=>{t=G(t),q(e,{Ic:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:(e,t,n)=>w.copyWithin(e,t,t+n),_emscripten_throw_longjmp:()=>{throw 1/0},_emval_as:(e,t,n)=>(e=W(e),t=Dt(t,`emval::as`),En(t,n,e)),_emval_call:(e,t,n,r)=>(e=Dn[e],t=W(t),e(null,t,n,r)),_emval_call_method:(e,t,n,r,i)=>(e=Dn[e],t=W(t),n=kn(n),e(t,t[n],r,i)),_emval_decref:pn,_emval_get_method_caller:(e,t,n)=>{var r=jn(e,t),i=r.shift();e--;var a=Array(e);return t=`methodCaller<(${r.map(e=>e.name).join(`, `)}) => ${i.name}>`,An(pt(t,(t,o,s,c)=>{for(var l=0,u=0;u<e;++u)a[u]=r[u].readValueFromPointer(c+l),l+=r[u].argPackAdvance;return t=n===1?Mn(o,a):o.apply(t,a),En(i,s,t)}))},_emval_get_property:(e,t)=>(e=W(e),t=W(t),gt(e[t])),_emval_incref:e=>{9<e&&(ht[e+1]+=1)},_emval_new_array:()=>gt([]),_emval_new_cstring:e=>gt(kn(e)),_emval_new_object:()=>gt({}),_emval_run_destructors:e=>{Lt(W(e)),pn(e)},_emval_set_property:(e,t,n)=>{e=W(e),t=W(t),n=W(n),e[t]=n},_emval_take_value:(e,t)=>(e=Dt(e,`_emval_take_value`),e=e.readValueFromPointer(t),gt(e)),_gmtime_js:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),D[n>>2]=e.getUTCSeconds(),D[n+4>>2]=e.getUTCMinutes(),D[n+8>>2]=e.getUTCHours(),D[n+12>>2]=e.getUTCDate(),D[n+16>>2]=e.getUTCMonth(),D[n+20>>2]=e.getUTCFullYear()-1900,D[n+24>>2]=e.getUTCDay(),D[n+28>>2]=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0},_localtime_js:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),D[n>>2]=e.getSeconds(),D[n+4>>2]=e.getMinutes(),D[n+8>>2]=e.getHours(),D[n+12>>2]=e.getDate(),D[n+16>>2]=e.getMonth(),D[n+20>>2]=e.getFullYear()-1900,D[n+24>>2]=e.getDay(),D[n+28>>2]=(Nn(e.getFullYear())?Pn:Fn)[e.getMonth()]+e.getDate()-1|0,D[n+36>>2]=-(60*e.getTimezoneOffset()),t=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();D[n+32>>2]=(t!=r&&e.getTimezoneOffset()==Math.min(r,t))|0},_tzset_js:(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1);i=a.getTimezoneOffset();var s=o.getTimezoneOffset();O[e>>2]=60*Math.max(i,s),D[t>>2]=Number(i!=s),e=e=>e.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:`short`}).split(` `)[1],a=e(a),o=e(o),s<i?(Ce(a,w,n,17),Ce(o,w,r,17)):(Ce(a,w,r,17),Ce(o,w,n,17))},beginPixelLocalStorageWEBGL:function(e,t,n){(e=X[e].F.Ca)&&e.beginPixelLocalStorageWEBGL(r.HEAPU32.subarray(n,n+t))},decode_image:function(e,t,n){var i=r.images;i||(i=new Map,r.images=i);var a=new Image;i.set(e,a),t=r.HEAP8.subarray(t,t+n),n=new Uint8Array(n),n.set(t),a.src=URL.createObjectURL(new Blob([n],{type:`image/png`})),a.onload=function(){r._setWebImage(e,a.width,a.height)}},delete_image:function(e){var t=r.images;t&&t.get(e)&&t.delete(e)}
7,emscripten_asm_const_int:(e,t,n)=>{In.length=0;for(var r;r=w[t++];){var i=r!=105;i&=r!=112,n+=i&&n%8?4:0,In.push(r==112?O[n>>2]:r==105?D[n>>2]:A[n>>3]),n+=i?8:4}return de[e](...In)},emscripten_date_now:()=>Date.now(),emscripten_get_now:()=>performance.now(),emscripten_resize_heap:e=>{var t=w.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);var i=Math;r=Math.max(e,r);a:{i=(i.min.call(i,2147483648,r+(65536-r%65536)%65536)-x.buffer.byteLength+65535)/65536;try{x.grow(i),j();var a=1;break a}catch{}a=void 0}if(a)return!0}return!1},emscripten_webgl_enable_extension:(e,t)=>(e=X[e],t=t?z(w,t):``,t.startsWith(`GL_`)&&(t=t.substr(3)),t==`WEBGL_draw_instanced_base_vertex_base_instance`&&Ln(Q),t==`WEBGL_multi_draw_instanced_base_vertex_base_instance`&&Rn(Q),t==`WEBGL_multi_draw`&&(Q.$b=Q.getExtension(`WEBGL_multi_draw`)),!!e.F.getExtension(t)),emscripten_webgl_get_current_context:()=>tr?tr.handle:0,emscripten_webgl_make_context_current:e=>$n(e)?0:-5,enable_WEBGL_provoking_vertex:function(e){return e=X[e].F,e.pb=e.getExtension(`WEBGL_provoking_vertex`),!!e.pb},enable_WEBGL_shader_pixel_local_storage_coherent:function(e){e=X[e].F;let t=e.getExtension(`WEBGL_shader_pixel_local_storage`);return t&&t.isCoherent()&&t.framebufferTexturePixelLocalStorageWEBGL.length==5?(e.Ca=t,!0):!1},endPixelLocalStorageWEBGL:function(e,t,n){(e=X[e].F.Ca)&&e.endPixelLocalStorageWEBGL(r.HEAPU32.subarray(n,n+t))},environ_get:(e,t)=>{var n=0;return rr().forEach((r,i)=>{var a=t+n;for(i=O[e+4*i>>2]=a,a=0;a<r.length;++a)C[i++]=r.charCodeAt(a);C[i]=0,n+=r.length+1}),0},environ_sizes_get:(e,t)=>{var n=rr();O[e>>2]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),O[t>>2]=r,0},fd_close:function(e){try{var t=Ye(e);if(t.W===null)throw new V(8);t.Qa&&=null;try{t.m.close&&t.m.close(t)}catch(e){throw e}finally{Pe[t.W]=null}return t.W=null,0}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return e.$}},fd_read:function(e,t,n,r){try{a:{var i=Ye(e);e=t;for(var a,o=t=0;o<n;o++){var s=O[e>>2],c=O[e+4>>2];e+=8;var l=i,u=a,d=C;if(0>c||0>u)throw new V(28);if(l.W===null||(l.flags&2097155)==1)throw new V(8);if((l.node.mode&61440)==16384)throw new V(31);if(!l.m.read)throw new V(28);var f=u!==void 0;if(!f)u=l.position;else if(!l.seekable)throw new V(70);var p=l.m.read(l,d,s,c,u);f||(l.position+=p);var m=p;if(0>m){var h=-1;break a}if(t+=m,m<c)break;a!==void 0&&(a+=m)}h=t}return O[r>>2]=h,0}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return e.$}},fd_seek:function(e,t,n,r,i){t=n+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*n:NaN;try{if(isNaN(t))return 61;var a=Ye(e);return ot(a,t,r),ue=[a.position>>>0,(le=a.position,1<=+Math.abs(le)?0<le?Math.floor(le/4294967296)>>>0:~~+Math.ceil((le-+(~~le>>>0))/4294967296)>>>0:0)],D[i>>2]=ue[0],D[i+4>>2]=ue[1],a.Qa&&t===0&&r===0&&(a.Qa=null),0}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return e.$}},fd_write:function(e,t,n,r){try{a:{var i=Ye(e);e=t;for(var a,o=t=0;o<n;o++){var s=O[e>>2],c=O[e+4>>2];e+=8;var l=i,u=s,d=c,f=a,p=C;if(0>d||0>f)throw new V(28);if(l.W===null||!(l.flags&2097155))throw new V(8);if((l.node.mode&61440)==16384)throw new V(31);if(!l.m.write)throw new V(28);l.seekable&&l.flags&1024&&ot(l,0,2);var m=f!==void 0;if(!m)f=l.position;else if(!l.seekable)throw new V(70);var h=l.m.write(l,p,u,d,f,void 0);m||(l.position+=h);var g=h;if(0>g){var _=-1;break a}t+=g,a!==void 0&&(a+=g)}_=t}return O[r>>2]=_,0}catch(e){if(ut===void 0||e.name!==`ErrnoError`)throw e;return e.$}},framebufferPixelLocalClearValuefvWEBGL:function(e,t,n,r,i,a){(e=X[e].F.Ca)&&e.framebufferPixelLocalClearValuefvWEBGL(t,[n,r,i,a])},framebufferTexturePixelLocalStorageWEBGL:function(e,t,n,r,i,a){(e=X[e].F.Ca)&&e.framebufferTexturePixelLocalStorageWEBGL(t,Wn[n],r,i,a)},glActiveTexture:e=>Q.activeTexture(e),glAttachShader:(e,t)=>{Q.attachShader(Y[e],Gn[t])},glBindBuffer:(e,t)=>{e==35051?Q.Na=t:e==35052&&(Q.Oa=t),Q.bindBuffer(e,Vn[t])},glBindBufferRange:(e,t,n,r,i)=>{Q.bindBufferRange(e,t,Vn[n],r,i)},glBindFramebuffer:(e,t)=>{Q.bindFramebuffer(e,Hn[t])},glBindRenderbuffer:(e,t)=>{Q.bindRenderbuffer(e,Un[t])},glBindTexture:(e,t)=>
7{Q.bindTexture(e,Wn[t])},glBindVertexArray:e=>{Q.bindVertexArray(Kn[e])},glBlendEquation:e=>Q.blendEquation(e),glBlendFunc:(e,t)=>Q.blendFunc(e,t),glBlitFramebuffer:(e,t,n,r,i,a,o,s,c,l)=>Q.blitFramebuffer(e,t,n,r,i,a,o,s,c,l),glBufferData:(e,t,n,r)=>{n&&t?Q.bufferData(e,w,r,n,t):Q.bufferData(e,t,r)},glBufferSubData:(e,t,n,r)=>{n&&Q.bufferSubData(e,t,w,r,n)},glClear:e=>Q.clear(e),glClearBufferfv:(e,t,n)=>{Q.clearBufferfv(e,t,k,n>>2)},glClearBufferuiv:(e,t,n)=>{Q.clearBufferuiv(e,t,O,n>>2)},glClearColor:(e,t,n,r)=>Q.clearColor(e,t,n,r),glClearDepthf:e=>Q.clearDepth(e),glClearStencil:e=>Q.clearStencil(e),glColorMask:(e,t,n,r)=>{Q.colorMask(!!e,!!t,!!n,!!r)},glCompileShader:e=>{Q.compileShader(Gn[e])},glCreateProgram:()=>{var e=Xn(Y),t=Q.createProgram();return t.name=e,t.ya=t.wa=t.xa=0,t.Wa=1,Y[e]=t,e},glCreateShader:e=>{var t=Xn(Gn);return Gn[t]=Q.createShader(e),t},glCullFace:e=>Q.cullFace(e),glDeleteBuffers:(e,t)=>{for(var n=0;n<e;n++){var r=D[t+4*n>>2],i=Vn[r];i&&(Q.deleteBuffer(i),i.name=0,Vn[r]=null,r==Q.Na&&(Q.Na=0),r==Q.Oa&&(Q.Oa=0))}},glDeleteFramebuffers:(e,t)=>{for(var n=0;n<e;++n){var r=D[t+4*n>>2],i=Hn[r];i&&(Q.deleteFramebuffer(i),i.name=0,Hn[r]=null)}},glDeleteProgram:e=>{if(e){var t=Y[e];t?(Q.deleteProgram(t),t.name=0,Y[e]=null):Z||=1281}},glDeleteRenderbuffers:(e,t)=>{for(var n=0;n<e;n++){var r=D[t+4*n>>2],i=Un[r];i&&(Q.deleteRenderbuffer(i),i.name=0,Un[r]=null)}},glDeleteShader:e=>{if(e){var t=Gn[e];t?(Q.deleteShader(t),Gn[e]=null):Z||=1281}},glDeleteTextures:(e,t)=>{for(var n=0;n<e;n++){var r=D[t+4*n>>2],i=Wn[r];i&&(Q.deleteTexture(i),i.name=0,Wn[r]=null)}},glDeleteVertexArrays:(e,t)=>{for(var n=0;n<e;n++){var r=D[t+4*n>>2];Q.deleteVertexArray(Kn[r]),Kn[r]=null}},glDepthFunc:e=>Q.depthFunc(e),glDepthMask:e=>{Q.depthMask(!!e)},glDepthRangef:(e,t)=>Q.depthRange(e,t),glDisable:e=>Q.disable(e),glDrawArrays:(e,t,n)=>{Q.drawArrays(e,t,n)},glDrawArraysInstanced:(e,t,n,r)=>{Q.drawArraysInstanced(e,t,n,r)},glDrawBuffers:(e,t)=>{for(var n=ar[e],r=0;r<e;r++)n[r]=D[t+4*r>>2];Q.drawBuffers(n)},glDrawElements:(e,t,n,r)=>{Q.drawElements(e,t,n,r)},glDrawElementsInstanced:(e,t,n,r,i)=>{Q.drawElementsInstanced(e,t,n,r,i)},glEnable:e=>Q.enable(e),glEnableVertexAttribArray:e=>{Q.enableVertexAttribArray(e)},glFlush:()=>Q.flush(),glFramebufferRenderbuffer:(e,t,n,r)=>{Q.framebufferRenderbuffer(e,t,n,Un[r])},glFramebufferTexture2D:(e,t,n,r,i)=>{Q.framebufferTexture2D(e,t,n,Wn[r],i)},glFrontFace:e=>Q.frontFace(e),glGenBuffers:(e,t)=>{Zn(e,t,`createBuffer`,Vn)},glGenFramebuffers:(e,t)=>{Zn(e,t,`createFramebuffer`,Hn)},glGenRenderbuffers:(e,t)=>{Zn(e,t,`createRenderbuffer`,Un)},glGenTextures:(e,t)=>{Zn(e,t,`createTexture`,Wn)},glGenVertexArrays:(e,t)=>{Zn(e,t,`createVertexArray`,Kn)},glGenerateMipmap:e=>Q.generateMipmap(e),glGetIntegerv:(e,t)=>sr(e,t),glGetProgramiv:(e,t,n)=>{if(n)if(e>=Bn)Z||=1281;else if(e=Y[e],t==35716)e=Q.getProgramInfoLog(e),e===null&&(e=`(unknown error)`),D[n>>2]=e.length+1;else if(t==35719){if(!e.ya)for(t=0;t<Q.getProgramParameter(e,35718);++t)e.ya=Math.max(e.ya,Q.getActiveUniform(e,t).name.length+1);D[n>>2]=e.ya}else if(t==35722){if(!e.wa)for(t=0;t<Q.getProgramParameter(e,35721);++t)e.wa=Math.max(e.wa,Q.getActiveAttrib(e,t).name.length+1);D[n>>2]=e.wa}else if(t==35381){if(!e.xa)for(t=0;t<Q.getProgramParameter(e,35382);++t)e.xa=Math.max(e.xa,Q.getActiveUniformBlockName(e,t).length+1);D[n>>2]=e.xa}else D[n>>2]=Q.getProgramParameter(e,t);else Z||=1281},glGetString:e=>{var t=qn[e];if(!t){switch(e){case 7939:t=cr(or().join(` `));break;case 7936:case 7937:case 37445:case 37446:(t=Q.getParameter(e))||(Z||=1280),t=t?cr(t):0;break;case 7938:t=cr(`OpenGL ES 3.0 (${Q.getParameter(7938)})`);break;case 35724:t=Q.getParameter(35724);var n=t.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);n!==null&&(n[1].length==3&&(n[1]+=`0`),t=`OpenGL ES GLSL ES ${n[1]} (${t})`),t=cr(t);break;default:Z||=1280}qn[e]=t}return t},glGetUniformBlockIndex:(e,t)=>Q.getUniformBlockIndex(Y[e],t?z(w,t):``),glGetUniformLocation:(e,t)=>{if(t=t?z(w,t):``,e=Y[e]){var n=e,r=n.ma,i=n.wb,a;if(!r)for(n.ma=r={},n.vb={},a=0;a<Q.getProgramParameter(n,35718);++a){var o=Q.getActiveUniform(n,a),s=o.name;o=o.size;var c=lr(s);c=0<c?s.slice(0,c):s;var l=n.Wa;for(n.Wa+=o,i[c]=[o,l],s=0;s<o;++s)r[l]=s,n.vb[l++]=c}if(n=e.ma,r=0,i=t,a=lr(t),0<a&&(r=parseInt(t.slice(a+1))>>>0,i=t.slice(0,a)),(i=e.wb[i])&&r<i[0]&&(r+=i[1],n[r]=n[r]||Q.getUniformLocation(e,t)))return r}else Z||=1281;return-1},glInvalidateFramebuffer:(e,t,n)=>{for(var r=ar[t],i=0;i<t;i++)r[i]=D[n+4*i>>2];Q.invalidateFramebuffer(e,r)},glLinkProgram:e=>{e=Y[e],Q.linkProgram(e),e.ma=0,e.wb={}},glPixelStorei:(e,t)=>{e==3317?Jn=t:e==3314&&(Yn=t),Q.pixelStorei(e,t)},glReadPixels:(e,t,n,r,i,a,o)=>
7{if(Q.Na)Q.readPixels(e,t,n,r,i,a,o);else{var s=ur(a);o>>>=31-Math.clz32(s.BYTES_PER_ELEMENT),Q.readPixels(e,t,n,r,i,a,s,o)}},glRenderbufferStorageMultisample:(e,t,n,r,i)=>Q.renderbufferStorageMultisample(e,t,n,r,i),glScissor:(e,t,n,r)=>Q.scissor(e,t,n,r),glShaderSource:(e,t,n,r)=>{for(var i=``,a=0;a<t;++a){var o=(o=O[n+4*a>>2])?z(w,o,r?O[r+4*a>>2]:void 0):``;i+=o}Q.shaderSource(Gn[e],i)},glStencilFunc:(e,t,n)=>Q.stencilFunc(e,t,n),glStencilFuncSeparate:(e,t,n,r)=>Q.stencilFuncSeparate(e,t,n,r),glStencilMask:e=>Q.stencilMask(e),glStencilOp:(e,t,n)=>Q.stencilOp(e,t,n),glStencilOpSeparate:(e,t,n,r)=>Q.stencilOpSeparate(e,t,n,r),glTexParameteri:(e,t,n)=>Q.texParameteri(e,t,n),glTexStorage2D:(e,t,n,r,i)=>Q.texStorage2D(e,t,n,r,i),glTexStorage3D:(e,t,n,r,i,a)=>Q.texStorage3D(e,t,n,r,i,a),glTexSubImage2D:(e,t,n,r,i,a,o,s,c)=>{if(Q.Oa)Q.texSubImage2D(e,t,n,r,i,a,o,s,c);else if(c){var l=ur(s);Q.texSubImage2D(e,t,n,r,i,a,o,s,l,c>>>31-Math.clz32(l.BYTES_PER_ELEMENT))}else{if(c){l=ur(s);var u=a*((Yn||i)*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[o-6402]||1)*l.BYTES_PER_ELEMENT+Jn-1&-Jn);c=l.subarray(c>>>31-Math.clz32(l.BYTES_PER_ELEMENT),c+u>>>31-Math.clz32(l.BYTES_PER_ELEMENT))}else c=null;Q.texSubImage2D(e,t,n,r,i,a,o,s,c)}},glUniform1i:(e,t)=>{var n=Q,r=n.uniform1i,i=Q.Ib;if(i){var a=i.ma[e];typeof a==`number`&&(i.ma[e]=a=Q.getUniformLocation(i,i.vb[e]+(0<a?`[${a}]`:``))),e=a}else Z||=1282,e=void 0;r.call(n,e,t)},glUniformBlockBinding:(e,t,n)=>{e=Y[e],Q.uniformBlockBinding(e,t,n)},glUseProgram:e=>{e=Y[e],Q.useProgram(e),Q.Ib=e},glVertexAttribDivisor:(e,t)=>{Q.vertexAttribDivisor(e,t)},glVertexAttribIPointer:(e,t,n,r,i)=>{Q.vertexAttribIPointer(e,t,n,r,i)},glVertexAttribPointer:(e,t,n,r,i,a)=>{Q.vertexAttribPointer(e,t,n,!!r,i,a)},glViewport:(e,t,n,r)=>Q.viewport(e,t,n,r),invoke_vii:Dr,isWindowsBrowser:function(){return-1<navigator.platform.indexOf(`Win`)},provokingVertexWEBGL:function(e,t){(e=X[e].F.pb)&&e.provokingVertexWEBGL(t)},strftime:pr,strftime_l:(e,t,n,r)=>pr(e,t,n,r),upload_image:function(e,t){var n=r.images;n&&(t=n.get(t))&&(e=X[e].F,e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1))},wasm_start_image_decode:function(e,t,n){t=r.HEAP8.subarray(t,t+n),n=new Uint8Array(n),n.set(t),createImageBitmap(new Blob([n])).then(function(t){var n=new OffscreenCanvas(t.width,t.height).getContext(`2d`);n.drawImage(t,0,0),n=n.getImageData(0,0,t.width,t.height);var i=n.data.length,a=r.Cb(i);r.oc.set(n.data,a),r.qc(e,t.width,t.height,a,i)}).catch(function(t){t=t.message||`decode failed`;var n=r.Jc(t)+1,i=r.Cb(n);r.Rc(t,i,n),r.rc(e,i),r.pc(i)})}},$=function(){function e(e){return $=e.exports,x=$.memory,j(),tn=$.__indirect_function_table,M.unshift($.__wasm_call_ctors),P--,r.monitorRunDependencies?.(P),P==0&&(ne!==null&&(clearInterval(ne),ne=null),F&&(e=F,F=null,e())),$}var t={env:_r,wasi_snapshot_preview1:_r};if(P++,r.monitorRunDependencies?.(P),r.instantiateWasm)try{return r.instantiateWasm(t,e)}catch(e){y(`Module.instantiateWasm callback failed with error: ${e}`),a(e)}return ie||=L(`webgl2_advanced.wasm`)?`webgl2_advanced.wasm`:r.locateFile?r.locateFile(`webgl2_advanced.wasm`,h):h+`webgl2_advanced.wasm`,ce(t,function(t){e(t.instance)}).catch(a),{}}(),vr=e=>(vr=$.free)(e),yr=e=>(yr=$.malloc)(e);r._setWebImage=(e,t,n)=>(r._setWebImage=$.setWebImage)(e,t,n);var br=e=>(br=$.__getTypeName)(e);r._wasm_image_decode_complete=(e,t,n,i,a)=>(r._wasm_image_decode_complete=$.wasm_image_decode_complete)(e,t,n,i,a),r._wasm_image_decode_error=(e,t)=>(r._wasm_image_decode_error=$.wasm_image_decode_error)(e,t);var xr=r._ma_device__on_notification_unlocked=e=>(xr=r._ma_device__on_notification_unlocked=$.ma_device__on_notification_unlocked)(e);r._ma_malloc_emscripten=(e,t)=>(r._ma_malloc_emscripten=$.ma_malloc_emscripten)(e,t),r._ma_free_emscripten=(e,t)=>(r._ma_free_emscripten=$.ma_free_emscripten)(e,t);var Sr=r._ma_device_process_pcm_frames_capture__webaudio=(e,t,n)=>(Sr=r._ma_device_process_pcm_frames_capture__webaudio=$.ma_device_process_pcm_frames_capture__webaudio)(e,t,n),Cr=r._ma_device_process_pcm_frames_playback__webaudio=(e,t,n)=>(Cr=r._ma_device_process_pcm_frames_playback__webaudio=$.ma_device_process_pcm_frames_playback__webaudio)(e,t,n),wr=(e,t)=>
7(wr=$.setThrew)(e,t),Tr=e=>(Tr=$._emscripten_stack_restore)(e),Er=()=>(Er=$.emscripten_stack_get_current)();r.dynCall_iiiji=(e,t,n,i,a,o)=>(r.dynCall_iiiji=$.dynCall_iiiji)(e,t,n,i,a,o),r.dynCall_iij=(e,t,n,i)=>(r.dynCall_iij=$.dynCall_iij)(e,t,n,i),r.dynCall_iiji=(e,t,n,i,a)=>(r.dynCall_iiji=$.dynCall_iiji)(e,t,n,i,a),r.dynCall_jii=(e,t,n)=>(r.dynCall_jii=$.dynCall_jii)(e,t,n),r.dynCall_vijj=(e,t,n,i,a,o)=>(r.dynCall_vijj=$.dynCall_vijj)(e,t,n,i,a,o),r.dynCall_jiji=(e,t,n,i,a)=>(r.dynCall_jiji=$.dynCall_jiji)(e,t,n,i,a),r.dynCall_viijii=(e,t,n,i,a,o,s)=>(r.dynCall_viijii=$.dynCall_viijii)(e,t,n,i,a,o,s),r.dynCall_iiiiij=(e,t,n,i,a,o,s)=>(r.dynCall_iiiiij=$.dynCall_iiiiij)(e,t,n,i,a,o,s),r.dynCall_iiiiijj=(e,t,n,i,a,o,s,c,l)=>(r.dynCall_iiiiijj=$.dynCall_iiiiijj)(e,t,n,i,a,o,s,c,l),r.dynCall_iiiiiijj=(e,t,n,i,a,o,s,c,l,u)=>(r.dynCall_iiiiiijj=$.dynCall_iiiiiijj)(e,t,n,i,a,o,s,c,l,u);function Dr(e,t,n){var r=Er();try{nn(e)(t,n)}catch(e){if(Tr(r),e!==e+0)throw e;wr(1,0)}}var Or;F=function e(){Or||kr(),Or||(F=e)};function kr(){function e(){if(!Or&&(Or=!0,r.calledRun=!0,!S)){if(r.noFSInit||st||(st=!0,r.stdin=r.stdin,r.stdout=r.stdout,r.stderr=r.stderr,r.stdin?ct(`stdin`,r.stdin):rt(`/dev/tty`,`/dev/stdin`),r.stdout?ct(`stdout`,null,r.stdout):rt(`/dev/tty`,`/dev/stdout`),r.stderr?ct(`stderr`,null,r.stderr):rt(`/dev/tty1`,`/dev/stderr`),at(`/dev/stdin`,0),at(`/dev/stdout`,1),at(`/dev/stderr`,1)),Le=!1,fe(M),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),r.postRun)for(typeof r.postRun==`function`&&(r.postRun=[r.postRun]);r.postRun.length;){var e=r.postRun.shift();N.unshift(e)}fe(N)}}if(!(0<P)){if(r.preRun)for(typeof r.preRun==`function`&&(r.preRun=[r.preRun]);r.preRun.length;)te();fe(ee),0<P||(r.setStatus?(r.setStatus(`Running...`),setTimeout(function(){setTimeout(function(){r.setStatus(``)},1),e()},1)):e())}}if(r.preInit)for(typeof r.preInit==`function`&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return kr(),n=o,n})})()}),(e=>{e.exports=JSON.parse(`{"name":"@rive-app/webgl2","version":"2.37.6","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 <[email protected]> (https://rive.app)","Maxwell Talbot <[email protected]> (https://rive.app)","Arthur Vivian <[email protected]> (https://rive.app)","Umberto Sonnino <[email protected]> (https://rive.app)","Matthew Sullivan <[email protected]> (mailto:[email protected])","Chris Dalton <[email protected]> (https://rive.app)"],"license":"MIT","files":["rive.js","rive.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}}`)}),((e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>a.AudioAssetWrapper,AudioWrapper:()=>a.AudioWrapper,BLANK_URL:()=>i.BLANK_URL,CustomFileAssetLoaderWrapper:()=>a.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>a.FileAssetWrapper,FileFinalizer:()=>a.FileFinalizer,FontAssetWrapper:()=>a.FontAssetWrapper,FontWrapper:()=>a.FontWrapper,ImageAssetWrapper:()=>a.ImageAssetWrapper,ImageWrapper:()=>a.ImageWrapper,RiveFont:()=>o.RiveFont,createFinalization:()=>a.createFinalization,finalizationRegistry:()=>a.finalizationRegistry,registerTouchInteractions:()=>r.registerTouchInteractions,sanitizeUrl:()=>i.sanitizeUrl});var r=n(7),i=n(8),a=n(9),o=n(10)}),((e,t,n)=>{n.r(t),n.d(t,{registerTouchInteractions:()=>o});var r=void 0,i=function(e,t,n){var r=[];if(t)for(var i=0;i<e.length;i++){var a=e[i];r.push({clientX:a.clientX,clientY:a.clientY,identifier:a.identifier})}else{var o=n===null?e[0]:Array.from(e).find(function(e){return e.identifier===n})??null;o&&r.push({clientX:o.clientX,clientY:o.clientY,identifier:o.identifier})}return r},a=function(e,t,n,r){var a=e;return a.changedTouches?.length?(!t&&[`touchstart`,`touchmove`].includes(e.type)&&e.preventDefault(),i(a.changedTouches,n,r)):[{clientX:e.clientX,clientY:e.clientY,identifier:0}]},o=function(e){var t=e.canvas,n=e.artboard,i=e.stateMachines,o=i===void 0?[]:i,s=e.renderer,c=e.rive,l=e.fit,u=e.alignment,d=e.isTouchScrollEnabled,f=d===void 0?!1:d,p=e.dispatchPointerExit,m=p===void 0?!0:p,h=e.enableMultiTouch,g=h===void 0?!1:h,_=e.layoutScaleFactor,v=_===void 0?1:_;if(!t||!o.length||!s||!c||!n||typeof window>`u`)return null;var y=null,b=!1,x=null,S=function(e){if(b&&e instanceof MouseEvent){e.type==`mouseup`&&(b=!1);return}b=f&&e.type===`touchend`&&y===`touchstart`,y=e.type;var t=e.currentTarget.getBoundingClientRect();if(!g&&e.type===`touchstart`&&x===null){var r=e.changedTouches?.[0];r&&(x=r.identifier)}var i=a(e,f,g,g?null:x),s=c.computeAlignment(l,u,{minX:0,minY:0,maxX:t.width,maxY:t.height},n.bounds,v),d=new c.Mat2D;
7switch(s.invert(d),i.forEach(function(e){var n=e.clientX,r=e.clientY;if(!(!n&&!r)){var i=n-t.left,a=r-t.top,o=new c.Vec2D(i,a),s=c.mapXY(d,o),l=s.x(),u=s.y();e.transformedX=l,e.transformedY=u,s.delete(),o.delete()}}),d.delete(),s.delete(),e.type){case`mouseout`:for(var p=function(e){m?i.forEach(function(t){e.pointerExit(t.transformedX,t.transformedY,t.identifier)}):i.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},h=0,_=o;h<_.length;h++){var S=_[h];p(S)}break;case`touchmove`:case`mouseover`:case`mousemove`:for(var C=function(e){i.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},w=0,T=o;w<T.length;w++){var S=T[w];C(S)}break;case`touchstart`:case`mousedown`:for(var E=function(e){i.forEach(function(t){e.pointerDown(t.transformedX,t.transformedY,t.identifier)})},D=0,O=o;D<O.length;D++){var S=O[D];E(S)}break;case`touchend`:for(var k=function(e){i.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier),e.pointerExit(t.transformedX,t.transformedY,t.identifier)})},A=0,j=o;A<j.length;A++){var S=j[A];k(S)}!g&&i.some(function(e){return e.identifier===x})&&(x=null);break;case`mouseup`:for(var ee=function(e){i.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier)})},M=0,N=o;M<N.length;M++){var S=N[M];ee(S)}break;default:}},C=function(){x=null},w=S.bind(r);return t.addEventListener(`mouseover`,w),t.addEventListener(`mouseout`,w),t.addEventListener(`mousemove`,w),t.addEventListener(`mousedown`,w),t.addEventListener(`mouseup`,w),t.addEventListener(`touchmove`,w,{passive:f}),t.addEventListener(`touchstart`,w,{passive:f}),t.addEventListener(`touchend`,w),t.addEventListener(`touchcancel`,C),function(){t.removeEventListener(`mouseover`,w),t.removeEventListener(`mouseout`,w),t.removeEventListener(`mousemove`,w),t.removeEventListener(`mousedown`,w),t.removeEventListener(`mouseup`,w),t.removeEventListener(`touchmove`,w),t.removeEventListener(`touchstart`,w),t.removeEventListener(`touchend`,w),t.removeEventListener(`touchcancel`,C)}}}),((e,t,n)=>{n.r(t),n.d(t,{BLANK_URL:()=>l,sanitizeUrl:()=>f});var r=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,a=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|:)/gim,c=[`.`,`/`],l=`about:blank`;function u(e){return c.indexOf(e[0])>-1}function d(e){return e.replace(o,``).replace(i,function(e,t){return String.fromCharCode(t)})}function f(e){if(!e)return l;var t=d(e).replace(a,``).replace(o,``).trim();if(!t)return l;if(u(t))return t;var n=t.match(s);if(!n)return t;var i=n[0];return r.test(i)?l:t}}),((e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>p,AudioWrapper:()=>c,CustomFileAssetLoaderWrapper:()=>u,FileAssetWrapper:()=>d,FileFinalizer:()=>i,FontAssetWrapper:()=>m,FontWrapper:()=>l,ImageAssetWrapper:()=>f,ImageWrapper:()=>s,createFinalization:()=>_,finalizationRegistry:()=>g});var r=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=function(){function e(e){this.selfUnref=!1,this._file=e}return e.prototype.unref=function(){this._file&&this._file.unref()},e}(),a=function(){function e(e){this._finalizableObject=e}return e.prototype.unref=function(){this._finalizableObject.unref()},e}(),o=function(){function e(){this.selfUnref=!1}return e.prototype.unref=function(){},e}(),s=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeImage=t,n}return Object.defineProperty(t.prototype,"nativeImage",{get:function(){return this._nativeImage},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeImage.unref()},t}(o),c=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeAudio=t,n}return Object.defineProperty(t.prototype,"nativeAudio",{get:function(){return this._nativeAudio}
7,enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeAudio.unref()},t}(o),l=function(e){r(t,e);function t(t){var n=e.call(this)||this;return n._nativeFont=t,n}return Object.defineProperty(t.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeFont.unref()},t}(o),u=function(){function e(e,t){this._assetLoaderCallback=t,this.assetLoader=new e.CustomFileAssetLoader({loadContents:this.loadContents.bind(this)})}return e.prototype.loadContents=function(e,t){var n;return e.isImage?n=new f(e):e.isAudio?n=new p(e):e.isFont&&(n=new m(e)),this._assetLoaderCallback(n,t)},e}(),d=function(){function e(e){this._nativeFileAsset=e}return e.prototype.decode=function(e){this._nativeFileAsset.decode(e)},Object.defineProperty(e.prototype,"name",{get:function(){return this._nativeFileAsset.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fileExtension",{get:function(){return this._nativeFileAsset.fileExtension},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqueFilename",{get:function(){return this._nativeFileAsset.uniqueFilename},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAudio",{get:function(){return this._nativeFileAsset.isAudio},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isImage",{get:function(){return this._nativeFileAsset.isImage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFont",{get:function(){return this._nativeFileAsset.isFont},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cdnUuid",{get:function(){return this._nativeFileAsset.cdnUuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nativeFileAsset",{get:function(){return this._nativeFileAsset},enumerable:!1,configurable:!0}),e}(),f=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setRenderImage=function(e){this._nativeFileAsset.setRenderImage(e.nativeImage)},t}(d),p=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setAudioSource=function(e){this._nativeFileAsset.setAudioSource(e.nativeAudio)},t}(d),m=function(e){r(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.setFont=function(e){this._nativeFileAsset.setFont(e.nativeFont)},t}(d),h=function(){function e(e){}return e.prototype.register=function(e){e.selfUnref=!0},e.prototype.unregister=function(e){},e}(),g=new(typeof FinalizationRegistry<`u`?FinalizationRegistry:h)(function(e){e?.unref()}),_=function(e,t){var n=new a(t);g.register(e,n)}}),((e,t,n)=>{n.r(t),n.d(t,{RiveFont:()=>i});var r=n(3),i=function(){function e(){}return e.setFallbackFontCallback=function(t){e._fallbackFontCallback=t??null,e._wireFallbackProc()},e._fontToPtr=function(e){if(e==null)return null;var t=e.nativeFont;return(t?.ptr)?.call(t)??null},e._getFallbackPtr=function(t,n){return n<0||n>=t.length?null:e._fontToPtr(t[n])},e._wireFallbackProc=function(){r.RuntimeLoader.getInstance(function(t){var n=e._fallbackFontCallback;n?t.setFallbackFontCallback((function(t,r,i){var a=n(t,i);return a?Array.isArray(a)?e._getFallbackPtr(a,r):r===0?e._fontToPtr(a):null:null})):t.setFallbackFontCallback(null)})},e._fallbackFontCallback=null,e}()})],t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{Alignment:()=>p,DataEnum:()=>ne,DataType:()=>te,DrawOptimizationOptions:()=>m,EventType:()=>w,Fit:()=>f,Layout:()=>h,LoopType:()=>T,Rive:()=>N,RiveEventType:()=>v,RiveFile:()=>M,RiveFont:()=>i.RiveFont,RuntimeLoader:()=>t.RuntimeLoader,StateMachineInput:()=>
7_,StateMachineInputType:()=>g,Testing:()=>pe,ViewModel:()=>P,ViewModelInstance:()=>I,ViewModelInstanceArtboard:()=>de,ViewModelInstanceAssetImage:()=>ue,ViewModelInstanceBoolean:()=>ae,ViewModelInstanceColor:()=>le,ViewModelInstanceEnum:()=>se,ViewModelInstanceList:()=>ce,ViewModelInstanceNumber:()=>ie,ViewModelInstanceString:()=>re,ViewModelInstanceTrigger:()=>oe,ViewModelInstanceValue:()=>L,decodeAudio:()=>me,decodeFont:()=>ge,decodeImage:()=>he});var e=n(1),t=n(3),i=n(6),a=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)},s=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},c=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},l=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},u=function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return t}(Error),d=function(e){return e&&e.isHandledError?e.message:`Problem loading file; may be corrupt!`},f;(function(e){e.Cover=`cover`,e.Contain=`contain`,e.Fill=`fill`,e.FitWidth=`fitWidth`,e.FitHeight=`fitHeight`,e.None=`none`,e.ScaleDown=`scaleDown`,e.Layout=`layout`})(f||={});var p;(function(e){e.Center=`center`,e.TopLeft=`topLeft`,e.TopCenter=`topCenter`,e.TopRight=`topRight`,e.CenterLeft=`centerLeft`,e.CenterRight=`centerRight`,e.BottomLeft=`bottomLeft`,e.BottomCenter=`bottomCenter`,e.BottomRight=`bottomRight`})(p||={});var m;(function(e){e.AlwaysDraw=`alwaysDraw`,e.DrawOnChanged=`drawOnChanged`})(m||={});var h=function(){function e(e){this.fit=e?.fit??f.Contain,this.alignment=e?.alignment??p.Center,this.layoutScaleFactor=e?.layoutScaleFactor??1,this.minX=e?.minX??0,this.minY=e?.minY??0,this.maxX=e?.maxX??0,this.maxY=e?.maxY??0}return e.new=function(t){var n=t.fit,r=t.alignment,i=t.minX,a=t.minY,o=t.maxX,s=t.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new e({fit:n,alignment:r,minX:i,minY:a,maxX:o,maxY:s})},e.prototype.copyWith=function(t){var n=t.fit,r=t.alignment,i=t.layoutScaleFactor,a=t.minX,o=t.minY,s=t.maxX,c=t.maxY;return new e({fit:n??this.fit,alignment:r??this.alignment,layoutScaleFactor:i??this.layoutScaleFactor,minX:a??this.minX,minY:o??this.minY,maxX:s??this.maxX,maxY:c??this.maxY})},e.prototype.runtimeFit=function(e){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var t=this.fit===f.Cover?e.Fit.cover:this.fit===f.Contain?e.Fit.contain:this.fit===f.Fill?e.Fit.fill:this.fit===f.FitWidth?e.Fit.fitWidth:this.fit===f.FitHeight?e.Fit.fitHeight:this.fit===f.ScaleDown?e.Fit.scaleDown:this.fit===f.Layout?e.Fit.layout:e.Fit.none;return this.cachedRuntimeFit=t,t},e.prototype.runtimeAlignment=function(e){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var t=this.alignment===p.TopLeft?e.Alignment.topLeft:this.alignment===p.TopCenter?e.Alignment.topCenter:this.alignment===p.TopRight?e.Alignment.topRight:this.alignment===p.CenterLeft?e.Alignment.centerLeft:this.alignment===p.CenterRight?e.Alignment.centerRight:this.alignment===p.BottomLeft?e.Alignment.bottomLeft:this.alignment===p.BottomCenter?e.Alignment.bottomCenter:this.alignment===p.BottomRight?e.Alignment.bottomRight:e.Alignment.center;return this.cachedRuntimeAlignment=t,t},e}(),g;(function(e){e[e.Number=56]=`Number`,e[e.Trigger=58]=`Trigger`,e[e.Boolean=59]=`Boolean`})(g||={});var _=function(){function e(e,t){this.type=e,this.runtimeInput=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.runtimeInput.name}
7,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(e){this.runtimeInput.value=e},enumerable:!1,configurable:!0}),e.prototype.fire=function(){this.type===g.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}(),v;(function(e){e[e.General=128]=`General`,e[e.OpenUrl=131]=`OpenUrl`})(v||={});var y=function(){function e(e){this.isBindableArtboard=!1,this.isBindableArtboard=e}return e}(),b=function(e){a(t,e);function t(t,n){var r=e.call(this,!1)||this;return r.nativeArtboard=t,r.file=n,r}return t}(y),x=function(e){a(t,e);function t(t){var n=e.call(this,!0)||this;return n.selfUnref=!1,n.nativeArtboard=t,n}return Object.defineProperty(t.prototype,"viewModel",{set:function(e){this.nativeViewModel=e.nativeInstance},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){var e;this.selfUnref&&(this.nativeArtboard.unref(),(e=this.nativeViewModel)==null||e.unref())},t}(y),S=function(){function e(e,t,n,r){this.stateMachine=e,this.playing=n,this.artboard=r,this.inputs=[],this.instance=new t.StateMachineInstance(e,r),this.initInputs(t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statesChanged",{get:function(){for(var e=[],t=0;t<this.instance.stateChangedCount();t++)e.push(this.instance.stateChangedNameByIndex(t));return e},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.instance.advance(e)},e.prototype.advanceAndApply=function(e){this.instance.advanceAndApply(e)},e.prototype.reportedEventCount=function(){return this.instance.reportedEventCount()},e.prototype.reportedEventAt=function(e){return this.instance.reportedEventAt(e)},e.prototype.initInputs=function(e){for(var t=0;t<this.instance.inputCount();t++){var n=this.instance.input(t);this.inputs.push(this.mapRuntimeInput(n,e))}},e.prototype.mapRuntimeInput=function(e,t){if(e.type===t.SMIInput.bool)return new _(g.Boolean,e.asBool());if(e.type===t.SMIInput.number)return new _(g.Number,e.asNumber());if(e.type===t.SMIInput.trigger)return new _(g.Trigger,e.asTrigger())},e.prototype.cleanup=function(){this.inputs.forEach(function(e){e.delete()}),this.inputs.length=0,this.instance.delete()},e.prototype.bindViewModelInstance=function(e){e.runtimeInstance!=null&&this.instance.bindViewModelInstance(e.runtimeInstance)},e}(),C=function(){function t(e,t,n,r,i){r===void 0&&(r=[]),i===void 0&&(i=[]),this.runtime=e,this.artboard=t,this.eventManager=n,this.animations=r,this.stateMachines=i}return t.prototype.add=function(t,n,r){if(r===void 0&&(r=!0),t=R(t),t.length===0)this.animations.forEach(function(e){return e.playing=n}),this.stateMachines.forEach(function(e){return e.playing=n});else for(var i=this.animations.map(function(e){return e.name}),a=this.stateMachines.map(function(e){return e.name}),o=0;o<t.length;o++){var s=i.indexOf(t[o]),c=a.indexOf(t[o]);if(s>=0||c>=0)s>=0?this.animations[s].playing=n:this.stateMachines[c].playing=n;else{var l=this.artboard.animationByName(t[o]);if(l){var u=new e.Animation(l,this.artboard,this.runtime,n);u.advance(0),u.apply(1),this.animations.push(u)}else{var d=this.artboard.stateMachineByName(t[o]);if(d){var f=new S(d,this.runtime,n,this.artboard);this.stateMachines.push(f)}}}}return r&&(n?this.eventManager.fire({type:w.Play,data:this.playing}):this.eventManager.fire({type:w.Pause,data:this.paused})),n?this.playing:this.paused},t.prototype.initLinearAnimations=function(t,n,r){r===void 0&&(r=!1);for(var i=this.animations.map(function(e){return e.name}),a=0;a<t.length;a++){var o=i.indexOf(t[a]);if(o>=0)this.animations[o].playing=n;else{var s=this.artboard.animationByName(t[a]);if(s){var c=new e.Animation(s,this.artboard,this.runtime,n);c.advance(0),c.apply(1),this.animations.push(c)}else if(r)throw new u(`State Machine with name ${t[a]} not found`);else console.error(`Animation with name ${t[a]} not found.`)}}},t.prototype.initStateMachines=function(e,t){for(var n=this.stateMachines.map(function(e){return e.name}),r=0;r<e.length;r++){var i=n.indexOf(e[r]);if(i>=0)this.stateMachines[i].playing=t;else{var a=this.artboard.stateMachineByName(e[r]);if(a){var o=new S(a,this.runtime,t,this.artboard);this.stateMachines.push(o)}else console.warn(`State Machine with name ${e[r]} not found. Falling back to find an animation with the same name.`),this.initLinearAnimations([e[r]],t,!0)}}},t.prototype.play=function(e){return this.add(e,!0)},t.prototype.advanceIfPaused=function(){this.stateMachines.forEac
7h(function(e){e.playing||e.advanceAndApply(0)})},t.prototype.pause=function(e){return this.add(e,!1)},t.prototype.scrub=function(e,t){var n=this.animations.filter(function(t){return e.includes(t.name)});return n.forEach(function(e){return e.scrubTo=t}),n.map(function(e){return e.name})},Object.defineProperty(t.prototype,"playing",{get:function(){return this.animations.filter(function(e){return e.playing}).map(function(e){return e.name}).concat(this.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paused",{get:function(){return this.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}).concat(this.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}))},enumerable:!1,configurable:!0}),t.prototype.stop=function(e){var t=this;e=R(e);var n=[];if(e.length===0)n=this.animations.map(function(e){return e.name}).concat(this.stateMachines.map(function(e){return e.name})),this.animations.forEach(function(e){return e.cleanup()}),this.stateMachines.forEach(function(e){return e.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var r=this.animations.filter(function(t){return e.includes(t.name)});r.forEach(function(e){e.cleanup(),t.animations.splice(t.animations.indexOf(e),1)});var i=this.stateMachines.filter(function(t){return e.includes(t.name)});i.forEach(function(e){e.cleanup(),t.stateMachines.splice(t.stateMachines.indexOf(e),1)}),n=r.map(function(e){return e.name}).concat(i.map(function(e){return e.name}))}return this.eventManager.fire({type:w.Stop,data:n}),n},Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(e,t){return e||t.playing},!1)||this.stateMachines.reduce(function(e,t){return e||t.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),t.prototype.atLeastOne=function(e,t){t===void 0&&(t=!0);var n;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([n=this.artboard.animationByIndex(0).name],e,t):this.artboard.stateMachineCount()>0&&this.add([n=this.artboard.stateMachineByIndex(0).name],e,t)),n},t.prototype.handleLooping=function(){for(var e=0,t=this.animations.filter(function(e){return e.playing});e<t.length;e++){var n=t[e];n.loopValue===0&&n.loopCount?(n.loopCount=0,this.stop(n.name)):n.loopValue===1&&n.loopCount?(this.eventManager.fire({type:w.Loop,data:{animation:n.name,type:T.Loop}}),n.loopCount=0):n.loopValue===2&&n.loopCount>1&&(this.eventManager.fire({type:w.Loop,data:{animation:n.name,type:T.PingPong}}),n.loopCount=0)}},t.prototype.handleStateChanges=function(){for(var e=[],t=0,n=this.stateMachines.filter(function(e){return e.playing});t<n.length;t++){var r=n[t];e.push.apply(e,r.statesChanged)}e.length>0&&this.eventManager.fire({type:w.StateChange,data:e})},t.prototype.handleAdvancing=function(e){this.eventManager.fire({type:w.Advance,data:e})},t}(),w;(function(e){e.Load=`load`,e.LoadError=`loaderror`,e.Play=`play`,e.Pause=`pause`,e.Stop=`stop`,e.Loop=`loop`,e.Draw=`draw`,e.Advance=`advance`,e.StateChange=`statechange`,e.RiveEvent=`riveevent`,e.AudioStatusChange=`audiostatuschange`})(w||={});var T;
7(function(e){e.OneShot=`oneshot`,e.Loop=`loop`,e.PingPong=`pingpong`})(T||={});var E=function(){function e(e){e===void 0&&(e=[]),this.listeners=e}return e.prototype.getListeners=function(e){return this.listeners.filter(function(t){return t.type===e})},e.prototype.add=function(e){this.listeners.includes(e)||this.listeners.push(e)},e.prototype.remove=function(e){for(var t=0;t<this.listeners.length;t++){var n=this.listeners[t];if(n.type===e.type&&n.callback===e.callback){this.listeners.splice(t,1);break}}},e.prototype.removeAll=function(e){var t=this;e?this.listeners.filter(function(t){return t.type===e}).forEach(function(e){return t.remove(e)}):this.listeners.splice(0,this.listeners.length)},e.prototype.fire=function(e){this.getListeners(e.type).forEach(function(t){return t.callback(e)})},e}(),D=function(){function e(e){this.eventManager=e,this.queue=[]}return e.prototype.add=function(e){this.queue.push(e)},e.prototype.process=function(){for(;this.queue.length>0;){var e=this.queue.shift();e?.action&&e.action(),e?.event&&this.eventManager.fire(e.event)}},e}(),O;(function(e){e[e.AVAILABLE=0]=`AVAILABLE`,e[e.UNAVAILABLE=1]=`UNAVAILABLE`})(O||={});var k=new(function(e){a(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=O.UNAVAILABLE,t}return t.prototype.delay=function(e){return s(this,void 0,void 0,function(){return c(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})},t.prototype.timeout=function(){return s(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(e,t){return setTimeout(t,50)})]})})},t.prototype.reportToListeners=function(){this.fire({type:w.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return s(this,void 0,void 0,function(){return c(this,function(e){return this._enabled||(this._enabled=!0,this._status=O.AVAILABLE,this.reportToListeners()),[2]})})},t.prototype.testAudio=function(){return s(this,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:if(!(this._status===O.UNAVAILABLE&&this._audioContext!==null))return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return e.sent(),this.enableAudio(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}})})},t.prototype._establishAudio=function(){return s(this,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:return this._started?[3,5]:(this._started=!0,typeof window>`u`?(this.enableAudio(),[3,5]):[3,1]);case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:return this._status===O.UNAVAILABLE?[4,this.testAudio()]:[3,5];case 3:return e.sent(),[4,this.delay(1e3)];case 4:return e.sent(),[3,2];case 5:return[2]}})})},t.prototype.listenForUserAction=function(){var e=this;document.addEventListener(`pointerdown`,function(){return s(e,void 0,void 0,function(){return c(this,function(e){return this.enableAudio(),[2]})})},{once:!0})},t.prototype.establishAudio=function(){return s(this,void 0,void 0,function(){return c(this,function(e){return this._establishAudio(),[2]})})},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===O.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(E)),A=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),j=globalThis.ResizeObserver||A,ee=new(function(){function e(){var e=this;this._elementsMap=new Map,this._onObservedEntry=function(t){var n=e._elementsMap.get(t.target);n===null?e._resizeObserver.unobserve(t.target):n.onResize(t.target.clientWidth==0||t.target.clientHeight==0)},this._onObserved=function(t){t.forEach(e._onObservedEntry)},this._resizeObserver=new j(this._onObserved)}return e.prototype.add=function(e,t){var n={onResize:t,element:e};return this._elementsMap.set(e,n),this._resizeObserver.observe(e),n},e.prototype.remove=function(e){this._resizeObserver.unobserve(e.element),this._elementsMap.delete(e.element)},e}()),M=function(){function e(e){this.enableRiveAssetCDN=!0,this.enablePerfMarks=!1,this.referenceCount=0,this.destroyed=!1,this.selfUnref=!1,this.bindableArtboards=[],this.src=e.src,this.buffer=e.buffer,e.assetLoader&&(this.assetLoader=e.assetLoader),this.enableRiveAssetCDN=typeof e.enableRiveAssetCDN==`boolean`?e.enableRiveAssetCDN:!0,this.enablePerfMarks=!!e.enablePerfMarks,this.enablePerfMarks&&(t.RuntimeLoader.enablePerfMarks=!0),this.eventManager=new E,e.onLoad&&this.on(w.Load,e.onLoad),e.onLoadError&&this.on(w.LoadError,e.onLoadError)}return e.prototype.releaseFile=function(){var e;this.selfUnref&&((e=this.file)==null||e.unref()),this.file=null},e.prototype.releaseBindableArtboards=function(){this.bindableArtboards.forEach(function(e){return e.destroy()})},e.prototype.initData=function(){return s(this,void 0,void 0,function(){var t,n,r,a,o,s;return c(this,function(c){switch(c.label){case 0:if(!(this.src&&!this.buffer))return[3,4];c.label=1;case 1:return c.trys.push([1,3,,4]),t=this,[4,fe(this.src)];case 2:return t.buffer=c.sent(),[3,4];case 3:throw n=c.sent(),n instanceof Error?n:new u(e.fileLoadErrorMessage);case 4:return this.destroyed?[2]:(this.assetLoader&&(a=new i.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),r=a.assetLoader),this.enablePerfMarks&&performance.mark(`rive:file-load:start`),o=this,[4,this.runtime.load(new Uint8Array(this.buffer),r,this.enableRiveAssetCDN)]);case 5:return o.file=c.sent(),this.enablePerfMarks&&(performance.mark(`rive:file-load:end`),performance.measure(`rive:file-load`,`rive:file-load:start`,`r
7ive:file-load:end`)),s=new i.FileFinalizer(this.file),i.finalizationRegistry.register(this,s),this.destroyed?(this.releaseFile(),[2]):(this.file===null?this.fireLoadError(e.fileLoadErrorMessage):this.eventManager.fire({type:w.Load,data:this}),[2])}})})},e.prototype.loadRiveFileBytes=function(){return s(this,void 0,void 0,function(){var e;return c(this,function(t){return this.enablePerfMarks&&performance.mark(`rive:fetch-riv:start`),e=this.src?fe(this.src):Promise.resolve(this.buffer),this.enablePerfMarks&&this.src&&e.then(function(){performance.mark(`rive:fetch-riv:end`),performance.measure(`rive:fetch-riv`,`rive:fetch-riv:start`,`rive:fetch-riv:end`)}),[2,e]})})},e.prototype.loadRuntime=function(){return s(this,void 0,void 0,function(){var e;return c(this,function(n){return this.enablePerfMarks&&performance.mark(`rive:await-wasm:start`),e=t.RuntimeLoader.awaitInstance(),this.enablePerfMarks&&e.then(function(){performance.mark(`rive:await-wasm:end`),performance.measure(`rive:await-wasm`,`rive:await-wasm:start`,`rive:await-wasm:end`)}),[2,e]})})},e.prototype.init=function(){return s(this,void 0,void 0,function(){var t,n,r,i;return c(this,function(a){switch(a.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(e.missingErrorMessage),[2];a.label=1;case 1:return a.trys.push([1,4,,5]),[4,Promise.all([this.loadRiveFileBytes(),this.loadRuntime()])];case 2:return t=a.sent(),n=t[0],r=t[1],this.destroyed?[2]:(this.buffer=n,this.runtime=r,this.enablePerfMarks&&performance.mark(`rive:init-data:start`),[4,this.initData()]);case 3:return a.sent(),this.enablePerfMarks&&(performance.mark(`rive:init-data:end`),performance.measure(`rive:init-data`,`rive:init-data:start`,`rive:init-data:end`)),[3,5];case 4:return i=a.sent(),this.fireLoadError(i instanceof Error?i.message:e.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:w.LoadError,data:e}),new u(e)},e.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},e.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},e.prototype.cleanup=function(){--this.referenceCount,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),this.releaseFile(),this.releaseBindableArtboards(),this.destroyed=!0)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.getInstance=function(){if(this.file!==null)return this.referenceCount+=1,this.file},e.prototype.destroyIfUnused=function(){this.referenceCount<=0&&this.cleanup()},e.prototype.createBindableArtboard=function(e){if(e!=null){var t=new x(e);return(0,i.createFinalization)(t,t.nativeArtboard),this.bindableArtboards.push(t),t}return null},e.prototype.getArtboard=function(e){var t=this.file.artboardByName(e);if(t!=null)return new b(t,this)},e.prototype.getBindableArtboard=function(e){var t=this.file.bindableArtboardByName(e);return this.createBindableArtboard(t)},e.prototype.getDefaultBindableArtboard=function(){var e=this.file.bindableArtboardDefault();return this.createBindableArtboard(e)},e.prototype.internalBindableArtboardFromArtboard=function(e){var t=this.file.internalBindableArtboardFromArtboard(e);return this.createBindableArtboard(t)},e.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return t===null?null:new P(t)},e.missingErrorMessage=`Rive source file or data buffer required`,e.fileLoadErrorMessage=`The file failed to load`,e}(),N=function(){function e(e){var n=this;this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.dispatchPointerExit=!0,this.enableMultiTouch=!1,this.enableRiveAssetCDN=!0,this._volume=1,this._artboardWidth=void 0,this._artboardHeight=void 0,this._devicePixelRatioUsed=1,this._hasZeroSize=!1,this._needsRedraw=!1,this._currentCanvasWidth=0,this._currentCanvasHeight=0,this._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,this.drawOptimization=m.DrawOnChanged,this.enablePerfMarks=!1,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(e){var t=n._hasZeroSize!==e;n._hasZeroSize=e,e?(!n._layout.maxX||!n._layout.maxY)&&n.resizeToCanvas():t&&n.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=e.canvas,e.canvas.constructor===HTMLCanvasElement&&(this._observed=ee.add(this.canvas,this.onCanvasResize)),this._currentCanvasWidth=this.canvas.width,this._currentCanvasHeight=this.canvas.height,this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=e.layout??new h,this.shouldDisableRiveListeners=!!e.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!e.isTouchScrollEnabled,this.automaticallyHandleEvents=!!e.automaticallyHandleEvents,this.dispatchPointerExit=e.dispatchPointerExit===!1?e.dispatchPointerExit:this.dispatchPointerExit,this.enableMultiTouch=!!e.enableMultiTouch,this.drawOptimization=e.drawingOptions??this.drawOptimization,this.enableRiveAssetCDN=e.enableRiveAssetCDN===void 0?!0:e.enableRiveAssetCDN,this.enablePerfMarks=!!e.enablePerfMarks,this.enablePerfMarks&&(t.RuntimeLoader.enablePerfMarks=!0),this.eventManager=new E,e.onLoad&&this.on(w.Load,e.onLoad),e.onLoadError&&this.on(w.LoadError,e.onLoadError),e.onPlay&&this.on(w.Play,e.onPlay),e.onPause&&this.on(w.Pause,e.onPause),e.onStop&&this.on(w.Stop,e.onStop),e.onLoop&&this.on(w.Lo
7op,e.onLoop),e.onStateChange&&this.on(w.StateChange,e.onStateChange),e.onAdvance&&this.on(w.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(w.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(w.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(w.Play,e.onplay),e.onpause&&!e.onPause&&this.on(w.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(w.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(w.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(w.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new D(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:e.autoplay,autoBind:e.autoBind,animations:e.animations,stateMachines:e.stateMachines,artboard:e.artboard,useOffscreenRenderer:e.useOffscreenRenderer})}return Object.defineProperty(e.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),e.new=function(t){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new e(t)},e.prototype.onSystemAudioChanged=function(){this.volume=this._volume},e.prototype.init=function(n){var r=this,i=n.src,a=n.buffer,o=n.riveFile,s=n.animations,c=n.stateMachines,l=n.artboard,d=n.autoplay,f=d===void 0?!1:d,p=n.useOffscreenRenderer,m=p===void 0?!1:p,h=n.autoBind,g=h===void 0?!1:h;if(!this.destroyed){if(this.src=i,this.buffer=a,this.riveFile=o,!this.src&&!this.buffer&&!this.riveFile)throw new u(e.missingErrorMessage);var _=R(s),v=R(c);this.loaded=!1,this.readyForPlaying=!1,t.RuntimeLoader.awaitInstance().then(function(e){r.destroyed||(r.runtime=e,r.removeRiveListeners(),r.deleteRiveRenderer(),r.enablePerfMarks&&performance.mark(`rive:make-renderer:start`),r.renderer=r.runtime.makeRenderer(r.canvas,m),r.enablePerfMarks&&(performance.mark(`rive:make-renderer:end`),performance.measure(`rive:make-renderer`,`rive:make-renderer:start`,`rive:make-renderer:end`)),r.canvas.width||r.canvas.height||r.resizeDrawingSurfaceToCanvas(),r.initData(l,_,v,f,g).then(function(e){if(e)return r.setupRiveListeners()}).catch(function(e){console.error(e)}))}).catch(function(e){r.eventManager.fire({type:w.LoadError,data:e.message})})}},e.prototype.setupRiveListeners=function(e){var t=this;if(this.eventCleanup&&this.eventCleanup(),!this.shouldDisableRiveListeners){var n=(this.animator.stateMachines||[]).filter(function(e){return e.playing&&t.runtime.hasListeners(e.instance)}).map(function(e){return e.instance}),r=this.isTouchScrollEnabled,a=this.dispatchPointerExit,o=this.enableMultiTouch;e&&`isTouchScrollEnabled`in e&&(r=e.isTouchScrollEnabled),this.eventCleanup=(0,i.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:n,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:r,dispatchPointerExit:a,enableMultiTouch:o,layoutScaleFactor:this._layout.layoutScaleFactor})}},e.prototype.removeRiveListeners=function(){this.eventCleanup&&=(this.eventCleanup(),null)},e.prototype.initializeAudio=function(){var e=this;k.status==O.UNAVAILABLE&&(this.file.hasAudio||this.artboard?.hasAudio&&this._audioEventListener===null)&&(this._audioEventListener={type:w.AudioStatusChange,callback:function(){return e.onSystemAudioChanged()}},k.add(this._audioEventListener),k.establishAudio())},e.prototype.initArtboardSize=function(){this.artboard&&(this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height)},e.prototype.initData=function(e,t,n,r,i){return s(this,void 0,void 0,function(){var a,o,s;return c(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),this.riveFile==null?(a=new M({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader,enablePerfMarks:this.enablePerfMarks}),this.riveFile=a,[4,a.init()]):[3,2];case 1:if(c.sent(),this.destroyed)return a.destroyIfUnused(),[2,!1];c.label=2;case 2:this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,r,i),this.initArtboardSize(),this.initializeAudio();try{this.loaded=!0,this.eventManager.fire({type:w.Load,data:this.src??`buffer`})}catch(e){console.error(e)}return this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return o=c.sent(),s=d(o),this.eventManager.fire({type:w.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}})})},e.prototype.initArtboard=function(e,t,n,r,a){if(this.file){var o=e?this.file.artboardByName(e):this.file.defaultArtboard();if(!o)throw new u(`Invalid artboard name or no default artboard`);this.artboard=o,o.volume=this._volume*k.systemVolume,this.animator=new C(this.runtime,this.artboard,this.eventManager);var s;if(t.length>0||n.length>0?(s=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):s=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?w.Play:w.Pause,data:s}}),a){var c=this.file.defaultArtboardViewModel(o);if(c!==null){var l=c.defaultInstance();if(l!==null){var d=new I(l,null);(0,i.createFinalization)(d,d.runtimeInstance),this.bindViewModelInstance(d)}}}}},e.prototype.drawFrame=function(){var e;(document==null?void 0:document.timeline)?.currentTime?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),(e=this.runtime)==null||e.resolveAnimationFrame()):this.scheduleRendering()},e.prototype._canvasSizeChanged=function(){var e=!1;return this.canvas&&(this.canvas.width!==this._currentCanvasWidth&&(this._currentCanvasWidth=this.canvas.width,e=!0),this.canvas.height!==this._currentCanvasHeight&&(this._currentCanvasHeight=this.canvas.height,e=!0)),e},e.prototype.draw=function(e,t){var n;this.frameRequestId=null;var r=performance.now();this.lastRenderTime||=e,this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,t?.());var a=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e;for(var o=this.animator.animations.filter(function(e){return e.playing||e.needsScrub}).sort(function(e){return e.needsScrub?-1:1}),s=0,c=o;s<c.length;s++){var l=c[s];l.advance(a),l.instance.didLoop&&(l.loopCount+=1),l.apply(1)}for(var u=this.animator.stateMachines.filter(function(e){return e.playing}),d=this.enablePerfMarks&&this.frameCount<3?this.frameCount:-1,f=0,p=u;f<p.length;f++){var h=p[f],g=h.reportedEventCount();if(g)for(var _=0;_<g;_++){var y=h.reportedEventAt(_);if(y)if(y.type===v.OpenUrl){if(this.eventManager.fire({type:w.RiveEvent,data:y}),this.automaticallyHandleEvents){var b=document.createElement(`a`),x=y,S=x.url,C=x.target,T=(0,i.sanitizeUrl)(S);S&&b.setAttribute(`href`,T),C&&b.setAttribute(`target`,C),T&&T!==i.BLANK_URL&&b.click()}}else this.eventManager.fire({type:w.RiveEvent,data:y})}d>=0&&performance.mark(`rive:sm-advance:start:f${d}`),h.advanceAndApply(a),d>=0&&(performance.mark(`rive:sm-advance:end:f${d}`),performance.measure(`rive:sm-advance:f${d}`,`rive:sm-advance:start:f${d}`,`rive:sm-advance:end:f${d}`))}this.animator.stateMachines.length==0&&this.artboard.advance(a);var E=this.renderer;this._hasZeroSize||(this.drawOptimization==m.AlwaysDraw||this.artboard.didChange()||this._needsRedraw||this._canvasSizeChanged())&&(E.clear(),E.save(),d>=0&&performance.mark(`rive:align-renderer:start:f${d}`),this.alignRenderer(),d>=0&&(performance.mark(`rive:align-renderer:end:f${d}`),performance.measure(`rive:align-renderer:f${d}`,`rive:align-renderer:start:f${d}`,`rive:align-renderer:end:f${d}`)),d>=0&&performance.mark(`rive:artboard-draw:start:f${d}`),this.artboard.draw(E),d>=0&&(performance.mark(`rive:artboard-draw:end:f${d}`),performance.measure(`rive:artboard-draw:f${d}`,`rive:artboard-draw:start:f${d}`,`rive:artboard-draw:end:f${d}
7`)),E.restore(),d>=0&&performance.mark(`rive:renderer-flush:start:f${d}`),E.flush(),d>=0&&(performance.mark(`rive:renderer-flush:end:f${d}`),performance.measure(`rive:renderer-flush:f${d}`,`rive:renderer-flush:start:f${d}`,`rive:renderer-flush:end:f${d}`)),this._needsRedraw=!1),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(a),this.frameCount++;var D=performance.now();for(this.frameTimes.push(D),this.durations.push(D-r);this.frameTimes[0]<=D-1e3;)this.frameTimes.shift(),this.durations.shift();(n=this._viewModelInstance)==null||n.handleCallbacks(),this.animator.isPlaying?this.scheduleRendering():(this.animator.isPaused||this.animator.isStopped)&&(this.lastRenderTime=0)},e.prototype.alignRenderer=function(){var e=this,t=e.renderer,n=e.runtime,r=e._layout,i=e.artboard;t.align(r.runtimeFit(n),r.runtimeAlignment(n),{minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY},i.bounds,this._devicePixelRatioUsed*r.layoutScaleFactor)},Object.defineProperty(e.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(e,t){return e+t},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),e.prototype.cleanup=function(){var e,t;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),this._observed!==null&&ee.remove(this._observed),this.removeRiveListeners(),this.file&&=((e=this.riveFile)==null||e.cleanup(),null),this.riveFile=null,this.deleteRiveRenderer(),this._audioEventListener!==null&&(k.remove(this._audioEventListener),this._audioEventListener=null),(t=this._viewModelInstance)==null||t.cleanup(),this._viewModelInstance=null,this._dataEnums=null},e.prototype.deleteRiveRenderer=function(){var e;(e=this.renderer)==null||e.delete(),this.renderer=null},e.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&=(this.artboard.delete(),null)},e.prototype.retrieveTextRun=function(e){if(!e){console.warn(`No text run name provided`);return}if(!this.artboard){console.warn(`Tried to access text run, but the Artboard is null`);return}var t=this.artboard.textRun(e);if(!t){console.warn(`Could not access a text run with name '${e}' in the '${this.artboard?.name}' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime.`);return}return t},e.prototype.getTextRunValue=function(e){var t=this.retrieveTextRun(e);return t?t.text:void 0},e.prototype.setTextRunValue=function(e,t){var n=this.retrieveTextRun(e);n&&(n.text=t)},e.prototype.play=function(e,t){var n=this;if(e=R(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return n.play(e,t)}});return}this.animator.play(e),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},e.prototype.pause=function(e){var t=this;if(e=R(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return t.pause(e)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(e)},e.prototype.scrub=function(e,t){var n=this;if(e=R(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return n.scrub(e,t)}});return}this.animator.scrub(e,t||0),this.drawFrame()},e.prototype.stop=function(e){var t=this;if(e=R(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return t.stop(e)}});return}this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup()},e.prototype.reset=function(e){var t=e?.artboard,n=R(e?.animations),r=R(e?.stateMachines),i=e?.autoplay??!1,a=e?.autoBind??!1;this.cleanupInstances(),this.initArtboard(t,n,r,i,a),this.taskQueue.process()},e.prototype.load=function(e){this.file=null,this.stop(),this.init(e)},Object.defineProperty(e.prototype,"layout",{get:function(){return this._layout},set:function(e){this._layout=e,(!e.maxX||!e.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),e.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},e.prototype.resizeDrawingSurfaceToCanvas=function(e){if(this.canvas instanceof HTMLCanvasElement&&window){var t=this.canvas.getBoundingClientRect(),n=t.
7width,r=t.height,i=e||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=i,this.canvas.width=i*n,this.canvas.height=i*r,this._needsRedraw=!0,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===f.Layout){var a=this._layout.layoutScaleFactor;this.artboard.width=n/a,this.artboard.height=r/a}}},Object.defineProperty(e.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:``},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animationNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.animationCount();t++)e.push(this.artboard.animationByIndex(t).name);return e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.stateMachineCount();t++)e.push(this.artboard.stateMachineByIndex(t).name);return e},enumerable:!1,configurable:!0}),e.prototype.stateMachineInputs=function(e){if(this.loaded)return this.animator.stateMachines.find(function(t){return t.name===e})?.inputs},e.prototype.retrieveInputAtPath=function(e,t){if(!e){console.warn(`No input name provided for path '${t}'`);return}if(!this.artboard){console.warn(`Tried to access input: '${e}', at path: '${t}', but the Artboard is null`);return}var n=this.artboard.inputByPath(e,t);if(!n){console.warn(`Could not access an input with name: '${e}', at path:'${t}'`);return}return n},e.prototype.setBooleanStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===g.Boolean?r.asBool().value=t:console.warn(`Input with name: '${e}', at path:'${n}' is not a boolean`))},e.prototype.setNumberStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===g.Number?r.asNumber().value=t:console.warn(`Input with name: '${e}', at path:'${n}' is not a number`))},e.prototype.fireStateAtPath=function(e,t){var n=this.retrieveInputAtPath(e,t);n&&(n.type===g.Trigger?n.asTrigger().fire():console.warn(`Input with name: '${e}', at path:'${t}' is not a trigger`))},e.prototype.retrieveTextAtPath=function(e,t){if(!e){console.warn(`No text name provided for path '${t}'`);return}if(!t){console.warn(`No path provided for text '${e}'`);return}if(!this.artboard){console.warn(`Tried to access text: '${e}', at path: '${t}', but the Artboard is null`);return}var n=this.artboard.textByPath(e,t);if(!n){console.warn(`Could not access text with name: '${e}', at path:'${t}'`);return}return n},e.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);if(!n){console.warn(`Could not get text with name: '${e}', at path:'${t}'`);return}return n.text},e.prototype.setTextRunValueAtPath=function(e,t,n){var r=this.retrieveTextAtPath(e,n);if(!r){console.warn(`Could not set text with name: '${e}', at path:'${n}'`);return}r.text=t},Object.defineProperty(e.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){return this.animator?.isStopped??!0}
7,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},e.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},e.prototype.unsubscribe=function(e,t){console.warn("This function is deprecated: please use `off()` instead."),this.off(e,t)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.unsubscribeAll=function(e){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(e)},e.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},e.prototype.startRendering=function(){this.drawFrame()},e.prototype.scheduleRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this._boundDraw):this.frameRequestId=requestAnimationFrame(this._boundDraw))},e.prototype.enableFPSCounter=function(e){this.runtime.enableFPSCounter(e)},e.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(e.prototype,"contents",{get:function(){if(this.loaded){for(var e={artboards:[]},t=0;t<this.file.artboardCount();t++){for(var n=this.file.artboardByIndex(t),r={name:n.name,animations:[],stateMachines:[]},i=0;i<n.animationCount();i++){var a=n.animationByIndex(i);r.animations.push(a.name)}for(var o=0;o<n.stateMachineCount();o++){for(var s=n.stateMachineByIndex(o),c=s.name,l=new this.runtime.StateMachineInstance(s,n),u=[],d=0;d<l.inputCount();d++){var f=l.input(d);u.push({name:f.name,type:f.type})}r.stateMachines.push({name:c,inputs:u})}e.artboards.push(r)}return e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this.artboard&&this.artboard.volume!==this._volume&&(this._volume=this.artboard.volume),this._volume},set:function(e){this._volume=e,this.artboard&&(this.artboard.volume=e*k.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artboardWidth",{get:function(){return this.artboard?this.artboard.width:this._artboardWidth??0},set:function(e){this._artboardWidth=e,this.artboard&&(this.artboard.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artboardHeight",{get:function(){return this.artboard?this.artboard.height:this._artboardHeight??0},set:function(e){this._artboardHeight=e,this.artboard&&(this.artboard.height=e)},enumerable:!1,configurable:!0}),e.prototype.resetArtboardSize=function(){this.artboard?(this.artboard.resetArtboardSize(),this._artboardWidth=this.artboard.width,this._artboardHeight=this.artboard.height):(this._artboardWidth=void 0,this._artboardHeight=void 0)},Object.defineProperty(e.prototype,"devicePixelRatioUsed",{get:function(){return this._devicePixelRatioUsed},set:function(e){this._devicePixelRatioUsed=e},enumerable:!1,configurable:!0}),e.prototype.bindViewModelInstance=function(e){var t;this.artboard&&!this.destroyed&&e&&e.runtimeInstance&&(e.internalIncrementReferenceCount(),(t=this._viewModelInstance)==null||t.cleanup(),this._viewModelInstance=e,this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(t){return t.bindViewModelInstance(e)}):this.artboard.bindViewModelInstance(e.runtimeInstance))},Object.defineProperty(e.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),e.prototype.viewModelByIndex=function(e){var t=this.file.viewModelByIndex(e);return t===null?null:new P(t)},e.prototype.viewModelByName=function(e){return this.riveFile?.viewModelByName(e)},e.prototype.enums=function(){if(this._dataEnums===null){var e=this.file.enums();this._dataEnums=e.map(function(e){return new ne(e)})}return this._dataEnums},e.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new P(e)}return null},e.prototype.getArtboard=function(e){return this.riveFile?.getArtboard(e)??null},e.prototype.getBindableArtboard=function(e){return this.riveFile?.getBindableArtboard(e)??null},e.prototype.getDefaultBindableArtboard=function(){return this.riveFile?.getDefaultBindableArtboard()??null},e.missingErrorMessage=`Rive source file or data buffer required`,e.cleanupErrorMessage=`Attempt to use file after calling cleanup.`,e}(),te;(function(e){e.none=`none`,e.string=`string`,e.number=`number`,e.boolean=`boolean`,e.color=`color`,e.list=`list`,e.enumType=`enumType`,e.trigger=`trigger`,e.viewModel=`viewM
7odel`,e.integer=`integer`,e.listIndex=`listIndex`,e.image=`image`,e.artboard=`artboard`})(te||={});var P=function(){function e(e){this._viewModel=e}return Object.defineProperty(e.prototype,"instanceCount",{get:function(){return this._viewModel.instanceCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._viewModel.name},enumerable:!1,configurable:!0}),e.prototype.instanceByIndex=function(e){var t=this._viewModel.instanceByIndex(e);if(t!==null){var n=new I(t,null);return(0,i.createFinalization)(n,t),n}return null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);if(t!==null){var n=new I(t,null);return(0,i.createFinalization)(n,t),n}return null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();if(e!==null){var t=new I(e,null);return(0,i.createFinalization)(t,e),t}return null},e.prototype.instance=function(){var e=this._viewModel.instance();if(e!==null){var t=new I(e,null);return(0,i.createFinalization)(t,e),t}return null},Object.defineProperty(e.prototype,"properties",{get:function(){return this._viewModel.getProperties()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instanceNames",{get:function(){return this._viewModel.getInstanceNames()},enumerable:!1,configurable:!0}),e}(),ne=function(){function e(e){this._dataEnum=e}return Object.defineProperty(e.prototype,"name",{get:function(){return this._dataEnum.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this._dataEnum.values},enumerable:!1,configurable:!0}),e}(),F;(function(e){e.Number=`number`,e.String=`string`,e.Boolean=`boolean`,e.Color=`color`,e.Trigger=`trigger`,e.Enum=`enum`,e.List=`list`,e.Image=`image`,e.Artboard=`artboard`})(F||={});var I=function(){function e(e,t){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this.selfUnref=!1,this._runtimeInstance=e,t!==null&&this._parents.push(t)}return Object.defineProperty(e.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nativeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),e.prototype.handleCallbacks=function(){this._propertiesWithCallbacks.length!==0&&(this._propertiesWithCallbacks.forEach(function(e){e.handleCallbacks()}),this._propertiesWithCallbacks.forEach(function(e){e.clearChanges()})),this._children.forEach(function(e){return e.handleCallbacks()})},e.prototype.addParent=function(e){this._parents.includes(e)||(this._parents.push(e),(this._propertiesWithCallbacks.length>0||this._children.length>0)&&e.addToViewModelCallbacks(this))},e.prototype.removeParent=function(e){var t=this._parents.indexOf(e);t!==-1&&(this._parents[t].removeFromViewModelCallbacks(this),this._parents.splice(t,1))},e.prototype.addToPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)||(this._propertiesWithCallbacks.push(e),this._propertiesWithCallbacks.length>0&&this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(t){return t!==e}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.addToViewModelCallbacks=function(e){var t=this;this._children.includes(e)||(this._children.push(e),this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromViewModelCallbacks=function(e){var t=this;this._children.includes(e)&&(this._children=this._children.filter(function(t){return t!==e}),this._children.length===0&&this._propertiesWithCallbacks.length===0&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(e){e.clearCallbacks()})},e.prototype.propertyFromPath=function(e,t){var n=e.split(`/`);return this.propertyFromPathSegments(n,0,t)},e.prototype.viewModelFromPathSegments=function(e,t){var n=this.internalViewModelInstance(e[t]);return n===null?null:t==e.length-1?n:n.viewModelFromPathSegments(e,t++)},e.prototype.propertyFromPathSegments=function(e,t,n){if(t<e.length-1){var r=this.internalViewModelInstance(e[t]);return r===null?null:r.propertyFromPathSegments(e,t+1,n)}var i=null;switch(n){case F.Number:if(i=this._runtimeInstance?.number(e[t])??null,i!==null)return new ie(i,this);break;
7case F.String:if(i=this._runtimeInstance?.string(e[t])??null,i!==null)return new re(i,this);break;case F.Boolean:if(i=this._runtimeInstance?.boolean(e[t])??null,i!==null)return new ae(i,this);break;case F.Color:if(i=this._runtimeInstance?.color(e[t])??null,i!==null)return new le(i,this);break;case F.Trigger:if(i=this._runtimeInstance?.trigger(e[t])??null,i!==null)return new oe(i,this);break;case F.Enum:if(i=this._runtimeInstance?.enum(e[t])??null,i!==null)return new se(i,this);break;case F.List:if(i=this._runtimeInstance?.list(e[t])??null,i!==null)return new ce(i,this);break;case F.Image:if(i=this._runtimeInstance?.image(e[t])??null,i!==null)return new ue(i,this);break;case F.Artboard:if(i=this._runtimeInstance?.artboard(e[t])??null,i!==null)return new de(i,this);break}return null},e.prototype.internalViewModelInstance=function(t){if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var n=this._runtimeInstance?.viewModel(t);if(n!==null){var r=new e(n,this);return(0,i.createFinalization)(r,n),r.internalIncrementReferenceCount(),this._viewModelInstances.set(t,r),r}return null},e.prototype.number=function(e){return this.propertyFromPath(e,F.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,F.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,F.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,F.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,F.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,F.Enum)},e.prototype.list=function(e){return this.propertyFromPath(e,F.List)},e.prototype.image=function(e){return this.propertyFromPath(e,F.Image)},e.prototype.artboard=function(e){return this.propertyFromPath(e,F.Artboard)},e.prototype.viewModel=function(e){var t=e.split(`/`),n=t.length>1?this.viewModelFromPathSegments(t.slice(0,t.length-1),0):this;return n==null?null:n.internalViewModelInstance(t[t.length-1])},e.prototype.internalReplaceViewModel=function(e,t){if(t.runtimeInstance!==null){var n=this._runtimeInstance?.replaceViewModel(e,t.runtimeInstance)||!1;if(n){t.internalIncrementReferenceCount();var r=this.internalViewModelInstance(e);r!==null&&(r.removeParent(this),this._children.includes(r)&&(this._children=this._children.filter(function(e){return e!==r})),r.cleanup()),this._viewModelInstances.set(e,t),t.addParent(this)}return n}return!1},e.prototype.replaceViewModel=function(e,t){var n=e.split(`/`);return(n.length>1?this.viewModelFromPathSegments(n.slice(0,n.length-1),0):this)?.internalReplaceViewModel(n[n.length-1],t)??!1},e.prototype.incrementReferenceCount=function(){var e;this._referenceCount++,(e=this._runtimeInstance)==null||e.incrementReferenceCount()},e.prototype.decrementReferenceCount=function(){var e;this._referenceCount--,(e=this._runtimeInstance)==null||e.decrementReferenceCount()},Object.defineProperty(e.prototype,"properties",{get:function(){return this._runtimeInstance?.getProperties().map(function(e){return o({},e)})||[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewModelName",{get:function(){return this._runtimeInstance?.getViewModelName()??``},enumerable:!1,configurable:!0}),e.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},e.prototype.cleanup=function(){var e=this,t;if(this._referenceCount--,this._referenceCount<=0){this.selfUnref&&((t=this._runtimeInstance)==null||t.unref()),this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach(function(e){e.cleanup()}),this._viewModelInstances.clear();var n=l([],this._children,!0);this._children.length=0;var r=l([],this._parents,!0);this._parents.length=0,n.forEach(function(t){t.removeParent(e)}),r.forEach(function(t){t.removeFromViewModelCallbacks(e)})}},e}(),L=function(){function e(e,t){this.callbacks=[],this._viewModelInstanceValue=e,this._parentViewModel=t}return e.prototype.on=function(e){this.callbacks.length===0&&this._viewModelInstanceValue.clearChanges(),this.callbacks.includes(e)||(this.callbacks.push(e),this._parentViewModel.addToPropertyCallbacks(this))},e.prototype.off=function(e){e?this.callbacks=this.callbacks.filter(function(t){return t!==e}):this.callbacks.length=0,this.callbacks.length===0&&this._parentViewModel.removeFromPropertyCallbacks(this)},e.prototype.internalHandleCallback=function(e){},e.prototype.handleCallbacks=function(){var e=this;this._viewModelInstanceValue.hasChanged&&this.callbacks.forEach(function(t){e.internalHandleCallback(t)})},e.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},e.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(e.prototype,"name",{get:function(){return this._viewModelInstanceValue.name}
7,enumerable:!1,configurable:!0}),e}(),re=function(e){a(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(L),ie=function(e){a(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(L),ae=function(e){a(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(L),oe=function(e){a(t,e);function t(t,n){return e.call(this,t,n)||this}return t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(L),se=function(e){a(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(e){this._viewModelInstanceValue.valueIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(L),ce=function(e){a(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),t.prototype.addInstance=function(e){e.runtimeInstance!=null&&(this._viewModelInstanceValue.addInstance(e.runtimeInstance),e.addParent(this._parentViewModel))},t.prototype.addInstanceAt=function(e,t){return e.runtimeInstance!=null&&this._viewModelInstanceValue.addInstanceAt(e.runtimeInstance,t)?(e.addParent(this._parentViewModel),!0):!1},t.prototype.removeInstance=function(e){e.runtimeInstance!=null&&(this._viewModelInstanceValue.removeInstance(e.runtimeInstance),e.removeParent(this._parentViewModel))},t.prototype.removeInstanceAt=function(e){this._viewModelInstanceValue.removeInstanceAt(e)},t.prototype.instanceAt=function(e){var t=this._viewModelInstanceValue.instanceAt(e);if(t!=null){var n=new I(t,this._parentViewModel);return(0,i.createFinalization)(n,t),n}return null},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(L),le=function(e){a(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.rgb=function(e,t,n){this._viewModelInstanceValue.rgb(e,t,n)},t.prototype.rgba=function(e,t,n,r){this._viewModelInstanceValue.argb(r,e,t,n)},t.prototype.argb=function(e,t,n,r){this._viewModelInstanceValue.argb(e,t,n,r)},t.prototype.alpha=function(e){this._viewModelInstanceValue.alpha(e)},t.prototype.opacity=function(e){this._viewModelInstanceValue.alpha(Math.round(Math.max(0,Math.min(1,e))*255))},t.prototype.internalHandleCallback=function(e){e(this.value)},t}(L),ue=function(e){a(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{set:function(e){this._viewModelInstanceValue.value(e?.nativeImage??null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(L),de=function(e){a(t,e);function t(t,n){return e.call(this,t,n)||this}return Object.defineProperty(t.prototype,"value",{set:function(e){var t=e.isBindableArtboard?e:e.file.internalBindableArtboardFromArtboard(e.nativeArtboard);this._viewModelInstanceValue.value(t?.nativeArtboard??null),t?.nativeViewModel&&this._viewModelInstanceValue.viewModelInstance(t?.nativeViewModel??null)}
7,enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(L),fe=function(e){return s(void 0,void 0,void 0,function(){var t,n,r;return c(this,function(i){switch(i.label){case 0:return t=new Request(e),[4,fetch(t)];case 1:if(n=i.sent(),!n.ok)throw Error(`Failed to fetch the Rive file: HTTP ${n.status}`);return[4,n.arrayBuffer()];case 2:return r=i.sent(),[2,r]}})})},R=function(e){return typeof e==`string`?[e]:e instanceof Array?e:[]},pe={EventManager:E,TaskQueueManager:D},me=function(e){return s(void 0,void 0,void 0,function(){var n,r,a;return c(this,function(o){switch(o.label){case 0:return n=new Promise(function(n){return t.RuntimeLoader.getInstance(function(t){t.decodeAudio(e,n)})}),[4,n];case 1:return r=o.sent(),a=new i.AudioWrapper(r),i.finalizationRegistry.register(a,r),[2,a]}})})},he=function(e){return s(void 0,void 0,void 0,function(){var n,r,a;return c(this,function(o){switch(o.label){case 0:return n=new Promise(function(n){return t.RuntimeLoader.getInstance(function(t){t.decodeImage(e,n)})}),[4,n];case 1:return r=o.sent(),a=new i.ImageWrapper(r),i.finalizationRegistry.register(a,r),[2,a]}})})},ge=function(e){return s(void 0,void 0,void 0,function(){var n,r,a;return c(this,function(o){switch(o.label){case 0:return n=new Promise(function(n){return t.RuntimeLoader.getInstance(function(t){t.decodeFont(e,n)})}),[4,n];case 1:return r=o.sent(),a=new i.FontWrapper(r),i.finalizationRegistry.register(a,r),[2,a]}})})}})(),r})())})),r=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});var r,i=t(),a=n();function o(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var s=o(i);function c(e){var t=e||l(),n=i.useState(t),r=n[0],a=n[1];return i.useEffect(function(){if(`u`>typeof window&&`matchMedia`in window){var t=function(){a(e||l())},n=window.matchMedia(`screen and (resolution: `+r+`dppx)`);return n.hasOwnProperty(`addEventListener`)?n.addEventListener(`change`,t):n.addListener(t),function(){n.hasOwnProperty(`removeEventListener`)?n.removeEventListener(`change`,t):n.removeListener(t)}}},[r,e]),r}function l(){return Math.min(Math.max(1,`u`>typeof window&&typeof window.devicePixelRatio==`number`?window.devicePixelRatio:1),3)}var u=function(){function e(){}var t=e.prototype;return t.observe=function(){},t.unobserve=function(){},t.disconnect=function(){},e}();function d(e,t){var n=0;return function(){for(var r=this,i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];clearTimeout(n),n=window.setTimeout(function(){return e.apply(r,a)},t)}}var f=globalThis.ResizeObserver||u,p=globalThis.ResizeObserver!==void 0,m=!p;function h(e,t){t===void 0&&(t=!0);var n=i.useState({width:0,height:0}),r=n[0],a=n[1];i.useEffect(function(){if(`u`>typeof window&&t){var e=function(){a({width:window.innerWidth,height:window.innerHeight})};return m&&(e(),window.addEventListener(`resize`,e)),function(){return window.removeEventListener(`resize`,e)}}},[]);var o=i.useRef(new f(d(function(e){p&&a({width:e[e.length-1].contentRect.width,height:e[e.length-1].contentRect.height})},0)));return i.useEffect(function(){var n=o.current;if(!t)return void n.disconnect();var r=e.current;return e.current&&p&&n.observe(e.current),function(){n.disconnect(),r&&p&&n.unobserve(r)}},[e,o]),r}var g={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function _(e){return Object.assign({},g,e)}function v(e){var t=e.riveLoaded,n=t!==void 0&&t,r=e.canvasElem,a=e.containerRef,o=e.options,s=e.onCanvasHasResized,l=e.artboardBounds,u=_(o===void 0?{}:o),d=i.useState({height:0,width:0}),f=d[0],p=f.height,m=f.width,g=d[1],v=i.useState({height:0,width:0}),y=v[0],b=y.height,x=y.width,S=v[1],C=i.useState(!0),w=C[0],T=C[1],E=u.fitCanvasToArtboardHeight,D=u.shouldResizeCanvasToContainer,O=u.useDevicePixelRatio,k=u.customDevicePixelRatio,A=h(a,D),j=c(k),ee=l??{},M=ee.maxX,N=ee.maxY,te=i.useCallback(function(){var e=a.current?.clientWidth??0,t=a.current?.clientHeight??0;return E&&l?{width:e,height:l.maxY/l.maxX*e}:{width:e,height:t}},[a,E,M,N]);i.useEffect(function(){if(D&&a.current&&n){var e=te(),t=e.width,i=e.he
7ight,o=!1;if(r){var c=t!==m||i!==p;if(u.fitCanvasToArtboardHeight&&c&&(a.current.style.height=i+`px`,o=!0),u.useDevicePixelRatio){var l=t*j!==x||i*j!==b;if(c||l){var d=j*t,f=j*i;r.width=d,r.height=f,r.style.width=t+`px`,r.style.height=i+`px`,S({width:d,height:f}),o=!0}}else c&&(r.width=t,r.height=i,S({width:t,height:i}),o=!0);g({width:t,height:i})}s&&(w||o)&&s&&s(),w&&T(!1)}},[r,a,A,j,te,w,T,b,x,p,m,s,D,E,O,n]),i.useEffect(function(){S({width:0,height:0})},[r])}var y=function(){function e(){}var t=e.prototype;return t.observe=function(){},t.unobserve=function(){},t.disconnect=function(){},e}(),b=globalThis.IntersectionObserver||y,x=function(){function e(){var e=this;this.elementsMap=new Map,this.onObserved=function(t){t.forEach(function(t){var n=e.elementsMap.get(t.target);n&&n(t)})},this.observer=new b(this.onObserved)}var t=e.prototype;return t.registerCallback=function(e,t){this.observer.observe(e),this.elementsMap.set(e,t)},t.removeCallback=function(e){this.observer.unobserve(e),this.elementsMap.delete(e)},e}(),S=function(){return r||=new x,r};function C(){return{observe:i.useCallback(function(e,t){S().registerCallback(e,t)},[]),unobserve:i.useCallback(function(e){S().removeCallback(e)},[])}}function w(){return(w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function T(e,t){if(e==null)return{};var n,r,i={},a=Object.getOwnPropertyNames(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function E(e){var t=e.setContainerRef,n=e.setCanvasRef,r=e.className,i=r===void 0?``:r,a=e.style,o=e.children,c=T(e,[`setContainerRef`,`setCanvasRef`,`className`,`style`,`children`]),l=w({width:`100%`,height:`100%`},a);return s.default.createElement(`div`,w({ref:t,className:i},!i&&{style:l}),s.default.createElement(`canvas`,w({ref:n,style:{verticalAlign:`top`,width:0,height:0}},c),o))}function D(e,t){t===void 0&&(t={});var n=i.useState(null),r=n[0],o=n[1],l=i.useRef(null),u=i.useRef(null),d=i.useState(null),f=d[0],p=d[1],m=!!e,h=_(t),g=c(),y=i.useCallback(function(){if(f){if(f.layout&&f.layout.fit===a.Fit.Layout&&r){var e=g*f.layout.layoutScaleFactor;f.devicePixelRatioUsed=g,f.artboardWidth=r?.width/e,f.artboardHeight=r?.height/e}f.startRendering(),f.resizeToCanvas()}},[f,g]);v({riveLoaded:!!f,canvasElem:r,containerRef:l,options:h,onCanvasHasResized:y,artboardBounds:f?.bounds});var b=i.useCallback(function(e){e===null&&r&&(r.height=0,r.width=0),o(e)},[]);i.useEffect(function(){if(r&&e){var t,n=f!=null;if(f==null){var i=h.useOffscreenRenderer,o=e.onRiveReady,s=T(e,[`onRiveReady`]);t=new a.Rive(w({useOffscreenRenderer:i},s,{canvas:r})),u.current!=null&&u.current.cleanup(),u.current=t,t.on(a.EventType.Load,function(){n=!0,o&&o(t),r?p(t):t.cleanup()})}return function(){n||t==null||t.cleanup()}}},[r,m,f]);var x=i.useCallback(function(e){l.current=e},[]),S=C(),D=S.observe,O=S.unobserve;i.useEffect(function(){var e,t=!1,n=function(){if(r&&t){var e=r.getBoundingClientRect();e.width>0&&e.height>0&&e.top<(window.innerHeight||document.documentElement.clientHeight)&&e.bottom>0&&e.left<(window.innerWidth||document.documentElement.clientWidth)&&e.right>0&&(f?.startRendering(),t=!1)}};return r&&!1!==h.shouldUseIntersectionObserver&&D(r,function(r){r.isIntersecting?f&&f.startRendering():f&&f.stopRendering(),t=!r.isIntersecting,clearTimeout(e),r.isIntersecting||r.boundingClientRect.width!==0||(e=setTimeout(n,10))}),function(){r&&O(r)}},[D,O,f,r,h.shouldUseIntersectionObserver]),i.useEffect(function(){return function(){f&&(f.cleanup(),p(null))}},[f,r]),i.useEffect(function(){return function(){u.current!=null&&u.current.cleanup()}},[]);var k=e?.animations;i.useEffect(function(){f&&k&&(f.isPlaying?(f.stop(f.animationNames),f.play(k)):f.isPaused&&(f.stop(f.animationNames),f.pause(k)))},[k,f]);var A=i.useCallback(function(e){return s.default.createElement(E,w({setContainerRef:x,setCanvasRef:b},e))},[b,x]);return{canvas:r,container:l.current,setCanvasRef:b,setContainerRef:x,rive:f,RiveComponent:A}}function O(e,t){if(e==null)return{};var n,r,i={},a=Object.getOwnPropertyNames(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}var k=function(e){var t=e.src,n=e.artboard,r=e.animations,i=e.stateMachines,a=e.layout,o=e.useOffscreenRenderer,c=e.shouldDisableRiveListeners,l=e.shouldResizeCanvasToContainer,u=e.automaticallyHandleEvents,d=e.children,f=O(e,[`src`,`artboard`,`animations`,`stateMachines`,`layout`,`useOffscreenRenderer`,`shouldDisableRiveListeners`,`shouldResizeCanvasToContainer`,`automaticallyHandleEvents`,`children`]),p=D({src:t,artboard:n,animations:r,layout:a,stateMachines:i,autoplay:!0,shouldDisableRiveListeners:c!==void 0&&c,automaticallyHandleEvents:u!==void 0&&u},{useOffscreenRenderer:o===void 0||o,shouldResizeCanvasToContainer:l===void 0||l}).RiveComponent;return s.default.createElement(p,f,d)};function A(e,t,n,r){var o=i.useState(null),s=o[0],c=o[1];return i.useEffect(function(){var i=function(){if(e&&t&&n||c(null),e&&t&&n){var i=e.stateMachineInputs(t);if(i){var a=i.find(function(e){return e.name===n});r!==void 0&&a&&(a.value=r),c(a||null)}}else c(null)};i(),e&&e.on(a.EventType.Load,function(){i()})},[e]),s}function j(e,t){var n=t??{},r=n.name,o=n.useDefault,s=i.useState(null),c=s[0],l=s[1];return i.useEffect(function(){var t=function(){if(!e)return void l(null);
7l(r==null?e.defaultViewModel()||null:(e.viewModelByName==null?void 0:e.viewModelByName.call(e,r))||null)};return t(),e&&e.on(a.EventType.Load,t),function(){e&&e.off(a.EventType.Load,t)}},[e,r,o!==void 0&&o]),c}function ee(e,t){var n=t??{},r=n.name,a=n.useDefault,o=a!==void 0&&a,s=n.useNew,c=s!==void 0&&s,l=n.rive,u=i.useState(null),d=u[0],f=u[1];return i.useEffect(function(){if(!e)return void f(null);var t=null;f(t=r==null?o?(e.defaultInstance==null?void 0:e.defaultInstance.call(e))||null:c?(e.instance==null?void 0:e.instance.call(e))||null:(e.defaultInstance==null?void 0:e.defaultInstance.call(e))||null:e.instanceByName(r)||null),l&&t&&l.viewModelInstance!==t&&l.bindViewModelInstance(t)},[e,r,o,c,l]),d}function M(){return(M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function N(e,t,n){var r=i.useState(null),a=r[0],o=r[1],s=i.useState(n.defaultValue),c=s[0],l=s[1],u=i.useState(null),d=u[0],f=u[1],p=i.useRef(null),m=i.useRef(e),h=i.useRef(n);i.useEffect(function(){h.current=n},[n]);var g=i.useCallback(function(){var e=p.current,t=m.current,n=h.current;if(!e||!t)return o(null),l(n.defaultValue),f(null),function(){};var r=n.getProperty(e,t);if(r){o(r),l(n.getValue(r)),n.getExtendedData&&f(n.getExtendedData(r));var i=function(){l(n.getValue(r)),n.getExtendedData&&f(n.getExtendedData(r)),n.onPropertyEvent&&n.onPropertyEvent()};return r.on(i),function(){r.off(i)}}return function(){}},[]);i.useEffect(function(){return p.current=t,m.current=e,g()},[t,e,g]);var _=i.useCallback(function(e){if(a&&p.current===t)try{e(a),h.current.getExtendedData&&f(h.current.getExtendedData(a));return}catch{}if(p.current)try{var n=h.current.getProperty(p.current,m.current);n&&(o(n),e(n),h.current.getExtendedData&&f(h.current.getExtendedData(n)))}catch{}},[a,t]),v=i.useMemo(function(){return h.current.buildPropertyOperations(_)},[_]),y=M({value:c},v);return n.getExtendedData&&(y.extendedData=d),y}function te(e,t){var n=N(e,t,{getProperty:i.useCallback(function(e,t){return e.number(t)},[]),getValue:i.useCallback(function(e){return e.value},[]),defaultValue:null,buildPropertyOperations:i.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])});return{value:n.value,setValue:n.setValue}}function P(e,t){var n=N(e,t,{getProperty:i.useCallback(function(e,t){return e.string(t)},[]),getValue:i.useCallback(function(e){return e.value},[]),defaultValue:null,buildPropertyOperations:i.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])});return{value:n.value,setValue:n.setValue}}function ne(e,t){var n=N(e,t,{getProperty:i.useCallback(function(e,t){return e.boolean(t)},[]),getValue:i.useCallback(function(e){return e.value},[]),defaultValue:null,buildPropertyOperations:i.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])});return{value:n.value,setValue:n.setValue}}function F(e,t){var n=N(e,t,{getProperty:i.useCallback(function(e,t){return e.color(t)},[]),getValue:i.useCallback(function(e){return e.value},[]),defaultValue:null,buildPropertyOperations:i.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})},setRgb:function(t,n,r){e(function(e){e.rgb(t,n,r)})},setRgba:function(t,n,r,i){e(function(e){e.rgba(t,n,r,i)})},setAlpha:function(t){e(function(e){e.alpha(t)})},setOpacity:function(t){e(function(e){e.opacity(t)})}}},[])});return{value:n.value,setValue:n.setValue,setRgb:n.setRgb,setRgba:n.setRgba,setAlpha:n.setAlpha,setOpacity:n.setOpacity}}function I(e,t){var n=N(e,t,{getProperty:i.useCallback(function(e,t){return e.enum(t)},[]),getValue:i.useCallback(function(e){return e.value},[]),defaultValue:null,getExtendedData:i.useCallback(function(e){return e.values},[]),buildPropertyOperations:i.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])});return{value:n.value,values:n.extendedData||[],setValue:n.setValue}}function L(e,t,n){var r=(n??{}).onTrigger;return{trigger:N(e,t,{getProperty:i.useCallback(function(e,t){return e.trigger(t)},[]),getValue:i.useCallback(function(){},[]),defaultValue:null,onPropertyEvent:r,buildPropertyOperations:i.useCallback(function(e){return{trigger:function(){e(function(e){e.trigger()})}}},[])}).trigger}}function re(e,t){return{setValue:N(e,t,{getProperty:i.useCallback(function(e,t){return e.image(t)},[]),getValue:i.useCallback(function(){},[]),defaultValue:null,buildPropertyOperations:i.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])}).setValue}}function ie(e,t){var n=i.useState(0)[1],r=N(e,t,{getProperty:i.useCallback(function(e,t){return e.list(t)},[]),getValue:i.useCallback(function(e){return e.length},[]),defaultValue:null,onPropertyEvent:function(){n(function(e){return e+1})},buildPropertyOperations:i.useCallback(function(e){return{addInstance:function(t){e(function(e){return e.addInstance(t)})},addInstanceAt:function(t,n){var r=!1;return e(function(e){r=e.addInstanceAt(t,n)}),r},removeInstance:function(t){e(function(e){return e.removeInstance(t)})},removeInstanceAt:function(t){e(function(e){return e.removeInstanceAt(t)})},getInstanceAt:function(t){var n=null;return e(function(e){n=e.instanceAt(t)}),n}
7,swap:function(t,n){e(function(e){return e.swap(t,n)})}}},[])});return{length:r.value??0,addInstance:r.addInstance,addInstanceAt:r.addInstanceAt,removeInstance:r.removeInstance,removeInstanceAt:r.removeInstanceAt,getInstanceAt:r.getInstanceAt,swap:r.swap}}function ae(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function oe(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){ae(a,r,i,o,s,`next`,e)}function s(e){ae(a,r,i,o,s,`throw`,e)}o(void 0)})}}function se(e,t){var n,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype),s=Object.defineProperty;return s(o,`next`,{value:c(0)}),s(o,`throw`,{value:c(1)}),s(o,`return`,{value:c(2)}),typeof Symbol==`function`&&s(o,Symbol.iterator,{value:function(){return this}}),o;function c(s){return function(c){var l=[s,c];if(n)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(l[0]===6&&a.label<i[1]){a.label=i[1],i=l;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(l);break}i[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}function ce(e){var t=i.useState(null),n=t[0],r=t[1],o=i.useState(`idle`),s=o[0],c=o[1];return i.useEffect(function(){var t=null;return oe(function(){return se(this,function(n){try{c(`loading`),(t=new a.RiveFile(e)).init(),t.on(a.EventType.Load,function(){t?.getInstance(),r(t),c(`success`)}),t.on(a.EventType.LoadError,function(){c(`failed`)}),r(t)}catch(e){console.error(e),c(`failed`)}return[2]})})(),function(){t?.cleanup()}},[e.src,e.buffer]),{riveFile:n,status:s}}function le(e,t){return{setValue:N(e,t,{getProperty:i.useCallback(function(e,t){return e.artboard(t)},[]),getValue:i.useCallback(function(){},[]),defaultValue:null,buildPropertyOperations:i.useCallback(function(e){return{setValue:function(t){e(function(e){e.value=t})}}},[])}).setValue}}e.default=k,e.useResizeCanvas=v,e.useRive=D,e.useRiveFile=ce,e.useStateMachineInput=A,e.useViewModel=j,e.useViewModelInstance=ee,e.useViewModelInstanceArtboard=le,e.useViewModelInstanceBoolean=ne,e.useViewModelInstanceColor=F,e.useViewModelInstanceEnum=I,e.useViewModelInstanceImage=re,e.useViewModelInstanceList=ie,e.useViewModelInstanceNumber=te,e.useViewModelInstanceString=P,e.useViewModelInstanceTrigger=L,Object.keys(a).forEach(function(t){t==="default"||e.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})})})),i=r(),a=`https://cdn.shopify.com/shopifycloud/world/brochure/production-shopify/assets/rive-DbITjz9I.wasm`;function o(){i.RuntimeLoader.setWasmFallbackUrl(null),i.RuntimeLoader.getWasmUrl()!==a&&i.RuntimeLoader.setWasmUrl(a)}function s(){typeof document>`u`||o()}var c=async(e,t)=>{let n={Accept:`image/webp,image/jpeg,image/png,image/svg+xml,*/*`};try{let r=t?await fetch(e):await fetch(e,{headers:n});if(!r.ok)throw Error(`Failed to fetch asset: ${r.statusText}`);return new Uint8Array(await r.arrayBuffer())}catch(t){return console.error(`Error fetching asset from ${e}:`,t),null}},l=async(e,t)=>{let n=await c(e,t);if(!n)return null;try{return s(),t?await(0,i.decodeFont)(n):await(0,i.decodeImage)(n)}catch(t){return console.error(`Error decoding asset from ${e}:`,t),null}},u=async({font:e,image:t,asset:n})=>{!e&&!t||(e?(n.setFont(e),e.unref()):t&&(n.setRenderImage(t),t.unref()))},d=e=>e.toLowerCase().replace(` `,`-`).replace(`.svg`,``).replace(`.json`,``).replace(`.png`,``).replace(`psd`,``).replace(`.jpg`,``).replace(`.jpeg`,``).replace(`.ttf`,``).replace(`.otf`,``).replace(`txt`,``),f=(e,t)=>{!e||!t||Object.keys(t).filter(e=>t[e]!==null).forEach(n=>{if(n.includes(`/`)){let r=n.lastIndexOf(`/`),i=n.substring(0,r),a=n.substring(r+1);e.activeArtboard===i?e.setTextRunValue(a,t[n]):e.setTextRunValueAtPath(a,t[n],i)}else e.setTextRunValue(n,t[n])})},p=(e,t)=>{!e||!t||Object.keys(t).filter(e=>t[e]!==null).forEach(n=>
7{if(n.includes(`.`)){let[r,i]=n.split(`.`),a=e.viewModel?.(r);if(a){let e=a.string(i);e?e.value=t[n]:console.warn(`String property "${i}" not found in nested view model "${r}"`)}else console.warn(`Nested view model instance "${r}" not found`)}else{let r=e.string(n);r?r.value=t[n]:console.warn(`String property "${n}" not found in view model`)}})},m=(e,t)=>{!e||!t||Object.entries(t).forEach(([t,n])=>{let r=e.enum(t);r&&(r.value=n)})},h=(e,t)=>{!e||!t||Object.entries(t).forEach(([t,n])=>{let r=e.boolean(t);r&&(r.value=n)})},g=async(e,t)=>{!e||!t||await Promise.all(Object.entries(t).map(async([t,n])=>{try{let r=e.image(t);if(!r){console.warn(`Image property "${t}" not found in view model`);return}let a=await fetch(n,{headers:{Accept:`image/webp,image/jpeg,image/png,image/svg+xml,*/*`}});if(!a.ok)throw Error(`HTTP ${a.status}: ${a.statusText}`);let o=await a.arrayBuffer();s();let c=await(0,i.decodeImage)(new Uint8Array(o));r.value=c,c.unref()}catch(e){console.error(`Failed to load image for property "${t}":`,e)}}))};export{h as a,p as c,f as i,s as l,d as n,m as o,u as r,g as s,l as t,r as u}; 8//# sourceMappingURL=utils-Dfl3QuSV.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.