Lucas Kent e39465ad2f Changes to be committed:
new file:   Files/flashplayer_32_sa.exe
	new file:   favicon.ico
	new file:   globe.gif
	new file:   imgs/download.png
	new file:   imgs/zuck.jpg
	new file:   index.html
	new file:   other.ico
	new file:   script.js
	new file:   site.webmanifest
	new file:   sitemap.html
	new file:   styles/backround.css
	new file:   styles/border.css
	new file:   styles/fonts/Titillium_Web/OFL.txt
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf
	new file:   styles/fonts/webfontkit-20221027-163353/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2
	new file:   styles/fonts/webfontkit-20221027-165950/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2
	new file:   styles/style.css
	new file:   tools/2048/.gitignore
	new file:   tools/2048/.jshintrc
	new file:   tools/2048/CONTRIBUTING.md
	new file:   tools/2048/LICENSE.txt
	new file:   tools/2048/README.md
	new file:   tools/2048/Rakefile
	new file:   tools/2048/favicon.ico
	new file:   tools/2048/index.html
	new file:   tools/2048/js/animframe_polyfill.js
	new file:   tools/2048/js/application.js
	new file:   tools/2048/js/bind_polyfill.js
	new file:   tools/2048/js/classlist_polyfill.js
	new file:   tools/2048/js/game_manager.js
	new file:   tools/2048/js/grid.js
	new file:   tools/2048/js/html_actuator.js
	new file:   tools/2048/js/keyboard_input_manager.js
	new file:   tools/2048/js/local_storage_manager.js
	new file:   tools/2048/js/tile.js
    new file:   tools/2048/meta/apple-touch-icon.png
	new file:   tools/webretro/cores/neocd_libretro.js
	new file:   tools/webretro/cores/neocd_libretro.wasm
	new file:   tools/webretro/cores/nestopia_libretro.js
	new file:   tools/webretro/cores/nestopia_libretro.wasm
	new file:   tools/webretro/cores/o2em_libretro.js
	new file:   tools/webretro/cores/o2em_libretro.wasm
	new file:   tools/webretro/cores/opera_libretro.js
	new file:   tools/webretro/cores/opera_libretro.wasm
2022-11-02 08:40:01 -04:00

1 line
65 KiB
JavaScript

