Skip to content
Permalink
c93e29d26a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
1 lines (1 sloc) 58.2 KB
"use strict";window.g_awC=class{constructor(e,a){this.g_awD=e,this.g_awE=a,this.g_awF=!1,this.g_agm=()=>this.g_Jv()}g_awG(){}g_awH(e,a,g,_){this.g_awD.g_awI(this.g_awE,e,a,!!g,_)}g_awJ(e,a,g,_){return this.g_awD.g_awK(this.g_awE,e,a,!!g,_)}g_awL(e,a,g){this.g_awD.g_awM()?this.g_awH(e,a,g):this.g_awD.g_awN()._OnMessageFromDOM({type:"event",component:this.g_awE,handler:e,dispatchRuntimeEvent:g,data:a,responseId:null})}g_awO(e,a){this.g_awD.g_awP(this.g_awE,e,a)}g_awQ(e){for(const[a,g]of e)this.g_awO(a,g)}g_awR(){return this.g_awD}g_awS(){return this.g_awE}g_Yp(){this.g_awF||(this.g_awD.g_awT(this.g_agm),this.g_awF=!0)}g_Yc(){this.g_awF&&(this.g_awD.g_awU(this.g_agm),this.g_awF=!1)}g_Jv(){}},"use strict",window.g_awV=class extends g_awC{constructor(e,a){super(e,a),this.g_awW=new Map,this.g_awX=!0,this.g_awO("create",e=>this.g_awY(e)),this.g_awO("destroy",e=>this.g_awZ(e)),this.g_awO("set-visible",e=>this.g_aw_(e)),this.g_awO("update-position",e=>this.g_aw$(e)),this.g_awO("update-state",e=>this.g_amW(e)),this.g_awO("focus",e=>this.g_axa(e)),this.g_awO("set-css-style",e=>this.g_axb(e))}g_axc(e){this.g_awX=!!e}g_axd(e,g){this.g_awO(e,e=>{const a=e.elementId,_=this.g_awW.get(a);return g(_,e)})}g_awY(e){const a=e.elementId,g=this.g_YP(a,e);this.g_awW.set(a,g),this.g_awX&&document.body.appendChild(g)}g_YP(){throw new Error("required override")}g_axe(){}g_awZ(e){const a=e.elementId,g=this.g_awW.get(a);this.g_axe(g),this.g_awX&&g.parentElement.removeChild(g),this.g_awW.delete(a)}g_axf(e,a,g){g||(g={}),g.elementId=a,this.g_awH(e,g)}g_axg(e,a,g){g||(g={}),g.elementId=a,this.g_awL(e,g)}g_aw_(e){if(this.g_awX){const a=this.g_awW.get(e.elementId);a.style.display=e.isVisible?"":"none"}}g_aw$(e){if(this.g_awX){const a=this.g_awW.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_amW(e){const a=this.g_awW.get(e.elementId);this.g_axh(a,e)}g_axh(){throw new Error("required override")}g_axa(e){const a=this.g_awW.get(e.elementId);e.focus?a.focus():a.blur()}g_axb(e){const a=this.g_awW.get(e.elementId);a.style[e.prop]=e.val}g_axi(e){return this.g_awW.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 r(e),g=new TextDecoder("utf-8");return g.decode(a)}function r(e){return new Promise((g,_)=>{const a=new FileReader;a.onload=e=>g(e.target.result),a.onerror=e=>_(e),a.readAsArrayBuffer(e)})}function s(){if(!e)return n;const g=document.createElement("canvas"),a=g.getContext("webgl2",{alpha:!0,depth:!1,antialias:!1,failIfMajorPerformanceCaveat:!0});if(!a)return n;const _=a.getExtension("WEBGL_debug_renderer_info");if(!_)return n;const t=a.getParameter(_.UNMASKED_RENDERER_WEBGL);for(const e of o)if(t.toLowerCase().includes(e.toLowerCase()))return console.warn(`[Construct 3] This device appears to support WebGL 2, but it is disabled due to GPU driver bugs that make it unusable. (Renderer '${t}' matches blacklist entry '${e}'.) See crbug.com/934823`),1;return n}const a=/(iphone|ipod|ipad)/i.test(navigator.userAgent),e=/android/i.test(navigator.userAgent);let d=new Audio;const g={"audio/webm; codecs=opus":!!d.canPlayType("audio/webm; codecs=opus"),"audio/ogg; codecs=opus":!!d.canPlayType("audio/ogg; codecs=opus"),"audio/webm; codecs=vorbis":!!d.canPlayType("audio/webm; codecs=vorbis"),"audio/ogg; codecs=vorbis":!!d.canPlayType("audio/ogg; codecs=vorbis"),"audio/mp4":!!d.canPlayType("audio/mp4"),"audio/mpeg":!!d.canPlayType("audio/mpeg")};d=null;const u=[];let i=0;const C=[],y=new Map,l=new Map;let m=0;const n=2,o=["Mali"];window.g_axj=class e{constructor(e){this.g_axk=e.g_axl,this.g_axm=null,this.g_afo="",this.g_axn=e.g_axo,this.g_axp={},this.g_axq=null,this.g_axr=null,this.g_axs=[],this.g_axt=null,this.g_ado=null,this.g_ag$=null,this.g_adX=-1,this.g_axu=()=>this.g_axv(),this.g_axw=[],this.g_aft=e.g_axx,"cordova"===this.g_aft&&this.g_axk&&(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_axk=!1),this.g_axy=!1,this.g_axz=null,("html5"===this.g_aft||"playable-ad"===this.g_aft)&&"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_awP("runtime","cordova-fetch-local-file",e=>this.g_axA(e)),this.g_awP("runtime","create-job-worker",e=>this.g_axB(e)),"cordova"===this.g_aft?document.addEventListener("deviceready",()=>this.g_Xi(e)):this.g_Xi(e)}g_eN(){this.g_axC(),this.g_axm&&(this.g_axm.onmessage=null,this.g_axm=null),this.g_axq&&(this.g_axq.terminate(),this.g_axq=null),this.g_axr&&(this.g_axr.g_eN(),this.g_axr=null),this.g_ado&&(this.g_ado.parentElement.removeChild(this.g_ado),this.g_ado=null)}g_axD(){return this.g_ado}g_fE(){return this.g_afo}g_awM(){return this.g_axk}g_AD(){return this.g_aft}g_ahr(){return"cordova"===this.g_aft&&a}g_axE(){if(!this.g_ahr())return!1;const e=window.devicePixelRatio,a=window.screen.width*e,g=window.screen.height*e;return 1125==a&&2436==g}async g_Xi(e){if("playable-ad"===this.g_aft){this.g_axz=self.c3_base64files,await this.g_axF();for(let a=0,g=e.g_axG.length;a<g;++a){const g=e.g_axG[a].toLowerCase();this.g_axz.hasOwnProperty(g)&&(e.g_axG[a]=URL.createObjectURL(this.g_axz[g]))}}if(e.g_axH)this.g_afo=e.g_axH;else{const e=location.origin;this.g_afo=("null"===e?"file:///":e)+location.pathname;const a=this.g_afo.lastIndexOf("/");-1!==a&&(this.g_afo=this.g_afo.substr(0,a+1))}if(e.g_axI)for(const[a,g]of Object.entries(e.g_axI))this.g_axp[a]=URL.createObjectURL(g);const a=new MessageChannel;this.g_axm=a.port1,this.g_axm.onmessage=e=>this._OnMessageFromRuntime(e.data),window.c3_addPortMessageHandler&&window.c3_addPortMessageHandler(e=>this.g_axJ(e)),this.g_ag$=new self.g_axK(this),await this.g_ag$.g_aaM(),this.g_axL(),"object"==typeof window.StatusBar&&window.StatusBar.hide(),await this.g_axM(),this.g_axk?await this.g_axN(e,a.port2):await this.g_axO(e,a.port2)}g_axP(e){return this.g_axp.hasOwnProperty(e)?this.g_axp[e]:e.endsWith("/workerMain.js")&&this.g_axp.hasOwnProperty("workerMain.js")?this.g_axp["workerMain.js"]:"playable-ad"===this.g_aft&&this.g_axz.hasOwnProperty(e.toLowerCase())?URL.createObjectURL(this.g_axz[e.toLowerCase()]):e}async g_axQ(g,a,_){if(g.startsWith("blob:"))return new Worker(g,_);if(this.g_ahr()){const a=await this.g_Az(this.g_axn+g),e=new Blob([a],{type:"application/javascript"});return new Worker(URL.createObjectURL(e),_)}const n=new URL(g,a),t=location.origin!==n.origin;if(t){const e=await fetch(n);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(n,_)}g_axL(){if(this.g_axE()){const e=window.innerWidth>window.innerHeight,a=document.documentElement.style,g=document.body.style;e?(g.height=a.height="375px",g.width=a.width="812px"):(g.width=a.width="375px",g.height=a.height="812px")}}g_axR(_){return{baseUrl:this.g_afo,windowInnerWidth:window.innerWidth,windowInnerHeight:window.innerHeight,devicePixelRatio:window.devicePixelRatio,isFullscreen:e.g_aez(),maxWebGLVersion:s(),projectData:_.g_axS,previewImageBlobs:window.cr_previewImageBlobs||this.g_axz,previewProjectFileBlobs:window.cr_previewProjectFileBlobs,shaders:self.C3_Shaders,exportType:_.g_axx,isDebug:-1<self.location.search.indexOf("debug"),ife:!!self.g_axT,jobScheduler:this.g_ag$.g_axU(),supportedAudioFormats:g,opusWasmScriptUrl:window.cr_opusWasmScriptUrl||this.g_axn+"opus.wasm.js",opusWasmBinaryUrl:window.cr_opusWasmBinaryUrl||this.g_axn+"opus.wasm.wasm",isWKWebView:this.g_ahr(),isFBInstantAvailable:"undefined"!=typeof self.FBInstant}}async g_axN(e,a){const g=this.g_axP(e.g_axV);this.g_axq=await this.g_axQ(g,this.g_afo,{name:"Runtime"}),this.g_ado=document.createElement("canvas"),this.g_ado.style.display="none";const _=this.g_ado.transferControlToOffscreen();document.body.appendChild(this.g_ado),window.c3canvas=this.g_ado,this.g_axq.postMessage(Object.assign(this.g_axR(e),{type:"init-runtime",isInWorker:!0,messagePort:a,canvas:_,workerDependencyScripts:e.g_axW||[],engineScripts:e.g_axG}),[a,_,...this.g_ag$.g_axX()]),this.g_axs=C.map(e=>new e(this)),this.g_axY()}async g_axO(a,g){this.g_ado=document.createElement("canvas"),this.g_ado.style.display="none",document.body.appendChild(this.g_ado),window.c3canvas=this.g_ado,this.g_axs=C.map(e=>new e(this)),this.g_axY();const n=a.g_axG.map(e=>new URL(e,this.g_afo).toString());await Promise.all(n.map(a=>_(a)));const t=Object.assign(this.g_axR(a),{isInWorker:!1,messagePort:g,canvas:this.g_ado});this.g_axr=self.C3_CreateRuntime(t),await self.C3_InitRuntime(this.g_axr,t)}async g_axB(){const e=await this.g_ag$.g_axZ();return{outputPort:e,transferables:[e]}}g_awN(){if(this.g_axk)throw new Error("not available in worker mode");return this.g_axr}g_awI(g,a,_,n,t){this.g_axm.postMessage({type:"event",component:g,handler:a,dispatchRuntimeEvent:n,data:_,responseId:null},this.g_axy?void 0:t)}g_awK(_,a,n,t,i){const e=m++,o=new Promise((g,a)=>{l.set(e,{resolve:g,reject:a})});return this.g_axm.postMessage({type:"event",component:_,handler:a,dispatchRuntimeEvent:t,data:n,responseId:e},this.g_axy?void 0:i),o}["_OnMessageFromRuntime"](e){const a=e.type;if("event"===a)this.g_ax_(e);else if("result"===a)this.g_ax$(e);else if("runtime-ready"===a)this.g_aya();else throw new Error(`unknown message '${a}'`)}g_ax_(_){const n=_.component,t=_.handler,a=_.data,i=_.responseId,e=y.get(n);if(!e)return void console.warn(`[DOM] No event handlers for component '${n}'`);const o=e.get(t);if(!o)return void console.warn(`[DOM] No handler '${t}' for component '${n}'`);let g=null;try{g=o(a)}catch(e){return console.error(`Exception in '${n}' handler '${t}':`,e),void(null!==i&&this.g_ayb(i,!1,e.toString()))}null!==i&&(g&&g.then?g.then(e=>this.g_ayb(i,!0,e)).catch(e=>{console.error(`Rejection from '${n}' handler '${t}':`,e),this.g_ayb(i,!1,e.toString())}):this.g_ayb(i,!0,g))}g_ayb(e,a,g){let _;g&&g.transferables&&(_=g.transferables),this.g_axm.postMessage({type:"result",responseId:e,isOk:a,result:g},_)}g_ax$(g){const a=g.responseId,_=g.isOk,n=g.result,t=l.get(a);_?t.resolve(n):t.reject(n),l.delete(a)}g_awP(e,a,g){let _=y.get(e);if(_||(_=new Map,y.set(e,_)),_.has(a))throw new Error(`[DOM] Component '${e}' already has handler '${a}'`);_.set(a,g)}static g_ayc(e){if(C.includes(e))throw new Error("DOM handler already added");C.push(e)}g_axY(){for(const e of this.g_axs)if("runtime"===e.g_awS())return void(this.g_axt=e);throw new Error("cannot find runtime DOM handler")}g_axJ(e){this.g_awI("debugger","message",e)}g_aya(){for(const e of this.g_axs)e.g_awG()}static g_aez(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)}async g_ayd(){return await this.g_awK("runtime","get-remote-preview-status-info")}g_awT(e){this.g_axw.push(e),this.g_aye()}g_awU(e){const a=this.g_axw.indexOf(e);if(-1===a)throw new Error("invalid callback");this.g_axw.splice(a,1),this.g_axw.length||this.g_axC()}g_aye(){-1===this.g_adX&&this.g_axw.length&&(this.g_adX=requestAnimationFrame(this.g_axu))}g_axC(){-1!==this.g_adX&&(cancelAnimationFrame(this.g_adX),this.g_adX=-1)}g_axv(){this.g_adX=-1;for(const e of this.g_axw)e();this.g_aye()}g_ayf(e){this.g_axt.g_ayf(e)}g_ayg(e){this.g_axt.g_ayg(e)}g_ayh(){this.g_axt.g_ayh()}g_atd(e){this.g_axt.g_atd(e)}g_AV(e){return!!g[e]}async g_ahc(e){const a=await this.g_awK("runtime","opus-decode",{arrayBuffer:e},!1,[e]);return new Float32Array(a)}g_gp(e){return /^(?:[a-z]+:)?\/\//.test(e)||"data:"===e.substr(0,5)||"blob:"===e.substr(0,5)}g_gq(e){return!this.g_gp(e)}async g_axA(e){const a=e.filename;switch(e.as){case"text":return await this.g_Ax(a);case"buffer":return await this.g_Az(a);default:throw new Error("unsupported type");}}g_ayi(e){const g=window.cordova.file.applicationDirectory+"www/"+e;return new Promise((e,a)=>{window.resolveLocalFileSystemURL(g,g=>{g.file(e,a)},a)})}async g_Ax(e){const a=await this.g_ayi(e);return await t(a)}g_ayj(){if(u.length&&!(8<=i)){i++;const e=u.shift();this.g_ayk(e.filename,e.g_ayl,e.g_aym)}}g_Az(e){return new Promise((g,_)=>{u.push({filename:e,g_ayl:e=>{i--,this.g_ayj(),g(e)},g_aym:e=>{i--,this.g_ayj(),_(e)}}),this.g_ayj()})}async g_ayk(g,a,e){try{const _=await this.g_ayi(g),n=await r(_);a(n)}catch(g){e(g)}}async g_axF(){const e=[];for(const[a,g]of Object.entries(this.g_axz))e.push(this.g_ayn(a,g));await Promise.all(e)}async g_ayn(e,a){if("object"==typeof a)this.g_axz[e]=new Blob([a.str],{type:a.type});else{const g=await fetch(a),_=await g.blob();this.g_axz[e]=_}}g_axM(){let e=null;const g=new Promise(a=>e=a),_=new ArrayBuffer(1),n=new MessageChannel;return n.port2.onmessage=a=>{a.data&&a.data.arrayBuffer||(this.g_axy=!0,console.warn("MessageChannel transfers determined to be broken. Disabling transferables.")),e()},n.port1.postMessage({arrayBuffer:_},[_]),g}}}{function g(e){return e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||e.originalEvent&&e.originalEvent.sourceCapabilities&&e.originalEvent.sourceCapabilities.firesTouchEvents}function a(e){return new Promise((a,g)=>{const _=new Image;_.onload=()=>a(_),_.onerror=e=>g(e),_.src=e})}async function _(e){const g=URL.createObjectURL(e);try{return await a(g)}finally{URL.revokeObjectURL(g)}}function n(){try{return window.parent&&window.parent.document.hasFocus()}catch(e){return!1}}self.C3_RasterSvgImage=async function(g,a,_){const n=document.createElement("canvas");n.width=a,n.height=_;const t=n.getContext("2d");return t.drawImage(g,0,0,a,_),n};let t=!1;document.addEventListener("pause",()=>t=!0),document.addEventListener("resume",()=>t=!1);const e=class extends g_awC{constructor(e){super(e,"runtime"),this.g_ayo=!0,this.g_ayp="any",this.g_ayq=!1,this.g_ayr=!1,this.g_ays=null,e.g_awP("canvas","update-size",e=>this.g_ayt(e)),e.g_awP("runtime","invoke-download",e=>this.g_ayu(e)),e.g_awP("runtime","raster-svg-image",e=>this.g_ayv(e)),e.g_awP("runtime","set-target-orientation",e=>this.g_ayw(e)),e.g_awP("runtime","register-sw",()=>this.g_ayx()),e.g_awP("runtime","post-to-debugger",e=>this.g_ayy(e)),e.g_awP("runtime","before-start-ticking",()=>this.g_ayz()),e.g_awP("runtime","debug-highlight",e=>this.g_ayA(e)),e.g_awP("runtime","enable-device-orientation",()=>this.g_ayB()),e.g_awP("runtime","enable-device-motion",()=>this.g_ayC());const a=e.g_axD();a.addEventListener("contextmenu",e=>e.preventDefault()),a.addEventListener("selectstart",e=>e.preventDefault()),a.addEventListener("gesturehold",e=>e.preventDefault()),a.addEventListener("touchstart",e=>e.preventDefault()),window.addEventListener("mousedown",e=>{1===e.button&&e.preventDefault()}),window.addEventListener("resize",()=>this.g_aem()),this.g_ayD=new Set,this.g_ayE=new WeakSet,this.g_ast=!1}g_ayz(){return document.addEventListener("visibilitychange",()=>this.g_ahb(document.hidden)),document.addEventListener("pause",()=>this.g_ahb(!0)),document.addEventListener("resume",()=>this.g_ahb(!1)),{isSuspended:!!(document.hidden||t)}}g_awG(){window.addEventListener("focus",()=>this.g_ayF("window-focus")),window.addEventListener("blur",()=>this.g_ayF("window-blur",{parentHasFocus:n()})),window.addEventListener("fullscreenchange",()=>this.g_aen()),window.addEventListener("webkitfullscreenchange",()=>this.g_aen()),window.addEventListener("mozfullscreenchange",()=>this.g_aen()),window.addEventListener("fullscreenerror",e=>this.g_aeo(e)),window.addEventListener("webkitfullscreenerror",e=>this.g_aeo(e)),window.addEventListener("mozfullscreenerror",e=>this.g_aeo(e)),window.addEventListener("keydown",e=>this.g_ayG("keydown",e)),window.addEventListener("keyup",e=>this.g_ayG("keyup",e)),window.addEventListener("mousemove",e=>this.g_ayH("mousemove",e)),window.addEventListener("mousedown",e=>this.g_ayH("mousedown",e)),window.addEventListener("mouseup",e=>this.g_ayH("mouseup",e)),window.addEventListener("dblclick",e=>this.g_ayH("dblclick",e)),window.addEventListener("wheel",e=>this.g_ayI("wheel",e)),"undefined"==typeof PointerEvent?(window.addEventListener("touchstart",e=>this.g_ayJ("pointerdown",e)),window.addEventListener("touchmove",e=>this.g_ayJ("pointermove",e)),window.addEventListener("touchend",e=>this.g_ayJ("pointerup",e)),window.addEventListener("touchcancel",e=>this.g_ayJ("pointercancel",e))):(window.addEventListener("pointerdown",e=>this.g_ayK("pointerdown",e)),window.addEventListener("pointermove",e=>this.g_ayK("pointermove",e)),window.addEventListener("pointerup",e=>this.g_ayK("pointerup",e)),window.addEventListener("pointercancel",e=>this.g_ayK("pointercancel",e)));const e=()=>this.g_ayh();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_ayB(){this.g_ayq||(this.g_ayq=!0,window.addEventListener("deviceorientation",e=>this.g_ap$(e)))}g_ayC(){this.g_ayr||(this.g_ayr=!0,window.addEventListener("devicemotion",e=>this.g_aqa(e)))}g_ayF(e,a){this.g_awH(e,a||null,!0)}g_aem(){this.g_awH("window-resize",{innerWidth:window.innerWidth,innerHeight:window.innerHeight,devicePixelRatio:window.devicePixelRatio},!0)}g_ayw(e){this.g_ayp=e.targetOrientation}g_ayL(){const e=this.g_ayp;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_aen(){const e=g_axj.g_aez();e&&"any"!==this.g_ayp&&this.g_ayL(),this.g_awH("fullscreenchange",{isFullscreen:e,innerWidth:window.innerWidth,innerHeight:window.innerHeight})}g_aeo(e){console.warn("[Construct 3] Fullscreen request failed: ",e),this.g_awH("fullscreenerror",{isFullscreen:g_axj.g_aez(),innerWidth:window.innerWidth,innerHeight:window.innerHeight})}g_ahb(e){e?this.g_awD.g_axC():this.g_awD.g_aye(),this.g_awH("visibilitychange",{hidden:e})}g_ayG(e,a){this.g_awL(e,{code:a.code,key:a.key,which:a.which,repeat:a.repeat,altKey:a.altKey,ctrlKey:a.ctrlKey,metaKey:a.metaKey,shiftKey:a.shiftKey,timeStamp:a.timeStamp},!0)}g_ayH(a,e){g(e)||("mousedown"===a&&window!==window.top&&window.focus(),this.g_awL(a,{button:e.button,clientX:e.clientX,clientY:e.clientY,timeStamp:e.timeStamp},!0))}g_ayI(e,a){this.g_awH(e,{clientX:a.clientX,clientY:a.clientY,deltaX:a.deltaX,deltaY:a.deltaY,deltaZ:a.deltaZ,deltaMode:a.deltaMode,timeStamp:a.timeStamp},!0)}g_ayK(e,a){"pointerdown"===e&&window!==window.top&&window.focus(),this.g_awL(e,{pointerId:a.pointerId,pointerType:a.pointerType,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},!0)}g_ayJ(e,a){"pointerdown"===e&&window!==window.top&&window.focus();for(let g=0,_=a.changedTouches.length;g<_;++g){const _=a.changedTouches[g];this.g_awL(e,{pointerId:_.identifier,pointerType:"touch",clientX:_.clientX,clientY:_.clientY,width:2*(_.radiusX||_.webkitRadiusX||_.mozRadiusX||_.msRadiusX||0),height:2*(_.radiusY||_.webkitRadiusY||_.mozRadiusY||_.msRadiusY||0),pressure:_.force||_.webkitForce||_.mozForce||_.msForce||0,tangentialPressure:0,tiltX:0,tiltY:0,twist:_.rotationAngle||0,timeStamp:a.timeStamp},!0)}}g_ap$(e){this.g_awH("deviceorientation",{alpha:e.alpha||0,beta:e.beta||0,gamma:e.gamma||0,timeStamp:e.timeStamp},!0)}g_aqa(_){let a=0,n=0,t=0,o=0,r=0,s=0;const l=_.accelerationIncludingGravity;l&&(a=l.x||0,n=l.y||0,t=l.z||0);const u=_.acceleration;u&&(o=u.x||0,r=u.y||0,s=u.z||0),this.g_awH("devicemotion",{acceleration:{x:o,y:r,z:s},accelerationWithG:{x:a,y:n,z:t},timeStamp:_.timeStamp},!0)}g_ayt(e){const a=this.g_awR(),g=a.g_axD();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_axL(),this.g_ayo&&(g.style.display="",this.g_ayo=!1)}g_ayu(g){const _=g.url,n=g.filename,t=document.createElement("a"),e=document.body;t.textContent=n,t.href=_,t.download=n,e.appendChild(t),t.click(),e.removeChild(t)}async g_ayv(n){const a=n.blob,t=n.width,i=n.height,e=await _(a),o=await self.C3_RasterSvgImage(e,t,i);return await createImageBitmap(o)}g_ayh(){const e=[...this.g_ayD];if(this.g_ayD.clear(),!this.g_ast)for(const g of e){const e=g.play();e&&e.catch(()=>{this.g_ayE.has(g)||this.g_ayD.add(g)})}}g_ayf(e){if("function"!=typeof e.play)throw new Error("missing play function");this.g_ayE.delete(e);let a;try{a=e.play()}catch(a){return void this.g_ayD.add(e)}a&&a.catch(()=>{this.g_ayE.has(e)||this.g_ayD.add(e)})}g_ayg(e){this.g_ayD.delete(e),this.g_ayE.add(e)}g_atd(e){this.g_ast=!!e}g_ayA(e){const a=e.show;if(!a)return void(this.g_ays&&(this.g_ays.style.display="none"));this.g_ays||(this.g_ays=document.createElement("div"),this.g_ays.id="inspectOutline",document.body.appendChild(this.g_ays));const g=this.g_ays;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_ayx(){window.C3_RegisterSW&&window.C3_RegisterSW()}g_ayy(e){window.c3_postToMessagePort&&(e.from="runtime",window.c3_postToMessagePort(e))}};g_axj.g_ayc(e)}{const e=document.currentScript.src;self.g_axK=class{constructor(a){this.g_ayM=a,this.g_afo=e?e.substr(0,e.lastIndexOf("/")+1):a.g_fE(),this.g_aji=Math.min(navigator.hardwareConcurrency||2,16),this.g_ayN=null,this.g_ayO=[],this.g_ajg=null,this.g_ayP=null}async g_aaM(){if(this.g_ayQ)throw new Error("already initialised");this.g_ayQ=!0;const e=this.g_ayM.g_axP("dispatchWorker.js");this.g_ayN=await this.g_ayM.g_axQ(e,this.g_afo,{name:"DispatchWorker"});const a=new MessageChannel;this.g_ajg=a.port1,this.g_ayN.postMessage({type:"_init","in-port":a.port2},[a.port2]),this.g_ayP=await this.g_axZ()}async g_axZ(){const g=this.g_ayO.length,a=this.g_ayM.g_axP("jobWorker.js"),_=await this.g_ayM.g_axQ(a,this.g_afo,{name:"JobWorker"+g}),n=new MessageChannel,t=new MessageChannel;return this.g_ayN.postMessage({type:"_addJobWorker",port:n.port1},[n.port1]),_.postMessage({type:"init",number:g,"dispatch-port":n.port2,"output-port":t.port2},[n.port2,t.port2]),this.g_ayO.push(_),t.port1}g_axU(){return{inputPort:this.g_ajg,outputPort:this.g_ayP,maxNumWorkers:this.g_aji}}g_axX(){return[this.g_ajg,this.g_ayP]}}}if("use strict",window.C3_IsSupported){"undefined"!=typeof OffscreenCanvas;window.c3_runtimeInterface=new g_axj({g_axl:!1,g_axV:"workerMain.js",g_axG:["scripts/c3runtime.js"],g_axo:"scripts/",g_axx:"html5"})}{function e(e){return e&&!e.paused&&!e.ended&&0<e.currentTime}const a=class extends g_awV{constructor(e){super(e,"video"),this.g_axc(!1),this.g_ayR=!1,this.g_ayS=0,this.g_ayT=new WeakSet,this.g_awO("init",e=>this.g_ayU(e)),this.g_axd("play",e=>this.g_ayV(e)),this.g_axd("pause",e=>this.g_ayW(e)),this.g_axd("set-source",(e,a)=>this.g_ayX(e,a)),this.g_axd("set-playback-time",(e,a)=>this.g_ayY(e,a)),this.g_axd("set-looping",(e,a)=>this.g_ayZ(e,a)),this.g_axd("set-muted",(e,a)=>this.g_ay_(e,a)),this.g_axd("set-volume",(e,a)=>this.g_ay$(e,a)),self.C3Video_GetElement=e=>this.g_axi(e)}async g_ayU(e){this.g_Yp(),this.g_ayR=e.isInWorker;const a=document.createElement("video");return{"video/webm":!!a.canPlayType("video/webm"),"video/ogg":!!a.canPlayType("video/ogg"),"video/mp4":!!a.canPlayType("video/mp4")}}g_ayf(e){this.g_awD.g_ayf(e)}g_ayg(e){this.g_awD.g_ayg(e)}g_aza(){this.g_awD.g_ayh()}g_YP(e,a){const g=document.createElement("video");g.crossOrigin="anonymous",g.playsInline=!0,g.addEventListener("canplay",()=>this.g_azb(g,e,0)),g.addEventListener("canplaythrough",()=>this.g_azb(g,e,1)),g.addEventListener("ended",()=>this.g_azb(g,e,2)),g.addEventListener("error",()=>this.g_azb(g,e,3)),g.addEventListener("loadstart",()=>this.g_azb(g,e,4)),g.addEventListener("playing",()=>this.g_azb(g,e,5)),g.addEventListener("pause",()=>this.g_azb(g,e,6)),g.addEventListener("stalled",()=>this.g_azb(g,e,7));const _=a.autoplay;return 0===_?(g.autoplay=!1,g.preload="none"):1===_?(g.autoplay=!1,g.preload="auto"):g.autoplay=!0,g.src=a.src,2===_&&this.g_ayf(g),g}g_azb(e,a,g){this.g_ayT.has(e)||this.g_axf("playback-event",a,{type:g})}g_axh(){}g_axe(a){this.g_ayg(a),e(a)&&a.pause(),a.src="",this.g_ayT.add(a)}g_ayV(e){this.g_ayf(e)}g_ayW(e){this.g_ayg(e),e.pause()}g_ayX(e,a){e.src=a.src,e.load()}g_ayY(e,a){try{e.currentTime=a.time}catch(e){console.error("[Video] Exception setting playback time: ",e)}}g_ayZ(e,a){e.loop=a.isLooping}g_ay_(e,a){e.muted=a.isMuted}g_ay$(e,a){e.volume=a.volume}g_Jv(){const g={},a={sequenceNumber:this.g_ayS++,videoData:g},e=[],_=[];for(const[a,n]of this.g_awW.entries()){const t={currentTime:n.currentTime,duration:n.duration,videoWidth:n.videoWidth,videoHeight:n.videoHeight};this.g_ayR&&_.push(createImageBitmap(n).then(g=>{t.imageBitmap=g,e.push(g)}).catch(()=>{t.imageBitmap=null})),g[a.toString()]=t}Promise.all(_).then(()=>this.g_awH("state",a,!1,e))}};g_axj.g_ayc(a)}{const e=class extends g_awC{constructor(e){super(e,"mouse"),this.g_awO("cursor",e=>this.g_azc(e))}g_azc(e){document.body.style.cursor=e}};g_axj.g_ayc(e)}{function e(e,g){return e.length===g.length&&(e===g||e.toLowerCase()===g.toLowerCase())}const a=class extends g_awC{constructor(e){super(e,"audio"),this.g_azd=null,this.g_aze=null,this.g_azf=!1,this.g_azg=()=>this.g_azh(),this.g_azi=[],this.g_azj=[],this.g_azk=null,this.g_azl="",this.g_azm=-1,this.g_azn=new Map,this.g_ass=1,this.g_ast=!1,this.g_asg=0,this.g_aaF=1,this.g_agC=0,this.g_asi="HRTF",this.g_asj="inverse",this.g_azo=600,this.g_aso=1e4,this.g_asp=1,this.g_azp=!1,this.g_azq=!1,this.g_azr=this.g_awD.g_AV("audio/webm; codecs=opus"),this.g_azs=new Map,this.g_azt=new Set,this.g_azu=!1,this.g_azv="",this.g_azw=null,self.C3Audio_OnMicrophoneStream=(e,a)=>this.g_azx(e,a),this.g_azy=null,self.C3Audio_GetOutputStream=()=>this.g_azz(),this.g_awQ([["create-audio-context",e=>this.g_azA(e)],["play",e=>this.g_azB(e)],["stop",e=>this.g_azC(e)],["stop-all",()=>this.g_azD()],["set-paused",e=>this.g_azE(e)],["set-volume",e=>this.g_azF(e)],["fade-volume",e=>this.g_azG(e)],["set-master-volume",e=>this.g_azH(e)],["set-muted",e=>this.g_azI(e)],["set-silent",e=>this.g_azJ(e)],["set-looping",e=>this.g_azK(e)],["set-playback-rate",e=>this.g_azL(e)],["seek",e=>this.g_azM(e)],["preload",e=>this.g_azN(e)],["unload",e=>this.g_FW(e)],["unload-all",()=>this.g_azO()],["set-suspended",e=>this.g_azP(e)],["add-effect",e=>this.g_azQ(e)],["set-effect-param",e=>this.g_azR(e)],["remove-effects",e=>this.g_azS(e)],["tick",e=>this.g_Ll(e)],["load-state",e=>this.g_azT(e)]])}async g_azA(e){e.isWKWebView&&(this.g_azp=!0),this.g_asg=e.timeScaleMode,this.g_asi=["equalpower","HRTF","soundfield"][e.panningModel],this.g_asj=["linear","inverse","exponential"][e.distanceModel],this.g_azo=e.refDistance,this.g_aso=e.maxDistance,this.g_asp=e.rolloffFactor;const a={latencyHint:e.latencyHint};if("undefined"!=typeof AudioContext)this.g_azd=new AudioContext(a);else if("undefined"!=typeof webkitAudioContext)this.g_azd=new webkitAudioContext(a);else throw new Error("Web Audio API not supported");this.g_aze=this.g_azd.createGain(),this.g_aze.connect(this.g_azd.destination);const g=e.listenerPos;this.g_azd.listener.setPosition(g[0],g[1],g[2]),this.g_azd.listener.setOrientation(0,0,1,0,-1,0),window.addEventListener("pointerup",this.g_azg,!0),window.addEventListener("touchend",this.g_azg,!0),window.addEventListener("click",this.g_azg,!0),window.addEventListener("keydown",this.g_azg,!0),self.C3_GetAudioContextCurrentTime=()=>this.g_azU();try{await Promise.all(e.preloadList.map(e=>this.g_azV(e.originalUrl,e.url,e.type,!1)))}catch(e){console.error("[Construct 3] Preloading sounds failed: ",e)}return{sampleRate:this.g_azd.sampleRate}}g_azh(){if(!this.g_azf){const e=this.g_azd;"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_azf=!0,window.removeEventListener("pointerup",this.g_azg,!0),window.removeEventListener("touchend",this.g_azg,!0),window.removeEventListener("click",this.g_azg,!0),window.removeEventListener("keydown",this.g_azg,!0),this.g_azg=null)}}g_azW(){return this.g_azd}g_azU(){return this.g_azd.currentTime}g_azX(){return this.g_aze}g_azY(e){const a=this.g_azs.get(e.toLowerCase());return a?a[0].g_azZ():this.g_azX()}g_az_(e,g){e=e.toLowerCase();let _=this.g_azs.get(e);_||(_=[],this.g_azs.set(e,_)),g.g_acq(_.length),g.g_az$(e),_.push(g),this.g_aAa(e)}g_aAa(e){let a=this.g_azX();const g=this.g_azs.get(e);if(g&&g.length){a=g[0].g_azZ();for(let e=0,a=g.length;e<a;++e){const _=g[e];e+1===a?_.g_aAb(this.g_azX()):_.g_aAb(g[e+1].g_azZ())}}for(const g of this.g_aAc(e))g.g_aAd(a);this.g_azw&&this.g_azv===e&&(this.g_azw.disconnect(),this.g_azw.connect(a))}g_aAe(){return this.g_ass}g_asR(){return this.g_ast}g_aAf(){return this.g_asg}g_LA(){return this.g_aaF}g_EK(){return this.g_agC}g_aAg(){return this.g_azp}g_aAh(){return this.g_azr}g_aAi(){this.g_azq=!0}g_aAj(){return this.g_asi}g_aAk(){return this.g_asj}g_aAl(){return this.g_azo}g_aAm(){return this.g_aso}g_aAn(){return this.g_asp}g_aAo(e,a){return a?this.g_awD.g_ahc(e).then(e=>{const a=this.g_azd.createBuffer(1,e.length,48e3),g=a.getChannelData(0);return g.set(e),a}):new Promise((a,g)=>{this.g_azd.decodeAudioData(e,a,g)})}g_ayf(e){this.g_awD.g_ayf(e)}g_ayg(e){this.g_awD.g_ayg(e)}g_aAp(a){let g=0;for(let _=0,e=this.g_azj.length;_<e;++_){const n=this.g_azj[_];this.g_azj[g]=n,n.g_aAq()===a?n.g_eN():++g}this.g_azj.length=g}g_aAr(){let e=0;for(let a=0,g=this.g_azi.length;a<g;++a){const g=this.g_azi[a];this.g_azi[e]=g,g.g_aAs()?g.g_eN():++e}this.g_azi.length=e}*g_aAc(a){if(a)for(const g of this.g_azj)e(g.g_aAt(),a)&&(yield g);else this.g_azk&&!this.g_azk.g_any()&&(yield this.g_azk)}async g_azV(g,a,_,n,t){for(const e of this.g_azi)if(e.g_aAu()===a)return await e.g_AK(),e;if(t)return null;n&&(this.g_azp||this.g_azq)&&this.g_aAr();const e=g_aAv.g_pM(this,g,a,_,n);return this.g_azi.push(e),await e.g_AK(),e}async g_aAw(_,a,n,t,i){for(const e of this.g_azj)if(e.g_aAu()===a&&(e.g_aAx()||i))return e.g_aAy(t),e;const e=await this.g_azV(_,a,n,i),o=e.g_ahH(t);return this.g_azj.push(o),o}g_aAz(e){let a=this.g_azn.get(e);if(!a){let g=null;const _=new Promise(e=>g=e);a={g_aAA:0,promise:_,resolve:g},this.g_azn.set(e,a)}a.g_aAA++}g_aAB(e){const a=this.g_azn.get(e);if(!a)throw new Error("expected pending tag");a.g_aAA--,0===a.g_aAA&&(a.resolve(),this.g_azn.delete(e))}g_aAC(e){e||(e=this.g_azl);const g=this.g_azn.get(e);return g?g.promise:Promise.resolve()}g_aAD(){if(0<this.g_azt.size)return void this.g_Yp();for(const e of this.g_azj)if(e.g_Rw())return void this.g_Yp()}g_Jv(){for(const a of this.g_azt)a.g_Jv();const e=this.g_azU();for(const a of this.g_azj)a.g_Jv(e);const a=this.g_azj.filter(a=>a.g_Rw()).map(a=>a.g_aAE());this.g_awH("state",{tickCount:this.g_azm,audioInstances:a,analysers:[...this.g_azt].map(a=>a.g_aAF())}),0===a.length&&0===this.g_azt.size&&this.g_Yc()}g_aAG(e,a){this.g_awH("trigger",{type:e,tag:a})}async g_azB(_){const a=_.originalUrl,n=_.url,t=_.type,o=_.isMusic,e=_.tag,r=_.isLooping,g=_.vol,d=_.pos,i=_.panning;let s=_.off;if(0<s&&!_.trueClock)if(this.g_azd.getOutputTimestamp){const e=this.g_azd.getOutputTimestamp();s=s-e.performanceTime/1e3+e.contextTime}else s=s-performance.now()/1e3+this.g_azd.currentTime;this.g_azl=e,this.g_aAz(e);try{this.g_azk=await this.g_aAw(a,n,t,e,o),i?(this.g_azk.g_aAH(!0),this.g_azk.g_aAI(i.x,i.y,i.angle,i.innerAngle,i.outerAngle,i.outerGain),i.hasOwnProperty("uid")&&this.g_azk.g_aAJ(i.uid)):this.g_azk.g_aAH(!1),this.g_azk.g_Jt(r,g,d,s)}catch(e){return void console.error("[Construct 3] Audio: error starting playback: ",e)}finally{this.g_aAB(e)}this.g_Yp()}g_azC(e){const a=e.tag;for(const g of this.g_aAc(a))g.g_Jk()}g_azD(){for(const e of this.g_azj)e.g_Jk()}g_azE(e){const a=e.tag,g=e.paused;for(const _ of this.g_aAc(a))g?_.g_anF():_.g_Js();this.g_aAD()}g_azF(e){const a=e.tag,g=e.vol;for(const _ of this.g_aAc(a))_.g_anE(g)}async g_azG(g){const a=g.tag,_=g.vol,n=g.duration,t=g.stopOnEnd;await this.g_aAC(a);for(const e of this.g_aAc(a))e.g_asZ(_,n,t);this.g_aAD()}g_azH(e){this.g_ass=e.vol;for(const a of this.g_azj)a.g_aAK()}g_azI(e){const a=e.tag,g=e.isMuted;for(const _ of this.g_aAc(a))_.g_anD(g)}g_azJ(e){this.g_ast=e.isSilent,this.g_awD.g_atd(this.g_ast);for(const a of this.g_azj)a.g_aAL()}g_azK(e){const a=e.tag,g=e.isLooping;for(const _ of this.g_aAc(a))_.g_anC(g)}g_azL(e){const a=e.tag,g=e.rate;for(const _ of this.g_aAc(a))_.g_Jq(g)}g_azM(e){const a=e.tag,g=e.pos;for(const _ of this.g_aAc(a))_.g_atc(g)}async g_azN(g){const a=g.originalUrl,_=g.url,n=g.type,t=g.isMusic;try{await this.g_aAw(a,_,n,"",t)}catch(e){console.error("[Construct 3] Audio: error preloading: ",e)}}async g_FW(g){const a=g.url,_=g.type,n=g.isMusic,t=await this.g_azV("",a,_,n,!0);if(t){t.g_eN();const e=this.g_azi.indexOf(t);-1!==e&&this.g_azi.splice(e,1)}}g_azO(){for(const e of this.g_azi)e.g_eN();this.g_azi.length=0}g_azP(e){const a=e.isSuspended;!a&&this.g_azd.resume&&this.g_azd.resume();for(const g of this.g_azj)g.g_ahO(a);a&&this.g_azd.suspend&&this.g_azd.suspend()}g_Ll(e){if(this.g_aaF=e.timeScale,this.g_agC=e.gameTime,this.g_azm=e.tickCount,0!==this.g_asg)for(const e of this.g_azj)e.g_aAM();const a=e.listenerPos;a&&this.g_azd.listener.setPosition(a[0],a[1],a[2]);for(const g of e.instPans){const e=g.uid;for(const a of this.g_azj)a.g_CJ()===e&&a.g_aAN(g.x,g.y,g.angle)}}async g_azQ(g){const a=g.type,_=g.tag,n=g.params;let t;if("filter"===a)t=new g_aAO(this,...n);else if("delay"===a)t=new g_aAP(this,...n);else if("convolution"===a){let a=null;try{a=await this.g_azV(g.bufferOriginalUrl,g.bufferUrl,g.bufferType,!1)}catch(e){return void console.log("[Construct 3] Audio: error loading convolution: ",e)}t=new g_aAQ(this,a.g_aAR(),...n),t.g_aAS(g.bufferOriginalUrl,g.bufferUrl,g.bufferType)}else if("flanger"===a)t=new g_aAT(this,...n);else if("phaser"===a)t=new g_aAU(this,...n);else if("gain"===a)t=new g_aAV(this,...n);else if("tremolo"===a)t=new g_aAW(this,...n);else if("ringmod"===a)t=new g_aAX(this,...n);else if("distortion"===a)t=new g_aAY(this,...n);else if("compressor"===a)t=new g_aAZ(this,...n);else if("analyser"===a)t=new g_aA_(this,...n);else throw new Error("invalid effect type");this.g_az_(_,t),this.g_aA$()}g_azR(_){const a=_.tag,n=_.index,t=_.param,i=_.value,e=_.ramp,o=_.time,g=this.g_azs.get(a);!g||0>n||n>=g.length||(g[n].g_aBa(t,i,e,o),this.g_aA$())}g_azS(e){const a=e.tag.toLowerCase(),g=this.g_azs.get(a);if(g&&g.length){for(const e of g)e.g_eN();this.g_azs.delete(a),this.g_aAa(a)}}g_aBb(e){this.g_azt.add(e),this.g_aAD()}g_aBc(e){this.g_azt.delete(e)}g_aA$(){this.g_azu||(this.g_azu=!0,Promise.resolve().then(()=>this.g_aBd()))}g_aBd(){const e={};for(const[a,g]of this.g_azs)e[a]=g.map(e=>e.g_aAE());this.g_awH("fxstate",{fxstate:e}),this.g_azu=!1}async g_azT(e){const g=e.saveLoadMode;if(3!==g)for(const e of this.g_azj)e.g_aAs()&&1===g||!e.g_aAs()&&2===g||e.g_Jk();for(const g of this.g_azs.values())for(const e of g)e.g_eN();this.g_azs.clear(),this.g_aaF=e.timeScale,this.g_agC=e.gameTime;const a=e.listenerPos;this.g_azd.listener.setPosition(a[0],a[1],a[2]),this.g_ast=e.isSilent,this.g_awD.g_atd(this.g_ast),this.g_ass=e.masterVolume;const _=[];for(const a of Object.values(e.effects))_.push(Promise.all(a.map(e=>this.g_azQ(e))));await Promise.all(_),await Promise.all(e.playing.map(e=>this.g_aBe(e,g))),this.g_aAD()}async g_aBe(_,a){if(3===a)return;const n=_.bufferOriginalUrl,t=_.bufferUrl,o=_.bufferType,e=_.isMusic,r=_.tag,g=_.isLooping,d=_.volume,i=_.playbackTime;if(e&&1===a)return;if(!e&&2===a)return;let s=null;try{s=await this.g_aAw(n,t,o,r,e)}catch(e){return void console.error("[Construct 3] Audio: error loading audio state: ",e)}s.g_aBf(_.pan),s.g_Jt(g,d,i,0),_.isPlaying||s.g_anF(),s.g_aBg(_)}g_azx(e,a){this.g_azw&&this.g_azw.disconnect(),this.g_azv=a.toLowerCase(),this.g_azw=this.g_azd.createMediaStreamSource(e),this.g_azw.connect(this.g_azY(this.g_azv))}g_azz(){return this.g_azy||(this.g_azy=this.g_azd.createMediaStreamDestination(),this.g_aze.connect(this.g_azy)),this.g_azy.stream}};g_axj.g_ayc(a)}"use strict",self.g_aAv=class{constructor(g,a,_,n,t){this.g_aBh=g,this.g_aBi=a,this.g_Bf=_,this.g_kA=n,this.g_aBj=t,this.g_aBk="",this.g_aBl="not-loaded",this.g_Bk=null}g_eN(){this.g_aBl="not-loaded",this.g_aBh=null,this.g_Bk=null}static g_pM(g,a,_,n,t){const e="audio/webm; codecs=opus"===n&&!g.g_aAh();return t&&e&&g.g_aAi(),!t||g.g_aAg()||e?new g_aBm(g,a,_,n,t,e):new g_aBn(g,a,_,n,t)}g_ahH(e){return"html5"===this.g_aBk?new g_aBo(this.g_aBh,this,e):new g_aBp(this.g_aBh,this,e)}g_FQ(){}g_AK(){return this.g_Bk||(this.g_Bk=this.g_FQ()),this.g_Bk}g_Bl(){}g_aBq(){}g_aBr(){return"failed"===this.g_aBl}g_azW(){return this.g_aBh.g_azW()}g_aBs(){return this.g_aBk}g_aBt(){return this.g_aBi}g_aAu(){return this.g_Bf}g_aBu(){return this.g_kA}g_aAs(){return this.g_aBj}g__F(){}},"use strict",self.g_aBn=class extends g_aAv{constructor(g,a,_,n,t){super(g,a,_,n,t),this.g_aBk="html5",this.g_aBv=new Audio,this.g_aBv.crossOrigin="anonymous",this.g_aBv.autoplay=!1,this.g_aBv.preload="auto",this.g_aBw=null,this.g_aBx=null,this.g_aBy=!1,this.g_aBv.addEventListener("canplaythrough",()=>this.g_aBy=!0),this.g_aBz=this.g_azW().createGain(),this.g_aBA=null,this.g_aBv.addEventListener("canplay",()=>{this.g_aBw&&(this.g_aBl="loaded",this.g_aBw(),this.g_aBw=null,this.g_aBx=null),this.g_aBA||!this.g_aBv||(this.g_aBA=this.g_azW().createMediaElementSource(this.g_aBv),this.g_aBA.connect(this.g_aBz))}),this.onended=null,this.g_aBv.addEventListener("ended",()=>{this.onended&&this.onended()}),this.g_aBv.addEventListener("error",e=>this.g_aBB(e))}g_eN(){this.g_aBh.g_aAp(this),this.g_aBz.disconnect(),this.g_aBz=null,this.g_aBA.disconnect(),this.g_aBA=null,this.g_aBv&&!this.g_aBv.paused&&this.g_aBv.pause(),this.onended=null,this.g_aBv=null,super.g_eN()}g_FQ(){return this.g_aBl="loading",new Promise((e,a)=>{this.g_aBw=e,this.g_aBx=a,this.g_aBv.src=this.g_Bf})}g_aBB(e){console.error(`[Construct 3] Audio '${this.g_Bf}' error: `,e),this.g_aBx&&(this.g_aBl="failed",this.g_aBx(e),this.g_aBw=null,this.g_aBx=null)}g_Bl(){const e=4<=this.g_aBv.readyState;return e&&(this.g_aBy=!0),e||this.g_aBy}g_aBq(){return this.g_Bl()}g_aBC(){return this.g_aBv}g_aBD(){return this.g_aBz}g__F(){return this.g_aBv.duration}},"use strict",self.g_aBm=class extends g_aAv{constructor(g,a,_,n,t,e){super(g,a,_,n,t),this.g_aBk="webaudio",this.g_aBE=null,this.g_aBF=null,this.g_aBG=!!e}g_eN(){this.g_aBh.g_aAp(this),this.g_aBE=null,this.g_aBF=null,super.g_eN()}async g_aBH(){if(this.g_aBE)return this.g_aBE;const e=this.g_aBh.g_awR();if("cordova"===e.g_AD()&&e.g_gq(this.g_Bf))this.g_aBE=await e.g_Az(this.g_Bf);else{const e=await fetch(this.g_Bf);if(!e.ok)throw new Error(`error fetching audio data: ${e.status} ${e.statusText}`);this.g_aBE=await e.arrayBuffer()}}async g_aBI(){return this.g_aBF?this.g_aBF:void(this.g_aBF=await this.g_aBh.g_aAo(this.g_aBE,this.g_aBG),this.g_aBE=null)}async g_FQ(){try{this.g_aBl="loading",await this.g_aBH(),await this.g_aBI(),this.g_aBl="loaded"}catch(e){this.g_aBl="failed",console.error(`[Construct 3] Failed to load audio '${this.g_Bf}': `,e)}}g_Bl(){return!!(this.g_aBE||this.g_aBF)}g_aBq(){return!!this.g_aBF}g_aAR(){return this.g_aBF}g__F(){return this.g_aBF?this.g_aBF.duration:0}},"use strict";{function _(g){return g*e}const e=180/Math.PI;self.g_aBJ=class{constructor(e,a,g){this.g_aBh=e,this.g_vs=a,this.g_aBK=g,this.g_aBL=this.g_azW().createGain(),this.g_aBL.connect(this.g_azX()),this.g_aBM=null,this.g_aBN=!1,this.g_OL=!0,this.g_anh=!1,this.g_aBO=!1,this.g_UE=!1,this.g_ank=1,this.g_anj=!1,this.g_H$=1;const _=this.g_aBh.g_aAf();this.g_aBP=1===_&&!this.g_aAs()||2===_,this.g_aBQ=-1,this.g_aBR=-1,this.g_aBS=!1}g_eN(){this.g_aBh=null,this.g_vs=null,this.g_aBM&&(this.g_aBM.disconnect(),this.g_aBM=null),this.g_aBL.disconnect(),this.g_aBL=null}g_azW(){return this.g_aBh.g_azW()}g_azX(){return this.g_aBh.g_azY(this.g_aBK)}g_aAe(){return this.g_aBh.g_aAe()}g_awr(){return this.g_aBP?this.g_aBh.g_EK():performance.now()/1e3}g_aBt(){return this.g_vs.g_aBt()}g_aAu(){return this.g_vs.g_aAu()}g_aBu(){return this.g_vs.g_aBu()}g_aAq(){return this.g_vs}g_aAs(){return this.g_vs.g_aAs()}g_aAy(e){this.g_aBK=e}g_aAt(){return this.g_aBK}g_any(){}g_aAx(){}g_IX(){return!this.g_OL&&!this.g_anh&&!this.g_any()}g_Rw(){return!this.g_OL&&!this.g_any()}g_aBT(){}g__F(e){let a=this.g_vs.g__F();return e&&(a/=this.g_H$||.001),a}g_Jt(){}g_Jk(){}g_anF(){}g_anx(){return this.g_anh}g_Js(){}g_anE(e){this.g_ank=e,this.g_aBL.gain.cancelScheduledValues(0),this.g_aBR=-1,this.g_aBL.gain.value=this.g_aBU()}g_asZ(g,a,_){if(!this.g_anz()){const n=this.g_aBL.gain;n.cancelScheduledValues(0);const t=this.g_aBh.g_azU(),e=t+a;n.setValueAtTime(this.g_ank,t),n.linearRampToValueAtTime(g,e),this.g_ank=g,this.g_aBR=e,this.g_aBS=_}}g_aAK(){this.g_anE(this.g_ank)}g_Jv(e){-1!==this.g_aBR&&e>=this.g_aBR&&(this.g_aBR=-1,this.g_aBS&&this.g_Jk(),this.g_aBh.g_aAG("fade-ended",this.g_aBK))}g_aBU(){const e=this.g_ank*this.g_aAe();return isFinite(e)?e:0}g_anD(e){e=!!e,this.g_anj===e||(this.g_anj=e,this.g_aAL())}g_anz(){return this.g_anj}g_asR(){return this.g_aBh.g_asR()}g_aAL(){}g_anC(){}g_SU(){return this.g_UE}g_Jq(e){this.g_H$===e||(this.g_H$=e,this.g_aAM())}g_aAM(){}g_aBV(){return this.g_H$}g_atc(){}g_ahO(){}g_aAH(e){e=!!e,this.g_aBN===e||(this.g_aBN=e,this.g_aBN?(!this.g_aBM&&(this.g_aBM=this.g_azW().createPanner(),this.g_aBM.panningModel=this.g_aBh.g_aAj(),this.g_aBM.distanceModel=this.g_aBh.g_aAk(),this.g_aBM.refDistance=this.g_aBh.g_aAl(),this.g_aBM.maxDistance=this.g_aBh.g_aAm(),this.g_aBM.rolloffFactor=this.g_aBh.g_aAn()),this.g_aBL.disconnect(),this.g_aBL.connect(this.g_aBM),this.g_aBM.connect(this.g_azX())):(this.g_aBM.disconnect(),this.g_aBL.disconnect(),this.g_aBL.connect(this.g_azX())))}g_aAI(a,n,t,i,e,o){this.g_aBN&&(this.g_aAN(a,n,t),this.g_aBM.coneInnerAngle=_(i),this.g_aBM.coneOuterAngle=_(e),this.g_aBM.coneOuterGain=o)}g_aAN(e,a,g){this.g_aBN&&(this.g_aBM.setPosition(e,a,0),this.g_aBM.setOrientation(Math.cos(g),Math.sin(g),0))}g_aAJ(e){this.g_aBQ=e}g_CJ(){return this.g_aBQ}g_aBW(){}g_aAd(e){const a=this.g_aBM||this.g_aBL;a.disconnect(),a.connect(e)}g_aAE(){return{tag:this.g_aBK,duration:this.g__F(),volume:this.g_ank,isPlaying:this.g_IX(),playbackTime:this.g_aBT(),playbackRate:this.g_aBV(),uid:this.g_aBQ,bufferOriginalUrl:this.g_aBt(),bufferUrl:"",bufferType:this.g_aBu(),isMusic:this.g_aAs(),isLooping:this.g_SU(),isMuted:this.g_anz(),resumePosition:this.g_aBW(),pan:this.g_aBX()}}g_aBg(e){this.g_Jq(e.playbackRate),this.g_anD(e.isMuted)}g_aBX(){if(!this.g_aBM)return null;const e=this.g_aBM;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_aBQ}}g_aBf(e){if(!e)return void this.g_aAH(!1);this.g_aAH(!0);const a=this.g_aBM;a.setPosition(...a.pos),a.setOrientation(...a.orient),a.coneInnerAngle=a.cia,a.coneOuterAngle=a.coa,a.coneOuterGain=a.cog,this.g_aBQ=a.uid}}}"use strict",self.g_aBo=class extends g_aBJ{constructor(e,a,g){super(e,a,g),this.g_vs.g_aBD().connect(this.g_aBL),this.g_vs.onended=()=>this.g_aBY()}g_eN(){this.g_Jk(),this.g_vs.g_aBD().disconnect(),super.g_eN()}g_aBC(){return this.g_vs.g_aBC()}g_aBY(){this.g_OL=!0,this.g_aBQ=-1,this.g_aBh.g_aAG("ended",this.g_aBK)}g_any(){return this.g_aBC().ended}g_aAx(){return!!this.g_OL||this.g_any()}g_aBT(e){let a=this.g_aBC().currentTime;return e&&(a*=this.g_H$),this.g_UE||(a=Math.min(a,this.g__F())),a}g_Jt(e,a,g){const _=this.g_aBC();if(1!==_.playbackRate&&(_.playbackRate=1),_.loop!==e&&(_.loop=e),this.g_anE(a),_.muted&&(_.muted=!1),_.currentTime!==g)try{_.currentTime=g}catch(e){console.warn(`[Construct 3] Exception seeking audio '${this.g_vs.g_aAu()}' to position '${g}': `,e)}this.g_aBh.g_ayf(_),this.g_OL=!1,this.g_anh=!1,this.g_UE=e,this.g_H$=1}g_Jk(){const e=this.g_aBC();e.paused||e.pause(),this.g_aBh.g_ayg(e),this.g_OL=!0,this.g_anh=!1,this.g_aBQ=-1}g_anF(){if(!(this.g_anh||this.g_OL||this.g_any())){const e=this.g_aBC();e.paused||e.pause(),this.g_aBh.g_ayg(e),this.g_anh=!0}}g_Js(){!this.g_anh||this.g_OL||this.g_any()||(this.g_aBh.g_ayf(this.g_aBC()),this.g_anh=!1)}g_aAL(){this.g_aBC().muted=this.g_anj||this.g_asR()}g_anC(e){e=!!e,this.g_UE===e||(this.g_UE=e,this.g_aBC().loop=e)}g_aAM(){let e=this.g_H$;this.g_aBP&&(e*=this.g_aBh.g_LA());try{this.g_aBC().playbackRate=e}catch(a){console.warn(`[Construct 3] Unable to set playback rate '${e}':`,a)}}g_atc(e){if(!(this.g_OL||this.g_any()))try{this.g_aBC().currentTime=e}catch(a){console.warn(`[Construct 3] Error seeking audio to '${e}': `,a)}}g_aBW(){return this.g_aBT()}g_ahO(e){e?this.g_IX()?(this.g_aBC().pause(),this.g_aBO=!0):this.g_aBO=!1:this.g_aBO&&(this.g_aBh.g_ayf(this.g_aBC()),this.g_aBO=!1)}},"use strict",self.g_aBp=class extends g_aBJ{constructor(e,a,g){super(e,a,g),this.g_aBZ=null,this.g_aB_=e=>this.g_aBY(e),this.g_aB$=!0,this.g_aCa=null,this.g_agx=0,this.g_aCb=0,this.g_aCc=1}g_eN(){this.g_Jk(),this.g_aCd(),this.g_aB_=null,super.g_eN()}g_aCd(){this.g_aBZ&&this.g_aBZ.disconnect(),this.g_aBZ=null,this.g_aCa=null}g_aBY(e){this.g_anh||this.g_aBO||e.target!==this.g_aCa||(this.g_aB$=!0,this.g_OL=!0,this.g_aBQ=-1,this.g_aCd(),this.g_aBh.g_aAG("ended",this.g_aBK))}g_any(){return!(!this.g_OL&&this.g_aBZ&&this.g_aBZ.loop)&&!this.g_anh&&this.g_aB$}g_aAx(){return!this.g_aBZ||this.g_OL||this.g_any()}g_aBT(e){let a=0;return a=this.g_anh?this.g_aCb:this.g_awr()-this.g_agx,e&&(a*=this.g_H$),this.g_UE||(a=Math.min(a,this.g__F())),a}g_Jt(e,a,g,_){this.g_aCc=1,this.g_anE(a),this.g_aCd(),this.g_aBZ=this.g_azW().createBufferSource(),this.g_aBZ.buffer=this.g_vs.g_aAR(),this.g_aBZ.connect(this.g_aBL),this.g_aCa=this.g_aBZ,this.g_aBZ.onended=this.g_aB_,this.g_aBZ.loop=e,this.g_aBZ.start(_,g),this.g_aB$=!1,this.g_OL=!1,this.g_anh=!1,this.g_UE=e,this.g_H$=1,this.g_agx=this.g_awr()-g}g_Jk(){this.g_aBZ&&this.g_aBZ.stop(0),this.g_OL=!0,this.g_anh=!1,this.g_aBQ=-1}g_anF(){this.g_anh||this.g_OL||this.g_any()||(this.g_aCb=this.g_aBT(!0),this.g_UE&&(this.g_aCb%=this.g__F()),this.g_anh=!0,this.g_aBZ.stop(0))}g_Js(){!this.g_anh||this.g_OL||this.g_any()||(this.g_aCd(),this.g_aBZ=this.g_azW().createBufferSource(),this.g_aBZ.buffer=this.g_vs.g_aAR(),this.g_aBZ.connect(this.g_aBL),this.g_aCa=this.g_aBZ,this.g_aBZ.onended=this.g_aB_,this.g_aBZ.loop=this.g_UE,this.g_aAK(),this.g_aAM(),this.g_agx=this.g_awr()-this.g_aCb/(this.g_H$||.001),this.g_aBZ.start(0,this.g_aCb),this.g_anh=!1)}g_aBU(){return super.g_aBU()*this.g_aCc}g_aAL(){this.g_aCc=this.g_anj||this.g_asR()?0:1,this.g_aAK()}g_anC(e){e=!!e,this.g_UE===e||(this.g_UE=e,this.g_aBZ&&(this.g_aBZ.loop=e))}g_aAM(){let e=this.g_H$;this.g_aBP&&(e*=this.g_aBh.g_LA()),this.g_aBZ&&(this.g_aBZ.playbackRate.value=e)}g_atc(e){this.g_OL||this.g_any()||(this.g_anh?this.g_aCb=e:(this.g_anF(),this.g_aCb=e,this.g_Js()))}g_aBW(){return this.g_aCb}g_ahO(e){e?this.g_IX()?(this.g_aBO=!0,this.g_aCb=this.g_aBT(!0),this.g_UE&&(this.g_aCb%=this.g__F()),this.g_aBZ.stop(0)):this.g_aBO=!1:this.g_aBO&&(this.g_aCd(),this.g_aBZ=this.g_azW().createBufferSource(),this.g_aBZ.buffer=this.g_vs.g_aAR(),this.g_aBZ.connect(this.g_aBL),this.g_aCa=this.g_aBZ,this.g_aBZ.onended=this.g_aB_,this.g_aBZ.loop=this.g_UE,this.g_aAK(),this.g_aAM(),this.g_agx=this.g_awr()-this.g_aCb/(this.g_H$||.001),this.g_aBZ.start(0,this.g_aCb),this.g_aBO=!1)}g_aBg(e){super.g_aBg(e),this.g_aCb=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 n(e){return 20*(Math.log(e)/2.302585092994046)}function t(e){return n(Math.max(Math.min(e,1),0))}function i(e,a){return 1-Math.exp(-a*e)}class a{constructor(e){this.g_aBh=e,this.g_azd=e.g_azW(),this.g_BU=-1,this.g_aBK="",this.g_kA="",this.g_aCe=null}g_eN(){this.g_azd=null}g_acq(e){this.g_BU=e}g_Dl(){return this.g_BU}g_az$(e){this.g_aBK=e}g_aAt(){return this.g_aBK}g_aCf(){return this.g_azd.createGain()}g_azZ(){}g_aAb(){}g_aCg(g,a,_,n){if(g.cancelScheduledValues(0),0===n)return void(g.value=a);const t=this.g_azd.currentTime;n+=t,0===_?g.setValueAtTime(a,n):1===_?(g.setValueAtTime(g.value,t),g.linearRampToValueAtTime(a,n)):2===_?(g.setValueAtTime(g.value,t),g.exponentialRampToValueAtTime(a,n)):void 0}g_aAE(){return{type:this.g_kA,tag:this.g_aBK,params:this.g_aCe}}}self.g_aAO=class extends a{constructor(_,a,n,t,i,e,o){super(_),this.g_kA="filter",this.g_aCe=[a,n,t,i,e,o],this.g_aCh=this.g_aCf(),this.g_aCi=this.g_aCf(),this.g_aCi.gain.value=o,this.g_aCj=this.g_aCf(),this.g_aCj.gain.value=1-o,this.g_aCk=this.g_azd.createBiquadFilter(),this.g_aCk.type=a,this.g_aCk.frequency.value=n,this.g_aCk.detune.value=t,this.g_aCk.Q.value=i,this.g_aCk.gain.vlaue=e,this.g_aCh.connect(this.g_aCk),this.g_aCh.connect(this.g_aCj),this.g_aCk.connect(this.g_aCi)}g_eN(){this.g_aCh.disconnect(),this.g_aCk.disconnect(),this.g_aCi.disconnect(),this.g_aCj.disconnect(),super.g_eN()}g_aAb(e){this.g_aCi.disconnect(),this.g_aCi.connect(e),this.g_aCj.disconnect(),this.g_aCj.connect(e)}g_azZ(){return this.g_aCh}g_aBa(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aCe[5]=a,this.g_aCg(this.g_aCi.gain,a,g,_),this.g_aCg(this.g_aCj.gain,1-a,g,_)):1===e?(this.g_aCe[1]=a,this.g_aCg(this.g_aCk.frequency,a,g,_)):2===e?(this.g_aCe[2]=a,this.g_aCg(this.g_aCk.detune,a,g,_)):3===e?(this.g_aCe[3]=a,this.g_aCg(this.g_aCk.Q,a,g,_)):4===e?(this.g_aCe[4]=a,this.g_aCg(this.g_aCk.gain,a,g,_)):void 0}},self.g_aAP=class extends a{constructor(e,a,g,_){super(e),this.g_kA="delay",this.g_aCe=[a,g,_],this.g_aCh=this.g_aCf(),this.g_aCi=this.g_aCf(),this.g_aCi.gain.value=_,this.g_aCj=this.g_aCf(),this.g_aCj.gain.value=1-_,this.g_aCl=this.g_aCf(),this.g_aCm=this.g_azd.createDelay(a),this.g_aCm.delayTime.value=a,this.g_aCn=this.g_aCf(),this.g_aCn.gain.value=g,this.g_aCh.connect(this.g_aCl),this.g_aCh.connect(this.g_aCj),this.g_aCl.connect(this.g_aCi),this.g_aCl.connect(this.g_aCm),this.g_aCm.connect(this.g_aCn),this.g_aCn.connect(this.g_aCl)}g_eN(){this.g_aCh.disconnect(),this.g_aCi.disconnect(),this.g_aCj.disconnect(),this.g_aCl.disconnect(),this.g_aCm.disconnect(),this.g_aCn.disconnect(),super.g_eN()}g_aAb(e){this.g_aCi.disconnect(),this.g_aCi.connect(e),this.g_aCj.disconnect(),this.g_aCj.connect(e)}g_azZ(){return this.g_aCh}g_aBa(g,a,n,t){0===g?(a=Math.max(Math.min(a/100,1),0),this.g_aCe[2]=a,this.g_aCg(this.g_aCi.gain,a,n,t),this.g_aCg(this.g_aCj.gain,1-a,n,t)):4===g?(this.g_aCe[1]=_(a),this.g_aCg(this.g_aCn.gain,_(a),n,t)):5===g?(this.g_aCe[0]=a,this.g_aCg(this.g_aCm.delayTime,a,n,t)):void 0}},self.g_aAQ=class extends a{constructor(e,a,g,_){super(e),this.g_kA="convolution",this.g_aCe=[g,_],this.g_aCo="",this.g_aCp="",this.g_aCq="",this.g_aCh=this.g_aCf(),this.g_aCi=this.g_aCf(),this.g_aCi.gain.value=_,this.g_aCj=this.g_aCf(),this.g_aCj.gain.value=1-_,this.g_aCr=this.g_azd.createConvolver(),this.g_aCr.normalize=g,this.g_aCr.buffer=a,this.g_aCh.connect(this.g_aCr),this.g_aCh.connect(this.g_aCj),this.g_aCr.connect(this.g_aCi)}g_eN(){this.g_aCh.disconnect(),this.g_aCr.disconnect(),this.g_aCi.disconnect(),this.g_aCj.disconnect(),super.g_eN()}g_aAb(e){this.g_aCi.disconnect(),this.g_aCi.connect(e),this.g_aCj.disconnect(),this.g_aCj.connect(e)}g_azZ(){return this.g_aCh}g_aBa(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aCe[1]=a,this.g_aCg(this.g_aCi.gain,a,g,_),this.g_aCg(this.g_aCj.gain,1-a,g,_)):void 0}g_aAS(e,a,g){this.g_aCo=e,this.g_aCp=a,this.g_aCq=g}g_aAE(){const e=super.g_aAE();return e.bufferOriginalUrl=this.g_aCo,e.bufferUrl="",e.bufferType=this.g_aCq,e}},self.g_aAT=class extends a{constructor(g,a,_,n,t,e){super(g),this.g_kA="flanger",this.g_aCe=[a,_,n,t,e],this.g_aCh=this.g_aCf(),this.g_aCj=this.g_aCf(),this.g_aCj.gain.value=1-e/2,this.g_aCi=this.g_aCf(),this.g_aCi.gain.value=e/2,this.g_aCs=this.g_aCf(),this.g_aCs.gain.value=t,this.g_aCm=this.g_azd.createDelay(a+_),this.g_aCm.delayTime.value=a,this.g_aCt=this.g_azd.createOscillator(),this.g_aCt.frequency.value=n,this.g_aCu=this.g_aCf(),this.g_aCu.gain.value=_,this.g_aCh.connect(this.g_aCm),this.g_aCh.connect(this.g_aCj),this.g_aCm.connect(this.g_aCi),this.g_aCm.connect(this.g_aCs),this.g_aCs.connect(this.g_aCm),this.g_aCt.connect(this.g_aCu),this.g_aCu.connect(this.g_aCm.delayTime),this.g_aCt.start(0)}g_eN(){this.g_aCt.stop(0),this.g_aCh.disconnect(),this.g_aCm.disconnect(),this.g_aCt.disconnect(),this.g_aCu.disconnect(),this.g_aCj.disconnect(),this.g_aCi.disconnect(),this.g_aCs.disconnect(),super.g_eN()}g_aAb(e){this.g_aCi.disconnect(),this.g_aCi.connect(e),this.g_aCj.disconnect(),this.g_aCj.connect(e)}g_azZ(){return this.g_aCh}g_aBa(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aCe[4]=a,this.g_aCg(this.g_aCi.gain,a/2,g,_),this.g_aCg(this.g_aCj.gain,1-a/2,g,_)):6===e?(this.g_aCe[1]=a/1e3,this.g_aCg(this.g_aCu.gain,a/1e3,g,_)):7===e?(this.g_aCe[2]=a,this.g_aCg(this.g_aCt.frequency,a,g,_)):8===e?(this.g_aCe[3]=a/100,this.g_aCg(this.g_aCs.gain,a/100,g,_)):void 0}},self.g_aAU=class extends a{constructor(_,a,n,t,i,e,o){super(_),this.g_kA="phaser",this.g_aCe=[a,n,t,i,e,o],this.g_aCh=this.g_aCf(),this.g_aCj=this.g_aCf(),this.g_aCj.gain.value=1-o/2,this.g_aCi=this.g_aCf(),this.g_aCi.gain.value=o/2,this.g_aCk=this.g_azd.createBiquadFilter(),this.g_aCk.type="allpass",this.g_aCk.frequency.value=a,this.g_aCk.detune.value=n,this.g_aCk.Q.value=t,this.g_aCt=this.g_azd.createOscillator(),this.g_aCt.frequency.value=e,this.g_aCu=this.g_aCf(),this.g_aCu.gain.value=i,this.g_aCh.connect(this.g_aCk),this.g_aCh.connect(this.g_aCj),this.g_aCk.connect(this.g_aCi),this.g_aCt.connect(this.g_aCu),this.g_aCu.connect(this.g_aCk.frequency),this.g_aCt.start(0)}g_eN(){this.g_aCt.stop(0),this.g_aCh.disconnect(),this.g_aCk.disconnect(),this.g_aCt.disconnect(),this.g_aCu.disconnect(),this.g_aCj.disconnect(),this.g_aCi.disconnect(),super.g_eN()}g_aAb(e){this.g_aCi.disconnect(),this.g_aCi.connect(e),this.g_aCj.disconnect(),this.g_aCj.connect(e)}g_azZ(){return this.g_aCh}g_aBa(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aCe[5]=a,this.g_aCg(this.g_aCi.gain,a/2,g,_),this.g_aCg(this.g_aCj.gain,1-a/2,g,_)):1===e?(this.g_aCe[0]=a,this.g_aCg(this.g_aCk.frequency,a,g,_)):2===e?(this.g_aCe[1]=a,this.g_aCg(this.g_aCk.detune,a,g,_)):3===e?(this.g_aCe[2]=a,this.g_aCg(this.g_aCk.Q,a,g,_)):6===e?(this.g_aCe[3]=a,this.g_aCg(this.g_aCu.gain,a,g,_)):7===e?(this.g_aCe[4]=a,this.g_aCg(this.g_aCt.frequency,a,g,_)):void 0}},self.g_aAV=class extends a{constructor(e,a){super(e),this.g_kA="gain",this.g_aCe=[a],this.g_aCv=this.g_aCf(),this.g_aCv.gain.value=a}g_eN(){this.g_aCv.disconnect(),super.g_eN()}g_aAb(e){this.g_aCv.disconnect(),this.g_aCv.connect(e)}g_azZ(){return this.g_aCv}g_aBa(g,a,n,t){4===g?(this.g_aCe[0]=_(a),this.g_aCg(this.g_aCv.gain,_(a),n,t)):void 0}},self.g_aAW=class extends a{constructor(e,a,g){super(e),this.g_kA="tremolo",this.g_aCe=[a,g],this.g_aCv=this.g_aCf(),this.g_aCv.gain.value=1-g/2,this.g_aCt=this.g_azd.createOscillator(),this.g_aCt.frequency.value=a,this.g_aCu=this.g_aCf(),this.g_aCu.gain.value=g/2,this.g_aCt.connect(this.g_aCu),this.g_aCu.connect(this.g_aCv.gain),this.g_aCt.start(0)}g_eN(){this.g_aCt.stop(0),this.g_aCt.disconnect(),this.g_aCu.disconnect(),this.g_aCv.disconnect(),super.g_eN()}g_aAb(e){this.g_aCv.disconnect(),this.g_aCv.connect(e)}g_azZ(){return this.g_aCv}g_aBa(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aCe[1]=a,this.g_aCg(this.g_aCv.gain.value,1-a/2,g,_),this.g_aCg(this.g_aCu.gain.value,a/2,g,_)):7===e?(this.g_aCe[0]=a,this.g_aCg(this.g_aCt.frequency,a,g,_)):void 0}},self.g_aAX=class extends a{constructor(e,a,g){super(e),this.g_kA="ringmod",this.g_aCe=[a,g],this.g_aCh=this.g_aCf(),this.g_aCi=this.g_aCf(),this.g_aCi.gain.value=g,this.g_aCj=this.g_aCf(),this.g_aCj.gain.value=1-g,this.g_aCw=this.g_aCf(),this.g_aCw.gain.value=0,this.g_aCt=this.g_azd.createOscillator(),this.g_aCt.frequency.value=a,this.g_aCt.connect(this.g_aCw.gain),this.g_aCt.start(0),this.g_aCh.connect(this.g_aCw),this.g_aCh.connect(this.g_aCj),this.g_aCw.connect(this.g_aCi)}g_eN(){this.g_aCt.stop(0),this.g_aCt.disconnect(),this.g_aCw.disconnect(),this.g_aCh.disconnect(),this.g_aCi.disconnect(),this.g_aCj.disconnect(),super.g_eN()}g_aAb(e){this.g_aCi.disconnect(),this.g_aCi.connect(e),this.g_aCj.disconnect(),this.g_aCj.connect(e)}g_azZ(){return this.g_aCh}g_aBa(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aCe[1]=a,this.g_aCg(this.g_aCi.gain,a,g,_),this.g_aCg(this.g_aCj.gain,1-a,g,_)):7===e?(this.g_aCe[0]=a,this.g_aCg(this.g_aCt.frequency,a,g,_)):void 0}},self.g_aAY=class extends a{constructor(g,a,_,n,t,e){super(g),this.g_kA="distortion",this.g_aCe=[a,_,n,t,e],this.g_aCh=this.g_aCf(),this.g_aCx=this.g_aCf(),this.g_aCy=this.g_aCf(),this.g_aCz(n,t),this.g_aCi=this.g_aCf(),this.g_aCi.gain.value=e,this.g_aCj=this.g_aCf(),this.g_aCj.gain.value=1-e,this.g_aCA=this.g_azd.createWaveShaper(),this.g_aCB=new Float32Array(65536),this.g_aCC(a,_),this.g_aCA.curve=this.g_aCB,this.g_aCh.connect(this.g_aCx),this.g_aCh.connect(this.g_aCj),this.g_aCx.connect(this.g_aCA),this.g_aCA.connect(this.g_aCy),this.g_aCy.connect(this.g_aCi)}g_eN(){this.g_aCh.disconnect(),this.g_aCx.disconnect(),this.g_aCA.disconnect(),this.g_aCy.disconnect(),this.g_aCi.disconnect(),this.g_aCj.disconnect(),super.g_eN()}g_aCz(e,g){.01>e&&(e=.01),this.g_aCx.gain.value=e,this.g_aCy.gain.value=Math.pow(1/e,.6)*g}g_aCC(e,a){for(let g,_=0;32768>_;++_)g=_/32768,g=this.g_aCD(g,e,a),this.g_aCB[32768+_]=g,this.g_aCB[32768-_-1]=-g}g_aCD(e,a,_){const n=1.05*_*a-a,t=0>e?-1:1,o=0>e?-e:e;let g=o<a?o:a+n*i(o-a,1/n);return g*=t,g}g_aAb(e){this.g_aCi.disconnect(),this.g_aCi.connect(e),this.g_aCj.disconnect(),this.g_aCj.connect(e)}g_azZ(){return this.g_aCh}g_aBa(e,a,g,_){0===e?(a=Math.max(Math.min(a/100,1),0),this.g_aCe[4]=a,this.g_aCg(this.g_aCi.gain,a,g,_),this.g_aCg(this.g_aCj.gain,1-a,g,_)):void 0}},self.g_aAZ=class extends a{constructor(g,a,_,n,t,e){super(g),this.g_kA="compressor",this.g_aCe=[a,_,n,t,e],this.g_aCv=this.g_azd.createDynamicsCompressor(),this.g_aCv.threshold.value=a,this.g_aCv.knee.value=_,this.g_aCv.ratio.value=n,this.g_aCv.attack.value=t,this.g_aCv.release.value=e}g_eN(){this.g_aCv.disconnect(),super.g_eN()}g_aAb(e){this.g_aCv.disconnect(),this.g_aCv.connect(e)}g_azZ(){return this.g_aCv}g_aBa(){}},self.g_aA_=class extends a{constructor(e,a,g){super(e),this.g_kA="analyser",this.g_aCe=[a,g],this.g_aCv=this.g_azd.createAnalyser(),this.g_aCv.fftSize=a,this.g_aCv.smoothingTimeConstant=g,this.g_aCE=new Float32Array(this.g_aCv.frequencyBinCount),this.g_aCF=new Uint8Array(a),this.g_aCG=0,this.g_aCH=0,this.g_aBh.g_aBb(this)}g_eN(){this.g_aBh.g_aBc(this),this.g_aCv.disconnect(),super.g_eN()}g_Jv(){this.g_aCv.getFloatFrequencyData(this.g_aCE),this.g_aCv.getByteTimeDomainData(this.g_aCF);const e=this.g_aCv.fftSize;this.g_aCG=0;let a=0;for(let g,_=0;_<e;++_)g=(this.g_aCF[_]-128)/128,0>g&&(g=-g),this.g_aCG<g&&(this.g_aCG=g),a+=g*g;this.g_aCG=t(this.g_aCG),this.g_aCH=t(Math.sqrt(a/e))}g_aAb(e){this.g_aCv.disconnect(),this.g_aCv.connect(e)}g_azZ(){return this.g_aCv}g_aBa(){}g_aAF(){return{tag:this.g_aAt(),index:this.g_Dl(),peak:this.g_aCG,rms:this.g_aCH,binCount:this.g_aCv.frequencyBinCount,freqBins:this.g_aCE}}}}