HEX
Server: LiteSpeed
System: Linux venus 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: axxoncom (1007)
PHP: 8.3.19
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/axxoncom/domains/draqee.com/public_html/wp-content/plugins/better-wp-security/dist/8363.js
(globalThis.itsecWebpackJsonP=globalThis.itsecWebpackJsonP||[]).push([[8363],{591:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(51609),i=n(55933);const a=(0,r.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(i.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"}))},1417:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(51609),i=n(55933);const a=(0,r.createElement)(i.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(i.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"}))},2359:function(e,t,n){!function(e,t){"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=n(t);function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}var a={error:null},o=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state=a,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}var n,o;o=e,(n=t).prototype=Object.create(o.prototype),n.prototype.constructor=n,i(n,o),t.getDerivedStateFromError=function(e){return{error:e}};var s=t.prototype;return s.reset=function(){this.setState(a)},s.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},s.componentDidUpdate=function(e,t){var n,r,i,a,o=this.state.error,s=this.props.resetKeys;null!==o&&null!==t.error&&(void 0===(i=e.resetKeys)&&(i=[]),void 0===(a=s)&&(a=[]),i.length!==a.length||i.some((function(e,t){return!Object.is(e,a[t])})))&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,s),this.reset())},s.render=function(){var e=this.state.error,t=this.props,n=t.fallbackRender,i=t.FallbackComponent,a=t.fallback;if(null!==e){var o={error:e,resetErrorBoundary:this.resetErrorBoundary};if(r.isValidElement(a))return a;if("function"==typeof n)return n(o);if(i)return r.createElement(i,o);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(r.Component);e.ErrorBoundary=o,e.useErrorHandler=function(e){var t=r.useState(null),n=t[0],i=t[1];if(null!=e)throw e;if(null!=n)throw n;return i},e.withErrorBoundary=function(e,t){var n=function(n){return r.createElement(o,t,r.createElement(e,n))},i=e.displayName||e.name||"Unknown";return n.displayName="withErrorBoundary("+i+")",n},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(51609))},4818:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(51609),i=n(55933);const a=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(i.Path,{d:"M12 3.176l6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 01-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176zM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21z",fillRule:"evenodd",clipRule:"evenodd"}))},14707:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(51609),i=n(55933);const a=(0,r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(i.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}))},16957:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=n(51609),i=n(64052);function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(r),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)};function u(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function c(e){var t=e||l(),n=r.useState(t),i=n[0],a=n[1];return r.useEffect((function(){if("undefined"!=typeof window&&"matchMedia"in window){var t=function(){var t=e||l();a(t)},n=window.matchMedia("screen and (resolution: ".concat(i,"dppx)"));return n.hasOwnProperty("addEventListener")?n.addEventListener("change",t):n.addListener(t),function(){n.hasOwnProperty("removeEventListener")?n.removeEventListener("change",t):n.removeListener(t)}}}),[i,e]),i}function l(){var e="undefined"!=typeof window&&"number"==typeof window.devicePixelRatio?window.devicePixelRatio:1;return Math.min(Math.max(1,e),3)}"function"==typeof SuppressedError&&SuppressedError;var h=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),f=globalThis.ResizeObserver||h,d=void 0!==globalThis.ResizeObserver,p=!d;function v(e,t){void 0===t&&(t=!0);var n=r.useState({width:0,height:0}),i=n[0],a=n[1];r.useEffect((function(){if("undefined"!=typeof window&&t){var e=function(){a({width:window.innerWidth,height:window.innerHeight})};return p&&(e(),window.addEventListener("resize",e)),function(){return window.removeEventListener("resize",e)}}}),[]);var o,s,u=r.useRef(new f((o=function(e){d&&a({width:e[e.length-1].contentRect.width,height:e[e.length-1].contentRect.height})},s=0,function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];clearTimeout(s),s=window.setTimeout((function(){return o.apply(e,t)}),0)})));return r.useEffect((function(){var n=u.current;if(t){var r=e.current;return e.current&&d&&n.observe(e.current),function(){n.disconnect(),r&&d&&n.unobserve(r)}}n.disconnect()}),[e,u]),i}var m={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(e){return Object.assign({},m,e)}function g(e){var t=e.riveLoaded,n=void 0!==t&&t,i=e.canvasElem,a=e.containerRef,o=e.options,s=void 0===o?{}:o,u=e.onCanvasHasResized,l=e.artboardBounds,h=b(s),f=r.useState({height:0,width:0}),d=f[0],p=d.height,m=d.width,g=f[1],y=r.useState({height:0,width:0}),w=y[0],_=w.height,C=w.width,A=y[1],E=r.useState(!0),R=E[0],M=E[1],P=h.fitCanvasToArtboardHeight,T=h.shouldResizeCanvasToContainer,I=h.useDevicePixelRatio,L=h.customDevicePixelRatio,S=v(a,T),k=c(L),O=null!=l?l:{},F=O.maxX,j=O.maxY,x=r.useCallback((function(){var e,t,n,r,i=null!==(t=null===(e=a.current)||void 0===e?void 0:e.clientWidth)&&void 0!==t?t:0,o=null!==(r=null===(n=a.current)||void 0===n?void 0:n.clientHeight)&&void 0!==r?r:0;return P&&l?{width:i,height:i*(l.maxY/l.maxX)}:{width:i,height:o}}),[a,P,F,j]);r.useEffect((function(){if(T&&a.current&&n){var e=x(),t=e.width,r=e.height,o=!1;if(i){var s=t!==m||r!==p;if(h.fitCanvasToArtboardHeight&&s&&(a.current.style.height=r+"px",o=!0),h.useDevicePixelRatio){if(s||t*k!==C||r*k!==_){var c=k*t,l=k*r;i.width=c,i.height=l,i.style.width=t+"px",i.style.height=r+"px",A({width:c,height:l}),o=!0}}else s&&(i.width=t,i.height=r,A({width:t,height:r}),o=!0);g({width:t,height:r})}u&&(R||o)&&u&&u(),R&&M(!1)}}),[i,a,S,k,x,R,M,_,C,p,m,u,T,P,I,n]),r.useEffect((function(){A({width:0,height:0})}),[i])}var y,w=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),_=globalThis.IntersectionObserver||w,C=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 _(this.onObserved)}return e.prototype.registerCallback=function(e,t){this.observer.observe(e),this.elementsMap.set(e,t)},e.prototype.removeCallback=function(e){this.observer.unobserve(e),this.elementsMap.delete(e)},e}(),A=function(){return y||(y=new C),y};function E(e){var t=e.setContainerRef,n=e.setCanvasRef,r=e.className,i=void 0===r?"":r,a=e.style,c=e.children,l=u(e,["setContainerRef","setCanvasRef","className","style","children"]),h=s({width:"100%",height:"100%"},a);return o.default.createElement("div",s({ref:t,className:i},!i&&{style:h}),o.default.createElement("canvas",s({ref:n,style:{verticalAlign:"top",width:0,height:0}},l),c))}function R(e,t){void 0===t&&(t={});var n=r.useState(null),a=n[0],u=n[1],l=r.useRef(null),h=r.useState(null),f=h[0],d=h[1],p=Boolean(e),v=b(t),m=c(),y=r.useCallback((function(){if(f){if(f.layout&&f.layout.fit===i.Fit.Layout&&a){var e=m*f.layout.layoutScaleFactor;f.devicePixelRatioUsed=m,f.artboardWidth=(null==a?void 0:a.width)/e,f.artboardHeight=(null==a?void 0:a.height)/e}f.startRendering(),f.resizeToCanvas()}}),[f,m]);g({riveLoaded:!!f,canvasElem:a,containerRef:l,options:v,onCanvasHasResized:y,artboardBounds:null==f?void 0:f.bounds});var w=r.useCallback((function(e){null===e&&a&&(a.height=0,a.width=0),u(e)}),[]);r.useEffect((function(){if(a&&e){var t,n=null!=f;if(null==f){var r=v.useOffscreenRenderer;(t=new i.Rive(s(s({useOffscreenRenderer:r},e),{canvas:a}))).on(i.EventType.Load,(function(){n=!0,a?d(t):t.cleanup()}))}return function(){n||null==t||t.cleanup()}}}),[a,p,f]);var _=r.useCallback((function(e){l.current=e}),[]),C={observe:r.useCallback((function(e,t){A().registerCallback(e,t)}),[]),unobserve:r.useCallback((function(e){A().removeCallback(e)}),[])},R=C.observe,M=C.unobserve;r.useEffect((function(){var e,t=!1,n=function(){if(a&&t){var e=a.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&&(null==f||f.startRendering(),t=!1)}};return a&&!1!==v.shouldUseIntersectionObserver&&R(a,(function(r){r.isIntersecting?f&&f.startRendering():f&&f.stopRendering(),t=!r.isIntersecting,clearTimeout(e),r.isIntersecting||0!==r.boundingClientRect.width||(e=setTimeout(n,10))})),function(){a&&M(a)}}),[R,M,f,a,v.shouldUseIntersectionObserver]),r.useEffect((function(){return function(){f&&(f.cleanup(),d(null))}}),[f,a]);var P=null==e?void 0:e.animations;r.useEffect((function(){f&&P&&(f.isPlaying?(f.stop(f.animationNames),f.play(P)):f.isPaused&&(f.stop(f.animationNames),f.pause(P)))}),[P,f]);var T=r.useCallback((function(e){return o.default.createElement(E,s({setContainerRef:_,setCanvasRef:w},e))}),[w,_]);return{canvas:a,container:l.current,setCanvasRef:w,setContainerRef:_,rive:f,RiveComponent:T}}t.default=function(e){var t=e.src,n=e.artboard,r=e.animations,i=e.stateMachines,a=e.layout,c=e.useOffscreenRenderer,l=void 0===c||c,h=e.shouldDisableRiveListeners,f=void 0!==h&&h,d=e.shouldResizeCanvasToContainer,p=void 0===d||d,v=e.automaticallyHandleEvents,m=void 0!==v&&v,b=e.children,g=u(e,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","automaticallyHandleEvents","children"]),y=R({src:t,artboard:n,animations:r,layout:a,stateMachines:i,autoplay:!0,shouldDisableRiveListeners:f,automaticallyHandleEvents:m},{useOffscreenRenderer:l,shouldResizeCanvasToContainer:p}).RiveComponent;return o.default.createElement(y,s({},g),b)},t.useResizeCanvas=g,t.useRive=R,t.useRiveFile=function(e){var t=this,n=r.useState(null),a=n[0],o=n[1],s=r.useState("idle"),u=s[0],c=s[1];return r.useEffect((function(){var n=null;return function(e,t,n,r){new(n||(n=Promise))((function(t,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function o(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,o)}s((r=r.apply(e,[])).next())}))}(t,0,void 0,(function(){return function(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(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}(this,(function(t){try{c("loading"),(n=new i.RiveFile(e)).init(),n.on(i.EventType.Load,(function(){null==n||n.getInstance(),o(n),c("success")})),n.on(i.EventType.LoadError,(function(){c("failed")})),o(n)}catch(e){console.error(e),c("failed")}return[2]}))})),function(){null==n||n.cleanup()}}),[e.src,e.buffer]),{riveFile:a,status:u}},t.useStateMachineInput=function(e,t,n,a){var o=r.useState(null),s=o[0],u=o[1];return r.useEffect((function(){function r(){if(e&&t&&n||u(null),e&&t&&n){var r=e.stateMachineInputs(t);if(r){var i=r.find((function(e){return e.name===n}));void 0!==a&&i&&(i.value=a),u(i||null)}}else u(null)}r(),e&&e.on(i.EventType.Load,(function(){r()}))}),[e]),s},Object.keys(i).forEach((function(e){"default"===e||t.hasOwnProperty(e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}))},64052:function(e){var t;t=()=>(()=>{"use strict";var e=[,(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var r,i=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,n,i=e;function a(){function e(e){const a=r;n=t=0,r=new Map,a.forEach((t=>{try{t(e)}catch(e){console.error(e)}})),this.ob(),i&&i.Tb()}let t=0,n=0,r=new Map,i=null,a=null;this.requestAnimationFrame=function(i){t||(t=requestAnimationFrame(e.bind(this)));const a=++n;return r.set(a,i),a},this.cancelAnimationFrame=function(e){r.delete(e),t&&0==r.size&&(cancelAnimationFrame(t),t=0)},this.Rb=function(e){a&&(document.body.remove(a),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.Tb=function(){var r=performance.now();n?(++t,1e3<(r-=n)&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.Ob=function(){a&&(document.body.remove(a),a=null),i=null},this.ob=function(){}}function o(e){const t=new Map;let n=-1/0;this.push=function(r){return r=r+((1<<e)-1)>>e,t.has(r)&&clearTimeout(t.get(r)),t.set(r,setTimeout((function(){t.delete(r),0==t.length?n=-1/0:r==n&&(n=Math.max(...t.keys()),console.assert(n<r))}),1e3)),n=Math.max(r,n),n<<e}}i.ready=new Promise(((e,r)=>{t=e,n=r}));const s=i.onRuntimeInitialized;i.onRuntimeInitialized=function(){s&&s();let e=i.decodeAudio;i.decodeAudio=function(t,n){n(t=e(t))};let t=i.decodeFont;i.decodeFont=function(e,n){n(e=t(e))};const n=i.FileAssetLoader;i.ptrToAsset=e=>{let t=i.ptrToFileAsset(e);return t.isImage?i.ptrToImageAsset(e):t.isFont?i.ptrToFontAsset(e):t.isAudio?i.ptrToAudioAsset(e):t},i.CustomFileAssetLoader=n.extend("CustomFileAssetLoader",{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Gb=e},loadContents:function(e,t){return e=i.ptrToAsset(e),this.Gb(e,t)}}),i.CDNFileAssetLoader=n.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(e){let t=i.ptrToAsset(e);return""!==(e=t.cdnUuid)&&(n=t.cdnBaseUrl+"/"+e,(r=new XMLHttpRequest).responseType="arraybuffer",r.onreadystatechange=function(){4==r.readyState&&200==r.status&&(e=>{t.decode(new Uint8Array(e.response))})(r)},r.open("GET",n,!0),r.send(null),!0);var n,r}}),i.FallbackFileAssetLoader=n.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.kb=[]},addLoader:function(e){this.kb.push(e)},loadContents:function(e,t){for(let n of this.kb)if(n.loadContents(e,t))return!0;return!1}});let r=i.computeAlignment;i.computeAlignment=function(e,t,n,i,a=1){return r.call(this,e,t,n,i,a)}};const u="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),c=new function(){function e(){if(!t){var e=document.createElement("canvas"),o={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let s;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(s=e.getContext("webgl",o),n=1,!s)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(s=e.getContext("webgl2",o))n=2;else{if(!(s=e.getContext("webgl",o)))return console.log("No WebGL support. Image mesh will not be drawn."),!1;n=1}function u(e,t,n){if(t=s.createShader(t),s.shaderSource(t,n),s.compileShader(t),0<((n=s.getShaderInfoLog(t))||"").length)throw n;s.attachShader(e,t)}if(s=new Proxy(s,{get:(e,t)=>e.isContextLost()?(c||(console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",t),c=!0),"function"==typeof e[t]?function(){}:void 0):"function"==typeof e[t]?function(...n){return e[t].apply(e,n)}:e[t],set(e,t,n){if(!e.isContextLost())return e[t]=n,!0;c||(console.error("Cannot render the mesh because the GL Context was lost. Tried to set property "+t),c=!0)}}),r=Math.min(s.getParameter(s.MAX_RENDERBUFFER_SIZE),s.getParameter(s.MAX_TEXTURE_SIZE)),u(e=s.createProgram(),s.VERTEX_SHADER,"attribute vec2 vertex;\n                attribute vec2 uv;\n                uniform vec4 mat;\n                uniform vec2 translate;\n                varying vec2 st;\n                void main() {\n                    st = uv;\n                    gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n                }"),u(e,s.FRAGMENT_SHADER,"precision highp float;\n                uniform sampler2D image;\n                varying vec2 st;\n                void main() {\n                    gl_FragColor = texture2D(image, st);\n                }"),s.bindAttribLocation(e,0,"vertex"),s.bindAttribLocation(e,1,"uv"),s.linkProgram(e),0<((o=s.getProgramInfoLog(e))||"").trim().length)throw o;i=s.getUniformLocation(e,"mat"),a=s.getUniformLocation(e,"translate"),s.useProgram(e),s.bindBuffer(s.ARRAY_BUFFER,s.createBuffer()),s.enableVertexAttribArray(0),s.enableVertexAttribArray(1),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,s.createBuffer()),s.uniform1i(s.getUniformLocation(e,"image"),0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=s}return!0}let t=null,n=0,r=0,i=null,a=null,s=0,u=0,c=!1;e(),this.hc=function(){return e(),r},this.Mb=function(e){t.deleteTexture&&t.deleteTexture(e)},this.Lb=function(r){if(!e())return null;const i=t.createTexture();return i?(t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),2==n?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.generateMipmap(t.TEXTURE_2D)):t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),i):null};const l=new o(8),h=new o(8),f=new o(10),d=new o(10);this.Qb=function(n,r,o,c,p){if(e()){var v=l.push(n),m=h.push(r);if(t.canvas){for(var b of(t.canvas.width==v&&t.canvas.height==m||(t.canvas.width=v,t.canvas.height=m),t.viewport(0,m-r,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.SCISSOR_TEST),o.sort(((e,t)=>t.wb-e.wb)),v=f.push(c),s!=v&&(t.bufferData(t.ARRAY_BUFFER,8*v,t.DYNAMIC_DRAW),s=v),v=0,o))t.bufferSubData(t.ARRAY_BUFFER,v,b.Ta),v+=4*b.Ta.length;for(var g of(console.assert(v==4*c),o))t.bufferSubData(t.ARRAY_BUFFER,v,g.Db),v+=4*g.Db.length;for(var y of(console.assert(v==8*c),v=d.push(p),u!=v&&(t.bufferData(t.ELEMENT_ARRAY_BUFFER,2*v,t.DYNAMIC_DRAW),u=v),b=0,o))t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,b,y.indices),b+=2*y.indices.length;console.assert(b==2*p),y=0,g=!0,v=b=0;for(const e of o){e.image.Ka!=y&&(t.bindTexture(t.TEXTURE_2D,e.image.Ja||null),y=e.image.Ka),e.mc?(t.scissor(e.Ya,m-e.Za-e.jb,e.Ac,e.jb),g=!0):g&&(t.scissor(0,m-r,n,r),g=!1),o=2/n;const s=-2/r;t.uniform4f(i,e.ha[0]*o*e.Ba,e.ha[1]*s*e.Ca,e.ha[2]*o*e.Ba,e.ha[3]*s*e.Ca),t.uniform2f(a,e.ha[4]*o*e.Ba+o*(e.Ya-e.ic*e.Ba)-1,e.ha[5]*s*e.Ca+s*(e.Za-e.jc*e.Ca)+1),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,v),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,v+4*c),t.drawElements(t.TRIANGLES,e.indices.length,t.UNSIGNED_SHORT,b),v+=4*e.Ta.length,b+=2*e.indices.length}console.assert(v==4*c),console.assert(b==2*p)}}},this.canvas=function(){return e()&&t.canvas}},l=i.onRuntimeInitialized;i.onRuntimeInitialized=function(){function e(e){switch(e){case p.srcOver:return"source-over";case p.screen:return"screen";case p.overlay:return"overlay";case p.darken:return"darken";case p.lighten:return"lighten";case p.colorDodge:return"color-dodge";case p.colorBurn:return"color-burn";case p.hardLight:return"hard-light";case p.softLight:return"soft-light";case p.difference:return"difference";case p.exclusion:return"exclusion";case p.multiply:return"multiply";case p.hue:return"hue";case p.saturation:return"saturation";case p.color:return"color";case p.luminosity:return"luminosity"}}function t(e){return"rgba("+((16711680&e)>>>16)+","+((65280&e)>>>8)+","+((255&e)>>>0)+","+((4278190080&e)>>>24)/255+")"}function n(){0<E.length&&(c.Qb(A.drawWidth(),A.drawHeight(),E,R,M),E=[],M=R=0,A.reset(512,512));for(const e of C){for(const t of e.H)t();e.H=[]}C.clear()}l&&l();var r=i.RenderPaintStyle;const o=i.RenderPath,s=i.RenderPaint,h=i.Renderer,f=i.StrokeCap,d=i.StrokeJoin,p=i.BlendMode,v=r.fill,m=r.stroke,b=i.FillRule.evenOdd;let g=1;var y=i.RenderImage.extend("CanvasRenderImage",{__construct:function({la:e,xa:t}={}){this.__parent.__construct.call(this),this.Ka=g,g=g+1&2147483647||1,this.la=e,this.xa=t},__destruct:function(){this.Ja&&(c.Mb(this.Ja),URL.revokeObjectURL(this.Wa)),this.__parent.__destruct.call(this)},decode:function(e){var t=this;t.xa&&t.xa(t);var n=new Image;t.Wa=URL.createObjectURL(new Blob([e],{type:"image/png"})),n.onload=function(){t.Fb=n,t.Ja=c.Lb(n),t.size(n.width,n.height),t.la&&t.la(t)},n.src=t.Wa}}),w=o.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.T=new Path2D},rewind:function(){this.T=new Path2D},addPath:function(e,t,n,r,i,a,o){var s=this.T,u=s.addPath;e=e.T;const c=new DOMMatrix;c.a=t,c.b=n,c.c=r,c.d=i,c.e=a,c.f=o,u.call(s,e,c)},fillRule:function(e){this.Va=e},moveTo:function(e,t){this.T.moveTo(e,t)},lineTo:function(e,t){this.T.lineTo(e,t)},cubicTo:function(e,t,n,r,i,a){this.T.bezierCurveTo(e,t,n,r,i,a)},close:function(){this.T.closePath()}}),_=s.extend("CanvasRenderPaint",{color:function(e){this.Xa=t(e)},thickness:function(e){this.Ib=e},join:function(e){switch(e){case d.miter:this.Ia="miter";break;case d.round:this.Ia="round";break;case d.bevel:this.Ia="bevel"}},cap:function(e){switch(e){case f.butt:this.Ha="butt";break;case f.round:this.Ha="round";break;case f.square:this.Ha="square"}},style:function(e){this.Hb=e},blendMode:function(t){this.Eb=e(t)},clearGradient:function(){this.ja=null},linearGradient:function(e,t,n,r){this.ja={yb:e,zb:t,bb:n,cb:r,Ra:[]}},radialGradient:function(e,t,n,r){this.ja={yb:e,zb:t,bb:n,cb:r,Ra:[],ec:!0}},addStop:function(e,t){this.ja.Ra.push({color:e,stop:t})},completeGradient:function(){},draw:function(e,n,r){let i=this.Hb;var a=this.Xa,o=this.ja;if(e.globalCompositeOperation=this.Eb,null!=o){a=o.yb;var s=o.zb;const n=o.bb;var u=o.cb;const r=o.Ra;o.ec?(o=n-a,u-=s,a=e.createRadialGradient(a,s,0,a,s,Math.sqrt(o*o+u*u))):a=e.createLinearGradient(a,s,n,u);for(let e=0,n=r.length;e<n;e++)s=r[e],a.addColorStop(s.stop,t(s.color));this.Xa=a,this.ja=null}switch(i){case m:e.strokeStyle=a,e.lineWidth=this.Ib,e.lineCap=this.Ha,e.lineJoin=this.Ia,e.stroke(n);break;case v:e.fillStyle=a,e.fill(n,r)}}});const C=new Set;let A=null,E=[],R=0,M=0;var P=i.CanvasRenderer=h.extend("Renderer",{__construct:function(e){this.__parent.__construct.call(this),this.S=[1,0,0,1,0,0],this.C=e.getContext("2d"),this.Ua=e,this.H=[]},save:function(){this.S.push(...this.S.slice(this.S.length-6)),this.H.push(this.C.save.bind(this.C))},restore:function(){const e=this.S.length-6;if(6>e)throw"restore() called without matching save().";this.S.splice(e),this.H.push(this.C.restore.bind(this.C))},transform:function(e,t,n,r,i,a){const o=this.S,s=o.length-6;o.splice(s,6,o[s]*e+o[s+2]*t,o[s+1]*e+o[s+3]*t,o[s]*n+o[s+2]*r,o[s+1]*n+o[s+3]*r,o[s]*i+o[s+2]*a+o[s+4],o[s+1]*i+o[s+3]*a+o[s+5]),this.H.push(this.C.transform.bind(this.C,e,t,n,r,i,a))},rotate:function(e){const t=Math.sin(e);e=Math.cos(e),this.transform(e,t,-t,e,0,0)},_drawPath:function(e,t){this.H.push(t.draw.bind(t,this.C,e.T,e.Va===b?"evenodd":"nonzero"))},_drawRiveImage:function(t,n,r){var i=t.Fb;if(i){var a=this.C,o=e(n);this.H.push((function(){a.globalCompositeOperation=o,a.globalAlpha=r,a.drawImage(i,0,0),a.globalAlpha=1}))}},_getMatrix:function(e){const t=this.S,n=t.length-6;for(let r=0;6>r;++r)e[r]=t[n+r]},_drawImageMesh:function(t,r,a,o,s,u,l,h,f,d){var p=this.C.canvas.width,v=this.C.canvas.height;const m=f-l,b=d-h;l=Math.max(l,0),h=Math.max(h,0),f=Math.min(f,p),d=Math.min(d,v);const g=f-l,y=d-h;if(console.assert(g<=Math.min(m,p)),console.assert(y<=Math.min(b,v)),!(0>=g||0>=y)){f=g<m||y<b,p=d=1;var w=Math.ceil(g*d),_=Math.ceil(y*p);v=c.hc(),w>v&&(d*=v/w,w=v),_>v&&(p*=v/_,_=v),A||(A=new i.DynamicRectanizer(v),A.reset(512,512)),0>(v=A.addRect(w,_))&&(n(),C.add(this),v=A.addRect(w,_),console.assert(0<=v));var P=65535&v,T=v>>16;E.push({ha:this.S.slice(this.S.length-6),image:t,Ya:P,Za:T,ic:l,jc:h,Ac:w,jb:_,Ba:d,Ca:p,Ta:new Float32Array(o),Db:new Float32Array(s),indices:new Uint16Array(u),mc:f,wb:t.Ka<<1|(f?1:0)}),R+=o.length,M+=u.length;var I=this.C,L=e(r);this.H.push((function(){I.save(),I.resetTransform(),I.globalCompositeOperation=L,I.globalAlpha=a;const e=c.canvas();e&&I.drawImage(e,P,T,w,_,l,h,g,y),I.restore()}))}},_clipPath:function(e){this.H.push(this.C.clip.bind(this.C,e.T,e.Va===b?"evenodd":"nonzero"))},clear:function(){C.add(this),this.H.push(this.C.clearRect.bind(this.C,0,0,this.Ua.width,this.Ua.height))},flush:function(){},translate:function(e,t){this.transform(1,0,0,1,e,t)}});i.makeRenderer=function(e){const t=new P(e),n=t.C;return new Proxy(t,{get(e,r){if("function"==typeof e[r])return function(...t){return e[r].apply(e,t)};if("function"==typeof n[r]){if(-1<u.indexOf(r))throw Error("RiveException: Method call to '"+r+"()' is not allowed, as the renderer cannot immediately pass through the return                 values of any canvas 2d context methods.");return function(...e){t.H.push(n[r].bind(n,...e))}}return e[r]},set(e,r,i){if(r in n)return t.H.push((()=>{n[r]=i})),!0}})},i.decodeImage=function(e,t){new y({la:t}).decode(e)},i.renderFactory={makeRenderPaint:function(){return new _},makeRenderPath:function(){return new w},makeRenderImage:function(){let e=I;return new y({xa:()=>{e.total++},la:()=>{if(e.loaded++,e.loaded===e.total){const t=e.ready;t&&(t(),e.ready=null)}}})}};let T=i.load,I=null;i.load=function(e,t,n=!0){const r=new i.FallbackFileAssetLoader;return void 0!==t&&r.addLoader(t),n&&(t=new i.CDNFileAssetLoader,r.addLoader(t)),new Promise((function(t){let n=null;I={total:0,loaded:0,ready:function(){t(n)}},n=T(e,r),0==I.total&&t(n)}))};let L=i.RendererWrapper.prototype.align;i.RendererWrapper.prototype.align=function(e,t,n,r,i=1){L.call(this,e,t,n,r,i)},r=new a,i.requestAnimationFrame=r.requestAnimationFrame.bind(r),i.cancelAnimationFrame=r.cancelAnimationFrame.bind(r),i.enableFPSCounter=r.Rb.bind(r),i.disableFPSCounter=r.Ob,r.ob=n,i.resolveAnimationFrame=n,i.cleanup=function(){A&&A.delete()}};var h,f,d=Object.assign({},i),p="./this.program",v="object"==typeof window,m="function"==typeof importScripts,b="";(v||m)&&(m?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),r&&(b=r),b=0!==b.indexOf("blob:")?b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):"",m&&(f=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),h=(e,t,n)=>{var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)});var g,y=i.print||console.log.bind(console),w=i.printErr||console.error.bind(console);Object.assign(i,d),d=null,i.thisProgram&&(p=i.thisProgram),i.wasmBinary&&(g=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&N("no native wasm support detected");var _,C,A,E,R,M,P,T,I,L,S=!1;function k(){var e=_.buffer;i.HEAP8=A=new Int8Array(e),i.HEAP16=R=new Int16Array(e),i.HEAP32=P=new Int32Array(e),i.HEAPU8=E=new Uint8Array(e),i.HEAPU16=M=new Uint16Array(e),i.HEAPU32=T=new Uint32Array(e),i.HEAPF32=I=new Float32Array(e),i.HEAPF64=L=new Float64Array(e)}var O,F=[],j=[],x=[];function D(){var e=i.preRun.shift();F.unshift(e)}var B,V=0,U=null,W=null;function N(e){throw i.onAbort&&i.onAbort(e),w(e="Aborted("+e+")"),S=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),n(e),e}function z(e){return e.startsWith("data:application/octet-stream;base64,")}if(!z(B="canvas_advanced.wasm")){var H=B;B=i.locateFile?i.locateFile(H,b):b+H}function $(e){if(e==B&&g)return new Uint8Array(g);if(f)return f(e);throw"both async and sync fetching of the wasm failed"}function Y(e,t,n){return function(e){if(!g&&(v||m)){if("function"==typeof fetch&&!e.startsWith("file://"))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>$(e)));if(h)return new Promise(((t,n)=>{h(e,(e=>t(new Uint8Array(e))),n)}))}return Promise.resolve().then((()=>$(e)))}(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(n,(e=>{w("failed to asynchronously prepare wasm: "+e),N(e)}))}var X,G,q={450700:(e,t,n,r,i)=>{if("undefined"==typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if(void 0===window.h){window.h={Aa:0},window.h.I={},window.h.I.ya=e,window.h.I.capture=t,window.h.I.La=n,window.h.ga={},window.h.ga.stopped=r,window.h.ga.xb=i;let a=window.h;a.D=[],a.yc=function(e){for(var t=0;t<a.D.length;++t)if(null==a.D[t])return a.D[t]=e,t;return a.D.push(e),a.D.length-1},a.Cb=function(e){for(a.D[e]=null;0<a.D.length&&null==a.D[a.D.length-1];)a.D.pop()},a.Sc=function(e){for(var t=0;t<a.D.length;++t)if(a.D[t]==e)return a.Cb(t)},a.ra=function(e){return a.D[e]},a.Bb=["touchend","click"],a.unlock=function(){for(var e=0;e<a.D.length;++e){var t=a.D[e];null!=t&&null!=t.J&&t.state===a.ga.xb&&t.J.resume().then((()=>{In(t.pb)}),(e=>{console.error("Failed to resume audiocontext",e)}))}a.Bb.map((function(e){document.removeEventListener(e,a.unlock,!0)}))},a.Bb.map((function(e){document.addEventListener(e,a.unlock,!0)}))}return window.h.Aa+=1,1},452878:()=>{void 0!==window.h&&(--window.h.Aa,0===window.h.Aa&&delete window.h)},453042:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,453146:()=>{try{var e=new(window.AudioContext||window.webkitAudioContext),t=e.sampleRate;return e.close(),t}catch(e){return 0}},453317:(e,t,n,r,i,a)=>{if(void 0===window.h)return-1;var o={},s={};return e==window.h.I.ya&&0!=n&&(s.sampleRate=n),o.J=new(window.AudioContext||window.webkitAudioContext)(s),o.J.suspend(),o.state=window.h.ga.stopped,n=0,e!=window.h.I.ya&&(n=t),o.Z=o.J.createScriptProcessor(r,n,t),o.Z.onaudioprocess=function(n){if(null!=o.sa&&0!=o.sa.length||(o.sa=new Float32Array(I.buffer,i,r*t)),e==window.h.I.capture||e==window.h.I.La){for(var s=0;s<t;s+=1)for(var u=n.inputBuffer.getChannelData(s),c=o.sa,l=0;l<r;l+=1)c[l*t+s]=u[l];Sn(a,r,i)}if(e==window.h.I.ya||e==window.h.I.La)for(kn(a,r,i),s=0;s<n.outputBuffer.numberOfChannels;++s)for(u=n.outputBuffer.getChannelData(s),c=o.sa,l=0;l<r;l+=1)u[l]=c[l*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.La||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(e){o.Da=o.J.createMediaStreamSource(e),o.Da.connect(o.Z),o.Z.connect(o.J.destination)})).catch((function(e){console.log("Failed to get user media: "+e)})),e==window.h.I.ya&&o.Z.connect(o.J.destination),o.pb=a,window.h.yc(o)},456194:e=>window.h.ra(e).J.sampleRate,456267:e=>{void 0!==(e=window.h.ra(e)).Z&&(e.Z.onaudioprocess=function(){},e.Z.disconnect(),e.Z=void 0),void 0!==e.Da&&(e.Da.disconnect(),e.Da=void 0),e.J.close(),e.J=void 0,e.pb=void 0},456667:e=>{window.h.Cb(e)},456717:e=>{(e=window.h.ra(e)).J.resume(),e.state=window.h.ga.xb},456856:e=>{(e=window.h.ra(e)).J.suspend(),e.state=window.h.ga.stopped}},J=e=>{for(;0<e.length;)e.shift()(i)},K=(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},Z=e=>{var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=K(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},Q=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&(t=t.substr(0,t.length-1)),e+t):"."},ee=e=>{if("/"===e)return"/";var t=(e=(e=Z(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},te=e=>(te=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);N("initRandomDevice")})())(e);function ne(){for(var e="",t=!1,n=arguments.length-1;-1<=n&&!t;n--){if("string"!=typeof(t=0<=n?arguments[n]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=K(e.split("/").filter((e=>!!e)),!t).join("/"))||"."}var re="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ie=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&re)return re.decode(e.subarray(t,n));for(r="";t<n;){var i=e[t++];if(128&i){var a=63&e[t++];if(192==(224&i))r+=String.fromCharCode((31&i)<<6|a);else{var o=63&e[t++];65536>(i=224==(240&i)?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&e[t++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r},ae=[],oe=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},se=(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&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),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|63&o}}return t[n]=0,n-i};function ue(e,t){var n=Array(oe(e)+1);return e=se(e,n,0,n.length),t&&(n.length=e),n}var ce=[];function le(e,t){ce[e]={input:[],F:[],V:t},Ve(e,he)}var he={open:function(e){var t=ce[e.node.za];if(!t)throw new Me(43);e.s=t,e.seekable=!1},close:function(e){e.s.V.qa(e.s)},qa:function(e){e.s.V.qa(e.s)},read:function(e,t,n,r){if(!e.s||!e.s.V.ib)throw new Me(60);for(var i=0,a=0;a<r;a++){try{var o=e.s.V.ib(e.s)}catch(e){throw new Me(29)}if(void 0===o&&0===i)throw new Me(6);if(null==o)break;i++,t[n+a]=o}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,n,r){if(!e.s||!e.s.V.Oa)throw new Me(60);try{for(var i=0;i<r;i++)e.s.V.Oa(e.s,t[n+i])}catch(e){throw new Me(29)}return r&&(e.node.timestamp=Date.now()),i}},fe={ib:function(){e:{if(!ae.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e){e=null;break e}ae=ue(e,!0)}e=ae.shift()}return e},Oa:function(e,t){null===t||10===t?(y(ie(e.F,0)),e.F=[]):0!=t&&e.F.push(t)},qa:function(e){e.F&&0<e.F.length&&(y(ie(e.F,0)),e.F=[])},bc:function(){return{Fc:25856,Hc:5,Ec:191,Gc:35387,Dc:[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]}},cc:function(){return 0},dc:function(){return[24,80]}},de={Oa:function(e,t){null===t||10===t?(w(ie(e.F,0)),e.F=[]):0!=t&&e.F.push(t)},qa:function(e){e.F&&0<e.F.length&&(w(ie(e.F,0)),e.F=[])}};function pe(e,t){var n=e.j?e.j.length:0;n>=t||(t=Math.max(t,n*(1048576>n?2:1.125)>>>0),0!=n&&(t=Math.max(t,256)),n=e.j,e.j=new Uint8Array(t),0<e.v&&e.j.set(n.subarray(0,e.v),0))}var ve,me,be,ge,ye={O:null,U:()=>ye.createNode(null,"/",16895,0),createNode(e,t,n,r){if(24576==(61440&n)||4096==(61440&n))throw new Me(63);return ye.O||(ye.O={dir:{node:{Y:ye.l.Y,P:ye.l.P,ka:ye.l.ka,va:ye.l.va,ub:ye.l.ub,Ab:ye.l.Ab,vb:ye.l.vb,sb:ye.l.sb,Ea:ye.l.Ea},stream:{ba:ye.m.ba}},file:{node:{Y:ye.l.Y,P:ye.l.P},stream:{ba:ye.m.ba,read:ye.m.read,write:ye.m.write,pa:ye.m.pa,lb:ye.m.lb,nb:ye.m.nb}},link:{node:{Y:ye.l.Y,P:ye.l.P,ma:ye.l.ma},stream:{}},$a:{node:{Y:ye.l.Y,P:ye.l.P},stream:Be}}),16384==(61440&(n=ke(e,t,n,r)).mode)?(n.l=ye.O.dir.node,n.m=ye.O.dir.stream,n.j={}):32768==(61440&n.mode)?(n.l=ye.O.file.node,n.m=ye.O.file.stream,n.v=0,n.j=null):40960==(61440&n.mode)?(n.l=ye.O.link.node,n.m=ye.O.link.stream):8192==(61440&n.mode)&&(n.l=ye.O.$a.node,n.m=ye.O.$a.stream),n.timestamp=Date.now(),e&&(e.j[t]=n,e.timestamp=n.timestamp),n},Kc:e=>e.j?e.j.subarray?e.j.subarray(0,e.v):new Uint8Array(e.j):new Uint8Array(0),l:{Y(e){var t={};return t.Jc=8192==(61440&e.mode)?e.id:1,t.Mc=e.id,t.mode=e.mode,t.Oc=1,t.uid=0,t.Lc=0,t.za=e.za,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.v:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.Bc=new Date(e.timestamp),t.Nc=new Date(e.timestamp),t.Ic=new Date(e.timestamp),t.Jb=4096,t.Cc=Math.ceil(t.size/t.Jb),t},P(e,t){if(void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&(t=t.size,e.v!=t))if(0==t)e.j=null,e.v=0;else{var n=e.j;e.j=new Uint8Array(t),n&&e.j.set(n.subarray(0,Math.min(t,e.v))),e.v=t}},ka(){throw Pe[44]},va:(e,t,n,r)=>ye.createNode(e,t,n,r),ub(e,t,n){if(16384==(61440&e.mode)){try{var r=Se(t,n)}catch(e){}if(r)for(var i in r.j)throw new Me(55)}delete e.parent.j[e.name],e.parent.timestamp=Date.now(),e.name=n,t.j[n]=e,t.timestamp=e.parent.timestamp,e.parent=t},Ab(e,t){delete e.j[t],e.timestamp=Date.now()},vb(e,t){var n,r=Se(e,t);for(n in r.j)throw new Me(55);delete e.j[t],e.timestamp=Date.now()},sb(e){var t,n=[".",".."];for(t in e.j)e.j.hasOwnProperty(t)&&n.push(t);return n},Ea:(e,t,n)=>((e=ye.createNode(e,t,41471,0)).link=n,e),ma(e){if(40960!=(61440&e.mode))throw new Me(28);return e.link}},m:{read(e,t,n,r,i){var a=e.node.j;if(i>=e.node.v)return 0;if(8<(e=Math.min(e.node.v-i,r))&&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===A.buffer&&(a=!1),!r)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.j||e.j.subarray)){if(a)return e.j=t.subarray(n,n+r),e.v=r;if(0===e.v&&0===i)return e.j=t.slice(n,n+r),e.v=r;if(i+r<=e.v)return e.j.set(t.subarray(n,n+r),i),r}if(pe(e,i+r),e.j.subarray&&t.subarray)e.j.set(t.subarray(n,n+r),i);else for(a=0;a<r;a++)e.j[i+a]=t[n+a];return e.v=Math.max(e.v,i+r),r},ba(e,t,n){if(1===n?t+=e.position:2===n&&32768==(61440&e.node.mode)&&(t+=e.node.v),0>t)throw new Me(28);return t},pa(e,t,n){pe(e.node,t+n),e.node.v=Math.max(e.node.v,t+n)},lb(e,t,n,r,i){if(32768!=(61440&e.node.mode))throw new Me(43);if(e=e.node.j,2&i||e.buffer!==A.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,N(),!(t=void 0))throw new Me(48);A.set(e,t)}else n=!1,t=e.byteOffset;return{o:t,M:n}},nb:(e,t,n,r)=>(ye.m.write(e,t,0,r,n,!1),0)}},we=null,_e={},Ce=[],Ae=1,Ee=null,Re=!0,Me=null,Pe={},Te=(e,t={})=>{if(!(e=ne(e)))return{path:"",node:null};if(8<(t=Object.assign({gb:!0,Qa:0},t)).Qa)throw new Me(32);e=e.split("/").filter((e=>!!e));for(var n=we,r="/",i=0;i<e.length;i++){var a=i===e.length-1;if(a&&t.parent)break;if(n=Se(n,e[i]),r=Z(r+"/"+e[i]),n.wa&&(!a||a&&t.gb)&&(n=n.wa.root),!a||t.fb)for(a=0;40960==(61440&n.mode);)if(n=He(r),r=ne(Q(r),n),n=Te(r,{Qa:t.Qa+1}).node,40<a++)throw new Me(32)}return{path:r,node:n}},Ie=e=>{for(var t;;){if(e===e.parent)return e=e.U.mb,t?"/"!==e[e.length-1]?`${e}/${t}`:e+t:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}},Le=(e,t)=>{for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%Ee.length},Se=(e,t)=>{var n;if(n=(n=Fe(e,"x"))?n:e.l.ka?0:2)throw new Me(n,e);for(n=Ee[Le(e.id,t)];n;n=n.lc){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return e.l.ka(e,t)},ke=(e,t,n,r)=>(e=new An(e,t,n,r),t=Le(e.parent.id,e.name),e.lc=Ee[t],Ee[t]=e),Oe=e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},Fe=(e,t)=>Re?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2,je=(e,t)=>{try{return Se(e,t),20}catch(e){}return Fe(e,"wx")},xe=e=>{if(!(e=Ce[e]))throw new Me(8);return e},De=(e,t=-1)=>(be||((be=function(){this.h={}}).prototype={},Object.defineProperties(be.prototype,{object:{get(){return this.node},set(e){this.node=e}},flags:{get(){return this.h.flags},set(e){this.h.flags=e}},position:{get(){return this.h.position},set(e){this.h.position=e}}})),e=Object.assign(new be,e),-1==t&&(t=(()=>{for(var e=0;4096>=e;e++)if(!Ce[e])return e;throw new Me(33)})()),e.X=t,Ce[t]=e),Be={open:e=>{e.m=_e[e.node.za].m,e.m.open&&e.m.open(e)},ba:()=>{throw new Me(70)}},Ve=(e,t)=>{_e[e]={m:t}},Ue=(e,t)=>{var n="/"===t,r=!t;if(n&&we)throw new Me(10);if(!n&&!r){var i=Te(t,{gb:!1});if(t=i.path,(i=i.node).wa)throw new Me(10);if(16384!=(61440&i.mode))throw new Me(54)}t={type:e,Qc:{},mb:t,kc:[]},(e=e.U(t)).U=t,t.root=e,n?we=e:i&&(i.wa=t,i.U&&i.U.kc.push(t))},We=(e,t,n)=>{var r=Te(e,{parent:!0}).node;if(!(e=ee(e))||"."===e||".."===e)throw new Me(28);var i=je(r,e);if(i)throw new Me(i);if(!r.l.va)throw new Me(63);return r.l.va(r,e,t,n)},Ne=(e,t,n)=>{void 0===n&&(n=t,t=438),We(e,8192|t,n)},ze=(e,t)=>{if(!ne(e))throw new Me(44);var n=Te(t,{parent:!0}).node;if(!n)throw new Me(44);t=ee(t);var r=je(n,t);if(r)throw new Me(r);if(!n.l.Ea)throw new Me(63);n.l.Ea(n,t,e)},He=e=>{if(!(e=Te(e).node))throw new Me(44);if(!e.l.ma)throw new Me(28);return ne(Ie(e.parent),e.l.ma(e))},$e=(e,t,n)=>{if(""===e)throw new Me(44);if("string"==typeof t){var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(void 0===r)throw Error(`Unknown file open mode: ${t}`);t=r}if(n=64&t?4095&(void 0===n?438:n)|32768:0,"object"==typeof e)var a=e;else{e=Z(e);try{a=Te(e,{fb:!(131072&t)}).node}catch(e){}}if(r=!1,64&t)if(a){if(128&t)throw new Me(20)}else a=We(e,n,0),r=!0;if(!a)throw new Me(44);if(8192==(61440&a.mode)&&(t&=-513),65536&t&&16384!=(61440&a.mode))throw new Me(54);if(!r&&(n=a?40960==(61440&a.mode)?32:16384==(61440&a.mode)&&("r"!==Oe(t)||512&t)?31:Fe(a,Oe(t)):44))throw new Me(n);if(512&t&&!r){if(!(n="string"==typeof(n=a)?Te(n,{fb:!0}).node:n).l.P)throw new Me(63);if(16384==(61440&n.mode))throw new Me(31);if(32768!=(61440&n.mode))throw new Me(28);if(r=Fe(n,"w"))throw new Me(r);n.l.P(n,{size:0,timestamp:Date.now()})}return t&=-131713,(a=De({node:a,path:Ie(a),flags:t,seekable:!0,position:0,m:a.m,zc:[],error:!1})).m.open&&a.m.open(a),!i.logReadFiles||1&t||(ge||(ge={}),e in ge||(ge[e]=1)),a},Ye=(e,t,n)=>{if(null===e.X)throw new Me(8);if(!e.seekable||!e.m.ba)throw new Me(70);if(0!=n&&1!=n&&2!=n)throw new Me(28);e.position=e.m.ba(e,t,n),e.zc=[]},Xe=()=>{Me||((Me=function(e,t){this.name="ErrnoError",this.node=t,this.pc=function(e){this.aa=e},this.pc(e),this.message="FS error"}).prototype=Error(),Me.prototype.constructor=Me,[44].forEach((e=>{Pe[e]=new Me(e),Pe[e].stack="<generic error, no stack>"})))},Ge=(e,t,n)=>{e=Z("/dev/"+e);var r=function(e,t){var n=0;return e&&(n|=365),t&&(n|=146),n}(!!t,!!n);me||(me=64);var i=me++<<8;Ve(i,{open:e=>{e.seekable=!1},close:()=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,n,r,i)=>{for(var a=0,o=0;o<i;o++){try{var s=t()}catch(e){throw new Me(29)}if(void 0===s&&0===a)throw new Me(6);if(null==s)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(e){throw new Me(29)}return i&&(e.node.timestamp=Date.now()),a}}),Ne(e,r,i)},qe=void 0;function Je(){return P[(qe+=4)-4>>2]}function Ke(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e}function Ze(e,t){return e=Ke(e),{[e]:function(){return t.apply(this,arguments)}}[e]}function Qe(){this.M=[void 0],this.hb=[]}var et=new Qe,tt=void 0;function nt(e){throw new tt(e)}var rt=e=>(e||nt("Cannot use deleted val. handle = "+e),et.get(e).value),it=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return et.pa({tb:1,value:e})}};function at(e){var t=Error,n=Ze(e,(function(t){this.name=e,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},n}var ot=void 0,st=void 0;function ut(e){for(var t="";E[e];)t+=st[E[e++]];return t}var ct=[];function lt(){for(;ct.length;){var e=ct.pop();e.g.fa=!1,e.delete()}}var ht=void 0,ft={};function dt(e,t){for(void 0===t&&nt("ptr should not be undefined");e.A;)t=e.na(t),e=e.A;return t}var pt={};function vt(e){var t=ut(e=Fn(e));return Pn(e),t}function mt(e,t){var n=pt[e];return void 0===n&&nt(t+" has unknown type "+vt(e)),n}function bt(){}var gt=!1;function yt(e){--e.count.value,0===e.count.value&&(e.G?e.L.W(e.G):e.u.i.W(e.o))}function wt(e,t,n){return t===n?e:void 0===n.A||null===(e=wt(e,t,n.A))?null:n.Pb(e)}var _t={},Ct=void 0;function At(e){throw new Ct(e)}function Et(e,t){return t.u&&t.o||At("makeClassHandle requires ptr and ptrType"),!!t.L!=!!t.G&&At("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Rt(Object.create(e,{g:{value:t}}))}function Rt(e){return"undefined"==typeof FinalizationRegistry?(Rt=e=>e,e):(gt=new FinalizationRegistry((e=>{yt(e.g)})),bt=e=>{gt.unregister(e)},(Rt=e=>{var t=e.g;return t.G&&gt.register(e,{g:t},e),e})(e))}var Mt={};function Pt(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Tt(e){return this.fromWireType(P[e>>2])}var It={},Lt={};function St(e,t,n){function r(t){(t=n(t)).length!==e.length&&At("Mismatched type converter count");for(var r=0;r<e.length;++r)Ot(e[r],t[r])}e.forEach((function(e){Lt[e]=t}));var i=Array(t.length),a=[],o=0;t.forEach(((e,t)=>{pt.hasOwnProperty(e)?i[t]=pt[e]:(a.push(e),It.hasOwnProperty(e)||(It[e]=[]),It[e].push((()=>{i[t]=pt[e],++o===a.length&&r(i)})))})),0===a.length&&r(i)}function kt(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${e}`)}}function Ot(e,t,n={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");!function(e,t,n={}){var r=t.name;if(e||nt(`type "${r}" must have a positive integer typeid pointer`),pt.hasOwnProperty(e)){if(n.$b)return;nt(`Cannot register type '${r}' twice`)}pt[e]=t,delete Lt[e],It.hasOwnProperty(e)&&(t=It[e],delete It[e],t.forEach((e=>e())))}(e,t,n)}function Ft(e){nt(e.g.u.i.name+" instance already deleted")}function jt(){}function xt(e,t,n){if(void 0===e[t].B){var r=e[t];e[t]=function(){return e[t].B.hasOwnProperty(arguments.length)||nt(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].B})!`),e[t].B[arguments.length].apply(this,arguments)},e[t].B=[],e[t].B[r.ea]=r}}function Dt(e,t,n){i.hasOwnProperty(e)?((void 0===n||void 0!==i[e].B&&void 0!==i[e].B[n])&&nt(`Cannot register public name '${e}' twice`),xt(i,e,e),i.hasOwnProperty(n)&&nt(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),i[e].B[n]=t):(i[e]=t,void 0!==n&&(i[e].Pc=n))}function Bt(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.N=n,this.W=r,this.A=i,this.Ub=a,this.na=o,this.Pb=s,this.qb=[]}function Vt(e,t,n){for(;t!==n;)t.na||nt(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.na(e),t=t.A;return e}function Ut(e,t){return null===t?(this.Na&&nt(`null is not a valid ${this.name}`),0):(t.g||nt(`Cannot pass "${tn(t)}" as a ${this.name}`),t.g.o||nt(`Cannot pass deleted object as a pointer of type ${this.name}`),Vt(t.g.o,t.g.u.i,this.i))}function Wt(e,t){if(null===t){if(this.Na&&nt(`null is not a valid ${this.name}`),this.ua){var n=this.Pa();return null!==e&&e.push(this.W,n),n}return 0}if(t.g||nt(`Cannot pass "${tn(t)}" as a ${this.name}`),t.g.o||nt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&t.g.u.ta&&nt(`Cannot convert argument of type ${t.g.L?t.g.L.name:t.g.u.name} to parameter type ${this.name}`),n=Vt(t.g.o,t.g.u.i,this.i),this.ua)switch(void 0===t.g.G&&nt("Passing raw pointer to smart pointer is illegal"),this.tc){case 0:t.g.L===this?n=t.g.G:nt(`Cannot convert argument of type ${t.g.L?t.g.L.name:t.g.u.name} to parameter type ${this.name}`);break;case 1:n=t.g.G;break;case 2:if(t.g.L===this)n=t.g.G;else{var r=t.clone();n=this.oc(n,it((function(){r.delete()}))),null!==e&&e.push(this.W,n)}break;default:nt("Unsupporting sharing policy")}return n}function Nt(e,t){return null===t?(this.Na&&nt(`null is not a valid ${this.name}`),0):(t.g||nt(`Cannot pass "${tn(t)}" as a ${this.name}`),t.g.o||nt(`Cannot pass deleted object as a pointer of type ${this.name}`),t.g.u.ta&&nt(`Cannot convert argument of type ${t.g.u.name} to parameter type ${this.name}`),Vt(t.g.o,t.g.u.i,this.i))}function zt(e,t,n,r){this.name=e,this.i=t,this.Na=n,this.ta=r,this.ua=!1,this.W=this.oc=this.Pa=this.rb=this.tc=this.nc=void 0,void 0!==t.A?this.toWireType=Wt:(this.toWireType=r?Ut:Nt,this.K=null)}function Ht(e,t,n){i.hasOwnProperty(e)||At("Replacing nonexistant public symbol"),void 0!==i[e].B&&void 0!==n?i[e].B[n]=t:(i[e]=t,i[e].ea=n)}var $t=[],Yt=e=>{var t=$t[e];return t||(e>=$t.length&&($t.length=e+1),$t[e]=t=O.get(e)),t};function Xt(e,t){var n=(e=ut(e)).includes("j")?((e,t)=>{var n=[];return function(){if(n.length=0,Object.assign(n,arguments),e.includes("j")){var r=i["dynCall_"+e];r=n&&n.length?r.apply(null,[t].concat(n)):r.call(null,t)}else r=Yt(t).apply(null,n);return r}})(e,t):Yt(t);return"function"!=typeof n&&nt(`unknown function pointer with signature ${e}: ${t}`),n}var Gt=void 0;function qt(e,t){var n=[],r={};throw t.forEach((function e(t){r[t]||pt[t]||(Lt[t]?Lt[t].forEach(e):(n.push(t),r[t]=!0))})),new Gt(`${e}: `+n.map(vt).join([", "]))}function Jt(e,t,n,r,i){var a=t.length;2>a&&nt("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==t[1]&&null!==n,s=!1;for(n=1;n<t.length;++n)if(null!==t[n]&&void 0===t[n].K){s=!0;break}var u="void"!==t[0].name,c=a-2,l=Array(c),h=[],f=[];return function(){if(arguments.length!==c&&nt(`function ${e} called with ${arguments.length} arguments, expected ${c} args!`),f.length=0,h.length=o?2:1,h[0]=i,o){var n=t[1].toWireType(f,this);h[1]=n}for(var a=0;a<c;++a)l[a]=t[a+2].toWireType(f,arguments[a]),h.push(l[a]);if(a=r.apply(null,h),s)Pt(f);else for(var d=o?1:2;d<t.length;d++){var p=1===d?n:l[d-2];null!==t[d].K&&t[d].K(p)}return u?t[0].fromWireType(a):void 0}}function Kt(e,t){for(var n=[],r=0;r<e;r++)n.push(T[t+4*r>>2]);return n}function Zt(e,t,n){return e instanceof Object||nt(`${n} with invalid "this": ${e}`),e instanceof t.i.constructor||nt(`${n} incompatible with "this" of type ${e.constructor.name}`),e.g.o||nt(`cannot call emscripten binding method ${n} on deleted object`),Vt(e.g.o,e.g.u.i,t.i)}function Qt(e){e>=et.h&&0==--et.get(e).tb&&et.Zb(e)}function en(e,t,n){switch(t){case 0:return function(e){return this.fromWireType((n?A:E)[e])};case 1:return function(e){return this.fromWireType((n?R:M)[e>>1])};case 2:return function(e){return this.fromWireType((n?P:T)[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function tn(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function nn(e,t){switch(t){case 2:return function(e){return this.fromWireType(I[e>>2])};case 3:return function(e){return this.fromWireType(L[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function rn(e,t,n){switch(t){case 0:return n?function(e){return A[e]}:function(e){return E[e]};case 1:return n?function(e){return R[e>>1]}:function(e){return M[e>>1]};case 2:return n?function(e){return P[e>>2]}:function(e){return T[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var an="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,on=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&M[n];)++n;if(32<(n<<=1)-e&&an)return an.decode(E.subarray(e,n));for(n="",r=0;!(r>=t/2);++r){var i=R[e+2*r>>1];if(0==i)break;n+=String.fromCharCode(i)}return n},sn=(e,t,n)=>{if(void 0===n&&(n=2147483647),2>n)return 0;var r=t;n=(n-=2)<2*e.length?n/2:e.length;for(var i=0;i<n;++i)R[t>>1]=e.charCodeAt(i),t+=2;return R[t>>1]=0,t-r},un=e=>2*e.length,cn=(e,t)=>{for(var n=0,r="";!(n>=t/4);){var i=P[e+4*n>>2];if(0==i)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}return r},ln=(e,t,n)=>{if(void 0===n&&(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&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),P[t>>2]=a,(t+=4)+4>n)break}return P[t>>2]=0,t-r},hn=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},fn={};function dn(e){var t=fn[e];return void 0===t?ut(e):t}var pn,vn=[],mn=[],bn=[],gn={},yn=()=>{if(!pn){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:p||"./this.program"};for(e in gn)void 0===gn[e]?delete t[e]:t[e]=gn[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);pn=n}return pn},wn=e=>0==e%4&&(0!=e%100||0==e%400),_n=[31,29,31,30,31,30,31,31,30,31,30,31],Cn=[31,28,31,30,31,30,31,31,30,31,30,31];function An(e,t,n,r){e||(e=this),this.parent=e,this.U=e.U,this.wa=null,this.id=Ae++,this.name=t,this.mode=n,this.l={},this.m={},this.za=r}Object.defineProperties(An.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}}}),Xe(),Ee=Array(4096),Ue(ye,"/"),We("/tmp",16895,0),We("/home",16895,0),We("/home/web_user",16895,0),(()=>{We("/dev",16895,0),Ve(259,{read:()=>0,write:(e,t,n,r)=>r}),Ne("/dev/null",259),le(1280,fe),le(1536,de),Ne("/dev/tty",1280),Ne("/dev/tty1",1536);var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=te(e).byteLength),e[--t]);Ge("random",n),Ge("urandom",n),We("/dev/shm",16895,0),We("/dev/shm/tmp",16895,0)})(),(()=>{We("/proc",16895,0);var e=We("/proc/self",16895,0);We("/proc/self/fd",16895,0),Ue({U:()=>{var t=ke(e,"fd",16895,73);return t.l={ka:(e,t)=>{var n=xe(+t);return(e={parent:null,U:{mb:"fake"},l:{ma:()=>n.path}}).parent=e}},t}},"/proc/self/fd")})(),Object.assign(Qe.prototype,{get(e){return this.M[e]},has(e){return void 0!==this.M[e]},pa(e){var t=this.hb.pop()||this.M.length;return this.M[t]=e,t},Zb(e){this.M[e]=void 0,this.hb.push(e)}}),tt=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},et.M.push({value:void 0},{value:null},{value:!0},{value:!1}),et.h=et.M.length,i.count_emval_handles=function(){for(var e=0,t=et.h;t<et.M.length;++t)void 0!==et.M[t]&&++e;return e},ot=i.PureVirtualError=at("PureVirtualError");for(var En=Array(256),Rn=0;256>Rn;++Rn)En[Rn]=String.fromCharCode(Rn);st=En,i.getInheritedInstanceCount=function(){return Object.keys(ft).length},i.getLiveInheritedInstances=function(){var e,t=[];for(e in ft)ft.hasOwnProperty(e)&&t.push(ft[e]);return t},i.flushPendingDeletes=lt,i.setDelayFunction=function(e){ht=e,ct.length&&ht&&ht(lt)},Ct=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},jt.prototype.isAliasOf=function(e){if(!(this instanceof jt&&e instanceof jt))return!1;var t=this.g.u.i,n=this.g.o,r=e.g.u.i;for(e=e.g.o;t.A;)n=t.na(n),t=t.A;for(;r.A;)e=r.na(e),r=r.A;return t===r&&n===e},jt.prototype.clone=function(){if(this.g.o||Ft(this),this.g.ia)return this.g.count.value+=1,this;var e=Rt,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.g;return(e=e(n.call(t,r,{g:{value:{count:i.count,fa:i.fa,ia:i.ia,o:i.o,u:i.u,G:i.G,L:i.L}}}))).g.count.value+=1,e.g.fa=!1,e},jt.prototype.delete=function(){this.g.o||Ft(this),this.g.fa&&!this.g.ia&&nt("Object already scheduled for deletion"),bt(this),yt(this.g),this.g.ia||(this.g.G=void 0,this.g.o=void 0)},jt.prototype.isDeleted=function(){return!this.g.o},jt.prototype.deleteLater=function(){return this.g.o||Ft(this),this.g.fa&&!this.g.ia&&nt("Object already scheduled for deletion"),ct.push(this),1===ct.length&&ht&&ht(lt),this.g.fa=!0,this},zt.prototype.Vb=function(e){return this.rb&&(e=this.rb(e)),e},zt.prototype.ab=function(e){this.W&&this.W(e)},zt.prototype.argPackAdvance=8,zt.prototype.readValueFromPointer=Tt,zt.prototype.deleteObject=function(e){null!==e&&e.delete()},zt.prototype.fromWireType=function(e){function t(){return this.ua?Et(this.i.N,{u:this.nc,o:n,L:this,G:e}):Et(this.i.N,{u:this,o:e})}var n=this.Vb(e);if(!n)return this.ab(e),null;var r=function(e,t){return t=dt(e,t),ft[t]}(this.i,n);if(void 0!==r)return 0===r.g.count.value?(r.g.o=n,r.g.G=e,r.clone()):(r=r.clone(),this.ab(e),r);if(r=this.i.Ub(n),!(r=_t[r]))return t.call(this);r=this.ta?r.Kb:r.pointerType;var i=wt(n,this.i,r.i);return null===i?t.call(this):this.ua?Et(r.i.N,{u:r,o:i,L:this,G:e}):Et(r.i.N,{u:r,o:i})},Gt=i.UnboundTypeError=at("UnboundTypeError");var Mn={__syscall_fcntl64:function(e,t,n){qe=n;try{var r=xe(e);switch(t){case 0:var i=Je();return 0>i?-28:De(r,i).X;case 1:case 2:case 6:case 7:return 0;case 3:return r.flags;case 4:return i=Je(),r.flags|=i,0;case 5:return i=Je(),R[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return P[On()>>2]=28,-1}}catch(e){if("ErrnoError"!==e.name)throw e;return-e.aa}},__syscall_ioctl:function(e,t,n){qe=n;try{var r=xe(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return r.s?0:-59;case 21505:if(!r.s)return-59;if(r.s.V.bc){t=[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=Je();P[i>>2]=25856,P[i+4>>2]=5,P[i+8>>2]=191,P[i+12>>2]=35387;for(var a=0;32>a;a++)A[i+a+17|0]=t[a]||0}return 0;case 21506:case 21507:case 21508:if(!r.s)return-59;if(r.s.V.cc)for(i=Je(),t=[],a=0;32>a;a++)t.push(A[i+a+17|0]);return 0;case 21519:return r.s?(i=Je(),P[i>>2]=0):-59;case 21520:return r.s?-28:-59;case 21531:if(i=Je(),!r.m.ac)throw new Me(59);return r.m.ac(r,t,i);case 21523:return r.s?(r.s.V.dc&&(a=[24,80],i=Je(),R[i>>1]=a[0],R[i+2>>1]=a[1]),0):-59;default:return-28}}catch(e){if("ErrnoError"!==e.name)throw e;return-e.aa}},__syscall_openat:function(e,t,n,r){qe=r;try{var i=t=t?ie(E,t):"";if("/"===i.charAt(0))t=i;else{var a=-100===e?"/":xe(e).path;if(0==i.length)throw new Me(44);t=Z(a+"/"+i)}var o=r?Je():0;return $e(t,n,o).X}catch(e){if("ErrnoError"!==e.name)throw e;return-e.aa}},_embind_create_inheriting_constructor:function(e,t,n){e=ut(e),t=mt(t,"wrapper"),n=rt(n);var r=[].slice,i=t.i,a=i.N,o=i.A.N,s=i.A.constructor;for(var u in e=Ze(e,(function(){i.A.qb.forEach(function(e){if(this[e]===o[e])throw new ot(`Pure virtual function ${e} must be implemented in JavaScript`)}.bind(this)),Object.defineProperty(this,"__parent",{value:a}),this.__construct.apply(this,r.call(arguments))})),a.__construct=function(){this===a&&nt("Pass correct 'this' to __construct");var e=s.implement.apply(void 0,[this].concat(r.call(arguments)));bt(e);var t=e.g;e.notifyOnDestruction(),t.ia=!0,Object.defineProperties(this,{g:{value:t}}),Rt(this),e=t.o,e=dt(i,e),ft.hasOwnProperty(e)?nt(`Tried to register registered instance: ${e}`):ft[e]=this},a.__destruct=function(){this===a&&nt("Pass correct 'this' to __destruct"),bt(this);var e=this.g.o;e=dt(i,e),ft.hasOwnProperty(e)?delete ft[e]:nt(`Tried to unregister unregistered instance: ${e}`)},e.prototype=Object.create(a),n)e.prototype[u]=n[u];return it(e)},_embind_finalize_value_object:function(e){var t=Mt[e];delete Mt[e];var n=t.Pa,r=t.W,i=t.eb;St([e],i.map((e=>e.Yb)).concat(i.map((e=>e.rc))),(e=>{var a={};return i.forEach(((t,n)=>{var r=e[n],o=t.Wb,s=t.Xb,u=e[n+i.length],c=t.qc,l=t.sc;a[t.Sb]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];c(l,e,u.toWireType(n,t)),Pt(n)}}})),[{name:t.name,fromWireType:function(e){var t,n={};for(t in a)n[t]=a[t].read(e);return r(e),n},toWireType:function(e,t){for(var i in a)if(!(i in t))throw new TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return null!==e&&e.push(r,o),o},argPackAdvance:8,readValueFromPointer:Tt,K:r}]}))},_embind_register_bigint:function(){},_embind_register_bool:function(e,t,n,r,i){var a=kt(n);Ot(e,{name:t=ut(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:8,readValueFromPointer:function(e){if(1===n)var r=A;else if(2===n)r=R;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+t);r=P}return this.fromWireType(r[e>>a])},K:null})},_embind_register_class:function(e,t,n,r,i,a,o,s,u,c,l,h,f){l=ut(l),a=Xt(i,a),s&&(s=Xt(o,s)),c&&(c=Xt(u,c)),f=Xt(h,f);var d=Ke(l);Dt(d,(function(){qt(`Cannot construct ${l} due to unbound types`,[r])})),St([e,t,n],r?[r]:[],(function(t){if(t=t[0],r)var n=t.i,i=n.N;else i=jt.prototype;t=Ze(d,(function(){if(Object.getPrototypeOf(this)!==o)throw new tt("Use 'new' to construct "+l);if(void 0===u.$)throw new tt(l+" has no accessible constructor");var e=u.$[arguments.length];if(void 0===e)throw new tt(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(u.$).toString()}) parameters instead!`);return e.apply(this,arguments)}));var o=Object.create(i,{constructor:{value:t}});t.prototype=o;var u=new Bt(l,t,o,f,n,a,s,c);u.A&&(void 0===u.A.oa&&(u.A.oa=[]),u.A.oa.push(u)),n=new zt(l,u,!0,!1),i=new zt(l+"*",u,!1,!1);var h=new zt(l+" const*",u,!1,!0);return _t[e]={pointerType:i,Kb:h},Ht(d,t),[n,i,h]}))},_embind_register_class_class_function:function(e,t,n,r,i,a,o){var s=Kt(n,r);t=ut(t),a=Xt(i,a),St([],[e],(function(e){function r(){qt(`Cannot call ${i} due to unbound types`,s)}var i=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.i.constructor;return void 0===u[t]?(r.ea=n-1,u[t]=r):(xt(u,t,i),u[t].B[n-1]=r),St([],s,(function(r){if(r=Jt(i,[r[0],null].concat(r.slice(1)),null,a,o),void 0===u[t].B?(r.ea=n-1,u[t]=r):u[t].B[n-1]=r,e.i.oa)for(const n of e.i.oa)n.constructor.hasOwnProperty(t)||(n.constructor[t]=r);return[]})),[]}))},_embind_register_class_class_property:function(e,t,n,r,i,a,o,s){t=ut(t),a=Xt(i,a),St([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`,u={get(){qt(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return u.set=s?()=>{qt(`Cannot access ${i} due to unbound types`,[n])}:()=>{nt(`${i} is a read-only property`)},Object.defineProperty(e.i.constructor,t,u),St([],[n],(function(n){n=n[0];var i={get:()=>n.fromWireType(a(r)),enumerable:!0};return s&&(s=Xt(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),Pt(t)}),Object.defineProperty(e.i.constructor,t,i),[]})),[]}))},_embind_register_class_constructor:function(e,t,n,r,i,a){var o=Kt(t,n);i=Xt(r,i),St([],[e],(function(e){var n=`constructor ${(e=e[0]).name}`;if(void 0===e.i.$&&(e.i.$=[]),void 0!==e.i.$[t-1])throw new tt(`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.$[t-1]=()=>{qt(`Cannot construct ${e.name} due to unbound types`,o)},St([],o,(function(r){return r.splice(1,0,null),e.i.$[t-1]=Jt(n,r,null,i,a),[]})),[]}))},_embind_register_class_function:function(e,t,n,r,i,a,o,s){var u=Kt(n,r);t=ut(t),a=Xt(i,a),St([],[e],(function(e){function r(){qt(`Cannot call ${i} due to unbound types`,u)}var i=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.i.qb.push(t);var c=e.i.N,l=c[t];return void 0===l||void 0===l.B&&l.className!==e.name&&l.ea===n-2?(r.ea=n-2,r.className=e.name,c[t]=r):(xt(c,t,i),c[t].B[n-2]=r),St([],u,(function(r){return r=Jt(i,r,e,a,o),void 0===c[t].B?(r.ea=n-2,c[t]=r):c[t].B[n-2]=r,[]})),[]}))},_embind_register_class_property:function(e,t,n,r,i,a,o,s,u,c){t=ut(t),i=Xt(r,i),St([],[e],(function(e){var r=`${(e=e[0]).name}.${t}`,l={get(){qt(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return l.set=u?()=>{qt(`Cannot access ${r} due to unbound types`,[n,o])}:()=>{nt(r+" is a read-only property")},Object.defineProperty(e.i.N,t,l),St([],u?[n,o]:[n],(function(n){var o=n[0],l={get(){var t=Zt(this,e,r+" getter");return o.fromWireType(i(a,t))},enumerable:!0};if(u){u=Xt(s,u);var h=n[1];l.set=function(t){var n=Zt(this,e,r+" setter"),i=[];u(c,n,h.toWireType(i,t)),Pt(i)}}return Object.defineProperty(e.i.N,t,l),[]})),[]}))},_embind_register_emval:function(e,t){Ot(e,{name:t=ut(t),fromWireType:function(e){var t=rt(e);return Qt(e),t},toWireType:function(e,t){return it(t)},argPackAdvance:8,readValueFromPointer:Tt,K:null})},_embind_register_enum:function(e,t,n,r){function i(){}n=kt(n),t=ut(t),i.values={},Ot(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:en(t,n,r),K:null}),Dt(t,i)},_embind_register_enum_value:function(e,t,n){var r=mt(e,"enum");t=ut(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:Ze(`${r.name}_${t}`,(function(){}))}}),e.values[n]=r,e[t]=r},_embind_register_float:function(e,t,n){n=kt(n),Ot(e,{name:t=ut(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:nn(t,n),K:null})},_embind_register_function:function(e,t,n,r,i,a){var o=Kt(t,n);e=ut(e),i=Xt(r,i),Dt(e,(function(){qt(`Cannot call ${e} due to unbound types`,o)}),t-1),St([],o,(function(n){return Ht(e,Jt(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]}))},_embind_register_integer:function(e,t,n,r,i){t=ut(t),-1===i&&(i=4294967295),i=kt(n);var a=e=>e;if(0===r){var o=32-8*n;a=e=>e<<o>>>o}n=t.includes("unsigned")?function(e,t){return t>>>0}:function(e,t){return t},Ot(e,{name:t,fromWireType:a,toWireType:n,argPackAdvance:8,readValueFromPointer:rn(t,i,0!==r),K:null})},_embind_register_memory_view:function(e,t,n){function r(e){e>>=2;var t=T;return new i(t.buffer,t[e+1],t[e])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];Ot(e,{name:n=ut(n),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{$b:!0})},_embind_register_std_string:function(e,t){var n="std::string"===(t=ut(t));Ot(e,{name:t,fromWireType:function(e){var t=T[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||0==E[o]){if(i=i?ie(E,i,o-i):"",void 0===s)var s=i;else s+=String.fromCharCode(0),s+=i;i=o+1}}else{for(s=Array(t),a=0;a<t;++a)s[a]=String.fromCharCode(E[r+a]);s=s.join("")}return Pn(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||nt("Cannot pass non-string to std::string");var i=n&&r?oe(t):t.length,a=Tn(4+i+1),o=a+4;if(T[a>>2]=i,n&&r)se(t,E,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);255<s&&(Pn(o),nt("String has UTF-16 code units that do not fit in 8 bits")),E[o+r]=s}else for(r=0;r<i;++r)E[o+r]=t[r];return null!==e&&e.push(Pn,a),a},argPackAdvance:8,readValueFromPointer:Tt,K:function(e){Pn(e)}})},_embind_register_std_wstring:function(e,t,n){if(n=ut(n),2===t)var r=on,i=sn,a=un,o=()=>M,s=1;else 4===t&&(r=cn,i=ln,a=hn,o=()=>T,s=2);Ot(e,{name:n,fromWireType:function(e){for(var n,i=T[e>>2],a=o(),u=e+4,c=0;c<=i;++c){var l=e+4+c*t;c!=i&&0!=a[l>>s]||(u=r(u,l-u),void 0===n?n=u:(n+=String.fromCharCode(0),n+=u),u=l+t)}return Pn(e),n},toWireType:function(e,r){"string"!=typeof r&&nt(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),u=Tn(4+o+t);return T[u>>2]=o>>s,i(r,u+4,o+t),null!==e&&e.push(Pn,u),u},argPackAdvance:8,readValueFromPointer:Tt,K:function(e){Pn(e)}})},_embind_register_value_object:function(e,t,n,r,i,a){Mt[e]={name:ut(t),Pa:Xt(n,r),W:Xt(i,a),eb:[]}},_embind_register_value_object_field:function(e,t,n,r,i,a,o,s,u,c){Mt[e].eb.push({Sb:ut(t),Yb:n,Wb:Xt(r,i),Xb:a,rc:o,qc:Xt(s,u),sc:c})},_embind_register_void:function(e,t){Ot(e,{fc:!0,name:t=ut(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},_emscripten_get_now_is_monotonic:()=>!0,_emval_as:function(e,t,n){e=rt(e),t=mt(t,"emval::as");var r=[],i=it(r);return T[n>>2]=i,t.toWireType(r,e)},_emval_call_method:function(e,t,n,r,i){e=vn[e],t=rt(t),n=dn(n);var a=[];return T[r>>2]=it(a),e(t,n,a,i)},_emval_call_void_method:function(e,t,n,r){(e=vn[e])(t=rt(t),n=dn(n),null,r)},_emval_decref:Qt,_emval_get_method_caller:function(e,t){var n=function(e,t){for(var n=Array(e),r=0;r<e;++r)n[r]=mt(T[t+4*r>>2],"parameter "+r);return n}(e,t),r=n[0];t=r.name+"_$"+n.slice(1).map((function(e){return e.name})).join("_")+"$";var i=mn[t];if(void 0!==i)return i;var a=Array(e-1);return i=function(e){var t=vn.length;return vn.push(e),t}(((t,i,o,s)=>{for(var u=0,c=0;c<e-1;++c)a[c]=n[c+1].readValueFromPointer(s+u),u+=n[c+1].argPackAdvance;for(t=t[i].apply(t,a),c=0;c<e-1;++c)n[c+1].Nb&&n[c+1].Nb(a[c]);if(!r.fc)return r.toWireType(o,t)})),mn[t]=i},_emval_get_module_property:function(e){return e=dn(e),it(i[e])},_emval_get_property:function(e,t){return e=rt(e),t=rt(t),it(e[t])},_emval_incref:function(e){4<e&&(et.get(e).tb+=1)},_emval_new_array:function(){return it([])},_emval_new_cstring:function(e){return it(dn(e))},_emval_new_object:function(){return it({})},_emval_run_destructors:function(e){Pt(rt(e)),Qt(e)},_emval_set_property:function(e,t,n){e=rt(e),t=rt(t),n=rt(n),e[t]=n},_emval_take_value:function(e,t){return e=(e=mt(e,"_emval_take_value")).readValueFromPointer(t),it(e)},abort:()=>{N("")},emscripten_asm_const_int:(e,t,n)=>{var r;for(bn.length=0,n>>=2;r=E[t++];)n+=105!=r&n,bn.push(105==r?P[n]:L[n++>>1]),++n;return q[e].apply(null,bn)},emscripten_date_now:function(){return Date.now()},emscripten_get_now:()=>performance.now(),emscripten_memcpy_big:(e,t,n)=>E.copyWithin(e,t,t+n),emscripten_resize_heap:e=>{var t=E.length;if(2147483648<(e>>>=0))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);e:{i=i.min.call(i,2147483648,r+(65536-r%65536)%65536)-_.buffer.byteLength+65535>>>16;try{_.grow(i),k();var a=1;break e}catch(e){}a=void 0}if(a)return!0}return!1},environ_get:(e,t)=>{var n=0;return yn().forEach((function(r,i){var a=t+n;for(i=T[e+4*i>>2]=a,a=0;a<r.length;++a)A[0|i++]=r.charCodeAt(a);A[0|i]=0,n+=r.length+1})),0},environ_sizes_get:(e,t)=>{var n=yn();T[e>>2]=n.length;var r=0;return n.forEach((function(e){r+=e.length+1})),T[t>>2]=r,0},fd_close:function(e){try{var t=xe(e);if(null===t.X)throw new Me(8);t.Ma&&(t.Ma=null);try{t.m.close&&t.m.close(t)}catch(e){throw e}finally{Ce[t.X]=null}return t.X=null,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.aa}},fd_read:function(e,t,n,r){try{e:{var i=xe(e);e=t;for(var a,o=t=0;o<n;o++){var s=T[e>>2],u=T[e+4>>2];e+=8;var c=i,l=s,h=u,f=a,d=A;if(0>h||0>f)throw new Me(28);if(null===c.X)throw new Me(8);if(1==(2097155&c.flags))throw new Me(8);if(16384==(61440&c.node.mode))throw new Me(31);if(!c.m.read)throw new Me(28);var p=void 0!==f;if(p){if(!c.seekable)throw new Me(70)}else f=c.position;var v=c.m.read(c,d,l,h,f);p||(c.position+=v);var m=v;if(0>m){var b=-1;break e}if(t+=m,m<u)break;void 0!==a&&(a+=m)}b=t}return T[r>>2]=b,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.aa}},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=xe(e);return Ye(a,t,r),G=[a.position>>>0,(X=a.position,1<=+Math.abs(X)?0<X?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],P[i>>2]=G[0],P[i+4>>2]=G[1],a.Ma&&0===t&&0===r&&(a.Ma=null),0}catch(e){if("ErrnoError"!==e.name)throw e;return e.aa}},fd_write:function(e,t,n,r){try{e:{var i=xe(e);e=t;for(var a,o=t=0;o<n;o++){var s=T[e>>2],u=T[e+4>>2];e+=8;var c=i,l=s,h=u,f=a,d=A;if(0>h||0>f)throw new Me(28);if(null===c.X)throw new Me(8);if(!(2097155&c.flags))throw new Me(8);if(16384==(61440&c.node.mode))throw new Me(31);if(!c.m.write)throw new Me(28);c.seekable&&1024&c.flags&&Ye(c,0,2);var p=void 0!==f;if(p){if(!c.seekable)throw new Me(70)}else f=c.position;var v=c.m.write(c,d,l,h,f,void 0);p||(c.position+=v);var m=v;if(0>m){var b=-1;break e}t+=m,void 0!==a&&(a+=m)}b=t}return T[r>>2]=b,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.aa}},strftime_l:(e,t,n,r)=>((e,t,n,r)=>{function i(e,t,n){for(e="number"==typeof e?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?1:0}var r;return 0===(r=n(e.getFullYear()-t.getFullYear()))&&0===(r=n(e.getMonth()-t.getMonth()))&&(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 u(e){var t=e.ca;for(e=new Date(new Date(e.da+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(wn(e.getFullYear())?_n:Cn)[n];if(!(t>r-e.getDate())){e.setDate(e.getDate()+t);break}t-=r-e.getDate()+1,e.setDate(1),11>n?e.setMonth(n+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}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 c=P[r+40>>2];for(var l in r={wc:P[r>>2],vc:P[r+4>>2],Fa:P[r+8>>2],Sa:P[r+12>>2],Ga:P[r+16>>2],da:P[r+20>>2],R:P[r+24>>2],ca:P[r+28>>2],Rc:P[r+32>>2],uc:P[r+36>>2],xc:c&&c?ie(E,c):""},n=n?ie(E,n):"",c={"%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"})n=n.replace(new RegExp(l,"g"),c[l]);var h="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),f="January February March April May June July August September October November December".split(" ");for(l in c={"%a":e=>h[e.R].substring(0,3),"%A":e=>h[e.R],"%b":e=>f[e.Ga].substring(0,3),"%B":e=>f[e.Ga],"%C":e=>a((e.da+1900)/100|0,2),"%d":e=>a(e.Sa,2),"%e":e=>i(e.Sa,2," "),"%g":e=>u(e).toString().substring(2),"%G":e=>u(e),"%H":e=>a(e.Fa,2),"%I":e=>(0==(e=e.Fa)?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.Ga-1;t+=(wn(e.da+1900)?_n:Cn)[n++]);return a(e.Sa+t,3)},"%m":e=>a(e.Ga+1,2),"%M":e=>a(e.vc,2),"%n":()=>"\n","%p":e=>0<=e.Fa&&12>e.Fa?"AM":"PM","%S":e=>a(e.wc,2),"%t":()=>"\t","%u":e=>e.R||7,"%U":e=>a(Math.floor((e.ca+7-e.R)/7),2),"%V":e=>{var t=Math.floor((e.ca+7-(e.R+6)%7)/7);if(2>=(e.R+371-e.ca-2)%7&&t++,t)53==t&&(4==(n=(e.R+371-e.ca)%7)||3==n&&wn(e.da)||(t=1));else{t=52;var n=(e.R+7-e.ca-1)%7;(4==n||5==n&&wn(e.da%400-1))&&t++}return a(t,2)},"%w":e=>e.R,"%W":e=>a(Math.floor((e.ca+7-(e.R+6)%7)/7),2),"%y":e=>(e.da+1900).toString().substring(2),"%Y":e=>e.da+1900,"%z":e=>{var t=0<=(e=e.uc);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.xc,"%%":()=>"%"},n=n.replace(/%%/g,"\0\0"),c)n.includes(l)&&(n=n.replace(new RegExp(l,"g"),c[l](r)));return(l=ue(n=n.replace(/\0\0/g,"%"),!1)).length>t?0:(A.set(l,e),l.length-1)})(e,t,n,r)};!function(){function e(e){if(C=e=e.exports,_=C.memory,k(),O=C.__indirect_function_table,j.unshift(C.__wasm_call_ctors),V--,i.monitorRunDependencies&&i.monitorRunDependencies(V),0==V&&(null!==U&&(clearInterval(U),U=null),W)){var t=W;W=null,t()}return e}var t={env:Mn,wasi_snapshot_preview1:Mn};if(V++,i.monitorRunDependencies&&i.monitorRunDependencies(V),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(e){w("Module.instantiateWasm callback failed with error: "+e),n(e)}(function(e,t){var n=B;return g||"function"!=typeof WebAssembly.instantiateStreaming||z(n)||n.startsWith("file://")||"function"!=typeof fetch?Y(n,e,t):fetch(n,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,e).then(t,(function(r){return w("wasm streaming compile failed: "+r),w("falling back to ArrayBuffer instantiation"),Y(n,e,t)}))))})(t,(function(t){e(t.instance)})).catch(n)}();var Pn=e=>(Pn=C.free)(e),Tn=e=>(Tn=C.malloc)(e),In=i._ma_device__on_notification_unlocked=e=>(In=i._ma_device__on_notification_unlocked=C.ma_device__on_notification_unlocked)(e);i._ma_malloc_emscripten=(e,t)=>(i._ma_malloc_emscripten=C.ma_malloc_emscripten)(e,t),i._ma_free_emscripten=(e,t)=>(i._ma_free_emscripten=C.ma_free_emscripten)(e,t);var Ln,Sn=i._ma_device_process_pcm_frames_capture__webaudio=(e,t,n)=>(Sn=i._ma_device_process_pcm_frames_capture__webaudio=C.ma_device_process_pcm_frames_capture__webaudio)(e,t,n),kn=i._ma_device_process_pcm_frames_playback__webaudio=(e,t,n)=>(kn=i._ma_device_process_pcm_frames_playback__webaudio=C.ma_device_process_pcm_frames_playback__webaudio)(e,t,n),On=()=>(On=C.__errno_location)(),Fn=e=>(Fn=C.__getTypeName)(e);function jn(){function e(){if(!Ln&&(Ln=!0,i.calledRun=!0,!S)){if(i.noFSInit||ve||(ve=!0,Xe(),i.stdin=i.stdin,i.stdout=i.stdout,i.stderr=i.stderr,i.stdin?Ge("stdin",i.stdin):ze("/dev/tty","/dev/stdin"),i.stdout?Ge("stdout",null,i.stdout):ze("/dev/tty","/dev/stdout"),i.stderr?Ge("stderr",null,i.stderr):ze("/dev/tty1","/dev/stderr"),$e("/dev/stdin",0),$e("/dev/stdout",1),$e("/dev/stderr",1)),Re=!1,J(j),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;){var e=i.postRun.shift();x.unshift(e)}J(x)}}if(!(0<V)){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)D();J(F),0<V||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e())}}if(i.__embind_initialize_bindings=()=>(i.__embind_initialize_bindings=C._embind_initialize_bindings)(),i.dynCall_iiji=(e,t,n,r,a)=>(i.dynCall_iiji=C.dynCall_iiji)(e,t,n,r,a),i.dynCall_jiji=(e,t,n,r,a)=>(i.dynCall_jiji=C.dynCall_jiji)(e,t,n,r,a),i.dynCall_iiiji=(e,t,n,r,a,o)=>(i.dynCall_iiiji=C.dynCall_iiiji)(e,t,n,r,a,o),i.dynCall_iij=(e,t,n,r)=>(i.dynCall_iij=C.dynCall_iij)(e,t,n,r),i.dynCall_jii=(e,t,n)=>(i.dynCall_jii=C.dynCall_jii)(e,t,n),i.dynCall_viijii=(e,t,n,r,a,o,s)=>(i.dynCall_viijii=C.dynCall_viijii)(e,t,n,r,a,o,s),i.dynCall_iiiiij=(e,t,n,r,a,o,s)=>(i.dynCall_iiiiij=C.dynCall_iiiiij)(e,t,n,r,a,o,s),i.dynCall_iiiiijj=(e,t,n,r,a,o,s,u,c)=>(i.dynCall_iiiiijj=C.dynCall_iiiiijj)(e,t,n,r,a,o,s,u,c),i.dynCall_iiiiiijj=(e,t,n,r,a,o,s,u,c,l)=>(i.dynCall_iiiiiijj=C.dynCall_iiiiiijj)(e,t,n,r,a,o,s,u,c,l),W=function e(){Ln||jn(),Ln||(W=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);0<i.preInit.length;)i.preInit.pop()();return jn(),e.ready});const a=i},e=>{e.exports=JSON.parse('{"name":"@rive-app/canvas","version":"2.27.1","description":"Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}')},(e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r.Animation});var r=n(4)},(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 null!==this.scrubTo},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){null===this.scrubTo?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,{BLANK_URL:()=>i.BLANK_URL,registerTouchInteractions:()=>r.registerTouchInteractions,sanitizeUrl:()=>i.sanitizeUrl});var r=n(6),i=n(7)},(e,t,n)=>{n.r(t),n.d(t,{registerTouchInteractions:()=>r});var r=function(e){var t=e.canvas,n=e.artboard,r=e.stateMachines,i=void 0===r?[]:r,a=e.renderer,o=e.rive,s=e.fit,u=e.alignment,c=e.isTouchScrollEnabled,l=void 0!==c&&c,h=e.layoutScaleFactor,f=void 0===h?1:h;if(!(t&&i.length&&a&&o&&n&&"undefined"!=typeof window))return null;var d=null,p=!1,v=function(e){if(p&&e instanceof MouseEvent)"mouseup"==e.type&&(p=!1);else{p=l&&"touchend"===e.type&&"touchstart"===d,d=e.type;var t=e.currentTarget.getBoundingClientRect(),r=function(e,t){var n,r;return["touchstart","touchmove"].indexOf(e.type)>-1&&(null===(n=e.touches)||void 0===n?void 0:n.length)?(t||e.preventDefault(),{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}):"touchend"===e.type&&(null===(r=e.changedTouches)||void 0===r?void 0:r.length)?{clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY}:{clientX:e.clientX,clientY:e.clientY}}(e,l),a=r.clientX,c=r.clientY;if(a||c){var h=a-t.left,v=c-t.top,m=o.computeAlignment(s,u,{minX:0,minY:0,maxX:t.width,maxY:t.height},n.bounds,f),b=new o.Mat2D;m.invert(b);var g=new o.Vec2D(h,v),y=o.mapXY(b,g),w=y.x(),_=y.y();switch(y.delete(),b.delete(),g.delete(),m.delete(),e.type){case"mouseout":for(var C=0,A=i;C<A.length;C++)A[C].pointerMove(w,_);break;case"touchmove":case"mouseover":case"mousemove":for(var E=0,R=i;E<R.length;E++)R[E].pointerMove(w,_);break;case"touchstart":case"mousedown":for(var M=0,P=i;M<P.length;M++)P[M].pointerDown(w,_);break;case"touchend":case"mouseup":for(var T=0,I=i;T<I.length;T++)I[T].pointerUp(w,_)}}}}.bind(void 0);return t.addEventListener("mouseover",v),t.addEventListener("mouseout",v),t.addEventListener("mousemove",v),t.addEventListener("mousedown",v),t.addEventListener("mouseup",v),t.addEventListener("touchmove",v,{passive:l}),t.addEventListener("touchstart",v,{passive:l}),t.addEventListener("touchend",v),function(){t.removeEventListener("mouseover",v),t.removeEventListener("mouseout",v),t.removeEventListener("mousemove",v),t.removeEventListener("mousedown",v),t.removeEventListener("mouseup",v),t.removeEventListener("touchmove",v),t.removeEventListener("touchstart",v),t.removeEventListener("touchend",v)}}},(e,t,n)=>{n.r(t),n.d(t,{BLANK_URL:()=>c,sanitizeUrl:()=>l});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=/^.+(:|&colon;)/gim,u=[".","/"],c="about:blank";function l(e){if(!e)return c;var t,n=(t=e,t.replace(o,"").replace(i,(function(e,t){return String.fromCharCode(t)}))).replace(a,"").replace(o,"").trim();if(!n)return c;if(function(e){return u.indexOf(e[0])>-1}(n))return n;var l=n.match(s);if(!l)return n;var h=l[0];return r.test(h)?c:n}}],t={};function n(r){var i=t[r];if(void 0!==i)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=>{"undefined"!=typeof Symbol&&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:()=>i,DataEnum:()=>x,EventType:()=>w,Fit:()=>t,Layout:()=>m,LoopType:()=>_,Rive:()=>F,RiveEventType:()=>g,RiveFile:()=>O,RuntimeLoader:()=>b,StateMachineInput:()=>y,StateMachineInputType:()=>v,Testing:()=>X,ViewModel:()=>j,ViewModelInstance:()=>D,ViewModelInstanceBoolean:()=>W,ViewModelInstanceColor:()=>H,ViewModelInstanceEnum:()=>z,ViewModelInstanceNumber:()=>U,ViewModelInstanceString:()=>V,ViewModelInstanceTrigger:()=>N,ViewModelInstanceValue:()=>B,decodeAudio:()=>G,decodeFont:()=>J,decodeImage:()=>q});var e,t,i,a=n(1),o=n(2),s=n(3),u=n(5),c=(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)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)},h=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},f=function(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(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},d=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return c(t,e),t}(Error);!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"}(t||(t={})),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"}(i||(i={}));var v,m=function(){function e(e){var n,r,a,o,s,u,c;this.fit=null!==(n=null==e?void 0:e.fit)&&void 0!==n?n:t.Contain,this.alignment=null!==(r=null==e?void 0:e.alignment)&&void 0!==r?r:i.Center,this.layoutScaleFactor=null!==(a=null==e?void 0:e.layoutScaleFactor)&&void 0!==a?a:1,this.minX=null!==(o=null==e?void 0:e.minX)&&void 0!==o?o:0,this.minY=null!==(s=null==e?void 0:e.minY)&&void 0!==s?s:0,this.maxX=null!==(u=null==e?void 0:e.maxX)&&void 0!==u?u:0,this.maxY=null!==(c=null==e?void 0:e.maxY)&&void 0!==c?c: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,u=t.maxY;return new e({fit:null!=n?n:this.fit,alignment:null!=r?r:this.alignment,layoutScaleFactor:null!=i?i:this.layoutScaleFactor,minX:null!=a?a:this.minX,minY:null!=o?o:this.minY,maxX:null!=s?s:this.maxX,maxY:null!=u?u:this.maxY})},e.prototype.runtimeFit=function(e){return this.cachedRuntimeFit?this.cachedRuntimeFit:(n=this.fit===t.Cover?e.Fit.cover:this.fit===t.Contain?e.Fit.contain:this.fit===t.Fill?e.Fit.fill:this.fit===t.FitWidth?e.Fit.fitWidth:this.fit===t.FitHeight?e.Fit.fitHeight:this.fit===t.ScaleDown?e.Fit.scaleDown:this.fit===t.Layout?e.Fit.layout:e.Fit.none,this.cachedRuntimeFit=n,n);var n},e.prototype.runtimeAlignment=function(e){return this.cachedRuntimeAlignment?this.cachedRuntimeAlignment:(t=this.alignment===i.TopLeft?e.Alignment.topLeft:this.alignment===i.TopCenter?e.Alignment.topCenter:this.alignment===i.TopRight?e.Alignment.topRight:this.alignment===i.CenterLeft?e.Alignment.centerLeft:this.alignment===i.CenterRight?e.Alignment.centerRight:this.alignment===i.BottomLeft?e.Alignment.bottomLeft:this.alignment===i.BottomCenter?e.Alignment.bottomCenter:this.alignment===i.BottomRight?e.Alignment.bottomRight:e.Alignment.center,this.cachedRuntimeAlignment=t,t);var t},e}(),b=function(){function e(){}return e.loadRuntime=function(){a.default({locateFile:function(){return e.wasmURL}}).then((function(t){var n;for(e.runtime=t;e.callBackQueue.length>0;)null===(n=e.callBackQueue.shift())||void 0===n||n(e.runtime)})).catch((function(t){var n={message:(null==t?void 0:t.message)||"Unknown error",type:(null==t?void 0:t.name)||"Error",wasmError:t instanceof WebAssembly.CompileError||t instanceof WebAssembly.RuntimeError,originalError:t};console.debug("Rive WASM load error details:",n);var r="https://cdn.jsdelivr.net/npm/".concat(o.name,"@").concat(o.version,"/rive_fallback.wasm");if(e.wasmURL.toLowerCase()!==r)console.warn("Failed to load WASM from ".concat(e.wasmURL," (").concat(n.message,"), trying jsdelivr as a backup")),e.setWasmUrl(r),e.loadRuntime();else{var i=["Could not load Rive WASM file from ".concat(e.wasmURL," or ").concat(r,"."),"Possible reasons:","- Network connection is down","- WebAssembly is not supported in this environment","- The WASM file is corrupted or incompatible","\nError details:","- Type: ".concat(n.type),"- Message: ".concat(n.message),"- WebAssembly-specific error: ".concat(n.wasmError),"\nTo resolve, you may need to:","1. Check your network connection","2. Set a new WASM source via RuntimeLoader.setWasmUrl()","3. Call RuntimeLoader.loadRuntime() again"].join("\n");console.error(i)}}))},e.getInstance=function(t){e.isLoading||(e.isLoading=!0,e.loadRuntime()),e.runtime?t(e.runtime):e.callBackQueue.push(t)},e.awaitInstance=function(){return new Promise((function(t){return e.getInstance((function(e){return t(e)}))}))},e.setWasmUrl=function(t){e.wasmURL=t},e.getWasmUrl=function(){return e.wasmURL},e.isLoading=!1,e.callBackQueue=[],e.wasmURL="https://unpkg.com/".concat(o.name,"@").concat(o.version,"/rive.wasm"),e}();!function(e){e[e.Number=56]="Number",e[e.Trigger=58]="Trigger",e[e.Boolean=59]="Boolean"}(v||(v={}));var g,y=function(){function e(e,t){this.type=e,this.runtimeInput=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.runtimeInput.name},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===v.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}();!function(e){e[e.General=128]="General",e[e.OpenUrl=131]="OpenUrl"}(g||(g={}));var w,_,C=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){return e.type===t.SMIInput.bool?new y(v.Boolean,e.asBool()):e.type===t.SMIInput.number?new y(v.Number,e.asNumber()):e.type===t.SMIInput.trigger?new y(v.Trigger,e.asTrigger()):void 0},e.prototype.cleanup=function(){this.inputs.forEach((function(e){e.delete()})),this.inputs.length=0,this.instance.delete()},e.prototype.bindViewModelInstance=function(e){null!=e.runtimeInstance&&this.instance.bindViewModelInstance(e.runtimeInstance)},e}(),A=function(){function e(e,t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i=[]),this.runtime=e,this.artboard=t,this.eventManager=n,this.animations=r,this.stateMachines=i}return e.prototype.add=function(e,t,n){if(void 0===n&&(n=!0),0===(e=Y(e)).length)this.animations.forEach((function(e){return e.playing=t})),this.stateMachines.forEach((function(e){return e.playing=t}));else for(var r=this.animations.map((function(e){return e.name})),i=this.stateMachines.map((function(e){return e.name})),a=0;a<e.length;a++){var o=r.indexOf(e[a]),u=i.indexOf(e[a]);if(o>=0||u>=0)o>=0?this.animations[o].playing=t:this.stateMachines[u].playing=t;else{var c=this.artboard.animationByName(e[a]);if(c){var l=new s.Animation(c,this.artboard,this.runtime,t);l.advance(0),l.apply(1),this.animations.push(l)}else{var h=this.artboard.stateMachineByName(e[a]);if(h){var f=new C(h,this.runtime,t,this.artboard);this.stateMachines.push(f)}}}}return n&&(t?this.eventManager.fire({type:w.Play,data:this.playing}):this.eventManager.fire({type:w.Pause,data:this.paused})),t?this.playing:this.paused},e.prototype.initLinearAnimations=function(e,t){for(var n=this.animations.map((function(e){return e.name})),r=0;r<e.length;r++){var i=n.indexOf(e[r]);if(i>=0)this.animations[i].playing=t;else{var a=this.artboard.animationByName(e[r]);if(a){var o=new s.Animation(a,this.artboard,this.runtime,t);o.advance(0),o.apply(1),this.animations.push(o)}else console.error("Animation with name ".concat(e[r]," not found."))}}},e.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 C(a,this.runtime,t,this.artboard);this.stateMachines.push(o),t||o.advanceAndApply(0)}else console.warn("State Machine with name ".concat(e[r]," not found.")),this.initLinearAnimations([e[r]],t)}}},e.prototype.play=function(e){return this.add(e,!0)},e.prototype.pause=function(e){return this.add(e,!1)},e.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(e.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(e.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}),e.prototype.stop=function(e){var t=this,n=[];if(0===(e=Y(e)).length)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(e.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(e.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){return 0===this.animations.length&&0===this.stateMachines.length},enumerable:!1,configurable:!0}),e.prototype.atLeastOne=function(e,t){var n;return void 0===t&&(t=!0),0===this.animations.length&&0===this.stateMachines.length&&(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},e.prototype.handleLooping=function(){for(var e=0,t=this.animations.filter((function(e){return e.playing}));e<t.length;e++){var n=t[e];0===n.loopValue&&n.loopCount?(n.loopCount=0,this.stop(n.name)):1===n.loopValue&&n.loopCount?(this.eventManager.fire({type:w.Loop,data:{animation:n.name,type:_.Loop}}),n.loopCount=0):2===n.loopValue&&n.loopCount>1&&(this.eventManager.fire({type:w.Loop,data:{animation:n.name,type:_.PingPong}}),n.loopCount=0)}},e.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})},e.prototype.handleAdvancing=function(e){this.eventManager.fire({type:w.Advance,data:e})},e}();!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||(w={})),function(e){e.OneShot="oneshot",e.Loop="loop",e.PingPong="pingpong"}(_||(_={}));var E,R=function(){function e(e){void 0===e&&(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}(),M=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();(null==e?void 0:e.action)&&e.action(),(null==e?void 0:e.event)&&this.eventManager.fire(e.event)}},e}();!function(e){e[e.AVAILABLE=0]="AVAILABLE",e[e.UNAVAILABLE=1]="UNAVAILABLE"}(E||(E={}));var P,T=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=E.UNAVAILABLE,t}return c(t,e),t.prototype.delay=function(e){return h(this,void 0,void 0,(function(){return f(this,(function(t){return[2,new Promise((function(t){return setTimeout(t,e)}))]}))}))},t.prototype.timeout=function(){return h(this,void 0,void 0,(function(){return f(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 h(this,void 0,void 0,(function(){return f(this,(function(e){return this._enabled||(this._enabled=!0,this._status=E.AVAILABLE,this.reportToListeners()),[2]}))}))},t.prototype.testAudio=function(){return h(this,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:if(this._status!==E.UNAVAILABLE||null===this._audioContext)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 h(this,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return this._started?[3,5]:(this._started=!0,"undefined"!=typeof window?[3,1]:(this.enableAudio(),[3,5]));case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:return this._status!==E.UNAVAILABLE?[3,5]:[4,this.testAudio()];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 h(e,void 0,void 0,(function(){return f(this,(function(e){return this.enableAudio(),[2]}))}))}),{once:!0})},t.prototype.establishAudio=function(){return h(this,void 0,void 0,(function(){return f(this,(function(e){return this._establishAudio(),[2]}))}))},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===E.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(R),I=new T,L=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),S=globalThis.ResizeObserver||L,k=new(function(){function e(){var e=this;this._elementsMap=new Map,this._onObservedEntry=function(t){var n=e._elementsMap.get(t.target);null!==n?n.onResize(0==t.target.clientWidth||0==t.target.clientHeight):e._resizeObserver.unobserve(t.target)},this._onObserved=function(t){t.forEach(e._onObservedEntry)},this._resizeObserver=new S(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}()),O=function(){function e(e){this.enableRiveAssetCDN=!0,this.referenceCount=0,this.destroyed=!1,this.src=e.src,this.buffer=e.buffer,e.assetLoader&&(this.assetLoader=e.assetLoader),this.enableRiveAssetCDN="boolean"!=typeof e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.eventManager=new R,e.onLoad&&this.on(w.Load,e.onLoad),e.onLoadError&&this.on(w.LoadError,e.onLoadError)}return e.prototype.initData=function(){return h(this,void 0,void 0,(function(){var t,n,r,i;return f(this,(function(a){switch(a.label){case 0:return this.src?(t=this,[4,$(this.src)]):[3,2];case 1:t.buffer=a.sent(),a.label=2;case 2:return this.destroyed?[2]:(this.assetLoader&&(n=new this.runtime.CustomFileAssetLoader({loadContents:this.assetLoader})),r=this,[4,this.runtime.load(new Uint8Array(this.buffer),n,this.enableRiveAssetCDN)]);case 3:if(r.file=a.sent(),this.destroyed)return null===(i=this.file)||void 0===i||i.delete(),this.file=null,[2];if(null===this.file)throw this.eventManager.fire({type:w.LoadError,data:null}),new Error(e.fileLoadErrorMessage);return this.eventManager.fire({type:w.Load,data:this}),[2]}}))}))},e.prototype.init=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(n){switch(n.label){case 0:if(!this.src&&!this.buffer)throw new Error(e.missingErrorMessage);return t=this,[4,b.awaitInstance()];case 1:return t.runtime=n.sent(),this.destroyed?[2]:[4,this.initData()];case 2:return n.sent(),[2]}}))}))},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(){var e;this.referenceCount-=1,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),null===(e=this.file)||void 0===e||e.delete(),this.file=null,this.destroyed=!0)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.getInstance=function(){if(null!==this.file)return this.referenceCount+=1,this.file},e.missingErrorMessage="Rive source file or data buffer required",e.fileLoadErrorMessage="The file failed to load",e}(),F=function(){function e(e){var t,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.enableRiveAssetCDN=!0,this._volume=1,this._artboardWidth=void 0,this._artboardHeight=void 0,this._devicePixelRatioUsed=1,this._hasZeroSize=!1,this._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,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=k.add(this.canvas,this.onCanvasResize)),this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=null!==(t=e.layout)&&void 0!==t?t:new m,this.shouldDisableRiveListeners=!!e.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!e.isTouchScrollEnabled,this.automaticallyHandleEvents=!!e.automaticallyHandleEvents,this.enableRiveAssetCDN=void 0===e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.eventManager=new R,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.Loop,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 M(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(t){var n=this,r=t.src,i=t.buffer,a=t.riveFile,o=t.animations,s=t.stateMachines,u=t.artboard,c=t.autoplay,l=void 0!==c&&c,h=t.useOffscreenRenderer,f=void 0!==h&&h,d=t.autoBind,v=void 0!==d&&d;if(!this.destroyed){if(this.src=r,this.buffer=i,this.riveFile=a,!this.src&&!this.buffer&&!this.riveFile)throw new p(e.missingErrorMessage);var m=Y(o),g=Y(s);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then((function(e){n.destroyed||(n.runtime=e,n.removeRiveListeners(),n.deleteRiveRenderer(),n.renderer=n.runtime.makeRenderer(n.canvas,f),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(u,m,g,l,v).then((function(){return n.setupRiveListeners()})).catch((function(e){console.error(e)})))})).catch((function(e){console.error(e)}))}},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;e&&"isTouchScrollEnabled"in e&&(r=e.isTouchScrollEnabled),this.eventCleanup=(0,u.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,layoutScaleFactor:this._layout.layoutScaleFactor})}},e.prototype.removeRiveListeners=function(){this.eventCleanup&&(this.eventCleanup(),this.eventCleanup=null)},e.prototype.initializeAudio=function(){var e,t=this;I.status==E.UNAVAILABLE&&(null===(e=this.artboard)||void 0===e?void 0:e.hasAudio)&&null===this._audioEventListener&&(this._audioEventListener={type:w.AudioStatusChange,callback:function(){return t.onSystemAudioChanged()}},I.add(this._audioEventListener),I.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(t,n,r,i,a){return h(this,void 0,void 0,(function(){var o,s,u;return f(this,(function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),null!=this.riveFile?[3,2]:(this.riveFile=new O({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),[4,this.riveFile.init()]);case 1:c.sent(),c.label=2;case 2:if(!this.riveFile)throw new p(e.cleanupErrorMessage);return this.file=this.riveFile.getInstance(),this.initArtboard(t,n,r,i,a),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:w.Load,data:null!==(u=this.src)&&void 0!==u?u:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()];case 3:return o=c.sent(),s=(l=o)&&l.isHandledError?l.message:"Problem loading file; may be corrupt!",console.warn(s),this.eventManager.fire({type:w.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}var l}))}))},e.prototype.initArtboard=function(e,t,n,r,i){if(this.file){var a,o=e?this.file.artboardByName(e):this.file.defaultArtboard();if(!o){var s="Invalid artboard name or no default artboard";return console.warn(s),void this.eventManager.fire({type:w.LoadError,data:s})}if(this.artboard=o,o.volume=this._volume*I.systemVolume,this.artboard.animationCount()<1)throw s="Artboard has no animations",this.eventManager.fire({type:w.LoadError,data:s}),s;if(this.animator=new A(this.runtime,this.artboard,this.eventManager),t.length>0||n.length>0?(a=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):a=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?w.Play:w.Pause,data:a}}),i){var u=this.file.defaultArtboardViewModel(o);if(null!==u){var c=u.defaultInstance();if(null!==c){var l=new D(c,null);this.bindViewModelInstance(l)}}}}},e.prototype.drawFrame=function(){var e,t;(null===(e=null===document||void 0===document?void 0:document.timeline)||void 0===e?void 0:e.currentTime)?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),null===(t=this.runtime)||void 0===t||t.resolveAnimationFrame()):this.startRendering()},e.prototype.draw=function(e,t){var n;this.frameRequestId=null;var r=performance.now();this.lastRenderTime||(this.lastRenderTime=e),this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,null==t||t());var i=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e;for(var a=0,o=this.animator.animations.filter((function(e){return e.playing||e.needsScrub})).sort((function(e){return e.needsScrub?-1:1}));a<o.length;a++){var s=o[a];s.advance(i),s.instance.didLoop&&(s.loopCount+=1),s.apply(1)}for(var c=0,l=this.animator.stateMachines.filter((function(e){return e.playing}));c<l.length;c++){var h=l[c],f=h.reportedEventCount();if(f)for(var d=0;d<f;d++){var p=h.reportedEventAt(d);if(p)if(p.type===g.OpenUrl){if(this.eventManager.fire({type:w.RiveEvent,data:p}),this.automaticallyHandleEvents){var v=document.createElement("a"),m=p,b=m.url,y=m.target,_=(0,u.sanitizeUrl)(b);b&&v.setAttribute("href",_),y&&v.setAttribute("target",y),_&&_!==u.BLANK_URL&&v.click()}}else this.eventManager.fire({type:w.RiveEvent,data:p})}h.advanceAndApply(i)}0==this.animator.stateMachines.length&&this.artboard.advance(i);var C=this.renderer;C.clear(),C.save(),this.alignRenderer(),this._hasZeroSize||this.artboard.draw(C),C.restore(),C.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(i),this.frameCount++;var A=performance.now();for(this.frameTimes.push(A),this.durations.push(A-r);this.frameTimes[0]<=A-1e3;)this.frameTimes.shift(),this.durations.shift();null===(n=this._viewModelInstance)||void 0===n||n.handleCallbacks(),this.animator.isPlaying?this.startRendering():(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 0===this.durations.length?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(),null!==this._observed&&k.remove(this._observed),this.removeRiveListeners(),this.file&&(null===(e=this.riveFile)||void 0===e||e.cleanup(),this.file=null),this.riveFile=null,this.deleteRiveRenderer(),null!==this._audioEventListener&&(I.remove(this._audioEventListener),this._audioEventListener=null),null===(t=this._viewModelInstance)||void 0===t||t.cleanup(),this._viewModelInstance=null,this._dataEnums=null},e.prototype.deleteRiveRenderer=function(){var e;null===(e=this.renderer)||void 0===e||e.delete(),this.renderer=null},e.prototype.cleanupInstances=function(){null!==this.eventCleanup&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},e.prototype.retrieveTextRun=function(e){var t;if(e)if(this.artboard){var n=this.artboard.textRun(e);if(n)return n;console.warn("Could not access a text run with name '".concat(e,"' in the '").concat(null===(t=this.artboard)||void 0===t?void 0:t.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."))}else console.warn("Tried to access text run, but the Artboard is null");else console.warn("No text run name provided")},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;e=Y(e),this.readyForPlaying?(this.animator.play(e),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()):this.taskQueue.add({action:function(){return n.play(e,t)}})},e.prototype.pause=function(e){var t=this;e=Y(e),this.readyForPlaying?(this.eventCleanup&&this.eventCleanup(),this.animator.pause(e)):this.taskQueue.add({action:function(){return t.pause(e)}})},e.prototype.scrub=function(e,t){var n=this;e=Y(e),this.readyForPlaying?(this.animator.scrub(e,t||0),this.drawFrame()):this.taskQueue.add({action:function(){return n.scrub(e,t)}})},e.prototype.stop=function(e){var t=this;e=Y(e),this.readyForPlaying?(this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup()):this.taskQueue.add({action:function(){return t.stop(e)}})},e.prototype.reset=function(e){var t,n,r=null==e?void 0:e.artboard,i=Y(null==e?void 0:e.animations),a=Y(null==e?void 0:e.stateMachines),o=null!==(t=null==e?void 0:e.autoplay)&&void 0!==t&&t,s=null!==(n=null==e?void 0:e.autoBind)&&void 0!==n&&n;this.cleanupInstances(),this.initArtboard(r,i,a,o,s),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 n=this.canvas.getBoundingClientRect(),r=n.width,i=n.height,a=e||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=a,this.canvas.width=a*r,this.canvas.height=a*i,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===t.Layout){var o=this._layout.layoutScaleFactor;this.artboard.width=r/o,this.artboard.height=i/o}}},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){var t=this.animator.stateMachines.find((function(t){return t.name===e}));return null==t?void 0:t.inputs}},e.prototype.retrieveInputAtPath=function(e,t){if(e)if(this.artboard){var n=this.artboard.inputByPath(e,t);if(n)return n;console.warn("Could not access an input with name: '".concat(e,"', at path:'").concat(t,"'"))}else console.warn("Tried to access input: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));else console.warn("No input name provided for path '".concat(t,"'"))},e.prototype.setBooleanStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===v.Boolean?r.asBool().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(n,"' is not a boolean")))},e.prototype.setNumberStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&(r.type===v.Number?r.asNumber().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(n,"' is not a number")))},e.prototype.fireStateAtPath=function(e,t){var n=this.retrieveInputAtPath(e,t);n&&(n.type===v.Trigger?n.asTrigger().fire():console.warn("Input with name: '".concat(e,"', at path:'").concat(t,"' is not a trigger")))},e.prototype.retrieveTextAtPath=function(e,t){if(e)if(t)if(this.artboard){var n=this.artboard.textByPath(e,t);if(n)return n;console.warn("Could not access text with name: '".concat(e,"', at path:'").concat(t,"'"))}else console.warn("Tried to access text: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));else console.warn("No path provided for text '".concat(e,"'"));else console.warn("No text name provided for path '".concat(t,"'"))},e.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);if(n)return n.text;console.warn("Could not get text with name: '".concat(e,"', at path:'").concat(t,"'"))},e.prototype.setTextRunValueAtPath=function(e,t,n){var r=this.retrieveTextAtPath(e,n);r?r.text=t:console.warn("Could not set text with name: '".concat(e,"', at path:'").concat(n,"'"))},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},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.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),u=s.name,c=new this.runtime.StateMachineInstance(s,n),l=[],h=0;h<c.inputCount();h++){var f=c.input(h);l.push({name:f.name,type:f.type})}r.stateMachines.push({name:u,inputs:l})}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*I.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artboardWidth",{get:function(){var e;return this.artboard?this.artboard.width:null!==(e=this._artboardWidth)&&void 0!==e?e:0},set:function(e){this._artboardWidth=e,this.artboard&&(this.artboard.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artboardHeight",{get:function(){var e;return this.artboard?this.artboard.height:null!==(e=this._artboardHeight)&&void 0!==e?e: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(),null===(t=this._viewModelInstance)||void 0===t||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 null!==t?new j(t):null},e.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return null!==t?new j(t):null},e.prototype.enums=function(){if(null===this._dataEnums){var e=this.file.enums();this._dataEnums=e.map((function(e){return new x(e)}))}return this._dataEnums},e.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new j(e)}return null},e.missingErrorMessage="Rive source file or data buffer required",e.cleanupErrorMessage="Attempt to use file after calling cleanup.",e}(),j=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);return null!==t?new D(t,null):null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);return null!==t?new D(t,null):null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();return null!==e?new D(e,null):null},e.prototype.instance=function(){var e=this._viewModel.instance();return null!==e?new D(e,null):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}(),x=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}();!function(e){e.Number="number",e.String="string",e.Boolean="boolean",e.Color="color",e.Trigger="trigger",e.Enum="enum"}(P||(P={}));var D=function(){function e(e,t){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this._runtimeInstance=e,null!==t&&this._parents.push(t)}return Object.defineProperty(e.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),e.prototype.handleCallbacks=function(){0!==this._propertiesWithCallbacks.length&&(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.push(e),(this._propertiesWithCallbacks.length>0||this._children.length>0)&&e.addToViewModelCallbacks(this)},e.prototype.removeParent=function(e){var t=this._parents.indexOf(e);-1!==t&&(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})),0===this._children.length&&0===this._propertiesWithCallbacks.length&&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})),0===this._children.length&&0===this._propertiesWithCallbacks.length&&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 null!==n?t==e.length-1?n:n.viewModelFromPathSegments(e,t++):null},e.prototype.propertyFromPathSegments=function(e,t,n){var r,i,a,o,s,u,c,l,h,f,d,p;if(t<e.length-1){var v=this.internalViewModelInstance(e[t]);return null!==v?v.propertyFromPathSegments(e,t+1,n):null}var m=null;switch(n){case P.Number:if(null!==(m=null!==(i=null===(r=this._runtimeInstance)||void 0===r?void 0:r.number(e[t]))&&void 0!==i?i:null))return new U(m,this);break;case P.String:if(null!==(m=null!==(o=null===(a=this._runtimeInstance)||void 0===a?void 0:a.string(e[t]))&&void 0!==o?o:null))return new V(m,this);break;case P.Boolean:if(null!==(m=null!==(u=null===(s=this._runtimeInstance)||void 0===s?void 0:s.boolean(e[t]))&&void 0!==u?u:null))return new W(m,this);break;case P.Color:if(null!==(m=null!==(l=null===(c=this._runtimeInstance)||void 0===c?void 0:c.color(e[t]))&&void 0!==l?l:null))return new H(m,this);break;case P.Trigger:if(null!==(m=null!==(f=null===(h=this._runtimeInstance)||void 0===h?void 0:h.trigger(e[t]))&&void 0!==f?f:null))return new N(m,this);break;case P.Enum:if(null!==(m=null!==(p=null===(d=this._runtimeInstance)||void 0===d?void 0:d.enum(e[t]))&&void 0!==p?p:null))return new z(m,this)}return null},e.prototype.internalViewModelInstance=function(t){var n;if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var r=null===(n=this._runtimeInstance)||void 0===n?void 0:n.viewModel(t);if(null!==r){var i=new e(r,this);return i.internalIncrementReferenceCount(),this._viewModelInstances.set(t,i),i}return null},e.prototype.number=function(e){return this.propertyFromPath(e,P.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,P.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,P.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,P.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,P.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,P.Enum)},e.prototype.viewModel=function(e){var t=e.split("/"),n=t.length>1?this.viewModelFromPathSegments(t.slice(0,t.length-1),0):this;return null!=n?n.internalViewModelInstance(t[t.length-1]):null},e.prototype.internalReplaceViewModel=function(e,t){var n;if(null!==t.runtimeInstance){var r=(null===(n=this._runtimeInstance)||void 0===n?void 0:n.replaceViewModel(e,t.runtimeInstance))||!1;if(r){t.internalIncrementReferenceCount();var i=this.internalViewModelInstance(e);null!==i&&(i.removeParent(this),this._children.includes(i)&&(this._children=this._children.filter((function(e){return e!==i}))),i.cleanup()),this._viewModelInstances.set(e,t),t.addParent(this)}return r}return!1},e.prototype.replaceViewModel=function(e,t){var n,r=e.split("/"),i=r.length>1?this.viewModelFromPathSegments(r.slice(0,r.length-1),0):this;return null!==(n=null==i?void 0:i.internalReplaceViewModel(r[r.length-1],t))&&void 0!==n&&n},e.prototype.incrementReferenceCount=function(){var e;this._referenceCount++,null===(e=this._runtimeInstance)||void 0===e||e.incrementReferenceCount()},e.prototype.decrementReferenceCount=function(){var e;this._referenceCount--,null===(e=this._runtimeInstance)||void 0===e||e.decrementReferenceCount()},Object.defineProperty(e.prototype,"properties",{get:function(){var e;return(null===(e=this._runtimeInstance)||void 0===e?void 0:e.getProperties().map((function(e){return l({},e)})))||[]},enumerable:!1,configurable:!0}),e.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},e.prototype.cleanup=function(){var e=this;if(this._referenceCount--,this._referenceCount<=0){this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach((function(e){e.cleanup()})),this._viewModelInstances.clear();var t=d([],this._children,!0);this._children.length=0;var n=d([],this._parents,!0);this._parents.length=0,t.forEach((function(t){t.removeParent(e)})),n.forEach((function(t){t.removeFromViewModelCallbacks(e)}))}},e}(),B=function(){function e(e,t){this.callbacks=[],this._viewModelInstanceValue=e,this._parentViewModel=t}return e.prototype.on=function(e){0===this.callbacks.length&&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,0===this.callbacks.length&&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},enumerable:!1,configurable:!0}),e}(),V=function(e){function t(t,n){return e.call(this,t,n)||this}return c(t,e),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}(B),U=function(e){function t(t,n){return e.call(this,t,n)||this}return c(t,e),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}(B),W=function(e){function t(t,n){return e.call(this,t,n)||this}return c(t,e),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}(B),N=function(e){function t(t,n){return e.call(this,t,n)||this}return c(t,e),t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(B),z=function(e){function t(t,n){return e.call(this,t,n)||this}return c(t,e),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}(B),H=function(e){function t(t,n){return e.call(this,t,n)||this}return c(t,e),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(255*Math.max(0,Math.min(1,e))))},t.prototype.internalHandleCallback=function(e){e(this.value)},t}(B),$=function(e){return h(void 0,void 0,void 0,(function(){var t;return f(this,(function(n){switch(n.label){case 0:return t=new Request(e),[4,fetch(t)];case 1:return[4,n.sent().arrayBuffer()];case 2:return[2,n.sent()]}}))}))},Y=function(e){return"string"==typeof e?[e]:e instanceof Array?e:[]},X={EventManager:R,TaskQueueManager:M},G=function(e){return new Promise((function(t){return b.getInstance((function(n){n.decodeAudio(e,t)}))}))},q=function(e){return new Promise((function(t){return b.getInstance((function(n){n.decodeImage(e,t)}))}))},J=function(e){return new Promise((function(t){return b.getInstance((function(n){n.decodeFont(e,t)}))}))}})(),r})(),e.exports=t()},64827:(e,t,n)=>{"use strict";n.d(t,{VB:()=>o});var r=n(51609);function i(){return(i=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)}const a=Symbol(),o=e=>((e,t)=>{const n=Object.keys(t);let o=t,s=null;const u={};n.forEach((e=>{u[e]=new Set}));const c=(t,n)=>n.type===a?n.r?n.r(t):n.e:e(t,n),l=(e,t)=>{const n=n=>{return i({},n,{[e]:(r=n[e],a=t,"function"==typeof a?a(r):a)});var r,a};if(s)s({type:a,r:n});else{o=n(o);const t=o[e];u[e].forEach((e=>e(t)))}},h=(e,t)=>{n.forEach((n=>{const r=t[n];e[n]!==r&&u[n].forEach((e=>e(r)))}))};return{useGlobalStateProvider:()=>{const[e,t]=(0,r.useReducer)(c,o);(0,r.useEffect)((()=>{if(s)throw new Error("Only one global state provider is allowed");return s=t,t({type:a,e:o}),()=>{s=null}}),[]);const n=(0,r.useRef)(e);h(n.current,e),n.current=e,(0,r.useEffect)((()=>{o=e}),[e])},useGlobalState:e=>{const[t,n]=(0,r.useState)(o[e]);return(0,r.useEffect)((()=>(u[e].add(n),n(o[e]),()=>{u[e].delete(n)})),[e]),[t,(0,r.useCallback)((t=>l(e,t)),[e])]},getGlobalState:e=>o[e],setGlobalState:l,getState:()=>o,setState:e=>{if(s)s({type:a,e});else{const t=o;o=e,h(t,o)}},dispatch:t=>{if(s)s(t);else{const n=o;o=e(o,t),h(n,o)}return t}}})(((e,t)=>e),e)}}]);