(()=>{var e,t,n,r,i,o,c,s,a,u,d,l,_,f,b,p,h,g,v,w,m,x,y,k,S,I,C,E,P,F,A,O,R,T,M,j,L,N,B,D,U,q,$,H,W,V,z,G,Y,X,Z,Q,J,K,ee,te,ne,re,ie,oe,ce,se,ae,ue,de,le,_e,fe,be,pe,he,ge,ve,we,me,xe,ye,ke,Se,Ie,Ce,Ee,Pe,Fe,Ae,Oe,Re,Te,Me,je,Le,Ne,Be,De,Ue,qe,$e,He,We,Ve,ze,Ge,Ye,Xe,Ze,Qe,Je,Ke,et,tt,nt,rt,it,ot,ct,st,at,ut,dt,lt,_t,ft,bt,pt,ht,gt,vt,wt,mt,xt,yt,kt,St,It,Ct,Et,Pt,Ft,At,Ot,Rt,Tt,Mt,jt,Lt,Nt,Bt,Dt,Ut,qt,$t,Ht,Wt,Vt,zt,Gt,Yt,Xt,Zt,Qt,Jt,Kt,en,tn,nn,rn,on,cn,sn,an,un,dn,ln,_n,fn,bn,pn,hn,gn,vn,wn,mn,xn,yn,kn,Sn,In,Cn,En,Pn,Fn,An,On,Rn,Tn,Mn,jn,Ln,Nn,Bn,Dn,Un,qn,$n,Hn,Wn,Vn,zn,Gn,Yn,Xn,Zn,Qn,Jn,Kn,er,tr,nr,rr,ir,or,cr,sr,ar,ur,dr,lr,_r,fr,br,pr,hr,gr,vr,wr,mr,xr,yr,kr,Sr,Ir,Cr,Er,Pr,Fr,Ar,Or,Rr,Tr,Mr,jr,Lr,Nr,Br,Dr,Ur,qr,$r,Hr,Wr,Vr,zr,Gr,Yr,Xr,Zr,Qr,Jr,Kr,ei,ti,ni,ri,ii,oi,ci,si,ai,ui,di,li,_i,fi,bi,pi,hi,gi,vi,wi,mi,xi,yi={339:(e,t,n)=>{"use strict";function r(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}n.r(t),n.d(t,{AutoPlay:()=>p,FLASH7_AND_8_MIMETYPE:()=>x,FLASH_ACTIVEX_CLASSID:()=>k,FLASH_MIMETYPE:()=>w,FLASH_MOVIE_MIMETYPE:()=>y,FLASH_PLUGIN:()=>u,FUTURESPLASH_MIMETYPE:()=>m,Letterbox:()=>h,PublicAPI:()=>Q,RuffleEmbed:()=>A,RuffleObject:()=>T,RufflePlayer:()=>E,SourceAPI:()=>K,UnmuteOverlay:()=>g,Version:()=>X,VersionRange:()=>Z,copyToAudioBuffer:()=>J.K,installPlugin:()=>d,isScriptAccessAllowed:()=>P,isSwfFilename:()=>F,loadRuffle:()=>o,lookupElement:()=>f,pluginPolyfill:()=>G,polyfill:()=>Y,publicPath:()=>M,registerElement:()=>b,ruffleShadowTemplate:()=>l});let i=null;function o(){return null==i&&(i=function(){return e=this,t=void 0,o=function*(){"function"==typeof Array.prototype.reduce&&r(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 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),r=n.length>>>0;let i,o=0;if(e.length>=2)i=e[1];else{for(;o=r)throw new TypeError("Reduce of empty array with no initial value");i=n[o++]}for(;o0)||"install"in navigator.mimeTypes&&navigator.mimeTypes.install||Object.defineProperty(navigator,"mimeTypes",{value:new c(navigator.mimeTypes),writable:!1});const t=navigator.mimeTypes;for(let n=0;n\n :host {\n display: inline-block;\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 position: relative;\n }\n\n /* All of these use the dimensions specified by the embed */\n #container,\n #container canvas,\n #play_button,\n #unmute_overlay,\n #unmute_overlay .background,\n #panic,\n #message_overlay {\n width: inherit;\n height: inherit;\n }\n\n #container {\n position: relative;\n overflow: hidden;\n }\n\n #play_button,\n #unmute_overlay {\n position: absolute;\n cursor: pointer;\n display: none;\n }\n\n #unmute_overlay .background {\n position: absolute;\n background-color: #000;\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 position: absolute;\n font-size: 20px;\n text-align: center;\n /* Inverted colours from play button! */\n background: linear-gradient(180deg, rgba(253,58,64,1) 0%, rgba(253,161,56,1) 100%);\n color: #FFF;\n }\n\n #panic a {\n color: #37528C;\n font-weight: bold;\n }\n\n #panic > div {\n position: absolute;\n }\n\n #panic-title {\n width: inherit;\n top: 30px;\n font-size: 42px;\n font-weight: bold;\n }\n\n #panic-body {\n top: 100px;\n bottom: 80px;\n left: 50px;\n right: 50px;\n }\n\n #panic-body textarea {\n width: 100%;\n height: 100%;\n }\n\n #panic-footer {\n bottom: 30px;\n width: inherit;\n }\n\n #panic ul {\n margin-top: 35px;\n padding: 0;\n width: inherit;\n display: flex;\n list-style-type: none;\n justify-content: center;\n align-items: center;\n }\n\n #panic li {\n padding: 10px 50px;\n }\n\n #message_overlay {\n position: absolute;\n background-color: #37528C;\n color: #FFAD33;\n opacity: 1.0;\n z-index: 2;\n text-align: center;\n }\n\n #message_overlay .message {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n padding: 20px;\n transform: translate(-50%, -50%);\n }\n\n #continue-btn {\n cursor: pointer;\n background-color: #37528C;\n color: #FFAD33;\n border: 2px solid #FFAD33;\n font-weight: bold;\n font-size: 20px;\n border-radius: 20px;\n padding: 10px;\n }\n\n #continue-btn:hover {\n background-color: rgba(255, 255, 255, 0.3);\n }\n\n #right_click_menu {\n color: #FFAD33;\n background-color: #37528c;\n border-radius: 5px;\n box-shadow: 0px 5px 15px -5px #000;\n position: absolute;\n font-size: 16px;\n text-align: left;\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n #right_click_menu .menu_item {\n padding: 5px 10px;\n }\n\n #right_click_menu .menu_separator {\n padding: 5px 5px;\n }\n\n #right_click_menu .active {\n cursor: pointer;\n color: #FFAD33;\n }\n\n #right_click_menu .disabled {\n cursor: default;\n color: #94672F;\n }\n\n #right_click_menu .active:hover {\n background-color: #184778;\n }\n\n #right_click_menu hr {\n color: #FFAD33;\n }\n\n #right_click_menu > :first-child {\n border-top-right-radius: 5px;\n border-top-left-radius: 5px;\n }\n\n #right_click_menu > :last-child {\n border-bottom-right-radius: 5px;\n border-bottom-left-radius: 5px;\n }\n \n \n\n
\n
\n
Click to unmute
\n
\n\n \n';const _={};function f(e){const t=_[e];return void 0!==t?{internalName:e,name:t.name,class:t.class}:null}function b(e,t){if(void 0!==_[e]){if(_[e].class!==t)throw new Error("Internal naming conflict on "+e);return _[e].name}let n=0;for(;;)try{let r=e;return n>0&&(r=r+"-"+n),window.customElements.define(r,t),_[e]={class:t,name:r,internalName:e},r}catch(e){"NotSupportedError"===e.name&&(n+=1)}}var p,h,g;!function(e){e.On="on",e.Off="off",e.Auto="auto"}(p||(p={})),function(e){e.Off="off",e.Fullscreen="fullscreen",e.On="on"}(h||(h={})),function(e){e.Visible="visible",e.Hidden="hidden"}(g||(g={}));var v=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function c(e){try{a(r.next(e))}catch(e){o(e)}}function s(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,s)}a((r=r.apply(e,t||[])).next())}))};const w="application/x-shockwave-flash",m="application/futuresplash",x="application/x-shockwave-flash2-preview",y="application/vnd.adobe.flash-movie",k="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",S="https://ruffle.rs/",I=/^\s*(\d+(\.\d+)?(%)?)/;function C(e){if(null==e)return{};e instanceof URLSearchParams||(e=new URLSearchParams(e));const t={};for(const[n,r]of e)t[n]=r.toString();return t}class E extends HTMLElement{constructor(){return super(),this.panicked=!1,this.config={},this.shadow=this.attachShadow({mode:"open"}),this.shadow.appendChild(l.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.rightClickMenu=this.shadow.getElementById("right_click_menu"),this.addEventListener("contextmenu",this.openRightClickMenu.bind(this)),window.addEventListener("click",this.hideRightClickMenu.bind(this)),this.instance=null,this.allowScriptAccess=!1,this._trace_observer=null,this.ruffleConstructor=o(),this}connectedCallback(){this.updateStyles()}static get observedAttributes(){return["width","height"]}attributeChangedCallback(e,t,n){"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{throw console.error("Serious error loading Ruffle: "+e),(e&&e.message?String(e.message).toLowerCase():"").indexOf("mime")>=0&&(this.panicked=!0,this.container.innerHTML='\n
\n
Something went wrong :(
\n
\n

Ruffle has encountered a major issue whilst trying to initialize.

\n

This web server is either not serving ".wasm" files with the correct MIME type, or the file cannot be found.

\n

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

\n
\n \n
\n '),e}));this.instance=new n(this.container,this,this.allowScriptAccess,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(p)).includes(e.autoplay)?e.autoplay:p.Auto,i=Object.values(Object(g)).includes(e.unmuteOverlay)?e.unmuteOverlay:g.Visible;if(r==p.On||r==p.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==g.Visible?"":"hidden")}));const e=null===(t=this.instance)||void 0===t?void 0:t.audio_context();e&&(e.onstatechange=()=>{"running"===e.state&&this.unmuteOverlayClicked(),e.onstatechange=null})}}else this.playButton.style.display="block"}))}load(e){var t,n;return v(this,void 0,void 0,(function*(){if("string"==typeof e&&(e={url:e}),!("url"in e)&&!("data"in e))throw new TypeError("options must contain url or data");try{if(this.isConnected&&!this.isUnusedFallbackObject()){const r=Object.assign(Object.assign(Object.assign({},null!==(n=null===(t=window.RufflePlayer)||void 0===t?void 0:t.config)&&void 0!==n?n:{}),this.config),e);if(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%2cdocument.location.html).href}catch(t){this.swfUrl=e.url}const t=Object.assign(Object.assign({},C(e.url.substring(e.url.indexOf("?")))),C(e.parameters));this.instance.stream_from(e.url,t)}else"data"in e&&(console.log("Loading SWF data"),this.instance.load_data(new Uint8Array(e.data),C(e.parameters)))}else console.warn("Ignoring attempt to play a disconnected or suspended Ruffle element")}catch(e){throw console.error("Serious error occurred loading SWF file: "+e),this.panic(e),e}}))}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:"Ruffle nightly 2021-01-16",onClick(){window.open(S,"_blank")}}),e}openRightClickMenu(e){for(e.preventDefault();this.rightClickMenu.firstChild;)this.rightClickMenu.removeChild(this.rightClickMenu.firstChild);for(const{text:e,onClick:t}of this.contextMenuItems()){const n=document.createElement("li");n.className="menu_item active",n.textContent=e,n.addEventListener("click",t),this.rightClickMenu.appendChild(n)}this.rightClickMenu.style.left="0",this.rightClickMenu.style.top="0",this.rightClickMenu.style.display="block";const t=this.getBoundingClientRect(),n=e.clientX-t.x,r=e.clientY-t.y,i=t.width-this.rightClickMenu.clientWidth-1,o=t.height-this.rightClickMenu.clientHeight-1;this.rightClickMenu.style.left=Math.floor(Math.min(n,i))+"px",this.rightClickMenu.style.top=Math.floor(Math.min(r,o))+"px"}hideRightClickMenu(){this.rightClickMenu.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 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)}panic(e){if(this.panicked)return;this.panicked=!0;const t=Object.assign([],{stackIndex:-1});if(t.push("# Error Info\n"),e instanceof Error){if(t.push(`Error name: ${e.name}\n`),t.push(`Error message: ${e.message}\n`),e.stack){const n=t.push(`Error stack:\n\`\`\`\n${e.stack}\n\`\`\`\n`)-1;t.stackIndex=n}}else t.push(`Error: ${e}\n`);t.push("\n# Player Info\n"),t.push(this.debugPlayerInfo()),t.push("\n# Page Info\n"),t.push(`Page URL: ${document.location.href}\n`),this.swfUrl&&t.push(`SWF URL: ${this.swfUrl}\n`),t.push("\n# Browser Info\n"),t.push(`Useragent: ${window.navigator.userAgent}\n`),t.push(`OS: ${window.navigator.platform}\n`),t.push("\n# Ruffle Info\n"),t.push("Version: 0.1.0\n"),t.push("Name: nightly 2021-01-16\n"),t.push("Channel: nightly\n"),t.push("Built: 2021-01-16T01:09:33.302Z\n"),t.push("Commit: 9df7facdb8d37a5d007a13c25efcc176ed4675e0\n");const n=t.join(""),r=`Error on ${document.location.href}`;let i=`https://github.com/ruffle-rs/ruffle/issues/new?title=${encodeURIComponent(r)}&body=`,o=encodeURIComponent(n);t.stackIndex>-1&&String(i+o).length>8195&&(t[t.stackIndex]=null,o=encodeURIComponent(t.join(""))),i+=o,this.container.innerHTML=`\n
\n
Something went wrong :(
\n
\n

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

\n

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

\n
\n \n
\n `,this.container.querySelector("#panic-view-details").onclick=()=>(this.container.querySelector("#panic-body").innerHTML=``,!1),this.instance&&(this.instance.destroy(),this.instance=null)}displayMessage(e){const t=document.createElement("div");t.id="message_overlay",t.innerHTML=`
\n
\n

${e}

\n
\n
\n \n
`,this.container.prepend(t),this.container.querySelector("#continue-btn").onclick=()=>{t.remove()}}debugPlayerInfo(){return`Allows script access: ${this.allowScriptAccess}\n`}}function P(e,t){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(t,window.location.href).origin}catch(e){return!1}}}function F(e){if(e){let t="";try{t=new URL(e,S).pathname}catch(e){}if(t&&t.length>=4){const e=t.slice(-4).toLowerCase();if(".swf"===e||".spl"===e)return!0}}return!1}class A extends E{constructor(){super()}connectedCallback(){var e,t,n,r;super.connectedCallback();const i=this.attributes.getNamedItem("src");if(i){const o=null!==(t=null===(e=this.attributes.getNamedItem("allowScriptAccess"))||void 0===e?void 0:e.value)&&void 0!==t?t:null;this.allowScriptAccess=P(o,i.value),this.load({url:i.value,parameters:null===(n=this.attributes.getNamedItem("flashvars"))||void 0===n?void 0:n.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 t=document.createAttribute("src");t.value=e,this.attributes.setNamedItem(t)}else this.attributes.removeNamedItem("src")}static get observedAttributes(){return["src","width","height"]}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),this.isConnected&&"src"===e){let e;const t=this.attributes.getNamedItem("flashvars");t&&(e=t.value);const n=this.attributes.getNamedItem("src");n&&this.load({url:n.value,parameters:e})}}static isInterdictable(e){var t;if(!e.getAttribute("src"))return!1;const n=null===(t=e.getAttribute("type"))||void 0===t?void 0:t.toLowerCase();return n===w.toLowerCase()||n===m.toLowerCase()||n===x.toLowerCase()||n===y.toLowerCase()||(null==n||""===n)&&F(e.getAttribute("src"))}static fromNativeEmbedElement(e){const t=b("ruffle-embed",A),n=document.createElement(t);return n.copyElement(e),n}}function O(e,t,n){t=t.toLowerCase();for(const n in e)if(Object.hasOwnProperty.call(e,n)&&t===n.toLowerCase())return e[n];return n}function R(e){var t,n;const r={};for(const i of e.children)if(i instanceof HTMLParamElement){const e=null===(t=i.attributes.getNamedItem("name"))||void 0===t?void 0:t.value,o=null===(n=i.attributes.getNamedItem("value"))||void 0===n?void 0:n.value;e&&o&&(r[e]=o)}return r}class T extends E{constructor(){super(),this.params={}}connectedCallback(){var e;super.connectedCallback(),this.params=R(this);const t=O(this.params,"allowScriptAccess",null);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 r=O(this.params,"flashvars",this.getAttribute("flashvars")),i=O(this.params,"bgcolor",this.getAttribute("bgcolor"));if(n){this.allowScriptAccess=P(t,n);const e={url:n};r&&(e.parameters=r),i&&(e.backgroundColor=i),this.load(e)}}debugPlayerInfo(){var e;let t=super.debugPlayerInfo();t+="Player type: Object\n";let n=null;return this.attributes.getNamedItem("data")?n=null===(e=this.attributes.getNamedItem("data"))||void 0===e?void 0:e.value:this.params.movie&&(n=this.params.movie),t+=`SWF URL: ${n}\n`,Object.keys(this.params).forEach((e=>{t+=`Param ${e}: ${this.params[e]}\n`})),Object.keys(this.attributes).forEach((e=>{var n;t+=`Attribute ${e}: ${null===(n=this.attributes.getNamedItem(e))||void 0===n?void 0:n.value}\n`})),t}get data(){return this.getAttribute("data")}set data(e){if(null!=e){const t=document.createAttribute("data");t.value=e,this.attributes.setNamedItem(t)}else this.attributes.removeNamedItem("data")}static isInterdictable(e){var t,n,r;if(e.getElementsByTagName("ruffle-embed").length>0)return!1;const i=null===(t=e.attributes.getNamedItem("data"))||void 0===t?void 0:t.value.toLowerCase(),o=R(e);let c;if(i)c=F(i);else{if(!o||!o.movie)return!1;c=F(o.movie)}const s=null===(n=e.attributes.getNamedItem("classid"))||void 0===n?void 0:n.value.toLowerCase();if(s===k.toLowerCase())return!Array.from(e.getElementsByTagName("embed")).some(A.isInterdictable);if(null!=s&&""!==s)return!1;const a=null===(r=e.attributes.getNamedItem("type"))||void 0===r?void 0:r.value.toLowerCase();return a===w.toLowerCase()||a===m.toLowerCase()||a===x.toLowerCase()||a===y.toLowerCase()||(null==a||""===a)&&c}static fromNativeObjectElement(e){const t=b("ruffle-object",T),n=document.createElement(t);for(const t of Array.from(e.getElementsByTagName("embed")))A.isInterdictable(t)&&t.remove();for(const t of Array.from(e.getElementsByTagName("object")))T.isInterdictable(t)&&t.remove();return n.copyElement(e),n}}function M(e,t){let n="";if(void 0!==e&&void 0!==e.publicPaths&&void 0!==e.publicPaths[t])n=e.publicPaths[t];else if(void 0!==e&&void 0!==e.publicPath)n=e.publicPath;else if(void 0!==document.currentScript&&null!==document.currentScript&&"src"in document.currentScript&&""!==document.currentScript.src)try{n=new URL(".",document.currentScript.src).href}catch(e){console.warn("Unable to get currentScript URL")}return""===n||n.endsWith("/")||(n+="/"),n}var j,L;let N;const B=null!==(L=null===(j=window.RufflePlayer)||void 0===j?void 0:j.config)&&void 0!==L?L:{},D=M(B,"ruffle.js")+"ruffle.js";let U,q,$,H;function W(){try{U=null!=U?U:document.getElementsByTagName("object"),q=null!=q?q:document.getElementsByTagName("embed");for(const e of Array.from(U))if(T.isInterdictable(e)){const t=T.fromNativeObjectElement(e);e.replaceWith(t)}for(const e of Array.from(q))if(A.isInterdictable(e)){const t=A.fromNativeEmbedElement(e);e.replaceWith(t)}}catch(e){console.error(`Serious error encountered when polyfilling native Flash elements: ${e}`)}}function V(){$=null!=$?$:document.getElementsByTagName("iframe"),H=null!=H?H:document.getElementsByTagName("frame"),[$,H].forEach((e=>{for(let t=0;t{z(r,i)}),!1)}}))}function z(e,t){var n,r,i,o,c;return r=this,i=void 0,c=function*(){let r;yield new Promise((e=>{window.setTimeout((()=>{e()}),100)}));try{if(r=e.document,!r)return}catch(e){return void(N||console.warn(t+e))}if(N||void 0===r.documentElement.dataset.ruffleOptout)if(N)e.RufflePlayer||(e.RufflePlayer={}),e.RufflePlayer.config=Object.assign(Object.assign({},B),null!==(n=e.RufflePlayer.config)&&void 0!==n?n:{});else if(!e.RufflePlayer){const t=r.createElement("script");t.setAttribute("src",D),t.onload=()=>{e.RufflePlayer={},e.RufflePlayer.config=B},r.head.appendChild(t)}},new((o=void 0)||(o=Promise))((function(e,t){function n(e){try{a(c.next(e))}catch(e){t(e)}}function s(e){try{a(c.throw(e))}catch(e){t(e)}}function a(t){var r;t.done?e(t.value):(r=t.value,r instanceof o?r:new o((function(e){e(r)}))).then(n,s)}a((c=c.apply(r,i||[])).next())}))}function G(){d(u)}function Y(e){N=e,W(),V(),new MutationObserver((function(e){e.some((e=>e.addedNodes.length>0))&&(W(),V())})).observe(document,{childList:!0,subtree:!0})}class X{constructor(e,t,n,r,i){this.major=e,this.minor=t,this.patch=n,this.prIdent=r,this.buildIdent=i}static fromSemver(e){const t=e.split("+"),n=t[0].split("-"),r=n[0].split("."),i=parseInt(r[0],10);let o=0,c=0,s=null,a=null;return null!=r[1]&&(o=parseInt(r[1],10)),null!=r[2]&&(c=parseInt(r[2],10)),null!=n[1]&&(s=n[1].split(".")),null!=t[1]&&(a=t[1].split(".")),new X(i,o,c,s,a)}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 Z{constructor(e){this.requirements=e}satisfiedBy(e){for(let t=0;t"===i?n=n&&e.hasPrecedenceOver(o):">="===i?n=n&&(e.hasPrecedenceOver(o)||o.isEqual(e)):"<"===i?n=n&&o.hasPrecedenceOver(e):"<="===i?n=n&&(o.hasPrecedenceOver(e)||o.isEqual(e)):"^"===i&&(n=n&&o.isCompatibleWith(e))}if(n)return!0}return!1}static fromRequirementString(e){const t=e.split(" ");let n=[];const r=[];for(let e=0;e0&&(r.push(n),n=[]);else if(t[e].length>0){const r=/[0-9]/.exec(t[e]);if(r){const i=t[e].slice(0,r.index).trim(),o=X.fromSemver(t[e].slice(r.index).trim());n.push({comparator:i,version:o})}}return n.length>0&&r.push(n),new Z(r)}}class Q{constructor(e){this.sources={},this.config={},this.invoked=!1,this.newestName=null,this.conflict=null,null!=e&&(e instanceof Q?(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,t){this.sources[e]=t}newestSourceName(){let e=null,t=X.fromSemver("0.0.0");for(const n in this.sources)if(Object.prototype.hasOwnProperty.call(this.sources,n)){const r=X.fromSemver(this.sources[n].version);r.hasPrecedenceOver(t)&&(e=n,t=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 t=Z.fromRequirementString(e);let n=null;for(const e in this.sources)if(Object.prototype.hasOwnProperty.call(this.sources,e)){const r=X.fromSemver(this.sources[e].version);t.satisfiedBy(r)&&(n=this.sources[e])}return n}localCompatible(){return void 0!==this.sources.local?this.satisfying("^"+this.sources.local.version):this.newest()}local(){return void 0!==this.sources.local?this.satisfying("="+this.sources.local.version):this.newest()}superseded(){this.invoked=!0}static negotiate(e,t,n){let r;return r=e instanceof Q?e:new Q(e),void 0!==t&&void 0!==n&&(r.registerSource(t,n),!1!==r.config.polyfills&&n.pluginPolyfill()),r}}var J=n(762);class K{constructor(e){this.name=e}get version(){return"0.1.0"}polyfill(e){Y(e)}pluginPolyfill(){G()}createPlayer(){const e=b("ruffle-player",E);return document.createElement(e)}}},762:(e,t,n)=>{"use strict";function r(e,t,n){t&&e.getChannelData(0).set(t),n&&e.getChannelData(1).set(n)}n.d(t,{K:()=>r})},196:(e,t,n)=>{const{PublicAPI:r,SourceAPI:i,publicPath:o}=n(339);window.RufflePlayer=r.negotiate(window.RufflePlayer,"local",new i("local")),n.p=o(window.RufflePlayer.config,"local")}},ki={};function Si(e){if(ki[e])return ki[e].exports;var t=ki[e]={id:e,loaded:!1,exports:{}};return yi[e](t,t.exports,Si),t.loaded=!0,t.exports}Si.m=yi,Si.c=ki,Si.d=(e,t)=>{for(var n in t)Si.o(t,n)&&!Si.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Si.f={},Si.e=e=>Promise.all(Object.keys(Si.f).reduce(((t,n)=>(Si.f[n](e,t),t)),[])),Si.u=e=>"core.ruffle.0197a207ce1d77ef54e9.js",Si.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),Si.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),Si.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="ruffle-selfhosted:",Si.l=(n,r,i,o)=>{if(e[n])e[n].push(r);else{var c,s;if(void 0!==i)for(var a=document.getElementsByTagName("script"),u=0;u{c.onerror=c.onload=null,clearTimeout(_);var i=e[n];if(delete e[n],c.parentNode&&c.parentNode.removeChild(c),i&&i.forEach((e=>e(r))),t)return t(r)},_=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),s&&document.head.appendChild(c)}},Si.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},Si.p="",(()=>{var e={179:0};Si.f.j=(t,n)=>{var r=Si.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise(((n,i)=>{r=e[t]=[n,i]}));n.push(r[2]=i);var o=Si.p+Si.u(t),c=new Error;Si.l(o,(n=>{if(Si.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",c.name="ChunkLoadError",c.type=i,c.request=o,r[1](c)}}),"chunk-"+t,t)}};var t=(t,n)=>{for(var r,i,[o,c,s]=n,a=0,u=[];a