replaywebpage 1.7.5 → 1.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/ruffle/2c87713f8cc6dda8ca91.wasm +0 -0
- package/ruffle/45264ba09d429505f426.wasm +0 -0
- package/ruffle/core.ruffle.93de25ca9a00e07a2eca.js +2 -0
- package/ruffle/core.ruffle.f45b5c0662b515254bf0.js +2 -0
- package/ruffle/ruffle.js +1 -1
- package/sw.js +2 -2
- package/ui.js +1 -1
- package/ruffle/69052e08f0f291fb6d82.wasm +0 -0
- package/ruffle/824f57d600b8c30ee747.wasm +0 -0
- package/ruffle/core.ruffle.53a2873dad31763672e1.js +0 -2
- package/ruffle/core.ruffle.be482e0399eaff7f47ec.js +0 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "replaywebpage",
|
|
3
3
|
"productName": "ReplayWeb.page",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.7",
|
|
5
5
|
"description": "Serverless Web Archive Replay",
|
|
6
6
|
"repository": "https://github.com/webrecorder/replayweb.page",
|
|
7
7
|
"homepage": "https://replayweb.page/",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "AGPL-3.0-or-later",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
|
12
|
-
"@webrecorder/wabac": "^2.13.
|
|
12
|
+
"@webrecorder/wabac": "^2.13.14",
|
|
13
13
|
"auto-js-ipfs": "^1.5.1",
|
|
14
14
|
"bulma": "^0.9.3",
|
|
15
15
|
"electron-log": "^4.4.1",
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkruffle_selfhosted=self.webpackChunkruffle_selfhosted||[]).push([[662],{762:(n,e,t)=>{function _(n,e){const t=n.length,_=n.getChannelData(0),r=n.getChannelData(1);let b=0,c=0;for(;c<t;)_[c]=e[b],r[c]=e[b+1],c++,b+=2}t.d(e,{tM:()=>_})},662:(n,e,t)=>{t.r(e),t.d(e,{Ruffle:()=>U,default:()=>H,initSync:()=>q});var _=t(762);n=t.hmd(n);const r="undefined"!=typeof AudioContext?AudioContext:"undefined"!=typeof webkitAudioContext?webkitAudioContext:void 0;let b;const c=new Array(32).fill(void 0);function f(n){return c[n]}c.push(void 0,null,!0,!1);let o=c.length;function i(n){const e=f(n);return function(n){n<36||(c[n]=o,o=n)}(n),e}const u=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});u.decode();let a=new Uint8Array;function g(){return 0===a.byteLength&&(a=new Uint8Array(b.memory.buffer)),a}function w(n,e){return u.decode(g().subarray(n,n+e))}function d(n){o===c.length&&c.push(c.length+1);const e=o;return o=c[e],c[e]=n,e}let s=0;const l=new TextEncoder("utf-8"),m="function"==typeof l.encodeInto?function(n,e){return l.encodeInto(n,e)}:function(n,e){const t=l.encode(n);return e.set(t),{read:n.length,written:t.length}};function y(n,e,t){if(void 0===t){const t=l.encode(n),_=e(t.length);return g().subarray(_,_+t.length).set(t),s=t.length,_}let _=n.length,r=e(_);const b=g();let c=0;for(;c<_;c++){const e=n.charCodeAt(c);if(e>127)break;b[r+c]=e}if(c!==_){0!==c&&(n=n.slice(c)),r=t(r,_,_=c+3*n.length);const e=g().subarray(r+c,r+_);c+=m(n,e).written}return s=c,r}function p(n){return null==n}let h=new Int32Array;function v(){return 0===h.byteLength&&(h=new Int32Array(b.memory.buffer)),h}let A=new Float64Array;function x(){return 0===A.byteLength&&(A=new Float64Array(b.memory.buffer)),A}let S=new BigInt64Array;function C(n){const e=typeof n;if("number"==e||"boolean"==e||null==n)return`${n}`;if("string"==e)return`"${n}"`;if("symbol"==e){const e=n.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=n.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(n)){const e=n.length;let t="[";e>0&&(t+=C(n[0]));for(let _=1;_<e;_++)t+=", "+C(n[_]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(n));let _;if(!(t.length>1))return toString.call(n);if(_=t[1],"Object"==_)try{return"Object("+JSON.stringify(n)+")"}catch(n){return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:_}function R(n,e,t,_){const r={a:n,b:e,cnt:1,dtor:t},c=(...n)=>{r.cnt++;const e=r.a;r.a=0;try{return _(e,r.b,...n)}finally{0==--r.cnt?b.__wbindgen_export_2.get(r.dtor)(e,r.b):r.a=e}};return c.original=r,c}function T(n,e){b._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h424e4470cf7c7a9d(n,e)}function E(n,e,t){b._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1ca1897bfa284ad0(n,e,d(t))}function F(n,e,t){b._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb73bf7feb23ce812(n,e,t)}function k(n,e,t){b._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hda4ce02dc8cb37c1(n,e,d(t))}let M=new Float32Array;function P(n,e){return(0===M.byteLength&&(M=new Float32Array(b.memory.buffer)),M).subarray(n/4,n/4+e)}function L(n,e){try{return n.apply(this,e)}catch(n){b.__wbindgen_exn_store(d(n))}}let I=new Uint32Array;function O(n,e){return g().subarray(n/1,n/1+e)}function B(n,e){return x().subarray(n/8,n/8+e)}let W=new Uint8ClampedArray;function D(n,e){return(0===W.byteLength&&(W=new Uint8ClampedArray(b.memory.buffer)),W).subarray(n/1,n/1+e)}class U{static __wrap(n){const e=Object.create(U.prototype);return e.ptr=n,e}__destroy_into_raw(){const n=this.ptr;return this.ptr=0,n}free(){const n=this.__destroy_into_raw();b.__wbg_ruffle_free(n)}constructor(n,e,t){return i(b.ruffle_new(d(n),d(e),d(t)))}stream_from(n,e){try{const _=b.__wbindgen_add_to_stack_pointer(-16),r=y(n,b.__wbindgen_malloc,b.__wbindgen_realloc),c=s;b.ruffle_stream_from(_,this.ptr,r,c,d(e));var t=v()[_/4+0];if(v()[_/4+1])throw i(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}load_data(n,e){try{const _=b.__wbindgen_add_to_stack_pointer(-16);b.ruffle_load_data(_,this.ptr,d(n),d(e));var t=v()[_/4+0];if(v()[_/4+1])throw i(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}play(){b.ruffle_play(this.ptr)}pause(){b.ruffle_pause(this.ptr)}is_playing(){return 0!==b.ruffle_is_playing(this.ptr)}volume(){return b.ruffle_volume(this.ptr)}set_volume(n){b.ruffle_set_volume(this.ptr,n)}renderer_name(){return i(b.ruffle_renderer_name(this.ptr))}prepare_context_menu(){return i(b.ruffle_prepare_context_menu(this.ptr))}run_context_menu_callback(n){b.ruffle_run_context_menu_callback(this.ptr,n)}set_fullscreen(n){b.ruffle_set_fullscreen(this.ptr,n)}clear_custom_menu_items(){b.ruffle_clear_custom_menu_items(this.ptr)}destroy(){b.ruffle_destroy(this.ptr)}call_exposed_callback(n,e){const t=y(n,b.__wbindgen_malloc,b.__wbindgen_realloc),_=s,r=function(n,e){const t=e(4*n.length),_=(0===I.byteLength&&(I=new Uint32Array(b.memory.buffer)),I);for(let e=0;e<n.length;e++)_[t/4+e]=d(n[e]);return s=n.length,t}(e,b.__wbindgen_malloc),c=s;return i(b.ruffle_call_exposed_callback(this.ptr,t,_,r,c))}set_trace_observer(n){b.ruffle_set_trace_observer(this.ptr,d(n))}audio_context(){return i(b.ruffle_audio_context(this.ptr))}static is_wasm_simd_used(){return 0!==b.ruffle_is_wasm_simd_used()}}function V(){const e={wbg:{}};return e.wbg.__wbindgen_is_function=function(n){return"function"==typeof f(n)},e.wbg.__wbindgen_object_drop_ref=function(n){i(n)},e.wbg.__wbindgen_error_new=function(n,e){return d(new Error(w(n,e)))},e.wbg.__wbindgen_string_new=function(n,e){return d(w(n,e))},e.wbg.__wbindgen_object_clone_ref=function(n){return d(f(n))},e.wbg.__wbg_ruffle_new=function(n){return d(U.__wrap(n))},e.wbg.__wbindgen_cb_drop=function(n){const e=i(n).original;return 1==e.cnt--&&(e.a=0,!0)},e.wbg.__wbindgen_boolean_get=function(n){const e=f(n);return"boolean"==typeof e?e?1:0:2},e.wbg.__wbg_copyToAudioBufferInterleaved_7975d0071e3cdc32=function(n,e,t){(0,_.tM)(f(n),P(e,t))},e.wbg.__wbg_setFullscreen_62846f9d4b5f6f48=function(){return L((function(n,e){f(n).setFullscreen(0!==e)}),arguments)},e.wbg.__wbindgen_string_get=function(n,e){const t=f(e),_="string"==typeof t?t:void 0;var r=p(_)?0:y(_,b.__wbindgen_malloc,b.__wbindgen_realloc),c=s;v()[n/4+1]=c,v()[n/4+0]=r},e.wbg.__wbg_displayUnsupportedMessage_cb34e3c4ccb484e1=function(n){f(n).displayUnsupportedMessage()},e.wbg.__wbg_displayRootMovieDownloadFailedMessage_c90a7f0f0b73e4df=function(n){f(n).displayRootMovieDownloadFailedMessage()},e.wbg.__wbg_displayMessage_e81323a872d4e00a=function(n,e,t){f(n).displayMessage(w(e,t))},e.wbg.__wbg_setMetadata_11d904a2018b04c1=function(n,e){f(n).setMetadata(i(e))},e.wbg.__wbg_onCallbackAvailable_44f6acac6389d11d=function(n,e,t){f(n).onCallbackAvailable(w(e,t))},e.wbg.__wbg_onFSCommand_b13bfd8f38fc3115=function(){return L((function(n,e,t,_,r){return f(n).onFSCommand(w(e,t),w(_,r))}),arguments)},e.wbg.__wbindgen_number_get=function(n,e){const t=f(e),_="number"==typeof t?t:void 0;x()[n/8+1]=p(_)?0:_,v()[n/4+0]=!p(_)},e.wbg.__wbindgen_number_new=function(n){return d(n)},e.wbg.__wbg_new_f9bb493369a83c12=function(n,e){return d(new Error(w(n,e)))},e.wbg.__wbg_panic_cc9551d881f701ae=function(n,e){f(n).panic(f(e))},e.wbg.__wbindgen_is_undefined=function(n){return void 0===f(n)},e.wbg.__wbindgen_in=function(n,e){return f(n)in f(e)},e.wbg.__wbindgen_is_bigint=function(n){return"bigint"==typeof f(n)},e.wbg.__wbindgen_bigint_from_u64=function(n){return d(BigInt.asUintN(64,n))},e.wbg.__wbindgen_jsval_eq=function(n,e){return f(n)===f(e)},e.wbg.__wbindgen_is_string=function(n){return"string"==typeof f(n)},e.wbg.__wbindgen_is_object=function(n){const e=f(n);return"object"==typeof e&&null!==e},e.wbg.__wbg_new_abda76e883ba8a5f=function(){return d(new Error)},e.wbg.__wbg_stack_658279fe44541cf6=function(n,e){const t=y(f(e).stack,b.__wbindgen_malloc,b.__wbindgen_realloc),_=s;v()[n/4+1]=_,v()[n/4+0]=t},e.wbg.__wbg_error_f851667af71bcfc6=function(n,e){try{console.error(w(n,e))}finally{b.__wbindgen_free(n,e)}},e.wbg.__wbindgen_jsval_loose_eq=function(n,e){return f(n)==f(e)},e.wbg.__wbg_String_91fba7ded13ba54c=function(n,e){const t=y(String(f(e)),b.__wbindgen_malloc,b.__wbindgen_realloc),_=s;v()[n/4+1]=_,v()[n/4+0]=t},e.wbg.__wbg_getwithrefkey_15c62c2b8546208d=function(n,e){return d(f(n)[f(e)])},e.wbg.__wbg_set_20cbc34131e76824=function(n,e,t){f(n)[i(e)]=i(t)},e.wbg.__wbg_randomFillSync_6894564c2c334c42=function(){return L((function(n,e,t){f(n).randomFillSync(O(e,t))}),arguments)},e.wbg.__wbg_getRandomValues_805f1c3d65988a5a=function(){return L((function(n,e){f(n).getRandomValues(f(e))}),arguments)},e.wbg.__wbg_crypto_e1d53a1d73fb10b8=function(n){return d(f(n).crypto)},e.wbg.__wbg_process_038c26bf42b093f8=function(n){return d(f(n).process)},e.wbg.__wbg_versions_ab37218d2f0b24a8=function(n){return d(f(n).versions)},e.wbg.__wbg_node_080f4b19d15bc1fe=function(n){return d(f(n).node)},e.wbg.__wbg_msCrypto_6e7d3e1f92610cbb=function(n){return d(f(n).msCrypto)},e.wbg.__wbg_require_78a3dcfbdba9cbce=function(){return L((function(){return d(n.require)}),arguments)},e.wbg.__wbg_instanceof_WebGl2RenderingContext_fcfa91cd777063f3=function(n){let e;try{e=f(n)instanceof WebGL2RenderingContext}catch{e=!1}return e},e.wbg.__wbg_bindVertexArray_9d12800e272184b0=function(n,e){f(n).bindVertexArray(f(e))},e.wbg.__wbg_blitFramebuffer_cdc1ebf043046b70=function(n,e,t,_,r,b,c,o,i,u,a){f(n).blitFramebuffer(e,t,_,r,b,c,o,i,u>>>0,a>>>0)},e.wbg.__wbg_createVertexArray_8467a75e68fec199=function(n){const e=f(n).createVertexArray();return p(e)?0:d(e)},e.wbg.__wbg_deleteVertexArray_00194a31d79df7e5=function(n,e){f(n).deleteVertexArray(f(e))},e.wbg.__wbg_renderbufferStorageMultisample_3e76453eed60554b=function(n,e,t,_,r,b){f(n).renderbufferStorageMultisample(e>>>0,t,_>>>0,r,b)},e.wbg.__wbg_texImage2D_0b8061aa6eecc96a=function(){return L((function(n,e,t,_,r,b,c,o,i,u,a){f(n).texImage2D(e>>>0,t,_,r,b,c,o>>>0,i>>>0,0===u?void 0:O(u,a))}),arguments)},e.wbg.__wbg_bindFramebuffer_5c01742edd5d843a=function(n,e,t){f(n).bindFramebuffer(e>>>0,f(t))},e.wbg.__wbg_bindRenderbuffer_f66dee160b94e5ef=function(n,e,t){f(n).bindRenderbuffer(e>>>0,f(t))},e.wbg.__wbg_bindTexture_ae9620ea4a6ffb97=function(n,e,t){f(n).bindTexture(e>>>0,f(t))},e.wbg.__wbg_createFramebuffer_d5f3985ce3652661=function(n){const e=f(n).createFramebuffer();return p(e)?0:d(e)},e.wbg.__wbg_createRenderbuffer_531167a301a60e27=function(n){const e=f(n).createRenderbuffer();return p(e)?0:d(e)},e.wbg.__wbg_createTexture_269f67d411bdc4dc=function(n){const e=f(n).createTexture();return p(e)?0:d(e)},e.wbg.__wbg_deleteFramebuffer_d7551444a28f508e=function(n,e){f(n).deleteFramebuffer(f(e))},e.wbg.__wbg_deleteRenderbuffer_58c540348fb8606d=function(n,e){f(n).deleteRenderbuffer(f(e))},e.wbg.__wbg_deleteTexture_68a539339fd87792=function(n,e){f(n).deleteTexture(f(e))},e.wbg.__wbg_framebufferRenderbuffer_963b305ac8cb6fd6=function(n,e,t,_,r){f(n).framebufferRenderbuffer(e>>>0,t>>>0,_>>>0,f(r))},e.wbg.__wbg_framebufferTexture2D_4b810902dffa1ef3=function(n,e,t,_,r,b){f(n).framebufferTexture2D(e>>>0,t>>>0,_>>>0,f(r),b)},e.wbg.__wbg_getError_8de2be43ffb2c4e0=function(n){return f(n).getError()},e.wbg.__wbg_getParameter_4e2ccc745690476a=function(){return L((function(n,e){return d(f(n).getParameter(e>>>0))}),arguments)},e.wbg.__wbg_texParameteri_21fd6b6b394882c9=function(n,e,t,_){f(n).texParameteri(e>>>0,t>>>0,_)},e.wbg.__wbg_instanceof_Window_acc97ff9f5d2c7b4=function(n){let e;try{e=f(n)instanceof Window}catch{e=!1}return e},e.wbg.__wbg_document_3ead31dbcad65886=function(n){const e=f(n).document;return p(e)?0:d(e)},e.wbg.__wbg_location_8cc8ccf27e342c0a=function(n){return d(f(n).location)},e.wbg.__wbg_devicePixelRatio_476ddb014eb2520a=function(n){return f(n).devicePixelRatio},e.wbg.__wbg_localStorage_753b6d15a844c3dc=function(){return L((function(n){const e=f(n).localStorage;return p(e)?0:d(e)}),arguments)},e.wbg.__wbg_cancelAnimationFrame_679ac3913d7f9b34=function(){return L((function(n,e){f(n).cancelAnimationFrame(e)}),arguments)},e.wbg.__wbg_focus_6335df8e57f2356d=function(){return L((function(n){f(n).focus()}),arguments)},e.wbg.__wbg_open_8b947bc096f5bb21=function(){return L((function(n,e,t,_,r){const b=f(n).open(w(e,t),w(_,r));return p(b)?0:d(b)}),arguments)},e.wbg.__wbg_requestAnimationFrame_4181656476a7d86c=function(){return L((function(n,e){return f(n).requestAnimationFrame(f(e))}),arguments)},e.wbg.__wbg_fetch_0fe04905cccfc2aa=function(n,e){return d(f(n).fetch(f(e)))},e.wbg.__wbg_addColorStop_fd22191e62f12621=function(){return L((function(n,e,t,_){f(n).addColorStop(e,w(t,_))}),arguments)},e.wbg.__wbg_inverse_81ff934e39851558=function(n){return d(f(n).inverse())},e.wbg.__wbg_instanceof_HtmlFormElement_1c489ff7e99e43d3=function(n){let e;try{e=f(n)instanceof HTMLFormElement}catch{e=!1}return e},e.wbg.__wbg_submit_119222e1a26af942=function(){return L((function(n){f(n).submit()}),arguments)},e.wbg.__wbg_deltaY_a5393ec7ac0f7bb4=function(n){return f(n).deltaY},e.wbg.__wbg_deltaMode_a90be314f5c676f1=function(n){return f(n).deltaMode},e.wbg.__wbg_offsetX_8891849b36542d53=function(n){return f(n).offsetX},e.wbg.__wbg_offsetY_1f52082687af467b=function(n){return f(n).offsetY},e.wbg.__wbg_button_2bb5dc0116d6b89b=function(n){return f(n).button},e.wbg.__wbg_pointerId_18be034781db46f3=function(n){return f(n).pointerId},e.wbg.__wbg_instanceof_Response_eaa426220848a39e=function(n){let e;try{e=f(n)instanceof Response}catch{e=!1}return e},e.wbg.__wbg_url_74285ddf2747cb3d=function(n,e){const t=y(f(e).url,b.__wbindgen_malloc,b.__wbindgen_realloc),_=s;v()[n/4+1]=_,v()[n/4+0]=t},e.wbg.__wbg_ok_b8130e51d893123a=function(n){return f(n).ok},e.wbg.__wbg_statusText_7f6b7d97e47933bd=function(n,e){const t=y(f(e).statusText,b.__wbindgen_malloc,b.__wbindgen_realloc),_=s;v()[n/4+1]=_,v()[n/4+0]=t},e.wbg.__wbg_arrayBuffer_4c27b6f00c530232=function(){return L((function(n){return d(f(n).arrayBuffer())}),arguments)},e.wbg.__wbg_setbuffer_ead89b52e0bf1c40=function(n,e){f(n).buffer=f(e)},e.wbg.__wbg_setonended_ae460558754eae1e=function(n,e){f(n).onended=f(e)},e.wbg.__wbg_start_e330425e284a693a=function(){return L((function(n,e){f(n).start(e)}),arguments)},e.wbg.__wbg_connect_463d4300ff833991=function(){return L((function(n,e){return d(f(n).connect(f(e)))}),arguments)},e.wbg.__wbg_setTransform_2b3e439b27d4098e=function(n,e){f(n).setTransform(f(e))},e.wbg.__wbg_bindVertexArrayOES_84540c072ea96b75=function(n,e){f(n).bindVertexArrayOES(f(e))},e.wbg.__wbg_createVertexArrayOES_00a5c523e5b17eff=function(n){const e=f(n).createVertexArrayOES();return p(e)?0:d(e)},e.wbg.__wbg_deleteVertexArrayOES_98b83132b3d85825=function(n,e){f(n).deleteVertexArrayOES(f(e))},e.wbg.__wbg_instanceof_HtmlCanvasElement_97761617af6ea089=function(n){let e;try{e=f(n)instanceof HTMLCanvasElement}catch{e=!1}return e},e.wbg.__wbg_width_2f4b0cbbf1c850d9=function(n){return f(n).width},e.wbg.__wbg_setwidth_afb418d3fbf71ba7=function(n,e){f(n).width=e>>>0},e.wbg.__wbg_height_a81d308a000d91d0=function(n){return f(n).height},e.wbg.__wbg_setheight_3eb8729b59493242=function(n,e){f(n).height=e>>>0},e.wbg.__wbg_getContext_4d5e97892c1b206a=function(){return L((function(n,e,t){const _=f(n).getContext(w(e,t));return p(_)?0:d(_)}),arguments)},e.wbg.__wbg_getContext_a6ea7a8e317f182a=function(){return L((function(n,e,t,_){const r=f(n).getContext(w(e,t),f(_));return p(r)?0:d(r)}),arguments)},e.wbg.__wbg_new_83f04a482f055088=function(){return L((function(){return d(new Path2D)}),arguments)},e.wbg.__wbg_addPath_d48d7b824460f443=function(n,e,t){f(n).addPath(f(e),f(t))},e.wbg.__wbg_closePath_56f0b905ac4c8ba7=function(n){f(n).closePath()},e.wbg.__wbg_lineTo_e1466b65cf3748fc=function(n,e,t){f(n).lineTo(e,t)},e.wbg.__wbg_moveTo_ee2170c2ab195dfa=function(n,e,t){f(n).moveTo(e,t)},e.wbg.__wbg_quadraticCurveTo_4f6b64d76c1cb275=function(n,e,t,_,r){f(n).quadraticCurveTo(e,t,_,r)},e.wbg.__wbg_rect_77f14f0bd1b4a24b=function(n,e,t,_,r){f(n).rect(e,t,_,r)},e.wbg.__wbg_now_8172cd917e5eda6b=function(n){return f(n).now()},e.wbg.__wbg_key_ad4fc49423a94efa=function(n,e){const t=y(f(e).key,b.__wbindgen_malloc,b.__wbindgen_realloc),_=s;v()[n/4+1]=_,v()[n/4+0]=t},e.wbg.__wbg_code_06787cd3c7a60600=function(n,e){const t=y(f(e).code,b.__wbindgen_malloc,b.__wbindgen_realloc),_=s;v()[n/4+1]=_,v()[n/4+0]=t},e.wbg.__wbg_newwithstrandinit_05d7180788420c40=function(){return L((function(n,e,t){return d(new Request(w(n,e),f(t)))}),arguments)},e.wbg.__wbg_newwithbuffersourcesequenceandoptions_2aa7472e8169c8c5=function(){return L((function(n,e){return d(new Blob(f(n),f(e)))}),arguments)},e.wbg.__wbg_a_4c0135ca2c8ce7a5=function(n){return f(n).a},e.wbg.__wbg_seta_da6577a0a85c2778=function(n,e){f(n).a=e},e.wbg.__wbg_b_4162822a21d6c799=function(n){return f(n).b},e.wbg.__wbg_c_ebe252ddb74bc688=function(n){return f(n).c},e.wbg.__wbg_d_4f2c1b5fb69ba07f=function(n){return f(n).d},e.wbg.__wbg_setd_630cdaab51ce88c7=function(n,e){f(n).d=e},e.wbg.__wbg_e_ec8bcff5cc8d5ef9=function(n){return f(n).e},e.wbg.__wbg_f_7f94e9aa1ba636eb=function(n){return f(n).f},e.wbg.__wbg_new_23fecc9dcf2dc54d=function(){return L((function(){return d(new DOMMatrix)}),arguments)},e.wbg.__wbg_newwitharray64_a1cf121afec1f953=function(){return L((function(n,e){return d(new DOMMatrix(B(n,e)))}),arguments)},e.wbg.__wbg_body_3cb4b4042b9a632b=function(n){const e=f(n).body;return p(e)?0:d(e)},e.wbg.__wbg_createElement_976dbb84fe1661b5=function(){return L((function(n,e,t){return d(f(n).createElement(w(e,t)))}),arguments)},e.wbg.__wbg_createElementNS_1561aca8ee3693c0=function(){return L((function(n,e,t,_,r){return d(f(n).createElementNS(0===e?void 0:w(e,t),w(_,r)))}),arguments)},e.wbg.__wbg_setid_d6ea60ebd257fe07=function(n,e,t){f(n).id=w(e,t)},e.wbg.__wbg_clientWidth_999b9163952471ee=function(n){return f(n).clientWidth},e.wbg.__wbg_clientHeight_1fc8bff4acf145b1=function(n){return f(n).clientHeight},e.wbg.__wbg_querySelector_494c823e686113aa=function(){return L((function(n,e,t){const _=f(n).querySelector(w(e,t));return p(_)?0:d(_)}),arguments)},e.wbg.__wbg_releasePointerCapture_45283df79b1542f3=function(){return L((function(n,e){f(n).releasePointerCapture(e)}),arguments)},e.wbg.__wbg_setAttribute_d8436c14a59ab1af=function(){return L((function(n,e,t,_,r){f(n).setAttribute(w(e,t),w(_,r))}),arguments)},e.wbg.__wbg_setAttributeNS_cfa0d39367e3e143=function(){return L((function(n,e,t,_,r,b,c){f(n).setAttributeNS(0===e?void 0:w(e,t),w(_,r),w(b,c))}),arguments)},e.wbg.__wbg_setPointerCapture_7cc6c6e831d5dae0=function(){return L((function(n,e){f(n).setPointerCapture(e)}),arguments)},e.wbg.__wbg_remove_a8fdc690909ea566=function(n){f(n).remove()},e.wbg.__wbg_style_e9380748cee29f13=function(n){return d(f(n).style)},e.wbg.__wbg_instanceof_WebGlRenderingContext_09249c25390b881f=function(n){let e;try{e=f(n)instanceof WebGLRenderingContext}catch{e=!1}return e},e.wbg.__wbg_drawingBufferWidth_77aad8cbcc8a25ad=function(n){return f(n).drawingBufferWidth},e.wbg.__wbg_drawingBufferHeight_7035dfce71c321bd=function(n){return f(n).drawingBufferHeight},e.wbg.__wbg_bufferData_32fbc455f6b17a01=function(n,e,t,_,r){f(n).bufferData(e>>>0,O(t,_),r>>>0)},e.wbg.__wbg_texImage2D_4cb921906eba60bf=function(){return L((function(n,e,t,_,r,b,c,o,i,u,a){f(n).texImage2D(e>>>0,t,_,r,b,c,o>>>0,i>>>0,0===u?void 0:O(u,a))}),arguments)},e.wbg.__wbg_uniform1fv_3ae8a225eddaeba0=function(n,e,t,_){f(n).uniform1fv(f(e),P(t,_))},e.wbg.__wbg_uniform4fv_a513dc4d02f192d3=function(n,e,t,_){f(n).uniform4fv(f(e),P(t,_))},e.wbg.__wbg_uniformMatrix3fv_2b7de3010c8ed627=function(n,e,t,_,r){f(n).uniformMatrix3fv(f(e),0!==t,P(_,r))},e.wbg.__wbg_uniformMatrix4fv_f16e4a5553357886=function(n,e,t,_,r){f(n).uniformMatrix4fv(f(e),0!==t,P(_,r))},e.wbg.__wbg_activeTexture_02b7c73c76c2c06b=function(n,e){f(n).activeTexture(e>>>0)},e.wbg.__wbg_attachShader_f4d51147351a1906=function(n,e,t){f(n).attachShader(f(e),f(t))},e.wbg.__wbg_bindBuffer_8b5135aa633680f5=function(n,e,t){f(n).bindBuffer(e>>>0,f(t))},e.wbg.__wbg_bindFramebuffer_080d0b0cf22e1645=function(n,e,t){f(n).bindFramebuffer(e>>>0,f(t))},e.wbg.__wbg_bindRenderbuffer_6da549f066c1b8a5=function(n,e,t){f(n).bindRenderbuffer(e>>>0,f(t))},e.wbg.__wbg_bindTexture_6f1dec563e82e818=function(n,e,t){f(n).bindTexture(e>>>0,f(t))},e.wbg.__wbg_blendEquationSeparate_fa6aebc5cd0c5285=function(n,e,t){f(n).blendEquationSeparate(e>>>0,t>>>0)},e.wbg.__wbg_blendFuncSeparate_9fef8acb74d50df5=function(n,e,t,_,r){f(n).blendFuncSeparate(e>>>0,t>>>0,_>>>0,r>>>0)},e.wbg.__wbg_clear_576f67967748e95f=function(n,e){f(n).clear(e>>>0)},e.wbg.__wbg_clearColor_7489a3fbe484f2f1=function(n,e,t,_,r){f(n).clearColor(e,t,_,r)},e.wbg.__wbg_colorMask_bc13c97d0db65962=function(n,e,t,_,r){f(n).colorMask(0!==e,0!==t,0!==_,0!==r)},e.wbg.__wbg_compileShader_22b038faa1f49857=function(n,e){f(n).compileShader(f(e))},e.wbg.__wbg_createBuffer_6e747d928c9ba46d=function(n){const e=f(n).createBuffer();return p(e)?0:d(e)},e.wbg.__wbg_createProgram_1c5f8dffd1066e71=function(n){const e=f(n).createProgram();return p(e)?0:d(e)},e.wbg.__wbg_createShader_4017d9fbc36659af=function(n,e){const t=f(n).createShader(e>>>0);return p(t)?0:d(t)},e.wbg.__wbg_createTexture_4ce49e8a8c655124=function(n){const e=f(n).createTexture();return p(e)?0:d(e)},e.wbg.__wbg_deleteBuffer_6fd9bca7f8a6d9de=function(n,e){f(n).deleteBuffer(f(e))},e.wbg.__wbg_deleteTexture_5c40169772519141=function(n,e){f(n).deleteTexture(f(e))},e.wbg.__wbg_disable_6835d16c2cd3fa26=function(n,e){f(n).disable(e>>>0)},e.wbg.__wbg_disableVertexAttribArray_ab474d273ff59265=function(n,e){f(n).disableVertexAttribArray(e>>>0)},e.wbg.__wbg_drawElements_e09dbef58c8f099a=function(n,e,t,_,r){f(n).drawElements(e>>>0,t,_>>>0,r)},e.wbg.__wbg_enable_fc393941ac400f72=function(n,e){f(n).enable(e>>>0)},e.wbg.__wbg_enableVertexAttribArray_3d21f4936ad4a378=function(n,e){f(n).enableVertexAttribArray(e>>>0)},e.wbg.__wbg_getAttribLocation_fcbe16b765cb1de0=function(n,e,t,_){return f(n).getAttribLocation(f(e),w(t,_))},e.wbg.__wbg_getExtension_d270fbbd8529e85f=function(){return L((function(n,e,t){const _=f(n).getExtension(w(e,t));return p(_)?0:d(_)}),arguments)},e.wbg.__wbg_getParameter_585a5b83c595ada8=function(){return L((function(n,e){return d(f(n).getParameter(e>>>0))}),arguments)},e.wbg.__wbg_getProgramInfoLog_e47d5073d57fb18d=function(n,e,t){const _=f(e).getProgramInfoLog(f(t));var r=p(_)?0:y(_,b.__wbindgen_malloc,b.__wbindgen_realloc),c=s;v()[n/4+1]=c,v()[n/4+0]=r},e.wbg.__wbg_getProgramParameter_eaf768a9b399b7cf=function(n,e,t){return d(f(n).getProgramParameter(f(e),t>>>0))},e.wbg.__wbg_getShaderInfoLog_ec7e5b959e47645b=function(n,e,t){const _=f(e).getShaderInfoLog(f(t));var r=p(_)?0:y(_,b.__wbindgen_malloc,b.__wbindgen_realloc),c=s;v()[n/4+1]=c,v()[n/4+0]=r},e.wbg.__wbg_getUniformLocation_8e9cc276a231ddcd=function(n,e,t,_){const r=f(n).getUniformLocation(f(e),w(t,_));return p(r)?0:d(r)},e.wbg.__wbg_linkProgram_25cda5f9318ea316=function(n,e){f(n).linkProgram(f(e))},e.wbg.__wbg_pixelStorei_bee1e2da4cb1115b=function(n,e,t){f(n).pixelStorei(e>>>0,t)},e.wbg.__wbg_shaderSource_a0001b8eab5d44f4=function(n,e,t,_){f(n).shaderSource(f(e),w(t,_))},e.wbg.__wbg_stencilFunc_b72fb7b1cdf11693=function(n,e,t,_){f(n).stencilFunc(e>>>0,t,_>>>0)},e.wbg.__wbg_stencilMask_00541859199befd2=function(n,e){f(n).stencilMask(e>>>0)},e.wbg.__wbg_stencilOp_3db65a0f2e42c622=function(n,e,t,_){f(n).stencilOp(e>>>0,t>>>0,_>>>0)},e.wbg.__wbg_texParameteri_1b210b807f1ea723=function(n,e,t,_){f(n).texParameteri(e>>>0,t>>>0,_)},e.wbg.__wbg_uniform1f_f60e1072e28b8c49=function(n,e,t){f(n).uniform1f(f(e),t)},e.wbg.__wbg_uniform1i_50124a48de1da66b=function(n,e,t){f(n).uniform1i(f(e),t)},e.wbg.__wbg_useProgram_156511a425feb519=function(n,e){f(n).useProgram(f(e))},e.wbg.__wbg_vertexAttribPointer_63d2aef49627302b=function(n,e,t,_,r,b,c){f(n).vertexAttribPointer(e>>>0,t,_>>>0,0!==r,b,c)},e.wbg.__wbg_viewport_a93f3881c4202d5e=function(n,e,t,_,r){f(n).viewport(e,t,_,r)},e.wbg.__wbg_currentTarget_57b4543ab256dfe7=function(n){const e=f(n).currentTarget;return p(e)?0:d(e)},e.wbg.__wbg_preventDefault_3209279b490de583=function(n){f(n).preventDefault()},e.wbg.__wbg_addEventListener_cbe4c6f619b032f3=function(){return L((function(n,e,t,_){f(n).addEventListener(w(e,t),f(_))}),arguments)},e.wbg.__wbg_addEventListener_1fc744729ac6dc27=function(){return L((function(n,e,t,_,r){f(n).addEventListener(w(e,t),f(_),f(r))}),arguments)},e.wbg.__wbg_addEventListener_178e4d0f8a009cd3=function(){return L((function(n,e,t,_,r){f(n).addEventListener(w(e,t),f(_),0!==r)}),arguments)},e.wbg.__wbg_removeEventListener_dd20475efce70084=function(){return L((function(n,e,t,_){f(n).removeEventListener(w(e,t),f(_))}),arguments)},e.wbg.__wbg_removeEventListener_b10f1a66647f3aa0=function(){return L((function(n,e,t,_,r){f(n).removeEventListener(w(e,t),f(_),0!==r)}),arguments)},e.wbg.__wbg_data_f13601b88960b7eb=function(n,e){const t=function(n,e){const t=e(1*n.length);return g().set(n,t/1),s=n.length,t}(f(e).data,b.__wbindgen_malloc),_=s;v()[n/4+1]=_,v()[n/4+0]=t},e.wbg.__wbg_newwithu8clampedarray_ec4b349a9ae3eaf6=function(){return L((function(n,e,t){return d(new ImageData(D(n,e),t>>>0))}),arguments)},e.wbg.__wbg_baseURI_24f83c3784dbdd7a=function(){return L((function(n,e){const t=f(e).baseURI;var _=p(t)?0:y(t,b.__wbindgen_malloc,b.__wbindgen_realloc),r=s;v()[n/4+1]=r,v()[n/4+0]=_}),arguments)},e.wbg.__wbg_appendChild_e513ef0e5098dfdd=function(){return L((function(n,e){return d(f(n).appendChild(f(e)))}),arguments)},e.wbg.__wbg_debug_f15cb542ea509609=function(n){console.debug(f(n))},e.wbg.__wbg_error_ef9a0be47931175f=function(n){console.error(f(n))},e.wbg.__wbg_info_2874fdd5393f35ce=function(n){console.info(f(n))},e.wbg.__wbg_log_4b5638ad60bdc54a=function(n){console.log(f(n))},e.wbg.__wbg_warn_58110c4a199df084=function(n){console.warn(f(n))},e.wbg.__wbg_destination_df4e9893e562390a=function(n){return d(f(n).destination)},e.wbg.__wbg_sampleRate_30180c0ccae55e98=function(n){return f(n).sampleRate},e.wbg.__wbg_currentTime_80316e838e7d1028=function(n){return f(n).currentTime},e.wbg.__wbg_new_208829b3b7d06214=function(){return L((function(){return d(new r)}),arguments)},e.wbg.__wbg_close_7d5aa2babb9d8fc2=function(){return L((function(n){return d(f(n).close())}),arguments)},e.wbg.__wbg_suspend_8c72404b7450feb3=function(){return L((function(n){return d(f(n).suspend())}),arguments)},e.wbg.__wbg_createBuffer_47ef089f86b99318=function(){return L((function(n,e,t,_){return d(f(n).createBuffer(e>>>0,t>>>0,_))}),arguments)},e.wbg.__wbg_createBufferSource_f06449934aee7f6f=function(){return L((function(n){return d(f(n).createBufferSource())}),arguments)},e.wbg.__wbg_resume_244684c4c6bb49fa=function(){return L((function(n){return d(f(n).resume())}),arguments)},e.wbg.__wbg_setProperty_e489dfd8c0a6bffc=function(){return L((function(n,e,t,_,r){f(n).setProperty(w(e,t),w(_,r))}),arguments)},e.wbg.__wbg_protocol_70cc72a5ff78dc5f=function(){return L((function(n,e){const t=y(f(e).protocol,b.__wbindgen_malloc,b.__wbindgen_realloc),_=s;v()[n/4+1]=_,v()[n/4+0]=t}),arguments)},e.wbg.__wbg_assign_4e2847f30bc3fef3=function(){return L((function(n,e,t){f(n).assign(w(e,t))}),arguments)},e.wbg.__wbg_get_5e2f6c6d27821e3f=function(){return L((function(n,e,t,_){const r=f(e)[w(t,_)];var c=p(r)?0:y(r,b.__wbindgen_malloc,b.__wbindgen_realloc),o=s;v()[n/4+1]=o,v()[n/4+0]=c}),arguments)},e.wbg.__wbg_set_0a2938f1ef0852cf=function(){return L((function(n,e,t,_,r){f(n)[w(e,t)]=w(_,r)}),arguments)},e.wbg.__wbg_delete_357ce721e4047d75=function(){return L((function(n,e,t){delete f(n)[w(e,t)]}),arguments)},e.wbg.__wbg_instanceof_CanvasRenderingContext2d_ff80c06d296e3622=function(n){let e;try{e=f(n)instanceof CanvasRenderingContext2D}catch{e=!1}return e},e.wbg.__wbg_setglobalAlpha_1ab443aee9cf0c66=function(n,e){f(n).globalAlpha=e},e.wbg.__wbg_setglobalCompositeOperation_ab45d05cd8734f9f=function(){return L((function(n,e,t){f(n).globalCompositeOperation=w(e,t)}),arguments)},e.wbg.__wbg_setstrokeStyle_899ea3720dae323b=function(n,e){f(n).strokeStyle=f(e)},e.wbg.__wbg_setfillStyle_53ccf2a9886c1c4d=function(n,e){f(n).fillStyle=f(e)},e.wbg.__wbg_setfilter_b73fcc09bfca8f6d=function(n,e,t){f(n).filter=w(e,t)},e.wbg.__wbg_setimageSmoothingEnabled_495089fb53e4bd73=function(n,e){f(n).imageSmoothingEnabled=0!==e},e.wbg.__wbg_setlineWidth_64004648773fed7a=function(n,e){f(n).lineWidth=e},e.wbg.__wbg_setlineCap_81847480524aaabe=function(n,e,t){f(n).lineCap=w(e,t)},e.wbg.__wbg_setlineJoin_460906fc18195c47=function(n,e,t){f(n).lineJoin=w(e,t)},e.wbg.__wbg_setmiterLimit_913fefb6fe0e896a=function(n,e){f(n).miterLimit=e},e.wbg.__wbg_drawImage_2dbd3fe01f39300b=function(){return L((function(n,e,t,_){f(n).drawImage(f(e),t,_)}),arguments)},e.wbg.__wbg_clip_4be1e59aa39a8e8e=function(n,e,t){f(n).clip(f(e),i(t))},e.wbg.__wbg_fill_7da29b528956b8ba=function(n,e,t){f(n).fill(f(e),i(t))},e.wbg.__wbg_stroke_74fc3534f240b639=function(n,e){f(n).stroke(f(e))},e.wbg.__wbg_createLinearGradient_acec41a619c23be4=function(n,e,t,_,r){return d(f(n).createLinearGradient(e,t,_,r))},e.wbg.__wbg_createPattern_bd15b1b47a033275=function(){return L((function(n,e,t,_){const r=f(n).createPattern(f(e),w(t,_));return p(r)?0:d(r)}),arguments)},e.wbg.__wbg_createRadialGradient_ddeb1acd6889300f=function(){return L((function(n,e,t,_,r,b,c){return d(f(n).createRadialGradient(e,t,_,r,b,c))}),arguments)},e.wbg.__wbg_getImageData_1d31a94ff8a4a1d7=function(){return L((function(n,e,t,_,r){return d(f(n).getImageData(e,t,_,r))}),arguments)},e.wbg.__wbg_putImageData_23e0cc41d4fabcde=function(){return L((function(n,e,t,_){f(n).putImageData(f(e),t,_)}),arguments)},e.wbg.__wbg_clearRect_b3895f56c5ecd19d=function(n,e,t,_,r){f(n).clearRect(e,t,_,r)},e.wbg.__wbg_fillRect_c7a19e13c5242507=function(n,e,t,_,r){f(n).fillRect(e,t,_,r)},e.wbg.__wbg_restore_556d7c38c007b3fe=function(n){f(n).restore()},e.wbg.__wbg_save_a9bb370fb49c5df7=function(n){f(n).save()},e.wbg.__wbg_resetTransform_14d523baff625ade=function(){return L((function(n){f(n).resetTransform()}),arguments)},e.wbg.__wbg_setTransform_f7cb1550b95885ee=function(){return L((function(n,e,t,_,r,b,c){f(n).setTransform(e,t,_,r,b,c)}),arguments)},e.wbg.__wbg_transform_ddd3e67b70078921=function(){return L((function(n,e,t,_,r,b,c){f(n).transform(e,t,_,r,b,c)}),arguments)},e.wbg.__wbg_get_57245cc7d7c7619d=function(n,e){return d(f(n)[e>>>0])},e.wbg.__wbg_length_6e3bbe7c8bd4dbd8=function(n){return f(n).length},e.wbg.__wbg_new_1d9a920c6bfc44a8=function(){return d(new Array)},e.wbg.__wbg_newnoargs_b5b063fc6c2f0376=function(n,e){return d(new Function(w(n,e)))},e.wbg.__wbg_next_aaef7c8aa5e212ac=function(){return L((function(n){return d(f(n).next())}),arguments)},e.wbg.__wbg_done_1b73b0672e15f234=function(n){return f(n).done},e.wbg.__wbg_value_1ccc36bc03462d71=function(n){return d(f(n).value)},e.wbg.__wbg_get_765201544a2b6869=function(){return L((function(n,e){return d(Reflect.get(f(n),f(e)))}),arguments)},e.wbg.__wbg_call_97ae9d8645dc388b=function(){return L((function(n,e){return d(f(n).call(f(e)))}),arguments)},e.wbg.__wbg_new_0b9bfdd97583284e=function(){return d(new Object)},e.wbg.__wbg_self_6d479506f72c6a71=function(){return L((function(){return d(self.self)}),arguments)},e.wbg.__wbg_window_f2557cc78490aceb=function(){return L((function(){return d(window.window)}),arguments)},e.wbg.__wbg_globalThis_7f206bda628d5286=function(){return L((function(){return d(globalThis.globalThis)}),arguments)},e.wbg.__wbg_global_ba75c50d1cf384f4=function(){return L((function(){return d(t.g.global)}),arguments)},e.wbg.__wbg_set_a68214f35c417fa9=function(n,e,t){f(n)[e>>>0]=i(t)},e.wbg.__wbg_isArray_27c46c67f498e15d=function(n){return Array.isArray(f(n))},e.wbg.__wbg_of_2ba33496c07f1349=function(n,e){return d(Array.of(f(n),f(e)))},e.wbg.__wbg_push_740e4b286702d964=function(n,e){return f(n).push(f(e))},e.wbg.__wbg_instanceof_ArrayBuffer_e5e48f4762c5610b=function(n){let e;try{e=f(n)instanceof ArrayBuffer}catch{e=!1}return e},e.wbg.__wbg_new_9427a0d83657ea80=function(n){return d(new ArrayBuffer(n>>>0))},e.wbg.__wbg_values_e42671acbf11ec04=function(n){return d(f(n).values())},e.wbg.__wbg_apply_22a3220d244124da=function(){return L((function(n,e,t){return d(f(n).apply(f(e),f(t)))}),arguments)},e.wbg.__wbg_call_168da88779e35f61=function(){return L((function(n,e,t){return d(f(n).call(f(e),f(t)))}),arguments)},e.wbg.__wbg_isSafeInteger_dfa0593e8d7ac35a=function(n){return Number.isSafeInteger(f(n))},e.wbg.__wbg_getTime_cb82adb2556ed13e=function(n){return f(n).getTime()},e.wbg.__wbg_getTimezoneOffset_89bd4275e1ca8341=function(n){return f(n).getTimezoneOffset()},e.wbg.__wbg_new0_a57059d72c5b7aee=function(){return d(new Date)},e.wbg.__wbg_instanceof_Object_595a1007518cbea3=function(n){let e;try{e=f(n)instanceof Object}catch{e=!1}return e},e.wbg.__wbg_entries_65a76a413fc91037=function(n){return d(Object.entries(f(n)))},e.wbg.__wbg_fromEntries_7abdcb92016eb4b9=function(){return L((function(n){return d(Object.fromEntries(f(n)))}),arguments)},e.wbg.__wbg_is_40a66842732708e7=function(n,e){return Object.is(f(n),f(e))},e.wbg.__wbg_new_9962f939219f1820=function(n,e){try{var t={a:n,b:e};const _=new Promise(((n,e)=>{const _=t.a;t.a=0;try{return function(n,e,t,_){b.wasm_bindgen__convert__closures__invoke2_mut__h0018fa9e0dbd6f11(n,e,d(t),d(_))}(_,t.b,n,e)}finally{t.a=_}}));return d(_)}finally{t.a=t.b=0}},e.wbg.__wbg_resolve_99fe17964f31ffc0=function(n){return d(Promise.resolve(f(n)))},e.wbg.__wbg_then_11f7a54d67b4bfad=function(n,e){return d(f(n).then(f(e)))},e.wbg.__wbg_then_cedad20fbbd9418a=function(n,e,t){return d(f(n).then(f(e),f(t)))},e.wbg.__wbg_buffer_3f3d764d4747d564=function(n){return d(f(n).buffer)},e.wbg.__wbg_new_8c3f0052272a457a=function(n){return d(new Uint8Array(f(n)))},e.wbg.__wbg_set_83db9690f9353e79=function(n,e,t){f(n).set(f(e),t>>>0)},e.wbg.__wbg_length_9e1ae1900cb0fbd5=function(n){return f(n).length},e.wbg.__wbg_instanceof_Uint8Array_971eeda69eb75003=function(n){let e;try{e=f(n)instanceof Uint8Array}catch{e=!1}return e},e.wbg.__wbg_newwithlength_f5933855e4f48a19=function(n){return d(new Uint8Array(n>>>0))},e.wbg.__wbg_fill_c9a2401d683fafbb=function(n,e,t,_){return d(f(n).fill(e,t>>>0,_>>>0))},e.wbg.__wbg_subarray_58ad4efbb5bcb886=function(n,e,t){return d(f(n).subarray(e>>>0,t>>>0))},e.wbg.__wbg_ownKeys_bf24e1178641d9f0=function(){return L((function(n){return d(Reflect.ownKeys(f(n)))}),arguments)},e.wbg.__wbg_set_bf3f89b92d5a34bf=function(){return L((function(n,e,t){return Reflect.set(f(n),f(e),f(t))}),arguments)},e.wbg.__wbindgen_bigint_get_as_i64=function(n,e){const t=f(e),_="bigint"==typeof t?t:void 0;(0===S.byteLength&&(S=new BigInt64Array(b.memory.buffer)),S)[n/8+1]=p(_)?0n:_,v()[n/4+0]=!p(_)},e.wbg.__wbindgen_debug_string=function(n,e){const t=y(C(f(e)),b.__wbindgen_malloc,b.__wbindgen_realloc),_=s;v()[n/4+1]=_,v()[n/4+0]=t},e.wbg.__wbindgen_throw=function(n,e){throw new Error(w(n,e))},e.wbg.__wbindgen_memory=function(){return d(b.memory)},e.wbg.__wbindgen_closure_wrapper821=function(n,e,t){return d(R(n,e,367,T))},e.wbg.__wbindgen_closure_wrapper822=function(n,e,t){return d(R(n,e,367,E))},e.wbg.__wbindgen_closure_wrapper824=function(n,e,t){return d(R(n,e,367,F))},e.wbg.__wbindgen_closure_wrapper826=function(n,e,t){return d(R(n,e,367,E))},e.wbg.__wbindgen_closure_wrapper829=function(n,e,t){return d(R(n,e,367,E))},e.wbg.__wbindgen_closure_wrapper831=function(n,e,t){return d(R(n,e,367,E))},e.wbg.__wbindgen_closure_wrapper6948=function(n,e,t){return d(R(n,e,2918,k))},e}function j(n,e){return b=n.exports,G.__wbindgen_wasm_module=e,S=new BigInt64Array,M=new Float32Array,A=new Float64Array,h=new Int32Array,I=new Uint32Array,a=new Uint8Array,W=new Uint8ClampedArray,b}function q(n){const e=V();return n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n)),j(new WebAssembly.Instance(n,e),n)}async function G(n){void 0===n&&(n=new URL(t(931),t.b));const e=V();("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:_,module:r}=await async function(n,e){if("function"==typeof Response&&n instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,e)}catch(e){if("application/wasm"==n.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}const t=await n.arrayBuffer();return await WebAssembly.instantiate(t,e)}{const t=await WebAssembly.instantiate(n,e);return t instanceof WebAssembly.Instance?{instance:t,module:n}:t}}(await n,e);return j(_,r)}const H=G}}]);
|
|
2
|
+
//# sourceMappingURL=core.ruffle.93de25ca9a00e07a2eca.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkruffle_selfhosted=self.webpackChunkruffle_selfhosted||[]).push([[966],{762:(e,n,t)=>{function _(e,n){const t=e.length,_=e.getChannelData(0),r=e.getChannelData(1);let b=0,c=0;for(;c<t;)_[c]=n[b],r[c]=n[b+1],c++,b+=2}t.d(n,{tM:()=>_})},966:(e,n,t)=>{t.r(n),t.d(n,{Ruffle:()=>D,default:()=>j,initSync:()=>V});var _=t(762);e=t.hmd(e);const r="undefined"!=typeof AudioContext?AudioContext:"undefined"!=typeof webkitAudioContext?webkitAudioContext:void 0;let b;const c=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});c.decode();let f=new Uint8Array;function o(){return 0===f.byteLength&&(f=new Uint8Array(b.memory.buffer)),f}function i(e,n){return c.decode(o().subarray(e,e+n))}let u=0;const a=new TextEncoder("utf-8"),g="function"==typeof a.encodeInto?function(e,n){return a.encodeInto(e,n)}:function(e,n){const t=a.encode(e);return n.set(t),{read:e.length,written:t.length}};function w(e,n,t){if(void 0===t){const t=a.encode(e),_=n(t.length);return o().subarray(_,_+t.length).set(t),u=t.length,_}let _=e.length,r=n(_);const b=o();let c=0;for(;c<_;c++){const n=e.charCodeAt(c);if(n>127)break;b[r+c]=n}if(c!==_){0!==c&&(e=e.slice(c)),r=t(r,_,_=c+3*e.length);const n=o().subarray(r+c,r+_);c+=g(e,n).written}return u=c,r}function d(e){return null==e}let s=new Int32Array;function l(){return 0===s.byteLength&&(s=new Int32Array(b.memory.buffer)),s}let m=new Float64Array;function y(){return 0===m.byteLength&&(m=new Float64Array(b.memory.buffer)),m}let p=new BigInt64Array;function h(e){const n=typeof e;if("number"==n||"boolean"==n||null==e)return`${e}`;if("string"==n)return`"${e}"`;if("symbol"==n){const n=e.description;return null==n?"Symbol":`Symbol(${n})`}if("function"==n){const n=e.name;return"string"==typeof n&&n.length>0?`Function(${n})`:"Function"}if(Array.isArray(e)){const n=e.length;let t="[";n>0&&(t+=h(e[0]));for(let _=1;_<n;_++)t+=", "+h(e[_]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(e));let _;if(!(t.length>1))return toString.call(e);if(_=t[1],"Object"==_)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:_}function x(e,n,t,_){const r={a:e,b:n,cnt:1,dtor:t},c=(...e)=>{r.cnt++;const n=r.a;r.a=0;try{return _(n,r.b,...e)}finally{0==--r.cnt?b.__wbindgen_export_3.get(r.dtor)(n,r.b):r.a=n}};return c.original=r,c}function v(e,n){b._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h424e4470cf7c7a9d(e,n)}function A(e,n,t){b.closure366_externref_shim(e,n,t)}function S(e,n,t){b._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb73bf7feb23ce812(e,n,t)}function C(e,n,t){b.closure2917_externref_shim(e,n,t)}let R=new Float32Array;function T(e,n){return(0===R.byteLength&&(R=new Float32Array(b.memory.buffer)),R).subarray(e/4,e/4+n)}function E(e){const n=b.__externref_table_alloc();return b.__wbindgen_export_2.set(n,e),n}function F(e,n){try{return e.apply(this,n)}catch(e){const n=E(e);b.__wbindgen_exn_store(n)}}function P(e){const n=b.__wbindgen_export_2.get(e);return b.__externref_table_dealloc(e),n}let k=new Uint32Array;function M(e,n){return o().subarray(e/1,e/1+n)}function L(e,n){return y().subarray(e/8,e/8+n)}let I=new Uint8ClampedArray;function O(e,n){return(0===I.byteLength&&(I=new Uint8ClampedArray(b.memory.buffer)),I).subarray(e/1,e/1+n)}function B(e){return()=>{throw new Error(`${e} is not defined`)}}class D{static __wrap(e){const n=Object.create(D.prototype);return n.ptr=e,n}__destroy_into_raw(){const e=this.ptr;return this.ptr=0,e}free(){const e=this.__destroy_into_raw();b.__wbg_ruffle_free(e)}constructor(e,n,t){return b.ruffle_new(e,n,t)}stream_from(e,n){try{const _=b.__wbindgen_add_to_stack_pointer(-16),r=w(e,b.__wbindgen_malloc,b.__wbindgen_realloc),c=u;b.ruffle_stream_from(_,this.ptr,r,c,n);var t=l()[_/4+0];if(l()[_/4+1])throw P(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}load_data(e,n){try{const _=b.__wbindgen_add_to_stack_pointer(-16);b.ruffle_load_data(_,this.ptr,e,n);var t=l()[_/4+0];if(l()[_/4+1])throw P(t)}finally{b.__wbindgen_add_to_stack_pointer(16)}}play(){b.ruffle_play(this.ptr)}pause(){b.ruffle_pause(this.ptr)}is_playing(){return 0!==b.ruffle_is_playing(this.ptr)}volume(){return b.ruffle_volume(this.ptr)}set_volume(e){b.ruffle_set_volume(this.ptr,e)}renderer_name(){return b.ruffle_renderer_name(this.ptr)}prepare_context_menu(){return b.ruffle_prepare_context_menu(this.ptr)}run_context_menu_callback(e){b.ruffle_run_context_menu_callback(this.ptr,e)}set_fullscreen(e){b.ruffle_set_fullscreen(this.ptr,e)}clear_custom_menu_items(){b.ruffle_clear_custom_menu_items(this.ptr)}destroy(){b.ruffle_destroy(this.ptr)}call_exposed_callback(e,n){const t=w(e,b.__wbindgen_malloc,b.__wbindgen_realloc),_=u,r=function(e,n){const t=n(4*e.length),_=(0===k.byteLength&&(k=new Uint32Array(b.memory.buffer)),k);for(let n=0;n<e.length;n++)_[t/4+n]=E(e[n]);return u=e.length,t}(n,b.__wbindgen_malloc),c=u;return b.ruffle_call_exposed_callback(this.ptr,t,_,r,c)}set_trace_observer(e){b.ruffle_set_trace_observer(this.ptr,e)}audio_context(){return b.ruffle_audio_context(this.ptr)}static is_wasm_simd_used(){return 0!==b.ruffle_is_wasm_simd_used()}}function W(){const n={wbg:{}};return n.wbg.__wbindgen_is_function=function(e){return"function"==typeof e},n.wbg.__wbindgen_error_new=function(e,n){return new Error(i(e,n))},n.wbg.__wbindgen_string_new=function(e,n){return i(e,n)},n.wbg.__wbg_ruffle_new=function(e){return D.__wrap(e)},n.wbg.__wbindgen_cb_drop=function(e){const n=e.original;return 1==n.cnt--&&(n.a=0,!0)},n.wbg.__wbindgen_boolean_get=function(e){return"boolean"==typeof e?e?1:0:2},n.wbg.__wbg_copyToAudioBufferInterleaved_7975d0071e3cdc32=function(e,n,t){(0,_.tM)(e,T(n,t))},n.wbg.__wbg_setFullscreen_62846f9d4b5f6f48=function(){return F((function(e,n){e.setFullscreen(0!==n)}),arguments)},n.wbg.__wbindgen_string_get=function(e,n){const t="string"==typeof n?n:void 0;var _=d(t)?0:w(t,b.__wbindgen_malloc,b.__wbindgen_realloc),r=u;l()[e/4+1]=r,l()[e/4+0]=_},n.wbg.__wbg_displayUnsupportedMessage_cb34e3c4ccb484e1=function(e){e.displayUnsupportedMessage()},n.wbg.__wbg_displayRootMovieDownloadFailedMessage_c90a7f0f0b73e4df=function(e){e.displayRootMovieDownloadFailedMessage()},n.wbg.__wbg_displayMessage_e81323a872d4e00a=function(e,n,t){e.displayMessage(i(n,t))},n.wbg.__wbg_setMetadata_11d904a2018b04c1=function(e,n){e.setMetadata(n)},n.wbg.__wbg_onCallbackAvailable_44f6acac6389d11d=function(e,n,t){e.onCallbackAvailable(i(n,t))},n.wbg.__wbg_onFSCommand_b13bfd8f38fc3115=function(){return F((function(e,n,t,_,r){return e.onFSCommand(i(n,t),i(_,r))}),arguments)},n.wbg.__wbindgen_number_get=function(e,n){const t="number"==typeof n?n:void 0;y()[e/8+1]=d(t)?0:t,l()[e/4+0]=!d(t)},n.wbg.__wbindgen_number_new=function(e){return e},n.wbg.__wbg_new_f9bb493369a83c12=function(e,n){return new Error(i(e,n))},n.wbg.__wbg_panic_cc9551d881f701ae=function(e,n){e.panic(n)},n.wbg.__wbindgen_is_undefined=function(e){return void 0===e},n.wbg.__wbindgen_in=function(e,n){return e in n},n.wbg.__wbindgen_is_bigint=function(e){return"bigint"==typeof e},n.wbg.__wbindgen_bigint_from_u64=function(e){return BigInt.asUintN(64,e)},n.wbg.__wbindgen_jsval_eq=function(e,n){return e===n},n.wbg.__wbindgen_is_string=function(e){return"string"==typeof e},n.wbg.__wbindgen_is_object=function(e){return"object"==typeof e&&null!==e},n.wbg.__wbg_new_abda76e883ba8a5f=function(){return new Error},n.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const t=w(n.stack,b.__wbindgen_malloc,b.__wbindgen_realloc),_=u;l()[e/4+1]=_,l()[e/4+0]=t},n.wbg.__wbg_error_f851667af71bcfc6=function(e,n){try{console.error(i(e,n))}finally{b.__wbindgen_free(e,n)}},n.wbg.__wbindgen_jsval_loose_eq=function(e,n){return e==n},n.wbg.__wbg_String_91fba7ded13ba54c=function(e,n){const t=w(String(n),b.__wbindgen_malloc,b.__wbindgen_realloc),_=u;l()[e/4+1]=_,l()[e/4+0]=t},n.wbg.__wbg_getwithrefkey_15c62c2b8546208d=function(e,n){return e[n]},n.wbg.__wbg_set_20cbc34131e76824=function(e,n,t){e[n]=t},n.wbg.__wbg_randomFillSync_6894564c2c334c42=function(){return F((function(e,n,t){e.randomFillSync(M(n,t))}),arguments)},n.wbg.__wbg_getRandomValues_805f1c3d65988a5a=function(){return F((function(e,n){e.getRandomValues(n)}),arguments)},n.wbg.__wbg_crypto_e1d53a1d73fb10b8=function(e){return e.crypto},n.wbg.__wbg_process_038c26bf42b093f8=function(e){return e.process},n.wbg.__wbg_versions_ab37218d2f0b24a8=function(e){return e.versions},n.wbg.__wbg_node_080f4b19d15bc1fe=function(e){return e.node},n.wbg.__wbg_msCrypto_6e7d3e1f92610cbb=function(e){return e.msCrypto},n.wbg.__wbg_require_78a3dcfbdba9cbce=function(){return F((function(){return e.require}),arguments)},n.wbg.__wbg_instanceof_WebGl2RenderingContext_fcfa91cd777063f3=function(e){let n;try{n=e instanceof WebGL2RenderingContext}catch{n=!1}return n},n.wbg.__wbg_bindVertexArray_9d12800e272184b0=function(e,n){e.bindVertexArray(n)},n.wbg.__wbg_blitFramebuffer_cdc1ebf043046b70=function(e,n,t,_,r,b,c,f,o,i,u){e.blitFramebuffer(n,t,_,r,b,c,f,o,i>>>0,u>>>0)},n.wbg.__wbg_createVertexArray_8467a75e68fec199=function(e){const n=e.createVertexArray();return d(n)?0:E(n)},n.wbg.__wbg_deleteVertexArray_00194a31d79df7e5=function(e,n){e.deleteVertexArray(n)},n.wbg.__wbg_renderbufferStorageMultisample_3e76453eed60554b=function(e,n,t,_,r,b){e.renderbufferStorageMultisample(n>>>0,t,_>>>0,r,b)},n.wbg.__wbg_texImage2D_0b8061aa6eecc96a=function(){return F((function(e,n,t,_,r,b,c,f,o,i,u){e.texImage2D(n>>>0,t,_,r,b,c,f>>>0,o>>>0,0===i?void 0:M(i,u))}),arguments)},n.wbg.__wbg_bindFramebuffer_5c01742edd5d843a=function(e,n,t){e.bindFramebuffer(n>>>0,t)},n.wbg.__wbg_bindRenderbuffer_f66dee160b94e5ef=function(e,n,t){e.bindRenderbuffer(n>>>0,t)},n.wbg.__wbg_bindTexture_ae9620ea4a6ffb97=function(e,n,t){e.bindTexture(n>>>0,t)},n.wbg.__wbg_createFramebuffer_d5f3985ce3652661=function(e){const n=e.createFramebuffer();return d(n)?0:E(n)},n.wbg.__wbg_createRenderbuffer_531167a301a60e27=function(e){const n=e.createRenderbuffer();return d(n)?0:E(n)},n.wbg.__wbg_createTexture_269f67d411bdc4dc=function(e){const n=e.createTexture();return d(n)?0:E(n)},n.wbg.__wbg_deleteFramebuffer_d7551444a28f508e=function(e,n){e.deleteFramebuffer(n)},n.wbg.__wbg_deleteRenderbuffer_58c540348fb8606d=function(e,n){e.deleteRenderbuffer(n)},n.wbg.__wbg_deleteTexture_68a539339fd87792=function(e,n){e.deleteTexture(n)},n.wbg.__wbg_framebufferRenderbuffer_963b305ac8cb6fd6=function(e,n,t,_,r){e.framebufferRenderbuffer(n>>>0,t>>>0,_>>>0,r)},n.wbg.__wbg_framebufferTexture2D_4b810902dffa1ef3=function(e,n,t,_,r,b){e.framebufferTexture2D(n>>>0,t>>>0,_>>>0,r,b)},n.wbg.__wbg_getError_8de2be43ffb2c4e0=function(e){return e.getError()},n.wbg.__wbg_getParameter_4e2ccc745690476a=function(){return F((function(e,n){return e.getParameter(n>>>0)}),arguments)},n.wbg.__wbg_texParameteri_21fd6b6b394882c9=function(e,n,t,_){e.texParameteri(n>>>0,t>>>0,_)},n.wbg.__wbg_instanceof_Window_acc97ff9f5d2c7b4=function(e){let n;try{n=e instanceof Window}catch{n=!1}return n},n.wbg.__wbg_document_3ead31dbcad65886=function(e){const n=e.document;return d(n)?0:E(n)},n.wbg.__wbg_location_8cc8ccf27e342c0a=function(e){return e.location},n.wbg.__wbg_devicePixelRatio_476ddb014eb2520a=function(e){return e.devicePixelRatio},n.wbg.__wbg_localStorage_753b6d15a844c3dc=function(){return F((function(e){const n=e.localStorage;return d(n)?0:E(n)}),arguments)},n.wbg.__wbg_cancelAnimationFrame_679ac3913d7f9b34=function(){return F((function(e,n){e.cancelAnimationFrame(n)}),arguments)},n.wbg.__wbg_focus_6335df8e57f2356d=function(){return F((function(e){e.focus()}),arguments)},n.wbg.__wbg_open_8b947bc096f5bb21=function(){return F((function(e,n,t,_,r){const b=e.open(i(n,t),i(_,r));return d(b)?0:E(b)}),arguments)},n.wbg.__wbg_requestAnimationFrame_4181656476a7d86c=function(){return F((function(e,n){return e.requestAnimationFrame(n)}),arguments)},n.wbg.__wbg_fetch_0fe04905cccfc2aa=function(e,n){return e.fetch(n)},n.wbg.__wbg_addColorStop_fd22191e62f12621=function(){return F((function(e,n,t,_){e.addColorStop(n,i(t,_))}),arguments)},n.wbg.__wbg_inverse_81ff934e39851558=function(e){return e.inverse()},n.wbg.__wbg_instanceof_HtmlFormElement_1c489ff7e99e43d3=function(e){let n;try{n=e instanceof HTMLFormElement}catch{n=!1}return n},n.wbg.__wbg_submit_119222e1a26af942=function(){return F((function(e){e.submit()}),arguments)},n.wbg.__wbg_deltaY_a5393ec7ac0f7bb4=function(e){return e.deltaY},n.wbg.__wbg_deltaMode_a90be314f5c676f1=function(e){return e.deltaMode},n.wbg.__wbg_offsetX_8891849b36542d53=function(e){return e.offsetX},n.wbg.__wbg_offsetY_1f52082687af467b=function(e){return e.offsetY},n.wbg.__wbg_button_2bb5dc0116d6b89b=function(e){return e.button},n.wbg.__wbg_pointerId_18be034781db46f3=function(e){return e.pointerId},n.wbg.__wbg_instanceof_Response_eaa426220848a39e=function(e){let n;try{n=e instanceof Response}catch{n=!1}return n},n.wbg.__wbg_url_74285ddf2747cb3d=function(e,n){const t=w(n.url,b.__wbindgen_malloc,b.__wbindgen_realloc),_=u;l()[e/4+1]=_,l()[e/4+0]=t},n.wbg.__wbg_ok_b8130e51d893123a=function(e){return e.ok},n.wbg.__wbg_statusText_7f6b7d97e47933bd=function(e,n){const t=w(n.statusText,b.__wbindgen_malloc,b.__wbindgen_realloc),_=u;l()[e/4+1]=_,l()[e/4+0]=t},n.wbg.__wbg_arrayBuffer_4c27b6f00c530232=function(){return F((function(e){return e.arrayBuffer()}),arguments)},n.wbg.__wbg_setbuffer_ead89b52e0bf1c40=function(e,n){e.buffer=n},n.wbg.__wbg_setonended_ae460558754eae1e=function(e,n){e.onended=n},n.wbg.__wbg_start_e330425e284a693a=function(){return F((function(e,n){e.start(n)}),arguments)},n.wbg.__wbg_connect_463d4300ff833991=function(){return F((function(e,n){return e.connect(n)}),arguments)},n.wbg.__wbg_setTransform_2b3e439b27d4098e=function(e,n){e.setTransform(n)},n.wbg.__wbg_bindVertexArrayOES_84540c072ea96b75=function(e,n){e.bindVertexArrayOES(n)},n.wbg.__wbg_createVertexArrayOES_00a5c523e5b17eff=function(e){const n=e.createVertexArrayOES();return d(n)?0:E(n)},n.wbg.__wbg_deleteVertexArrayOES_98b83132b3d85825=function(e,n){e.deleteVertexArrayOES(n)},n.wbg.__wbg_instanceof_HtmlCanvasElement_97761617af6ea089=function(e){let n;try{n=e instanceof HTMLCanvasElement}catch{n=!1}return n},n.wbg.__wbg_width_2f4b0cbbf1c850d9=function(e){return e.width},n.wbg.__wbg_setwidth_afb418d3fbf71ba7=function(e,n){e.width=n>>>0},n.wbg.__wbg_height_a81d308a000d91d0=function(e){return e.height},n.wbg.__wbg_setheight_3eb8729b59493242=function(e,n){e.height=n>>>0},n.wbg.__wbg_getContext_4d5e97892c1b206a=function(){return F((function(e,n,t){const _=e.getContext(i(n,t));return d(_)?0:E(_)}),arguments)},n.wbg.__wbg_getContext_a6ea7a8e317f182a=function(){return F((function(e,n,t,_){const r=e.getContext(i(n,t),_);return d(r)?0:E(r)}),arguments)},n.wbg.__wbg_new_83f04a482f055088=function(){return F((function(){return new Path2D}),arguments)},n.wbg.__wbg_addPath_d48d7b824460f443=function(e,n,t){e.addPath(n,t)},n.wbg.__wbg_closePath_56f0b905ac4c8ba7=function(e){e.closePath()},n.wbg.__wbg_lineTo_e1466b65cf3748fc=function(e,n,t){e.lineTo(n,t)},n.wbg.__wbg_moveTo_ee2170c2ab195dfa=function(e,n,t){e.moveTo(n,t)},n.wbg.__wbg_quadraticCurveTo_4f6b64d76c1cb275=function(e,n,t,_,r){e.quadraticCurveTo(n,t,_,r)},n.wbg.__wbg_rect_77f14f0bd1b4a24b=function(e,n,t,_,r){e.rect(n,t,_,r)},n.wbg.__wbg_now_8172cd917e5eda6b=function(e){return e.now()},n.wbg.__wbg_key_ad4fc49423a94efa=function(e,n){const t=w(n.key,b.__wbindgen_malloc,b.__wbindgen_realloc),_=u;l()[e/4+1]=_,l()[e/4+0]=t},n.wbg.__wbg_code_06787cd3c7a60600=function(e,n){const t=w(n.code,b.__wbindgen_malloc,b.__wbindgen_realloc),_=u;l()[e/4+1]=_,l()[e/4+0]=t},n.wbg.__wbg_newwithstrandinit_05d7180788420c40=function(){return F((function(e,n,t){return new Request(i(e,n),t)}),arguments)},n.wbg.__wbg_newwithbuffersourcesequenceandoptions_2aa7472e8169c8c5=function(){return F((function(e,n){return new Blob(e,n)}),arguments)},n.wbg.__wbg_a_4c0135ca2c8ce7a5=function(e){return e.a},n.wbg.__wbg_seta_da6577a0a85c2778=function(e,n){e.a=n},n.wbg.__wbg_b_4162822a21d6c799=function(e){return e.b},n.wbg.__wbg_c_ebe252ddb74bc688=function(e){return e.c},n.wbg.__wbg_d_4f2c1b5fb69ba07f=function(e){return e.d},n.wbg.__wbg_setd_630cdaab51ce88c7=function(e,n){e.d=n},n.wbg.__wbg_e_ec8bcff5cc8d5ef9=function(e){return e.e},n.wbg.__wbg_f_7f94e9aa1ba636eb=function(e){return e.f},n.wbg.__wbg_new_23fecc9dcf2dc54d=function(){return F((function(){return new DOMMatrix}),arguments)},n.wbg.__wbg_newwitharray64_a1cf121afec1f953=function(){return F((function(e,n){return new DOMMatrix(L(e,n))}),arguments)},n.wbg.__wbg_body_3cb4b4042b9a632b=function(e){const n=e.body;return d(n)?0:E(n)},n.wbg.__wbg_createElement_976dbb84fe1661b5=function(){return F((function(e,n,t){return e.createElement(i(n,t))}),arguments)},n.wbg.__wbg_createElementNS_1561aca8ee3693c0=function(){return F((function(e,n,t,_,r){return e.createElementNS(0===n?void 0:i(n,t),i(_,r))}),arguments)},n.wbg.__wbg_setid_d6ea60ebd257fe07=function(e,n,t){e.id=i(n,t)},n.wbg.__wbg_clientWidth_999b9163952471ee=function(e){return e.clientWidth},n.wbg.__wbg_clientHeight_1fc8bff4acf145b1=function(e){return e.clientHeight},n.wbg.__wbg_querySelector_494c823e686113aa=function(){return F((function(e,n,t){const _=e.querySelector(i(n,t));return d(_)?0:E(_)}),arguments)},n.wbg.__wbg_releasePointerCapture_45283df79b1542f3=function(){return F((function(e,n){e.releasePointerCapture(n)}),arguments)},n.wbg.__wbg_setAttribute_d8436c14a59ab1af=function(){return F((function(e,n,t,_,r){e.setAttribute(i(n,t),i(_,r))}),arguments)},n.wbg.__wbg_setAttributeNS_cfa0d39367e3e143=function(){return F((function(e,n,t,_,r,b,c){e.setAttributeNS(0===n?void 0:i(n,t),i(_,r),i(b,c))}),arguments)},n.wbg.__wbg_setPointerCapture_7cc6c6e831d5dae0=function(){return F((function(e,n){e.setPointerCapture(n)}),arguments)},n.wbg.__wbg_remove_a8fdc690909ea566=function(e){e.remove()},n.wbg.__wbg_style_e9380748cee29f13=function(e){return e.style},n.wbg.__wbg_instanceof_WebGlRenderingContext_09249c25390b881f=function(e){let n;try{n=e instanceof WebGLRenderingContext}catch{n=!1}return n},n.wbg.__wbg_drawingBufferWidth_77aad8cbcc8a25ad=function(e){return e.drawingBufferWidth},n.wbg.__wbg_drawingBufferHeight_7035dfce71c321bd=function(e){return e.drawingBufferHeight},n.wbg.__wbg_bufferData_32fbc455f6b17a01=function(e,n,t,_,r){e.bufferData(n>>>0,M(t,_),r>>>0)},n.wbg.__wbg_texImage2D_4cb921906eba60bf=function(){return F((function(e,n,t,_,r,b,c,f,o,i,u){e.texImage2D(n>>>0,t,_,r,b,c,f>>>0,o>>>0,0===i?void 0:M(i,u))}),arguments)},n.wbg.__wbg_uniform1fv_3ae8a225eddaeba0=function(e,n,t,_){e.uniform1fv(n,T(t,_))},n.wbg.__wbg_uniform4fv_a513dc4d02f192d3=function(e,n,t,_){e.uniform4fv(n,T(t,_))},n.wbg.__wbg_uniformMatrix3fv_2b7de3010c8ed627=function(e,n,t,_,r){e.uniformMatrix3fv(n,0!==t,T(_,r))},n.wbg.__wbg_uniformMatrix4fv_f16e4a5553357886=function(e,n,t,_,r){e.uniformMatrix4fv(n,0!==t,T(_,r))},n.wbg.__wbg_activeTexture_02b7c73c76c2c06b=function(e,n){e.activeTexture(n>>>0)},n.wbg.__wbg_attachShader_f4d51147351a1906=function(e,n,t){e.attachShader(n,t)},n.wbg.__wbg_bindBuffer_8b5135aa633680f5=function(e,n,t){e.bindBuffer(n>>>0,t)},n.wbg.__wbg_bindFramebuffer_080d0b0cf22e1645=function(e,n,t){e.bindFramebuffer(n>>>0,t)},n.wbg.__wbg_bindRenderbuffer_6da549f066c1b8a5=function(e,n,t){e.bindRenderbuffer(n>>>0,t)},n.wbg.__wbg_bindTexture_6f1dec563e82e818=function(e,n,t){e.bindTexture(n>>>0,t)},n.wbg.__wbg_blendEquationSeparate_fa6aebc5cd0c5285=function(e,n,t){e.blendEquationSeparate(n>>>0,t>>>0)},n.wbg.__wbg_blendFuncSeparate_9fef8acb74d50df5=function(e,n,t,_,r){e.blendFuncSeparate(n>>>0,t>>>0,_>>>0,r>>>0)},n.wbg.__wbg_clear_576f67967748e95f=function(e,n){e.clear(n>>>0)},n.wbg.__wbg_clearColor_7489a3fbe484f2f1=function(e,n,t,_,r){e.clearColor(n,t,_,r)},n.wbg.__wbg_colorMask_bc13c97d0db65962=function(e,n,t,_,r){e.colorMask(0!==n,0!==t,0!==_,0!==r)},n.wbg.__wbg_compileShader_22b038faa1f49857=function(e,n){e.compileShader(n)},n.wbg.__wbg_createBuffer_6e747d928c9ba46d=function(e){const n=e.createBuffer();return d(n)?0:E(n)},n.wbg.__wbg_createProgram_1c5f8dffd1066e71=function(e){const n=e.createProgram();return d(n)?0:E(n)},n.wbg.__wbg_createShader_4017d9fbc36659af=function(e,n){const t=e.createShader(n>>>0);return d(t)?0:E(t)},n.wbg.__wbg_createTexture_4ce49e8a8c655124=function(e){const n=e.createTexture();return d(n)?0:E(n)},n.wbg.__wbg_deleteBuffer_6fd9bca7f8a6d9de=function(e,n){e.deleteBuffer(n)},n.wbg.__wbg_deleteTexture_5c40169772519141=function(e,n){e.deleteTexture(n)},n.wbg.__wbg_disable_6835d16c2cd3fa26=function(e,n){e.disable(n>>>0)},n.wbg.__wbg_disableVertexAttribArray_ab474d273ff59265=function(e,n){e.disableVertexAttribArray(n>>>0)},n.wbg.__wbg_drawElements_e09dbef58c8f099a=function(e,n,t,_,r){e.drawElements(n>>>0,t,_>>>0,r)},n.wbg.__wbg_enable_fc393941ac400f72=function(e,n){e.enable(n>>>0)},n.wbg.__wbg_enableVertexAttribArray_3d21f4936ad4a378=function(e,n){e.enableVertexAttribArray(n>>>0)},n.wbg.__wbg_getAttribLocation_fcbe16b765cb1de0=function(e,n,t,_){return e.getAttribLocation(n,i(t,_))},n.wbg.__wbg_getExtension_d270fbbd8529e85f=function(){return F((function(e,n,t){const _=e.getExtension(i(n,t));return d(_)?0:E(_)}),arguments)},n.wbg.__wbg_getParameter_585a5b83c595ada8=function(){return F((function(e,n){return e.getParameter(n>>>0)}),arguments)},n.wbg.__wbg_getProgramInfoLog_e47d5073d57fb18d=function(e,n,t){const _=n.getProgramInfoLog(t);var r=d(_)?0:w(_,b.__wbindgen_malloc,b.__wbindgen_realloc),c=u;l()[e/4+1]=c,l()[e/4+0]=r},n.wbg.__wbg_getProgramParameter_eaf768a9b399b7cf=function(e,n,t){return e.getProgramParameter(n,t>>>0)},n.wbg.__wbg_getShaderInfoLog_ec7e5b959e47645b=function(e,n,t){const _=n.getShaderInfoLog(t);var r=d(_)?0:w(_,b.__wbindgen_malloc,b.__wbindgen_realloc),c=u;l()[e/4+1]=c,l()[e/4+0]=r},n.wbg.__wbg_getUniformLocation_8e9cc276a231ddcd=function(e,n,t,_){const r=e.getUniformLocation(n,i(t,_));return d(r)?0:E(r)},n.wbg.__wbg_linkProgram_25cda5f9318ea316=function(e,n){e.linkProgram(n)},n.wbg.__wbg_pixelStorei_bee1e2da4cb1115b=function(e,n,t){e.pixelStorei(n>>>0,t)},n.wbg.__wbg_shaderSource_a0001b8eab5d44f4=function(e,n,t,_){e.shaderSource(n,i(t,_))},n.wbg.__wbg_stencilFunc_b72fb7b1cdf11693=function(e,n,t,_){e.stencilFunc(n>>>0,t,_>>>0)},n.wbg.__wbg_stencilMask_00541859199befd2=function(e,n){e.stencilMask(n>>>0)},n.wbg.__wbg_stencilOp_3db65a0f2e42c622=function(e,n,t,_){e.stencilOp(n>>>0,t>>>0,_>>>0)},n.wbg.__wbg_texParameteri_1b210b807f1ea723=function(e,n,t,_){e.texParameteri(n>>>0,t>>>0,_)},n.wbg.__wbg_uniform1f_f60e1072e28b8c49=function(e,n,t){e.uniform1f(n,t)},n.wbg.__wbg_uniform1i_50124a48de1da66b=function(e,n,t){e.uniform1i(n,t)},n.wbg.__wbg_useProgram_156511a425feb519=function(e,n){e.useProgram(n)},n.wbg.__wbg_vertexAttribPointer_63d2aef49627302b=function(e,n,t,_,r,b,c){e.vertexAttribPointer(n>>>0,t,_>>>0,0!==r,b,c)},n.wbg.__wbg_viewport_a93f3881c4202d5e=function(e,n,t,_,r){e.viewport(n,t,_,r)},n.wbg.__wbg_currentTarget_57b4543ab256dfe7=function(e){const n=e.currentTarget;return d(n)?0:E(n)},n.wbg.__wbg_preventDefault_3209279b490de583=function(e){e.preventDefault()},n.wbg.__wbg_addEventListener_cbe4c6f619b032f3=function(){return F((function(e,n,t,_){e.addEventListener(i(n,t),_)}),arguments)},n.wbg.__wbg_addEventListener_1fc744729ac6dc27=function(){return F((function(e,n,t,_,r){e.addEventListener(i(n,t),_,r)}),arguments)},n.wbg.__wbg_addEventListener_178e4d0f8a009cd3=function(){return F((function(e,n,t,_,r){e.addEventListener(i(n,t),_,0!==r)}),arguments)},n.wbg.__wbg_removeEventListener_dd20475efce70084=function(){return F((function(e,n,t,_){e.removeEventListener(i(n,t),_)}),arguments)},n.wbg.__wbg_removeEventListener_b10f1a66647f3aa0=function(){return F((function(e,n,t,_,r){e.removeEventListener(i(n,t),_,0!==r)}),arguments)},n.wbg.__wbg_data_f13601b88960b7eb=function(e,n){const t=function(e,n){const t=n(1*e.length);return o().set(e,t/1),u=e.length,t}(n.data,b.__wbindgen_malloc),_=u;l()[e/4+1]=_,l()[e/4+0]=t},n.wbg.__wbg_newwithu8clampedarray_ec4b349a9ae3eaf6=function(){return F((function(e,n,t){return new ImageData(O(e,n),t>>>0)}),arguments)},n.wbg.__wbg_baseURI_24f83c3784dbdd7a=function(){return F((function(e,n){const t=n.baseURI;var _=d(t)?0:w(t,b.__wbindgen_malloc,b.__wbindgen_realloc),r=u;l()[e/4+1]=r,l()[e/4+0]=_}),arguments)},n.wbg.__wbg_appendChild_e513ef0e5098dfdd=function(){return F((function(e,n){return e.appendChild(n)}),arguments)},n.wbg.__wbg_debug_f15cb542ea509609="function"==typeof console.debug?console.debug:B("console.debug"),n.wbg.__wbg_error_ef9a0be47931175f="function"==typeof console.error?console.error:B("console.error"),n.wbg.__wbg_info_2874fdd5393f35ce="function"==typeof console.info?console.info:B("console.info"),n.wbg.__wbg_log_4b5638ad60bdc54a="function"==typeof console.log?console.log:B("console.log"),n.wbg.__wbg_warn_58110c4a199df084="function"==typeof console.warn?console.warn:B("console.warn"),n.wbg.__wbg_destination_df4e9893e562390a=function(e){return e.destination},n.wbg.__wbg_sampleRate_30180c0ccae55e98=function(e){return e.sampleRate},n.wbg.__wbg_currentTime_80316e838e7d1028=function(e){return e.currentTime},n.wbg.__wbg_new_208829b3b7d06214=function(){return F((function(){return new r}),arguments)},n.wbg.__wbg_close_7d5aa2babb9d8fc2=function(){return F((function(e){return e.close()}),arguments)},n.wbg.__wbg_suspend_8c72404b7450feb3=function(){return F((function(e){return e.suspend()}),arguments)},n.wbg.__wbg_createBuffer_47ef089f86b99318=function(){return F((function(e,n,t,_){return e.createBuffer(n>>>0,t>>>0,_)}),arguments)},n.wbg.__wbg_createBufferSource_f06449934aee7f6f=function(){return F((function(e){return e.createBufferSource()}),arguments)},n.wbg.__wbg_resume_244684c4c6bb49fa=function(){return F((function(e){return e.resume()}),arguments)},n.wbg.__wbg_setProperty_e489dfd8c0a6bffc=function(){return F((function(e,n,t,_,r){e.setProperty(i(n,t),i(_,r))}),arguments)},n.wbg.__wbg_protocol_70cc72a5ff78dc5f=function(){return F((function(e,n){const t=w(n.protocol,b.__wbindgen_malloc,b.__wbindgen_realloc),_=u;l()[e/4+1]=_,l()[e/4+0]=t}),arguments)},n.wbg.__wbg_assign_4e2847f30bc3fef3=function(){return F((function(e,n,t){e.assign(i(n,t))}),arguments)},n.wbg.__wbg_get_5e2f6c6d27821e3f=function(){return F((function(e,n,t,_){const r=n[i(t,_)];var c=d(r)?0:w(r,b.__wbindgen_malloc,b.__wbindgen_realloc),f=u;l()[e/4+1]=f,l()[e/4+0]=c}),arguments)},n.wbg.__wbg_set_0a2938f1ef0852cf=function(){return F((function(e,n,t,_,r){e[i(n,t)]=i(_,r)}),arguments)},n.wbg.__wbg_delete_357ce721e4047d75=function(){return F((function(e,n,t){delete e[i(n,t)]}),arguments)},n.wbg.__wbg_instanceof_CanvasRenderingContext2d_ff80c06d296e3622=function(e){let n;try{n=e instanceof CanvasRenderingContext2D}catch{n=!1}return n},n.wbg.__wbg_setglobalAlpha_1ab443aee9cf0c66=function(e,n){e.globalAlpha=n},n.wbg.__wbg_setglobalCompositeOperation_ab45d05cd8734f9f=function(){return F((function(e,n,t){e.globalCompositeOperation=i(n,t)}),arguments)},n.wbg.__wbg_setstrokeStyle_899ea3720dae323b=function(e,n){e.strokeStyle=n},n.wbg.__wbg_setfillStyle_53ccf2a9886c1c4d=function(e,n){e.fillStyle=n},n.wbg.__wbg_setfilter_b73fcc09bfca8f6d=function(e,n,t){e.filter=i(n,t)},n.wbg.__wbg_setimageSmoothingEnabled_495089fb53e4bd73=function(e,n){e.imageSmoothingEnabled=0!==n},n.wbg.__wbg_setlineWidth_64004648773fed7a=function(e,n){e.lineWidth=n},n.wbg.__wbg_setlineCap_81847480524aaabe=function(e,n,t){e.lineCap=i(n,t)},n.wbg.__wbg_setlineJoin_460906fc18195c47=function(e,n,t){e.lineJoin=i(n,t)},n.wbg.__wbg_setmiterLimit_913fefb6fe0e896a=function(e,n){e.miterLimit=n},n.wbg.__wbg_drawImage_2dbd3fe01f39300b=function(){return F((function(e,n,t,_){e.drawImage(n,t,_)}),arguments)},n.wbg.__wbg_clip_4be1e59aa39a8e8e=function(e,n,t){e.clip(n,t)},n.wbg.__wbg_fill_7da29b528956b8ba=function(e,n,t){e.fill(n,t)},n.wbg.__wbg_stroke_74fc3534f240b639=function(e,n){e.stroke(n)},n.wbg.__wbg_createLinearGradient_acec41a619c23be4=function(e,n,t,_,r){return e.createLinearGradient(n,t,_,r)},n.wbg.__wbg_createPattern_bd15b1b47a033275=function(){return F((function(e,n,t,_){const r=e.createPattern(n,i(t,_));return d(r)?0:E(r)}),arguments)},n.wbg.__wbg_createRadialGradient_ddeb1acd6889300f=function(){return F((function(e,n,t,_,r,b,c){return e.createRadialGradient(n,t,_,r,b,c)}),arguments)},n.wbg.__wbg_getImageData_1d31a94ff8a4a1d7=function(){return F((function(e,n,t,_,r){return e.getImageData(n,t,_,r)}),arguments)},n.wbg.__wbg_putImageData_23e0cc41d4fabcde=function(){return F((function(e,n,t,_){e.putImageData(n,t,_)}),arguments)},n.wbg.__wbg_clearRect_b3895f56c5ecd19d=function(e,n,t,_,r){e.clearRect(n,t,_,r)},n.wbg.__wbg_fillRect_c7a19e13c5242507=function(e,n,t,_,r){e.fillRect(n,t,_,r)},n.wbg.__wbg_restore_556d7c38c007b3fe=function(e){e.restore()},n.wbg.__wbg_save_a9bb370fb49c5df7=function(e){e.save()},n.wbg.__wbg_resetTransform_14d523baff625ade=function(){return F((function(e){e.resetTransform()}),arguments)},n.wbg.__wbg_setTransform_f7cb1550b95885ee=function(){return F((function(e,n,t,_,r,b,c){e.setTransform(n,t,_,r,b,c)}),arguments)},n.wbg.__wbg_transform_ddd3e67b70078921=function(){return F((function(e,n,t,_,r,b,c){e.transform(n,t,_,r,b,c)}),arguments)},n.wbg.__wbg_get_57245cc7d7c7619d=function(e,n){return e[n>>>0]},n.wbg.__wbg_length_6e3bbe7c8bd4dbd8=function(e){return e.length},n.wbg.__wbg_new_1d9a920c6bfc44a8=function(){return new Array},n.wbg.__wbg_newnoargs_b5b063fc6c2f0376=function(e,n){return new Function(i(e,n))},n.wbg.__wbg_next_aaef7c8aa5e212ac=function(){return F((function(e){return e.next()}),arguments)},n.wbg.__wbg_done_1b73b0672e15f234=function(e){return e.done},n.wbg.__wbg_value_1ccc36bc03462d71=function(e){return e.value},n.wbg.__wbg_get_765201544a2b6869=function(){return F((function(e,n){return Reflect.get(e,n)}),arguments)},n.wbg.__wbg_call_97ae9d8645dc388b=function(){return F((function(e,n){return e.call(n)}),arguments)},n.wbg.__wbg_new_0b9bfdd97583284e=function(){return new Object},n.wbg.__wbg_self_6d479506f72c6a71=function(){return F((function(){return self.self}),arguments)},n.wbg.__wbg_window_f2557cc78490aceb=function(){return F((function(){return window.window}),arguments)},n.wbg.__wbg_globalThis_7f206bda628d5286=function(){return F((function(){return globalThis.globalThis}),arguments)},n.wbg.__wbg_global_ba75c50d1cf384f4=function(){return F((function(){return t.g.global}),arguments)},n.wbg.__wbg_set_a68214f35c417fa9=function(e,n,t){e[n>>>0]=t},n.wbg.__wbg_isArray_27c46c67f498e15d=function(e){return Array.isArray(e)},n.wbg.__wbg_of_2ba33496c07f1349=function(e,n){return Array.of(e,n)},n.wbg.__wbg_push_740e4b286702d964=function(e,n){return e.push(n)},n.wbg.__wbg_instanceof_ArrayBuffer_e5e48f4762c5610b=function(e){let n;try{n=e instanceof ArrayBuffer}catch{n=!1}return n},n.wbg.__wbg_new_9427a0d83657ea80=function(e){return new ArrayBuffer(e>>>0)},n.wbg.__wbg_values_e42671acbf11ec04=function(e){return e.values()},n.wbg.__wbg_apply_22a3220d244124da=function(){return F((function(e,n,t){return e.apply(n,t)}),arguments)},n.wbg.__wbg_call_168da88779e35f61=function(){return F((function(e,n,t){return e.call(n,t)}),arguments)},n.wbg.__wbg_isSafeInteger_dfa0593e8d7ac35a=function(e){return Number.isSafeInteger(e)},n.wbg.__wbg_getTime_cb82adb2556ed13e=function(e){return e.getTime()},n.wbg.__wbg_getTimezoneOffset_89bd4275e1ca8341=function(e){return e.getTimezoneOffset()},n.wbg.__wbg_new0_a57059d72c5b7aee=function(){return new Date},n.wbg.__wbg_instanceof_Object_595a1007518cbea3=function(e){let n;try{n=e instanceof Object}catch{n=!1}return n},n.wbg.__wbg_entries_65a76a413fc91037=function(e){return Object.entries(e)},n.wbg.__wbg_fromEntries_7abdcb92016eb4b9=function(){return F((function(e){return Object.fromEntries(e)}),arguments)},n.wbg.__wbg_is_40a66842732708e7=function(e,n){return Object.is(e,n)},n.wbg.__wbg_new_9962f939219f1820=function(e,n){try{var t={a:e,b:n};const _=new Promise(((e,n)=>{const _=t.a;t.a=0;try{return function(e,n,t,_){b.closure3421_externref_shim(e,n,t,_)}(_,t.b,e,n)}finally{t.a=_}}));return _}finally{t.a=t.b=0}},n.wbg.__wbg_resolve_99fe17964f31ffc0=function(e){return Promise.resolve(e)},n.wbg.__wbg_then_11f7a54d67b4bfad=function(e,n){return e.then(n)},n.wbg.__wbg_then_cedad20fbbd9418a=function(e,n,t){return e.then(n,t)},n.wbg.__wbg_buffer_3f3d764d4747d564=function(e){return e.buffer},n.wbg.__wbg_new_8c3f0052272a457a=function(e){return new Uint8Array(e)},n.wbg.__wbg_set_83db9690f9353e79=function(e,n,t){e.set(n,t>>>0)},n.wbg.__wbg_length_9e1ae1900cb0fbd5=function(e){return e.length},n.wbg.__wbg_instanceof_Uint8Array_971eeda69eb75003=function(e){let n;try{n=e instanceof Uint8Array}catch{n=!1}return n},n.wbg.__wbg_newwithlength_f5933855e4f48a19=function(e){return new Uint8Array(e>>>0)},n.wbg.__wbg_fill_c9a2401d683fafbb=function(e,n,t,_){return e.fill(n,t>>>0,_>>>0)},n.wbg.__wbg_subarray_58ad4efbb5bcb886=function(e,n,t){return e.subarray(n>>>0,t>>>0)},n.wbg.__wbg_ownKeys_bf24e1178641d9f0=function(){return F((function(e){return Reflect.ownKeys(e)}),arguments)},n.wbg.__wbg_set_bf3f89b92d5a34bf=function(){return F((function(e,n,t){return Reflect.set(e,n,t)}),arguments)},n.wbg.__wbindgen_bigint_get_as_i64=function(e,n){const t="bigint"==typeof n?n:void 0;(0===p.byteLength&&(p=new BigInt64Array(b.memory.buffer)),p)[e/8+1]=d(t)?0n:t,l()[e/4+0]=!d(t)},n.wbg.__wbindgen_debug_string=function(e,n){const t=w(h(n),b.__wbindgen_malloc,b.__wbindgen_realloc),_=u;l()[e/4+1]=_,l()[e/4+0]=t},n.wbg.__wbindgen_throw=function(e,n){throw new Error(i(e,n))},n.wbg.__wbindgen_memory=function(){return b.memory},n.wbg.__wbindgen_closure_wrapper821=function(e,n,t){return x(e,n,367,v)},n.wbg.__wbindgen_closure_wrapper822=function(e,n,t){return x(e,n,367,A)},n.wbg.__wbindgen_closure_wrapper824=function(e,n,t){return x(e,n,367,S)},n.wbg.__wbindgen_closure_wrapper826=function(e,n,t){return x(e,n,367,A)},n.wbg.__wbindgen_closure_wrapper829=function(e,n,t){return x(e,n,367,A)},n.wbg.__wbindgen_closure_wrapper831=function(e,n,t){return x(e,n,367,A)},n.wbg.__wbindgen_closure_wrapper6948=function(e,n,t){return x(e,n,2918,C)},n.wbg.__wbindgen_init_externref_table=function(){const e=b.__wbindgen_export_2,n=e.grow(4);e.set(0,void 0),e.set(n+0,void 0),e.set(n+1,null),e.set(n+2,!0),e.set(n+3,!1)},n}function U(e,n){return b=e.exports,q.__wbindgen_wasm_module=n,p=new BigInt64Array,R=new Float32Array,m=new Float64Array,s=new Int32Array,k=new Uint32Array,f=new Uint8Array,I=new Uint8ClampedArray,b.__wbindgen_start(),b}function V(e){const n=W();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),U(new WebAssembly.Instance(e,n),e)}async function q(e){void 0===e&&(e=new URL(t(285),t.b));const n=W();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:_,module:r}=await async function(e,n){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,n)}catch(n){if("application/wasm"==e.headers.get("Content-Type"))throw n;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n)}const t=await e.arrayBuffer();return await WebAssembly.instantiate(t,n)}{const t=await WebAssembly.instantiate(e,n);return t instanceof WebAssembly.Instance?{instance:t,module:e}:t}}(await e,n);return U(_,r)}const j=q}}]);
|
|
2
|
+
//# sourceMappingURL=core.ruffle.f45b5c0662b515254bf0.js.map
|
package/ruffle/ruffle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t,n={},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,s),r.exports}s.m=n,s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"core.ruffle."+{662:"be482e0399eaff7f47ec",966:"53a2873dad31763672e1"}[e]+".js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="ruffle-selfhosted:",s.l=(n,i,r,o)=>{if(e[n])e[n].push(i);else{var a,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+r){a=d;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",t+r),a.src=n),e[n]=[i];var h=(t,i)=>{a.onerror=a.onload=null,clearTimeout(f);var s=e[n];if(delete e[n],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach((e=>e(i))),t)return t(i)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.p="",(()=>{s.b=document.baseURI||self.location.href;var e={179:0};s.f.j=(t,n)=>{var i=s.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(((n,s)=>i=e[t]=[n,s]));n.push(i[2]=r);var o=s.p+s.u(t),a=new Error;s.l(o,(n=>{if(s.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,i[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var i,r,[o,a,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);l&&l(s)}for(t&&t(n);c<o.length;c++)r=o[c],s.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=self.webpackChunkruffle_selfhosted=self.webpackChunkruffle_selfhosted||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();const r=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),o=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),a=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),l=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));function c(e){const t="function"==typeof Function.prototype.toString?Function.prototype.toString():null;return"string"==typeof t&&t.indexOf("[native code]")>=0&&Function.prototype.toString.call(e).indexOf("[native code]")>=0}let u="";try{if(void 0!==document.currentScript&&null!==document.currentScript&&"src"in document.currentScript&&""!==document.currentScript.src){let e=document.currentScript.src;e.endsWith(".js")||e.endsWith("/")||(e+="/"),u=new URL(".",e).href}}catch(e){console.warn("Unable to get currentScript URL")}function d(e){let t=u;return void 0!==e&&void 0!==e.publicPath&&(t=e.publicPath),""===t||t.endsWith("/")||(t+="/"),t}let h=null;function f(e){return null===h&&(h=async function(e){"function"==typeof Array.prototype.reduce&&c(Array.prototype.reduce)||Object.defineProperty(Array.prototype,"reduce",{value(...e){if(0===e.length&&window.Prototype&&window.Prototype.Version&&window.Prototype.Version<"1.6.1")return this.length>1?this:this[0];const t=e[0];if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(`${t} is not a function`);const n=Object(this),i=n.length>>>0;let s,r=0;if(e.length>=2)s=e[1];else{for(;r<i&&!(r in n);)r++;if(r>=i)throw new TypeError("Reduce of empty array with no initial value");s=n[r++]}for(;r<i;)r in n&&(s=t(s,n[r],r,n)),r++;return s}}),"function"==typeof Window&&c(Window)||"function"==typeof window.constructor&&c(window.constructor)&&(window.Window=window.constructor),void 0===window.Reflect&&(window.Reflect={}),"function"!=typeof Reflect.get&&Object.defineProperty(Reflect,"get",{value:(e,t)=>e[t]}),"function"!=typeof Reflect.set&&Object.defineProperty(Reflect,"set",{value(e,t,n){e[t]=n}});const t=(await Promise.all([r(),l(),o(),a()])).every(Boolean);t||console.log("Some WebAssembly extensions are NOT available, falling back to the vanilla WebAssembly module"),s.p=d(e);const{default:n,Ruffle:i}=await(t?s.e(966).then(s.bind(s,966)):s.e(662).then(s.bind(s,662)));return await n(),i}(e)),h}class p{constructor(e){if(this.__mimetypes=[],this.__named_mimetypes={},e)for(let t=0;t<e.length;t++)this.install(e[t])}install(e){const t=this.__mimetypes.length;this.__mimetypes.push(e),this.__named_mimetypes[e.type]=e,this[e.type]=e,this[t]=e}item(e){return this.__mimetypes[e]}namedItem(e){return this.__named_mimetypes[e]}get length(){return this.__mimetypes.length}[Symbol.iterator](){return this.__mimetypes[Symbol.iterator]()}}class m extends p{constructor(e,t,n,i){super(i),this.name=e,this.description=t,this.filename=n}install(e){super.install(e)}[Symbol.iterator](){return super[Symbol.iterator]()}}class g{constructor(e){this.__plugins=[],this.__named_plugins={};for(let t=0;t<e.length;t++)this.install(e[t])}install(e){const t=this.__plugins.length;this.__plugins.push(e),this.__named_plugins[e.name]=e,this[e.name]=e,this[t]=e}item(e){return this.__plugins[e]}namedItem(e){return this.__named_plugins[e]}refresh(){}get length(){return this.__plugins.length}}const w=new m("Shockwave Flash","Shockwave Flash 32.0 r0","ruffle.js",null);w.install({type:"application/futuresplash",description:"Shockwave Flash",suffixes:"spl",enabledPlugin:w}),w.install({type:"application/x-shockwave-flash",description:"Shockwave Flash",suffixes:"swf",enabledPlugin:w}),w.install({type:"application/x-shockwave-flash2-preview",description:"Shockwave Flash",suffixes:"swf",enabledPlugin:w}),w.install({type:"application/vnd.adobe.flash-movie",description:"Shockwave Flash",suffixes:"swf",enabledPlugin:w});const v=document.createElement("template");v.innerHTML='\n <style>\n :host {\n --ruffle-blue: #37528c;\n --ruffle-orange: #ffad33;\n\n display: inline-block;\n position: relative;\n /* Default width/height; this will get overridden by user styles/attributes. */\n width: 550px;\n height: 400px;\n font-family: Arial, sans-serif;\n letter-spacing: 0.4px;\n touch-action: none;\n user-select: none;\n -webkit-user-select: none;\n -webkit-tap-highlight-color: transparent;\n }\n\n /* Ruffle\'s width/height CSS interferes Safari fullscreen CSS. */\n /* Ensure that Safari\'s fullscreen mode actually fills the screen. */\n :host(:-webkit-full-screen) {\n display: block;\n width: 100% !important;\n height: 100% !important;\n }\n\n /* All of these use the dimensions specified by the embed. */\n #container,\n #play_button,\n #unmute_overlay,\n #unmute_overlay .background,\n #panic,\n #message_overlay {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n #container {\n overflow: hidden;\n }\n\n #container canvas {\n width: 100%;\n height: 100%;\n }\n\n #play_button,\n #unmute_overlay {\n cursor: pointer;\n display: none;\n }\n\n #unmute_overlay .background {\n background: black;\n opacity: 0.7;\n }\n\n #play_button .icon,\n #unmute_overlay .icon {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50%;\n height: 50%;\n max-width: 384px;\n max-height: 384px;\n transform: translate(-50%, -50%);\n opacity: 0.8;\n }\n\n #play_button:hover .icon,\n #unmute_overlay:hover .icon {\n opacity: 1;\n }\n\n #panic {\n font-size: 20px;\n text-align: center;\n /* Inverted colors from play button! */\n background: linear-gradient(180deg, #fd3a40 0%, #fda138 100%);\n color: white;\n display: flex;\n flex-flow: column;\n justify-content: space-around;\n }\n\n #panic a {\n color: var(--ruffle-blue);\n font-weight: bold;\n }\n\n #panic-title {\n font-size: xxx-large;\n font-weight: bold;\n }\n\n #panic-body.details {\n flex: 0.9;\n margin: 0 10px;\n }\n\n #panic-body textarea {\n width: 100%;\n height: 100%;\n resize: none;\n }\n\n #panic ul {\n padding: 0;\n display: flex;\n list-style-type: none;\n justify-content: space-evenly;\n }\n\n #message_overlay {\n position: absolute;\n background: var(--ruffle-blue);\n color: var(--ruffle-orange);\n opacity: 1;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: auto;\n }\n\n #message_overlay .message {\n text-align: center;\n max-height: 100%;\n max-width: 100%;\n padding: 5%;\n\t font-size: 20px;\n }\n\n #message_overlay p {\n margin: 0.5em 0;\n }\n\n #message_overlay .message div {\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n column-gap: 1em;\n }\n\n #message_overlay a, #message_overlay button {\n cursor: pointer;\n background: var(--ruffle-blue);\n color: var(--ruffle-orange);\n border: 2px solid var(--ruffle-orange);\n font-weight: bold;\n font-size: 1.25em;\n border-radius: 0.6em;\n padding: 10px;\n text-decoration: none;\n margin: 2% 0;\n }\n\n #message_overlay a:hover, #message_overlay button:hover {\n background: #ffffff4c;\n }\n\n #continue-btn {\n cursor: pointer;\n background: var(--ruffle-blue);\n color: var(--ruffle-orange);\n border: 2px solid var(--ruffle-orange);\n font-weight: bold;\n font-size: 20px;\n border-radius: 20px;\n padding: 10px;\n }\n\n #continue-btn:hover {\n background: #ffffff4c;\n }\n\n #context-menu {\n display: none;\n color: black;\n background: #fafafa;\n border: 1px solid gray;\n box-shadow: 0px 5px 10px -5px black;\n position: absolute;\n font-size: 14px;\n text-align: left;\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n #context-menu .menu_item {\n padding: 5px 10px;\n cursor: pointer;\n color: black;\n }\n\n #context-menu .menu_item.disabled {\n cursor: default;\n color: gray;\n }\n\n #context-menu .menu_item:not(.disabled):hover {\n background: lightgray;\n }\n\n #context-menu .menu_separator hr {\n border: none;\n border-bottom: 1px solid lightgray;\n margin: 2px;\n }\n </style>\n <style id="dynamic_styles"></style>\n\n <div id="container">\n <div id="play_button"><div class="icon"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" viewBox="0 0 250 250" width="100%" height="100%"><defs><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="125" y1="0" x2="125" y2="250" spreadMethod="pad"><stop offset="0%" stop-color="#FDA138"/><stop offset="100%" stop-color="#FD3A40"/></linearGradient><g id="b"><path fill="url(#a)" d="M250 125q0-52-37-88-36-37-88-37T37 37Q0 73 0 125t37 88q36 37 88 37t88-37q37-36 37-88M87 195V55l100 70-100 70z"/><path fill="#FFF" d="M87 55v140l100-70L87 55z"/></g></defs><use xlink:href="#b"/></svg></div></div>\n <div id="unmute_overlay"><div class="background"></div><div class="icon"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" viewBox="0 0 512 584" width="100%" height="100%" scale="0.8"><path fill="#FFF" stroke="#FFF" d="m457.941 256 47.029-47.029c9.372-9.373 9.372-24.568 0-33.941-9.373-9.373-24.568-9.373-33.941 0l-47.029 47.029-47.029-47.029c-9.373-9.373-24.568-9.373-33.941 0-9.372 9.373-9.372 24.568 0 33.941l47.029 47.029-47.029 47.029c-9.372 9.373-9.372 24.568 0 33.941 4.686 4.687 10.827 7.03 16.97 7.03s12.284-2.343 16.971-7.029l47.029-47.03 47.029 47.029c4.687 4.687 10.828 7.03 16.971 7.03s12.284-2.343 16.971-7.029c9.372-9.373 9.372-24.568 0-33.941z"/><path fill="#FFF" stroke="#FFF" d="m99 160h-55c-24.301 0-44 19.699-44 44v104c0 24.301 19.699 44 44 44h55c2.761 0 5-2.239 5-5v-182c0-2.761-2.239-5-5-5z"/><path fill="#FFF" stroke="#FFF" d="m280 56h-24c-5.269 0-10.392 1.734-14.578 4.935l-103.459 79.116c-1.237.946-1.963 2.414-1.963 3.972v223.955c0 1.557.726 3.026 1.963 3.972l103.459 79.115c4.186 3.201 9.309 4.936 14.579 4.936h23.999c13.255 0 24-10.745 24-24v-352.001c0-13.255-10.745-24-24-24z"/><text x="256" y="560" text-anchor="middle" font-size="60px" fill="#FFF" stroke="#FFF">Click to unmute</text></svg></div></div>\n </div>\n\n <ul id="context-menu"></ul>\n';const y={};function b(e,t){if(void 0!==y[e]){if(y[e].class!==t)throw new Error("Internal naming conflict on "+e);return y[e].name}let n=0;if(void 0!==window.customElements)for(;n<999;){let i=e;if(n>0&&(i=i+"-"+n),void 0===window.customElements.get(i))return window.customElements.define(i,t),y[e]={class:t,name:i,internalName:e},i;n+=1}throw new Error("Failed to assign custom element "+e)}const x="application/x-shockwave-flash",k="application/futuresplash",E="application/x-shockwave-flash2-preview",I="application/vnd.adobe.flash-movie",_="https://ruffle.rs",S=/^\s*(\d+(\.\d+)?(%)?)/;let A=!1;function C(e){if(null==e)return{};e instanceof URLSearchParams||(e=new URLSearchParams(e));const t={};for(const[n,i]of e)t[n]=i.toString();return t}class R extends HTMLElement{constructor(){return super(),this.hasContextMenu=!1,this.contextMenuForceDisabled=!1,this.isTouch=!1,this.showSwfDownload=!1,this.panicked=!1,this.isExtension=!1,this.config={},this.shadow=this.attachShadow({mode:"open"}),this.shadow.appendChild(v.content.cloneNode(!0)),this.dynamicStyles=this.shadow.getElementById("dynamic_styles"),this.container=this.shadow.getElementById("container"),this.playButton=this.shadow.getElementById("play_button"),this.playButton&&this.playButton.addEventListener("click",(()=>this.play())),this.unmuteOverlay=this.shadow.getElementById("unmute_overlay"),this.contextMenuElement=this.shadow.getElementById("context-menu"),this.addEventListener("contextmenu",this.showContextMenu.bind(this)),this.addEventListener("pointerdown",this.pointerDown.bind(this)),this.addEventListener("fullscreenchange",this.fullScreenChange.bind(this)),this.addEventListener("webkitfullscreenchange",this.fullScreenChange.bind(this)),window.addEventListener("click",this.hideContextMenu.bind(this)),this.instance=null,this.options=null,this.onFSCommand=null,this._readyState=0,this._metadata=null,this.lastActivePlayingState=!1,this.setupPauseOnTabHidden(),this}get readyState(){return this._readyState}get metadata(){return this._metadata}setupPauseOnTabHidden(){document.addEventListener("visibilitychange",(()=>{this.instance&&(document.hidden&&(this.lastActivePlayingState=this.instance.is_playing(),this.instance.pause()),document.hidden||!0!==this.lastActivePlayingState||this.instance.play())}),!1)}connectedCallback(){this.updateStyles()}static get observedAttributes(){return["width","height"]}attributeChangedCallback(e,t,n){"width"!==e&&"height"!==e||this.updateStyles()}disconnectedCallback(){this.destroy()}updateStyles(){if(this.dynamicStyles.sheet){if(this.dynamicStyles.sheet.rules)for(let e=0;e<this.dynamicStyles.sheet.rules.length;e++)this.dynamicStyles.sheet.deleteRule(e);const e=this.attributes.getNamedItem("width");if(null!=e){const t=R.htmlDimensionToCssDimension(e.value);null!==t&&this.dynamicStyles.sheet.insertRule(`:host { width: ${t}; }`)}const t=this.attributes.getNamedItem("height");if(null!=t){const e=R.htmlDimensionToCssDimension(t.value);null!==e&&this.dynamicStyles.sheet.insertRule(`:host { height: ${e}; }`)}}}isUnusedFallbackObject(){const e=function(e){const t=y[e];return void 0!==t?{internalName:e,name:t.name,class:t.class}:null}("ruffle-object");if(null!==e){let t=this.parentNode;for(;t!==document&&null!==t;){if(t.nodeName===e.name)return!0;t=t.parentNode}}return!1}async ensureFreshInstance(e){var t;this.destroy();const n=await f(e).catch((e=>{if(console.error(`Serious error loading Ruffle: ${e}`),"file:"===window.location.protocol)e.ruffleIndexError=2;else{e.ruffleIndexError=9;const t=String(e.message).toLowerCase();t.includes("mime")?e.ruffleIndexError=8:t.includes("networkerror")||t.includes("failed to fetch")?e.ruffleIndexError=6:t.includes("disallowed by embedder")?e.ruffleIndexError=1:"CompileError"===e.name?e.ruffleIndexError=3:t.includes("could not download wasm module")&&"TypeError"===e.name?e.ruffleIndexError=7:"TypeError"===e.name?e.ruffleIndexError=5:navigator.userAgent.includes("Edg")&&t.includes("webassembly is not defined")&&(e.ruffleIndexError=10)}throw this.panic(e),e}));if(this.instance=await new n(this.container,this,e),console.log("New Ruffle instance created (WebAssembly extensions: "+(n.is_wasm_simd_used()?"ON":"OFF")+")"),"running"!==this.audioState()&&(this.container.style.visibility="hidden",await new Promise((e=>{window.setTimeout((()=>{e()}),200)})),this.container.style.visibility=""),this.unmuteAudioContext(),"on"===e.autoplay||"off"!==e.autoplay&&"running"===this.audioState()){if(this.play(),"running"!==this.audioState()){"hidden"!==e.unmuteOverlay&&(this.unmuteOverlay.style.display="block"),this.container.addEventListener("click",this.unmuteOverlayClicked.bind(this),{once:!0});const n=null===(t=this.instance)||void 0===t?void 0:t.audio_context();n&&(n.onstatechange=()=>{"running"===n.state&&this.unmuteOverlayClicked(),n.onstatechange=null})}}else this.playButton.style.display="block"}destroy(){this.instance&&(this.instance.destroy(),this.instance=null,this._metadata=null,this._readyState=0,console.log("Ruffle instance destroyed."))}async load(e){var t,n;let i="";switch(typeof e){case"string":e={url:e};break;case"object":null===e?i="Argument 0 must be a string or object":"url"in e||"data"in e?"url"in e&&"string"!=typeof e.url&&(i="`url` must be a string"):i="Argument 0 must contain a `url` or `data` key";break;default:i="Argument 0 must be a string or object"}if(i.length>0){const e=new TypeError(i);throw e.ruffleIndexError=4,this.panic(e),e}if(this.isConnected&&!this.isUnusedFallbackObject()){if(!T(this))try{const i=Object.assign(Object.assign(Object.assign({},null!==(n=null===(t=window.RufflePlayer)||void 0===t?void 0:t.config)&&void 0!==n?n:{}),this.config),e);if(i.allowScriptAccess=e.allowScriptAccess,this.showSwfDownload=!0===i.showSwfDownload,this.options=e,this.hasContextMenu=!1!==i.contextMenu,i.backgroundColor&&"transparent"!==i.wmode&&(this.container.style.backgroundColor=i.backgroundColor),await this.ensureFreshInstance(i),"url"in e){console.log(`Loading SWF file ${e.url}`),this.swfUrl=new URL(e.url,document.location.href);const t=Object.assign(Object.assign({},C(e.url.substring(e.url.indexOf("?")))),C(e.parameters));this.instance.stream_from(this.swfUrl.href,t)}else"data"in e&&(console.log("Loading SWF data"),this.instance.load_data(new Uint8Array(e.data),C(e.parameters)))}catch(e){throw console.error(`Serious error occurred loading SWF file: ${e}`),e}}else console.warn("Ignoring attempt to play a disconnected or suspended Ruffle element")}play(){this.instance&&(this.instance.play(),this.playButton&&(this.playButton.style.display="none"))}get isPlaying(){return!!this.instance&&this.instance.is_playing()}get fullscreenEnabled(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}get isFullscreen(){return(document.fullscreenElement||document.webkitFullscreenElement)===this}setFullscreen(e){this.fullscreenEnabled&&(e?this.enterFullscreen():this.exitFullscreen())}enterFullscreen(){const e={navigationUI:"hide"};this.requestFullscreen?this.requestFullscreen(e):this.webkitRequestFullscreen?this.webkitRequestFullscreen(e):this.webkitRequestFullScreen&&this.webkitRequestFullScreen(e)}exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}fullScreenChange(){var e;null===(e=this.instance)||void 0===e||e.set_fullscreen(this.isFullscreen)}pointerDown(e){"touch"!==e.pointerType&&"pen"!==e.pointerType||(this.isTouch=!0)}async downloadSwf(){try{if(this.swfUrl){console.log("Downloading SWF: "+this.swfUrl);const e=await fetch(this.swfUrl.href);if(!e.ok)return void console.error("SWF download failed");const t=await e.blob(),n=URL.createObjectURL(t),i=document.createElement("a");i.style.display="none",i.href=n,i.download=function(e){const t=e.pathname;return t.substring(t.lastIndexOf("/")+1)}(this.swfUrl),document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)}else console.error("SWF download failed")}catch(e){console.error("SWF download failed")}}contextMenuItems(){const e=String.fromCharCode(10003),t=[];this.instance&&this.instance.prepare_context_menu().forEach(((n,i)=>{n.separatorBefore&&t.push(null),t.push({text:n.caption+(n.checked?` (${e})`:""),onClick:()=>{var e;return null===(e=this.instance)||void 0===e?void 0:e.run_context_menu_callback(i)},enabled:n.enabled})})),t.push(null),this.fullscreenEnabled&&(this.isFullscreen?t.push({text:"Exit fullscreen",onClick:()=>{var e;return null===(e=this.instance)||void 0===e?void 0:e.set_fullscreen(!1)}}):t.push({text:"Enter fullscreen",onClick:()=>{var e;return null===(e=this.instance)||void 0===e?void 0:e.set_fullscreen(!0)}})),this.instance&&this.swfUrl&&this.showSwfDownload&&(t.push(null),t.push({text:"Download .swf",onClick:this.downloadSwf.bind(this)})),t.push(null);const n=this.isExtension?"extension":"";return t.push({text:`About Ruffle ${n} (nightly 2022-07-02)`,onClick(){window.open(_,"_blank")}}),this.isTouch&&(t.push(null),t.push({text:"Hide this menu",onClick:()=>this.contextMenuForceDisabled=!0})),t}showContextMenu(e){if(e.preventDefault(),!this.hasContextMenu||this.contextMenuForceDisabled)return;for(;this.contextMenuElement.firstChild;)this.contextMenuElement.removeChild(this.contextMenuElement.firstChild);for(const e of this.contextMenuItems())if(null===e){if(!this.contextMenuElement.lastElementChild)continue;if(this.contextMenuElement.lastElementChild.classList.contains("menu_separator"))continue;const e=document.createElement("li");e.className="menu_separator";const t=document.createElement("hr");e.appendChild(t),this.contextMenuElement.appendChild(e)}else{const{text:t,onClick:n,enabled:i}=e,s=document.createElement("li");s.className="menu_item",s.textContent=t,this.contextMenuElement.appendChild(s),!1!==i?s.addEventListener("click",n):s.classList.add("disabled")}this.contextMenuElement.style.left="0",this.contextMenuElement.style.top="0",this.contextMenuElement.style.display="block";const t=this.getBoundingClientRect(),n=e.clientX-t.x,i=e.clientY-t.y,s=t.width-this.contextMenuElement.clientWidth-1,r=t.height-this.contextMenuElement.clientHeight-1;this.contextMenuElement.style.left=Math.floor(Math.min(n,s))+"px",this.contextMenuElement.style.top=Math.floor(Math.min(i,r))+"px"}hideContextMenu(){var e;null===(e=this.instance)||void 0===e||e.clear_custom_menu_items(),this.contextMenuElement.style.display="none"}pause(){this.instance&&(this.instance.pause(),this.playButton&&(this.playButton.style.display="block"))}audioState(){if(this.instance){const e=this.instance.audio_context();return e&&e.state||"running"}return"suspended"}unmuteOverlayClicked(){if(this.instance){if("running"!==this.audioState()){const e=this.instance.audio_context();e&&e.resume()}this.unmuteOverlay&&(this.unmuteOverlay.style.display="none")}}unmuteAudioContext(){A||(navigator.maxTouchPoints<1?A=!0:this.container.addEventListener("click",(()=>{var e;if(A)return;const t=null===(e=this.instance)||void 0===e?void 0:e.audio_context();if(!t)return;const n=new Audio;n.src=(()=>{const e=new ArrayBuffer(10),n=new DataView(e),i=t.sampleRate;return n.setUint32(0,i,!0),n.setUint32(4,i,!0),n.setUint16(8,1,!0),`data:audio/wav;base64,UklGRisAAABXQVZFZm10IBAAAAABAAEA${window.btoa(String.fromCharCode(...new Uint8Array(e))).slice(0,13)}AgAZGF0YQcAAACAgICAgICAAAA=`})(),n.load(),n.play().then((()=>{A=!0})).catch((e=>{console.warn(`Failed to play dummy sound: ${e}`)}))}),{once:!0}))}copyElement(e){if(e){for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t];if(n.specified){if("title"===n.name&&"Adobe Flash Player"===n.value)continue;try{this.setAttribute(n.name,n.value)}catch(e){console.warn(`Unable to set attribute ${n.name} on Ruffle instance`)}}}for(const t of Array.from(e.children))this.appendChild(t)}}static htmlDimensionToCssDimension(e){if(e){const t=e.match(S);if(t){let e=t[1];return t[3]||(e+="px"),e}}return null}onCallbackAvailable(e){const t=this.instance;this[e]=(...n)=>null==t?void 0:t.call_exposed_callback(e,n)}set traceObserver(e){var t;null===(t=this.instance)||void 0===t||t.set_trace_observer(e)}panic(e){var t;if(this.panicked)return;if(this.panicked=!0,e instanceof Error&&("AbortError"===e.name||e.message.includes("AbortError")))return;const n=null!==(t=null==e?void 0:e.ruffleIndexError)&&void 0!==t?t:0,i=Object.assign([],{stackIndex:-1});if(i.push("# Error Info\n"),e instanceof Error){if(i.push(`Error name: ${e.name}\n`),i.push(`Error message: ${e.message}\n`),e.stack){const t=i.push(`Error stack:\n\`\`\`\n${e.stack}\n\`\`\`\n`)-1;i.stackIndex=t}}else i.push(`Error: ${e}\n`);i.push("\n# Player Info\n"),i.push(this.debugPlayerInfo()),i.push("\n# Page Info\n"),i.push(`Page URL: ${document.location.href}\n`),this.swfUrl&&i.push(`SWF URL: ${this.swfUrl}\n`),i.push("\n# Browser Info\n"),i.push(`User Agent: ${window.navigator.userAgent}\n`),i.push(`Platform: ${window.navigator.platform}\n`),i.push(`Has touch support: ${window.navigator.maxTouchPoints>0}\n`),i.push("\n# Ruffle Info\n"),i.push("Version: 0.1.0\n"),i.push("Name: nightly 2022-07-02\n"),i.push("Channel: nightly\n"),i.push("Built: 2022-07-02T00:15:33.972Z\n"),i.push("Commit: 79a341d106e0e69acf4d3a2dd90632bd84e6713c\n"),i.push(`Is extension: ${this.isExtension}\n`);const s=i.join(""),r=new Date("2022-07-02T00:15:33.972Z"),o=new Date;o.setMonth(o.getMonth()-6);const a=o>r;let l,c,u;if(a)l=`<a target="_top" href="${_}#downloads">Update Ruffle</a>`;else{const e=document.location.href.split(/[?#]/)[0];let t=`https://github.com/ruffle-rs/ruffle/issues/new?title=${encodeURIComponent(`Error on ${e}`)}&template=error_report.md&labels=error-report&body=`,n=encodeURIComponent(s);i.stackIndex>-1&&String(t+n).length>8195&&(i[i.stackIndex]=null,n=encodeURIComponent(i.join(""))),t+=n,l=`<a target="_top" href="${t}">Report Bug</a>`}switch(n){case 2:c='\n <p>It appears you are running Ruffle on the "file:" protocol.</p>\n <p>This doesn\'t work as browsers block many features from working for security reasons.</p>\n <p>Instead, we invite you to setup a local server or either use the web demo or the desktop application.</p>\n ',u=`\n <li><a target="_top" href="${_}/demo">Web Demo</a></li>\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/tags">Desktop Application</a></li>\n `;break;case 4:c="\n <p>Ruffle has encountered a major issue due to an incorrect JavaScript configuration.</p>\n <p>If you are the server administrator, we invite you to check the error details to find out which parameter is at fault.</p>\n <p>You can also consult the Ruffle wiki for help.</p>\n ",u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#javascript-api">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 9:c='\n <p>Ruffle failed to load the required ".wasm" file component.</p>\n <p>If you are the server administrator, please ensure the file has correctly been uploaded.</p>\n <p>If the issue persists, you may need to use the "publicPath" setting: please consult the Ruffle wiki for help.</p>\n ',u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configuration-options">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 8:c='\n <p>Ruffle has encountered a major issue whilst trying to initialize.</p>\n <p>This web server is not serving ".wasm" files with the correct MIME type.</p>\n <p>If you are the server administrator, please consult the Ruffle wiki for help.</p>\n ',u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configure-webassembly-mime-type">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 11:c="\n <p>Ruffle failed to load the Flash SWF file.</p>\n <p>The most likely reason is that the file no longer exists, so there is nothing for Ruffle to load.</p>\n <p>Try contacting the website administrator for help.</p>\n ",u='\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 6:c='\n <p>Ruffle failed to load the required ".wasm" file component.</p>\n <p>Access to fetch has likely been blocked by CORS policy.</p>\n <p>If you are the server administrator, please consult the Ruffle wiki for help.</p>\n ',u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#web">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 3:c="\n <p>Ruffle has encountered a major issue whilst trying to initialize.</p>\n <p>It seems like this page has missing or invalid files for running Ruffle.</p>\n <p>If you are the server administrator, please consult the Ruffle wiki for help.</p>\n ",u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#addressing-a-compileerror">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 7:c="\n <p>Ruffle has encountered a major issue whilst trying to initialize.</p>\n <p>This can often resolve itself, so you can try reloading the page.</p>\n <p>Otherwise, please contact the website administrator.</p>\n ",u='\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 10:c='\n <p>Ruffle failed to load the required ".wasm" file component.</p>\n <p>To fix this, try opening your browser\'s settings, clicking "Privacy, search, and services", scrolling down, and turning off "Enhance your security on the web".</p>\n <p>This will allow your browser to load the required ".wasm" files.</p>\n <p>If the issue persists, you might have to use a different browser.</p>\n ',u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Frequently-Asked-Questions-For-Users#edge-webassembly-error">More Information</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 5:c="\n <p>Ruffle has encountered a major issue whilst trying to initialize.</p>\n <p>It seems like this page uses JavaScript code that conflicts with Ruffle.</p>\n <p>If you are the server administrator, we invite you to try loading the file on a blank page.</p>\n ",a&&(c+="<p>You can also try to upload a more recent version of Ruffle that may circumvent the issue (current build is outdated: 2022-07-02T00:15:33.972Z).</p>"),u=`\n <li>${l}</li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n `;break;case 1:c='\n <p>Ruffle has encountered a major issue whilst trying to initialize.</p>\n <p>This web server\'s Content Security Policy does not allow the required ".wasm" component to run.</p>\n <p>If you are the server administrator, please consult the Ruffle wiki for help.</p>\n ',u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configure-wasm-csp">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;default:c="<p>Ruffle has encountered a major issue whilst trying to display this Flash content.</p>",c+=a?"<p>If you are the server administrator, please try to upload a more recent version of Ruffle (current build is outdated: 2022-07-02T00:15:33.972Z).</p>":"<p>This isn't supposed to happen, so we'd really appreciate if you could file a bug!</p>",u=`\n <li>${l}</li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n `}this.container.innerHTML=`\n <div id="panic">\n <div id="panic-title">Something went wrong :(</div>\n <div id="panic-body">${c}</div>\n <div id="panic-footer">\n <ul>${u}</ul>\n </div>\n </div>\n `;const d=this.container.querySelector("#panic-view-details");d&&(d.onclick=()=>{const e=this.container.querySelector("#panic-body");return e.classList.add("details"),e.innerHTML=`<textarea>${s}</textarea>`,!1}),this.destroy()}displayRootMovieDownloadFailedMessage(){if(window.location.origin===this.swfUrl.origin||!this.isExtension||!window.location.protocol.includes("http")){const e=new Error("Failed to fetch: "+this.swfUrl);return e.ruffleIndexError=11,void this.panic(e)}const e=document.createElement("div");e.id="message_overlay",e.innerHTML=`<div class="message">\n <p>Ruffle wasn't able to run the Flash embedded in this page.</p>\n <p>You can try to open the file in a separate tab, to sidestep this issue.</p>\n <div>\n <a target="_blank" href="${this.swfUrl}">Open in a new tab</a>\n </div>\n </div>`,this.container.prepend(e)}displayUnsupportedMessage(){const e=document.createElement("div");e.id="message_overlay",e.innerHTML='<div class="message">\n <p>The Ruffle emulator does not yet support ActionScript 3, required by this content.</p>\n <p>If you choose to run it anyway, interactivity will be missing or limited.</p>\n <div>\n <a target="_blank" class="more-info-link" href="https://github.com/ruffle-rs/ruffle/wiki/Frequently-Asked-Questions-For-Users">More info</a>\n <button id="run-anyway-btn">Run anyway</button>\n </div>\n </div>',this.container.prepend(e),e.querySelector("#run-anyway-btn").onclick=()=>{e.parentNode.removeChild(e)}}displayMessage(e){const t=document.createElement("div");t.id="message_overlay",t.innerHTML=`<div class="message">\n <p>${e}</p>\n <div>\n <button id="continue-btn">continue</button>\n </div>\n </div>`,this.container.prepend(t),this.container.querySelector("#continue-btn").onclick=()=>{t.parentNode.removeChild(t)}}debugPlayerInfo(){var e,t;return`Allows script access: ${null!==(t=null===(e=this.options)||void 0===e?void 0:e.allowScriptAccess)&&void 0!==t&&t}\n`}setMetadata(e){this._metadata=e,this._readyState=2,this.dispatchEvent(new Event(R.LOADED_METADATA)),this.dispatchEvent(new Event(R.LOADED_DATA))}setIsExtension(e){this.isExtension=e}}function F(e,t){switch(e||(e="sameDomain"),e.toLowerCase()){case"always":return!0;case"never":return!1;default:try{return new URL(window.location.href).origin===new URL(t,window.location.href).origin}catch(e){return!1}}}function j(e){return null===e||"true"===e.toLowerCase()}function P(e){if(e){let t="",n="";try{const i=new URL(e,_);t=i.pathname,n=i.hostname.replace("www.","")}catch(e){}if(t.startsWith("/v/")&&("youtube.com"===n||"youtube-nocookie.com"===n))return!0}return!1}function N(e,t){var n,i;const s=e.getAttribute(t),r=null!==(i=null===(n=window.RufflePlayer)||void 0===n?void 0:n.config)&&void 0!==i?i:{};if(s)try{const n=new URL(s);"http:"===n.protocol&&"https:"===window.location.protocol&&!1!==r.upgradeToHttps&&(n.protocol="https:",e.setAttribute(t,n.toString()))}catch(e){}}function O(e){if(e){let t="";try{t=new URL(e,_).pathname}catch(e){}if(t&&t.length>=4){const e=t.slice(-4).toLowerCase();if(".swf"===e||".spl"===e)return!0}}return!1}function T(e){let t=e.parentElement;for(;null!==t;){switch(t.tagName){case"AUDIO":case"VIDEO":return!0}t=t.parentElement}return!1}R.LOADED_METADATA="loadedmetadata",R.LOADED_DATA="loadeddata";class L extends R{constructor(){super()}connectedCallback(){var e,t,n,i,s,r,o,a,l,c,u,d,h,f,p;super.connectedCallback();const m=this.attributes.getNamedItem("src");if(m){const g=null!==(t=null===(e=this.attributes.getNamedItem("allowScriptAccess"))||void 0===e?void 0:e.value)&&void 0!==t?t:null,w=null!==(i=null===(n=this.attributes.getNamedItem("menu"))||void 0===n?void 0:n.value)&&void 0!==i?i:null;this.load({url:m.value,allowScriptAccess:F(g,m.value),parameters:null===(s=this.attributes.getNamedItem("flashvars"))||void 0===s?void 0:s.value,backgroundColor:null===(r=this.attributes.getNamedItem("bgcolor"))||void 0===r?void 0:r.value,base:null===(o=this.attributes.getNamedItem("base"))||void 0===o?void 0:o.value,menu:j(w),salign:null!==(l=null===(a=this.attributes.getNamedItem("salign"))||void 0===a?void 0:a.value)&&void 0!==l?l:"",quality:null!==(u=null===(c=this.attributes.getNamedItem("quality"))||void 0===c?void 0:c.value)&&void 0!==u?u:"high",scale:null!==(h=null===(d=this.attributes.getNamedItem("scale"))||void 0===d?void 0:d.value)&&void 0!==h?h:"showAll",wmode:null!==(p=null===(f=this.attributes.getNamedItem("wmode"))||void 0===f?void 0:f.value)&&void 0!==p?p:"window"})}}get src(){var e;return null===(e=this.attributes.getNamedItem("src"))||void 0===e?void 0:e.value}set src(e){if(e){const t=document.createAttribute("src");t.value=e,this.attributes.setNamedItem(t)}else this.attributes.removeNamedItem("src")}static get observedAttributes(){return["src","width","height"]}attributeChangedCallback(e,t,n){var i;if(super.attributeChangedCallback(e,t,n),this.isConnected&&"src"===e){let e;const t=this.attributes.getNamedItem("flashvars");t&&(e=t.value);const n=this.attributes.getNamedItem("src");n&&this.load({url:n.value,parameters:e,base:null===(i=this.attributes.getNamedItem("base"))||void 0===i?void 0:i.value})}}static isInterdictable(e){if(T(e))return!1;if(!e.getAttribute("src"))return!1;if(P(e.getAttribute("src")))return N(e,"src"),!1;const t=e.getAttribute("type");if(!t)return O(e.getAttribute("src"));switch(t.toLowerCase()){case x.toLowerCase():case k.toLowerCase():case E.toLowerCase():case I.toLowerCase():return!0;default:return!1}}static fromNativeEmbedElement(e){const t=b("ruffle-embed",L),n=document.createElement(t);return n.copyElement(e),n}}function M(e,t,n){t=t.toLowerCase();for(const n in e)if(Object.hasOwnProperty.call(e,n)&&t===n.toLowerCase())return e[n];return n}function U(e){var t,n;const i={};for(const s of e.children)if(s instanceof HTMLParamElement){const e=null===(t=s.attributes.getNamedItem("name"))||void 0===t?void 0:t.value,r=null===(n=s.attributes.getNamedItem("value"))||void 0===n?void 0:n.value;e&&r&&(i[e]=r)}return i}class D extends R{constructor(){super(),this.params={}}connectedCallback(){var e;super.connectedCallback(),this.params=U(this);let t=null;this.attributes.getNamedItem("data")?t=null===(e=this.attributes.getNamedItem("data"))||void 0===e?void 0:e.value:this.params.movie&&(t=this.params.movie);const n=M(this.params,"allowScriptAccess",null),i=M(this.params,"flashvars",this.getAttribute("flashvars")),s=M(this.params,"bgcolor",this.getAttribute("bgcolor")),r=M(this.params,"base",this.getAttribute("base")),o=M(this.params,"menu",null),a=M(this.params,"salign",""),l=M(this.params,"quality","high"),c=M(this.params,"scale","showAll"),u=M(this.params,"wmode","window");if(t){const e={url:t};e.allowScriptAccess=F(n,t),i&&(e.parameters=i),s&&(e.backgroundColor=s),r&&(e.base=r),e.menu=j(o),a&&(e.salign=a),l&&(e.quality=l),c&&(e.scale=c),u&&(e.wmode=u),this.load(e)}}debugPlayerInfo(){var e;let t=super.debugPlayerInfo();t+="Player type: Object\n";let n=null;return this.attributes.getNamedItem("data")?n=null===(e=this.attributes.getNamedItem("data"))||void 0===e?void 0:e.value:this.params.movie&&(n=this.params.movie),t+=`SWF URL: ${n}\n`,Object.keys(this.params).forEach((e=>{t+=`Param ${e}: ${this.params[e]}\n`})),Object.keys(this.attributes).forEach((e=>{var n;t+=`Attribute ${e}: ${null===(n=this.attributes.getNamedItem(e))||void 0===n?void 0:n.value}\n`})),t}get data(){return this.getAttribute("data")}set data(e){if(e){const t=document.createAttribute("data");t.value=e,this.attributes.setNamedItem(t)}else this.attributes.removeNamedItem("data")}static isInterdictable(e){var t,n;if(T(e))return!1;if(e.getElementsByTagName("ruffle-object").length>0||e.getElementsByTagName("ruffle-embed").length>0)return!1;const i=null===(t=e.attributes.getNamedItem("data"))||void 0===t?void 0:t.value.toLowerCase(),s=U(e);let r;if(i){if(P(i))return N(e,"data"),!1;r=O(i)}else{if(!s||!s.movie)return!1;if(P(s.movie)){const t=e.querySelector("param[name='movie']");if(t){N(t,"value");const n=t.getAttribute("value");n&&e.setAttribute("data",n)}return!1}r=O(s.movie)}const o=null===(n=e.attributes.getNamedItem("classid"))||void 0===n?void 0:n.value.toLowerCase();if(o==="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000".toLowerCase())return!Array.from(e.getElementsByTagName("object")).some(D.isInterdictable)&&!Array.from(e.getElementsByTagName("embed")).some(L.isInterdictable);if(o)return!1;const a=e.attributes.getNamedItem("type");if(!a)return r;switch(a.value.toLowerCase()){case x.toLowerCase():case k.toLowerCase():case E.toLowerCase():case I.toLowerCase():return!0;default:return!1}}static fromNativeObjectElement(e){const t=b("ruffle-object",D),n=document.createElement(t);for(const t of Array.from(e.getElementsByTagName("embed")))L.isInterdictable(t)&&t.remove();for(const t of Array.from(e.getElementsByTagName("object")))D.isInterdictable(t)&&t.remove();return n.copyElement(e),n}}var $,B;let q;const W=null!==(B=null===($=window.RufflePlayer)||void 0===$?void 0:$.config)&&void 0!==B?B:{},V=d(W)+"ruffle.js";let z,H,Y,Z;function Q(){try{z=null!=z?z:document.getElementsByTagName("object"),H=null!=H?H:document.getElementsByTagName("embed");for(const e of Array.from(z))if(D.isInterdictable(e)){const t=D.fromNativeObjectElement(e);t.setIsExtension(q),e.replaceWith(t)}for(const e of Array.from(H))if(L.isInterdictable(e)){const t=L.fromNativeEmbedElement(e);t.setIsExtension(q),e.replaceWith(t)}}catch(e){console.error(`Serious error encountered when polyfilling native Flash elements: ${e}`)}}function G(){Y=null!=Y?Y:document.getElementsByTagName("iframe"),Z=null!=Z?Z:document.getElementsByTagName("frame"),[Y,Z].forEach((e=>{for(let t=0;t<e.length;t++){const n=e[t];if(void 0!==n.dataset.rufflePolyfilled)continue;n.dataset.rufflePolyfilled="";const i=n.contentWindow,s=`Couldn't load Ruffle into ${n.tagName}[${n.src}]: `;try{"complete"===i.document.readyState&&J(i,s)}catch(e){q||console.warn(s+e)}n.addEventListener("load",(()=>{J(i,s)}),!1)}}))}async function J(e,t){var n;let i;await new Promise((e=>{window.setTimeout((()=>{e()}),100)}));try{if(i=e.document,!i)return}catch(e){return void(q||console.warn(t+e))}if(q||void 0===i.documentElement.dataset.ruffleOptout)if(q)e.RufflePlayer||(e.RufflePlayer={}),e.RufflePlayer.config=Object.assign(Object.assign({},W),null!==(n=e.RufflePlayer.config)&&void 0!==n?n:{});else if(!e.RufflePlayer){const t=i.createElement("script");t.setAttribute("src",V),t.onload=()=>{e.RufflePlayer={},e.RufflePlayer.config=W},i.head.appendChild(t)}}class X{constructor(e,t,n,i,s){this.major=e,this.minor=t,this.patch=n,this.prIdent=i,this.buildIdent=s}static fromSemver(e){const t=e.split("+"),n=t[0].split("-"),i=n[0].split("."),s=parseInt(i[0],10);let r=0,o=0,a=null,l=null;return void 0!==i[1]&&(r=parseInt(i[1],10)),void 0!==i[2]&&(o=parseInt(i[2],10)),void 0!==n[1]&&(a=n[1].split(".")),void 0!==t[1]&&(l=t[1].split(".")),new X(s,r,o,a,l)}isCompatibleWith(e){return 0!==this.major&&this.major===e.major||0===this.major&&0===e.major&&0!==this.minor&&this.minor===e.minor||0===this.major&&0===e.major&&0===this.minor&&0===e.minor&&0!==this.patch&&this.patch===e.patch}hasPrecedenceOver(e){if(this.major>e.major)return!0;if(this.major<e.major)return!1;if(this.minor>e.minor)return!0;if(this.minor<e.minor)return!1;if(this.patch>e.patch)return!0;if(this.patch<e.patch)return!1;if(null===this.prIdent&&null!==e.prIdent)return!0;if(null!==this.prIdent&&null!==e.prIdent){const t=/^[0-9]*$/;for(let n=0;n<this.prIdent.length&&n<e.prIdent.length;n+=1){if(!t.test(this.prIdent[n])&&t.test(e.prIdent[n]))return!0;if(t.test(this.prIdent[n])&&t.test(e.prIdent[n])){if(parseInt(this.prIdent[n],10)>parseInt(e.prIdent[n],10))return!0;if(parseInt(this.prIdent[n],10)<parseInt(e.prIdent[n],10))return!1}else{if(t.test(this.prIdent[n])&&!t.test(e.prIdent[n]))return!1;if(!t.test(this.prIdent[n])&&!t.test(e.prIdent[n])){if(this.prIdent[n]>e.prIdent[n])return!0;if(this.prIdent[n]<e.prIdent[n])return!1}}}return this.prIdent.length>e.prIdent.length}return!1}isEqual(e){return this.major===e.major&&this.minor===e.minor&&this.patch===e.patch}isStableOrCompatiblePrerelease(e){return null===e.prIdent||this.major===e.major&&this.minor===e.minor&&this.patch===e.patch}}class K{constructor(e){this.requirements=e}satisfiedBy(e){for(let t=0;t<this.requirements.length;t+=1){let n=!0;for(let i=0;i<this.requirements[t].length;i+=1){const s=this.requirements[t][i].comparator,r=this.requirements[t][i].version;n=n&&r.isStableOrCompatiblePrerelease(e),""===s||"="===s?n=n&&r.isEqual(e):">"===s?n=n&&e.hasPrecedenceOver(r):">="===s?n=n&&(e.hasPrecedenceOver(r)||r.isEqual(e)):"<"===s?n=n&&r.hasPrecedenceOver(e):"<="===s?n=n&&(r.hasPrecedenceOver(e)||r.isEqual(e)):"^"===s&&(n=n&&r.isCompatibleWith(e))}if(n)return!0}return!1}static fromRequirementString(e){const t=e.split(" ");let n=[];const i=[];for(let e=0;e<t.length;e+=1)if("||"===t[e])n.length>0&&(i.push(n),n=[]);else if(t[e].length>0){const i=/[0-9]/.exec(t[e]);if(i){const s=t[e].slice(0,i.index).trim(),r=X.fromSemver(t[e].slice(i.index).trim());n.push({comparator:s,version:r})}}return n.length>0&&i.push(n),new K(i)}}class ee{constructor(e){this.sources={},this.config={},this.invoked=!1,this.newestName=null,this.conflict=null,null!=e&&(e instanceof ee?(this.sources=e.sources,this.config=e.config,this.invoked=e.invoked,this.conflict=e.conflict,this.newestName=e.newestName,e.superseded()):e.constructor===Object&&e.config instanceof Object?this.config=e.config:this.conflict=e),"loading"===document.readyState?document.addEventListener("readystatechange",this.init.bind(this)):window.setTimeout(this.init.bind(this),0)}get version(){return"0.1.0"}registerSource(e,t){this.sources[e]=t}newestSourceName(){let e=null,t=X.fromSemver("0.0.0");for(const n in this.sources)if(Object.prototype.hasOwnProperty.call(this.sources,n)){const i=X.fromSemver(this.sources[n].version);i.hasPrecedenceOver(t)&&(e=n,t=i)}return e}init(){if(!this.invoked){if(this.invoked=!0,this.newestName=this.newestSourceName(),null===this.newestName)throw new Error("No registered Ruffle source!");!1!==this.config.polyfills&&this.sources[this.newestName].polyfill("extension"===this.newestName)}}newest(){const e=this.newestSourceName();return null!==e?this.sources[e]:null}satisfying(e){const t=K.fromRequirementString(e);let n=null;for(const e in this.sources)if(Object.prototype.hasOwnProperty.call(this.sources,e)){const i=X.fromSemver(this.sources[e].version);t.satisfiedBy(i)&&(n=this.sources[e])}return n}localCompatible(){return void 0!==this.sources.local?this.satisfying("^"+this.sources.local.version):this.newest()}local(){return void 0!==this.sources.local?this.satisfying("="+this.sources.local.version):this.newest()}superseded(){this.invoked=!0}static negotiate(e,t,n){let i;return i=e instanceof ee?e:new ee(e),void 0!==t&&void 0!==n&&(i.registerSource(t,n),!1!==i.config.polyfills&&n.pluginPolyfill()),i}}window.RufflePlayer=ee.negotiate(window.RufflePlayer,"local",new class{constructor(e){this.name=e}get version(){return"0.1.0"}polyfill(e){!function(e){q=e,Q(),G(),new MutationObserver((function(e){e.some((e=>e.addedNodes.length>0))&&(Q(),G())})).observe(document,{childList:!0,subtree:!0})}(e)}pluginPolyfill(){!function(e){"install"in navigator.plugins&&navigator.plugins.install||Object.defineProperty(navigator,"plugins",{value:new g(navigator.plugins),writable:!1}),navigator.plugins.install(e),!(e.length>0)||"install"in navigator.mimeTypes&&navigator.mimeTypes.install||Object.defineProperty(navigator,"mimeTypes",{value:new p(navigator.mimeTypes),writable:!1});const t=navigator.mimeTypes;for(let n=0;n<e.length;n+=1)t.install(e[n])}(w)}createPlayer(){const e=b("ruffle-player",R);return document.createElement(e)}}("local"))})();
|
|
1
|
+
(()=>{"use strict";var e,t,n={285:(e,t,n)=>{e.exports=n.p+"2c87713f8cc6dda8ca91.wasm"},931:(e,t,n)=>{e.exports=n.p+"45264ba09d429505f426.wasm"}},i={};function s(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return n[e](r,r.exports,s),r.loaded=!0,r.exports}s.m=n,s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"core.ruffle."+{662:"93de25ca9a00e07a2eca",966:"f45b5c0662b515254bf0"}[e]+".js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="ruffle-selfhosted:",s.l=(n,i,r,o)=>{if(e[n])e[n].push(i);else{var a,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+r){a=d;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,s.nc&&a.setAttribute("nonce",s.nc),a.setAttribute("data-webpack",t+r),a.src=n),e[n]=[i];var h=(t,i)=>{a.onerror=a.onload=null,clearTimeout(f);var s=e[n];if(delete e[n],a.parentNode&&a.parentNode.removeChild(a),s&&s.forEach((e=>e(i))),t)return t(i)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),l&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.p="",(()=>{s.b=document.baseURI||self.location.href;var e={179:0};s.f.j=(t,n)=>{var i=s.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{var r=new Promise(((n,s)=>i=e[t]=[n,s]));n.push(i[2]=r);var o=s.p+s.u(t),a=new Error;s.l(o,(n=>{if(s.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",a.name="ChunkLoadError",a.type=r,a.request=o,i[1](a)}}),"chunk-"+t,t)}};var t=(t,n)=>{var i,r,[o,a,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(i in a)s.o(a,i)&&(s.m[i]=a[i]);l&&l(s)}for(t&&t(n);c<o.length;c++)r=o[c],s.o(e,r)&&e[r]&&e[r][0](),e[r]=0},n=self.webpackChunkruffle_selfhosted=self.webpackChunkruffle_selfhosted||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{const e=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),t=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),n=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),i=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),r=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));function o(e){const t="function"==typeof Function.prototype.toString?Function.prototype.toString():null;return"string"==typeof t&&t.indexOf("[native code]")>=0&&Function.prototype.toString.call(e).indexOf("[native code]")>=0}let a="";try{if(void 0!==document.currentScript&&null!==document.currentScript&&"src"in document.currentScript&&""!==document.currentScript.src){let e=document.currentScript.src;e.endsWith(".js")||e.endsWith("/")||(e+="/"),a=new URL(".",e).href}}catch(e){console.warn("Unable to get currentScript URL")}function l(e){let t=a;return null!==e.publicPath&&void 0!==e.publicPath&&(t=e.publicPath),""===t||t.endsWith("/")||(t+="/"),t}let c=null;function u(a,u){return null===c&&(c=async function(a,c){"function"==typeof Array.prototype.reduce&&o(Array.prototype.reduce)||Object.defineProperty(Array.prototype,"reduce",{value(...e){if(0===e.length&&window.Prototype&&window.Prototype.Version&&window.Prototype.Version<"1.6.1")return this.length>1?this:this[0];const t=e[0];if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(`${t} is not a function`);const n=Object(this),i=n.length>>>0;let s,r=0;if(e.length>=2)s=e[1];else{for(;r<i&&!(r in n);)r++;if(r>=i)throw new TypeError("Reduce of empty array with no initial value");s=n[r++]}for(;r<i;)r in n&&(s=t(s,n[r],r,n)),r++;return s}}),"function"==typeof Window&&o(Window)||"function"==typeof window.constructor&&o(window.constructor)&&(window.Window=window.constructor),void 0!==window.Reflect&&null!==window.Reflect||(window.Reflect={}),"function"!=typeof Reflect.get&&Object.defineProperty(Reflect,"get",{value:(e,t)=>e[t]}),"function"!=typeof Reflect.set&&Object.defineProperty(Reflect,"set",{value(e,t,n){e[t]=n}}),"function"!=typeof Reflect.has&&Object.defineProperty(Reflect,"has",{value:(e,t)=>t in e}),"function"!=typeof Reflect.ownKeys&&Object.defineProperty(Reflect,"ownKeys",{value:e=>[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)]});const u=(await Promise.all([e(),r(),n(),i(),t()])).every(Boolean);u||console.log("Some WebAssembly extensions are NOT available, falling back to the vanilla WebAssembly module"),s.p=l(a);const{default:d,Ruffle:h}=await(u?s.e(966).then(s.bind(s,966)):s.e(662).then(s.bind(s,662)));let f;const p=u?new URL(s(285),s.b):new URL(s(931),s.b),m=await fetch(p);if(c){const e=m.headers.get("content-length")||"";let t=0;const n=parseInt(e);f=new Response(new ReadableStream({async start(e){var i;const s=null===(i=m.body)||void 0===i?void 0:i.getReader();if(!s)throw"Response had no body";for(c(t,n);;){const{done:i,value:r}=await s.read();if(i)break;(null==r?void 0:r.byteLength)&&(t+=null==r?void 0:r.byteLength),e.enqueue(r),c(t,n)}e.close()}}),m)}else f=m;return await d(f),h}(a,u)),c}const d=document.createElement("template");d.innerHTML='\n <style>\n :host {\n --ruffle-blue: #37528c;\n --ruffle-orange: #ffad33;\n\n display: inline-block;\n position: relative;\n /* Default width/height; this will get overridden by user styles/attributes. */\n width: 550px;\n height: 400px;\n font-family: Arial, sans-serif;\n letter-spacing: 0.4px;\n touch-action: none;\n user-select: none;\n -webkit-user-select: none;\n -webkit-tap-highlight-color: transparent;\n }\n\n /* Ruffle\'s width/height CSS interferes Safari fullscreen CSS. */\n /* Ensure that Safari\'s fullscreen mode actually fills the screen. */\n :host(:-webkit-full-screen) {\n display: block;\n width: 100% !important;\n height: 100% !important;\n }\n\n .hidden {\n display: none !important;\n }\n\n /* All of these use the dimensions specified by the embed. */\n #container,\n #play_button,\n #unmute_overlay,\n #unmute_overlay .background,\n #panic,\n #preloader,\n #message_overlay {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n\n #container {\n overflow: hidden;\n }\n\n #container canvas {\n width: 100%;\n height: 100%;\n }\n\n #play_button,\n #unmute_overlay {\n cursor: pointer;\n display: none;\n }\n\n #unmute_overlay .background {\n background: black;\n opacity: 0.7;\n }\n\n #play_button .icon,\n #unmute_overlay .icon {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 50%;\n height: 50%;\n max-width: 384px;\n max-height: 384px;\n transform: translate(-50%, -50%);\n opacity: 0.8;\n }\n\n #play_button:hover .icon,\n #unmute_overlay:hover .icon {\n opacity: 1;\n }\n\n #panic {\n font-size: 20px;\n text-align: center;\n /* Inverted colors from play button! */\n background: linear-gradient(180deg, #fd3a40 0%, #fda138 100%);\n color: white;\n display: flex;\n flex-flow: column;\n justify-content: space-around;\n }\n\n #panic a {\n color: var(--ruffle-blue);\n font-weight: bold;\n }\n\n #panic-title {\n font-size: xxx-large;\n font-weight: bold;\n }\n\n #panic-body.details {\n flex: 0.9;\n margin: 0 10px;\n }\n\n #panic-body textarea {\n width: 100%;\n height: 100%;\n resize: none;\n }\n\n #panic ul {\n padding: 0;\n display: flex;\n list-style-type: none;\n justify-content: space-evenly;\n }\n\n #message_overlay {\n position: absolute;\n background: var(--ruffle-blue);\n color: var(--ruffle-orange);\n opacity: 1;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: auto;\n }\n\n #message_overlay .message {\n text-align: center;\n max-height: 100%;\n max-width: 100%;\n padding: 5%;\n font-size: 20px;\n }\n\n #message_overlay p {\n margin: 0.5em 0;\n }\n\n #message_overlay .message div {\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n column-gap: 1em;\n }\n\n #message_overlay a, #message_overlay button {\n cursor: pointer;\n background: var(--ruffle-blue);\n color: var(--ruffle-orange);\n border: 2px solid var(--ruffle-orange);\n font-weight: bold;\n font-size: 1.25em;\n border-radius: 0.6em;\n padding: 10px;\n text-decoration: none;\n margin: 2% 0;\n }\n\n #message_overlay a:hover, #message_overlay button:hover {\n background: #ffffff4c;\n }\n\n #continue-btn {\n cursor: pointer;\n background: var(--ruffle-blue);\n color: var(--ruffle-orange);\n border: 2px solid var(--ruffle-orange);\n font-weight: bold;\n font-size: 20px;\n border-radius: 20px;\n padding: 10px;\n }\n\n #continue-btn:hover {\n background: #ffffff4c;\n }\n\n #context-menu {\n display: none;\n color: black;\n background: #fafafa;\n border: 1px solid gray;\n box-shadow: 0px 5px 10px -5px black;\n position: absolute;\n font-size: 14px;\n text-align: left;\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n #context-menu .menu_item {\n padding: 5px 10px;\n cursor: pointer;\n color: black;\n }\n\n #context-menu .menu_item.disabled {\n cursor: default;\n color: gray;\n }\n\n #context-menu .menu_item:not(.disabled):hover {\n background: lightgray;\n }\n\n #context-menu .menu_separator hr {\n border: none;\n border-bottom: 1px solid lightgray;\n margin: 2px;\n }\n\n #preloader {\n display: flex;\n flex-direction: column;\n background: var(--preloader-background, var(--ruffle-blue));\n align-items: center;\n justify-content: center;\n }\n\n .loadbar {\n width: 100%;\n max-width: 316px;\n max-height: 10px;\n height: 20%;\n background: #253559;\n }\n\n .loadbarInner {\n width: 0px;\n max-width: 100%;\n height: 100%;\n background: var(--ruffle-orange);\n }\n \n .logo {\n display: var(--logo-display, block);\n max-width: 380px;\n max-height: 150px;\n }\n\n .loadingAnimation {\n max-width: 28px;\n max-height: 28px;\n margin-bottom: 2%;\n width: 10%;\n aspect-ratio: 1;\n }\n\n .spinner {\n stroke-dasharray: 180;\n stroke-dashoffset: 135;\n stroke: var(--ruffle-orange);\n transform-origin: 50% 50%;\n animation: rotate 1.5s linear infinite;\n }\n\n @keyframes rotate {\n to {\n transform: rotate(360deg);\n }\n }\n </style>\n <style id="dynamic_styles"></style>\n\n <div id="container">\n <div id="play_button"><div class="icon"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" viewBox="0 0 250 250" width="100%" height="100%"><defs><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="125" y1="0" x2="125" y2="250" spreadMethod="pad"><stop offset="0%" stop-color="#FDA138"/><stop offset="100%" stop-color="#FD3A40"/></linearGradient><g id="b"><path fill="url(#a)" d="M250 125q0-52-37-88-36-37-88-37T37 37Q0 73 0 125t37 88q36 37 88 37t88-37q37-36 37-88M87 195V55l100 70-100 70z"/><path fill="#FFF" d="M87 55v140l100-70L87 55z"/></g></defs><use xlink:href="#b"/></svg></div></div>\n <div id="unmute_overlay"><div class="background"></div><div class="icon"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" viewBox="0 0 512 584" width="100%" height="100%" scale="0.8"><path fill="#FFF" stroke="#FFF" d="m457.941 256 47.029-47.029c9.372-9.373 9.372-24.568 0-33.941-9.373-9.373-24.568-9.373-33.941 0l-47.029 47.029-47.029-47.029c-9.373-9.373-24.568-9.373-33.941 0-9.372 9.373-9.372 24.568 0 33.941l47.029 47.029-47.029 47.029c-9.372 9.373-9.372 24.568 0 33.941 4.686 4.687 10.827 7.03 16.97 7.03s12.284-2.343 16.971-7.029l47.029-47.03 47.029 47.029c4.687 4.687 10.828 7.03 16.971 7.03s12.284-2.343 16.971-7.029c9.372-9.373 9.372-24.568 0-33.941z"/><path fill="#FFF" stroke="#FFF" d="m99 160h-55c-24.301 0-44 19.699-44 44v104c0 24.301 19.699 44 44 44h55c2.761 0 5-2.239 5-5v-182c0-2.761-2.239-5-5-5z"/><path fill="#FFF" stroke="#FFF" d="m280 56h-24c-5.269 0-10.392 1.734-14.578 4.935l-103.459 79.116c-1.237.946-1.963 2.414-1.963 3.972v223.955c0 1.557.726 3.026 1.963 3.972l103.459 79.115c4.186 3.201 9.309 4.936 14.579 4.936h23.999c13.255 0 24-10.745 24-24v-352.001c0-13.255-10.745-24-24-24z"/><text x="256" y="560" text-anchor="middle" font-size="60px" fill="#FFF" stroke="#FFF">Click to unmute</text></svg></div></div>\n </div>\n <div class="hidden" id="preloader">\n <svg class="logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" viewBox="0 0 380 150"><g><path fill="#966214" d="M58.75 85.6q.75-.1 1.5-.35.85-.25 1.65-.75.55-.35 1.05-.8.5-.45.95-1 .5-.5.75-1.2-.05.05-.15.1-.1.15-.25.25l-.1.2q-.15.05-.25.1-.4 0-.8.05-.5-.25-.9-.5-.3-.1-.55-.3l-.6-.6-4.25-6.45-1.5 11.25h3.45m83.15-.2h3.45q.75-.1 1.5-.35.25-.05.45-.15.35-.15.65-.3l.5-.3q.25-.15.5-.35.45-.35.9-.75.45-.35.75-.85l.1-.1q.1-.2.2-.35.2-.3.35-.6l-.3.4-.15.15q-.5.15-1.1.1-.25 0-.4-.05-.5-.15-.8-.4-.15-.1-.25-.25-.3-.3-.55-.6l-.05-.05v-.05l-4.25-6.4-1.5 11.25m-21.15-3.95q-.3-.3-.55-.6l-.05-.05v-.05l-4.25-6.4-1.5 11.25h3.45q.75-.1 1.5-.35.85-.25 1.6-.75.75-.5 1.4-1.1.45-.35.75-.85.35-.5.65-1.05l-.45.55q-.5.15-1.1.1-.9 0-1.45-.7m59.15.3q-.75-.5-1.4-1-3.15-2.55-3.5-6.4l-1.5 11.25h21q-3.1-.25-5.7-.75-5.6-1.05-8.9-3.1m94.2 3.85h3.45q.6-.1 1.2-.3.4-.1.75-.2.35-.15.65-.3.7-.35 1.35-.8.75-.55 1.3-1.25.1-.15.25-.3-2.55-.25-3.25-1.8l-4.2-6.3-1.5 11.25m-45.3-4.85q-.5-.4-.9-.8-2.3-2.35-2.6-5.6l-1.5 11.25h21q-11.25-.95-16-4.85m97.7 4.85q-.3-.05-.6-.05-10.8-1-15.4-4.8-3.15-2.55-3.5-6.35l-1.5 11.2h21Z"/><path fill="var(--ruffle-orange)" d="M92.6 54.8q-1.95-1.4-4.5-1.4H60.35q-1.35 0-2.6.45-1.65.55-3.15 1.8-2.75 2.25-3.25 5.25l-1.65 12h.05v.3l5.85 1.15h-9.5q-.5.05-1 .15-.5.15-1 .35-.5.2-.95.45-.5.3-.95.7-.45.35-.85.8-.35.4-.65.85-.3.45-.5.9-.15.45-.3.95l-5.85 41.6H50.3l5-35.5 1.5-11.25 4.25 6.45.6.6q.25.2.55.3.4.25.9.5.4-.05.8-.05.1-.05.25-.1l.1-.2q.15-.1.25-.25.1-.05.15-.1l.3-1.05 1.75-12.3h11.15L75.8 82.6h16.5l2.3-16.25h-.05l.8-5.7q.4-2.45-1-4.2-.35-.4-.75-.8-.25-.25-.55-.5-.2-.2-.45-.35m16.2 18.1h.05l-.05.3 5.85 1.15H105.2q-.5.05-1 .15-.5.15-1 .35-.5.2-.95.45-.5.3-1 .65-.4.4-.8.85-.25.3-.55.65-.05.1-.15.2-.25.45-.4.9-.2.45-.3.95-.1.65-.2 1.25-.2 1.15-.4 2.25l-4.3 30.6q-.25 3 1.75 5.25 1.6 1.8 4 2.15.6.1 1.25.1h27.35q3.25 0 6-2.25.35-.35.7-.55l.3-.2q2-2 2.25-4.5l1.65-11.6q.05-.05.1-.05l1.65-11.35h.05l.7-5.2 1.5-11.25 4.25 6.4v.05l.05.05q.25.3.55.6.1.15.25.25.3.25.8.4.15.05.4.05.6.05 1.1-.1l.15-.15.3-.4.3-1.05 1.3-9.05h-.05l.7-5.05h-.05l.15-1.25h-.05l1.65-11.7h-16.25l-2.65 19.5h.05v.2l-.05.1h.05l5.8 1.15H132.7q-.5.05-1 .15-.5.15-1 .35-.15.05-.3.15-.3.1-.55.25-.05 0-.1.05-.5.3-1 .65-.4.35-.7.7-.55.7-.95 1.45-.35.65-.55 1.4-.15.7-.25 1.4v.05q-.15 1.05-.35 2.05l-1.2 8.75v.1l-2.1 14.7H111.4l2.25-15.55h.05l.7-5.2 1.5-11.25 4.25 6.4v.05l.05.05q.25.3.55.6.55.7 1.45.7.6.05 1.1-.1l.45-.55.3-1.05 1.3-9.05h-.05l.7-5.05h-.05l.15-1.25h-.05l1.65-11.7h-16.25l-2.65 19.5m106.5-41.75q-2.25-2.25-5.5-2.25h-27.75q-3 0-5.75 2.25-1.3.95-2.05 2.1-.45.6-.7 1.2-.2.5-.35 1-.1.45-.15.95l-4.15 29.95h-.05l-.7 5.2h-.05l-.2 1.35h.05l-.05.3 5.85 1.15h-9.45q-2.1.05-3.95 1.6-1.9 1.55-2.25 3.55l-.5 3.5h-.05l-5.3 38.1h16.25l5-35.5 1.5-11.25q.35 3.85 3.5 6.4.65.5 1.4 1 3.3 2.05 8.9 3.1 2.6.5 5.7.75l1.75-11.25h-12.2l.4-2.95h-.05l.7-5.05h-.05q.1-.9.3-1.9.1-.75.2-1.6.85-5.9 2.15-14.9 0-.15.05-.25l.1-.9q.2-1.55.45-3.15h11.25l-3.1 20.8h16.5l4.1-28.05q.15-1.7-.4-3.15-.5-1.1-1.35-2.1m46.65 44.15q-.5.3-1 .65-.4.4-.8.85-.35.4-.7.85-.25.45-.45.9-.15.45-.3.95l-5.85 41.6h16.25l5-35.5 1.5-11.25 4.2 6.3q.7 1.55 3.25 1.8l.05-.1q.25-.4.35-.85l.3-1.05 1.8-14.05v-.05l5.35-37.45h-16.25l-6.15 44.3 5.85 1.15h-9.45q-.5.05-1 .15-.5.15-1 .35-.5.2-.95.45m5.4-38.9q.15-1.7-.4-3.15-.5-1.1-1.35-2.1-2.25-2.25-5.5-2.25h-27.75q-2.3 0-4.45 1.35-.65.35-1.3.9-1.3.95-2.05 2.1-.45.6-.7 1.2-.4.9-.5 1.95l-4.15 29.95h-.05l-.7 5.2h-.05l-.2 1.35h.05l-.05.3 5.85 1.15h-9.45q-2.1.05-3.95 1.6-1.9 1.55-2.25 3.55l-.5 3.5h-.05l-1.2 8.75v.1l-4.1 29.25h16.25l5-35.5 1.5-11.25q.3 3.25 2.6 5.6.4.4.9.8 4.75 3.9 16 4.85l1.75-11.25h-12.2l.4-2.95h-.05l.7-5.05h-.05q.15-.9.3-1.9.1-.75.25-1.6.15-1.25.35-2.65v-.05q.95-6.7 2.35-16.5h11.25l-3.1 20.8h16.5l4.1-28.05M345 66.35h-.05l1.15-8.2q.5-3-1.75-5.25-1.25-1.25-3-1.75-1-.5-2.25-.5h-27.95q-.65 0-1.3.1-2.5.35-4.7 2.15-2.75 2.25-3.25 5.25l-1.95 14.7v.05l-.05.3 5.85 1.15h-9.45q-1.9.05-3.6 1.35-.2.1-.35.25-1.9 1.55-2.25 3.55l-4.85 34.1q-.25 3 1.75 5.25 1.25 1.4 3 1.95 1.05.3 2.25.3H320q3.25 0 6-2.25 2.75-2 3.25-5l2.75-18.5h-16.5l-1.75 11H302.5l2.1-14.75h.05l.85-6 1.5-11.2q.35 3.8 3.5 6.35 4.6 3.8 15.4 4.8.3 0 .6.05h15.75L345 66.35m-16.4-.95-1.25 8.95h-11.3l.4-2.95h-.05l.7-5.05h-.1l.15-.95h11.45Z"/></g></svg>\n <svg class="loadingAnimation" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 66 66">\n <circle class="spinner" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle>\n </svg> \n <div class="loadbar"><div class="loadbarInner"></div></div>\n </div>\n\n <ul id="context-menu"></ul>\n';const h={};function f(e,t){if(void 0!==h[e]){if(h[e].class!==t)throw new Error("Internal naming conflict on "+e);return h[e].name}let n=0;if(void 0!==window.customElements)for(;n<999;){let i=e;if(n>0&&(i=i+"-"+n),void 0===window.customElements.get(i))return window.customElements.define(i,t),h[e]={class:t,name:i,internalName:e},i;n+=1}throw new Error("Failed to assign custom element "+e)}const p={allowScriptAccess:!1,parameters:{},autoplay:"auto",backgroundColor:null,letterbox:"fullscreen",unmuteOverlay:"visible",upgradeToHttps:!0,warnOnUnsupportedContent:!0,logLevel:"error",showSwfDownload:!1,contextMenu:!0,preloader:!0,maxExecutionDuration:{secs:15,nanos:0},base:null,menu:!0,salign:"",quality:"high",scale:"showAll",wmode:"opaque",publicPath:null,polyfills:!0},m="application/x-shockwave-flash",g="application/futuresplash",v="application/x-shockwave-flash2-preview",w="application/vnd.adobe.flash.movie",y="https://ruffle.rs",b=/^\s*(\d+(\.\d+)?(%)?)/;let x=!1;function k(e){if(null==e)return{};e instanceof URLSearchParams||(e=new URLSearchParams(e));const t={};for(const[n,i]of e)t[n]=i.toString();return t}class E extends HTMLElement{constructor(){return super(),this.contextMenuForceDisabled=!1,this.isTouch=!1,this.loadedConfig=p,this.panicked=!1,this.isExtension=!1,this.config={},this.shadow=this.attachShadow({mode:"open"}),this.shadow.appendChild(d.content.cloneNode(!0)),this.dynamicStyles=this.shadow.getElementById("dynamic_styles"),this.container=this.shadow.getElementById("container"),this.playButton=this.shadow.getElementById("play_button"),this.playButton.addEventListener("click",(()=>this.play())),this.unmuteOverlay=this.shadow.getElementById("unmute_overlay"),this.preloader=this.shadow.getElementById("preloader"),this.contextMenuElement=this.shadow.getElementById("context-menu"),this.addEventListener("contextmenu",this.showContextMenu.bind(this)),this.addEventListener("pointerdown",this.pointerDown.bind(this)),this.addEventListener("fullscreenchange",this.fullScreenChange.bind(this)),this.addEventListener("webkitfullscreenchange",this.fullScreenChange.bind(this)),window.addEventListener("click",this.hideContextMenu.bind(this)),this.instance=null,this.onFSCommand=null,this._readyState=0,this._metadata=null,this.lastActivePlayingState=!1,this.setupPauseOnTabHidden(),this}get readyState(){return this._readyState}get metadata(){return this._metadata}setupPauseOnTabHidden(){document.addEventListener("visibilitychange",(()=>{this.instance&&(document.hidden&&(this.lastActivePlayingState=this.instance.is_playing(),this.instance.pause()),document.hidden||!0!==this.lastActivePlayingState||this.instance.play())}),!1)}connectedCallback(){this.updateStyles()}static get observedAttributes(){return["width","height"]}attributeChangedCallback(e,t,n){"width"!==e&&"height"!==e||this.updateStyles()}disconnectedCallback(){this.destroy()}updateStyles(){if(this.dynamicStyles.sheet){if(this.dynamicStyles.sheet.rules)for(let e=0;e<this.dynamicStyles.sheet.rules.length;e++)this.dynamicStyles.sheet.deleteRule(e);const e=this.attributes.getNamedItem("width");if(null!=e){const t=E.htmlDimensionToCssDimension(e.value);null!==t&&this.dynamicStyles.sheet.insertRule(`:host { width: ${t}; }`)}const t=this.attributes.getNamedItem("height");if(null!=t){const e=E.htmlDimensionToCssDimension(t.value);null!==e&&this.dynamicStyles.sheet.insertRule(`:host { height: ${e}; }`)}}}isUnusedFallbackObject(){const e=function(e){const t=h[e];return void 0!==t?{internalName:e,name:t.name,class:t.class}:null}("ruffle-object");if(null!==e){let t=this.parentNode;for(;t!==document&&null!==t;){if(t.nodeName===e.name)return!0;t=t.parentNode}}return!1}async ensureFreshInstance(){var e;this.destroy(),!1!==this.loadedConfig.preloader&&this.showPreloader();const t=await u(this.loadedConfig,this.onRuffleDownloadProgress.bind(this)).catch((e=>{if(console.error(`Serious error loading Ruffle: ${e}`),"file:"===window.location.protocol)e.ruffleIndexError=2;else{e.ruffleIndexError=9;const t=String(e.message).toLowerCase();t.includes("mime")?e.ruffleIndexError=8:t.includes("networkerror")||t.includes("failed to fetch")?e.ruffleIndexError=6:t.includes("disallowed by embedder")?e.ruffleIndexError=1:"CompileError"===e.name?e.ruffleIndexError=3:t.includes("could not download wasm module")&&"TypeError"===e.name?e.ruffleIndexError=7:"TypeError"===e.name?e.ruffleIndexError=5:navigator.userAgent.includes("Edg")&&t.includes("webassembly is not defined")&&(e.ruffleIndexError=10)}throw this.panic(e),e}));if(this.instance=await new t(this.container,this,this.loadedConfig),console.log("New Ruffle instance created (WebAssembly extensions: "+(t.is_wasm_simd_used()?"ON":"OFF")+")"),"running"!==this.audioState()&&(this.container.style.visibility="hidden",await new Promise((e=>{window.setTimeout((()=>{e()}),200)})),this.container.style.visibility=""),this.unmuteAudioContext(),"on"===this.loadedConfig.autoplay||"off"!==this.loadedConfig.autoplay&&"running"===this.audioState()){if(this.play(),"running"!==this.audioState()){"hidden"!==this.loadedConfig.unmuteOverlay&&(this.unmuteOverlay.style.display="block"),this.container.addEventListener("click",this.unmuteOverlayClicked.bind(this),{once:!0});const t=null===(e=this.instance)||void 0===e?void 0:e.audio_context();t&&(t.onstatechange=()=>{"running"===t.state&&this.unmuteOverlayClicked(),t.onstatechange=null})}}else this.playButton.style.display="block"}onRuffleDownloadProgress(e,t){const n=this.preloader.querySelector(".loadbarInner"),i=this.preloader.querySelector(".loadbar");Number.isNaN(t)?i&&(i.style.display="none"):n.style.width=e/t*100+"%"}destroy(){this.instance&&(this.instance.destroy(),this.instance=null,this._metadata=null,this._readyState=0,console.log("Ruffle instance destroyed."))}checkOptions(e){if("string"==typeof e)return{url:e};const t=(e,t)=>{if(!e){const e=new TypeError(t);throw e.ruffleIndexError=4,this.panic(e),e}};return t(null!==e&&"object"==typeof e,"Argument 0 must be a string or object"),t("url"in e||"data"in e,"Argument 0 must contain a `url` or `data` key"),t(!("url"in e)||"string"==typeof e.url,"`url` must be a string"),e}async load(e){var t,n;if(e=this.checkOptions(e),this.isConnected&&!this.isUnusedFallbackObject()){if(!q(this))try{if(this.loadedConfig=Object.assign(Object.assign(Object.assign(Object.assign({},p),null!==(n=null===(t=window.RufflePlayer)||void 0===t?void 0:t.config)&&void 0!==n?n:{}),this.config),e),this.loadedConfig.allowScriptAccess=!0===e.allowScriptAccess,this.loadedConfig.backgroundColor&&"transparent"!==this.loadedConfig.wmode&&(this.container.style.backgroundColor=this.loadedConfig.backgroundColor),await this.ensureFreshInstance(),"url"in e){console.log(`Loading SWF file ${e.url}`),this.swfUrl=new URL(e.url,document.baseURI);const t=Object.assign(Object.assign({},k(e.url.substring(e.url.indexOf("?")))),k(e.parameters));this.instance.stream_from(this.swfUrl.href,t)}else"data"in e&&(console.log("Loading SWF data"),this.instance.load_data(new Uint8Array(e.data),k(e.parameters)))}catch(e){throw console.error(`Serious error occurred loading SWF file: ${e}`),e}}else console.warn("Ignoring attempt to play a disconnected or suspended Ruffle element")}play(){this.instance&&(this.instance.play(),this.playButton.style.display="none")}get isPlaying(){return!!this.instance&&this.instance.is_playing()}get volume(){return this.instance?this.instance.volume():1}set volume(e){this.instance&&this.instance.set_volume(e)}get fullscreenEnabled(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}get isFullscreen(){return(document.fullscreenElement||document.webkitFullscreenElement)===this}setFullscreen(e){this.fullscreenEnabled&&(e?this.enterFullscreen():this.exitFullscreen())}enterFullscreen(){const e={navigationUI:"hide"};this.requestFullscreen?this.requestFullscreen(e):this.webkitRequestFullscreen?this.webkitRequestFullscreen(e):this.webkitRequestFullScreen&&this.webkitRequestFullScreen(e)}exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}fullScreenChange(){var e;null===(e=this.instance)||void 0===e||e.set_fullscreen(this.isFullscreen)}pointerDown(e){"touch"!==e.pointerType&&"pen"!==e.pointerType||(this.isTouch=!0)}async downloadSwf(){try{if(this.swfUrl){console.log("Downloading SWF: "+this.swfUrl);const e=await fetch(this.swfUrl.href);if(!e.ok)return void console.error("SWF download failed");const t=await e.blob(),n=URL.createObjectURL(t),i=document.createElement("a");i.style.display="none",i.href=n,i.download=function(e){const t=e.pathname;return t.substring(t.lastIndexOf("/")+1)}(this.swfUrl),document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)}else console.error("SWF download failed")}catch(e){console.error("SWF download failed")}}contextMenuItems(){const e=String.fromCharCode(10003),t=[];this.instance&&this.instance.prepare_context_menu().forEach(((n,i)=>{n.separatorBefore&&t.push(null),t.push({text:n.caption+(n.checked?` (${e})`:""),onClick:()=>{var e;return null===(e=this.instance)||void 0===e?void 0:e.run_context_menu_callback(i)},enabled:n.enabled})})),t.push(null),this.fullscreenEnabled&&(this.isFullscreen?t.push({text:"Exit fullscreen",onClick:()=>{var e;return null===(e=this.instance)||void 0===e?void 0:e.set_fullscreen(!1)}}):t.push({text:"Enter fullscreen",onClick:()=>{var e;return null===(e=this.instance)||void 0===e?void 0:e.set_fullscreen(!0)}})),this.instance&&this.swfUrl&&!0===this.loadedConfig.showSwfDownload&&(t.push(null),t.push({text:"Download .swf",onClick:this.downloadSwf.bind(this)})),window.isSecureContext&&t.push({text:"Copy debug info",onClick:()=>navigator.clipboard.writeText(this.getPanicData())}),t.push(null);const n=this.isExtension?"extension":"";return t.push({text:`About Ruffle ${n} (nightly 2022-11-25)`,onClick(){window.open(y,"_blank")}}),this.isTouch&&(t.push(null),t.push({text:"Hide this menu",onClick:()=>this.contextMenuForceDisabled=!0})),t}showContextMenu(e){if(e.preventDefault(),!1===this.loadedConfig.contextMenu||this.contextMenuForceDisabled)return;for(;this.contextMenuElement.firstChild;)this.contextMenuElement.removeChild(this.contextMenuElement.firstChild);for(const e of this.contextMenuItems())if(null===e){if(!this.contextMenuElement.lastElementChild)continue;if(this.contextMenuElement.lastElementChild.classList.contains("menu_separator"))continue;const e=document.createElement("li");e.className="menu_separator";const t=document.createElement("hr");e.appendChild(t),this.contextMenuElement.appendChild(e)}else{const{text:t,onClick:n,enabled:i}=e,s=document.createElement("li");s.className="menu_item",s.textContent=t,this.contextMenuElement.appendChild(s),!1!==i?s.addEventListener("click",n):s.classList.add("disabled")}this.contextMenuElement.style.left="0",this.contextMenuElement.style.top="0",this.contextMenuElement.style.display="block";const t=this.getBoundingClientRect(),n=e.clientX-t.x,i=e.clientY-t.y,s=t.width-this.contextMenuElement.clientWidth-1,r=t.height-this.contextMenuElement.clientHeight-1;this.contextMenuElement.style.left=Math.floor(Math.min(n,s))+"px",this.contextMenuElement.style.top=Math.floor(Math.min(i,r))+"px"}hideContextMenu(){var e;null===(e=this.instance)||void 0===e||e.clear_custom_menu_items(),this.contextMenuElement.style.display="none"}pause(){this.instance&&(this.instance.pause(),this.playButton.style.display="block")}audioState(){if(this.instance){const e=this.instance.audio_context();return e&&e.state||"running"}return"suspended"}unmuteOverlayClicked(){if(this.instance){if("running"!==this.audioState()){const e=this.instance.audio_context();e&&e.resume()}this.unmuteOverlay.style.display="none"}}unmuteAudioContext(){x||(navigator.maxTouchPoints<1?x=!0:this.container.addEventListener("click",(()=>{var e;if(x)return;const t=null===(e=this.instance)||void 0===e?void 0:e.audio_context();if(!t)return;const n=new Audio;n.src=(()=>{const e=new ArrayBuffer(10),n=new DataView(e),i=t.sampleRate;return n.setUint32(0,i,!0),n.setUint32(4,i,!0),n.setUint16(8,1,!0),`data:audio/wav;base64,UklGRisAAABXQVZFZm10IBAAAAABAAEA${window.btoa(String.fromCharCode(...new Uint8Array(e))).slice(0,13)}AgAZGF0YQcAAACAgICAgICAAAA=`})(),n.load(),n.play().then((()=>{x=!0})).catch((e=>{console.warn(`Failed to play dummy sound: ${e}`)}))}),{once:!0}))}copyElement(e){if(e){for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t];if(n.specified){if("title"===n.name&&"Adobe Flash Player"===n.value)continue;try{this.setAttribute(n.name,n.value)}catch(e){console.warn(`Unable to set attribute ${n.name} on Ruffle instance`)}}}for(const t of Array.from(e.children))this.appendChild(t)}}static htmlDimensionToCssDimension(e){if(e){const t=e.match(b);if(t){let e=t[1];return t[3]||(e+="px"),e}}return null}onCallbackAvailable(e){const t=this.instance;this[e]=(...n)=>null==t?void 0:t.call_exposed_callback(e,n)}set traceObserver(e){var t;null===(t=this.instance)||void 0===t||t.set_trace_observer(e)}getPanicData(){const e=[];if(e.push("\n# Player Info\n"),e.push(this.debugPlayerInfo()),e.push("\n# Page Info\n"),e.push(`Page URL: ${document.location.href}\n`),this.swfUrl&&e.push(`SWF URL: ${this.swfUrl}\n`),e.push("\n# Browser Info\n"),e.push(`User Agent: ${window.navigator.userAgent}\n`),e.push(`Platform: ${window.navigator.platform}\n`),e.push(`Has touch support: ${window.navigator.maxTouchPoints>0}\n`),e.push("\n# Ruffle Info\n"),e.push("Version: 0.1.0\n"),e.push("Name: nightly 2022-11-25\n"),e.push("Channel: nightly\n"),e.push("Built: 2022-11-25T00:16:08.207Z\n"),e.push("Commit: 14f27a9e4a2f7c838bb680c98cf8697df2888022\n"),e.push(`Is extension: ${this.isExtension}\n`),e.push("\n# Metadata\n"),this.metadata)for(const[t,n]of Object.entries(this.metadata))e.push(`${t}: ${n}\n`);return e.join("")}panic(e){var t;if(this.panicked)return;if(this.panicked=!0,this.hidePreloader(),e instanceof Error&&("AbortError"===e.name||e.message.includes("AbortError")))return;const n=null!==(t=null==e?void 0:e.ruffleIndexError)&&void 0!==t?t:0,i=Object.assign([],{stackIndex:-1,avmStackIndex:-1});if(i.push("# Error Info\n"),e instanceof Error){if(i.push(`Error name: ${e.name}\n`),i.push(`Error message: ${e.message}\n`),e.stack){const t=i.push(`Error stack:\n\`\`\`\n${e.stack}\n\`\`\`\n`)-1;if(e.avmStack){const t=i.push(`AVM2 stack:\n\`\`\`\n ${e.avmStack.trim().replace(/\t/g," ")}\n\`\`\`\n`)-1;i.avmStackIndex=t}i.stackIndex=t}}else i.push(`Error: ${e}\n`);i.push(this.getPanicData());const s=i.join(""),r=new Date("2022-11-25T00:16:08.207Z"),o=new Date;o.setMonth(o.getMonth()-6);const a=o>r;let l,c,u;if(a)l=`<a target="_top" href="${y}#downloads">Update Ruffle</a>`;else{const e=document.location.href.split(/[?#]/)[0];let t=`https://github.com/ruffle-rs/ruffle/issues/new?title=${encodeURIComponent(`Error on ${e}`)}&template=error_report.md&labels=error-report&body=`,n=encodeURIComponent(s);i.stackIndex>-1&&String(t+n).length>8195&&(i[i.stackIndex]=null,i.avmStackIndex>-1&&(i[i.avmStackIndex]=null),n=encodeURIComponent(i.join(""))),t+=n,l=`<a target="_top" href="${t}">Report Bug</a>`}switch(n){case 2:c='\n <p>It appears you are running Ruffle on the "file:" protocol.</p>\n <p>This doesn\'t work as browsers block many features from working for security reasons.</p>\n <p>Instead, we invite you to setup a local server or either use the web demo or the desktop application.</p>\n ',u=`\n <li><a target="_top" href="${y}/demo">Web Demo</a></li>\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/tags">Desktop Application</a></li>\n `;break;case 4:c="\n <p>Ruffle has encountered a major issue due to an incorrect JavaScript configuration.</p>\n <p>If you are the server administrator, we invite you to check the error details to find out which parameter is at fault.</p>\n <p>You can also consult the Ruffle wiki for help.</p>\n ",u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#javascript-api">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 9:c='\n <p>Ruffle failed to load the required ".wasm" file component.</p>\n <p>If you are the server administrator, please ensure the file has correctly been uploaded.</p>\n <p>If the issue persists, you may need to use the "publicPath" setting: please consult the Ruffle wiki for help.</p>\n ',u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configuration-options">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 8:c='\n <p>Ruffle has encountered a major issue whilst trying to initialize.</p>\n <p>This web server is not serving ".wasm" files with the correct MIME type.</p>\n <p>If you are the server administrator, please consult the Ruffle wiki for help.</p>\n ',u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configure-webassembly-mime-type">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 11:c="\n <p>Ruffle failed to load the Flash SWF file.</p>\n <p>The most likely reason is that the file no longer exists, so there is nothing for Ruffle to load.</p>\n <p>Try contacting the website administrator for help.</p>\n ",u='\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 6:c='\n <p>Ruffle failed to load the required ".wasm" file component.</p>\n <p>Access to fetch has likely been blocked by CORS policy.</p>\n <p>If you are the server administrator, please consult the Ruffle wiki for help.</p>\n ',u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#web">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 3:c="\n <p>Ruffle has encountered a major issue whilst trying to initialize.</p>\n <p>It seems like this page has missing or invalid files for running Ruffle.</p>\n <p>If you are the server administrator, please consult the Ruffle wiki for help.</p>\n ",u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#addressing-a-compileerror">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 7:c="\n <p>Ruffle has encountered a major issue whilst trying to initialize.</p>\n <p>This can often resolve itself, so you can try reloading the page.</p>\n <p>Otherwise, please contact the website administrator.</p>\n ",u='\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 10:c='\n <p>Ruffle failed to load the required ".wasm" file component.</p>\n <p>To fix this, try opening your browser\'s settings, clicking "Privacy, search, and services", scrolling down, and turning off "Enhance your security on the web".</p>\n <p>This will allow your browser to load the required ".wasm" files.</p>\n <p>If the issue persists, you might have to use a different browser.</p>\n ',u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Frequently-Asked-Questions-For-Users#edge-webassembly-error">More Information</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;case 5:c="\n <p>Ruffle has encountered a major issue whilst trying to initialize.</p>\n <p>It seems like this page uses JavaScript code that conflicts with Ruffle.</p>\n <p>If you are the server administrator, we invite you to try loading the file on a blank page.</p>\n ",a&&(c+="<p>You can also try to upload a more recent version of Ruffle that may circumvent the issue (current build is outdated: 2022-11-25T00:16:08.207Z).</p>"),u=`\n <li>${l}</li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n `;break;case 1:c='\n <p>Ruffle has encountered a major issue whilst trying to initialize.</p>\n <p>This web server\'s Content Security Policy does not allow the required ".wasm" component to run.</p>\n <p>If you are the server administrator, please consult the Ruffle wiki for help.</p>\n ',u='\n <li><a target="_top" href="https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configure-wasm-csp">View Ruffle Wiki</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n ';break;default:c="<p>Ruffle has encountered a major issue whilst trying to display this Flash content.</p>",c+=a?"<p>If you are the server administrator, please try to upload a more recent version of Ruffle (current build is outdated: 2022-11-25T00:16:08.207Z).</p>":"<p>This isn't supposed to happen, so we'd really appreciate if you could file a bug!</p>",u=`\n <li>${l}</li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n `}this.container.innerHTML=`\n <div id="panic">\n <div id="panic-title">Something went wrong :(</div>\n <div id="panic-body">${c}</div>\n <div id="panic-footer">\n <ul>${u}</ul>\n </div>\n </div>\n `;const d=this.container.querySelector("#panic-view-details");d&&(d.onclick=()=>{const e=this.container.querySelector("#panic-body");return e.classList.add("details"),e.innerHTML=`<textarea>${s}</textarea>`,!1}),this.destroy()}displayRootMovieDownloadFailedMessage(){if(window.location.origin===this.swfUrl.origin||!this.isExtension||!window.location.protocol.includes("http")){const e=new Error("Failed to fetch: "+this.swfUrl);return e.ruffleIndexError=11,void this.panic(e)}this.hidePreloader();const e=document.createElement("div");e.id="message_overlay",e.innerHTML=`<div class="message">\n <p>Ruffle wasn't able to run the Flash embedded in this page.</p>\n <p>You can try to open the file in a separate tab, to sidestep this issue.</p>\n <div>\n <a target="_blank" href="${this.swfUrl}">Open in a new tab</a>\n </div>\n </div>`,this.container.prepend(e)}displayUnsupportedMessage(){const e=document.createElement("div");e.id="message_overlay",e.innerHTML='<div class="message">\n <p>The Ruffle emulator does not yet support ActionScript 3, required by this content.</p>\n <p>If you choose to run it anyway, interactivity will be missing or limited.</p>\n <div>\n <a target="_blank" class="more-info-link" href="https://github.com/ruffle-rs/ruffle/wiki/Frequently-Asked-Questions-For-Users">More info</a>\n <button id="run-anyway-btn">Run anyway</button>\n </div>\n </div>',this.container.prepend(e),e.querySelector("#run-anyway-btn").onclick=()=>{e.parentNode.removeChild(e)}}displayMessage(e){const t=document.createElement("div");t.id="message_overlay",t.innerHTML=`<div class="message">\n <p>${e}</p>\n <div>\n <button id="continue-btn">continue</button>\n </div>\n </div>`,this.container.prepend(t),this.container.querySelector("#continue-btn").onclick=()=>{t.parentNode.removeChild(t)}}debugPlayerInfo(){let e=`Allows script access: ${this.loadedConfig.allowScriptAccess}\n`;return this.instance&&(e+=`Renderer: ${this.instance.renderer_name()}\n`),e}hidePreloader(){this.preloader.classList.add("hidden"),this.container.classList.remove("hidden")}showPreloader(){this.preloader.classList.remove("hidden"),this.container.classList.add("hidden")}setMetadata(e){this._metadata=e,this._readyState=2,this.hidePreloader(),this.dispatchEvent(new Event(E.LOADED_METADATA)),this.dispatchEvent(new Event(E.LOADED_DATA))}setIsExtension(e){this.isExtension=e}}function I(e,t){switch(e||(e="sameDomain"),e.toLowerCase()){case"always":return!0;case"never":return!1;default:try{return new URL(window.location.href).origin===new URL(t,window.location.href).origin}catch(e){return!1}}}function S(e){return null===e||"true"===e.toLowerCase()}function _(e){if(e){let t="",n="";try{const i=new URL(e,y);t=i.pathname,n=i.hostname.replace("www.","")}catch(e){}if(t.startsWith("/v/")&&("youtube.com"===n||"youtube-nocookie.com"===n))return!0}return!1}function A(e,t){var n,i;const s=e.getAttribute(t),r=null!==(i=null===(n=window.RufflePlayer)||void 0===n?void 0:n.config)&&void 0!==i?i:{};if(s)try{const n=new URL(s);"http:"===n.protocol&&"https:"===window.location.protocol&&!1!==r.upgradeToHttps&&(n.protocol="https:",e.setAttribute(t,n.toString()))}catch(e){}}function C(e){if(e){let t="";try{t=new URL(e,y).pathname}catch(e){}if(t&&t.length>=4){const e=t.slice(-4).toLowerCase();if(".swf"===e||".spl"===e)return!0}}return!1}function R(e){switch(e.toLowerCase()){case m.toLowerCase():case g.toLowerCase():case v.toLowerCase():case w.toLowerCase():return!0;default:return!1}}function q(e){let t=e.parentElement;for(;null!==t;){switch(t.tagName){case"AUDIO":case"VIDEO":return!0}t=t.parentElement}return!1}E.LOADED_METADATA="loadedmetadata",E.LOADED_DATA="loadeddata";class F{constructor(e){if(this.__mimetypes=[],this.__named_mimetypes={},e)for(let t=0;t<e.length;t++)this.install(e[t])}install(e){const t=this.__mimetypes.length;this.__mimetypes.push(e),this.__named_mimetypes[e.type]=e,this[e.type]=e,this[t]=e}item(e){return this.__mimetypes[e]}namedItem(e){return this.__named_mimetypes[e]}get length(){return this.__mimetypes.length}[Symbol.iterator](){return this.__mimetypes[Symbol.iterator]()}}class P extends F{constructor(e,t,n,i){super(i),this.name=e,this.description=t,this.filename=n}install(e){super.install(e)}[Symbol.iterator](){return super[Symbol.iterator]()}}class j{constructor(e){this.__plugins=[],this.__named_plugins={};for(let t=0;t<e.length;t++)this.install(e[t])}install(e){const t=this.__plugins.length;this.__plugins.push(e),this.__named_plugins[e.name]=e,this[e.name]=e,this[t]=e}item(e){return this.__plugins[e]}namedItem(e){return this.__named_plugins[e]}refresh(){}get length(){return this.__plugins.length}}const O=new P("Shockwave Flash","Shockwave Flash 32.0 r0","ruffle.js",null);O.install({type:g,description:"Shockwave Flash",suffixes:"spl",enabledPlugin:O}),O.install({type:m,description:"Shockwave Flash",suffixes:"swf",enabledPlugin:O}),O.install({type:v,description:"Shockwave Flash",suffixes:"swf",enabledPlugin:O}),O.install({type:w,description:"Shockwave Flash",suffixes:"swf",enabledPlugin:O});class N extends E{constructor(){super()}connectedCallback(){var e,t,n,i,s,r,o,a,l,c,u,d,h,f,p;super.connectedCallback();const m=this.attributes.getNamedItem("src");if(m){const g=null!==(t=null===(e=this.attributes.getNamedItem("allowScriptAccess"))||void 0===e?void 0:e.value)&&void 0!==t?t:null,v=null!==(i=null===(n=this.attributes.getNamedItem("menu"))||void 0===n?void 0:n.value)&&void 0!==i?i:null;this.load({url:m.value,allowScriptAccess:I(g,m.value),parameters:null===(s=this.attributes.getNamedItem("flashvars"))||void 0===s?void 0:s.value,backgroundColor:null===(r=this.attributes.getNamedItem("bgcolor"))||void 0===r?void 0:r.value,base:null===(o=this.attributes.getNamedItem("base"))||void 0===o?void 0:o.value,menu:S(v),salign:null!==(l=null===(a=this.attributes.getNamedItem("salign"))||void 0===a?void 0:a.value)&&void 0!==l?l:"",quality:null!==(u=null===(c=this.attributes.getNamedItem("quality"))||void 0===c?void 0:c.value)&&void 0!==u?u:"high",scale:null!==(h=null===(d=this.attributes.getNamedItem("scale"))||void 0===d?void 0:d.value)&&void 0!==h?h:"showAll",wmode:null!==(p=null===(f=this.attributes.getNamedItem("wmode"))||void 0===f?void 0:f.value)&&void 0!==p?p:"window"})}}get src(){var e;return null===(e=this.attributes.getNamedItem("src"))||void 0===e?void 0:e.value}set src(e){if(e){const t=document.createAttribute("src");t.value=e,this.attributes.setNamedItem(t)}else this.attributes.removeNamedItem("src")}static get observedAttributes(){return["src","width","height"]}attributeChangedCallback(e,t,n){var i;if(super.attributeChangedCallback(e,t,n),this.isConnected&&"src"===e){let e;const t=this.attributes.getNamedItem("flashvars");t&&(e=t.value);const n=this.attributes.getNamedItem("src");n&&this.load({url:n.value,parameters:e,base:null===(i=this.attributes.getNamedItem("base"))||void 0===i?void 0:i.value})}}static isInterdictable(e){if(q(e))return!1;if(!e.getAttribute("src"))return!1;if(_(e.getAttribute("src")))return A(e,"src"),!1;const t=e.getAttribute("type");return t?R(t):C(e.getAttribute("src"))}static fromNativeEmbedElement(e){const t=f("ruffle-embed",N),n=document.createElement(t);return n.copyElement(e),n}}function T(e,t,n){t=t.toLowerCase();for(const n in e)if(Object.hasOwnProperty.call(e,n)&&t===n.toLowerCase())return e[n];return n}function L(e){var t,n;const i={};for(const s of e.children)if(s instanceof HTMLParamElement){const e=null===(t=s.attributes.getNamedItem("name"))||void 0===t?void 0:t.value,r=null===(n=s.attributes.getNamedItem("value"))||void 0===n?void 0:n.value;e&&r&&(i[e]=r)}return i}class M extends E{constructor(){super(),this.params={}}connectedCallback(){var e;super.connectedCallback(),this.params=L(this);let t=null;this.attributes.getNamedItem("data")?t=null===(e=this.attributes.getNamedItem("data"))||void 0===e?void 0:e.value:this.params.movie&&(t=this.params.movie);const n=T(this.params,"allowScriptAccess",null),i=T(this.params,"flashvars",this.getAttribute("flashvars")),s=T(this.params,"bgcolor",this.getAttribute("bgcolor")),r=T(this.params,"base",this.getAttribute("base")),o=T(this.params,"menu",null),a=T(this.params,"salign",""),l=T(this.params,"quality","high"),c=T(this.params,"scale","showAll"),u=T(this.params,"wmode","window");if(t){const e={url:t};e.allowScriptAccess=I(n,t),i&&(e.parameters=i),s&&(e.backgroundColor=s),r&&(e.base=r),e.menu=S(o),a&&(e.salign=a),l&&(e.quality=l),c&&(e.scale=c),u&&(e.wmode=u),this.load(e)}}debugPlayerInfo(){var e;let t=super.debugPlayerInfo();t+="Player type: Object\n";let n=null;return this.attributes.getNamedItem("data")?n=null===(e=this.attributes.getNamedItem("data"))||void 0===e?void 0:e.value:this.params.movie&&(n=this.params.movie),t+=`SWF URL: ${n}\n`,Object.keys(this.params).forEach((e=>{t+=`Param ${e}: ${this.params[e]}\n`})),Object.keys(this.attributes).forEach((e=>{var n;t+=`Attribute ${e}: ${null===(n=this.attributes.getNamedItem(e))||void 0===n?void 0:n.value}\n`})),t}get data(){return this.getAttribute("data")}set data(e){if(e){const t=document.createAttribute("data");t.value=e,this.attributes.setNamedItem(t)}else this.attributes.removeNamedItem("data")}static isInterdictable(e){var t,n;if(q(e))return!1;if(e.getElementsByTagName("ruffle-object").length>0||e.getElementsByTagName("ruffle-embed").length>0)return!1;const i=null===(t=e.attributes.getNamedItem("data"))||void 0===t?void 0:t.value.toLowerCase(),s=L(e);let r;if(i){if(_(i))return A(e,"data"),!1;r=C(i)}else{if(!s||!s.movie)return!1;if(_(s.movie)){const t=e.querySelector("param[name='movie']");if(t){A(t,"value");const n=t.getAttribute("value");n&&e.setAttribute("data",n)}return!1}r=C(s.movie)}const o=null===(n=e.attributes.getNamedItem("classid"))||void 0===n?void 0:n.value.toLowerCase();if(o==="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000".toLowerCase())return!Array.from(e.getElementsByTagName("object")).some(M.isInterdictable)&&!Array.from(e.getElementsByTagName("embed")).some(N.isInterdictable);if(o)return!1;const a=e.attributes.getNamedItem("type");return a?R(a.value):r}static fromNativeObjectElement(e){const t=f("ruffle-object",M),n=document.createElement(t);for(const t of Array.from(e.getElementsByTagName("embed")))N.isInterdictable(t)&&t.remove();for(const t of Array.from(e.getElementsByTagName("object")))M.isInterdictable(t)&&t.remove();return n.copyElement(e),n}}var U,D;let $;const B=null!==(D=null===(U=window.RufflePlayer)||void 0===U?void 0:U.config)&&void 0!==D?D:{},W=l(B)+"ruffle.js";let V,H,z,Z;function Y(){try{V=null!=V?V:document.getElementsByTagName("object"),H=null!=H?H:document.getElementsByTagName("embed");for(const e of Array.from(V))if(M.isInterdictable(e)){const t=M.fromNativeObjectElement(e);t.setIsExtension($),e.replaceWith(t)}for(const e of Array.from(H))if(N.isInterdictable(e)){const t=N.fromNativeEmbedElement(e);t.setIsExtension($),e.replaceWith(t)}}catch(e){console.error(`Serious error encountered when polyfilling native Flash elements: ${e}`)}}function Q(){z=null!=z?z:document.getElementsByTagName("iframe"),Z=null!=Z?Z:document.getElementsByTagName("frame"),[z,Z].forEach((e=>{for(let t=0;t<e.length;t++){const n=e[t];if(void 0!==n.dataset.rufflePolyfilled)continue;n.dataset.rufflePolyfilled="";const i=n.contentWindow,s=`Couldn't load Ruffle into ${n.tagName}[${n.src}]: `;try{"complete"===i.document.readyState&&G(i,s)}catch(e){$||console.warn(s+e)}n.addEventListener("load",(()=>{G(i,s)}),!1)}}))}async function G(e,t){var n;let i;await new Promise((e=>{window.setTimeout((()=>{e()}),100)}));try{if(i=e.document,!i)return}catch(e){return void($||console.warn(t+e))}if($||void 0===i.documentElement.dataset.ruffleOptout)if($)e.RufflePlayer||(e.RufflePlayer={}),e.RufflePlayer.config=Object.assign(Object.assign({},B),null!==(n=e.RufflePlayer.config)&&void 0!==n?n:{});else if(!e.RufflePlayer){const t=i.createElement("script");t.setAttribute("src",W),t.onload=()=>{e.RufflePlayer={},e.RufflePlayer.config=B},i.head.appendChild(t)}}class J{constructor(e,t,n,i,s){this.major=e,this.minor=t,this.patch=n,this.prIdent=i,this.buildIdent=s}static fromSemver(e){const t=e.split("+"),n=t[0].split("-"),i=n[0].split("."),s=parseInt(i[0],10);let r=0,o=0,a=null,l=null;return void 0!==i[1]&&(r=parseInt(i[1],10)),void 0!==i[2]&&(o=parseInt(i[2],10)),void 0!==n[1]&&(a=n[1].split(".")),void 0!==t[1]&&(l=t[1].split(".")),new J(s,r,o,a,l)}isCompatibleWith(e){return 0!==this.major&&this.major===e.major||0===this.major&&0===e.major&&0!==this.minor&&this.minor===e.minor||0===this.major&&0===e.major&&0===this.minor&&0===e.minor&&0!==this.patch&&this.patch===e.patch}hasPrecedenceOver(e){if(this.major>e.major)return!0;if(this.major<e.major)return!1;if(this.minor>e.minor)return!0;if(this.minor<e.minor)return!1;if(this.patch>e.patch)return!0;if(this.patch<e.patch)return!1;if(null===this.prIdent&&null!==e.prIdent)return!0;if(null!==this.prIdent&&null!==e.prIdent){const t=/^[0-9]*$/;for(let n=0;n<this.prIdent.length&&n<e.prIdent.length;n+=1){if(!t.test(this.prIdent[n])&&t.test(e.prIdent[n]))return!0;if(t.test(this.prIdent[n])&&t.test(e.prIdent[n])){if(parseInt(this.prIdent[n],10)>parseInt(e.prIdent[n],10))return!0;if(parseInt(this.prIdent[n],10)<parseInt(e.prIdent[n],10))return!1}else{if(t.test(this.prIdent[n])&&!t.test(e.prIdent[n]))return!1;if(!t.test(this.prIdent[n])&&!t.test(e.prIdent[n])){if(this.prIdent[n]>e.prIdent[n])return!0;if(this.prIdent[n]<e.prIdent[n])return!1}}}return this.prIdent.length>e.prIdent.length}return!1}isEqual(e){return this.major===e.major&&this.minor===e.minor&&this.patch===e.patch}isStableOrCompatiblePrerelease(e){return null===e.prIdent||this.major===e.major&&this.minor===e.minor&&this.patch===e.patch}}class K{constructor(e){this.requirements=e}satisfiedBy(e){for(let t=0;t<this.requirements.length;t+=1){let n=!0;for(let i=0;i<this.requirements[t].length;i+=1){const s=this.requirements[t][i].comparator,r=this.requirements[t][i].version;n=n&&r.isStableOrCompatiblePrerelease(e),""===s||"="===s?n=n&&r.isEqual(e):">"===s?n=n&&e.hasPrecedenceOver(r):">="===s?n=n&&(e.hasPrecedenceOver(r)||r.isEqual(e)):"<"===s?n=n&&r.hasPrecedenceOver(e):"<="===s?n=n&&(r.hasPrecedenceOver(e)||r.isEqual(e)):"^"===s&&(n=n&&r.isCompatibleWith(e))}if(n)return!0}return!1}static fromRequirementString(e){const t=e.split(" ");let n=[];const i=[];for(let e=0;e<t.length;e+=1)if("||"===t[e])n.length>0&&(i.push(n),n=[]);else if(t[e].length>0){const i=/[0-9]/.exec(t[e]);if(i){const s=t[e].slice(0,i.index).trim(),r=J.fromSemver(t[e].slice(i.index).trim());n.push({comparator:s,version:r})}}return n.length>0&&i.push(n),new K(i)}}const X={version:"0.1.0",polyfill(e){!function(e){$=e,Y(),Q(),new MutationObserver((function(e){e.some((e=>e.addedNodes.length>0))&&(Y(),Q())})).observe(document,{childList:!0,subtree:!0})}(e)},pluginPolyfill(){!function(e){"install"in navigator.plugins&&navigator.plugins.install||Object.defineProperty(navigator,"plugins",{value:new j(navigator.plugins),writable:!1}),navigator.plugins.install(e),!(e.length>0)||"install"in navigator.mimeTypes&&navigator.mimeTypes.install||Object.defineProperty(navigator,"mimeTypes",{value:new F(navigator.mimeTypes),writable:!1});const t=navigator.mimeTypes;for(let n=0;n<e.length;n+=1)t.install(e[n])}(O)},createPlayer(){const e=f("ruffle-player",E);return document.createElement(e)}};class ee{constructor(e){this.sources={},this.config={},this.invoked=!1,this.newestName=null,this.conflict=null,null!=e&&(e instanceof ee?(this.sources=e.sources,this.config=e.config,this.invoked=e.invoked,this.conflict=e.conflict,this.newestName=e.newestName,e.superseded()):e.constructor===Object&&e.config instanceof Object?this.config=e.config:this.conflict=e),"loading"===document.readyState?document.addEventListener("readystatechange",this.init.bind(this)):window.setTimeout(this.init.bind(this),0)}get version(){return"0.1.0"}registerSource(e){this.sources[e]=X}newestSourceName(){let e=null,t=J.fromSemver("0.0.0");for(const n in this.sources)if(Object.prototype.hasOwnProperty.call(this.sources,n)){const i=J.fromSemver(this.sources[n].version);i.hasPrecedenceOver(t)&&(e=n,t=i)}return e}init(){if(!this.invoked){if(this.invoked=!0,this.newestName=this.newestSourceName(),null===this.newestName)throw new Error("No registered Ruffle source!");!1!==this.config.polyfills&&this.sources[this.newestName].polyfill("extension"===this.newestName)}}newest(){const e=this.newestSourceName();return null!==e?this.sources[e]:null}satisfying(e){const t=K.fromRequirementString(e);let n=null;for(const e in this.sources)if(Object.prototype.hasOwnProperty.call(this.sources,e)){const i=J.fromSemver(this.sources[e].version);t.satisfiedBy(i)&&(n=this.sources[e])}return n}localCompatible(){return void 0!==this.sources.local?this.satisfying("^"+this.sources.local.version):this.newest()}local(){return void 0!==this.sources.local?this.satisfying("="+this.sources.local.version):this.newest()}superseded(){this.invoked=!0}static negotiate(e,t){let n;return n=e instanceof ee?e:new ee(e),void 0!==t&&(n.registerSource(t),!1!==n.config.polyfills&&X.pluginPolyfill()),n}}window.RufflePlayer=ee.negotiate(window.RufflePlayer,"local")})()})();
|
|
2
2
|
//# sourceMappingURL=ruffle.js.map
|