var key,Module=void 0!==Module?Module:{},moduleOverrides={};for(key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var read_,readAsync,readBinary,setWindowTitle,arguments_=[],thisProgram="./this.program",quit_=function(e,n){throw n},ENVIRONMENT_IS_WEB=!0,ENVIRONMENT_IS_WORKER=!1,scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:"undefined"!=typeof document&&document.currentScript&&(scriptDirectory=document.currentScript.src),scriptDirectory=0!==scriptDirectory.indexOf("blob:")?scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1):"",read_=function(e){var n=new XMLHttpRequest;return n.open("GET",e,!1),n.send(null),n.responseText},ENVIRONMENT_IS_WORKER&&(readBinary=function(e){var n=new XMLHttpRequest;return n.open("GET",e,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)}),readAsync=function(e,n,t){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?n(r.response):t()},r.onerror=t,r.send(null)},setWindowTitle=function(e){document.title=e});var wasmBinary,out=Module.print||console.log.bind(console),err=Module.printErr||console.warn.bind(console);for(key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit),Module.wasmBinary&&(wasmBinary=Module.wasmBinary);var wasmMemory,noExitRuntime=Module.noExitRuntime||!0;"object"!=typeof WebAssembly&&abort("no native wasm support detected");var EXITSTATUS,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64,ABORT=!1;function updateGlobalBufferAndViews(e){buffer=e,Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}var wasmTable,INITIAL_MEMORY=Module.INITIAL_MEMORY||734003200,__ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=!0}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}__ATINIT__.push({func:function(){___wasm_call_ctors()}});var runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var n=dependenciesFulfilled;dependenciesFulfilled=null,n()}}function abort(e){throw Module.onAbort&&Module.onAbort(e),err(e+=""),ABORT=!0,EXITSTATUS=1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}function hasPrefix(e,n){return String.prototype.startsWith?e.startsWith(n):0===e.indexOf(n)}Module.preloadedImages={},Module.preloadedAudios={};var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(e){return hasPrefix(e,dataURIPrefix)}var wasmBinaryFile="./c120-23.wasm";function getBinary(e){try{if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}catch(e){abort(e)}}function getBinaryPromise(){return wasmBinary||!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER||"function"!=typeof fetch?Promise.resolve().then((function(){return getBinary(wasmBinaryFile)})):fetch(wasmBinaryFile,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";return e.arrayBuffer()})).catch((function(){return getBinary(wasmBinaryFile)}))}function createWasm(){var e={a:asmLibraryArg};function n(e,n){var t=e.exports;Module.asm=t,updateGlobalBufferAndViews((wasmMemory=Module.asm.b).buffer),wasmTable=Module.asm.e,removeRunDependency("wasm-instantiate")}function t(e){n(e.instance)}function r(n){return getBinaryPromise().then((function(n){return WebAssembly.instantiate(n,e)})).then(n,(function(e){err("failed to asynchronously prepare wasm: "+e),abort(e)}))}if(addRunDependency("wasm-instantiate"),Module.instantiateWasm)try{return Module.instantiateWasm(e,n)}catch(e){return err("Module.instantiateWasm callback failed with error: "+e),!1}return wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||isDataURI(wasmBinaryFile)||"function"!=typeof fetch?r(t):fetch(wasmBinaryFile,{credentials:"same-origin"}).then((function(n){return WebAssembly.instantiateStreaming(n,e).then(t,(function(e){return err("wasm streaming compile failed: "+e),err("falling back to ArrayBuffer instantiation"),r(t)}))})),{}}function ma(){let e=s();var n,t,r,i,a,o,u,l,d;function s(){t=document.getElementById("iwid").innerHTML,n=document.getElementById("ihig").innerHTML,document.getElementById("wid").innerHTML,document.getElementById("hig").innerHTML;let e=document.getElementById("cp"),c=document.getElementById("flip"),m=document.getElementById("myvideo");var f=document.getElementById("imag").getContext("2d",{colorType:'uint32',
precision:'highp',
preferLowPowerToHighPerformance:!1,
logarithmicDepthBuffer:!0,
// colorSpace:'display-p3',
alpha:!0,
depth:!0,
stencil:!0,
imageSmoothingEnabled:!0,
preserveDrawingBuffer:!1,
premultipliedAlpha:!1,
desynchronized:!1,
lowLatency:!0,
powerPreference:'high-performance',
antialias:!0,
willReadFrequently:!0,
xrCompatible:!1,});f.drawImage(m,0,0,t,n);var y,p=f.getImageData(0,0,t,n),M=f.createImageData(t,n),_=M.data,R=p.data;for(y=0;y<t*n*4;y+=4){var E=.2126*R[y]+.7152*R[y+1]+.0722*R[y+2];Math.floor((R[y]+R[y+1]+R[y+2])/6),Math.floor((R[y]+R[y+1]+R[y+2])/3);E>126?E>209?(_[y]=255,_[y+1]=128,_[y+2]=0,_[y+3]=255):E>193?(_[y]=255,_[y+1]=0,_[y+2]=0,_[y+3]=128):E>177?(_[y]=0,_[y+1]=255,_[y+2]=255,_[y+3]=255):E>161?(_[y]=0,_[y+1]=0,_[y+2]=255,_[y+3]=128):E>145?(_[y]=0,_[y+1]=255,_[y+2]=0,_[y+3]=255):E>128&&(_[y]=255,_[y+1]=255,_[y+2]=0,_[y+3]=128):(_[y]=110,_[y+1]=110,_[y+2]=110,_[y+3]=0)}f.putImageData(M,0,0),i=document.getElementById("rra"),r=document.getElementById("mainr"),a=document.getElementById("rrb"),o=document.getElementById("rrc"),document.getElementById("rrab"),document.getElementById("rrbb"),document.getElementById("rrcb"),rate=r.innerHTML,u=0,l=0,d=0;document.getElementById("temptime").innerHTML;let A=!1;return function n(){var t;A||(u-o.innerHTML<0?u=u+360-o.innerHTML:u-=o.innerHTML,t=u,e.setAttribute("style","transform: rotate("+t+"deg);"),l-a.innerHTML<0?l=l+360-a.innerHTML:l-=a.innerHTML,setTimeout((function(){var n;c.setAttribute("style","transform: scaleX(-1);"),e.setAttribute("style","transform: scaleY(-1);"),n=l,e.setAttribute("style","transform:rotate("+n+"deg);")}),rate),d+i.innerHTML>360?d=d+i.innerHTML-360:d+=i.innerHTML,setTimeout((function(){var n;c.setAttribute("style","transform: scaleX(1);"),e.setAttribute("style","transform: scaleY(1);"),n=d,e.setAttribute("style","transform: rotate("+n+"deg);")}),rate),setTimeout((function(){n()}),rate))}(),document.getElementById("di").onclick=function(){A=!0,s()},()=>{A=!0}}e&&e(),e=s()}function callRuntimeCallbacks(e){for(;e.length>0;){var n=e.shift();if("function"!=typeof n){var t=n.func;"number"==typeof t?void 0===n.arg?wasmTable.get(t)():wasmTable.get(t)(n.arg):t(void 0===n.arg?null:n.arg)}else n(Module)}}isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile));var calledRun,asmLibraryArg={a:ma},asm=createWasm(),___wasm_call_ctors=Module.___wasm_call_ctors=function(){return(___wasm_call_ctors=Module.___wasm_call_ctors=Module.asm.c).apply(null,arguments)},_main=Module._main=function(){return(_main=Module._main=Module.asm.d).apply(null,arguments)};function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}var calledMain=!1;function callMain(e){var n=Module._main;try{exit(n(0,0),!0)}catch(e){if(e instanceof ExitStatus)return;if("unwind"==e)return void(noExitRuntime=!0);var t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),err("exception thrown: "+t),quit_(1,e)}finally{calledMain=!0}}function run(e){function n(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT||(initRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),shouldRunNow&&callMain(e),postRun()))}e=e||arguments_,runDependencies>0||(preRun(),runDependencies>0||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),n()}),1)):n()))}function exit(e,n){n&&noExitRuntime&&0===e||(noExitRuntime||(EXITSTATUS=e,exitRuntime(),Module.onExit&&Module.onExit(e),ABORT=!0),quit_(e,new ExitStatus(e)))}if(dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)},Module.run=run,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();