"use strict";window.g_aOF=class{constructor(e,a){this.g_aog=e,this.g_aOG=a,this.g_aOH=!1,this.g_anl=()=>this.g_Jj()}g_aOI(){}g_aOJ(e,a,g,_){this.g_aog.g_aOK(this.g_aOG,e,a,g,_)}g_aOL(e,a,g,_){return this.g_aog.g_aOM(this.g_aOG,e,a,g,_)}g_aON(e,a,g){this.g_aog.g_aOO()?this.g_aOJ(e,a,g):this.g_aog.g_aOP()._OnMessageFromDOM({type:"event",component:this.g_aOG,handler:e,dispatchOpts:g||null,data:a,responseId:null})}g_aOQ(e,a){this.g_aog.g_aOR(this.g_aOG,e,a)}g_aOS(e){for(const[a,g]of e)this.g_aOQ(a,g)}g_aOT(){return this.g_aog}g_aOU(){return this.g_aOG}g_abF(){this.g_aOH||(this.g_aog.g_aOV(this.g_anl),this.g_aOH=!0)}g_abq(){this.g_aOH&&(this.g_aog.g_aOW(this.g_anl),this.g_aOH=!1)}g_Jj(){}},"use strict",window.g_aOX=class extends g_aOF{constructor(e,a){super(e,a),this.g_aOY=new Map,this.g_aOZ=!0,this.g_aOQ("create",e=>this.g_aO_(e)),this.g_aOQ("destroy",e=>this.g_aO$(e)),this.g_aOQ("set-visible",e=>this.g_aPa(e)),this.g_aOQ("update-position",e=>this.g_aPb(e)),this.g_aOQ("update-state",e=>this.g_aFT(e)),this.g_aOQ("focus",e=>this.g_aPc(e)),this.g_aOQ("set-css-style",e=>this.g_aPd(e))}g_aPe(e){this.g_aOZ=!!e}g_aPf(e,g){this.g_aOQ(e,e=>{const a=e.elementId,_=this.g_aOY.get(a);return g(_,e)})}g_aO_(e){const a=e.elementId,g=this.g_acd(a,e);this.g_aOY.set(a,g),e.isVisible||(g.style.display="none"),this.g_aOZ&&document.body.appendChild(g)}g_acd(){throw new Error("required override")}g_aPg(){}g_aO$(e){const a=e.elementId,g=this.g_aOY.get(a);this.g_aPg(g),this.g_aOZ&&g.parentElement.removeChild(g),this.g_aOY.delete(a)}g_aPh(e,a,g){g||(g={}),g.elementId=a,this.g_aOJ(e,g)}g_aPi(e,a,g){g||(g={}),g.elementId=a,this.g_aON(e,g)}g_aPa(e){if(this.g_aOZ){const a=this.g_aOY.get(e.elementId);a.style.display=e.isVisible?"":"none"}}g_aPb(e){if(this.g_aOZ){const a=this.g_aOY.get(e.elementId);a.style.left=e.left+"px",a.style.top=e.top+"px",a.style.width=e.width+"px",a.style.height=e.height+"px";const g=e.fontSize;null!==g&&(a.style.fontSize=g+"em")}}g_aFT(e){const a=this.g_aOY.get(e.elementId);this.g_aPj(a,e)}g_aPj(){throw new Error("required override")}g_aPc(e){const a=this.g_aOY.get(e.elementId);e.focus?a.focus():a.blur()}g_aPd(e){const a=this.g_aOY.get(e.elementId);a.style[e.prop]=e.val}g_aPk(e){return this.g_aOY.get(e)}},"use strict";{function _(e){return new Promise((a,g)=>{const _=document.createElement("script");_.onload=a,_.onerror=g,_.async=!1,_.src=e,document.head.appendChild(_)})}async function t(e){const a=await n(e),g=new TextDecoder("utf-8");return g.decode(a)}function n(e){return new Promise((g,_)=>{const a=new FileReader;a.onload=e=>g(e.target.result),a.onerror=e=>_(e),a.readAsArrayBuffer(e)})}const a=/(iphone|ipod|ipad)/i.test(navigator.userAgent);let o=new Audio;const r={"audio/webm; codecs=opus":!!o.canPlayType("audio/webm; codecs=opus"),"audio/ogg; codecs=opus":!!o.canPlayType("audio/ogg; codecs=opus"),"audio/webm; codecs=vorbis":!!o.canPlayType("audio/webm; codecs=vorbis"),"audio/ogg; codecs=vorbis":!!o.canPlayType("audio/ogg; codecs=vorbis"),"audio/mp4":!!o.canPlayType("audio/mp4"),"audio/mpeg":!!o.canPlayType("audio/mpeg")};o=null;const e=[];let g=0;window.RealFile=window.File;const s=[],i=new Map,u=new Map;let U=0;const l=[];self.g_aPl=function(e){if("function"!=typeof e)throw new Error("runOnStartup called without a function");l.push(e)},window.g_aPm=class o{constructor(e){this.g_aPn=e.g_aPo,this.g_aPp=null,this.g_amk="",this.g_aPq=e.g_aPr,this.g_aPs={},this.g_aPt=null,this.g_aPu=null,this.g_aPv=[],this.g_aPw=null,this.g_akl=null,this.g_aoa=null,this.g_akU=-1,this.g_aPx=()=>this.g_aPy(),this.g_aPz=[],this.g_amp=e.g_aPA,"cordova"===this.g_amp&&this.g_aPn&&(console.warn("[C3 runtime] Worker mode is enabled and supported, but is disabled in Cordova due to crbug.com/939775. Reverting to DOM mode."),this.g_aPn=!1),/CrOS/.test(navigator.userAgent)&&(console.warn("[C3 runtime] Worker mode is enabled and supported, but is disabled in Chrome OS due to reports of crashes. Reverting to DOM mode."),this.g_aPn=!1),this.g_aPB=!1,this.g_aPC=null,("html5"===this.g_amp||"playable-ad"===this.g_amp)&&"file"===location.protocol.substr(0,4)&&alert("Exported games won't work until you upload them. (When running on the file: protocol, browsers block many features from working for security reasons.)"),this.g_aOR("runtime","cordova-fetch-local-file",e=>this.g_aPD(e)),this.g_aOR("runtime","create-job-worker",e=>this.g_aPE(e)),"cordova"===this.g_amp?document.addEventListener("deviceready",()=>this.g_aat(e)):this.g_aat(e)}g_em(){this.g_aPF(),this.g_aPp&&(this.g_aPp.onmessage=null,this.g_aPp=null),this.g_aPt&&(this.g_aPt.terminate(),this.g_aPt=null),this.g_aPu&&(this.g_aPu.g_em(),this.g_aPu=null),this.g_akl&&(this.g_akl.parentElement.removeChild(this.g_akl),this.g_akl=null)}g_aPG(){return this.g_akl}g_fg(){return this.g_amk}g_aOO(){return this.g_aPn}g_apG(){return this.g_amp}g_aoy(){return"cordova"===this.g_amp&&a}g_aPH(){return"cordova"===this.g_amp&&!1===a}async g_aat(e){if("playable-ad"===this.g_amp){this.g_aPC=self.c3_base64files,await this.g_aPI();for(let a=0,g=e.g_aPJ.length;a<g;++a){const g=e.g_aPJ[a].toLowerCase();this.g_aPC.hasOwnProperty(g)&&(e.g_aPJ[a]=URL.createObjectURL(this.g_aPC[g]))}}if(e.g_aPK)this.g_amk=e.g_aPK;else{const e=location.origin;this.g_amk=("null"===e?"file:///":e)+location.pathname;const a=this.g_amk.lastIndexOf("../../../index.html");-1!==a&&(this.g_amk=this.g_amk.substr(0,a+1))}if(e.g_aPL)for(const[a,g]of Object.entries(e.g_aPL))this.g_aPs[a]=URL.createObjectURL(g);const a=new MessageChannel;this.g_aPp=a.port1,this.g_aPp.onmessage=e=>this._OnMessageFromRuntime(e.data),window.c3_addPortMessageHandler&&window.c3_addPortMessageHandler(e=>this.g_aPM(e)),this.g_aoa=new self.g_aPN(this),await this.g_aoa.g_ahs(),this.g_aPO(),"object"==typeof window.StatusBar&&window.StatusBar.hide(),"object"==typeof window.AndroidFullScreen&&window.AndroidFullScreen.immersiveMode(),await this.g_aPP(),this.g_aPn?await this.g_aPQ(e,a.port2):await this.g_aPR(e,a.port2)}g_aPS(e){return this.g_aPs.hasOwnProperty(e)?this.g_aPs[e]:e.endsWith("../../../workermain.html")&&this.g_aPs.hasOwnProperty("workermain.html")?this.g_aPs["workermain.js"]:"playable-ad"===this.g_amp&&this.g_aPC.hasOwnProperty(e.toLowerCase())?URL.createObjectURL(this.g_aPC[e.toLowerCase()]):e}async g_aPT(g,a,_){if(g.startsWith("blob:"))return new Worker(g,_);if(this.g_aoy()){const a=await this.g_As(this.g_aPq+g),e=new Blob([a],{type:"application/javascript"});return new Worker(URL.createObjectURL(e),_)}const t=new URL(g%2ca.html),n=location.origin!==t.origin;if(n){const e=await fetch(t);if(!e.ok)throw new Error("failed to fetch worker script");const a=await e.blob();return new Worker(URL.createObjectURL(a),_)}return new Worker(t,_)}g_aPO(){if(this.g_aoy()){const g=document.documentElement.style,a=document.body.style,_=window.innerWidth<window.innerHeight,t=_?window.screen.width:window.screen.height,n=_?window.screen.height:window.screen.width;a.height=g.height=n+"px",a.width=g.width=t+"px"}}g_aPU(e){return{baseUrl:this.g_amk,windowInnerWidth:window.innerWidth,windowInnerHeight:window.innerHeight,devicePixelRatio:window.devicePixelRatio,isFullscreen:o.g_alw(),projectData:e.g_aPV,previewImageBlobs:window.cr_previewImageBlobs||this.g_aPC,previewProjectFileBlobs:window.cr_previewProjectFileBlobs,exportType:e.g_aPA,isDebug:-1<self.location.search.indexOf("debug"),ife:!!self.g_aPW,jobScheduler:this.g_aoa.g_aPX(),supportedAudioFormats:r,opusWasmScriptUrl:window.cr_opusWasmScriptUrl||this.g_aPq+"opus.wasm.js",opusWasmBinaryUrl:window.cr_opusWasmBinaryUrl||this.g_aPq+"opus.wasm.wasm",isWKWebView:this.g_aoy(),isFBInstantAvailable:"undefined"!=typeof self.FBInstant}}async g_aPQ(e,a){const g=this.g_aPS(e.g_aPY);this.g_aPt=await this.g_aPT(g,this.g_amk,{name:"Runtime"}),this.g_akl=document.createElement("canvas"),this.g_akl.style.display="none";const _=this.g_akl.transferControlToOffscreen();document.body.appendChild(this.g_akl),window.c3canvas=this.g_akl,this.g_aPt.postMessage(Object.assign(this.g_aPU(e),{type:"init-runtime",isInWorker:!0,messagePort:a,canvas:_,workerDependencyScripts:e.g_aPZ||[],engineScripts:e.g_aPJ,projectScripts:window.g_aP_,projectScriptsStatus:self.C3_ProjectScriptsStatus}),[a,_,...this.g_aoa.g_aP$()]),this.g_aPv=s.map(e=>new e(this)),this.g_aQa(),self.c3_callFunction=(e,a)=>this.g_aPw.g_SY(e,a),"preview"===this.g_amp&&(self.goToLastErrorScript=()=>this.g_aOK("runtime","go-to-last-error-script"))}async g_aPR(a,g){this.g_akl=document.createElement("canvas"),this.g_akl.style.display="none",document.body.appendChild(this.g_akl),window.c3canvas=this.g_akl,this.g_aPv=s.map(e=>new e(this)),this.g_aQa();const t=a.g_aPJ.map(e=>new URL(e%2cthis.html).toString());if(Array.isArray(a.g_aPZ)&&t.unshift(...a.g_aPZ),await Promise.all(t.map(a=>_(a))),a.g_aQb&&0<a.g_aQb.length){const e=self.C3_ProjectScriptsStatus;try{if(await Promise.all(a.g_aQb.map(a=>_(a[1]))),Object.values(e).some(e=>!e))return void self.setTimeout(()=>this.g_aQc(e),100)}catch(g){return console.error("[Preview] Error loading project scripts: ",g),void self.setTimeout(()=>this.g_aQc(e),100)}}if("preview"===this.g_amp&&"object"!=typeof self.g_aQ.g_aOE)return console.error("[C3 runtime] Failed to load JavaScript code used in events. Check all your JavaScript code has valid syntax."),void alert("Failed to load JavaScript code used in events. Check all your JavaScript code has valid syntax.");const n=Object.assign(this.g_aPU(a),{isInWorker:!1,messagePort:g,canvas:this.g_akl,runOnStartupFunctions:l});this.g_aPu=self.C3_CreateRuntime(n),await self.C3_InitRuntime(this.g_aPu,n)}g_aQc(e){const a=Object.entries(e).filter(e=>!e[1]).map(e=>e[0]),g=`Failed to load project script '${a[0]}'. Check all your JavaScript code has valid syntax.`;console.error("[Preview] "+g),alert(g)}async g_aPE(){const e=await this.g_aoa.g_aQd();return{outputPort:e,transferables:[e]}}g_aOP(){if(this.g_aPn)throw new Error("not available in worker mode");return this.g_aPu}g_aOK(g,a,_,t,n){this.g_aPp.postMessage({type:"event",component:g,handler:a,dispatchOpts:t||null,data:_,responseId:null},this.g_aPB?void 0:n)}g_aOM(_,a,t,n,i){const e=U++,o=new Promise((g,a)=>{u.set(e,{resolve:g,reject:a})});return this.g_aPp.postMessage({type:"event",component:_,handler:a,dispatchOpts:n||null,data:t,responseId:e},this.g_aPB?void 0:i),o}["_OnMessageFromRuntime"](e){const a=e.type;if("event"===a)this.g_aQe(e);else if("result"===a)this.g_aQf(e);else if("runtime-ready"===a)this.g_aQg();else if("alert"===a)alert(e.message);else throw new Error(`unknown message '${a}'`)}g_aQe(_){const t=_.component,n=_.handler,a=_.data,o=_.responseId,e=i.get(t);if(!e)return void console.warn(`[DOM] No event handlers for component '${t}'`);const r=e.get(n);if(!r)return void console.warn(`[DOM] No handler '${n}' for component '${t}'`);let g=null;try{g=r(a)}catch(e){return console.error(`Exception in '${t}' handler '${n}':`,e),void(null!==o&&this.g_aQh(o,!1,e.toString()))}null!==o&&(g&&g.then?g.then(e=>this.g_aQh(o,!0,e)).catch(e=>{console.error(`Rejection from '${t}' handler '${n}':`,e),this.g_aQh(o,!1,e.toString())}):this.g_aQh(o,!0,g))}g_aQh(e,a,g){let _;g&&g.transferables&&(_=g.transferables),this.g_aPp.postMessage({type:"result",responseId:e,isOk:a,result:g},_)}g_aQf(g){const a=g.responseId,_=g.isOk,t=g.result,n=u.get(a);_?n.resolve(t):n.reject(t),u.delete(a)}g_aOR(e,a,g){let _=i.get(e);if(_||(_=new Map,i.set(e,_)),_.has(a))throw new Error(`[DOM] Component '${e}' already has handler '${a}'`);_.set(a,g)}static g_aQi(e){if(s.includes(e))throw new Error("DOM handler already added");s.push(e)}g_aQa(){for(const e of this.g_aPv)if("runtime"===e.g_aOU())return void(this.g_aPw=e);throw new Error("cannot find runtime DOM handler")}g_aPM(e){this.g_aOK("debugger","message",e)}g_aQg(){for(const e of this.g_aPv)e.g_aOI()}static g_alw(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)}async g_aQj(){return await this.g_aOM("runtime","get-remote-preview-status-info")}g_aOV(e){this.g_aPz.push(e),this.g_aQk()}g_aOW(e){const a=this.g_aPz.indexOf(e);if(-1===a)throw new Error("invalid callback");this.g_aPz.splice(a,1),this.g_aPz.length||this.g_aPF()}g_aQk(){-1===this.g_akU&&this.g_aPz.length&&(this.g_akU=requestAnimationFrame(this.g_aPx))}g_aPF(){-1!==this.g_akU&&(cancelAnimationFrame(this.g_akU),this.g_akU=-1)}g_aPy(){this.g_akU=-1;for(const e of this.g_aPz)e();this.g_aQk()}g_aQl(e){this.g_aPw.g_aQl(e)}g_aQm(e){this.g_aPw.g_aQm(e)}g_aQn(){this.g_aPw.g_aQn()}g_aGD(e){this.g_aPw.g_aGD(e)}g_AP(e){return!!r[e]}async g_adu(e){const a=await this.g_aOM("runtime","opus-decode",{arrayBuffer:e},null,[e]);return new Float32Array(a)}g_fS(e){return /^(?:[a-z]+:)?\/\//.test(e)||"data:"===e.substr(0,5)||"blob:"===e.substr(0,5)}g_fT(e){return!this.g_fS(e)}async g_aPD(e){const a=e.filename;switch(e.as){case"text":return await this.g_At(a);case"buffer":return await this.g_As(a);default:throw new Error("unsupported type");}}g_aQo(e){const g=window.cordova.file.applicationDirectory+"www/"+e.toLowerCase();return new Promise((e,a)=>{window.resolveLocalFileSystemURL(g,g=>{g.file(e,a)},a)})}async g_At(e){const a=await this.g_aQo(e);return await t(a)}g_aQp(){if(e.length&&!(8<=g)){g++;const _=e.shift();this.g_aQq(_.filename,_.g_aQr,_.g_aQs)}}g_As(_){return new Promise((t,n)=>{e.push({filename:_,g_aQr:e=>{g--,this.g_aQp(),t(e)},g_aQs:e=>{g--,this.g_aQp(),n(e)}}),this.g_aQp()})}async g_aQq(g,a,e){try{const _=await this.g_aQo(g),t=await n(_);a(t)}catch(g){e(g)}}async g_aPI(){const e=[];for(const[a,g]of Object.entries(this.g_aPC))e.push(this.g_aQt(a,g));await Promise.all(e)}async g_aQt(e,a){if("object"==typeof a)this.g_aPC[e]=new Blob([a.str],{type:a.type});else{const g=await fetch(a),_=await g.blob();this.g_aPC[e]=_}}g_aPP(){let e=null;const g=new Promise(a=>e=a),_=new ArrayBuffer(1),t=new MessageChannel;return t.port2.onmessage=a=>{a.data&&a.data.arrayBuffer||(this.g_aPB=!0,console.warn("MessageChannel transfers determined to be broken. Disabling transferables.")),e()},t.port1.postMessage({arrayBuffer:_},[_]),g}}}{function _(e){return e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||e.originalEvent&&e.originalEvent.sourceCapabilities&&e.originalEvent.sourceCapabilities.firesTouchEvents}function t(e){return new Promise((a,g)=>{const _=document.createElement("link");_.onload=()=>a(_),_.onerror=e=>g(e),_.rel="stylesheet",_.href=e,document.head.appendChild(_)})}function a(e){return new Promise((a,g)=>{const _=new Image;_.onload=()=>a(_),_.onerror=e=>g(e),_.src=e})}async function r(e){const g=URL.createObjectURL(e);try{return await a(g)}finally{URL.revokeObjectURL(g)}}function s(e){do{if(e.parentNode&&e.hasAttribute("contenteditable"))return!0;e=e.parentNode}while(e);return!1}function d(e){const a=e.target.tagName.toLowerCase();l.has(a)&&e.preventDefault()}function e(e){(e.metaKey||e.ctrlKey)&&e.preventDefault()}function g(){try{return window.parent&&window.parent.document.hasFocus()}catch(e){return!1}}const u=new Map([["OSLeft","MetaLeft"],["OSRight","MetaRight"]]),i={dispatchRuntimeEvent:!0,dispatchUserScriptEvent:!0},U={dispatchUserScriptEvent:!0},c={dispatchRuntimeEvent:!0},l=new Set(["canvas","body","html"]);self.C3_RasterSvgImage=async function(g,a,_){const t=document.createElement("canvas");t.width=a,t.height=_;const n=t.getContext("2d");return n.drawImage(g,0,0,a,_),t};let p=!1;document.addEventListener("pause",()=>p=!0),document.addEventListener("resume",()=>p=!1);const n=class extends g_aOF{constructor(g){super(g,"runtime"),this.g_aQu=!0,this.g_aQv=-1,this.g_aQw="any",this.g_aQx=!1,this.g_aQy=!1,this.g_aQz=null,g.g_aOR("canvas","update-size",e=>this.g_aQA(e)),g.g_aOR("runtime","invoke-download",e=>this.g_aQB(e)),g.g_aOR("runtime","raster-svg-image",e=>this.g_aQC(e)),g.g_aOR("runtime","set-target-orientation",e=>this.g_aQD(e)),g.g_aOR("runtime","register-sw",()=>this.g_aQE()),g.g_aOR("runtime","post-to-debugger",e=>this.g_aQF(e)),g.g_aOR("runtime","go-to-script",e=>this.g_aQF(e)),g.g_aOR("runtime","before-start-ticking",()=>this.g_aQG()),g.g_aOR("runtime","debug-highlight",e=>this.g_aQH(e)),g.g_aOR("runtime","enable-device-orientation",()=>this.g_aQI()),g.g_aOR("runtime","enable-device-motion",()=>this.g_aQJ()),g.g_aOR("runtime","add-stylesheet",e=>this.g_aQK(e));const _=new Set(["input","textarea","datalist"]);window.addEventListener("contextmenu",e=>{const a=e.target,g=a.tagName.toLowerCase();_.has(g)||s(a)||e.preventDefault()}),window.addEventListener("selectstart",d),window.addEventListener("gesturehold",d),window.addEventListener("touchstart",d,{passive:!1});const a=g.g_aPG();"undefined"==typeof PointerEvent?a.addEventListener("touchstart",d):(window.addEventListener("pointerdown",d,{passive:!1}),a.addEventListener("pointerdown",d)),this.g_aQL=0,window.addEventListener("mousedown",e=>{1===e.button&&e.preventDefault()}),window.addEventListener("mousewheel",e,{passive:!1}),window.addEventListener("wheel",e,{passive:!1}),window.addEventListener("resize",()=>this.g_alj()),this.g_aQM=new Set,this.g_aQN=new WeakSet,this.g_aFL=!1}g_aQG(){return document.addEventListener("visibilitychange",()=>this.g_aoc(document.hidden)),document.addEventListener("pause",()=>this.g_aoc(!0)),document.addEventListener("resume",()=>this.g_aoc(!1)),{isSuspended:!!(document.hidden||p)}}g_aOI(){window.addEventListener("focus",()=>this.g_aQO("window-focus")),window.addEventListener("blur",()=>{this.g_aQO("window-blur",{parentHasFocus:g()}),this.g_aQL=0}),window.addEventListener("fullscreenchange",()=>this.g_alk()),window.addEventListener("webkitfullscreenchange",()=>this.g_alk()),window.addEventListener("mozfullscreenchange",()=>this.g_alk()),window.addEventListener("fullscreenerror",e=>this.g_all(e)),window.addEventListener("webkitfullscreenerror",e=>this.g_all(e)),window.addEventListener("mozfullscreenerror",e=>this.g_all(e)),window.addEventListener("keydown",e=>this.g_aQP("keydown",e)),window.addEventListener("keyup",e=>this.g_aQP("keyup",e)),window.addEventListener("dblclick",e=>this.g_aQQ("dblclick",e,i)),window.addEventListener("wheel",e=>this.g_aQR("wheel",e)),"undefined"==typeof PointerEvent?(window.addEventListener("mousedown",e=>this.g_aQS("pointerdown",e)),window.addEventListener("mousemove",e=>this.g_aQS("pointermove",e)),window.addEventListener("mouseup",e=>this.g_aQS("pointerup",e)),window.addEventListener("touchstart",e=>this.g_aQT("pointerdown",e)),window.addEventListener("touchmove",e=>this.g_aQT("pointermove",e)),window.addEventListener("touchend",e=>this.g_aQT("pointerup",e)),window.addEventListener("touchcancel",e=>this.g_aQT("pointercancel",e))):(window.addEventListener("pointerdown",e=>this.g_aQU("pointerdown",e)),window.addEventListener("pointermove",e=>this.g_aQU("pointermove",e)),window.addEventListener("pointerup",e=>this.g_aQU("pointerup",e)),window.addEventListener("pointercancel",e=>this.g_aQU("pointercancel",e)));const e=()=>this.g_aQn();window.addEventListener("pointerup",e,!0),window.addEventListener("touchend",e,!0),window.addEventListener("click",e,!0),window.addEventListener("keydown",e,!0),window.addEventListener("gamepadconnected",e,!0)}g_aQO(e,a){this.g_aOJ(e,a||null,c)}g_alj(){const e=window.innerWidth,a=window.innerHeight;this.g_aQO("window-resize",{innerWidth:e,innerHeight:a,devicePixelRatio:window.devicePixelRatio}),this.g_aog.g_aoy()&&(-1!==this.g_aQv&&clearTimeout(this.g_aQv),this.g_aQV(e,a,0))}g_aQW(e,a,g){-1!==this.g_aQv&&clearTimeout(this.g_aQv),this.g_aQv=setTimeout(()=>this.g_aQV(e,a,g),48)}g_aQV(g,a,_){const t=window.innerWidth,n=window.innerHeight;this.g_aQv=-1,t!=g||n!=a?this.g_aQO("window-resize",{innerWidth:t,innerHeight:n,devicePixelRatio:window.devicePixelRatio}):10>_&&this.g_aQW(t,n,_+1)}g_aQD(e){this.g_aQw=e.targetOrientation}g_aQX(){const e=this.g_aQw;if(screen.orientation&&screen.orientation.lock)screen.orientation.lock(e).catch(e=>console.warn("[Construct 3] Failed to lock orientation: ",e));else try{let a=!1;screen.lockOrientation?a=screen.lockOrientation(e):screen.webkitLockOrientation?a=screen.webkitLockOrientation(e):screen.mozLockOrientation?a=screen.mozLockOrientation(e):screen.msLockOrientation&&(a=screen.msLockOrientation(e)),a||console.warn("[Construct 3] Failed to lock orientation")}catch(e){console.warn("[Construct 3] Failed to lock orientation: ",e)}}g_alk(){const e=g_aPm.g_alw();e&&"any"!==this.g_aQw&&this.g_aQX(),this.g_aOJ("fullscreenchange",{isFullscreen:e,innerWidth:window.innerWidth,innerHeight:window.innerHeight})}g_all(e){console.warn("[Construct 3] Fullscreen request failed: ",e),this.g_aOJ("fullscreenerror",{isFullscreen:g_aPm.g_alw(),innerWidth:window.innerWidth,innerHeight:window.innerHeight})}g_aoc(e){e?this.g_aog.g_aPF():this.g_aog.g_aQk(),this.g_aOJ("visibilitychange",{hidden:e})}g_aQP(e,a){const g=u.get(a.code)||a.code;this.g_aON(e,{code:g,key:a.key,which:a.which,repeat:a.repeat,altKey:a.altKey,ctrlKey:a.ctrlKey,metaKey:a.metaKey,shiftKey:a.shiftKey,timeStamp:a.timeStamp},i)}g_aQR(e,a){this.g_aOJ(e,{clientX:a.clientX,clientY:a.clientY,deltaX:a.deltaX,deltaY:a.deltaY,deltaZ:a.deltaZ,deltaMode:a.deltaMode,timeStamp:a.timeStamp},i)}g_aQQ(a,e,g){_(e)||("mousedown"===a&&window!==window.top&&window.focus(),this.g_aON(a,{button:e.button,buttons:e.buttons,clientX:e.clientX,clientY:e.clientY,timeStamp:e.timeStamp},g))}g_aQS(a,e){if(!_(e)){"pointerdown"===a&&window!==window.top&&window.focus();const g=this.g_aQL;"pointerdown"===a&&0!==g?a="pointermove":"pointerup"==a&&0!==e.buttons&&(a="pointermove"),this.g_aON(a,{pointerId:1,pointerType:"mouse",button:e.button,buttons:e.buttons,lastButtons:g,clientX:e.clientX,clientY:e.clientY,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,timeStamp:e.timeStamp},i),this.g_aQL=e.buttons,this.g_aQQ(e.type,e,U)}}g_aQU(e,a){"pointerdown"===e&&window!==window.top&&window.focus();let g=0;if("mouse"===a.pointerType&&(g=this.g_aQL),this.g_aON(e,{pointerId:a.pointerId,pointerType:a.pointerType,button:a.button,buttons:a.buttons,lastButtons:g,clientX:a.clientX,clientY:a.clientY,width:a.width||0,height:a.height||0,pressure:a.pressure||0,tangentialPressure:a.tangentialPressure||0,tiltX:a.tiltX||0,tiltY:a.tiltY||0,twist:a.twist||0,timeStamp:a.timeStamp},i),"mouse"===a.pointerType){let g="mousemove";"pointerdown"===e?g="mousedown":"pointerup"==e&&(g="pointerup"),this.g_aQQ(g,a,U),this.g_aQL=a.buttons}}g_aQT(e,a){"pointerdown"===e&&window!==window.top&&window.focus();for(let g=0,_=a.changedTouches.length;g<_;++g){const _=a.changedTouches[g];this.g_aON(e,{pointerId:_.identifier,pointerType:"touch",button:0,buttons:0,lastButtons:0,clientX:_.clientX,clientY:_.clientY,width:2*(_.radiusX||_.webkitRadiusX||0),height:2*(_.radiusY||_.webkitRadiusY||0),pressure:_.force||_.webkitForce||0,tangentialPressure:0,tiltX:0,tiltY:0,twist:_.rotationAngle||0,timeStamp:a.timeStamp},i)}}g_aQI(){this.g_aQx||(this.g_aQx=!0,window.addEventListener("deviceorientation",e=>this.g_aCD(e)))}g_aQJ(){this.g_aQy||(this.g_aQy=!0,window.addEventListener("devicemotion",e=>this.g_aCE(e)))}g_aCD(e){this.g_aOJ("deviceorientation",{alpha:e.alpha||0,beta:e.beta||0,gamma:e.gamma||0,timeStamp:e.timeStamp},i)}g_aCE(_){let a=null;const t=_.acceleration;t&&(a={x:t.x||0,y:t.y||0,z:t.z||0});let n=null;const o=_.accelerationIncludingGravity;o&&(n={x:o.x||0,y:o.y||0,z:o.z||0});let e=null;const r=_.rotationRate;r&&(e={alpha:r.alpha||0,beta:r.beta||0,gamma:r.gamma||0}),this.g_aOJ("devicemotion",{acceleration:a,accelerationIncludingGravity:n,rotationRate:e,interval:_.interval,timeStamp:_.timeStamp},i)}g_aQA(e){const a=this.g_aOT(),g=a.g_aPG();g.style.width=e.styleWidth+"px",g.style.height=e.styleHeight+"px",g.style.marginLeft=e.marginLeft+"px",g.style.marginTop=e.marginTop+"px",a.g_aPO(),this.g_aQu&&(g.style.display="",this.g_aQu=!1)}g_aQB(g){const _=g.url,t=g.filename,n=document.createElement("a"),e=document.body;n.textContent=t,n.href=_,n.download=t,e.appendChild(n),n.click(),e.removeChild(n)}async g_aQC(_){const a=_.blob,t=_.width,n=_.height,e=await r(a),i=await self.C3_RasterSvgImage(e,t,n);return await createImageBitmap(i)}async g_aQK(e){await t(e.url)}g_aQn(){const e=[...this.g_aQM];if(this.g_aQM.clear(),!this.g_aFL)for(const g of e){const e=g.play();e&&e.catch(()=>{this.g_aQN.has(g)||this.g_aQM.add(g)})}}g_aQl(e){if("function"!=typeof e.play)throw new Error("missing play function");this.g_aQN.delete(e);let a;try{a=e.play()}catch(a){return void this.g_aQM.add(e)}a&&a.catch(()=>{this.g_aQN.has(e)||this.g_aQM.add(e)})}g_aQm(e){this.g_aQM.delete(e),this.g_aQN.add(e)}g_aGD(e){this.g_aFL=!!e}g_aQH(e){const a=e.show;if(!a)return void(this.g_aQz&&(this.g_aQz.style.display="none"));this.g_aQz||(this.g_aQz=document.createElement("div"),this.g_aQz.id="inspectOutline",document.body.appendChild(this.g_aQz));const g=this.g_aQz;g.style.display="",g.style.left=e.left-1+"px",g.style.top=e.top-1+"px",g.style.width=e.width+2+"px",g.style.height=e.height+2+"px",g.textContent=e.name}g_aQE(){window.C3_RegisterSW&&window.C3_RegisterSW()}g_aQF(e){window.c3_postToMessagePort&&(e.from="runtime",window.c3_postToMessagePort(e))}g_SY(e,a){return this.g_aOL("js-invoke-function",{name:e,params:a})}};g_aPm.g_aQi(n)}{const e=document.currentScript.src;self.g_aPN=class{constructor(a){this.g_aQY=a,this.g_amk=e?e.substr(0,e.lastIndexOf("../../../index.html")+1):a.g_fg(),this.g_aql=Math.min(navigator.hardwareConcurrency||2,16),this.g_aQZ=null,this.g_aQ_=[],this.g_aqj=null,this.g_aQ$=null}async g_ahs(){if(this.g_aRa)throw new Error("already initialised");this.g_aRa=!0;const e=this.g_aQY.g_aPS("dispatchworker.html");this.g_aQZ=await this.g_aQY.g_aPT(e,this.g_amk,{name:"DispatchWorker"});const a=new MessageChannel;this.g_aqj=a.port1,this.g_aQZ.postMessage({type:"_init","in-port":a.port2},[a.port2]),this.g_aQ$=await this.g_aQd()}async g_aQd(){const g=this.g_aQ_.length,a=this.g_aQY.g_aPS("jobworker.html"),_=await this.g_aQY.g_aPT(a,this.g_amk,{name:"JobWorker"+g}),t=new MessageChannel,n=new MessageChannel;return this.g_aQZ.postMessage({type:"_addJobWorker",port:t.port1},[t.port1]),_.postMessage({type:"init",number:g,"dispatch-port":t.port2,"output-port":n.port2},[t.port2,n.port2]),this.g_aQ_.push(_),n.port1}g_aPX(){return{inputPort:this.g_aqj,outputPort:this.g_aQ$,maxNumWorkers:this.g_aql}}g_aP$(){return[this.g_aqj,this.g_aQ$]}}}if("use strict",window.C3_IsSupported){"undefined"!=typeof OffscreenCanvas;window.c3_runtimeInterface=new g_aPm({g_aPo:!1,g_aPY:"workermain.js",g_aPJ:["scripts/c3runtime.js"],g_aPr:"scripts/",g_aPZ:[],g_aPA:"html5"})}{const e=class extends g_aOF{constructor(e){super(e,"touch"),this.g_aOQ("request-permission",e=>this.g_aRb(e))}async g_aRb(e){const a=e.type;let g=!0;0===a?g=await this.g_aRc():1===a&&(g=await this.g_aRd()),this.g_aOJ("permission-result",{type:a,result:g})}async g_aRc(){if(!self.DeviceOrientationEvent||!self.DeviceOrientationEvent.requestPermission)return!0;try{const e=await self.DeviceOrientationEvent.requestPermission();return"granted"===e}catch(e){return console.warn("[Touch] Failed to request orientation permission: ",e),!1}}async g_aRd(){if(!self.DeviceMotionEvent||!self.DeviceMotionEvent.requestPermission)return!0;try{const e=await self.DeviceMotionEvent.requestPermission();return"granted"===e}catch(e){return console.warn("[Touch] Failed to request motion permission: ",e),!1}}};g_aPm.g_aQi(e)}{const e=class extends g_aOF{constructor(e){super(e,"browser"),this.g_amp="",this.g_aOQ("get-initial-state",e=>this.g_aRe(e)),this.g_aOQ("ready-for-sw-messages",()=>this.g_aRf()),this.g_aOQ("alert",e=>this.g_aRg(e)),this.g_aOQ("close",()=>this.g_aRh()),this.g_aOQ("set-focus",e=>this.g_aPc(e)),this.g_aOQ("vibrate",e=>this.g_aRi(e)),this.g_aOQ("lock-orientation",e=>this.g_aRj(e)),this.g_aOQ("unlock-orientation",()=>this.g_aRk()),this.g_aOQ("navigate",e=>this.g_aRl(e)),this.g_aOQ("request-fullscreen",e=>this.g_aRm(e)),this.g_aOQ("exit-fullscreen",()=>this.g_aRn()),window.addEventListener("online",()=>this.g_aEc(!0)),window.addEventListener("offline",()=>this.g_aEc(!1)),document.addEventListener("backbutton",()=>this.g_aRo()),"undefined"!=typeof Windows&&Windows.UI.Core.SystemNavigationManager.getForCurrentView().addEventListener("backrequested",e=>this.g_aRp(e))}g_aRe(e){return this.g_amp=e.exportType,{location:location.toString(),isOnline:!!navigator.onLine,referrer:document.referrer,title:document.title,isCookieEnabled:!!navigator.cookieEnabled,screenWidth:screen.width,screenHeight:screen.height,windowOuterWidth:window.outerWidth,windowOuterHeight:window.outerHeight,isScirraArcade:"undefined"!=typeof window.is_scirra_arcade}}g_aRf(){window.C3_RegisterSW&&window.OfflineClientInfo&&window.OfflineClientInfo.SetMessageCallback(e=>this.g_aOJ("sw-message",e.data))}g_aEc(e){this.g_aOJ("online-state",{isOnline:e})}g_aRo(){this.g_aOJ("backbutton")}g_aRp(e){e.handled=!0,this.g_aOJ("backbutton")}g_aRq(){return"nwjs"===this.g_amp?nw.Window.get():null}g_aRg(e){alert(e.message)}g_aRh(){navigator.app&&navigator.app.exitApp?navigator.app.exitApp():navigator.device&&navigator.device.exitApp?navigator.device.exitApp():window.close()}g_aPc(e){const g=e.isFocus;if("nwjs"===this.g_amp){const e=this.g_aRq();g?e.focus():e.blur()}else g?window.focus():window.blur()}g_aRi(e){navigator.vibrate&&navigator.vibrate(e.pattern)}g_aRj(e){const g=e.orientation;if(screen.orientation&&screen.orientation.lock)screen.orientation.lock(g).catch(e=>console.warn("[Construct 3] Failed to lock orientation: ",e));else try{let e=!1;screen.lockOrientation?e=screen.lockOrientation(g):screen.webkitLockOrientation?e=screen.webkitLockOrientation(g):screen.mozLockOrientation?e=screen.mozLockOrientation(g):screen.msLockOrientation&&(e=screen.msLockOrientation(g)),e||console.warn("[Construct 3] Failed to lock orientation")}catch(e){console.warn("[Construct 3] Failed to lock orientation: ",e)}}g_aRk(){try{screen.orientation&&screen.orientation.unlock?screen.orientation.unlock():screen.unlockOrientation?screen.unlockOrientation():screen.webkitUnlockOrientation?screen.webkitUnlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()}catch(e){}}g_aRl(e){const a=e.type;if("back"===a)navigator.app&&navigator.app.backHistory?navigator.app.backHistory():window.back();else if("forward"===a)window.forward();else if("home"===a)window.g_aRr();else if("reload"===a)location.reload();else if("url"===a){const a=e.url,g=e.target,_=e.exportType;"windows-uwp"===_&&"undefined"!=typeof Windows?Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri(a)):navigator.app&&navigator.app.loadUrl?navigator.app.loadUrl(a,{openExternal:!0}):"cordova"===_?window.open(a,"_system"):"preview"===_?window.open(a,"_blank"):!this.g_aEb&&(2===g?window.top.location=a:1===g?window.parent.location=a:window.location=a)}else if("new-window"===a){const a=e.url,g=e.tag,_=e.exportType;"windows-uwp"===_&&"undefined"!=typeof Windows?Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri(a)):navigator.app&&navigator.app.loadUrl?navigator.app.loadUrl(a,{openExternal:!0}):"cordova"===_?window.open(a,"_system"):window.open(a,g)}}g_aRm(e){const a={navigationUI:"auto"},g=e.navUI;1===g?a.navigationUI="hide":2===g&&(a.navigationUI="show");const _=document.documentElement;_.requestFullscreen?_.requestFullscreen(a):_.mozRequestFullScreen?_.mozRequestFullScreen(a):_.msRequestFullscreen?_.msRequestFullscreen(a):_.webkitRequestFullScreen&&("undefined"==typeof Element.ALLOW_KEYBOARD_INPUT?_.webkitRequestFullScreen():_.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT))}g_aRn(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()}};g_aPm.g_aQi(e)}{function e(e,g){return e.length===g.length&&(e===g||e.toLowerCase()===g.toLowerCase())}const a=class extends g_aOF{constructor(e){super(e,"audio"),this.g_aRs=null,this.g_aRt=null,this.g_aRu=!1,this.g_aRv=()=>this.g_aRw(),this.g_aRx=[],this.g_aRy=[],this.g_aRz=null,this.g_aRA="",this.g_aRB=-1,this.g_aRC=new Map,this.g_aFK=1,this.g_aFL=!1,this.g_aFx=0,this.g_aho=1,this.g_anB=0,this.g_aFA="HRTF",this.g_aFB="inverse",this.g_aRD=600,this.g_aFG=1e4,this.g_aFH=1,this.g_aRE=!1,this.g_aRF=!1,this.g_aRG=this.g_aog.g_AP("audio/webm; codecs=opus"),this.g_aRH=new Map,this.g_aRI=new Set,this.g_aRJ=!1,this.g_aRK="",this.g_aRL=null,self.C3Audio_OnMicrophoneStream=(e,a)=>this.g_aRM(e,a),this.g_aRN=null,self.C3Audio_GetOutputStream=()=>this.g_aRO(),this.g_aOS([["create-audio-context",e=>this.g_aRP(e)],["play",e=>this.g_aRQ(e)],["stop",e=>this.g_aRR(e)],["stop-all",()=>this.g_aRS()],["set-paused",e=>this.g_aRT(e)],["set-volume",e=>this.g_aRU(e)],["fade-volume",e=>this.g_aRV(e)],["set-master-volume",e=>this.g_aRW(e)],["set-muted",e=>this.g_aRX(e)],["set-silent",e=>this.g_aRY(e)],["set-looping",e=>this.g_aRZ(e)],["set-playback-rate",e=>this.g_aR_(e)],["seek",e=>this.g_aR$(e)],["preload",e=>this.g_aSa(e)],["unload",e=>this.g_F_(e)],["unload-all",()=>this.g_aSb()],["set-suspended",e=>this.g_aSc(e)],["add-effect",e=>this.g_aSd(e)],["set-effect-param",e=>this.g_aSe(e)],["remove-effects",e=>this.g_aSf(e)],["tick",e=>this.g_Ip(e)],["load-state",e=>this.g_aSg(e)]])}async g_aRP(e){e.isWKWebView&&(this.g_aRE=!0),this.g_aFx=e.timeScaleMode,this.g_aFA=["equalpower","HRTF","soundfield"][e.panningModel],this.g_aFB=["linear","inverse","exponential"][e.distanceModel],this.g_aRD=e.refDistance,this.g_aFG=e.maxDistance,this.g_aFH=e.rolloffFactor;const a={latencyHint:e.latencyHint};if("undefined"!=typeof AudioContext)this.g_aRs=new AudioContext(a);else if("undefined"!=typeof webkitAudioContext)this.g_aRs=new webkitAudioContext(a);else throw new Error("Web Audio API not supported");this.g_aRt=this.g_aRs.createGain(),this.g_aRt.connect(this.g_aRs.destination);const g=e.listenerPos;this.g_aRs.listener.setPosition(g[0],g[1],g[2]),this.g_aRs.listener.setOrientation(0,0,1,0,-1,0),window.addEventListener("pointerup",this.g_aRv,!0),window.addEventListener("touchend",this.g_aRv,!0),window.addEventListener("click",this.g_aRv,!0),window.addEventListener("keydown",this.g_aRv,!0),self.C3_GetAudioContextCurrentTime=()=>this.g_aSh();try{await Promise.all(e.preloadList.map(e=>this.g_aSi(e.originalUrl,e.url,e.type,!1)))}catch(e){console.error("[Construct 3] Preloading sounds failed: ",e)}return{sampleRate:this.g_aRs.sampleRate}}g_aRw(){if(!this.g_aRu){const e=this.g_aRs;"suspended"===e.state&&e.resume&&e.resume();const a=e.createBuffer(1,220,22050),g=e.createBufferSource();g.buffer=a,g.connect(e.destination),g.start(0),"running"===e.state&&(this.g_aRu=!0,window.removeEventListener("pointerup",this.g_aRv,!0),window.removeEventListener("touchend",this.g_aRv,!0),window.removeEventListener("click",this.g_aRv,!0),window.removeEventListener("keydown",this.g_aRv,!0),this.g_aRv=null)}}g_aSj(){return this.g_aRs}g_aSh(){return this.g_aRs.currentTime}g_aSk(){return this.g_aRt}g_aSl(e){const a=this.g_aRH.get(e.toLowerCase());return a?a[0].g_aSm():this.g_aSk()}g_aSn(e,g){e=e.toLowerCase();let _=this.g_aRH.get(e);_||(_=[],this.g_aRH.set(e,_)),g.g_aiX(_.length),g.g_aSo(e),_.push(g),this.g_aSp(e)}g_aSp(e){let a=this.g_aSk();const g=this.g_aRH.get(e);if(g&&g.length){a=g[0].g_aSm();for(let e=0,a=g.length;e<a;++e){const _=g[e];e+1===a?_.g_aSq(this.g_aSk()):_.g_aSq(g[e+1].g_aSm())}}for(const g of this.g_aSr(e))g.g_aSs(a);this.g_aRL&&this.g_aRK===e&&(this.g_aRL.disconnect(),this.g_aRL.connect(a))}g_aSt(){return this.g_aFK}g_aGm(){return this.g_aFL}g_aSu(){return this.g_aFx}g_Jh(){return this.g_aho}g_EK(){return this.g_anB}g_aSv(){return this.g_aRE}g_aSw(){return this.g_aRG}g_aSx(){this.g_aRF=!0}g_aSy(){return this.g_aFA}g_aSz(){return this.g_aFB}g_aSA(){return this.g_aRD}g_aSB(){return this.g_aFG}g_aSC(){return this.g_aFH}g_aSD(e,a){return a?this.g_aog.g_adu(e).then(e=>{const a=this.g_aRs.createBuffer(1,e.length,48e3),g=a.getChannelData(0);return g.set(e),a}):new Promise((a,g)=>{this.g_aRs.decodeAudioData(e,a,g)})}g_aQl(e){this.g_aog.g_aQl(e)}g_aQm(e){this.g_aog.g_aQm(e)}g_aSE(a){let g=0;for(let _=0,e=this.g_aRy.length;_<e;++_){const t=this.g_aRy[_];this.g_aRy[g]=t,t.g_aSF()===a?t.g_em():++g}this.g_aRy.length=g}g_aSG(){let e=0;for(let a=0,g=this.g_aRx.length;a<g;++a){const g=this.g_aRx[a];this.g_aRx[e]=g,g.g_aSH()?g.g_em():++e}this.g_aRx.length=e}*g_aSr(a){if(a)for(const g of this.g_aRy)e(g.g_aSI(),a)&&(yield g);else this.g_aRz&&!this.g_aRz.g_aSJ()&&(yield this.g_aRz)}async g_aSi(g,a,_,t,n){for(const e of this.g_aRx)if(e.g_aSK()===a)return await e.g_AE(),e;if(n)return null;t&&(this.g_aRE||this.g_aRF)&&this.g_aSG();const e=g_aSL.g_pB(this,g,a,_,t);return this.g_aRx.push(e),await e.g_AE(),e}async g_aSM(_,a,t,n,i){for(const e of this.g_aRy)if(e.g_aSK()===a&&(e.g_aSN()||i))return e.g_aSO(n),e;const e=await this.g_aSi(_,a,t,i),o=e.g_adJ(n);return this.g_aRy.push(o),o}g_aSP(e){let a=this.g_aRC.get(e);if(!a){let g=null;const _=new Promise(e=>g=e);a={g_aSQ:0,promise:_,resolve:g},this.g_aRC.set(e,a)}a.g_aSQ++}g_aSR(e){const a=this.g_aRC.get(e);if(!a)throw new Error("expected pending tag");a.g_aSQ--,0===a.g_aSQ&&(a.resolve(),this.g_aRC.delete(e))}g_aSS(e){e||(e=this.g_aRA);const g=this.g_aRC.get(e);return g?g.promise:Promise.resolve()}g_aST(){if(0<this.g_aRI.size)return void this.g_abF();for(const e of this.g_aRy)if(e.g_VJ())return void this.g_abF()}g_Jj(){for(const a of this.g_aRI)a.g_Jj();const e=this.g_aSh();for(const a of this.g_aRy)a.g_Jj(e);const a=this.g_aRy.filter(a=>a.g_VJ()).map(a=>a.g_aSU());this.g_aOJ("state",{tickCount:this.g_aRB,audioInstances:a,analysers:[...this.g_aRI].map(a=>a.g_aSV())}),0===a.length&&0===this.g_aRI.size&&this.g_abq()}g_aSW(e,a){this.g_aOJ("trigger",{type:e,tag:a})}async g_aRQ(_){const a=_.originalUrl,t=_.url,n=_.type,o=_.isMusic,e=_.tag,r=_.isLooping,g=_.vol,s=_.pos,i=_.panning;let d=_.off;if(0<d&&!_.trueClock)if(this.g_aRs.getOutputTimestamp){const e=this.g_aRs.getOutputTimestamp();d=d-e.performanceTime/1e3+e.contextTime}else d=d-performance.now()/1e3+this.g_aRs.currentTime;this.g_aRA=e,this.g_aSP(e);try{this.g_aRz=await this.g_aSM(a,t,n,e,o),i?(this.g_aRz.g_aSX(!0),this.g_aRz.g_aSY(i.x,i.y,i.angle,i.innerAngle,i.outerAngle,i.outerGain),i.hasOwnProperty("uid")&&this.g_aRz.g_aSZ(i.uid)):this.g_aRz.g_aSX(!1),this.g_aRz.g_KQ(r,g,s,d)}catch(e){return void console.error("[Construct 3] Audio: error starting playback: ",e)}finally{this.g_aSR(e)}this.g_abF()}g_aRR(e){const a=e.tag;for(const g of this.g_aSr(a))g.g_Iz()}g_aRS(){for(const e of this.g_aRy)e.g_Iz()}g_aRT(e){const a=e.tag,g=e.paused;for(const _ of this.g_aSr(a))g?_.g_aS_():_.g_KP();this.g_aST()}g_aRU(e){const a=e.tag,g=e.vol;for(const _ of this.g_aSr(a))_.g_aGw(g)}async g_aRV(g){const a=g.tag,_=g.vol,t=g.duration,n=g.stopOnEnd;await this.g_aSS(a);for(const e of this.g_aSr(a))e.g_aGx(_,t,n);this.g_aST()}g_aRW(e){this.g_aFK=e.vol;for(const a of this.g_aRy)a.g_aS$()}g_aRX(e){const a=e.tag,g=e.isMuted;for(const _ of this.g_aSr(a))_.g_aGv(g)}g_aRY(e){this.g_aFL=e.isSilent,this.g_aog.g_aGD(this.g_aFL);for(const a of this.g_aRy)a.g_aTa()}g_aRZ(e){const a=e.tag,g=e.isLooping;for(const _ of this.g_aSr(a))_.g_aGu(g)}g_aR_(e){const a=e.tag,g=e.rate;for(const _ of this.g_aSr(a))_.g_Kc(g)}g_aR$(e){const a=e.tag,g=e.pos;for(const _ of this.g_aSr(a))_.g_aGC(g)}async g_aSa(g){const a=g.originalUrl,_=g.url,t=g.type,n=g.isMusic;try{await this.g_aSM(a,_,t,"",n)}catch(e){console.error("[Construct 3] Audio: error preloading: ",e)}}async g_F_(g){const a=g.url,_=g.type,t=g.isMusic,n=await this.g_aSi("",a,_,t,!0);if(n){n.g_em();const e=this.g_aRx.indexOf(n);-1!==e&&this.g_aRx.splice(e,1)}}g_aSb(){for(const e of this.g_aRx)e.g_em();this.g_aRx.length=0}g_aSc(e){const a=e.isSuspended;!a&&this.g_aRs.resume&&this.g_aRs.resume();for(const g of this.g_aRy)g.g_aoV(a);a&&this.g_aRs.suspend&&this.g_aRs.suspend()}g_Ip(e){if(this.g_aho=e.timeScale,this.g_anB=e.gameTime,this.g_aRB=e.tickCount,0!==this.g_aFx)for(const e of this.g_aRy)e.g_aTb();const a=e.listenerPos;a&&this.g_aRs.listener.setPosition(a[0],a[1],a[2]);for(const g of e.instPans){const e=g.uid;for(const a of this.g_aRy)a.g_CJ()===e&&a.g_aTc(g.x,g.y,g.angle)}}async g_aSd(g){const a=g.type,_=g.tag,t=g.params;let n;if("filter"===a)n=new g_aTd(this,...t);else if("delay"===a)n=new g_aTe(this,...t);else if("convolution"===a){let a=null;try{a=await this.g_aSi(g.bufferOriginalUrl,g.bufferUrl,g.bufferType,!1)}catch(e){return void console.log("[Construct 3] Audio: error loading convolution: ",e)}n=new g_aTf(this,a.g_aTg(),...t),n.g_aTh(g.bufferOriginalUrl,g.bufferUrl,g.bufferType)}else if("flanger"===a)n=new g_aTi(this,...t);else if("phaser"===a)n=new g_aTj(this,...t);else if("gain"===a)n=new g_aTk(this,...t);else if("tremolo"===a)n=new g_aTl(this,...t);else if("ringmod"===a)n=new g_aTm(this,...t);else if("distortion"===a)n=new g_aTn(this,...t);else if("compressor"===a)n=new g_aTo(this,...t);else if("analyser"===a)n=new g_aTp(this,...t);else throw new Error("invalid effect type");this.g_aSn(_,n),this.g_aTq()}g_aSe(_){const a=_.tag,t=_.index,n=_.param,i=_.value,e=_.ramp,o=_.time,g=this.g_aRH.get(a);!g||0>t||t>=g.length||(g[t].g_aTr(n,i,e,o),this.g_aTq())}g_aSf(e){const a=e.tag.toLowerCase(),g=this.g_aRH.get(a);if(g&&g.length){for(const e of g)e.g_em();this.g_aRH.delete(a),this.g_aSp(a)}}g_aTs(e){this.g_aRI.add(e),this.g_aST()}g_aTt(e){this.g_aRI.delete(e)}g_aTq(){this.g_aRJ||(this.g_aRJ=!0,Promise.resolve().then(()=>this.g_aTu()))}g_aTu(){const e={};for(const[a,g]of this.g_aRH)e[a]=g.map(e=>e.g_aSU());this.g_aOJ("fxstate",{fxstate:e}),this.g_aRJ=!1}async g_aSg(e){const g=e.saveLoadMode;if(3!==g)for(const e of this.g_aRy)e.g_aSH()&&1===g||!e.g_aSH()&&2===g||e.g_Iz();for(const g of this.g_aRH.values())for(const e of g)e.g_em();this.g_aRH.clear(),this.g_aho=e.timeScale,this.g_anB=e.gameTime;const a=e.listenerPos;this.g_aRs.listener.setPosition(a[0],a[1],a[2]),this.g_aFL=e.isSilent,this.g_aog.g_aGD(this.g_aFL),this.g_aFK=e.masterVolume;const _=[];for(const a of Object.values(e.effects))_.push(Promise.all(a.map(e=>this.g_aSd(e))));await Promise.all(_),await Promise.all(e.playing.map(e=>this.g_aTv(e,g))),this.g_aST()}async g_aTv(_,a){if(3===a)return;const t=_.bufferOriginalUrl,n=_.bufferUrl,o=_.bufferType,e=_.isMusic,r=_.tag,g=_.isLooping,s=_.volume,i=_.playbackTime;if(e&&1===a)return;if(!e&&2===a)return;let d=null;try{d=await this.g_aSM(t,n,o,r,e)}catch(e){return void console.error("[Construct 3] Audio: error loading audio state: ",e)}d.g_aTw(_.pan),d.g_KQ(g,s,i,0),_.isPlaying||d.g_aS_(),d.g_aTx(_)}g_aRM(e,a){this.g_aRL&&this.g_aRL.disconnect(),this.g_aRK=a.toLowerCase(),this.g_aRL=this.g_aRs.createMediaStreamSource(e),this.g_aRL.connect(this.g_aSl(this.g_aRK))}g_aRO(){return this.g_aRN||(this.g_aRN=this.g_aRs.createMediaStreamDestination(),this.g_aRt.connect(this.g_aRN)),this.g_aRN.stream}};g_aPm.g_aQi(a)}"use strict",self.g_aSL=class{constructor(g,a,_,t,n){this.g_aTy=g,this.g_aTz=a,this.g_Bd=_,this.g_ko=t,this.g_aTA=n,this.g_aTB="",this.g_aTC="not-loaded",this.g_Bi=null}g_em(){this.g_aTC="not-loaded",this.g_aTy=null,this.g_Bi=null}static g_pB(g,a,_,t,n){const e="audio/webm; codecs=opus"===t&&!g.g_aSw();return n&&e&&g.g_aSx(),!n||g.g_aSv()||e?new g_aTD(g,a,_,t,n,e):new g_aTE(g,a,_,t,n)}g_adJ(e){return"html5"===this.g_aTB?new g_aTF(this.g_aTy,this,e):new g_aTG(this.g_aTy,this,e)}g_FU(){}g_AE(){return this.g_Bi||(this.g_Bi=this.g_FU()),this.g_Bi}g_Bj(){}g_aTH(){}g_aTI(){return"failed"===this.g_aTC}g_aSj(){return this.g_aTy.g_aSj()}g_aTJ(){return this.g_aTB}g_aTK(){return this.g_aTz}g_aSK(){return this.g_Bd}g_aTL(){return this.g_ko}g_aSH(){return this.g_aTA}g_afk(){}},"use strict",self.g_aTE=class extends g_aSL{constructor(g,a,_,t,n){super(g,a,_,t,n),this.g_aTB="html5",this.g_aTM=new Audio,this.g_aTM.crossOrigin="anonymous",this.g_aTM.autoplay=!1,this.g_aTM.preload="auto",this.g_aTN=null,this.g_aTO=null,this.g_aTP=!1,this.g_aTM.addEventListener("canplaythrough",()=>this.g_aTP=!0),this.g_aTQ=this.g_aSj().createGain(),this.g_aTR=null,this.g_aTM.addEventListener("canplay",()=>{this.g_aTN&&(this.g_aTC="loaded",this.g_aTN(),this.g_aTN=null,this.g_aTO=null),this.g_aTR||!this.g_aTM||(this.g_aTR=this.g_aSj().createMediaElementSource(this.g_aTM),this.g_aTR.connect(this.g_aTQ))}),this.onended=null,this.g_aTM.addEventListener("ended",()=>{this.onended&&this.onended()}),this.g_aTM.addEventListener("error",e=>this.g_aTS(e))}g_em(){this.g_aTy.g_aSE(this),this.g_aTQ.disconnect(),this.g_aTQ=null,this.g_aTR.disconnect(),this.g_aTR=null,this.g_aTM&&!this.g_aTM.paused&&this.g_aTM.pause(),this.onended=null,this.g_aTM=null,super.g_em()}g_FU(){return this.g_aTC="loading",new Promise((e,a)=>{this.g_aTN=e,this.g_aTO=a,this.g_aTM.src=this.g_Bd})}g_aTS(e){console.error(`[Construct 3] Audio '${this.g_Bd}' error: `,e),this.g_aTO&&(this.g_aTC="failed",this.g_aTO(e),this.g_aTN=null,this.g_aTO=null)}g_Bj(){const e=4<=this.g_aTM.readyState;return e&&(this.g_aTP=!0),e||this.g_aTP}g_aTH(){return this.g_Bj()}g_aTT(){return this.g_aTM}g_aTU(){return this.g_aTQ}g_afk(){return this.g_aTM.duration}},"use strict",self.g_aTD=class extends g_aSL{constructor(g,a,_,t,n,e){super(g,a,_,t,n),this.g_aTB="webaudio",this.g_aTV=null,this.g_aTW=null,this.g_aTX=!!e}g_em(){this.g_aTy.g_aSE(this),this.g_aTV=null,this.g_aTW=null,super.g_em()}async g_aTY(){if(this.g_aTV)return this.g_aTV;const e=this.g_aTy.g_aOT();if("cordova"===e.g_apG()&&e.g_fT(this.g_Bd))this.g_aTV=await e.g_As(this.g_Bd);else{const e=await fetch(this.g_Bd);if(!e.ok)throw new Error(`error fetching audio data: ${e.status} ${e.statusText}`);this.g_aTV=await e.arrayBuffer()}}async g_aTZ(){return this.g_aTW?this.g_aTW:void(this.g_aTW=await this.g_aTy.g_aSD(this.g_aTV,this.g_aTX),this.g_aTV=null)}async g_FU(){try{this.g_aTC="loading",await this.g_aTY(),await this.g_aTZ(),this.g_aTC="loaded"}catch(e){this.g_aTC="failed",console.error(`[Construct 3] Failed to load audio '${this.g_Bd}': `,e)}}g_Bj(){return!!(this.g_aTV||this.g_aTW)}g_aTH(){return!!this.g_aTW}g_aTg(){return this.g_aTW}g_afk(){return this.g_aTW?this.g_aTW.duration:0}},"use strict";{function _(g){return g*e}const e=180/Math.PI;self.g_aT_=class{constructor(e,a,g){this.g_aTy=e,this.g_vg=a,this.g_aT$=g,this.g_aUa=this.g_aSj().createGain(),this.g_aUa.connect(this.g_aSk()),this.g_aUb=null,this.g_aUc=!1,this.g_St=!0,this.g_aUd=!1,this.g_aUe=!1,this.g_ZC=!1,this.g_aUf=1,this.g_aUg=!1,this.g_Jw=1;const _=this.g_aTy.g_aSu();this.g_aUh=1===_&&!this.g_aSH()||2===_,this.g_aUi=-1,this.g_aUj=-1,this.g_aUk=!1}g_em(){this.g_aTy=null,this.g_vg=null,this.g_aUb&&(this.g_aUb.disconnect(),this.g_aUb=null),this.g_aUa.disconnect(),this.g_aUa=null}g_aSj(){return this.g_aTy.g_aSj()}g_aSk(){return this.g_aTy.g_aSl(this.g_aT$)}g_aSt(){return this.g_aTy.g_aSt()}g_aUl(){return this.g_aUh?this.g_aTy.g_EK():performance.now()/1e3}g_aTK(){return this.g_vg.g_aTK()}g_aSK(){return this.g_vg.g_aSK()}g_aTL(){return this.g_vg.g_aTL()}g_aSF(){return this.g_vg}g_aSH(){return this.g_vg.g_aSH()}g_aSO(e){this.g_aT$=e}g_aSI(){return this.g_aT$}g_aSJ(){}g_aSN(){}g_Kf(){return!this.g_St&&!this.g_aUd&&!this.g_aSJ()}g_VJ(){return!this.g_St&&!this.g_aSJ()}g_aUm(){}g_afk(e){let a=this.g_vg.g_afk();return e&&(a/=this.g_Jw||.001),a}g_KQ(){}g_Iz(){}g_aS_(){}g_aUn(){return this.g_aUd}g_KP(){}g_aGw(e){this.g_aUf=e,this.g_aUa.gain.cancelScheduledValues(0),this.g_aUj=-1,this.g_aUa.gain.value=this.g_aUo()}g_aGx(g,_,t){if(!this.g_aUp()){g*=this.g_aSt();const a=this.g_aUa.gain;a.cancelScheduledValues(0);const n=this.g_aTy.g_aSh(),e=n+_;a.setValueAtTime(this.g_aUo(),n),a.linearRampToValueAtTime(g,e),this.g_aUf=g,this.g_aUj=e,this.g_aUk=t}}g_aS$(){this.g_aGw(this.g_aUf)}g_Jj(e){-1!==this.g_aUj&&e>=this.g_aUj&&(this.g_aUj=-1,this.g_aUk&&this.g_Iz(),this.g_aTy.g_aSW("fade-ended",this.g_aT$))}g_aUo(){const e=this.g_aUf*this.g_aSt();return isFinite(e)?e:0}g_aGv(e){e=!!e,this.g_aUg===e||(this.g_aUg=e,this.g_aTa())}g_aUp(){return this.g_aUg}g_aGm(){return this.g_aTy.g_aGm()}g_aTa(){}g_aGu(){}g_Xr(){return this.g_ZC}g_Kc(e){this.g_Jw===e||(this.g_Jw=e,this.g_aTb())}g_aTb(){}g_Kd(){return this.g_Jw}g_aGC(){}g_aoV(){}g_aSX(e){e=!!e,this.g_aUc===e||(this.g_aUc=e,this.g_aUc?(!this.g_aUb&&(this.g_aUb=this.g_aSj().createPanner(),this.g_aUb.panningModel=this.g_aTy.g_aSy(),this.g_aUb.distanceModel=this.g_aTy.g_aSz(),this.g_aUb.refDistance=this.g_aTy.g_aSA(),this.g_aUb.maxDistance=this.g_aTy.g_aSB(),this.g_aUb.rolloffFactor=this.g_aTy.g_aSC()),this.g_aUa.disconnect(),this.g_aUa.connect(this.g_aUb),this.g_aUb.connect(this.g_aSk())):(this.g_aUb.disconnect(),this.g_aUa.disconnect(),this.g_aUa.connect(this.g_aSk())))}g_aSY(a,t,n,i,e,o){this.g_aUc&&(this.g_aTc(a,t,n),this.g_aUb.coneInnerAngle=_(i),this.g_aUb.coneOuterAngle=_(e),this.g_aUb.coneOuterGain=o)}g_aTc(e,a,g){this.g_aUc&&(this.g_aUb.setPosition(e,a,0),this.g_aUb.setOrientation(Math.cos(g),Math.sin(g),0))}g_aSZ(e){this.g_aUi=e}g_CJ(){return this.g_aUi}g_aUq(){}g_aSs(e){const a=this.g_aUb||this.g_aUa;a.disconnect(),a.connect(e)}g_aSU(){return{tag:this.g_aT$,duration:this.g_afk(),volume:this.g_aUf,isPlaying:this.g_Kf(),playbackTime:this.g_aUm(),playbackRate:this.g_Kd(),uid:this.g_aUi,bufferOriginalUrl:this.g_aTK(),bufferUrl:"",bufferType:this.g_aTL(),isMusic:this.g_aSH(),isLooping:this.g_Xr(),isMuted:this.g_aUp(),resumePosition:this.g_aUq(),pan:this.g_aUr()}}g_aTx(e){this.g_Kc(e.playbackRate),this.g_aGv(e.isMuted)}g_aUr(){if(!this.g_aUb)return null;const e=this.g_aUb;return{pos:[e.positionX.value,e.positionY.value,e.positionZ.value],orient:[e.orientationX.value,e.orientationY.value,e.orientationZ.value],cia:e.coneInnerAngle,coa:e.coneOuterAngle,cog:e.coneOuterGain,uid:this.g_aUi}}g_aTw(e){if(!e)return void this.g_aSX(!1);this.g_aSX(!0);const a=this.g_aUb;a.setPosition(...a.pos),a.setOrientation(...a.orient),a.coneInnerAngle=a.cia,a.coneOuterAngle=a.coa,a.coneOuterGain=a.cog,this.g_aUi=a.uid}}}"use strict",self.g_aTF=class extends g_aT_{constructor(e,a,g){super(e,a,g),this.g_vg.g_aTU().connect(this.g_aUa),this.g_vg.onended=()=>this.g_aUs()}g_em(){this.g_Iz(),this.g_vg.g_aTU().disconnect(),super.g_em()}g_aTT(){return this.g_vg.g_aTT()}g_aUs(){this.g_St=!0,this.g_aUi=-1,this.g_aTy.g_aSW("ended",this.g_aT$)}g_aSJ(){return this.g_aTT().ended}g_aSN(){return!!this.g_St||this.g_aSJ()}g_aUm(e){let a=this.g_aTT().currentTime;return e&&(a*=this.g_Jw),this.g_ZC||(a=Math.min(a,this.g_afk())),a}g_KQ(e,a,g){const _=this.g_aTT();if(1!==_.playbackRate&&(_.playbackRate=1),_.loop!==e&&(_.loop=e),this.g_aGw(a),_.muted&&(_.muted=!1),_.currentTime!==g)try{_.currentTime=g}catch(e){console.warn(`[Construct 3] Exception seeking audio '${this.g_vg.g_aSK()}' to position '${g}': `,e)}this.g_aTy.g_aQl(_),this.g_St=!1,this.g_aUd=!1,this.g_ZC=e,this.g_Jw=1}g_Iz(){const e=this.g_aTT();e.paused||e.pause(),this.g_aTy.g_aQm(e),this.g_St=!0,this.g_aUd=!1,this.g_aUi=-1}g_aS_(){if(!(this.g_aUd||this.g_St||this.g_aSJ())){const e=this.g_aTT();e.paused||e.pause(),this.g_aTy.g_aQm(e),this.g_aUd=!0}}g_KP(){!this.g_aUd||this.g_St||this.g_aSJ()||(this.g_aTy.g_aQl(this.g_aTT()),this.g_aUd=!1)}g_aTa(){this.g_aTT().muted=this.g_aUg||this.g_aGm()}g_aGu(e){e=!!e,this.g_ZC===e||(this.g_ZC=e,this.g_aTT().loop=e)}g_aTb(){let e=this.g_Jw;this.g_aUh&&(e*=this.g_aTy.g_Jh());try{this.g_aTT().playbackRate=e}catch(a){console.warn(`[Construct 3] Unable to set playback rate '${e}':`,a)}}g_aGC(e){if(!(this.g_St||this.g_aSJ()))try{this.g_aTT().currentTime=e}catch(a){console.warn(`[Construct 3] Error seeking audio to '${e}': `,a)}}g_aUq(){return this.g_aUm()}g_aoV(e){e?this.g_Kf()?(this.g_aTT().pause(),this.g_aUe=!0):this.g_aUe=!1:this.g_aUe&&(this.g_aTy.g_aQl(this.g_aTT()),this.g_aUe=!1)}},"use strict",self.g_aTG=class extends g_aT_{constructor(e,a,g){super(e,a,g),this.g_aUt=null,this.g_aUu=e=>this.g_aUs(e),this.g_aUv=!0,this.g_aUw=null,this.g_anw=0,this.g_aUx=0,this.g_aUy=1}g_em(){this.g_Iz(),this.g_aUz(),this.g_aUu=null,super.g_em()}g_aUz(){this.g_aUt&&this.g_aUt.disconnect(),this.g_aUt=null,this.g_aUw=null}g_aUs(e){this.g_aUd||this.g_aUe||e.target!==this.g_aUw||(this.g_aUv=!0,this.g_St=!0,this.g_aUi=-1,this.g_aUz(),this.g_aTy.g_aSW("ended",this.g_aT$))}g_aSJ(){return!(!this.g_St&&this.g_aUt&&this.g_aUt.loop)&&!this.g_aUd&&this.g_aUv}g_aSN(){return!this.g_aUt||this.g_St||this.g_aSJ()}g_aUm(e){let a=0;return a=this.g_aUd?this.g_aUx:this.g_aUl()-this.g_anw,e&&(a*=this.g_Jw),this.g_ZC||(a=Math.min(a,this.g_afk())),a}g_KQ(e,a,g,_){this.g_aUy=1,this.g_aGw(a),this.g_aUz(),this.g_aUt=this.g_aSj().createBufferSource(),this.g_aUt.buffer=this.g_vg.g_aTg(),this.g_aUt.connect(this.g_aUa),this.g_aUw=this.g_aUt,this.g_aUt.onended=this.g_aUu,this.g_aUt.loop=e,this.g_aUt.start(_,g),this.g_aUv=!1,this.g_St=!1,this.g_aUd=!1,this.g_ZC=e,this.g_Jw=1,this.g_anw=this.g_aUl()-g}g_Iz(){this.g_aUt&&this.g_aUt.stop(0),this.g_St=!0,this.g_aUd=!1,this.g_aUi=-1}g_aS_(){this.g_aUd||this.g_St||this.g_aSJ()||(this.g_aUx=this.g_aUm(!0),this.g_ZC&&(this.g_aUx%=this.g_afk()),this.g_aUd=!0,this.g_aUt.stop(0))}g_KP(){!this.g_aUd||this.g_St||this.g_aSJ()||(this.g_aUz(),this.g_aUt=this.g_aSj().createBufferSource(),this.g_aUt.buffer=this.g_vg.g_aTg(),this.g_aUt.connect(this.g_aUa),this.g_aUw=this.g_aUt,this.g_aUt.onended=this.g_aUu,this.g_aUt.loop=this.g_ZC,this.g_aS$(),this.g_aTb(),this.g_anw=this.g_aUl()-this.g_aUx/(this.g_Jw||.001),this.g_aUt.start(0,this.g_aUx),this.g_aUd=!1)}g_aUo(){return super.g_aUo()*this.g_aUy}g_aTa(){this.g_aUy=this.g_aUg||this.g_aGm()?0:1,this.g_aS$()}g_aGu(e){e=!!e,this.g_ZC===e||(this.g_ZC=e,this.g_aUt&&(this.g_aUt.loop=e))}g_aTb(){let e=this.g_Jw;this.g_aUh&&(e*=this.g_aTy.g_Jh()),this.g_aUt&&(this.g_aUt.playbackRate.value=e)}g_aGC(e){this.g_St||this.g_aSJ()||(this.g_aUd?this.g_aUx=e:(this.g_aS_(),this.g_aUx=e,this.g_KP()))}g_aUq(){return this.g_aUx}g_aoV(e){e?this.g_Kf()?(this.g_aUe=!0,this.g_aUx=this.g_aUm(!0),this.g_ZC&&(this.g_aUx%=this.g_afk()),this.g_aUt.stop(0)):this.g_aUe=!1:this.g_aUe&&(this.g_aUz(),this.g_aUt=this.g_aSj().createBufferSource(),this.g_aUt.buffer=this.g_vg.g_aTg(),this.g_aUt.connect(this.g_aUa),this.g_aUw=this.g_aUt,this.g_aUt.onended=this.g_aUu,this.g_aUt.loop=this.g_ZC,this.g_aS$(),this.g_aTb(),this.g_anw=this.g_aUl()-this.g_aUx/(this.g_Jw||.001),this.g_aUt.start(0,this.g_aUx),this.g_aUe=!1)}g_aTx(e){super.g_aTx(e),this.g_aUx=e.resumePosition}},"use strict";{function g(e){return Math.pow(10,e/20)}function _(a){return Math.max(Math.min(g(a),1),0)}function t(e){return 20*(Math.log(e)/2.302585092994046)}function n(e){return t(Math.max(Math.min(e,1),0))}function i(e,a){return 1-Math.exp(-a*e)}class a{constructor(e){this.g_aTy=e,this.g_aRs=e.g_aSj(),this.g_BS=-1,this.g_aT$="",this.g_ko="",this.g_aUA=null}g_em(){this.g_aRs=null}g_aiX(e){this.g_BS=e}g_Dl(){return this.g_BS}g_aSo(e){this.g_aT$=e}g_aSI(){return this.g_aT$}g_aUB(){return this.g_aRs.createGain()}g_aSm(){}g_aSq(){}g_aUC(g,a,_,t){if(g.cancelScheduledValues(0),0===t)return void(g.value=a);const n=this.g_aRs.currentTime;t+=n,0===_?g.setValueAtTime(a,t):1===_?(g.setValueAtTime(g.value,n),g.linearRampToValueAtTime(a,t)):2===_?(g.setValueAtTime(g.value,n),g.exponentialRampToValueAtTime(a,t)):void 0}g_aSU(){return{type:this.g_ko,tag:this.g_aT$,params:this.g_aUA}}}self.g_aTd=class extends a{constructor(_,a,t,n,i,e,o){super(_),this.g_ko="filter",this.g_aUA=[a,t,n,i,e,o],this.g_aUD=this.g_aUB(),this.g_aUE=this.g_aUB(),this.g_aUE.gain.value=o,this.g_aUF=this.g_aUB(),this.g_aUF.gain.value=1-o,this.g_aUG=this.g_aRs.createBiquadFilter(),this.g_aUG.type=a,this.g_aUG.frequency.value=t,this.g_aUG.detune.value=n,this.g_aUG.Q.value=i,this.g_aUG.gain.vlaue=e,this.g_aUD.connect(this.g_aUG),this.g_aUD.connect(this.g_aUF),this.g_aUG.connect(this.g_aUE)}g_em(){this.g_aUD.disconnect(),this.g_aUG.disconnect(),this.g_aUE.disconnect(),this.g_aUF.disconnect(),super.g_em()}g_aSq(e){this.g_aUE.disconnect(),this.g_aUE.connect(e),this.g_aUF.disconnect(),this.g_aUF.connect(e)}g_aSm(){return this.g_aUD}g_aTr(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aUA[5]=a,this.g_aUC(this.g_aUE.gain,a,g,_),this.g_aUC(this.g_aUF.gain,1-a,g,_)):1===e?(this.g_aUA[1]=a,this.g_aUC(this.g_aUG.frequency,a,g,_)):2===e?(this.g_aUA[2]=a,this.g_aUC(this.g_aUG.detune,a,g,_)):3===e?(this.g_aUA[3]=a,this.g_aUC(this.g_aUG.Q,a,g,_)):4===e?(this.g_aUA[4]=a,this.g_aUC(this.g_aUG.gain,a,g,_)):void 0}},self.g_aTe=class extends a{constructor(e,a,g,_){super(e),this.g_ko="delay",this.g_aUA=[a,g,_],this.g_aUD=this.g_aUB(),this.g_aUE=this.g_aUB(),this.g_aUE.gain.value=_,this.g_aUF=this.g_aUB(),this.g_aUF.gain.value=1-_,this.g_aUH=this.g_aUB(),this.g_aUI=this.g_aRs.createDelay(a),this.g_aUI.delayTime.value=a,this.g_aUJ=this.g_aUB(),this.g_aUJ.gain.value=g,this.g_aUD.connect(this.g_aUH),this.g_aUD.connect(this.g_aUF),this.g_aUH.connect(this.g_aUE),this.g_aUH.connect(this.g_aUI),this.g_aUI.connect(this.g_aUJ),this.g_aUJ.connect(this.g_aUH)}g_em(){this.g_aUD.disconnect(),this.g_aUE.disconnect(),this.g_aUF.disconnect(),this.g_aUH.disconnect(),this.g_aUI.disconnect(),this.g_aUJ.disconnect(),super.g_em()}g_aSq(e){this.g_aUE.disconnect(),this.g_aUE.connect(e),this.g_aUF.disconnect(),this.g_aUF.connect(e)}g_aSm(){return this.g_aUD}g_aTr(g,a,t,n){0===g?(a=Math.max(Math.min(a/100,1),0),this.g_aUA[2]=a,this.g_aUC(this.g_aUE.gain,a,t,n),this.g_aUC(this.g_aUF.gain,1-a,t,n)):4===g?(this.g_aUA[1]=_(a),this.g_aUC(this.g_aUJ.gain,_(a),t,n)):5===g?(this.g_aUA[0]=a,this.g_aUC(this.g_aUI.delayTime,a,t,n)):void 0}},self.g_aTf=class extends a{constructor(e,a,g,_){super(e),this.g_ko="convolution",this.g_aUA=[g,_],this.g_aUK="",this.g_aUL="",this.g_aUM="",this.g_aUD=this.g_aUB(),this.g_aUE=this.g_aUB(),this.g_aUE.gain.value=_,this.g_aUF=this.g_aUB(),this.g_aUF.gain.value=1-_,this.g_aUN=this.g_aRs.createConvolver(),this.g_aUN.normalize=g,this.g_aUN.buffer=a,this.g_aUD.connect(this.g_aUN),this.g_aUD.connect(this.g_aUF),this.g_aUN.connect(this.g_aUE)}g_em(){this.g_aUD.disconnect(),this.g_aUN.disconnect(),this.g_aUE.disconnect(),this.g_aUF.disconnect(),super.g_em()}g_aSq(e){this.g_aUE.disconnect(),this.g_aUE.connect(e),this.g_aUF.disconnect(),this.g_aUF.connect(e)}g_aSm(){return this.g_aUD}g_aTr(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aUA[1]=a,this.g_aUC(this.g_aUE.gain,a,g,_),this.g_aUC(this.g_aUF.gain,1-a,g,_)):void 0}g_aTh(e,a,g){this.g_aUK=e,this.g_aUL=a,this.g_aUM=g}g_aSU(){const e=super.g_aSU();return e.bufferOriginalUrl=this.g_aUK,e.bufferUrl="",e.bufferType=this.g_aUM,e}},self.g_aTi=class extends a{constructor(g,a,_,t,n,e){super(g),this.g_ko="flanger",this.g_aUA=[a,_,t,n,e],this.g_aUD=this.g_aUB(),this.g_aUF=this.g_aUB(),this.g_aUF.gain.value=1-e/2,this.g_aUE=this.g_aUB(),this.g_aUE.gain.value=e/2,this.g_aUO=this.g_aUB(),this.g_aUO.gain.value=n,this.g_aUI=this.g_aRs.createDelay(a+_),this.g_aUI.delayTime.value=a,this.g_aUP=this.g_aRs.createOscillator(),this.g_aUP.frequency.value=t,this.g_aUQ=this.g_aUB(),this.g_aUQ.gain.value=_,this.g_aUD.connect(this.g_aUI),this.g_aUD.connect(this.g_aUF),this.g_aUI.connect(this.g_aUE),this.g_aUI.connect(this.g_aUO),this.g_aUO.connect(this.g_aUI),this.g_aUP.connect(this.g_aUQ),this.g_aUQ.connect(this.g_aUI.delayTime),this.g_aUP.start(0)}g_em(){this.g_aUP.stop(0),this.g_aUD.disconnect(),this.g_aUI.disconnect(),this.g_aUP.disconnect(),this.g_aUQ.disconnect(),this.g_aUF.disconnect(),this.g_aUE.disconnect(),this.g_aUO.disconnect(),super.g_em()}g_aSq(e){this.g_aUE.disconnect(),this.g_aUE.connect(e),this.g_aUF.disconnect(),this.g_aUF.connect(e)}g_aSm(){return this.g_aUD}g_aTr(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aUA[4]=a,this.g_aUC(this.g_aUE.gain,a/2,g,_),this.g_aUC(this.g_aUF.gain,1-a/2,g,_)):6===e?(this.g_aUA[1]=a/1e3,this.g_aUC(this.g_aUQ.gain,a/1e3,g,_)):7===e?(this.g_aUA[2]=a,this.g_aUC(this.g_aUP.frequency,a,g,_)):8===e?(this.g_aUA[3]=a/100,this.g_aUC(this.g_aUO.gain,a/100,g,_)):void 0}},self.g_aTj=class extends a{constructor(_,a,t,n,i,e,o){super(_),this.g_ko="phaser",this.g_aUA=[a,t,n,i,e,o],this.g_aUD=this.g_aUB(),this.g_aUF=this.g_aUB(),this.g_aUF.gain.value=1-o/2,this.g_aUE=this.g_aUB(),this.g_aUE.gain.value=o/2,this.g_aUG=this.g_aRs.createBiquadFilter(),this.g_aUG.type="allpass",this.g_aUG.frequency.value=a,this.g_aUG.detune.value=t,this.g_aUG.Q.value=n,this.g_aUP=this.g_aRs.createOscillator(),this.g_aUP.frequency.value=e,this.g_aUQ=this.g_aUB(),this.g_aUQ.gain.value=i,this.g_aUD.connect(this.g_aUG),this.g_aUD.connect(this.g_aUF),this.g_aUG.connect(this.g_aUE),this.g_aUP.connect(this.g_aUQ),this.g_aUQ.connect(this.g_aUG.frequency),this.g_aUP.start(0)}g_em(){this.g_aUP.stop(0),this.g_aUD.disconnect(),this.g_aUG.disconnect(),this.g_aUP.disconnect(),this.g_aUQ.disconnect(),this.g_aUF.disconnect(),this.g_aUE.disconnect(),super.g_em()}g_aSq(e){this.g_aUE.disconnect(),this.g_aUE.connect(e),this.g_aUF.disconnect(),this.g_aUF.connect(e)}g_aSm(){return this.g_aUD}g_aTr(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aUA[5]=a,this.g_aUC(this.g_aUE.gain,a/2,g,_),this.g_aUC(this.g_aUF.gain,1-a/2,g,_)):1===e?(this.g_aUA[0]=a,this.g_aUC(this.g_aUG.frequency,a,g,_)):2===e?(this.g_aUA[1]=a,this.g_aUC(this.g_aUG.detune,a,g,_)):3===e?(this.g_aUA[2]=a,this.g_aUC(this.g_aUG.Q,a,g,_)):6===e?(this.g_aUA[3]=a,this.g_aUC(this.g_aUQ.gain,a,g,_)):7===e?(this.g_aUA[4]=a,this.g_aUC(this.g_aUP.frequency,a,g,_)):void 0}},self.g_aTk=class extends a{constructor(e,a){super(e),this.g_ko="gain",this.g_aUA=[a],this.g_aUR=this.g_aUB(),this.g_aUR.gain.value=a}g_em(){this.g_aUR.disconnect(),super.g_em()}g_aSq(e){this.g_aUR.disconnect(),this.g_aUR.connect(e)}g_aSm(){return this.g_aUR}g_aTr(g,a,t,n){4===g?(this.g_aUA[0]=_(a),this.g_aUC(this.g_aUR.gain,_(a),t,n)):void 0}},self.g_aTl=class extends a{constructor(e,a,g){super(e),this.g_ko="tremolo",this.g_aUA=[a,g],this.g_aUR=this.g_aUB(),this.g_aUR.gain.value=1-g/2,this.g_aUP=this.g_aRs.createOscillator(),this.g_aUP.frequency.value=a,this.g_aUQ=this.g_aUB(),this.g_aUQ.gain.value=g/2,this.g_aUP.connect(this.g_aUQ),this.g_aUQ.connect(this.g_aUR.gain),this.g_aUP.start(0)}g_em(){this.g_aUP.stop(0),this.g_aUP.disconnect(),this.g_aUQ.disconnect(),this.g_aUR.disconnect(),super.g_em()}g_aSq(e){this.g_aUR.disconnect(),this.g_aUR.connect(e)}g_aSm(){return this.g_aUR}g_aTr(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aUA[1]=a,this.g_aUC(this.g_aUR.gain.value,1-a/2,g,_),this.g_aUC(this.g_aUQ.gain.value,a/2,g,_)):7===e?(this.g_aUA[0]=a,this.g_aUC(this.g_aUP.frequency,a,g,_)):void 0}},self.g_aTm=class extends a{constructor(e,a,g){super(e),this.g_ko="ringmod",this.g_aUA=[a,g],this.g_aUD=this.g_aUB(),this.g_aUE=this.g_aUB(),this.g_aUE.gain.value=g,this.g_aUF=this.g_aUB(),this.g_aUF.gain.value=1-g,this.g_aUS=this.g_aUB(),this.g_aUS.gain.value=0,this.g_aUP=this.g_aRs.createOscillator(),this.g_aUP.frequency.value=a,this.g_aUP.connect(this.g_aUS.gain),this.g_aUP.start(0),this.g_aUD.connect(this.g_aUS),this.g_aUD.connect(this.g_aUF),this.g_aUS.connect(this.g_aUE)}g_em(){this.g_aUP.stop(0),this.g_aUP.disconnect(),this.g_aUS.disconnect(),this.g_aUD.disconnect(),this.g_aUE.disconnect(),this.g_aUF.disconnect(),super.g_em()}g_aSq(e){this.g_aUE.disconnect(),this.g_aUE.connect(e),this.g_aUF.disconnect(),this.g_aUF.connect(e)}g_aSm(){return this.g_aUD}g_aTr(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aUA[1]=a,this.g_aUC(this.g_aUE.gain,a,g,_),this.g_aUC(this.g_aUF.gain,1-a,g,_)):7===e?(this.g_aUA[0]=a,this.g_aUC(this.g_aUP.frequency,a,g,_)):void 0}},self.g_aTn=class extends a{constructor(g,a,_,t,n,e){super(g),this.g_ko="distortion",this.g_aUA=[a,_,t,n,e],this.g_aUD=this.g_aUB(),this.g_aUT=this.g_aUB(),this.g_aUU=this.g_aUB(),this.g_aUV(t,n),this.g_aUE=this.g_aUB(),this.g_aUE.gain.value=e,this.g_aUF=this.g_aUB(),this.g_aUF.gain.value=1-e,this.g_aUW=this.g_aRs.createWaveShaper(),this.g_aUX=new Float32Array(65536),this.g_aUY(a,_),this.g_aUW.curve=this.g_aUX,this.g_aUD.connect(this.g_aUT),this.g_aUD.connect(this.g_aUF),this.g_aUT.connect(this.g_aUW),this.g_aUW.connect(this.g_aUU),this.g_aUU.connect(this.g_aUE)}g_em(){this.g_aUD.disconnect(),this.g_aUT.disconnect(),this.g_aUW.disconnect(),this.g_aUU.disconnect(),this.g_aUE.disconnect(),this.g_aUF.disconnect(),super.g_em()}g_aUV(e,g){.01>e&&(e=.01),this.g_aUT.gain.value=e,this.g_aUU.gain.value=Math.pow(1/e,.6)*g}g_aUY(e,a){for(let g,_=0;32768>_;++_)g=_/32768,g=this.g_aUZ(g,e,a),this.g_aUX[32768+_]=g,this.g_aUX[32768-_-1]=-g}g_aUZ(e,a,_){const t=1.05*_*a-a,n=0>e?-1:1,o=0>e?-e:e;let g=o<a?o:a+t*i(o-a,1/t);return g*=n,g}g_aSq(e){this.g_aUE.disconnect(),this.g_aUE.connect(e),this.g_aUF.disconnect(),this.g_aUF.connect(e)}g_aSm(){return this.g_aUD}g_aTr(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aUA[4]=a,this.g_aUC(this.g_aUE.gain,a,g,_),this.g_aUC(this.g_aUF.gain,1-a,g,_)):void 0}},self.g_aTo=class extends a{constructor(g,a,_,t,n,e){super(g),this.g_ko="compressor",this.g_aUA=[a,_,t,n,e],this.g_aUR=this.g_aRs.createDynamicsCompressor(),this.g_aUR.threshold.value=a,this.g_aUR.knee.value=_,this.g_aUR.ratio.value=t,this.g_aUR.attack.value=n,this.g_aUR.release.value=e}g_em(){this.g_aUR.disconnect(),super.g_em()}g_aSq(e){this.g_aUR.disconnect(),this.g_aUR.connect(e)}g_aSm(){return this.g_aUR}g_aTr(){}},self.g_aTp=class extends a{constructor(e,a,g){super(e),this.g_ko="analyser",this.g_aUA=[a,g],this.g_aUR=this.g_aRs.createAnalyser(),this.g_aUR.fftSize=a,this.g_aUR.smoothingTimeConstant=g,this.g_aU_=new Float32Array(this.g_aUR.frequencyBinCount),this.g_aU$=new Uint8Array(a),this.g_aVa=0,this.g_aVb=0,this.g_aTy.g_aTs(this)}g_em(){this.g_aTy.g_aTt(this),this.g_aUR.disconnect(),super.g_em()}g_Jj(){this.g_aUR.getFloatFrequencyData(this.g_aU_),this.g_aUR.getByteTimeDomainData(this.g_aU$);const e=this.g_aUR.fftSize;this.g_aVa=0;let a=0;for(let g,_=0;_<e;++_)g=(this.g_aU$[_]-128)/128,0>g&&(g=-g),this.g_aVa<g&&(this.g_aVa=g),a+=g*g;this.g_aVa=n(this.g_aVa),this.g_aVb=n(Math.sqrt(a/e))}g_aSq(e){this.g_aUR.disconnect(),this.g_aUR.connect(e)}g_aSm(){return this.g_aUR}g_aTr(){}g_aSV(){return{tag:this.g_aSI(),index:this.g_Dl(),peak:this.g_aVa,rms:this.g_aVb,binCount:this.g_aUR.frequencyBinCount,freqBins:this.g_aU_}}}}{const e=class extends g_aOF{constructor(e){super(e,"platform-info"),this.g_aOQ("get-initial-state",()=>this.g_aRe()),window.addEventListener("resize",()=>this.g_aVc())}g_aRe(){return{screenWidth:screen.width,screenHeight:screen.height,windowOuterWidth:window.outerWidth,windowOuterHeight:window.outerHeight}}g_aVc(){this.g_aOJ("window-resize",{windowOuterWidth:window.outerWidth,windowOuterHeight:window.outerHeight})}};g_aPm.g_aQi(e)}{let e=!1;const a=class extends g_aOF{constructor(e){super(e,"advert");const a=e=>[e,a=>this.g_aVd(e,a)];this.g_aOS([a("CreateBannerAdvert"),a("ShowBannerAdvert"),a("HideBannerAdvert"),a("CreateInterstitialAdvert"),a("ShowInterstitialAdvert"),a("CreateVideoAdvert"),a("ShowVideoAdvert"),a("Configure"),a("RequestConsent"),a("SetUserPersonalisation")])}g_aVe(){return window.cordova&&window.cordova.plugins.ConstructAd}async g_aVd(g,_){const t=this.g_aVe();if(!t)throw e||(e=!0,console.warn("The Mobile Advert plugin is not loaded. Please note that it only works in Android or iOS exports")),new Error("advert plugin not loaded");return new Promise((n,a)=>{t[g](..._,(e,g)=>{e?a(e):n(g)})})}};g_aPm.g_aQi(a)}