-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.js
2 lines (2 loc) · 84.2 KB
/
index.js
1
2
(()=>{"use strict";var e={894:(e,n,t)=>{t.d(n,{Z:()=>s});var r=t(799),i=t.n(r),o=t(609),a=t.n(o)()(i());a.push([e.id,':root {\n --ruffle-blue: #37528c;\n --ruffle-orange: #ffad33;\n}\n\nbody {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 0;\n margin: 0;\n font-family: "Lato", sans-serif;\n display: flex;\n flex-flow: column;\n background: black;\n}\n\n#main {\n position: relative;\n flex: 1;\n}\n\n#overlay {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 1;\n pointer-events: none;\n border: 8px dashed var(--ruffle-orange);\n border-radius: 30px;\n opacity: 0;\n transition: opacity 0.3s ease-in;\n display: none;\n margin: 10px 5px;\n}\n\n#overlay.drag {\n opacity: 1;\n transition-timing-function: ease-out;\n}\n\n#prompt {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n color: var(--ruffle-orange);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: large;\n}\n\n#player {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: auto;\n height: auto;\n margin: 10px 0;\n}\n\n#nav {\n width: 100%;\n background: var(--ruffle-blue);\n box-shadow: 0 3px 6px 5px var(--ruffle-blue);\n display: flex;\n align-items: center;\n justify-content: space-around;\n color: white;\n padding: 10px 0 5px 0;\n margin-bottom: 5px;\n}\n\n#title {\n transition: opacity 0.5s;\n}\n\n#title:hover {\n opacity: 0.5;\n}\n\n#title img {\n height: 32px;\n}\n\n#file-picker select,\n#file-picker input,\n#author {\n margin-left: 5px;\n}\n\n#local-file-container {\n display: inline-block;\n vertical-align: middle;\n}\n\n#sample-swfs-container {\n display: none;\n vertical-align: middle;\n}\n\n#author-container {\n display: none;\n font-size: small;\n}\n\n#author {\n color: var(--ruffle-orange);\n}\n\n@media only screen and (max-width: 800px) {\n #local-file-container,\n #sample-swfs-container {\n display: block;\n }\n}\n\n@media only screen and (max-width: 600px) {\n #local-file-container {\n display: none;\n }\n\n #sample-swfs-label {\n display: none;\n }\n\n #author-container {\n font-size: 12px;\n text-align: center;\n }\n\n #nav {\n flex-flow: column;\n }\n}\n',"",{version:3,sources:["webpack://./www/index.css"],names:[],mappings:"AAAA;IACI,sBAAsB;IACtB,wBAAwB;AAC5B;;AAEA;IACI,kBAAkB;IAClB,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,UAAU;IACV,SAAS;IACT,+BAA+B;IAC/B,aAAa;IACb,iBAAiB;IACjB,iBAAiB;AACrB;;AAEA;IACI,kBAAkB;IAClB,OAAO;AACX;;AAEA;IACI,kBAAkB;IAClB,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,UAAU;IACV,oBAAoB;IACpB,uCAAuC;IACvC,mBAAmB;IACnB,UAAU;IACV,gCAAgC;IAChC,aAAa;IACb,gBAAgB;AACpB;;AAEA;IACI,UAAU;IACV,oCAAoC;AACxC;;AAEA;IACI,kBAAkB;IAClB,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,2BAA2B;IAC3B,aAAa;IACb,uBAAuB;IACvB,mBAAmB;IACnB,gBAAgB;AACpB;;AAEA;IACI,kBAAkB;IAClB,MAAM;IACN,SAAS;IACT,OAAO;IACP,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,cAAc;AAClB;;AAEA;IACI,WAAW;IACX,8BAA8B;IAC9B,4CAA4C;IAC5C,aAAa;IACb,mBAAmB;IACnB,6BAA6B;IAC7B,YAAY;IACZ,qBAAqB;IACrB,kBAAkB;AACtB;;AAEA;IACI,wBAAwB;AAC5B;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,YAAY;AAChB;;AAEA;;;IAGI,gBAAgB;AACpB;;AAEA;IACI,qBAAqB;IACrB,sBAAsB;AAC1B;;AAEA;IACI,aAAa;IACb,sBAAsB;AAC1B;;AAEA;IACI,aAAa;IACb,gBAAgB;AACpB;;AAEA;IACI,2BAA2B;AAC/B;;AAEA;IACI;;QAEI,cAAc;IAClB;AACJ;;AAEA;IACI;QACI,aAAa;IACjB;;IAEA;QACI,aAAa;IACjB;;IAEA;QACI,eAAe;QACf,kBAAkB;IACtB;;IAEA;QACI,iBAAiB;IACrB;AACJ",sourcesContent:[':root {\n --ruffle-blue: #37528c;\n --ruffle-orange: #ffad33;\n}\n\nbody {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 0;\n margin: 0;\n font-family: "Lato", sans-serif;\n display: flex;\n flex-flow: column;\n background: black;\n}\n\n#main {\n position: relative;\n flex: 1;\n}\n\n#overlay {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 1;\n pointer-events: none;\n border: 8px dashed var(--ruffle-orange);\n border-radius: 30px;\n opacity: 0;\n transition: opacity 0.3s ease-in;\n display: none;\n margin: 10px 5px;\n}\n\n#overlay.drag {\n opacity: 1;\n transition-timing-function: ease-out;\n}\n\n#prompt {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n color: var(--ruffle-orange);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: large;\n}\n\n#player {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: auto;\n height: auto;\n margin: 10px 0;\n}\n\n#nav {\n width: 100%;\n background: var(--ruffle-blue);\n box-shadow: 0 3px 6px 5px var(--ruffle-blue);\n display: flex;\n align-items: center;\n justify-content: space-around;\n color: white;\n padding: 10px 0 5px 0;\n margin-bottom: 5px;\n}\n\n#title {\n transition: opacity 0.5s;\n}\n\n#title:hover {\n opacity: 0.5;\n}\n\n#title img {\n height: 32px;\n}\n\n#file-picker select,\n#file-picker input,\n#author {\n margin-left: 5px;\n}\n\n#local-file-container {\n display: inline-block;\n vertical-align: middle;\n}\n\n#sample-swfs-container {\n display: none;\n vertical-align: middle;\n}\n\n#author-container {\n display: none;\n font-size: small;\n}\n\n#author {\n color: var(--ruffle-orange);\n}\n\n@media only screen and (max-width: 800px) {\n #local-file-container,\n #sample-swfs-container {\n display: block;\n }\n}\n\n@media only screen and (max-width: 600px) {\n #local-file-container {\n display: none;\n }\n\n #sample-swfs-label {\n display: none;\n }\n\n #author-container {\n font-size: 12px;\n text-align: center;\n }\n\n #nav {\n flex-flow: column;\n }\n}\n'],sourceRoot:""}]);const s=a},609:e=>{e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var t=e(n);return n[2]?"@media ".concat(n[2]," {").concat(t,"}"):t})).join("")},n.i=function(e,t,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);r&&i[c[0]]||(t&&(c[2]?c[2]="".concat(t," and ").concat(c[2]):c[2]=t),n.push(c))}},n}},799:e=>{function n(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}e.exports=function(e){var t,r,i=(r=4,function(e){if(Array.isArray(e))return e}(t=e)||function(e,n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(t.push(a.value),!n||t.length!==n);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return t}}(t,r)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[1],a=i[3];if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),l="/*# ".concat(c," */"),u=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[o].concat(u).concat([l]).join("\n")}return[o].join("\n")}},918:(e,n,t)=>{t.r(n),t.d(n,{default:()=>r});const r=t.p+"dd280c8a7aa464beeccc78df18fd16df.wasm"},62:(e,n,t)=>{var r,i=function(){var e={};return function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}(),o=[];function a(e){for(var n=-1,t=0;t<o.length;t++)if(o[t].identifier===e){n=t;break}return n}function s(e,n){for(var t={},r=[],i=0;i<e.length;i++){var s=e[i],c=n.base?s[0]+n.base:s[0],l=t[c]||0,u="".concat(c," ").concat(l);t[c]=l+1;var f=a(u),_={css:s[1],media:s[2],sourceMap:s[3]};-1!==f?(o[f].references++,o[f].updater(_)):o.push({identifier:u,updater:g(_,n),references:1}),r.push(u)}return r}function c(e){var n=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=t.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){n.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(n);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(n)}return n}var l,u=(l=[],function(e,n){return l[e]=n,l.filter(Boolean).join("\n")});function f(e,n,t,r){var i=t?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=u(n,i);else{var o=document.createTextNode(i),a=e.childNodes;a[n]&&e.removeChild(a[n]),a.length?e.insertBefore(o,a[n]):e.appendChild(o)}}function _(e,n,t){var r=t.css,i=t.media,o=t.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var d=null,b=0;function g(e,n){var t,r,i;if(n.singleton){var o=b++;t=d||(d=c(n)),r=f.bind(null,t,o,!1),i=f.bind(null,t,o,!0)}else t=c(n),r=_.bind(null,t,n),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return r(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;r(e=n)}else i()}}e.exports=function(e,n){(n=n||{}).singleton||"boolean"==typeof n.singleton||(n.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var t=s(e=e||[],n);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<t.length;r++){var i=a(t[r]);o[i].references--}for(var c=s(e,n),l=0;l<t.length;l++){var u=a(t[l]);0===o[u].references&&(o[u].updater(),o.splice(u,1))}t=c}}}},240:(e,n,t)=>{function r(e,n,t){n&&e.getChannelData(0).set(n),t&&e.getChannelData(1).set(t)}t.r(n),t.d(n,{AutoPlay:()=>ne,FLASH7_AND_8_MIMETYPE:()=>ce,FLASH_ACTIVEX_CLASSID:()=>ue,FLASH_MIMETYPE:()=>ae,FLASH_MOVIE_MIMETYPE:()=>le,FLASH_PLUGIN:()=>Q,FUTURESPLASH_MIMETYPE:()=>se,Letterbox:()=>te,LogLevel:()=>ie,PublicAPI:()=>Ue,RuffleEmbed:()=>he,RuffleObject:()=>ve,RufflePlayer:()=>ge,SourceAPI:()=>We,UnmuteOverlay:()=>re,Version:()=>Le,VersionRange:()=>Ne,copyToAudioBuffer:()=>r,installPlugin:()=>G,isScriptAccessAllowed:()=>we,isSwfFilename:()=>pe,loadRuffle:()=>H,lookupElement:()=>K,pluginPolyfill:()=>Te,polyfill:()=>je,publicPath:()=>Ae,registerElement:()=>ee,ruffleShadowTemplate:()=>X});const i="undefined"!=typeof AudioContext?AudioContext:webkitAudioContext;let o;const a=new Array(32).fill(void 0);function s(e){return a[e]}a.push(void 0,null,!0,!1);let c=a.length;function l(e){const n=s(e);return function(e){e<36||(a[e]=c,c=e)}(e),n}function u(e){c===a.length&&a.push(a.length+1);const n=c;return c=a[n],a[n]=e,n}let f=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});f.decode();let _=null;function d(){return null!==_&&_.buffer===o.memory.buffer||(_=new Uint8Array(o.memory.buffer)),_}function b(e,n){return f.decode(d().subarray(e,e+n))}let g=0,w=new TextEncoder("utf-8");const p="function"==typeof w.encodeInto?function(e,n){return w.encodeInto(e,n)}:function(e,n){const t=w.encode(e);return n.set(t),{read:e.length,written:t.length}};function h(e,n,t){if(void 0===t){const t=w.encode(e),r=n(t.length);return d().subarray(r,r+t.length).set(t),g=t.length,r}let r=e.length,i=n(r);const o=d();let a=0;for(;a<r;a++){const n=e.charCodeAt(a);if(n>127)break;o[i+a]=n}if(a!==r){0!==a&&(e=e.slice(a)),i=t(i,r,r=a+3*e.length);const n=d().subarray(i+a,i+r);a+=p(e,n).written}return g=a,i}let m=null;function y(){return null!==m&&m.buffer===o.memory.buffer||(m=new Int32Array(o.memory.buffer)),m}function v(e){return null==e}let A=null;function x(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+=x(e[0]));for(let r=1;r<n;r++)t+=", "+x(e[r]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(e));let r;if(!(t.length>1))return toString.call(e);if(r=t[1],"Object"==r)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function C(e,n,t,r){const i={a:e,b:n,cnt:1,dtor:t},a=(...e)=>{i.cnt++;const n=i.a;i.a=0;try{return r(n,i.b,...e)}finally{0==--i.cnt?o.__wbindgen_export_2.get(i.dtor)(n,i.b):i.a=n}};return a.original=i,a}function I(e,n){o._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcafb51350898a75b(e,n)}function k(e,n,t){o._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h079e9286e5781cde(e,n,u(t))}function E(e,n,t){o._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hd7e66b2406f7cb9d(e,n,t)}function S(e,n,t){o._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h079e9286e5781cde(e,n,u(t))}function B(e,n,t){o._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h079e9286e5781cde(e,n,u(t))}function R(e,n,t){o._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h079e9286e5781cde(e,n,u(t))}function P(e,n,t){o._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h079e9286e5781cde(e,n,u(t))}function O(e,n,t){o._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h079e9286e5781cde(e,n,u(t))}function F(e,n,t){o._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc24c451f4c610518(e,n,u(t))}let M=null;function T(e,n){return(null!==M&&M.buffer===o.memory.buffer||(M=new Float32Array(o.memory.buffer)),M).subarray(e/4,e/4+n)}function j(e){return function(){try{return e.apply(this,arguments)}catch(e){o.__wbindgen_exn_store(u(e))}}}let L=32;function N(e){if(1==L)throw new Error("out of js stack");return a[--L]=e,L}let U=null;function W(e,n){return d().subarray(e/1,e/1+n)}class D{static __wrap(e){const n=Object.create(D.prototype);return n.ptr=e,n}free(){const e=this.ptr;this.ptr=0,o.__wbg_ruffle_free(e)}constructor(e,n,t){try{var r=o.ruffle_new(u(e),u(n),N(t));return D.__wrap(r)}finally{a[L++]=void 0}}stream_from(e,n){try{var t=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),r=g;o.ruffle_stream_from(this.ptr,t,r,N(n))}finally{a[L++]=void 0}}load_data(e,n){try{o.ruffle_load_data(this.ptr,u(e),N(n))}finally{a[L++]=void 0}}play(){o.ruffle_play(this.ptr)}pause(){o.ruffle_pause(this.ptr)}is_playing(){return 0!==o.ruffle_is_playing(this.ptr)}destroy(){o.ruffle_destroy(this.ptr)}call_exposed_callback(e,n){var t=h(e,o.__wbindgen_malloc,o.__wbindgen_realloc),r=g,i=function(e,n){const t=n(4*e.length),r=(null!==U&&U.buffer===o.memory.buffer||(U=new Uint32Array(o.memory.buffer)),U);for(let n=0;n<e.length;n++)r[t/4+n]=u(e[n]);return g=e.length,t}(n,o.__wbindgen_malloc),a=g;return l(o.ruffle_call_exposed_callback(this.ptr,t,r,i,a))}set_trace_observer(e){o.ruffle_set_trace_observer(this.ptr,u(e))}audio_context(){return l(o.ruffle_audio_context(this.ptr))}}const V=async function e(n){void 0===n&&(n="file:///home/runner/work/ruffle/ruffle/web/packages/core/pkg/ruffle_web.js".replace(/\.js$/,"_bg.wasm"));const a={wbg:{}};a.wbg.__wbindgen_object_drop_ref=function(e){l(e)},a.wbg.__wbindgen_object_clone_ref=function(e){return u(s(e))},a.wbg.__wbindgen_cb_drop=function(e){const n=l(e).original;return 1==n.cnt--&&(n.a=0,!0)},a.wbg.__wbindgen_string_new=function(e,n){return u(b(e,n))},a.wbg.__wbg_isFullscreen_96b85640554e160d=function(e){return s(e).isFullscreen},a.wbg.__wbg_displayUnsupportedMessage_a8f81a8e054e5e91=function(e){s(e).displayUnsupportedMessage()},a.wbg.__wbg_displayMessage_c57c20204892da2b=function(e,n,t){s(e).displayMessage(b(n,t))},a.wbg.__wbg_new_df6e6ab7a65c4c4d=function(e,n){return u(new Error(b(e,n)))},a.wbg.__wbg_panic_bbc809dd04a12c60=function(e,n){s(e).panic(s(n))},a.wbg.__wbg_copyToAudioBuffer_58f244be94bac1d2=function(e,n,t,i,o){r(s(e),0===n?void 0:T(n,t),0===i?void 0:T(i,o))},a.wbg.__wbindgen_is_function=function(e){return"function"==typeof s(e)},a.wbg.__wbg_onCallbackAvailable_3a48fae397926c96=function(e,n,t){s(e).onCallbackAvailable(b(n,t))},a.wbg.__wbg_onFSCommand_fb2f94653f71796e=j((function(e,n,t,r,i){return s(e).onFSCommand(b(n,t),b(r,i))})),a.wbg.__wbindgen_number_new=function(e){return u(e)},a.wbg.__wbindgen_json_serialize=function(e,n){const t=s(n);var r=h(JSON.stringify(void 0===t?null:t),o.__wbindgen_malloc,o.__wbindgen_realloc),i=g;y()[e/4+1]=i,y()[e/4+0]=r},a.wbg.__wbg_new_59cb74e423758ede=function(){return u(new Error)},a.wbg.__wbg_stack_558ba5917b466edd=function(e,n){var t=h(s(n).stack,o.__wbindgen_malloc,o.__wbindgen_realloc),r=g;y()[e/4+1]=r,y()[e/4+0]=t},a.wbg.__wbg_error_4bb6c2a97407129a=function(e,n){try{console.error(b(e,n))}finally{o.__wbindgen_free(e,n)}},a.wbg.__wbindgen_is_undefined=function(e){return void 0===s(e)},a.wbg.__wbg_instanceof_WebGl2RenderingContext_9818b789249374d3=function(e){return s(e)instanceof WebGL2RenderingContext},a.wbg.__wbg_bindVertexArray_569f8b5466293fb0=function(e,n){s(e).bindVertexArray(s(n))},a.wbg.__wbg_blitFramebuffer_4b472bb45062bd6e=function(e,n,t,r,i,o,a,c,l,u,f){s(e).blitFramebuffer(n,t,r,i,o,a,c,l,u>>>0,f>>>0)},a.wbg.__wbg_createVertexArray_1f35f6d163bbae13=function(e){var n=s(e).createVertexArray();return v(n)?0:u(n)},a.wbg.__wbg_renderbufferStorageMultisample_0426ba65de4885db=function(e,n,t,r,i,o){s(e).renderbufferStorageMultisample(n>>>0,t,r>>>0,i,o)},a.wbg.__wbg_texImage2D_79c0e000ef5e1b0a=j((function(e,n,t,r,i,o,a,c,l,u,f){s(e).texImage2D(n>>>0,t,r,i,o,a,c>>>0,l>>>0,0===u?void 0:W(u,f))})),a.wbg.__wbg_bindFramebuffer_4a37c2a7678c0994=function(e,n,t){s(e).bindFramebuffer(n>>>0,s(t))},a.wbg.__wbg_bindRenderbuffer_203ad50a30ad3c0d=function(e,n,t){s(e).bindRenderbuffer(n>>>0,s(t))},a.wbg.__wbg_bindTexture_f3ab6393f75a763f=function(e,n,t){s(e).bindTexture(n>>>0,s(t))},a.wbg.__wbg_createFramebuffer_d01ac1b4f7c704e5=function(e){var n=s(e).createFramebuffer();return v(n)?0:u(n)},a.wbg.__wbg_createRenderbuffer_c008c3bb50dfff9d=function(e){var n=s(e).createRenderbuffer();return v(n)?0:u(n)},a.wbg.__wbg_createTexture_151a385cd028c893=function(e){var n=s(e).createTexture();return v(n)?0:u(n)},a.wbg.__wbg_deleteFramebuffer_acd92acda81356e9=function(e,n){s(e).deleteFramebuffer(s(n))},a.wbg.__wbg_deleteRenderbuffer_b67ff9026d2be0fd=function(e,n){s(e).deleteRenderbuffer(s(n))},a.wbg.__wbg_deleteTexture_125ab82d8330e268=function(e,n){s(e).deleteTexture(s(n))},a.wbg.__wbg_framebufferRenderbuffer_5293612146bd869a=function(e,n,t,r,i){s(e).framebufferRenderbuffer(n>>>0,t>>>0,r>>>0,s(i))},a.wbg.__wbg_framebufferTexture2D_5b8575bda5aeceeb=function(e,n,t,r,i,o){s(e).framebufferTexture2D(n>>>0,t>>>0,r>>>0,s(i),o)},a.wbg.__wbg_getError_609a7fa815fd3d84=function(e){return s(e).getError()},a.wbg.__wbg_getParameter_be1e4b3ba2c0c339=j((function(e,n){return u(s(e).getParameter(n>>>0))})),a.wbg.__wbg_texParameteri_6e7ba8c54bb639f2=function(e,n,t,r){s(e).texParameteri(n>>>0,t>>>0,r)},a.wbg.__wbg_instanceof_Window_49f532f06a9786ee=function(e){return s(e)instanceof Window},a.wbg.__wbg_document_c0366b39e4f4c89a=function(e){var n=s(e).document;return v(n)?0:u(n)},a.wbg.__wbg_location_c1e50a6e4c53d45c=function(e){return u(s(e).location)},a.wbg.__wbg_navigator_95ba9cd684cf90aa=function(e){return u(s(e).navigator)},a.wbg.__wbg_devicePixelRatio_268c49438a600d53=function(e){return s(e).devicePixelRatio},a.wbg.__wbg_performance_87e4f3b6f966469f=function(e){var n=s(e).performance;return v(n)?0:u(n)},a.wbg.__wbg_localStorage_a6fd83fc300473fc=j((function(e){var n=s(e).localStorage;return v(n)?0:u(n)})),a.wbg.__wbg_cancelAnimationFrame_60f9cf59ec1c0125=j((function(e,n){s(e).cancelAnimationFrame(n)})),a.wbg.__wbg_focus_ab7792954990fdb9=j((function(e){s(e).focus()})),a.wbg.__wbg_open_f355af0fd051a9d8=j((function(e,n,t,r,i){var o=s(e).open(b(n,t),b(r,i));return v(o)?0:u(o)})),a.wbg.__wbg_requestAnimationFrame_ef0e2294dc8b1088=j((function(e,n){return s(e).requestAnimationFrame(s(n))})),a.wbg.__wbg_fetch_f532e04b8fe49aa0=function(e,n){return u(s(e).fetch(s(n)))},a.wbg.__wbg_destination_4b8bc48ce4ebcd6c=function(e){return u(s(e).destination)},a.wbg.__wbg_sampleRate_0d2637cc084b2eaf=function(e){return s(e).sampleRate},a.wbg.__wbg_currentTime_1bc83619afbf9e72=function(e){return s(e).currentTime},a.wbg.__wbg_new_2f70ca6da1976429=j((function(){return u(new i)})),a.wbg.__wbg_suspend_ad6a97ee4bac3247=j((function(e){return u(s(e).suspend())})),a.wbg.__wbg_createBuffer_48e051aa20c4ba3e=j((function(e,n,t,r){return u(s(e).createBuffer(n>>>0,t>>>0,r))})),a.wbg.__wbg_createBufferSource_0e160528349a924b=j((function(e){return u(s(e).createBufferSource())})),a.wbg.__wbg_createChannelMerger_8e8d29d53323df91=j((function(e,n){return u(s(e).createChannelMerger(n>>>0))})),a.wbg.__wbg_createChannelSplitter_10fc5fe404818afc=j((function(e,n){return u(s(e).createChannelSplitter(n>>>0))})),a.wbg.__wbg_createGain_a6211e4c615a1141=j((function(e){return u(s(e).createGain())})),a.wbg.__wbg_createScriptProcessor_e755612398f80dd4=j((function(e,n,t,r){return u(s(e).createScriptProcessor(n>>>0,t>>>0,r>>>0))})),a.wbg.__wbg_decodeAudioData_1a1e91ec5cd60d59=j((function(e,n,t,r){return u(s(e).decodeAudioData(s(n),s(t),s(r)))})),a.wbg.__wbg_resume_6dd89ae2f9b0bef3=j((function(e){return u(s(e).resume())})),a.wbg.__wbg_setvalue_cc85088ad32e56b0=function(e,n){s(e).value=n},a.wbg.__wbg_linearRampToValueAtTime_02ce948b9b4323e0=j((function(e,n,t){return u(s(e).linearRampToValueAtTime(n,t))})),a.wbg.__wbg_setValueAtTime_788b65cf85b7ba6a=j((function(e,n,t){return u(s(e).setValueAtTime(n,t))})),a.wbg.__wbg_userAgent_b9c7a338061adca8=j((function(e,n){var t=h(s(n).userAgent,o.__wbindgen_malloc,o.__wbindgen_realloc),r=g;y()[e/4+1]=r,y()[e/4+0]=t})),a.wbg.__wbg_baseURI_1fe61dc0a39a61ed=j((function(e,n){var t=s(n).baseURI,r=v(t)?0:h(t,o.__wbindgen_malloc,o.__wbindgen_realloc),i=g;y()[e/4+1]=i,y()[e/4+0]=r})),a.wbg.__wbg_appendChild_7c45aeccd496f2a5=j((function(e,n){return u(s(e).appendChild(s(n)))})),a.wbg.__wbg_gain_688543a4eee1eece=function(e){return u(s(e).gain)},a.wbg.__wbg_protocol_791396029743ce88=j((function(e,n){var t=h(s(n).protocol,o.__wbindgen_malloc,o.__wbindgen_realloc),r=g;y()[e/4+1]=r,y()[e/4+0]=t})),a.wbg.__wbg_assign_8948549eb7c584b7=j((function(e,n,t){s(e).assign(b(n,t))})),a.wbg.__wbg_new_0af3e1641443f13d=j((function(){return u(new Path2D)})),a.wbg.__wbg_addPath_0b9c6299797f0772=function(e,n,t){s(e).addPath(s(n),s(t))},a.wbg.__wbg_closePath_6e9529e4d6da5e83=function(e){s(e).closePath()},a.wbg.__wbg_lineTo_2157bf4d1b0ce0d3=function(e,n,t){s(e).lineTo(n,t)},a.wbg.__wbg_moveTo_fb2215902520c649=function(e,n,t){s(e).moveTo(n,t)},a.wbg.__wbg_quadraticCurveTo_9c392c57a794a2d2=function(e,n,t,r,i){s(e).quadraticCurveTo(n,t,r,i)},a.wbg.__wbg_get_29a9ce40981b8710=j((function(e,n,t,r){var i=s(n)[b(t,r)],a=v(i)?0:h(i,o.__wbindgen_malloc,o.__wbindgen_realloc),c=g;y()[e/4+1]=c,y()[e/4+0]=a})),a.wbg.__wbg_set_13ecdf3c7967382d=j((function(e,n,t,r,i){s(e)[b(n,t)]=b(r,i)})),a.wbg.__wbg_delete_2c0adda5d0edea03=j((function(e,n,t){delete s(e)[b(n,t)]})),a.wbg.__wbg_length_da24898717a463e0=function(e){return s(e).length},a.wbg.__wbg_setProperty_46b9bd1b0fad730b=j((function(e,n,t,r,i){s(e).setProperty(b(n,t),b(r,i))})),a.wbg.__wbg_offsetX_4bd8c9fcb457cf0b=function(e){return s(e).offsetX},a.wbg.__wbg_offsetY_0dde12490e8ebfba=function(e){return s(e).offsetY},a.wbg.__wbg_button_9e74bd912190b055=function(e){return s(e).button},a.wbg.__wbg_instanceof_SvgsvgElement_aa3f79a2638c5f44=function(e){return s(e)instanceof SVGSVGElement},a.wbg.__wbg_createSVGMatrix_9088b605b3cbb935=function(e){return u(s(e).createSVGMatrix())},a.wbg.__wbg_connect_607a0c51b546a3db=j((function(e,n){return u(s(e).connect(s(n)))})),a.wbg.__wbg_connect_a4236fe1b645b8fb=j((function(e,n,t){return u(s(e).connect(s(n),t>>>0))})),a.wbg.__wbg_connect_db97a7bc9cd258c6=j((function(e,n,t,r){return u(s(e).connect(s(n),t>>>0,r>>>0))})),a.wbg.__wbg_disconnect_1f5d0443b0bca9c8=j((function(e){s(e).disconnect()})),a.wbg.__wbg_outputBuffer_1fc843f5ddfd743b=j((function(e){return u(s(e).outputBuffer)})),a.wbg.__wbg_setTransform_041d67e3d6972fd7=function(e,n){s(e).setTransform(s(n))},a.wbg.__wbg_bindVertexArrayOES_17e98f43d896f40b=function(e,n){s(e).bindVertexArrayOES(s(n))},a.wbg.__wbg_createVertexArrayOES_393e00fa6f931f59=function(e){var n=s(e).createVertexArrayOES();return v(n)?0:u(n)},a.wbg.__wbg_seta_6c309b33d9a4fb29=function(e,n){s(e).a=n},a.wbg.__wbg_setb_378147d7ba767ab1=function(e,n){s(e).b=n},a.wbg.__wbg_setc_cc36b264b7a1ae60=function(e,n){s(e).c=n},a.wbg.__wbg_setd_998c5989f5780653=function(e,n){s(e).d=n},a.wbg.__wbg_sete_42bf2f390f25e536=function(e,n){s(e).e=n},a.wbg.__wbg_setf_df5aef1469b0c50b=function(e,n){s(e).f=n},a.wbg.__wbg_deltaY_2722120e563d3160=function(e){return s(e).deltaY},a.wbg.__wbg_deltaMode_3db3c9c4bedf191d=function(e){return s(e).deltaMode},a.wbg.__wbg_setbuffer_8c396e74724eda12=function(e,n){s(e).buffer=s(n)},a.wbg.__wbg_setloop_1e141edefc26db22=function(e,n){s(e).loop=0!==n},a.wbg.__wbg_setloopStart_4162b0a533fbc0d5=function(e,n){s(e).loopStart=n},a.wbg.__wbg_setloopEnd_e81eb72ea2277d88=function(e,n){s(e).loopEnd=n},a.wbg.__wbg_setonended_f6f3e04e13c07db4=function(e,n){s(e).onended=s(n)},a.wbg.__wbg_start_f5e66921db9afaee=j((function(e){s(e).start()})),a.wbg.__wbg_start_0237410bb20c6213=j((function(e,n,t){s(e).start(n,t)})),a.wbg.__wbg_stop_5765c7cac3ec1564=j((function(e,n){s(e).stop(n)})),a.wbg.__wbg_instanceof_HtmlFormElement_26283084b0956b17=function(e){return s(e)instanceof HTMLFormElement},a.wbg.__wbg_submit_121b8e3bd960f229=j((function(e){s(e).submit()})),a.wbg.__wbg_pointerId_602db5c989b38cc0=function(e){return s(e).pointerId},a.wbg.__wbg_instanceof_Response_f52c65c389890639=function(e){return s(e)instanceof Response},a.wbg.__wbg_arrayBuffer_0ba17dfaad804b6f=j((function(e){return u(s(e).arrayBuffer())})),a.wbg.__wbg_data_55e064fddf34cf3b=function(e,n){var t=function(e,n){const t=n(1*e.length);return d().set(e,t/1),g=e.length,t}(s(n).data,o.__wbindgen_malloc),r=g;y()[e/4+1]=r,y()[e/4+0]=t},a.wbg.__wbg_key_d9b602f48baca7bc=function(e,n){var t=h(s(n).key,o.__wbindgen_malloc,o.__wbindgen_realloc),r=g;y()[e/4+1]=r,y()[e/4+0]=t},a.wbg.__wbg_code_cbf76ad384ae1179=function(e,n){var t=h(s(n).code,o.__wbindgen_malloc,o.__wbindgen_realloc),r=g;y()[e/4+1]=r,y()[e/4+0]=t},a.wbg.__wbg_now_7628760b7b640632=function(e){return s(e).now()},a.wbg.__wbg_newwithstrandinit_11debb554792e043=j((function(e,n,t){return u(new Request(b(e,n),s(t)))})),a.wbg.__wbg_setonaudioprocess_66d0b1fa0dd39606=function(e,n){s(e).onaudioprocess=s(n)},a.wbg.__wbg_body_c8cb19d760637268=function(e){var n=s(e).body;return v(n)?0:u(n)},a.wbg.__wbg_createElement_99351c8bf0efac6e=j((function(e,n,t){return u(s(e).createElement(b(n,t)))})),a.wbg.__wbg_createElementNS_a7ef126eff5022c2=j((function(e,n,t,r,i){return u(s(e).createElementNS(0===n?void 0:b(n,t),b(r,i)))})),a.wbg.__wbg_setid_f33ce4e43b43f57a=function(e,n,t){s(e).id=b(n,t)},a.wbg.__wbg_clientWidth_2c84a7ebc75dd4f0=function(e){return s(e).clientWidth},a.wbg.__wbg_clientHeight_f56dfe03d1c42f3e=function(e){return s(e).clientHeight},a.wbg.__wbg_querySelector_155b00165b78a12f=j((function(e,n,t){var r=s(e).querySelector(b(n,t));return v(r)?0:u(r)})),a.wbg.__wbg_releasePointerCapture_4b78cb9c51d4a539=j((function(e,n){s(e).releasePointerCapture(n)})),a.wbg.__wbg_setAttribute_e71b9086539f06a1=j((function(e,n,t,r,i){s(e).setAttribute(b(n,t),b(r,i))})),a.wbg.__wbg_setAttributeNS_a66240d5c750d0fa=j((function(e,n,t,r,i,o,a){s(e).setAttributeNS(0===n?void 0:b(n,t),b(r,i),b(o,a))})),a.wbg.__wbg_setPointerCapture_54ee987062d42d03=j((function(e,n){s(e).setPointerCapture(n)})),a.wbg.__wbg_remove_0639495587b1aaeb=function(e){s(e).remove()},a.wbg.__wbg_instanceof_WebGlRenderingContext_ef4e51c6e4133d85=function(e){return s(e)instanceof WebGLRenderingContext},a.wbg.__wbg_drawingBufferWidth_fab3e20dd1ba5d4e=function(e){return s(e).drawingBufferWidth},a.wbg.__wbg_drawingBufferHeight_31bc93d4dc3a0dcc=function(e){return s(e).drawingBufferHeight},a.wbg.__wbg_bufferData_d47c8467e443121d=function(e,n,t,r,i){s(e).bufferData(n>>>0,W(t,r),i>>>0)},a.wbg.__wbg_texImage2D_a4011abffe0229fb=j((function(e,n,t,r,i,o,a,c,l,u,f){s(e).texImage2D(n>>>0,t,r,i,o,a,c>>>0,l>>>0,0===u?void 0:W(u,f))})),a.wbg.__wbg_uniform1fv_cd9d2dea0641919d=function(e,n,t,r){s(e).uniform1fv(s(n),T(t,r))},a.wbg.__wbg_uniform4fv_24ef46675c137552=function(e,n,t,r){s(e).uniform4fv(s(n),T(t,r))},a.wbg.__wbg_uniformMatrix3fv_a0a261980af4587d=function(e,n,t,r,i){s(e).uniformMatrix3fv(s(n),0!==t,T(r,i))},a.wbg.__wbg_uniformMatrix4fv_088c96db8ee28c1d=function(e,n,t,r,i){s(e).uniformMatrix4fv(s(n),0!==t,T(r,i))},a.wbg.__wbg_activeTexture_a51ec6273de88bc6=function(e,n){s(e).activeTexture(n>>>0)},a.wbg.__wbg_attachShader_0dd248f6ab98fcf2=function(e,n,t){s(e).attachShader(s(n),s(t))},a.wbg.__wbg_bindBuffer_1ceb83e9674e812a=function(e,n,t){s(e).bindBuffer(n>>>0,s(t))},a.wbg.__wbg_bindFramebuffer_d8f98d1a7f6d67d1=function(e,n,t){s(e).bindFramebuffer(n>>>0,s(t))},a.wbg.__wbg_bindRenderbuffer_1ba9206d5f319ae1=function(e,n,t){s(e).bindRenderbuffer(n>>>0,s(t))},a.wbg.__wbg_bindTexture_6121e6db3f879582=function(e,n,t){s(e).bindTexture(n>>>0,s(t))},a.wbg.__wbg_blendFunc_34a6bb31770822c5=function(e,n,t){s(e).blendFunc(n>>>0,t>>>0)},a.wbg.__wbg_clear_f6b2dd48aeed2752=function(e,n){s(e).clear(n>>>0)},a.wbg.__wbg_clearColor_89f7819aa9f80129=function(e,n,t,r,i){s(e).clearColor(n,t,r,i)},a.wbg.__wbg_colorMask_88ebee15531b14ef=function(e,n,t,r,i){s(e).colorMask(0!==n,0!==t,0!==r,0!==i)},a.wbg.__wbg_compileShader_28bdbafe4445d24b=function(e,n){s(e).compileShader(s(n))},a.wbg.__wbg_createBuffer_acedc3831832a280=function(e){var n=s(e).createBuffer();return v(n)?0:u(n)},a.wbg.__wbg_createProgram_7e2f44b7b74694d4=function(e){var n=s(e).createProgram();return v(n)?0:u(n)},a.wbg.__wbg_createShader_64c474f1d1d0c1f8=function(e,n){var t=s(e).createShader(n>>>0);return v(t)?0:u(t)},a.wbg.__wbg_createTexture_0a156dab1efc3499=function(e){var n=s(e).createTexture();return v(n)?0:u(n)},a.wbg.__wbg_disable_5b9c6f74d5efd3a5=function(e,n){s(e).disable(n>>>0)},a.wbg.__wbg_disableVertexAttribArray_ba8f39ecd28c601b=function(e,n){s(e).disableVertexAttribArray(n>>>0)},a.wbg.__wbg_drawElements_3eb5ba8a511ce0f0=function(e,n,t,r,i){s(e).drawElements(n>>>0,t,r>>>0,i)},a.wbg.__wbg_enable_87f39f6396535e1f=function(e,n){s(e).enable(n>>>0)},a.wbg.__wbg_enableVertexAttribArray_f29c8dde9c8c5cf5=function(e,n){s(e).enableVertexAttribArray(n>>>0)},a.wbg.__wbg_getAttribLocation_ba61f837da80e249=function(e,n,t,r){return s(e).getAttribLocation(s(n),b(t,r))},a.wbg.__wbg_getExtension_c6863c255090d82f=j((function(e,n,t){var r=s(e).getExtension(b(n,t));return v(r)?0:u(r)})),a.wbg.__wbg_getParameter_ff687a6ea303e551=j((function(e,n){return u(s(e).getParameter(n>>>0))})),a.wbg.__wbg_getProgramInfoLog_aacf06c959070653=function(e,n,t){var r=s(n).getProgramInfoLog(s(t)),i=v(r)?0:h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),a=g;y()[e/4+1]=a,y()[e/4+0]=i},a.wbg.__wbg_getProgramParameter_a89bf14502c109f7=function(e,n,t){return u(s(e).getProgramParameter(s(n),t>>>0))},a.wbg.__wbg_getShaderInfoLog_1eb885f2468e2429=function(e,n,t){var r=s(n).getShaderInfoLog(s(t)),i=v(r)?0:h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),a=g;y()[e/4+1]=a,y()[e/4+0]=i},a.wbg.__wbg_getUniformLocation_ca853de4f2f9270d=function(e,n,t,r){var i=s(e).getUniformLocation(s(n),b(t,r));return v(i)?0:u(i)},a.wbg.__wbg_linkProgram_46a36cb158f10676=function(e,n){s(e).linkProgram(s(n))},a.wbg.__wbg_pixelStorei_31f6dc244bf4cd5b=function(e,n,t){s(e).pixelStorei(n>>>0,t)},a.wbg.__wbg_shaderSource_700ae72fca39850d=function(e,n,t,r){s(e).shaderSource(s(n),b(t,r))},a.wbg.__wbg_stencilFunc_cc85d77d2098446b=function(e,n,t,r){s(e).stencilFunc(n>>>0,t,r>>>0)},a.wbg.__wbg_stencilMask_ed2cded2c2b0b72c=function(e,n){s(e).stencilMask(n>>>0)},a.wbg.__wbg_stencilOp_1b3529546c1fdcc2=function(e,n,t,r){s(e).stencilOp(n>>>0,t>>>0,r>>>0)},a.wbg.__wbg_texParameteri_e45f3977eb998137=function(e,n,t,r){s(e).texParameteri(n>>>0,t>>>0,r)},a.wbg.__wbg_uniform1f_3eb09312a513b94a=function(e,n,t){s(e).uniform1f(s(n),t)},a.wbg.__wbg_uniform1i_e76b668973ae0655=function(e,n,t){s(e).uniform1i(s(n),t)},a.wbg.__wbg_useProgram_d63a57db0571e803=function(e,n){s(e).useProgram(s(n))},a.wbg.__wbg_vertexAttribPointer_b4b829a4f5a3778e=function(e,n,t,r,i,o,a){s(e).vertexAttribPointer(n>>>0,t,r>>>0,0!==i,o,a)},a.wbg.__wbg_viewport_54305c74f5668b33=function(e,n,t,r,i){s(e).viewport(n,t,r,i)},a.wbg.__wbg_debug_146b863607d79e9d=function(e){console.debug(s(e))},a.wbg.__wbg_error_e325755affc8634b=function(e){console.error(s(e))},a.wbg.__wbg_info_d60054f760c729cc=function(e){console.info(s(e))},a.wbg.__wbg_log_f2e13ca55da8bad3=function(e){console.log(s(e))},a.wbg.__wbg_warn_9e92ccdc67085e1b=function(e){console.warn(s(e))},a.wbg.__wbg_style_9b773f0fc441eddc=function(e){return u(s(e).style)},a.wbg.__wbg_newwithbuffersourcesequenceandoptions_03294a518a0bd99a=j((function(e,n){return u(new Blob(s(e),s(n)))})),a.wbg.__wbg_currentTarget_b545d0d803b3a62e=function(e){var n=s(e).currentTarget;return v(n)?0:u(n)},a.wbg.__wbg_preventDefault_9aab6c264e5df3ee=function(e){s(e).preventDefault()},a.wbg.__wbg_addEventListener_6a37bc32387cb66d=j((function(e,n,t,r){s(e).addEventListener(b(n,t),s(r))})),a.wbg.__wbg_addEventListener_a422088e686210b5=j((function(e,n,t,r,i){s(e).addEventListener(b(n,t),s(r),s(i))})),a.wbg.__wbg_addEventListener_50b4229556ab0b83=j((function(e,n,t,r,i){s(e).addEventListener(b(n,t),s(r),0!==i)})),a.wbg.__wbg_removeEventListener_70dfb387da1982ac=j((function(e,n,t,r){s(e).removeEventListener(b(n,t),s(r))})),a.wbg.__wbg_removeEventListener_4448b273b47328f8=j((function(e,n,t,r,i){s(e).removeEventListener(b(n,t),s(r),0!==i)})),a.wbg.__wbg_instanceof_HtmlCanvasElement_7bd3ee7838f11fc3=function(e){return s(e)instanceof HTMLCanvasElement},a.wbg.__wbg_width_0efa4604d41c58c5=function(e){return s(e).width},a.wbg.__wbg_setwidth_1d0e975feecff3ef=function(e,n){s(e).width=n>>>0},a.wbg.__wbg_height_aa24e3fef658c4a8=function(e){return s(e).height},a.wbg.__wbg_setheight_7758ee3ff5c65474=function(e,n){s(e).height=n>>>0},a.wbg.__wbg_getContext_3db9399e6dc524ff=j((function(e,n,t){var r=s(e).getContext(b(n,t));return v(r)?0:u(r)})),a.wbg.__wbg_getContext_93be69215ea9dbbf=j((function(e,n,t,r){var i=s(e).getContext(b(n,t),s(r));return v(i)?0:u(i)})),a.wbg.__wbg_setsrc_ca894d724570195d=function(e,n,t){s(e).src=b(n,t)},a.wbg.__wbg_new_1f2ded01c889cd38=j((function(){return u(new Image)})),a.wbg.__wbg_newwithwidthandheight_0f3a13502ca94c49=j((function(e,n){return u(new Image(e>>>0,n>>>0))})),a.wbg.__wbg_instanceof_CanvasRenderingContext2d_1d38418d1d6c8b34=function(e){return s(e)instanceof CanvasRenderingContext2D},a.wbg.__wbg_setglobalAlpha_b4134dbd884b4d37=function(e,n){s(e).globalAlpha=n},a.wbg.__wbg_setglobalCompositeOperation_557a59a0ccf673d6=j((function(e,n,t){s(e).globalCompositeOperation=b(n,t)})),a.wbg.__wbg_setstrokeStyle_7f507e0d838e3dcf=function(e,n){s(e).strokeStyle=s(n)},a.wbg.__wbg_setfillStyle_bbe97cb93eb1b55c=function(e,n){s(e).fillStyle=s(n)},a.wbg.__wbg_setfilter_df75805bea0a8415=function(e,n,t){s(e).filter=b(n,t)},a.wbg.__wbg_setlineWidth_61de9d1eb4e9f8a6=function(e,n){s(e).lineWidth=n},a.wbg.__wbg_setlineCap_bff1a8858c9f067e=function(e,n,t){s(e).lineCap=b(n,t)},a.wbg.__wbg_setlineJoin_de47815c918d7874=function(e,n,t){s(e).lineJoin=b(n,t)},a.wbg.__wbg_setmiterLimit_84b1a1dbddcd456a=function(e,n){s(e).miterLimit=n},a.wbg.__wbg_drawImage_b8dec9034bf1d116=j((function(e,n,t,r){s(e).drawImage(s(n),t,r)})),a.wbg.__wbg_drawImage_801ad094f4734689=j((function(e,n,t,r){s(e).drawImage(s(n),t,r)})),a.wbg.__wbg_fill_6c721ab8eec90f70=function(e,n){s(e).fill(s(n))},a.wbg.__wbg_stroke_e25cf47e0d9a36c3=function(e,n){s(e).stroke(s(n))},a.wbg.__wbg_createPattern_006b6402db95df36=j((function(e,n,t,r){var i=s(e).createPattern(s(n),b(t,r));return v(i)?0:u(i)})),a.wbg.__wbg_getImageData_dd3caac873bf461f=j((function(e,n,t,r,i){return u(s(e).getImageData(n,t,r,i))})),a.wbg.__wbg_clearRect_6af85454d06df5fa=function(e,n,t,r,i){s(e).clearRect(n,t,r,i)},a.wbg.__wbg_fillRect_c79d1b386c04efed=function(e,n,t,r,i){s(e).fillRect(n,t,r,i)},a.wbg.__wbg_resetTransform_f78edb82fd1f7239=j((function(e){s(e).resetTransform()})),a.wbg.__wbg_setTransform_5f5f19301b76a8d6=j((function(e,n,t,r,i,o,a){s(e).setTransform(n,t,r,i,o,a)})),a.wbg.__wbg_get_5fa3f454aa041e6e=function(e,n){return u(s(e)[n>>>0])},a.wbg.__wbg_next_373211328013f949=j((function(e){return u(s(e).next())})),a.wbg.__wbg_done_49c598117f977077=function(e){return s(e).done},a.wbg.__wbg_value_c9ae6368b110a068=function(e){return u(s(e).value)},a.wbg.__wbg_get_85e0a3b459845fe2=j((function(e,n){return u(Reflect.get(s(e),s(n)))})),a.wbg.__wbg_call_951bd0c6d815d6f1=j((function(e,n){return u(s(e).call(s(n)))})),a.wbg.__wbg_new_9dff83a08f5994f3=function(){return u(new Array)},a.wbg.__wbg_isArray_cf56c8363b1b35d9=function(e){return Array.isArray(s(e))},a.wbg.__wbg_of_3a4bb382824dd437=function(e,n){return u(Array.of(s(e),s(n)))},a.wbg.__wbg_push_3ddd8187ff2ff82d=function(e,n){return s(e).push(s(n))},a.wbg.__wbg_instanceof_ArrayBuffer_3a0fa134e6809d57=function(e){return s(e)instanceof ArrayBuffer},a.wbg.__wbg_new_24c0ca5f23ee2dd9=function(e){return u(new ArrayBuffer(e>>>0))},a.wbg.__wbg_slice_a498e5bb17f253f3=function(e,n,t){return u(s(e).slice(n>>>0,t>>>0))},a.wbg.__wbg_values_f28e313e2260a03a=function(e){return u(s(e).values())},a.wbg.__wbg_newnoargs_7c6bd521992b4022=function(e,n){return u(new Function(b(e,n)))},a.wbg.__wbg_apply_4e68243803368d89=j((function(e,n,t){return u(s(e).apply(s(n),s(t)))})),a.wbg.__wbg_call_bf745b1758bb6693=j((function(e,n,t){return u(s(e).call(s(n),s(t)))})),a.wbg.__wbg_getTime_cf686ab22ab03a3e=function(e){return s(e).getTime()},a.wbg.__wbg_getTimezoneOffset_b9f3c4664b1a35ae=function(e){return s(e).getTimezoneOffset()},a.wbg.__wbg_new0_abd359df4aeb5b55=function(){return u(new Date)},a.wbg.__wbg_instanceof_Object_cdaa71ad2ca2f4c5=function(e){return s(e)instanceof Object},a.wbg.__wbg_entries_7144a7309b22df64=function(e){return u(Object.entries(s(e)))},a.wbg.__wbg_fromEntries_cc1186a09f1ec7f2=j((function(e){return u(Object.fromEntries(s(e)))})),a.wbg.__wbg_is_049b1aece40b5301=function(e,n){return Object.is(s(e),s(n))},a.wbg.__wbg_new_ba07d0daa0e4677e=function(){return u(new Object)},a.wbg.__wbg_resolve_6e61e640925a0db9=function(e){return u(Promise.resolve(s(e)))},a.wbg.__wbg_then_dd3785597974798a=function(e,n){return u(s(e).then(s(n)))},a.wbg.__wbg_then_0f957e0f4c3e537a=function(e,n,t){return u(s(e).then(s(n),s(t)))},a.wbg.__wbg_self_6baf3a3aa7b63415=j((function(){return u(self.self)})),a.wbg.__wbg_window_63fc4027b66c265b=j((function(){return u(window.window)})),a.wbg.__wbg_globalThis_513fb247e8e4e6d2=j((function(){return u(globalThis.globalThis)})),a.wbg.__wbg_global_b87245cd886d7113=j((function(){return u(t.g.global)})),a.wbg.__wbg_buffer_3f12a1c608c6d04e=function(e){return u(s(e).buffer)},a.wbg.__wbg_newwithbyteoffsetandlength_4c51342f87299c5a=function(e,n,t){return u(new Uint8Array(s(e),n>>>0,t>>>0))},a.wbg.__wbg_length_c645e7c02233b440=function(e){return s(e).length},a.wbg.__wbg_new_c6c0228e6d22a2f9=function(e){return u(new Uint8Array(s(e)))},a.wbg.__wbg_set_b91afac9fd216d99=function(e,n,t){s(e).set(s(n),t>>>0)},a.wbg.__wbg_fill_f49407f577541856=function(e,n,t,r){return u(s(e).fill(n,t>>>0,r>>>0))},a.wbg.__wbg_buffer_c385539cb4060297=function(e){return u(s(e).buffer)},a.wbg.__wbg_byteLength_11e6bdc2fac53a3c=function(e){return s(e).byteLength},a.wbg.__wbg_byteOffset_5db4e07752c85395=function(e){return s(e).byteOffset},a.wbg.__wbg_ownKeys_d44c25f33e28bfab=j((function(e){return u(Reflect.ownKeys(s(e)))})),a.wbg.__wbg_set_9bdd413385146137=j((function(e,n,t){return Reflect.set(s(e),s(n),s(t))})),a.wbg.__wbindgen_number_get=function(e,n){const t=s(n);var r="number"==typeof t?t:void 0;(null!==A&&A.buffer===o.memory.buffer||(A=new Float64Array(o.memory.buffer)),A)[e/8+1]=v(r)?0:r,y()[e/4+0]=!v(r)},a.wbg.__wbindgen_string_get=function(e,n){const t=s(n);var r="string"==typeof t?t:void 0,i=v(r)?0:h(r,o.__wbindgen_malloc,o.__wbindgen_realloc),a=g;y()[e/4+1]=a,y()[e/4+0]=i},a.wbg.__wbindgen_boolean_get=function(e){const n=s(e);return"boolean"==typeof n?n?1:0:2},a.wbg.__wbindgen_debug_string=function(e,n){var t=h(x(s(n)),o.__wbindgen_malloc,o.__wbindgen_realloc),r=g;y()[e/4+1]=r,y()[e/4+0]=t},a.wbg.__wbindgen_throw=function(e,n){throw new Error(b(e,n))},a.wbg.__wbindgen_rethrow=function(e){throw l(e)},a.wbg.__wbindgen_memory=function(){return u(o.memory)},a.wbg.__wbindgen_closure_wrapper1217=function(e,n,t){return u(C(e,n,513,I))},a.wbg.__wbindgen_closure_wrapper1219=function(e,n,t){return u(C(e,n,513,k))},a.wbg.__wbindgen_closure_wrapper1221=function(e,n,t){return u(C(e,n,513,E))},a.wbg.__wbindgen_closure_wrapper1223=function(e,n,t){return u(C(e,n,513,S))},a.wbg.__wbindgen_closure_wrapper1225=function(e,n,t){return u(C(e,n,513,B))},a.wbg.__wbindgen_closure_wrapper1227=function(e,n,t){return u(C(e,n,513,R))},a.wbg.__wbindgen_closure_wrapper1229=function(e,n,t){return u(C(e,n,513,P))},a.wbg.__wbindgen_closure_wrapper1231=function(e,n,t){return u(C(e,n,513,O))},a.wbg.__wbindgen_closure_wrapper1729=function(e,n,t){return u(C(e,n,829,F))},("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:c,module:f}=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 n,a);return o=c.exports,e.__wbindgen_wasm_module=f,o};function $(e){const n="function"==typeof Function.prototype.toString?Function.prototype.toString():null;return"string"==typeof n&&n.indexOf("[native code]")>=0&&Function.prototype.toString.call(e).indexOf("[native code]")>=0}let q=null;function H(){return null==q&&(q=function(){return e=this,n=void 0,i=function*(){"function"==typeof Array.prototype.reduce&&$(Array.prototype.reduce)||Object.defineProperty(Array.prototype,"reduce",{value:function(...e){if(0===e.length&&window.Prototype&&window.Prototype.Version&&window.Prototype.Version<"1.6.1")return this.length>1?this:this[0];const n=e[0];if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof n)throw new TypeError(`${n} is not a function`);const t=Object(this),r=t.length>>>0;let i,o=0;if(e.length>=2)i=e[1];else{for(;o<r&&!(o in t);)o++;if(o>=r)throw new TypeError("Reduce of empty array with no initial value");i=t[o++]}for(;o<r;)o in t&&(i=n(i,t[o],o,t)),o++;return i}}),"function"==typeof Window&&$(Window)||"function"==typeof window.constructor&&$(window.constructor)&&(window.Window=window.constructor),null==window.Reflect&&(window.Reflect={}),"function"!=typeof Reflect.get&&Object.defineProperty(Reflect,"get",{value:function(e,n){return e[n]}}),"function"!=typeof Reflect.set&&Object.defineProperty(Reflect,"set",{value:function(e,n,t){e[n]=t}});const e=yield Promise.resolve().then(t.bind(t,918));return yield V(e.default),D},new((r=void 0)||(r=Promise))((function(t,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}c((i=i.apply(e,n||[])).next())}));var e,n,r,i}()),q}class z{constructor(e){if(this.__mimetypes=[],this.__named_mimetypes={},e)for(let n=0;n<e.length;n++)this.install(e[n])}install(e){const n=this.__mimetypes.length;this.__mimetypes.push(e),this.__named_mimetypes[e.type]=e,this[e.type]=e,this[n]=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 Y extends z{constructor(e,n,t,r){super(r),this.name=e,this.description=n,this.filename=t}install(e){super.install(e)}[Symbol.iterator](){return super[Symbol.iterator]()}}class J{constructor(e){this.__plugins=[],this.__named_plugins={};for(let n=0;n<e.length;n++)this.install(e[n])}install(e){const n=this.__plugins.length;this.__plugins.push(e),this.__named_plugins[e.name]=e,this[e.name]=e,this[n]=e}item(e){return this.__plugins[e]}namedItem(e){return this.__named_plugins[e]}get length(){return this.__plugins.length}}const Q=new Y("Shockwave Flash","Shockwave Flash 32.0 r0","ruffle.js",null);function G(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 z(navigator.mimeTypes),writable:!1});const n=navigator.mimeTypes;for(let t=0;t<e.length;t+=1)n.install(e[t])}Q.install({type:"application/futuresplash",description:"Shockwave Flash",suffixes:"spl",enabledPlugin:Q}),Q.install({type:"application/x-shockwave-flash",description:"Shockwave Flash",suffixes:"swf",enabledPlugin:Q}),Q.install({type:"application/x-shockwave-flash2-preview",description:"Shockwave Flash",suffixes:"swf",enabledPlugin:Q}),Q.install({type:"application/vnd.adobe.flash-movie",description:"Shockwave Flash",suffixes:"swf",enabledPlugin:Q});const X=document.createElement("template");X.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 /* 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 }\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 }\n\n #context-menu .active {\n cursor: pointer;\n color: black;\n }\n\n #context-menu .disabled {\n cursor: default;\n color: gray;\n }\n\n #context-menu .active: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" style="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" style="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" style="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 Z={};function K(e){const n=Z[e];return void 0!==n?{internalName:e,name:n.name,class:n.class}:null}function ee(e,n){if(void 0!==Z[e]){if(Z[e].class!==n)throw new Error("Internal naming conflict on "+e);return Z[e].name}let t=0;for(;;)try{let r=e;return t>0&&(r=r+"-"+t),window.customElements.define(r,n),Z[e]={class:n,name:r,internalName:e},r}catch(e){"NotSupportedError"===e.name&&(t+=1)}}var ne,te,re,ie;!function(e){e.On="on",e.Off="off",e.Auto="auto"}(ne||(ne={})),function(e){e.Off="off",e.Fullscreen="fullscreen",e.On="on"}(te||(te={})),function(e){e.Visible="visible",e.Hidden="hidden"}(re||(re={})),function(e){e.Error="error",e.Warn="warn",e.Info="info",e.Debug="debug",e.Trace="trace"}(ie||(ie={}));var oe=function(e,n,t,r){return new(t||(t=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,s)}c((r=r.apply(e,n||[])).next())}))};const ae="application/x-shockwave-flash",se="application/futuresplash",ce="application/x-shockwave-flash2-preview",le="application/vnd.adobe.flash-movie",ue="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",fe="https://ruffle.rs",_e=/^\s*(\d+(\.\d+)?(%)?)/;var de;function be(e){if(null==e)return{};e instanceof URLSearchParams||(e=new URLSearchParams(e));const n={};for(const[t,r]of e)n[t]=r.toString();return n}!function(e){e[e.Unknown=0]="Unknown",e[e.FileProtocol=1]="FileProtocol",e[e.JavascriptConfiguration=2]="JavascriptConfiguration",e[e.JavascriptConflict=3]="JavascriptConflict",e[e.WasmCors=4]="WasmCors",e[e.WasmMimeType=5]="WasmMimeType",e[e.WasmNotFound=6]="WasmNotFound"}(de||(de={}));class ge extends HTMLElement{constructor(){return super(),this.hasContextMenu=!1,this.panicked=!1,this.config={},this.shadow=this.attachShadow({mode:"open"}),this.shadow.appendChild(X.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.playButtonClicked.bind(this)),this.unmuteOverlay=this.shadow.getElementById("unmute_overlay"),this.unmuteOverlay.addEventListener("click",this.unmuteOverlayClicked.bind(this)),this.contextMenuElement=this.shadow.getElementById("context-menu"),this.addEventListener("contextmenu",this.showContextMenu.bind(this)),window.addEventListener("click",this.hideContextMenu.bind(this)),this.instance=null,this.options=null,this.onFSCommand=null,this._trace_observer=null,this.ruffleConstructor=H(),this.lastActivePlayingState=!1,this.setupPauseOnTabHidden(),this}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,n,t){"width"!==e&&"height"!==e||this.updateStyles()}disconnectedCallback(){this.instance&&(this.instance.destroy(),this.instance=null,console.log("Ruffle instance destroyed."))}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 n=ge.htmlDimensionToCssDimension(e.value);null!==n&&this.dynamicStyles.sheet.insertRule(`:host { width: ${n}; }`)}const n=this.attributes.getNamedItem("height");if(null!=n){const e=ge.htmlDimensionToCssDimension(n.value);null!==e&&this.dynamicStyles.sheet.insertRule(`:host { height: ${e}; }`)}}}isUnusedFallbackObject(){let e=this.parentNode;const n=K("ruffle-object");if(null!==n)for(;e!=document&&null!=e;){if(e.nodeName===n.name)return!0;e=e.parentNode}return!1}ensureFreshInstance(e){var n;return oe(this,void 0,void 0,(function*(){this.instance&&(this.instance.destroy(),this.instance=null,console.log("Ruffle instance destroyed."));const t=yield this.ruffleConstructor.catch((e=>{if(console.error(`Serious error loading Ruffle: ${e}`),"file:"===window.location.protocol)e.ruffleIndexError=de.FileProtocol;else{e.ruffleIndexError=de.WasmNotFound;const n=String(e.message).toLowerCase();n.includes("mime")?e.ruffleIndexError=de.WasmMimeType:n.includes("networkerror")||n.includes("failed to fetch")?e.ruffleIndexError=de.WasmCors:n.includes("magic")||"CompileError"!==e.name&&"TypeError"!==e.name||(e.ruffleIndexError=de.JavascriptConflict)}throw this.panic(e),e}));this.instance=new t(this.container,this,e),console.log("New Ruffle instance created."),"running"!==this.audioState()&&(this.container.style.visibility="hidden",yield new Promise((e=>{window.setTimeout((()=>{e()}),200)})),this.container.style.visibility="");const r=Object.values(Object(ne)).includes(e.autoplay)?e.autoplay:ne.Auto,i=Object.values(Object(re)).includes(e.unmuteOverlay)?e.unmuteOverlay:re.Visible;if(r==ne.On||r==ne.Auto&&"running"===this.audioState()){if(this.play(),"running"!==this.audioState()){this.unmuteOverlay.style.display="block",this.unmuteOverlay.childNodes.forEach((e=>{"style"in e&&(e.style.visibility=i==re.Visible?"":"hidden")}));const e=null===(n=this.instance)||void 0===n?void 0:n.audio_context();e&&(e.onstatechange=()=>{"running"===e.state&&this.unmuteOverlayClicked(),e.onstatechange=null})}}else this.playButton.style.display="block"}))}load(e){var n,t;return oe(this,void 0,void 0,(function*(){let r="";switch(typeof e){case"string":e={url:e};break;case"object":null===e?r="Argument 0 must be a string or object":"url"in e||"data"in e?"url"in e&&"string"!=typeof e.url&&(r="`url` must be a string"):r="Argument 0 must contain a `url` or `data` key";break;default:r="Argument 0 must be a string or object"}if(r.length>0){const e=new TypeError(r);throw e.ruffleIndexError=de.JavascriptConfiguration,this.panic(e),e}if(this.isConnected&&!this.isUnusedFallbackObject())try{const r=Object.assign(Object.assign(Object.assign({},null!==(t=null===(n=window.RufflePlayer)||void 0===n?void 0:n.config)&&void 0!==t?t:{}),this.config),e);if(r.allowScriptAccess=e.allowScriptAccess,this.options=e,this.hasContextMenu=!1!==r.contextMenu,r.backgroundColor&&(this.container.style.backgroundColor=r.backgroundColor),yield this.ensureFreshInstance(r),"url"in e){console.log(`Loading SWF file ${e.url}`);try{this.swfUrl=new URL(e.url,document.location.href).href}catch(n){this.swfUrl=e.url}const n=Object.assign(Object.assign({},be(e.url.substring(e.url.indexOf("?")))),be(e.parameters));this.instance.stream_from(e.url,n)}else"data"in e&&(console.log("Loading SWF data"),this.instance.load_data(new Uint8Array(e.data),be(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")}))}playButtonClicked(){this.play()}play(){this.instance&&(this.instance.play(),this.playButton&&(this.playButton.style.display="none"))}get fullscreenEnabled(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}get isFullscreen(){return(document.fullscreenElement||document.webkitFullscreenElement)===this}enterFullscreen(){this.requestFullscreen?this.requestFullscreen():this.webkitRequestFullScreen&&this.webkitRequestFullScreen()}exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}contextMenuItems(){const e=[];return this.fullscreenEnabled&&(this.isFullscreen?e.push({text:"Exit fullscreen",onClick:this.exitFullscreen.bind(this)}):e.push({text:"Enter fullscreen",onClick:this.enterFullscreen.bind(this)})),e.push({text:"About Ruffle (nightly 2021-03-22)",onClick(){window.open(fe,"_blank")},separator:!1}),e}showContextMenu(e){if(e.preventDefault(),!this.hasContextMenu)return;for(;this.contextMenuElement.firstChild;)this.contextMenuElement.removeChild(this.contextMenuElement.firstChild);for(const{text:e,onClick:n,separator:t}of this.contextMenuItems()){const r=document.createElement("li");if(r.className="menu_item active",r.textContent=e,r.addEventListener("click",n),this.contextMenuElement.appendChild(r),!1!==t){const e=document.createElement("li");e.className="menu_separator";const n=document.createElement("hr");e.appendChild(n),this.contextMenuElement.appendChild(e)}}this.contextMenuElement.style.left="0",this.contextMenuElement.style.top="0",this.contextMenuElement.style.display="block";const n=this.getBoundingClientRect(),t=e.clientX-n.x,r=e.clientY-n.y,i=n.width-this.contextMenuElement.clientWidth-1,o=n.height-this.contextMenuElement.clientHeight-1;this.contextMenuElement.style.left=Math.floor(Math.min(t,i))+"px",this.contextMenuElement.style.top=Math.floor(Math.min(r,o))+"px"}hideContextMenu(){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")}}copyElement(e){if(e){for(let n=0;n<e.attributes.length;n++){const t=e.attributes[n];if(t.specified){if("title"===t.name&&"Adobe Flash Player"===t.value)continue;try{this.setAttribute(t.name,t.value)}catch(e){console.warn(`Unable to set attribute ${t.name} on Ruffle instance`)}}}for(const n of Array.from(e.children))this.appendChild(n)}}static htmlDimensionToCssDimension(e){if(e){const n=e.match(_e);if(n){let e=n[1];return n[3]||(e+="px"),e}}return null}onCallbackAvailable(e){const n=this.instance;this[e]=(...t)=>null==n?void 0:n.call_exposed_callback(e,t)}set traceObserver(e){var n;null===(n=this.instance)||void 0===n||n.set_trace_observer(e)}panic(e){var n;if(this.panicked)return;if(this.panicked=!0,e instanceof Error&&("AbortError"===e.name||e.message.includes("AbortError")))return;const t=null!==(n=null==e?void 0:e.ruffleIndexError)&&void 0!==n?n:de.Unknown,r=Object.assign([],{stackIndex:-1});if(r.push("# Error Info\n"),e instanceof Error){if(r.push(`Error name: ${e.name}\n`),r.push(`Error message: ${e.message}\n`),e.stack){const n=r.push(`Error stack:\n\`\`\`\n${e.stack}\n\`\`\`\n`)-1;r.stackIndex=n}}else r.push(`Error: ${e}\n`);r.push("\n# Player Info\n"),r.push(this.debugPlayerInfo()),r.push("\n# Page Info\n"),r.push(`Page URL: ${document.location.href}\n`),this.swfUrl&&r.push(`SWF URL: ${this.swfUrl}\n`),r.push("\n# Browser Info\n"),r.push(`Useragent: ${window.navigator.userAgent}\n`),r.push(`OS: ${window.navigator.platform}\n`),r.push("\n# Ruffle Info\n"),r.push("Version: 0.1.0\n"),r.push("Name: nightly 2021-03-22\n"),r.push("Channel: nightly\n"),r.push("Built: 2021-03-22T00:19:43.563Z\n"),r.push("Commit: 760e8421ab2b41ed11e124334d81325c7e0f235e\n");const i=r.join(""),o=document.location.href.split(/[?#]/)[0];let a,s,c=`https://github.com/ruffle-rs/ruffle/issues/new?title=${encodeURIComponent(`Error on ${o}`)}&body=`,l=encodeURIComponent(i);switch(r.stackIndex>-1&&String(c+l).length>8195&&(r[r.stackIndex]=null,l=encodeURIComponent(r.join(""))),c+=l,t){case de.FileProtocol:a='\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 ',s=`\n <li><a target="_top" href="${fe}/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 de.JavascriptConfiguration:a="\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 ",s='\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 de.WasmNotFound:a='\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 ',s='\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 de.WasmMimeType:a='\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 ',s='\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 de.WasmCors:a='\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 ',s='\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 de.JavascriptConflict:a="\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 ",s=`\n <li><a target="_top" href="${c}">Report Bug</a></li>\n <li><a href="#" id="panic-view-details">View Error Details</a></li>\n `;break;default:a="\n <p>Ruffle has encountered a major issue whilst trying to display this Flash content.</p>\n <p>This isn't supposed to happen, so we'd really appreciate if you could file a bug!</p>\n ",s=`\n <li><a target="_top" href="${c}">Report Bug</a></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">${a}</div>\n <div id="panic-footer">\n <ul>${s}</ul>\n </div>\n </div>\n `;const u=this.container.querySelector("#panic-view-details");u&&(u.onclick=()=>{const e=this.container.querySelector("#panic-body");return e.classList.add("details"),e.innerHTML=`<textarea>${i}</textarea>`,!1}),this.instance&&(this.instance.destroy(),this.instance=null)}displayUnsupportedMessage(){const e=document.createElement("div");e.id="message_overlay",e.innerHTML='<div class="message">\n <p>Flash Player has been removed from browsers in 2021.</p>\n <p>This content is not yet supported by the Ruffle emulator and will likely not run as intended.</p>\n <div>\n <a target="_top" 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 n=document.createElement("div");n.id="message_overlay",n.innerHTML=`<div class="message">\n <p>${e}</p>\n <div>\n <button id="continue-btn">continue</button>\n </div>\n </div>`,this.container.prepend(n),this.container.querySelector("#continue-btn").onclick=()=>{n.parentNode.removeChild(n)}}debugPlayerInfo(){var e,n;return`Allows script access: ${null!==(n=null===(e=this.options)||void 0===e?void 0:e.allowScriptAccess)&&void 0!==n&&n}\n`}}function we(e,n){switch(e||(e="sameDomain"),e.toLowerCase()){case"always":return!0;case"never":return!1;case"samedomain":default:try{return new URL(window.location.href).origin===new URL(n,window.location.href).origin}catch(e){return!1}}}function pe(e){if(e){let n="";try{n=new URL(e,fe).pathname}catch(e){}if(n&&n.length>=4){const e=n.slice(-4).toLowerCase();if(".swf"===e||".spl"===e)return!0}}return!1}class he extends ge{constructor(){super()}connectedCallback(){var e,n,t,r;super.connectedCallback();const i=this.attributes.getNamedItem("src");if(i){const o=null!==(n=null===(e=this.attributes.getNamedItem("allowScriptAccess"))||void 0===e?void 0:e.value)&&void 0!==n?n:null;this.load({url:i.value,allowScriptAccess:we(o,i.value),parameters:null===(t=this.attributes.getNamedItem("flashvars"))||void 0===t?void 0:t.value,backgroundColor:null===(r=this.attributes.getNamedItem("bgcolor"))||void 0===r?void 0:r.value})}}get src(){var e;return null===(e=this.attributes.getNamedItem("src"))||void 0===e?void 0:e.value}set src(e){if(null!=e){const n=document.createAttribute("src");n.value=e,this.attributes.setNamedItem(n)}else this.attributes.removeNamedItem("src")}static get observedAttributes(){return["src","width","height"]}attributeChangedCallback(e,n,t){if(super.attributeChangedCallback(e,n,t),this.isConnected&&"src"===e){let e;const n=this.attributes.getNamedItem("flashvars");n&&(e=n.value);const t=this.attributes.getNamedItem("src");t&&this.load({url:t.value,parameters:e})}}static isInterdictable(e){var n;if(!e.getAttribute("src"))return!1;const t=null===(n=e.getAttribute("type"))||void 0===n?void 0:n.toLowerCase();return t===ae.toLowerCase()||t===se.toLowerCase()||t===ce.toLowerCase()||t===le.toLowerCase()||(null==t||""===t)&&pe(e.getAttribute("src"))}static fromNativeEmbedElement(e){const n=ee("ruffle-embed",he),t=document.createElement(n);return t.copyElement(e),t}}function me(e,n,t){n=n.toLowerCase();for(const t in e)if(Object.hasOwnProperty.call(e,t)&&n===t.toLowerCase())return e[t];return t}function ye(e){var n,t;const r={};for(const i of e.children)if(i instanceof HTMLParamElement){const e=null===(n=i.attributes.getNamedItem("name"))||void 0===n?void 0:n.value,o=null===(t=i.attributes.getNamedItem("value"))||void 0===t?void 0:t.value;e&&o&&(r[e]=o)}return r}class ve extends ge{constructor(){super(),this.params={}}connectedCallback(){var e;super.connectedCallback(),this.params=ye(this);let n=null;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);const t=me(this.params,"allowScriptAccess",null),r=me(this.params,"flashvars",this.getAttribute("flashvars")),i=me(this.params,"bgcolor",this.getAttribute("bgcolor"));if(n){const e={url:n};e.allowScriptAccess=we(t,n),r&&(e.parameters=r),i&&(e.backgroundColor=i),this.load(e)}}debugPlayerInfo(){var e;let n=super.debugPlayerInfo();n+="Player type: Object\n";let t=null;return 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),n+=`SWF URL: ${t}\n`,Object.keys(this.params).forEach((e=>{n+=`Param ${e}: ${this.params[e]}\n`})),Object.keys(this.attributes).forEach((e=>{var t;n+=`Attribute ${e}: ${null===(t=this.attributes.getNamedItem(e))||void 0===t?void 0:t.value}\n`})),n}get data(){return this.getAttribute("data")}set data(e){if(null!=e){const n=document.createAttribute("data");n.value=e,this.attributes.setNamedItem(n)}else this.attributes.removeNamedItem("data")}static isInterdictable(e){var n,t,r;if(e.getElementsByTagName("ruffle-embed").length>0)return!1;const i=null===(n=e.attributes.getNamedItem("data"))||void 0===n?void 0:n.value.toLowerCase(),o=ye(e);let a;if(i)a=pe(i);else{if(!o||!o.movie)return!1;a=pe(o.movie)}const s=null===(t=e.attributes.getNamedItem("classid"))||void 0===t?void 0:t.value.toLowerCase();if(s===ue.toLowerCase())return!Array.from(e.getElementsByTagName("embed")).some(he.isInterdictable);if(null!=s&&""!==s)return!1;const c=null===(r=e.attributes.getNamedItem("type"))||void 0===r?void 0:r.value.toLowerCase();return c===ae.toLowerCase()||c===se.toLowerCase()||c===ce.toLowerCase()||c===le.toLowerCase()||(null==c||""===c)&&a}static fromNativeObjectElement(e){const n=ee("ruffle-object",ve),t=document.createElement(n);for(const n of Array.from(e.getElementsByTagName("embed")))he.isInterdictable(n)&&n.remove();for(const n of Array.from(e.getElementsByTagName("object")))ve.isInterdictable(n)&&n.remove();return t.copyElement(e),t}}function Ae(e,n){let t="";if(void 0!==e&&void 0!==e.publicPaths&&void 0!==e.publicPaths[n])t=e.publicPaths[n];else if(void 0!==e&&void 0!==e.publicPath)t=e.publicPath;else if(void 0!==document.currentScript&&null!==document.currentScript&&"src"in document.currentScript&&""!==document.currentScript.src)try{t=new URL(".",document.currentScript.src).href}catch(e){console.warn("Unable to get currentScript URL")}return""===t||t.endsWith("/")||(t+="/"),t}var xe,Ce;let Ie;const ke=null!==(Ce=null===(xe=window.RufflePlayer)||void 0===xe?void 0:xe.config)&&void 0!==Ce?Ce:{},Ee=Ae(ke,"ruffle.js")+"ruffle.js";let Se,Be,Re,Pe;function Oe(){try{Se=null!=Se?Se:document.getElementsByTagName("object"),Be=null!=Be?Be:document.getElementsByTagName("embed");for(const e of Array.from(Se))if(ve.isInterdictable(e)){const n=ve.fromNativeObjectElement(e);e.replaceWith(n)}for(const e of Array.from(Be))if(he.isInterdictable(e)){const n=he.fromNativeEmbedElement(e);e.replaceWith(n)}}catch(e){console.error(`Serious error encountered when polyfilling native Flash elements: ${e}`)}}function Fe(){Re=null!=Re?Re:document.getElementsByTagName("iframe"),Pe=null!=Pe?Pe:document.getElementsByTagName("frame"),[Re,Pe].forEach((e=>{for(let n=0;n<e.length;n++){const t=e[n];if(void 0!==t.dataset.rufflePolyfilled)continue;t.dataset.rufflePolyfilled="";const r=t.contentWindow,i=`Couldn't load Ruffle into ${t.tagName}[${t.src}]: `;try{"complete"===r.document.readyState&&Me(r,i)}catch(e){Ie||console.warn(i+e)}t.addEventListener("load",(()=>{Me(r,i)}),!1)}}))}function Me(e,n){var t,r,i,o,a;return r=this,i=void 0,a=function*(){let r;yield new Promise((e=>{window.setTimeout((()=>{e()}),100)}));try{if(r=e.document,!r)return}catch(e){return void(Ie||console.warn(n+e))}if(Ie||void 0===r.documentElement.dataset.ruffleOptout)if(Ie)e.RufflePlayer||(e.RufflePlayer={}),e.RufflePlayer.config=Object.assign(Object.assign({},ke),null!==(t=e.RufflePlayer.config)&&void 0!==t?t:{});else if(!e.RufflePlayer){const n=r.createElement("script");n.setAttribute("src",Ee),n.onload=()=>{e.RufflePlayer={},e.RufflePlayer.config=ke},r.head.appendChild(n)}},new((o=void 0)||(o=Promise))((function(e,n){function t(e){try{c(a.next(e))}catch(e){n(e)}}function s(e){try{c(a.throw(e))}catch(e){n(e)}}function c(n){var r;n.done?e(n.value):(r=n.value,r instanceof o?r:new o((function(e){e(r)}))).then(t,s)}c((a=a.apply(r,i||[])).next())}))}function Te(){G(Q)}function je(e){Ie=e,Oe(),Fe(),new MutationObserver((function(e){e.some((e=>e.addedNodes.length>0))&&(Oe(),Fe())})).observe(document,{childList:!0,subtree:!0})}class Le{constructor(e,n,t,r,i){this.major=e,this.minor=n,this.patch=t,this.prIdent=r,this.buildIdent=i}static fromSemver(e){const n=e.split("+"),t=n[0].split("-"),r=t[0].split("."),i=parseInt(r[0],10);let o=0,a=0,s=null,c=null;return null!=r[1]&&(o=parseInt(r[1],10)),null!=r[2]&&(a=parseInt(r[2],10)),null!=t[1]&&(s=t[1].split(".")),null!=n[1]&&(c=n[1].split(".")),new Le(i,o,a,s,c)}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 n=/^[0-9]*$/;for(let t=0;t<this.prIdent.length&&t<e.prIdent.length;t+=1){if(!n.test(this.prIdent[t])&&n.test(e.prIdent[t]))return!0;if(n.test(this.prIdent[t])&&n.test(e.prIdent[t])){if(parseInt(this.prIdent[t],10)>parseInt(e.prIdent[t],10))return!0;if(parseInt(this.prIdent[t],10)<parseInt(e.prIdent[t],10))return!1}else{if(n.test(this.prIdent[t])&&!n.test(e.prIdent[t]))return!1;if(!n.test(this.prIdent[t])&&!n.test(e.prIdent[t])){if(this.prIdent[t]>e.prIdent[t])return!0;if(this.prIdent[t]<e.prIdent[t])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 Ne{constructor(e){this.requirements=e}satisfiedBy(e){for(let n=0;n<this.requirements.length;n+=1){let t=!0;for(let r=0;r<this.requirements[n].length;r+=1){const i=this.requirements[n][r].comparator,o=this.requirements[n][r].version;t=t&&o.isStableOrCompatiblePrerelease(e),""===i||"="===i?t=t&&o.isEqual(e):">"===i?t=t&&e.hasPrecedenceOver(o):">="===i?t=t&&(e.hasPrecedenceOver(o)||o.isEqual(e)):"<"===i?t=t&&o.hasPrecedenceOver(e):"<="===i?t=t&&(o.hasPrecedenceOver(e)||o.isEqual(e)):"^"===i&&(t=t&&o.isCompatibleWith(e))}if(t)return!0}return!1}static fromRequirementString(e){const n=e.split(" ");let t=[];const r=[];for(let e=0;e<n.length;e+=1)if("||"===n[e])t.length>0&&(r.push(t),t=[]);else if(n[e].length>0){const r=/[0-9]/.exec(n[e]);if(r){const i=n[e].slice(0,r.index).trim(),o=Le.fromSemver(n[e].slice(r.index).trim());t.push({comparator:i,version:o})}}return t.length>0&&r.push(t),new Ne(r)}}class Ue{constructor(e){this.sources={},this.config={},this.invoked=!1,this.newestName=null,this.conflict=null,null!=e&&(e instanceof Ue?(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?window.addEventListener("DOMContentLoaded",this.init.bind(this)):window.setTimeout(this.init.bind(this),0)}get version(){return"0.1.0"}registerSource(e,n){this.sources[e]=n}newestSourceName(){let e=null,n=Le.fromSemver("0.0.0");for(const t in this.sources)if(Object.prototype.hasOwnProperty.call(this.sources,t)){const r=Le.fromSemver(this.sources[t].version);r.hasPrecedenceOver(n)&&(e=t,n=r)}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 n=Ne.fromRequirementString(e);let t=null;for(const e in this.sources)if(Object.prototype.hasOwnProperty.call(this.sources,e)){const r=Le.fromSemver(this.sources[e].version);n.satisfiedBy(r)&&(t=this.sources[e])}return t}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,n,t){let r;return r=e instanceof Ue?e:new Ue(e),void 0!==n&&void 0!==t&&(r.registerSource(n,t),!1!==r.config.polyfills&&t.pluginPolyfill()),r}}class We{constructor(e){this.name=e}get version(){return"0.1.0"}polyfill(e){je(e)}pluginPolyfill(){Te()}createPlayer(){const e=ee("ruffle-player",ge);return document.createElement(e)}}}},n={};function t(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={id:r,exports:{}};return e[r](o,o.exports,t),o.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.p="",(()=>{var e=t(62),n=t.n(e),r=t(894);n()(r.Z,{insert:"head",singleton:!1}),r.Z.locals;const{SourceAPI:i,PublicAPI:o}=t(240);let a,s;window.RufflePlayer=o.negotiate(window.RufflePlayer,"local",new i("local"));const c=document.getElementById("main"),l=document.getElementById("overlay"),u=document.getElementById("author-container"),f=document.getElementById("author"),_=document.getElementById("sample-swfs-container"),d=document.getElementById("sample-swfs"),b=document.getElementById("local-file"),g=document.getElementById("anim-optgroup"),w=document.getElementById("games-optgroup"),p={letterbox:"on",logLevel:"warn"};function h(){s&&s.remove(),s=a.createPlayer(),s.id="player",c.append(s),d.selectedIndex=0,u.style.display="none",f.textContent="",f.href=""}async function m(e){if(!e)return;h();const n=await new Response(e).arrayBuffer();s.load({data:n,...p})}function y(){const e=d[d.selectedIndex].swfData;e?(u.style.display="block",f.textContent=e.author,f.href=e.authorLink,b.value=null,s.load({url:e.location,...p})):h()}b.addEventListener("change",(e=>{m(e.target.files[0])})),d.addEventListener("change",(()=>y())),c.addEventListener("dragenter",(()=>{l.classList.add("drag")})),c.addEventListener("dragleave",(()=>{l.classList.remove("drag")})),c.addEventListener("dragover",(e=>{e.stopPropagation(),e.preventDefault()})),c.addEventListener("drop",(e=>{e.stopPropagation(),e.preventDefault(),l.classList.remove("drag"),m(e.dataTransfer.files[0])})),window.addEventListener("load",(()=>{l.style.display="initial"})),window.addEventListener("DOMContentLoaded",(async()=>{a=window.RufflePlayer.newest(),h();const e=await fetch("swfs.json");if(!e.ok)return void(_.style.display="none");const n=await e.json();for(const e of n.swfs){const n=document.createElement("option");switch(n.textContent=e.title,n.value=e.location,n.swfData=e,e.type){case"Animation":g.append(n);break;case"Game":w.append(n)}}_.style.display="inline-block";const t=new URL(window.location).searchParams.get("file");if(t){const e=Array.from(d.options);d.selectedIndex=Math.max(e.findIndex((e=>e.value.endsWith(t))),0),y()}}))})()})();
//# sourceMappingURL=index.js.map