(()=>{"use strict";var e,t,n={285:(e,t,n)=>{e.exports=n.p+"48336dd410a709ce5c04.wasm"},931:(e,t,n)=>{e.exports=n.p+"26d1540acdd0f88cf2fe.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:"6424bd7bb86dd38ed6e3",966:"78d0f623a87a29523676"}[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{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{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)throw new TypeError("Reduce of empty array with no initial value");s=n[r++]}for(;re[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 \n \n\n
\n
\n
Click to unmute
\n
\n \n\n
    \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="0.1.0",g="2022-12-22T00:14:42.760Z",v="application/x-shockwave-flash",w="application/futuresplash",y="application/x-shockwave-flash2-preview",b="application/vnd.adobe.flash.movie",x="https://ruffle.rs",k=/^\s*(\d+(\.\d+)?(%)?)/;let E=!1;function I(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 S extends HTMLElement{get readyState(){return this._readyState}get metadata(){return this._metadata}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}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{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(!P(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({},I(e.url.substring(e.url.indexOf("?")))),I(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),I(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-12-22)`,onClick(){window.open(x,"_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(){E||(navigator.maxTouchPoints<1?E=!0:this.container.addEventListener("click",(()=>{var e;if(E)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((()=>{E=!0})).catch((e=>{console.warn(`Failed to play dummy sound: ${e}`)}))}),{once:!0}))}copyElement(e){if(e){for(let t=0;tnull==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-12-22\n"),e.push("Channel: nightly\n"),e.push(`Built: ${g}\n`),e.push("Commit: 7a09dd563980b378eb2b6702a227c7b346b5ae3e\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(g),o=new Date;o.setMonth(o.getMonth()-6);const a=o>r;let l,c,u;if(a)l=`Update Ruffle`;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=`Report Bug`}switch(n){case 2:c='\n

    It appears you are running Ruffle on the "file:" protocol.

    \n

    This doesn\'t work as browsers block many features from working for security reasons.

    \n

    Instead, we invite you to setup a local server or either use the web demo or the desktop application.

    \n ',u=`\n
  • Web Demo
  • \n
  • Desktop Application
  • \n `;break;case 4:c="\n

    Ruffle has encountered a major issue due to an incorrect JavaScript configuration.

    \n

    If you are the server administrator, we invite you to check the error details to find out which parameter is at fault.

    \n

    You can also consult the Ruffle wiki for help.

    \n ",u='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case 9:c='\n

    Ruffle failed to load the required ".wasm" file component.

    \n

    If you are the server administrator, please ensure the file has correctly been uploaded.

    \n

    If the issue persists, you may need to use the "publicPath" setting: please consult the Ruffle wiki for help.

    \n ',u='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case 8:c='\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    This web server is not serving ".wasm" files with the correct MIME type.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n ',u='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case 11:c="\n

    Ruffle failed to load the Flash SWF file.

    \n

    The most likely reason is that the file no longer exists, so there is nothing for Ruffle to load.

    \n

    Try contacting the website administrator for help.

    \n ",u='\n
  • View Error Details
  • \n ';break;case 12:c="\n

    Ruffle failed to load the Flash SWF file.

    \n

    Access to fetch has likely been blocked by CORS policy.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n ",u='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case 6:c='\n

    Ruffle failed to load the required ".wasm" file component.

    \n

    Access to fetch has likely been blocked by CORS policy.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n ',u='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case 3:c="\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    It seems like this page has missing or invalid files for running Ruffle.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n ",u='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;case 7:c="\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    This can often resolve itself, so you can try reloading the page.

    \n

    Otherwise, please contact the website administrator.

    \n ",u='\n
  • View Error Details
  • \n ';break;case 10:c='\n

    Ruffle failed to load the required ".wasm" file component.

    \n

    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".

    \n

    This will allow your browser to load the required ".wasm" files.

    \n

    If the issue persists, you might have to use a different browser.

    \n ',u='\n
  • More Information
  • \n
  • View Error Details
  • \n ';break;case 5:c="\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    It seems like this page uses JavaScript code that conflicts with Ruffle.

    \n

    If you are the server administrator, we invite you to try loading the file on a blank page.

    \n ",a&&(c+=`

    You can also try to upload a more recent version of Ruffle that may circumvent the issue (current build is outdated: ${g}).

    `),u=`\n
  • ${l}
  • \n
  • View Error Details
  • \n `;break;case 1:c='\n

    Ruffle has encountered a major issue whilst trying to initialize.

    \n

    This web server\'s Content Security Policy does not allow the required ".wasm" component to run.

    \n

    If you are the server administrator, please consult the Ruffle wiki for help.

    \n ',u='\n
  • View Ruffle Wiki
  • \n
  • View Error Details
  • \n ';break;default:c="

    Ruffle has encountered a major issue whilst trying to display this Flash content.

    ",c+=a?`

    If you are the server administrator, please try to upload a more recent version of Ruffle (current build is outdated: ${g}).

    `:"

    This isn't supposed to happen, so we'd really appreciate if you could file a bug!

    ",u=`\n
  • ${l}
  • \n
  • View Error Details
  • \n `}this.container.innerHTML=`\n
    \n
    Something went wrong :(
    \n
    ${c}
    \n \n
    \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=``,!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 window.location.origin===this.swfUrl.origin||this.isExtension?e.ruffleIndexError=11:e.ruffleIndexError=12,void this.panic(e)}this.hidePreloader();const e=document.createElement("div");e.id="message_overlay",e.innerHTML=`
    \n

    Ruffle wasn't able to run the Flash embedded in this page.

    \n

    You can try to open the file in a separate tab, to sidestep this issue.

    \n \n
    `,this.container.prepend(e)}displayUnsupportedMessage(){const e=document.createElement("div");e.id="message_overlay",e.innerHTML='
    \n

    The Ruffle emulator does not yet support ActionScript 3, required by this content.

    \n

    If you choose to run it anyway, interactivity will be missing or limited.

    \n
    \n More info\n \n
    \n
    ',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=`
    \n

    ${e}

    \n
    \n \n
    \n
    `,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(S.LOADED_METADATA)),this.dispatchEvent(new Event(S.LOADED_DATA))}setIsExtension(e){this.isExtension=e}}function _(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 A(e){return null===e||"true"===e.toLowerCase()}function R(e){if(e){let t="",n="";try{const i=new URL(e,x);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 C(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 F(e){if(e){let t="";try{t=new URL(e,x).pathname}catch(e){}if(t&&t.length>=4){const e=t.slice(-4).toLowerCase();if(".swf"===e||".spl"===e)return!0}}return!1}function q(e){switch(e.toLowerCase()){case v.toLowerCase():case w.toLowerCase():case y.toLowerCase():case b.toLowerCase():return!0;default:return!1}}function P(e){let t=e.parentElement;for(;null!==t;){switch(t.tagName){case"AUDIO":case"VIDEO":return!0}t=t.parentElement}return!1}S.LOADED_METADATA="loadedmetadata",S.LOADED_DATA="loadeddata";class O{constructor(e){if(this.__mimetypes=[],this.__named_mimetypes={},e)for(let t=0;t{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(P(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(R(i))return C(e,"data"),!1;r=F(i)}else{if(!s||!s.movie)return!1;if(R(s.movie)){const t=e.querySelector("param[name='movie']");if(t){C(t,"value");const n=t.getAttribute("value");n&&e.setAttribute("data",n)}return!1}r=F(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(T.isInterdictable);if(o)return!1;const a=e.attributes.getNamedItem("type");return a?q(a.value):r}static fromNativeObjectElement(e){const t=f("ruffle-object",D),n=document.createElement(t);for(const t of Array.from(e.getElementsByTagName("embed")))T.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 W;const V=null!==(B=null===($=window.RufflePlayer)||void 0===$?void 0:$.config)&&void 0!==B?B:{},H=l(V)+"ruffle.js";let z,Y,Z,Q;function G(){try{z=null!=z?z:document.getElementsByTagName("object"),Y=null!=Y?Y:document.getElementsByTagName("embed");for(const e of Array.from(z))if(D.isInterdictable(e)){const t=D.fromNativeObjectElement(e);t.setIsExtension(W),e.replaceWith(t)}for(const e of Array.from(Y))if(T.isInterdictable(e)){const t=T.fromNativeEmbedElement(e);t.setIsExtension(W),e.replaceWith(t)}}catch(e){console.error(`Serious error encountered when polyfilling native Flash elements: ${e}`)}}function J(){Z=null!=Z?Z:document.getElementsByTagName("iframe"),Q=null!=Q?Q:document.getElementsByTagName("frame"),[Z,Q].forEach((e=>{for(let t=0;t{K(i,s)}),!1)}}))}async function K(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(W||console.warn(t+e))}if(W||void 0===i.documentElement.dataset.ruffleOptout)if(W)e.RufflePlayer||(e.RufflePlayer={}),e.RufflePlayer.config=Object.assign(Object.assign({},V),null!==(n=e.RufflePlayer.config)&&void 0!==n?n:{});else if(!e.RufflePlayer){const t=i.createElement("script");t.setAttribute("src",H),t.onload=()=>{e.RufflePlayer={},e.RufflePlayer.config=V},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.majore.minor)return!0;if(this.minore.patch)return!0;if(this.patchparseInt(e.prIdent[n],10))return!0;if(parseInt(this.prIdent[n],10)e.prIdent[n])return!0;if(this.prIdent[n]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 ee{constructor(e){this.requirements=e}satisfiedBy(e){for(let t=0;t"===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;e0&&(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 ee(i)}}const te={version:m,polyfill(e){!function(e){W=e,G(),J(),new MutationObserver((function(e){e.some((e=>e.addedNodes.length>0))&&(G(),J())})).observe(document,{childList:!0,subtree:!0})}(e)},pluginPolyfill(){!function(e){"install"in navigator.plugins&&navigator.plugins.install||Object.defineProperty(navigator,"plugins",{value:new N(navigator.plugins),writable:!1}),navigator.plugins.install(e),!(e.length>0)||"install"in navigator.mimeTypes&&navigator.mimeTypes.install||Object.defineProperty(navigator,"mimeTypes",{value:new O(navigator.mimeTypes),writable:!1});const t=navigator.mimeTypes;for(let n=0;n