jassub 1.2.4 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- var Module=typeof Module!=="undefined"?Module:{};if(!String.prototype.startsWith){String.prototype.startsWith=function(search,pos){if(pos===undefined){pos=0}return this.substring(pos,search.length)===search}}if(!String.prototype.includes){String.prototype.includes=function(search,pos){return this.indexOf(search,pos)!==-1}}if(!ArrayBuffer.isView){const typedArrays=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];ArrayBuffer.isView=function(obj){return obj&&obj.constructor&&typedArrays.indexOf(obj.constructor)!==-1}}if(!Uint8Array.prototype.slice){Uint8Array.prototype.slice=function(begin,end){return new Uint8Array(this.subarray(begin,end))}}Date.now=Date.now||function(){return(new Date).getTime()};function makeCustomConsole(){const console=function(){function postConsoleMessage(command,args){postMessage({target:"console",command:command,content:JSON.stringify(Array.prototype.slice.call(args))})}return{log:function(){postConsoleMessage("log",arguments)},debug:function(){postConsoleMessage("debug",arguments)},info:function(){postConsoleMessage("info",arguments)},warn:function(){postConsoleMessage("warn",arguments)},error:function(){postConsoleMessage("error",arguments)}}}();return console}if(typeof console==="undefined"){console=makeCustomConsole();console.log("overridden console")}var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=true;var scriptDirectory="";function locateFile(path){return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;var noExitRuntime=true;if(typeof WebAssembly!=="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx<endPtr){var u0=heap[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heap[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heap[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heap[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}function allocateUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8Array(str,HEAP8,ret,size);return ret}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){callRuntimeCallbacks(__ATPOSTRUN__)}function addOnInit(cb){__ATINIT__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++}function removeRunDependency(id){runDependencies--;if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(what);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}var wasmBinaryFile;wasmBinaryFile="jassub-worker.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["M"];updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module["asm"]["Fc"];addOnInit(Module["asm"]["N"]);removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync();return{}}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){getWasmTableEntry(func)()}else{getWasmTableEntry(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func}function handleException(e){if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}var _emscripten_get_now;_emscripten_get_now=function(){return performance.now()};var _emscripten_get_now_is_monotonic=true;function setErrNo(value){HEAP32[___errno_location()>>2]=value;return value}function _clock_gettime(clk_id,tp){var now;if(clk_id===0){now=Date.now()}else if((clk_id===1||clk_id===4)&&_emscripten_get_now_is_monotonic){now=_emscripten_get_now()}else{setErrNo(28);return-1}HEAP32[tp>>2]=now/1e3|0;HEAP32[tp+4>>2]=now%1e3*1e3*1e3|0;return 0}function ___clock_gettime(a0,a1){return _clock_gettime(a0,a1)}var SYSCALLS={mappings:{},buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},get64:function(low,high){return low}};function ___syscall_access(path,amode){path=SYSCALLS.getStr(path);return SYSCALLS.doAccess(path,amode)}function ___syscall_chmod(path,mode){}function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;return 0}function ___syscall_fstat64(fd,buf){}function ___syscall_statfs64(path,size,buf){}function ___syscall_fstatfs64(fd,size,buf){var stream=SYSCALLS.getStreamFromFD(fd);return ___syscall_statfs64(0,size,buf)}function ___syscall_getcwd(buf,size){}function ___syscall_getdents64(fd,dirp,count){}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;return 0}function ___syscall_lstat64(path,buf){}function ___syscall_mkdir(path,mode){path=SYSCALLS.getStr(path);return SYSCALLS.doMkdir(path,mode)}function ___syscall_open(path,flags,varargs){SYSCALLS.varargs=varargs}function ___syscall_readlink(path,buf,bufsize){path=SYSCALLS.getStr(path);return SYSCALLS.doReadlink(path,buf,bufsize)}function ___syscall_rename(old_path,new_path){}function ___syscall_rmdir(path){}function ___syscall_stat64(path,buf){}function ___syscall_symlink(target,linkpath){}function ___syscall_unlink(path){}function __emscripten_throw_longjmp(){throw"longjmp"}function _abort(){abort("")}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator==="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(x+"="+env[x])}getEnvStrings.strings=strings}return getEnvStrings.strings}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAP32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAP32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAP32[penviron_buf_size>>2]=bufSize;return 0}function _exit(status){exit(status)}function _fd_close(fd){return 0}function _fd_read(fd,iov,iovcnt,pnum){var stream=SYSCALLS.getStreamFromFD(fd);var num=SYSCALLS.doReadv(stream,iov,iovcnt);HEAP32[pnum>>2]=num;return 0}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){}function _fd_write(fd,iov,iovcnt,pnum){var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAP32[iov>>2];var len=HEAP32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){SYSCALLS.printChar(fd,HEAPU8[ptr+j])}num+=len}HEAP32[pnum>>2]=num;return 0}function _getTempRet0(){return getTempRet0()}function _gettimeofday(ptr){var now=Date.now();HEAP32[ptr>>2]=now/1e3|0;HEAP32[ptr+4>>2]=now%1e3*1e3|0;return 0}function _setTempRet0(val){setTempRet0(val)}function _time(ptr){var ret=Date.now()/1e3|0;if(ptr){HEAP32[ptr>>2]=ret}return ret}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var asmLibraryArg={"a":___assert_fail,"I":___clock_gettime,"n":___syscall_access,"A":___syscall_chmod,"j":___syscall_fcntl64,"C":___syscall_fstat64,"D":___syscall_fstatfs64,"p":___syscall_getcwd,"H":___syscall_getdents64,"F":___syscall_ioctl,"E":___syscall_lstat64,"z":___syscall_mkdir,"i":___syscall_open,"L":___syscall_readlink,"G":___syscall_rename,"K":___syscall_rmdir,"B":___syscall_stat64,"o":___syscall_symlink,"J":___syscall_unlink,"v":__emscripten_throw_longjmp,"l":_abort,"f":_emscripten_get_now,"w":_emscripten_memcpy_big,"h":_emscripten_resize_heap,"x":_environ_get,"y":_environ_sizes_get,"g":_exit,"d":_fd_close,"m":_fd_read,"r":_fd_seek,"k":_fd_write,"e":_getTempRet0,"q":_gettimeofday,"u":invoke_iii,"s":invoke_iiii,"t":invoke_iiiii,"c":_setTempRet0,"b":_time};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["N"]).apply(null,arguments)};var _main=Module["_main"]=function(){return(_main=Module["_main"]=Module["asm"]["O"]).apply(null,arguments)};var _emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=function(){return(_emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=Module["asm"]["P"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Name_0=Module["_emscripten_bind_ASS_Style_get_Name_0"]=function(){return(_emscripten_bind_ASS_Style_get_Name_0=Module["_emscripten_bind_ASS_Style_get_Name_0"]=Module["asm"]["Q"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Name_1=Module["_emscripten_bind_ASS_Style_set_Name_1"]=function(){return(_emscripten_bind_ASS_Style_set_Name_1=Module["_emscripten_bind_ASS_Style_set_Name_1"]=Module["asm"]["R"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_FontName_0=Module["_emscripten_bind_ASS_Style_get_FontName_0"]=function(){return(_emscripten_bind_ASS_Style_get_FontName_0=Module["_emscripten_bind_ASS_Style_get_FontName_0"]=Module["asm"]["S"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_FontName_1=Module["_emscripten_bind_ASS_Style_set_FontName_1"]=function(){return(_emscripten_bind_ASS_Style_set_FontName_1=Module["_emscripten_bind_ASS_Style_set_FontName_1"]=Module["asm"]["T"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_FontSize_0=Module["_emscripten_bind_ASS_Style_get_FontSize_0"]=function(){return(_emscripten_bind_ASS_Style_get_FontSize_0=Module["_emscripten_bind_ASS_Style_get_FontSize_0"]=Module["asm"]["U"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_FontSize_1=Module["_emscripten_bind_ASS_Style_set_FontSize_1"]=function(){return(_emscripten_bind_ASS_Style_set_FontSize_1=Module["_emscripten_bind_ASS_Style_set_FontSize_1"]=Module["asm"]["V"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_PrimaryColour_0=Module["_emscripten_bind_ASS_Style_get_PrimaryColour_0"]=function(){return(_emscripten_bind_ASS_Style_get_PrimaryColour_0=Module["_emscripten_bind_ASS_Style_get_PrimaryColour_0"]=Module["asm"]["W"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_PrimaryColour_1=Module["_emscripten_bind_ASS_Style_set_PrimaryColour_1"]=function(){return(_emscripten_bind_ASS_Style_set_PrimaryColour_1=Module["_emscripten_bind_ASS_Style_set_PrimaryColour_1"]=Module["asm"]["X"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_SecondaryColour_0=Module["_emscripten_bind_ASS_Style_get_SecondaryColour_0"]=function(){return(_emscripten_bind_ASS_Style_get_SecondaryColour_0=Module["_emscripten_bind_ASS_Style_get_SecondaryColour_0"]=Module["asm"]["Y"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_SecondaryColour_1=Module["_emscripten_bind_ASS_Style_set_SecondaryColour_1"]=function(){return(_emscripten_bind_ASS_Style_set_SecondaryColour_1=Module["_emscripten_bind_ASS_Style_set_SecondaryColour_1"]=Module["asm"]["Z"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_OutlineColour_0=Module["_emscripten_bind_ASS_Style_get_OutlineColour_0"]=function(){return(_emscripten_bind_ASS_Style_get_OutlineColour_0=Module["_emscripten_bind_ASS_Style_get_OutlineColour_0"]=Module["asm"]["_"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_OutlineColour_1=Module["_emscripten_bind_ASS_Style_set_OutlineColour_1"]=function(){return(_emscripten_bind_ASS_Style_set_OutlineColour_1=Module["_emscripten_bind_ASS_Style_set_OutlineColour_1"]=Module["asm"]["$"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_BackColour_0=Module["_emscripten_bind_ASS_Style_get_BackColour_0"]=function(){return(_emscripten_bind_ASS_Style_get_BackColour_0=Module["_emscripten_bind_ASS_Style_get_BackColour_0"]=Module["asm"]["aa"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_BackColour_1=Module["_emscripten_bind_ASS_Style_set_BackColour_1"]=function(){return(_emscripten_bind_ASS_Style_set_BackColour_1=Module["_emscripten_bind_ASS_Style_set_BackColour_1"]=Module["asm"]["ba"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Bold_0=Module["_emscripten_bind_ASS_Style_get_Bold_0"]=function(){return(_emscripten_bind_ASS_Style_get_Bold_0=Module["_emscripten_bind_ASS_Style_get_Bold_0"]=Module["asm"]["ca"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Bold_1=Module["_emscripten_bind_ASS_Style_set_Bold_1"]=function(){return(_emscripten_bind_ASS_Style_set_Bold_1=Module["_emscripten_bind_ASS_Style_set_Bold_1"]=Module["asm"]["da"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Italic_0=Module["_emscripten_bind_ASS_Style_get_Italic_0"]=function(){return(_emscripten_bind_ASS_Style_get_Italic_0=Module["_emscripten_bind_ASS_Style_get_Italic_0"]=Module["asm"]["ea"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Italic_1=Module["_emscripten_bind_ASS_Style_set_Italic_1"]=function(){return(_emscripten_bind_ASS_Style_set_Italic_1=Module["_emscripten_bind_ASS_Style_set_Italic_1"]=Module["asm"]["fa"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Underline_0=Module["_emscripten_bind_ASS_Style_get_Underline_0"]=function(){return(_emscripten_bind_ASS_Style_get_Underline_0=Module["_emscripten_bind_ASS_Style_get_Underline_0"]=Module["asm"]["ga"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Underline_1=Module["_emscripten_bind_ASS_Style_set_Underline_1"]=function(){return(_emscripten_bind_ASS_Style_set_Underline_1=Module["_emscripten_bind_ASS_Style_set_Underline_1"]=Module["asm"]["ha"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_StrikeOut_0=Module["_emscripten_bind_ASS_Style_get_StrikeOut_0"]=function(){return(_emscripten_bind_ASS_Style_get_StrikeOut_0=Module["_emscripten_bind_ASS_Style_get_StrikeOut_0"]=Module["asm"]["ia"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_StrikeOut_1=Module["_emscripten_bind_ASS_Style_set_StrikeOut_1"]=function(){return(_emscripten_bind_ASS_Style_set_StrikeOut_1=Module["_emscripten_bind_ASS_Style_set_StrikeOut_1"]=Module["asm"]["ja"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_ScaleX_0=Module["_emscripten_bind_ASS_Style_get_ScaleX_0"]=function(){return(_emscripten_bind_ASS_Style_get_ScaleX_0=Module["_emscripten_bind_ASS_Style_get_ScaleX_0"]=Module["asm"]["ka"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_ScaleX_1=Module["_emscripten_bind_ASS_Style_set_ScaleX_1"]=function(){return(_emscripten_bind_ASS_Style_set_ScaleX_1=Module["_emscripten_bind_ASS_Style_set_ScaleX_1"]=Module["asm"]["la"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_ScaleY_0=Module["_emscripten_bind_ASS_Style_get_ScaleY_0"]=function(){return(_emscripten_bind_ASS_Style_get_ScaleY_0=Module["_emscripten_bind_ASS_Style_get_ScaleY_0"]=Module["asm"]["ma"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_ScaleY_1=Module["_emscripten_bind_ASS_Style_set_ScaleY_1"]=function(){return(_emscripten_bind_ASS_Style_set_ScaleY_1=Module["_emscripten_bind_ASS_Style_set_ScaleY_1"]=Module["asm"]["na"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Spacing_0=Module["_emscripten_bind_ASS_Style_get_Spacing_0"]=function(){return(_emscripten_bind_ASS_Style_get_Spacing_0=Module["_emscripten_bind_ASS_Style_get_Spacing_0"]=Module["asm"]["oa"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Spacing_1=Module["_emscripten_bind_ASS_Style_set_Spacing_1"]=function(){return(_emscripten_bind_ASS_Style_set_Spacing_1=Module["_emscripten_bind_ASS_Style_set_Spacing_1"]=Module["asm"]["pa"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Angle_0=Module["_emscripten_bind_ASS_Style_get_Angle_0"]=function(){return(_emscripten_bind_ASS_Style_get_Angle_0=Module["_emscripten_bind_ASS_Style_get_Angle_0"]=Module["asm"]["qa"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Angle_1=Module["_emscripten_bind_ASS_Style_set_Angle_1"]=function(){return(_emscripten_bind_ASS_Style_set_Angle_1=Module["_emscripten_bind_ASS_Style_set_Angle_1"]=Module["asm"]["ra"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_BorderStyle_0=Module["_emscripten_bind_ASS_Style_get_BorderStyle_0"]=function(){return(_emscripten_bind_ASS_Style_get_BorderStyle_0=Module["_emscripten_bind_ASS_Style_get_BorderStyle_0"]=Module["asm"]["sa"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_BorderStyle_1=Module["_emscripten_bind_ASS_Style_set_BorderStyle_1"]=function(){return(_emscripten_bind_ASS_Style_set_BorderStyle_1=Module["_emscripten_bind_ASS_Style_set_BorderStyle_1"]=Module["asm"]["ta"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Outline_0=Module["_emscripten_bind_ASS_Style_get_Outline_0"]=function(){return(_emscripten_bind_ASS_Style_get_Outline_0=Module["_emscripten_bind_ASS_Style_get_Outline_0"]=Module["asm"]["ua"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Outline_1=Module["_emscripten_bind_ASS_Style_set_Outline_1"]=function(){return(_emscripten_bind_ASS_Style_set_Outline_1=Module["_emscripten_bind_ASS_Style_set_Outline_1"]=Module["asm"]["va"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Shadow_0=Module["_emscripten_bind_ASS_Style_get_Shadow_0"]=function(){return(_emscripten_bind_ASS_Style_get_Shadow_0=Module["_emscripten_bind_ASS_Style_get_Shadow_0"]=Module["asm"]["wa"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Shadow_1=Module["_emscripten_bind_ASS_Style_set_Shadow_1"]=function(){return(_emscripten_bind_ASS_Style_set_Shadow_1=Module["_emscripten_bind_ASS_Style_set_Shadow_1"]=Module["asm"]["xa"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Alignment_0=Module["_emscripten_bind_ASS_Style_get_Alignment_0"]=function(){return(_emscripten_bind_ASS_Style_get_Alignment_0=Module["_emscripten_bind_ASS_Style_get_Alignment_0"]=Module["asm"]["ya"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Alignment_1=Module["_emscripten_bind_ASS_Style_set_Alignment_1"]=function(){return(_emscripten_bind_ASS_Style_set_Alignment_1=Module["_emscripten_bind_ASS_Style_set_Alignment_1"]=Module["asm"]["za"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_MarginL_0=Module["_emscripten_bind_ASS_Style_get_MarginL_0"]=function(){return(_emscripten_bind_ASS_Style_get_MarginL_0=Module["_emscripten_bind_ASS_Style_get_MarginL_0"]=Module["asm"]["Aa"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_MarginL_1=Module["_emscripten_bind_ASS_Style_set_MarginL_1"]=function(){return(_emscripten_bind_ASS_Style_set_MarginL_1=Module["_emscripten_bind_ASS_Style_set_MarginL_1"]=Module["asm"]["Ba"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_MarginR_0=Module["_emscripten_bind_ASS_Style_get_MarginR_0"]=function(){return(_emscripten_bind_ASS_Style_get_MarginR_0=Module["_emscripten_bind_ASS_Style_get_MarginR_0"]=Module["asm"]["Ca"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_MarginR_1=Module["_emscripten_bind_ASS_Style_set_MarginR_1"]=function(){return(_emscripten_bind_ASS_Style_set_MarginR_1=Module["_emscripten_bind_ASS_Style_set_MarginR_1"]=Module["asm"]["Da"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_MarginV_0=Module["_emscripten_bind_ASS_Style_get_MarginV_0"]=function(){return(_emscripten_bind_ASS_Style_get_MarginV_0=Module["_emscripten_bind_ASS_Style_get_MarginV_0"]=Module["asm"]["Ea"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_MarginV_1=Module["_emscripten_bind_ASS_Style_set_MarginV_1"]=function(){return(_emscripten_bind_ASS_Style_set_MarginV_1=Module["_emscripten_bind_ASS_Style_set_MarginV_1"]=Module["asm"]["Fa"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Encoding_0=Module["_emscripten_bind_ASS_Style_get_Encoding_0"]=function(){return(_emscripten_bind_ASS_Style_get_Encoding_0=Module["_emscripten_bind_ASS_Style_get_Encoding_0"]=Module["asm"]["Ga"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Encoding_1=Module["_emscripten_bind_ASS_Style_set_Encoding_1"]=function(){return(_emscripten_bind_ASS_Style_set_Encoding_1=Module["_emscripten_bind_ASS_Style_set_Encoding_1"]=Module["asm"]["Ha"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_treat_fontname_as_pattern_0=Module["_emscripten_bind_ASS_Style_get_treat_fontname_as_pattern_0"]=function(){return(_emscripten_bind_ASS_Style_get_treat_fontname_as_pattern_0=Module["_emscripten_bind_ASS_Style_get_treat_fontname_as_pattern_0"]=Module["asm"]["Ia"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_treat_fontname_as_pattern_1=Module["_emscripten_bind_ASS_Style_set_treat_fontname_as_pattern_1"]=function(){return(_emscripten_bind_ASS_Style_set_treat_fontname_as_pattern_1=Module["_emscripten_bind_ASS_Style_set_treat_fontname_as_pattern_1"]=Module["asm"]["Ja"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Blur_0=Module["_emscripten_bind_ASS_Style_get_Blur_0"]=function(){return(_emscripten_bind_ASS_Style_get_Blur_0=Module["_emscripten_bind_ASS_Style_get_Blur_0"]=Module["asm"]["Ka"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Blur_1=Module["_emscripten_bind_ASS_Style_set_Blur_1"]=function(){return(_emscripten_bind_ASS_Style_set_Blur_1=Module["_emscripten_bind_ASS_Style_set_Blur_1"]=Module["asm"]["La"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_get_Justify_0=Module["_emscripten_bind_ASS_Style_get_Justify_0"]=function(){return(_emscripten_bind_ASS_Style_get_Justify_0=Module["_emscripten_bind_ASS_Style_get_Justify_0"]=Module["asm"]["Ma"]).apply(null,arguments)};var _emscripten_bind_ASS_Style_set_Justify_1=Module["_emscripten_bind_ASS_Style_set_Justify_1"]=function(){return(_emscripten_bind_ASS_Style_set_Justify_1=Module["_emscripten_bind_ASS_Style_set_Justify_1"]=Module["asm"]["Na"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_Start_0=Module["_emscripten_bind_ASS_Event_get_Start_0"]=function(){return(_emscripten_bind_ASS_Event_get_Start_0=Module["_emscripten_bind_ASS_Event_get_Start_0"]=Module["asm"]["Oa"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_Start_1=Module["_emscripten_bind_ASS_Event_set_Start_1"]=function(){return(_emscripten_bind_ASS_Event_set_Start_1=Module["_emscripten_bind_ASS_Event_set_Start_1"]=Module["asm"]["Pa"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_Duration_0=Module["_emscripten_bind_ASS_Event_get_Duration_0"]=function(){return(_emscripten_bind_ASS_Event_get_Duration_0=Module["_emscripten_bind_ASS_Event_get_Duration_0"]=Module["asm"]["Qa"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_Duration_1=Module["_emscripten_bind_ASS_Event_set_Duration_1"]=function(){return(_emscripten_bind_ASS_Event_set_Duration_1=Module["_emscripten_bind_ASS_Event_set_Duration_1"]=Module["asm"]["Ra"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_ReadOrder_0=Module["_emscripten_bind_ASS_Event_get_ReadOrder_0"]=function(){return(_emscripten_bind_ASS_Event_get_ReadOrder_0=Module["_emscripten_bind_ASS_Event_get_ReadOrder_0"]=Module["asm"]["Sa"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_ReadOrder_1=Module["_emscripten_bind_ASS_Event_set_ReadOrder_1"]=function(){return(_emscripten_bind_ASS_Event_set_ReadOrder_1=Module["_emscripten_bind_ASS_Event_set_ReadOrder_1"]=Module["asm"]["Ta"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_Layer_0=Module["_emscripten_bind_ASS_Event_get_Layer_0"]=function(){return(_emscripten_bind_ASS_Event_get_Layer_0=Module["_emscripten_bind_ASS_Event_get_Layer_0"]=Module["asm"]["Ua"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_Layer_1=Module["_emscripten_bind_ASS_Event_set_Layer_1"]=function(){return(_emscripten_bind_ASS_Event_set_Layer_1=Module["_emscripten_bind_ASS_Event_set_Layer_1"]=Module["asm"]["Va"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_Style_0=Module["_emscripten_bind_ASS_Event_get_Style_0"]=function(){return(_emscripten_bind_ASS_Event_get_Style_0=Module["_emscripten_bind_ASS_Event_get_Style_0"]=Module["asm"]["Wa"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_Style_1=Module["_emscripten_bind_ASS_Event_set_Style_1"]=function(){return(_emscripten_bind_ASS_Event_set_Style_1=Module["_emscripten_bind_ASS_Event_set_Style_1"]=Module["asm"]["Xa"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_Name_0=Module["_emscripten_bind_ASS_Event_get_Name_0"]=function(){return(_emscripten_bind_ASS_Event_get_Name_0=Module["_emscripten_bind_ASS_Event_get_Name_0"]=Module["asm"]["Ya"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_Name_1=Module["_emscripten_bind_ASS_Event_set_Name_1"]=function(){return(_emscripten_bind_ASS_Event_set_Name_1=Module["_emscripten_bind_ASS_Event_set_Name_1"]=Module["asm"]["Za"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_MarginL_0=Module["_emscripten_bind_ASS_Event_get_MarginL_0"]=function(){return(_emscripten_bind_ASS_Event_get_MarginL_0=Module["_emscripten_bind_ASS_Event_get_MarginL_0"]=Module["asm"]["_a"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_MarginL_1=Module["_emscripten_bind_ASS_Event_set_MarginL_1"]=function(){return(_emscripten_bind_ASS_Event_set_MarginL_1=Module["_emscripten_bind_ASS_Event_set_MarginL_1"]=Module["asm"]["$a"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_MarginR_0=Module["_emscripten_bind_ASS_Event_get_MarginR_0"]=function(){return(_emscripten_bind_ASS_Event_get_MarginR_0=Module["_emscripten_bind_ASS_Event_get_MarginR_0"]=Module["asm"]["ab"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_MarginR_1=Module["_emscripten_bind_ASS_Event_set_MarginR_1"]=function(){return(_emscripten_bind_ASS_Event_set_MarginR_1=Module["_emscripten_bind_ASS_Event_set_MarginR_1"]=Module["asm"]["bb"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_MarginV_0=Module["_emscripten_bind_ASS_Event_get_MarginV_0"]=function(){return(_emscripten_bind_ASS_Event_get_MarginV_0=Module["_emscripten_bind_ASS_Event_get_MarginV_0"]=Module["asm"]["cb"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_MarginV_1=Module["_emscripten_bind_ASS_Event_set_MarginV_1"]=function(){return(_emscripten_bind_ASS_Event_set_MarginV_1=Module["_emscripten_bind_ASS_Event_set_MarginV_1"]=Module["asm"]["db"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_Effect_0=Module["_emscripten_bind_ASS_Event_get_Effect_0"]=function(){return(_emscripten_bind_ASS_Event_get_Effect_0=Module["_emscripten_bind_ASS_Event_get_Effect_0"]=Module["asm"]["eb"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_Effect_1=Module["_emscripten_bind_ASS_Event_set_Effect_1"]=function(){return(_emscripten_bind_ASS_Event_set_Effect_1=Module["_emscripten_bind_ASS_Event_set_Effect_1"]=Module["asm"]["fb"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_get_Text_0=Module["_emscripten_bind_ASS_Event_get_Text_0"]=function(){return(_emscripten_bind_ASS_Event_get_Text_0=Module["_emscripten_bind_ASS_Event_get_Text_0"]=Module["asm"]["gb"]).apply(null,arguments)};var _emscripten_bind_ASS_Event_set_Text_1=Module["_emscripten_bind_ASS_Event_set_Text_1"]=function(){return(_emscripten_bind_ASS_Event_set_Text_1=Module["_emscripten_bind_ASS_Event_set_Text_1"]=Module["asm"]["hb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_get_changed_0=Module["_emscripten_bind_RenderResult_get_changed_0"]=function(){return(_emscripten_bind_RenderResult_get_changed_0=Module["_emscripten_bind_RenderResult_get_changed_0"]=Module["asm"]["ib"]).apply(null,arguments)};var _emscripten_bind_RenderResult_set_changed_1=Module["_emscripten_bind_RenderResult_set_changed_1"]=function(){return(_emscripten_bind_RenderResult_set_changed_1=Module["_emscripten_bind_RenderResult_set_changed_1"]=Module["asm"]["jb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_get_time_0=Module["_emscripten_bind_RenderResult_get_time_0"]=function(){return(_emscripten_bind_RenderResult_get_time_0=Module["_emscripten_bind_RenderResult_get_time_0"]=Module["asm"]["kb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_set_time_1=Module["_emscripten_bind_RenderResult_set_time_1"]=function(){return(_emscripten_bind_RenderResult_set_time_1=Module["_emscripten_bind_RenderResult_set_time_1"]=Module["asm"]["lb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_get_x_0=Module["_emscripten_bind_RenderResult_get_x_0"]=function(){return(_emscripten_bind_RenderResult_get_x_0=Module["_emscripten_bind_RenderResult_get_x_0"]=Module["asm"]["mb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_set_x_1=Module["_emscripten_bind_RenderResult_set_x_1"]=function(){return(_emscripten_bind_RenderResult_set_x_1=Module["_emscripten_bind_RenderResult_set_x_1"]=Module["asm"]["nb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_get_y_0=Module["_emscripten_bind_RenderResult_get_y_0"]=function(){return(_emscripten_bind_RenderResult_get_y_0=Module["_emscripten_bind_RenderResult_get_y_0"]=Module["asm"]["ob"]).apply(null,arguments)};var _emscripten_bind_RenderResult_set_y_1=Module["_emscripten_bind_RenderResult_set_y_1"]=function(){return(_emscripten_bind_RenderResult_set_y_1=Module["_emscripten_bind_RenderResult_set_y_1"]=Module["asm"]["pb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_get_w_0=Module["_emscripten_bind_RenderResult_get_w_0"]=function(){return(_emscripten_bind_RenderResult_get_w_0=Module["_emscripten_bind_RenderResult_get_w_0"]=Module["asm"]["qb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_set_w_1=Module["_emscripten_bind_RenderResult_set_w_1"]=function(){return(_emscripten_bind_RenderResult_set_w_1=Module["_emscripten_bind_RenderResult_set_w_1"]=Module["asm"]["rb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_get_h_0=Module["_emscripten_bind_RenderResult_get_h_0"]=function(){return(_emscripten_bind_RenderResult_get_h_0=Module["_emscripten_bind_RenderResult_get_h_0"]=Module["asm"]["sb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_set_h_1=Module["_emscripten_bind_RenderResult_set_h_1"]=function(){return(_emscripten_bind_RenderResult_set_h_1=Module["_emscripten_bind_RenderResult_set_h_1"]=Module["asm"]["tb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_get_image_0=Module["_emscripten_bind_RenderResult_get_image_0"]=function(){return(_emscripten_bind_RenderResult_get_image_0=Module["_emscripten_bind_RenderResult_get_image_0"]=Module["asm"]["ub"]).apply(null,arguments)};var _emscripten_bind_RenderResult_set_image_1=Module["_emscripten_bind_RenderResult_set_image_1"]=function(){return(_emscripten_bind_RenderResult_set_image_1=Module["_emscripten_bind_RenderResult_set_image_1"]=Module["asm"]["vb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_get_next_0=Module["_emscripten_bind_RenderResult_get_next_0"]=function(){return(_emscripten_bind_RenderResult_get_next_0=Module["_emscripten_bind_RenderResult_get_next_0"]=Module["asm"]["wb"]).apply(null,arguments)};var _emscripten_bind_RenderResult_set_next_1=Module["_emscripten_bind_RenderResult_set_next_1"]=function(){return(_emscripten_bind_RenderResult_set_next_1=Module["_emscripten_bind_RenderResult_set_next_1"]=Module["asm"]["xb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_n_styles_0=Module["_emscripten_bind_ASS_Track_get_n_styles_0"]=function(){return(_emscripten_bind_ASS_Track_get_n_styles_0=Module["_emscripten_bind_ASS_Track_get_n_styles_0"]=Module["asm"]["yb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_n_styles_1=Module["_emscripten_bind_ASS_Track_set_n_styles_1"]=function(){return(_emscripten_bind_ASS_Track_set_n_styles_1=Module["_emscripten_bind_ASS_Track_set_n_styles_1"]=Module["asm"]["zb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_max_styles_0=Module["_emscripten_bind_ASS_Track_get_max_styles_0"]=function(){return(_emscripten_bind_ASS_Track_get_max_styles_0=Module["_emscripten_bind_ASS_Track_get_max_styles_0"]=Module["asm"]["Ab"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_max_styles_1=Module["_emscripten_bind_ASS_Track_set_max_styles_1"]=function(){return(_emscripten_bind_ASS_Track_set_max_styles_1=Module["_emscripten_bind_ASS_Track_set_max_styles_1"]=Module["asm"]["Bb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_n_events_0=Module["_emscripten_bind_ASS_Track_get_n_events_0"]=function(){return(_emscripten_bind_ASS_Track_get_n_events_0=Module["_emscripten_bind_ASS_Track_get_n_events_0"]=Module["asm"]["Cb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_n_events_1=Module["_emscripten_bind_ASS_Track_set_n_events_1"]=function(){return(_emscripten_bind_ASS_Track_set_n_events_1=Module["_emscripten_bind_ASS_Track_set_n_events_1"]=Module["asm"]["Db"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_max_events_0=Module["_emscripten_bind_ASS_Track_get_max_events_0"]=function(){return(_emscripten_bind_ASS_Track_get_max_events_0=Module["_emscripten_bind_ASS_Track_get_max_events_0"]=Module["asm"]["Eb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_max_events_1=Module["_emscripten_bind_ASS_Track_set_max_events_1"]=function(){return(_emscripten_bind_ASS_Track_set_max_events_1=Module["_emscripten_bind_ASS_Track_set_max_events_1"]=Module["asm"]["Fb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_styles_1=Module["_emscripten_bind_ASS_Track_get_styles_1"]=function(){return(_emscripten_bind_ASS_Track_get_styles_1=Module["_emscripten_bind_ASS_Track_get_styles_1"]=Module["asm"]["Gb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_styles_2=Module["_emscripten_bind_ASS_Track_set_styles_2"]=function(){return(_emscripten_bind_ASS_Track_set_styles_2=Module["_emscripten_bind_ASS_Track_set_styles_2"]=Module["asm"]["Hb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_events_1=Module["_emscripten_bind_ASS_Track_get_events_1"]=function(){return(_emscripten_bind_ASS_Track_get_events_1=Module["_emscripten_bind_ASS_Track_get_events_1"]=Module["asm"]["Ib"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_events_2=Module["_emscripten_bind_ASS_Track_set_events_2"]=function(){return(_emscripten_bind_ASS_Track_set_events_2=Module["_emscripten_bind_ASS_Track_set_events_2"]=Module["asm"]["Jb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_style_format_0=Module["_emscripten_bind_ASS_Track_get_style_format_0"]=function(){return(_emscripten_bind_ASS_Track_get_style_format_0=Module["_emscripten_bind_ASS_Track_get_style_format_0"]=Module["asm"]["Kb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_style_format_1=Module["_emscripten_bind_ASS_Track_set_style_format_1"]=function(){return(_emscripten_bind_ASS_Track_set_style_format_1=Module["_emscripten_bind_ASS_Track_set_style_format_1"]=Module["asm"]["Lb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_event_format_0=Module["_emscripten_bind_ASS_Track_get_event_format_0"]=function(){return(_emscripten_bind_ASS_Track_get_event_format_0=Module["_emscripten_bind_ASS_Track_get_event_format_0"]=Module["asm"]["Mb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_event_format_1=Module["_emscripten_bind_ASS_Track_set_event_format_1"]=function(){return(_emscripten_bind_ASS_Track_set_event_format_1=Module["_emscripten_bind_ASS_Track_set_event_format_1"]=Module["asm"]["Nb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_PlayResX_0=Module["_emscripten_bind_ASS_Track_get_PlayResX_0"]=function(){return(_emscripten_bind_ASS_Track_get_PlayResX_0=Module["_emscripten_bind_ASS_Track_get_PlayResX_0"]=Module["asm"]["Ob"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_PlayResX_1=Module["_emscripten_bind_ASS_Track_set_PlayResX_1"]=function(){return(_emscripten_bind_ASS_Track_set_PlayResX_1=Module["_emscripten_bind_ASS_Track_set_PlayResX_1"]=Module["asm"]["Pb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_PlayResY_0=Module["_emscripten_bind_ASS_Track_get_PlayResY_0"]=function(){return(_emscripten_bind_ASS_Track_get_PlayResY_0=Module["_emscripten_bind_ASS_Track_get_PlayResY_0"]=Module["asm"]["Qb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_PlayResY_1=Module["_emscripten_bind_ASS_Track_set_PlayResY_1"]=function(){return(_emscripten_bind_ASS_Track_set_PlayResY_1=Module["_emscripten_bind_ASS_Track_set_PlayResY_1"]=Module["asm"]["Rb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_Timer_0=Module["_emscripten_bind_ASS_Track_get_Timer_0"]=function(){return(_emscripten_bind_ASS_Track_get_Timer_0=Module["_emscripten_bind_ASS_Track_get_Timer_0"]=Module["asm"]["Sb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_Timer_1=Module["_emscripten_bind_ASS_Track_set_Timer_1"]=function(){return(_emscripten_bind_ASS_Track_set_Timer_1=Module["_emscripten_bind_ASS_Track_set_Timer_1"]=Module["asm"]["Tb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_WrapStyle_0=Module["_emscripten_bind_ASS_Track_get_WrapStyle_0"]=function(){return(_emscripten_bind_ASS_Track_get_WrapStyle_0=Module["_emscripten_bind_ASS_Track_get_WrapStyle_0"]=Module["asm"]["Ub"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_WrapStyle_1=Module["_emscripten_bind_ASS_Track_set_WrapStyle_1"]=function(){return(_emscripten_bind_ASS_Track_set_WrapStyle_1=Module["_emscripten_bind_ASS_Track_set_WrapStyle_1"]=Module["asm"]["Vb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_ScaledBorderAndShadow_0=Module["_emscripten_bind_ASS_Track_get_ScaledBorderAndShadow_0"]=function(){return(_emscripten_bind_ASS_Track_get_ScaledBorderAndShadow_0=Module["_emscripten_bind_ASS_Track_get_ScaledBorderAndShadow_0"]=Module["asm"]["Wb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_ScaledBorderAndShadow_1=Module["_emscripten_bind_ASS_Track_set_ScaledBorderAndShadow_1"]=function(){return(_emscripten_bind_ASS_Track_set_ScaledBorderAndShadow_1=Module["_emscripten_bind_ASS_Track_set_ScaledBorderAndShadow_1"]=Module["asm"]["Xb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_Kerning_0=Module["_emscripten_bind_ASS_Track_get_Kerning_0"]=function(){return(_emscripten_bind_ASS_Track_get_Kerning_0=Module["_emscripten_bind_ASS_Track_get_Kerning_0"]=Module["asm"]["Yb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_Kerning_1=Module["_emscripten_bind_ASS_Track_set_Kerning_1"]=function(){return(_emscripten_bind_ASS_Track_set_Kerning_1=Module["_emscripten_bind_ASS_Track_set_Kerning_1"]=Module["asm"]["Zb"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_Language_0=Module["_emscripten_bind_ASS_Track_get_Language_0"]=function(){return(_emscripten_bind_ASS_Track_get_Language_0=Module["_emscripten_bind_ASS_Track_get_Language_0"]=Module["asm"]["_b"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_Language_1=Module["_emscripten_bind_ASS_Track_set_Language_1"]=function(){return(_emscripten_bind_ASS_Track_set_Language_1=Module["_emscripten_bind_ASS_Track_set_Language_1"]=Module["asm"]["$b"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_default_style_0=Module["_emscripten_bind_ASS_Track_get_default_style_0"]=function(){return(_emscripten_bind_ASS_Track_get_default_style_0=Module["_emscripten_bind_ASS_Track_get_default_style_0"]=Module["asm"]["ac"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_default_style_1=Module["_emscripten_bind_ASS_Track_set_default_style_1"]=function(){return(_emscripten_bind_ASS_Track_set_default_style_1=Module["_emscripten_bind_ASS_Track_set_default_style_1"]=Module["asm"]["bc"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_get_name_0=Module["_emscripten_bind_ASS_Track_get_name_0"]=function(){return(_emscripten_bind_ASS_Track_get_name_0=Module["_emscripten_bind_ASS_Track_get_name_0"]=Module["asm"]["cc"]).apply(null,arguments)};var _emscripten_bind_ASS_Track_set_name_1=Module["_emscripten_bind_ASS_Track_set_name_1"]=function(){return(_emscripten_bind_ASS_Track_set_name_1=Module["_emscripten_bind_ASS_Track_set_name_1"]=Module["asm"]["dc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_JASSUB_0=Module["_emscripten_bind_JASSUB_JASSUB_0"]=function(){return(_emscripten_bind_JASSUB_JASSUB_0=Module["_emscripten_bind_JASSUB_JASSUB_0"]=Module["asm"]["ec"]).apply(null,arguments)};var _emscripten_bind_JASSUB_setLogLevel_1=Module["_emscripten_bind_JASSUB_setLogLevel_1"]=function(){return(_emscripten_bind_JASSUB_setLogLevel_1=Module["_emscripten_bind_JASSUB_setLogLevel_1"]=Module["asm"]["fc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_setDropAnimations_1=Module["_emscripten_bind_JASSUB_setDropAnimations_1"]=function(){return(_emscripten_bind_JASSUB_setDropAnimations_1=Module["_emscripten_bind_JASSUB_setDropAnimations_1"]=Module["asm"]["gc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_initLibrary_3=Module["_emscripten_bind_JASSUB_initLibrary_3"]=function(){return(_emscripten_bind_JASSUB_initLibrary_3=Module["_emscripten_bind_JASSUB_initLibrary_3"]=Module["asm"]["hc"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["ic"]).apply(null,arguments)};var _emscripten_bind_JASSUB_createTrackMem_2=Module["_emscripten_bind_JASSUB_createTrackMem_2"]=function(){return(_emscripten_bind_JASSUB_createTrackMem_2=Module["_emscripten_bind_JASSUB_createTrackMem_2"]=Module["asm"]["jc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_removeTrack_0=Module["_emscripten_bind_JASSUB_removeTrack_0"]=function(){return(_emscripten_bind_JASSUB_removeTrack_0=Module["_emscripten_bind_JASSUB_removeTrack_0"]=Module["asm"]["kc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_resizeCanvas_2=Module["_emscripten_bind_JASSUB_resizeCanvas_2"]=function(){return(_emscripten_bind_JASSUB_resizeCanvas_2=Module["_emscripten_bind_JASSUB_resizeCanvas_2"]=Module["asm"]["lc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_renderImage_2=Module["_emscripten_bind_JASSUB_renderImage_2"]=function(){return(_emscripten_bind_JASSUB_renderImage_2=Module["_emscripten_bind_JASSUB_renderImage_2"]=Module["asm"]["mc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_quitLibrary_0=Module["_emscripten_bind_JASSUB_quitLibrary_0"]=function(){return(_emscripten_bind_JASSUB_quitLibrary_0=Module["_emscripten_bind_JASSUB_quitLibrary_0"]=Module["asm"]["nc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_reloadLibrary_0=Module["_emscripten_bind_JASSUB_reloadLibrary_0"]=function(){return(_emscripten_bind_JASSUB_reloadLibrary_0=Module["_emscripten_bind_JASSUB_reloadLibrary_0"]=Module["asm"]["oc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_addFont_3=Module["_emscripten_bind_JASSUB_addFont_3"]=function(){return(_emscripten_bind_JASSUB_addFont_3=Module["_emscripten_bind_JASSUB_addFont_3"]=Module["asm"]["pc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_reloadFonts_0=Module["_emscripten_bind_JASSUB_reloadFonts_0"]=function(){return(_emscripten_bind_JASSUB_reloadFonts_0=Module["_emscripten_bind_JASSUB_reloadFonts_0"]=Module["asm"]["qc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_setMargin_4=Module["_emscripten_bind_JASSUB_setMargin_4"]=function(){return(_emscripten_bind_JASSUB_setMargin_4=Module["_emscripten_bind_JASSUB_setMargin_4"]=Module["asm"]["rc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_getEventCount_0=Module["_emscripten_bind_JASSUB_getEventCount_0"]=function(){return(_emscripten_bind_JASSUB_getEventCount_0=Module["_emscripten_bind_JASSUB_getEventCount_0"]=Module["asm"]["sc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_allocEvent_0=Module["_emscripten_bind_JASSUB_allocEvent_0"]=function(){return(_emscripten_bind_JASSUB_allocEvent_0=Module["_emscripten_bind_JASSUB_allocEvent_0"]=Module["asm"]["tc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_allocStyle_0=Module["_emscripten_bind_JASSUB_allocStyle_0"]=function(){return(_emscripten_bind_JASSUB_allocStyle_0=Module["_emscripten_bind_JASSUB_allocStyle_0"]=Module["asm"]["uc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_removeEvent_1=Module["_emscripten_bind_JASSUB_removeEvent_1"]=function(){return(_emscripten_bind_JASSUB_removeEvent_1=Module["_emscripten_bind_JASSUB_removeEvent_1"]=Module["asm"]["vc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_getStyleCount_0=Module["_emscripten_bind_JASSUB_getStyleCount_0"]=function(){return(_emscripten_bind_JASSUB_getStyleCount_0=Module["_emscripten_bind_JASSUB_getStyleCount_0"]=Module["asm"]["wc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_getStyleByName_1=Module["_emscripten_bind_JASSUB_getStyleByName_1"]=function(){return(_emscripten_bind_JASSUB_getStyleByName_1=Module["_emscripten_bind_JASSUB_getStyleByName_1"]=Module["asm"]["xc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_removeStyle_1=Module["_emscripten_bind_JASSUB_removeStyle_1"]=function(){return(_emscripten_bind_JASSUB_removeStyle_1=Module["_emscripten_bind_JASSUB_removeStyle_1"]=Module["asm"]["yc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_removeAllEvents_0=Module["_emscripten_bind_JASSUB_removeAllEvents_0"]=function(){return(_emscripten_bind_JASSUB_removeAllEvents_0=Module["_emscripten_bind_JASSUB_removeAllEvents_0"]=Module["asm"]["zc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_setMemoryLimits_2=Module["_emscripten_bind_JASSUB_setMemoryLimits_2"]=function(){return(_emscripten_bind_JASSUB_setMemoryLimits_2=Module["_emscripten_bind_JASSUB_setMemoryLimits_2"]=Module["asm"]["Ac"]).apply(null,arguments)};var _emscripten_bind_JASSUB_renderBlend_2=Module["_emscripten_bind_JASSUB_renderBlend_2"]=function(){return(_emscripten_bind_JASSUB_renderBlend_2=Module["_emscripten_bind_JASSUB_renderBlend_2"]=Module["asm"]["Bc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_get_track_0=Module["_emscripten_bind_JASSUB_get_track_0"]=function(){return(_emscripten_bind_JASSUB_get_track_0=Module["_emscripten_bind_JASSUB_get_track_0"]=Module["asm"]["Cc"]).apply(null,arguments)};var _emscripten_bind_JASSUB_set_track_1=Module["_emscripten_bind_JASSUB_set_track_1"]=function(){return(_emscripten_bind_JASSUB_set_track_1=Module["_emscripten_bind_JASSUB_set_track_1"]=Module["asm"]["Dc"]).apply(null,arguments)};var _emscripten_bind_JASSUB___destroy___0=Module["_emscripten_bind_JASSUB___destroy___0"]=function(){return(_emscripten_bind_JASSUB___destroy___0=Module["_emscripten_bind_JASSUB___destroy___0"]=Module["asm"]["Ec"]).apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){return(___errno_location=Module["___errno_location"]=Module["asm"]["Gc"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["Hc"]).apply(null,arguments)};var stackSave=Module["stackSave"]=function(){return(stackSave=Module["stackSave"]=Module["asm"]["Ic"]).apply(null,arguments)};var stackRestore=Module["stackRestore"]=function(){return(stackRestore=Module["stackRestore"]=Module["asm"]["Jc"]).apply(null,arguments)};var stackAlloc=Module["stackAlloc"]=function(){return(stackAlloc=Module["stackAlloc"]=Module["asm"]["Kc"]).apply(null,arguments)};var _setThrew=Module["_setThrew"]=function(){return(_setThrew=Module["_setThrew"]=Module["asm"]["Lc"]).apply(null,arguments)};function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0&&e!=="longjmp")throw e;_setThrew(1,0)}}var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}var calledMain=false;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function callMain(args){var entryFunction=Module["_main"];args=args||[];var argc=args.length+1;var argv=stackAlloc((argc+1)*4);HEAP32[argv>>2]=allocateUTF8OnStack(thisProgram);for(var i=1;i<argc;i++){HEAP32[(argv>>2)+i]=allocateUTF8OnStack(args[i-1])}HEAP32[(argv>>2)+argc]=0;try{var ret=entryFunction(argc,argv);exit(ret,true);return ret}catch(e){return handleException(e)}finally{calledMain=true}}function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();if(shouldRunNow)callMain(args);postRun()}{doRun()}}Module["run"]=run;function exit(status,implicit){EXITSTATUS=status;if(keepRuntimeAlive()){}else{exitRuntime()}procExit(status)}function procExit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){ABORT=true}quit_(code,new ExitStatus(code))}var shouldRunNow=true;run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],owned:[],needed:0,prepare:function(){if(ensureCache.needed){for(var i=0;i<ensureCache.temps.length;i++){Module["_free"](ensureCache.temps[i])}ensureCache.temps.length=0;Module["_free"](ensureCache.buffer);ensureCache.buffer=0;ensureCache.size+=ensureCache.needed;ensureCache.needed=0}if(!ensureCache.buffer){ensureCache.size+=128;ensureCache.buffer=Module["_malloc"](ensureCache.size);assert(ensureCache.buffer)}ensureCache.pos=0},alloc:function(array,view,owner){assert(ensureCache.buffer);var bytes=view.BYTES_PER_ELEMENT;var len=array.length*bytes;len=len+7&-8;var ret;if(owner){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.owned.push(ret)}else{if(ensureCache.pos+len>=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret)}else{ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len}}return ret},copy:function(array,view,offset){offset>>>=0;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offset>>>=1;break;case 4:offset>>>=2;break;case 8:offset>>>=3;break}for(var i=0;i<array.length;i++){view[offset+i]=array[i]}},clear:function(clearOwned){for(var i=0;i<ensureCache.temps.length;i++){Module["_free"](ensureCache.temps[i])}if(clearOwned){for(var i=0;i<ensureCache.owned.length;i++){Module["_free"](ensureCache.owned[i])}}ensureCache.temps.length=0;Module["_free"](ensureCache.buffer);ensureCache.buffer=0;ensureCache.size=0;ensureCache.needed=0}};function ensureString(value,owner){if(typeof value==="string"){var intArray=intArrayFromString(value);var offset=ensureCache.alloc(intArray,HEAP8,owner);ensureCache.copy(intArray,HEAP8,offset);return offset}return value}function VoidPtr(){throw"cannot construct a VoidPtr, no constructor in IDL"}VoidPtr.prototype=Object.create(WrapperObject.prototype);VoidPtr.prototype.constructor=VoidPtr;VoidPtr.prototype.__class__=VoidPtr;VoidPtr.__cache__={};Module["VoidPtr"]=VoidPtr;VoidPtr.prototype["__destroy__"]=VoidPtr.prototype.__destroy__=function(){var self=this.ptr;_emscripten_bind_VoidPtr___destroy___0(self)};function ASS_Style(){throw"cannot construct a ASS_Style, no constructor in IDL"}ASS_Style.prototype=Object.create(WrapperObject.prototype);ASS_Style.prototype.constructor=ASS_Style;ASS_Style.prototype.__class__=ASS_Style;ASS_Style.__cache__={};Module["ASS_Style"]=ASS_Style;ASS_Style.prototype["get_Name"]=ASS_Style.prototype.get_Name=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_ASS_Style_get_Name_0(self))};ASS_Style.prototype["set_Name"]=ASS_Style.prototype.set_Name=function(arg0){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0,true);_emscripten_bind_ASS_Style_set_Name_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Name",{get:ASS_Style.prototype.get_Name,set:ASS_Style.prototype.set_Name});ASS_Style.prototype["get_FontName"]=ASS_Style.prototype.get_FontName=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_ASS_Style_get_FontName_0(self))};ASS_Style.prototype["set_FontName"]=ASS_Style.prototype.set_FontName=function(arg0){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0,true);_emscripten_bind_ASS_Style_set_FontName_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"FontName",{get:ASS_Style.prototype.get_FontName,set:ASS_Style.prototype.set_FontName});ASS_Style.prototype["get_FontSize"]=ASS_Style.prototype.get_FontSize=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_FontSize_0(self)};ASS_Style.prototype["set_FontSize"]=ASS_Style.prototype.set_FontSize=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_FontSize_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"FontSize",{get:ASS_Style.prototype.get_FontSize,set:ASS_Style.prototype.set_FontSize});ASS_Style.prototype["get_PrimaryColour"]=ASS_Style.prototype.get_PrimaryColour=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_PrimaryColour_0(self)};ASS_Style.prototype["set_PrimaryColour"]=ASS_Style.prototype.set_PrimaryColour=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_PrimaryColour_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"PrimaryColour",{get:ASS_Style.prototype.get_PrimaryColour,set:ASS_Style.prototype.set_PrimaryColour});ASS_Style.prototype["get_SecondaryColour"]=ASS_Style.prototype.get_SecondaryColour=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_SecondaryColour_0(self)};ASS_Style.prototype["set_SecondaryColour"]=ASS_Style.prototype.set_SecondaryColour=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_SecondaryColour_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"SecondaryColour",{get:ASS_Style.prototype.get_SecondaryColour,set:ASS_Style.prototype.set_SecondaryColour});ASS_Style.prototype["get_OutlineColour"]=ASS_Style.prototype.get_OutlineColour=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_OutlineColour_0(self)};ASS_Style.prototype["set_OutlineColour"]=ASS_Style.prototype.set_OutlineColour=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_OutlineColour_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"OutlineColour",{get:ASS_Style.prototype.get_OutlineColour,set:ASS_Style.prototype.set_OutlineColour});ASS_Style.prototype["get_BackColour"]=ASS_Style.prototype.get_BackColour=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_BackColour_0(self)};ASS_Style.prototype["set_BackColour"]=ASS_Style.prototype.set_BackColour=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_BackColour_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"BackColour",{get:ASS_Style.prototype.get_BackColour,set:ASS_Style.prototype.set_BackColour});ASS_Style.prototype["get_Bold"]=ASS_Style.prototype.get_Bold=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Bold_0(self)};ASS_Style.prototype["set_Bold"]=ASS_Style.prototype.set_Bold=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Bold_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Bold",{get:ASS_Style.prototype.get_Bold,set:ASS_Style.prototype.set_Bold});ASS_Style.prototype["get_Italic"]=ASS_Style.prototype.get_Italic=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Italic_0(self)};ASS_Style.prototype["set_Italic"]=ASS_Style.prototype.set_Italic=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Italic_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Italic",{get:ASS_Style.prototype.get_Italic,set:ASS_Style.prototype.set_Italic});ASS_Style.prototype["get_Underline"]=ASS_Style.prototype.get_Underline=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Underline_0(self)};ASS_Style.prototype["set_Underline"]=ASS_Style.prototype.set_Underline=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Underline_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Underline",{get:ASS_Style.prototype.get_Underline,set:ASS_Style.prototype.set_Underline});ASS_Style.prototype["get_StrikeOut"]=ASS_Style.prototype.get_StrikeOut=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_StrikeOut_0(self)};ASS_Style.prototype["set_StrikeOut"]=ASS_Style.prototype.set_StrikeOut=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_StrikeOut_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"StrikeOut",{get:ASS_Style.prototype.get_StrikeOut,set:ASS_Style.prototype.set_StrikeOut});ASS_Style.prototype["get_ScaleX"]=ASS_Style.prototype.get_ScaleX=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_ScaleX_0(self)};ASS_Style.prototype["set_ScaleX"]=ASS_Style.prototype.set_ScaleX=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_ScaleX_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"ScaleX",{get:ASS_Style.prototype.get_ScaleX,set:ASS_Style.prototype.set_ScaleX});ASS_Style.prototype["get_ScaleY"]=ASS_Style.prototype.get_ScaleY=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_ScaleY_0(self)};ASS_Style.prototype["set_ScaleY"]=ASS_Style.prototype.set_ScaleY=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_ScaleY_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"ScaleY",{get:ASS_Style.prototype.get_ScaleY,set:ASS_Style.prototype.set_ScaleY});ASS_Style.prototype["get_Spacing"]=ASS_Style.prototype.get_Spacing=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Spacing_0(self)};ASS_Style.prototype["set_Spacing"]=ASS_Style.prototype.set_Spacing=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Spacing_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Spacing",{get:ASS_Style.prototype.get_Spacing,set:ASS_Style.prototype.set_Spacing});ASS_Style.prototype["get_Angle"]=ASS_Style.prototype.get_Angle=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Angle_0(self)};ASS_Style.prototype["set_Angle"]=ASS_Style.prototype.set_Angle=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Angle_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Angle",{get:ASS_Style.prototype.get_Angle,set:ASS_Style.prototype.set_Angle});ASS_Style.prototype["get_BorderStyle"]=ASS_Style.prototype.get_BorderStyle=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_BorderStyle_0(self)};ASS_Style.prototype["set_BorderStyle"]=ASS_Style.prototype.set_BorderStyle=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_BorderStyle_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"BorderStyle",{get:ASS_Style.prototype.get_BorderStyle,set:ASS_Style.prototype.set_BorderStyle});ASS_Style.prototype["get_Outline"]=ASS_Style.prototype.get_Outline=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Outline_0(self)};ASS_Style.prototype["set_Outline"]=ASS_Style.prototype.set_Outline=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Outline_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Outline",{get:ASS_Style.prototype.get_Outline,set:ASS_Style.prototype.set_Outline});ASS_Style.prototype["get_Shadow"]=ASS_Style.prototype.get_Shadow=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Shadow_0(self)};ASS_Style.prototype["set_Shadow"]=ASS_Style.prototype.set_Shadow=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Shadow_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Shadow",{get:ASS_Style.prototype.get_Shadow,set:ASS_Style.prototype.set_Shadow});ASS_Style.prototype["get_Alignment"]=ASS_Style.prototype.get_Alignment=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Alignment_0(self)};ASS_Style.prototype["set_Alignment"]=ASS_Style.prototype.set_Alignment=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Alignment_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Alignment",{get:ASS_Style.prototype.get_Alignment,set:ASS_Style.prototype.set_Alignment});ASS_Style.prototype["get_MarginL"]=ASS_Style.prototype.get_MarginL=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_MarginL_0(self)};ASS_Style.prototype["set_MarginL"]=ASS_Style.prototype.set_MarginL=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_MarginL_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"MarginL",{get:ASS_Style.prototype.get_MarginL,set:ASS_Style.prototype.set_MarginL});ASS_Style.prototype["get_MarginR"]=ASS_Style.prototype.get_MarginR=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_MarginR_0(self)};ASS_Style.prototype["set_MarginR"]=ASS_Style.prototype.set_MarginR=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_MarginR_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"MarginR",{get:ASS_Style.prototype.get_MarginR,set:ASS_Style.prototype.set_MarginR});ASS_Style.prototype["get_MarginV"]=ASS_Style.prototype.get_MarginV=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_MarginV_0(self)};ASS_Style.prototype["set_MarginV"]=ASS_Style.prototype.set_MarginV=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_MarginV_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"MarginV",{get:ASS_Style.prototype.get_MarginV,set:ASS_Style.prototype.set_MarginV});ASS_Style.prototype["get_Encoding"]=ASS_Style.prototype.get_Encoding=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Encoding_0(self)};ASS_Style.prototype["set_Encoding"]=ASS_Style.prototype.set_Encoding=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Encoding_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Encoding",{get:ASS_Style.prototype.get_Encoding,set:ASS_Style.prototype.set_Encoding});ASS_Style.prototype["get_treat_fontname_as_pattern"]=ASS_Style.prototype.get_treat_fontname_as_pattern=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_treat_fontname_as_pattern_0(self)};ASS_Style.prototype["set_treat_fontname_as_pattern"]=ASS_Style.prototype.set_treat_fontname_as_pattern=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_treat_fontname_as_pattern_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"treat_fontname_as_pattern",{get:ASS_Style.prototype.get_treat_fontname_as_pattern,set:ASS_Style.prototype.set_treat_fontname_as_pattern});ASS_Style.prototype["get_Blur"]=ASS_Style.prototype.get_Blur=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Blur_0(self)};ASS_Style.prototype["set_Blur"]=ASS_Style.prototype.set_Blur=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Blur_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Blur",{get:ASS_Style.prototype.get_Blur,set:ASS_Style.prototype.set_Blur});ASS_Style.prototype["get_Justify"]=ASS_Style.prototype.get_Justify=function(){var self=this.ptr;return _emscripten_bind_ASS_Style_get_Justify_0(self)};ASS_Style.prototype["set_Justify"]=ASS_Style.prototype.set_Justify=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Style_set_Justify_1(self,arg0)};Object.defineProperty(ASS_Style.prototype,"Justify",{get:ASS_Style.prototype.get_Justify,set:ASS_Style.prototype.set_Justify});function ASS_Event(){throw"cannot construct a ASS_Event, no constructor in IDL"}ASS_Event.prototype=Object.create(WrapperObject.prototype);ASS_Event.prototype.constructor=ASS_Event;ASS_Event.prototype.__class__=ASS_Event;ASS_Event.__cache__={};Module["ASS_Event"]=ASS_Event;ASS_Event.prototype["get_Start"]=ASS_Event.prototype.get_Start=function(){var self=this.ptr;return _emscripten_bind_ASS_Event_get_Start_0(self)};ASS_Event.prototype["set_Start"]=ASS_Event.prototype.set_Start=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Event_set_Start_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"Start",{get:ASS_Event.prototype.get_Start,set:ASS_Event.prototype.set_Start});ASS_Event.prototype["get_Duration"]=ASS_Event.prototype.get_Duration=function(){var self=this.ptr;return _emscripten_bind_ASS_Event_get_Duration_0(self)};ASS_Event.prototype["set_Duration"]=ASS_Event.prototype.set_Duration=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Event_set_Duration_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"Duration",{get:ASS_Event.prototype.get_Duration,set:ASS_Event.prototype.set_Duration});ASS_Event.prototype["get_ReadOrder"]=ASS_Event.prototype.get_ReadOrder=function(){var self=this.ptr;return _emscripten_bind_ASS_Event_get_ReadOrder_0(self)};ASS_Event.prototype["set_ReadOrder"]=ASS_Event.prototype.set_ReadOrder=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Event_set_ReadOrder_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"ReadOrder",{get:ASS_Event.prototype.get_ReadOrder,set:ASS_Event.prototype.set_ReadOrder});ASS_Event.prototype["get_Layer"]=ASS_Event.prototype.get_Layer=function(){var self=this.ptr;return _emscripten_bind_ASS_Event_get_Layer_0(self)};ASS_Event.prototype["set_Layer"]=ASS_Event.prototype.set_Layer=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Event_set_Layer_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"Layer",{get:ASS_Event.prototype.get_Layer,set:ASS_Event.prototype.set_Layer});ASS_Event.prototype["get_Style"]=ASS_Event.prototype.get_Style=function(){var self=this.ptr;return _emscripten_bind_ASS_Event_get_Style_0(self)};ASS_Event.prototype["set_Style"]=ASS_Event.prototype.set_Style=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Event_set_Style_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"Style",{get:ASS_Event.prototype.get_Style,set:ASS_Event.prototype.set_Style});ASS_Event.prototype["get_Name"]=ASS_Event.prototype.get_Name=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_ASS_Event_get_Name_0(self))};ASS_Event.prototype["set_Name"]=ASS_Event.prototype.set_Name=function(arg0){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0,true);_emscripten_bind_ASS_Event_set_Name_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"Name",{get:ASS_Event.prototype.get_Name,set:ASS_Event.prototype.set_Name});ASS_Event.prototype["get_MarginL"]=ASS_Event.prototype.get_MarginL=function(){var self=this.ptr;return _emscripten_bind_ASS_Event_get_MarginL_0(self)};ASS_Event.prototype["set_MarginL"]=ASS_Event.prototype.set_MarginL=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Event_set_MarginL_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"MarginL",{get:ASS_Event.prototype.get_MarginL,set:ASS_Event.prototype.set_MarginL});ASS_Event.prototype["get_MarginR"]=ASS_Event.prototype.get_MarginR=function(){var self=this.ptr;return _emscripten_bind_ASS_Event_get_MarginR_0(self)};ASS_Event.prototype["set_MarginR"]=ASS_Event.prototype.set_MarginR=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Event_set_MarginR_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"MarginR",{get:ASS_Event.prototype.get_MarginR,set:ASS_Event.prototype.set_MarginR});ASS_Event.prototype["get_MarginV"]=ASS_Event.prototype.get_MarginV=function(){var self=this.ptr;return _emscripten_bind_ASS_Event_get_MarginV_0(self)};ASS_Event.prototype["set_MarginV"]=ASS_Event.prototype.set_MarginV=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Event_set_MarginV_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"MarginV",{get:ASS_Event.prototype.get_MarginV,set:ASS_Event.prototype.set_MarginV});ASS_Event.prototype["get_Effect"]=ASS_Event.prototype.get_Effect=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_ASS_Event_get_Effect_0(self))};ASS_Event.prototype["set_Effect"]=ASS_Event.prototype.set_Effect=function(arg0){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0,true);_emscripten_bind_ASS_Event_set_Effect_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"Effect",{get:ASS_Event.prototype.get_Effect,set:ASS_Event.prototype.set_Effect});ASS_Event.prototype["get_Text"]=ASS_Event.prototype.get_Text=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_ASS_Event_get_Text_0(self))};ASS_Event.prototype["set_Text"]=ASS_Event.prototype.set_Text=function(arg0){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0,true);_emscripten_bind_ASS_Event_set_Text_1(self,arg0)};Object.defineProperty(ASS_Event.prototype,"Text",{get:ASS_Event.prototype.get_Text,set:ASS_Event.prototype.set_Text});function RenderResult(){throw"cannot construct a RenderResult, no constructor in IDL"}RenderResult.prototype=Object.create(WrapperObject.prototype);RenderResult.prototype.constructor=RenderResult;RenderResult.prototype.__class__=RenderResult;RenderResult.__cache__={};Module["RenderResult"]=RenderResult;RenderResult.prototype["get_changed"]=RenderResult.prototype.get_changed=function(){var self=this.ptr;return _emscripten_bind_RenderResult_get_changed_0(self)};RenderResult.prototype["set_changed"]=RenderResult.prototype.set_changed=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_RenderResult_set_changed_1(self,arg0)};Object.defineProperty(RenderResult.prototype,"changed",{get:RenderResult.prototype.get_changed,set:RenderResult.prototype.set_changed});RenderResult.prototype["get_time"]=RenderResult.prototype.get_time=function(){var self=this.ptr;return _emscripten_bind_RenderResult_get_time_0(self)};RenderResult.prototype["set_time"]=RenderResult.prototype.set_time=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_RenderResult_set_time_1(self,arg0)};Object.defineProperty(RenderResult.prototype,"time",{get:RenderResult.prototype.get_time,set:RenderResult.prototype.set_time});RenderResult.prototype["get_x"]=RenderResult.prototype.get_x=function(){var self=this.ptr;return _emscripten_bind_RenderResult_get_x_0(self)};RenderResult.prototype["set_x"]=RenderResult.prototype.set_x=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_RenderResult_set_x_1(self,arg0)};Object.defineProperty(RenderResult.prototype,"x",{get:RenderResult.prototype.get_x,set:RenderResult.prototype.set_x});RenderResult.prototype["get_y"]=RenderResult.prototype.get_y=function(){var self=this.ptr;return _emscripten_bind_RenderResult_get_y_0(self)};RenderResult.prototype["set_y"]=RenderResult.prototype.set_y=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_RenderResult_set_y_1(self,arg0)};Object.defineProperty(RenderResult.prototype,"y",{get:RenderResult.prototype.get_y,set:RenderResult.prototype.set_y});RenderResult.prototype["get_w"]=RenderResult.prototype.get_w=function(){var self=this.ptr;return _emscripten_bind_RenderResult_get_w_0(self)};RenderResult.prototype["set_w"]=RenderResult.prototype.set_w=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_RenderResult_set_w_1(self,arg0)};Object.defineProperty(RenderResult.prototype,"w",{get:RenderResult.prototype.get_w,set:RenderResult.prototype.set_w});RenderResult.prototype["get_h"]=RenderResult.prototype.get_h=function(){var self=this.ptr;return _emscripten_bind_RenderResult_get_h_0(self)};RenderResult.prototype["set_h"]=RenderResult.prototype.set_h=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_RenderResult_set_h_1(self,arg0)};Object.defineProperty(RenderResult.prototype,"h",{get:RenderResult.prototype.get_h,set:RenderResult.prototype.set_h});RenderResult.prototype["get_image"]=RenderResult.prototype.get_image=function(){var self=this.ptr;return _emscripten_bind_RenderResult_get_image_0(self)};RenderResult.prototype["set_image"]=RenderResult.prototype.set_image=function(arg0){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0,false);_emscripten_bind_RenderResult_set_image_1(self,arg0)};Object.defineProperty(RenderResult.prototype,"image",{get:RenderResult.prototype.get_image,set:RenderResult.prototype.set_image});RenderResult.prototype["get_next"]=RenderResult.prototype.get_next=function(){var self=this.ptr;return wrapPointer(_emscripten_bind_RenderResult_get_next_0(self),RenderResult)};RenderResult.prototype["set_next"]=RenderResult.prototype.set_next=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_RenderResult_set_next_1(self,arg0)};Object.defineProperty(RenderResult.prototype,"next",{get:RenderResult.prototype.get_next,set:RenderResult.prototype.set_next});function ASS_Track(){throw"cannot construct a ASS_Track, no constructor in IDL"}ASS_Track.prototype=Object.create(WrapperObject.prototype);ASS_Track.prototype.constructor=ASS_Track;ASS_Track.prototype.__class__=ASS_Track;ASS_Track.__cache__={};Module["ASS_Track"]=ASS_Track;ASS_Track.prototype["get_n_styles"]=ASS_Track.prototype.get_n_styles=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_n_styles_0(self)};ASS_Track.prototype["set_n_styles"]=ASS_Track.prototype.set_n_styles=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_n_styles_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"n_styles",{get:ASS_Track.prototype.get_n_styles,set:ASS_Track.prototype.set_n_styles});ASS_Track.prototype["get_max_styles"]=ASS_Track.prototype.get_max_styles=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_max_styles_0(self)};ASS_Track.prototype["set_max_styles"]=ASS_Track.prototype.set_max_styles=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_max_styles_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"max_styles",{get:ASS_Track.prototype.get_max_styles,set:ASS_Track.prototype.set_max_styles});ASS_Track.prototype["get_n_events"]=ASS_Track.prototype.get_n_events=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_n_events_0(self)};ASS_Track.prototype["set_n_events"]=ASS_Track.prototype.set_n_events=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_n_events_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"n_events",{get:ASS_Track.prototype.get_n_events,set:ASS_Track.prototype.set_n_events});ASS_Track.prototype["get_max_events"]=ASS_Track.prototype.get_max_events=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_max_events_0(self)};ASS_Track.prototype["set_max_events"]=ASS_Track.prototype.set_max_events=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_max_events_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"max_events",{get:ASS_Track.prototype.get_max_events,set:ASS_Track.prototype.set_max_events});ASS_Track.prototype["get_styles"]=ASS_Track.prototype.get_styles=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return wrapPointer(_emscripten_bind_ASS_Track_get_styles_1(self,arg0),ASS_Style)};ASS_Track.prototype["set_styles"]=ASS_Track.prototype.set_styles=function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;_emscripten_bind_ASS_Track_set_styles_2(self,arg0,arg1)};Object.defineProperty(ASS_Track.prototype,"styles",{get:ASS_Track.prototype.get_styles,set:ASS_Track.prototype.set_styles});ASS_Track.prototype["get_events"]=ASS_Track.prototype.get_events=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;return wrapPointer(_emscripten_bind_ASS_Track_get_events_1(self,arg0),ASS_Event)};ASS_Track.prototype["set_events"]=ASS_Track.prototype.set_events=function(arg0,arg1){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;if(arg1&&typeof arg1==="object")arg1=arg1.ptr;_emscripten_bind_ASS_Track_set_events_2(self,arg0,arg1)};Object.defineProperty(ASS_Track.prototype,"events",{get:ASS_Track.prototype.get_events,set:ASS_Track.prototype.set_events});ASS_Track.prototype["get_style_format"]=ASS_Track.prototype.get_style_format=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_ASS_Track_get_style_format_0(self))};ASS_Track.prototype["set_style_format"]=ASS_Track.prototype.set_style_format=function(arg0){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0,true);_emscripten_bind_ASS_Track_set_style_format_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"style_format",{get:ASS_Track.prototype.get_style_format,set:ASS_Track.prototype.set_style_format});ASS_Track.prototype["get_event_format"]=ASS_Track.prototype.get_event_format=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_ASS_Track_get_event_format_0(self))};ASS_Track.prototype["set_event_format"]=ASS_Track.prototype.set_event_format=function(arg0){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0,true);_emscripten_bind_ASS_Track_set_event_format_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"event_format",{get:ASS_Track.prototype.get_event_format,set:ASS_Track.prototype.set_event_format});ASS_Track.prototype["get_PlayResX"]=ASS_Track.prototype.get_PlayResX=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_PlayResX_0(self)};ASS_Track.prototype["set_PlayResX"]=ASS_Track.prototype.set_PlayResX=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_PlayResX_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"PlayResX",{get:ASS_Track.prototype.get_PlayResX,set:ASS_Track.prototype.set_PlayResX});ASS_Track.prototype["get_PlayResY"]=ASS_Track.prototype.get_PlayResY=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_PlayResY_0(self)};ASS_Track.prototype["set_PlayResY"]=ASS_Track.prototype.set_PlayResY=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_PlayResY_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"PlayResY",{get:ASS_Track.prototype.get_PlayResY,set:ASS_Track.prototype.set_PlayResY});ASS_Track.prototype["get_Timer"]=ASS_Track.prototype.get_Timer=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_Timer_0(self)};ASS_Track.prototype["set_Timer"]=ASS_Track.prototype.set_Timer=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_Timer_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"Timer",{get:ASS_Track.prototype.get_Timer,set:ASS_Track.prototype.set_Timer});ASS_Track.prototype["get_WrapStyle"]=ASS_Track.prototype.get_WrapStyle=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_WrapStyle_0(self)};ASS_Track.prototype["set_WrapStyle"]=ASS_Track.prototype.set_WrapStyle=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_WrapStyle_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"WrapStyle",{get:ASS_Track.prototype.get_WrapStyle,set:ASS_Track.prototype.set_WrapStyle});ASS_Track.prototype["get_ScaledBorderAndShadow"]=ASS_Track.prototype.get_ScaledBorderAndShadow=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_ScaledBorderAndShadow_0(self)};ASS_Track.prototype["set_ScaledBorderAndShadow"]=ASS_Track.prototype.set_ScaledBorderAndShadow=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_ScaledBorderAndShadow_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"ScaledBorderAndShadow",{get:ASS_Track.prototype.get_ScaledBorderAndShadow,set:ASS_Track.prototype.set_ScaledBorderAndShadow});ASS_Track.prototype["get_Kerning"]=ASS_Track.prototype.get_Kerning=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_Kerning_0(self)};ASS_Track.prototype["set_Kerning"]=ASS_Track.prototype.set_Kerning=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_Kerning_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"Kerning",{get:ASS_Track.prototype.get_Kerning,set:ASS_Track.prototype.set_Kerning});ASS_Track.prototype["get_Language"]=ASS_Track.prototype.get_Language=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_ASS_Track_get_Language_0(self))};ASS_Track.prototype["set_Language"]=ASS_Track.prototype.set_Language=function(arg0){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0,true);_emscripten_bind_ASS_Track_set_Language_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"Language",{get:ASS_Track.prototype.get_Language,set:ASS_Track.prototype.set_Language});ASS_Track.prototype["get_default_style"]=ASS_Track.prototype.get_default_style=function(){var self=this.ptr;return _emscripten_bind_ASS_Track_get_default_style_0(self)};ASS_Track.prototype["set_default_style"]=ASS_Track.prototype.set_default_style=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_ASS_Track_set_default_style_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"default_style",{get:ASS_Track.prototype.get_default_style,set:ASS_Track.prototype.set_default_style});ASS_Track.prototype["get_name"]=ASS_Track.prototype.get_name=function(){var self=this.ptr;return UTF8ToString(_emscripten_bind_ASS_Track_get_name_0(self))};ASS_Track.prototype["set_name"]=ASS_Track.prototype.set_name=function(arg0){var self=this.ptr;ensureCache.prepare();if(arg0&&typeof arg0==="object")arg0=arg0.ptr;else arg0=ensureString(arg0,true);_emscripten_bind_ASS_Track_set_name_1(self,arg0)};Object.defineProperty(ASS_Track.prototype,"name",{get:ASS_Track.prototype.get_name,set:ASS_Track.prototype.set_name});function JASSUB(){this.ptr=_emscripten_bind_JASSUB_JASSUB_0();getCache(JASSUB)[this.ptr]=this}JASSUB.prototype=Object.create(WrapperObject.prototype);JASSUB.prototype.constructor=JASSUB;JASSUB.prototype.__class__=JASSUB;JASSUB.__cache__={};Module["JASSUB"]=JASSUB;JASSUB.prototype["setLogLevel"]=JASSUB.prototype.setLogLevel=function(level){var self=this.ptr;if(level&&typeof level==="object")level=level.ptr;_emscripten_bind_JASSUB_setLogLevel_1(self,level)};JASSUB.prototype["setDropAnimations"]=JASSUB.prototype.setDropAnimations=function(value){var self=this.ptr;if(value&&typeof value==="object")value=value.ptr;_emscripten_bind_JASSUB_setDropAnimations_1(self,value)};JASSUB.prototype["initLibrary"]=JASSUB.prototype.initLibrary=function(frame_w,frame_h,default_font){var self=this.ptr;ensureCache.prepare();if(frame_w&&typeof frame_w==="object")frame_w=frame_w.ptr;if(frame_h&&typeof frame_h==="object")frame_h=frame_h.ptr;if(default_font&&typeof default_font==="object")default_font=default_font.ptr;else default_font=ensureString(default_font,false);_emscripten_bind_JASSUB_initLibrary_3(self,frame_w,frame_h,default_font)};JASSUB.prototype["createTrackMem"]=JASSUB.prototype.createTrackMem=function(buf,bufsize){var self=this.ptr;ensureCache.prepare();if(buf&&typeof buf==="object")buf=buf.ptr;else buf=ensureString(buf,false);if(bufsize&&typeof bufsize==="object")bufsize=bufsize.ptr;_emscripten_bind_JASSUB_createTrackMem_2(self,buf,bufsize)};JASSUB.prototype["removeTrack"]=JASSUB.prototype.removeTrack=function(){var self=this.ptr;_emscripten_bind_JASSUB_removeTrack_0(self)};JASSUB.prototype["resizeCanvas"]=JASSUB.prototype.resizeCanvas=function(frame_w,frame_h){var self=this.ptr;if(frame_w&&typeof frame_w==="object")frame_w=frame_w.ptr;if(frame_h&&typeof frame_h==="object")frame_h=frame_h.ptr;_emscripten_bind_JASSUB_resizeCanvas_2(self,frame_w,frame_h)};JASSUB.prototype["renderImage"]=JASSUB.prototype.renderImage=function(time,force){var self=this.ptr;if(time&&typeof time==="object")time=time.ptr;if(force&&typeof force==="object")force=force.ptr;return wrapPointer(_emscripten_bind_JASSUB_renderImage_2(self,time,force),RenderResult)};JASSUB.prototype["quitLibrary"]=JASSUB.prototype.quitLibrary=function(){var self=this.ptr;_emscripten_bind_JASSUB_quitLibrary_0(self)};JASSUB.prototype["reloadLibrary"]=JASSUB.prototype.reloadLibrary=function(){var self=this.ptr;_emscripten_bind_JASSUB_reloadLibrary_0(self)};JASSUB.prototype["addFont"]=JASSUB.prototype.addFont=function(name,data,data_size){var self=this.ptr;ensureCache.prepare();if(name&&typeof name==="object")name=name.ptr;else name=ensureString(name,false);if(data&&typeof data==="object")data=data.ptr;else data=ensureString(data,false);if(data_size&&typeof data_size==="object")data_size=data_size.ptr;_emscripten_bind_JASSUB_addFont_3(self,name,data,data_size)};JASSUB.prototype["reloadFonts"]=JASSUB.prototype.reloadFonts=function(){var self=this.ptr;_emscripten_bind_JASSUB_reloadFonts_0(self)};JASSUB.prototype["setMargin"]=JASSUB.prototype.setMargin=function(top,bottom,left,right){var self=this.ptr;if(top&&typeof top==="object")top=top.ptr;if(bottom&&typeof bottom==="object")bottom=bottom.ptr;if(left&&typeof left==="object")left=left.ptr;if(right&&typeof right==="object")right=right.ptr;_emscripten_bind_JASSUB_setMargin_4(self,top,bottom,left,right)};JASSUB.prototype["getEventCount"]=JASSUB.prototype.getEventCount=function(){var self=this.ptr;return _emscripten_bind_JASSUB_getEventCount_0(self)};JASSUB.prototype["allocEvent"]=JASSUB.prototype.allocEvent=function(){var self=this.ptr;return _emscripten_bind_JASSUB_allocEvent_0(self)};JASSUB.prototype["allocStyle"]=JASSUB.prototype.allocStyle=function(){var self=this.ptr;return _emscripten_bind_JASSUB_allocStyle_0(self)};JASSUB.prototype["removeEvent"]=JASSUB.prototype.removeEvent=function(eid){var self=this.ptr;if(eid&&typeof eid==="object")eid=eid.ptr;_emscripten_bind_JASSUB_removeEvent_1(self,eid)};JASSUB.prototype["getStyleCount"]=JASSUB.prototype.getStyleCount=function(){var self=this.ptr;return _emscripten_bind_JASSUB_getStyleCount_0(self)};JASSUB.prototype["getStyleByName"]=JASSUB.prototype.getStyleByName=function(name){var self=this.ptr;ensureCache.prepare();if(name&&typeof name==="object")name=name.ptr;else name=ensureString(name,false);return _emscripten_bind_JASSUB_getStyleByName_1(self,name)};JASSUB.prototype["removeStyle"]=JASSUB.prototype.removeStyle=function(eid){var self=this.ptr;if(eid&&typeof eid==="object")eid=eid.ptr;_emscripten_bind_JASSUB_removeStyle_1(self,eid)};JASSUB.prototype["removeAllEvents"]=JASSUB.prototype.removeAllEvents=function(){var self=this.ptr;_emscripten_bind_JASSUB_removeAllEvents_0(self)};JASSUB.prototype["setMemoryLimits"]=JASSUB.prototype.setMemoryLimits=function(glyph_limit,bitmap_cache_limit){var self=this.ptr;if(glyph_limit&&typeof glyph_limit==="object")glyph_limit=glyph_limit.ptr;if(bitmap_cache_limit&&typeof bitmap_cache_limit==="object")bitmap_cache_limit=bitmap_cache_limit.ptr;_emscripten_bind_JASSUB_setMemoryLimits_2(self,glyph_limit,bitmap_cache_limit)};JASSUB.prototype["renderBlend"]=JASSUB.prototype.renderBlend=function(tm,force){var self=this.ptr;if(tm&&typeof tm==="object")tm=tm.ptr;if(force&&typeof force==="object")force=force.ptr;return wrapPointer(_emscripten_bind_JASSUB_renderBlend_2(self,tm,force),RenderResult)};JASSUB.prototype["get_track"]=JASSUB.prototype.get_track=function(){var self=this.ptr;return wrapPointer(_emscripten_bind_JASSUB_get_track_0(self),ASS_Track)};JASSUB.prototype["set_track"]=JASSUB.prototype.set_track=function(arg0){var self=this.ptr;if(arg0&&typeof arg0==="object")arg0=arg0.ptr;_emscripten_bind_JASSUB_set_track_1(self,arg0)};Object.defineProperty(JASSUB.prototype,"track",{get:JASSUB.prototype.get_track,set:JASSUB.prototype.set_track});JASSUB.prototype["__destroy__"]=JASSUB.prototype.__destroy__=function(){var self=this.ptr;_emscripten_bind_JASSUB___destroy___0(self)};const encoder=new TextEncoder;const textByteLength=input=>encoder.encode(input).buffer.byteLength;Module.onRuntimeInitialized=(()=>{self.jassubObj=new Module.JASSUB;self.jassubObj.initLibrary(self.width,self.height,self.fallbackFont||null);if(self.fallbackFont)self.findAvailableFonts(self.fallbackFont);if(!self.subContent)self.subContent=read_(self.subUrl);self.processAvailableFonts(self.subContent);for(const font of self.fontFiles||[])self.asyncWrite(font);self.jassubObj.createTrackMem(self.subContent,textByteLength(self.subContent));self.jassubObj.setDropAnimations(self.dropAllAnimations);if(self.libassMemoryLimit>0||self.libassGlyphLimit>0){self.jassubObj.setMemoryLimits(self.libassGlyphLimit,self.libassMemoryLimit)}});self.out=function(text){if(text==="libass: No usable fontconfig configuration file found, using fallback."){console.debug(text)}else{console.log(text)}};self.err=function(text){if(text==="Fontconfig error: Cannot load default config file: No such file: (null)"){console.debug(text)}else{console.error(text)}};self.delay=0;self.lastCurrentTime=0;self.rate=1;self.rafId=null;self.nextIsRaf=false;self.lastCurrentTimeReceivedAt=Date.now();self.targetFps=24;self.libassMemoryLimit=0;self.dropAllAnimations=false;self.width=0;self.height=0;self.fontMap_={};self.fontId=0;let asyncRender=false;self.addFont=(data=>{self.asyncWrite(data.font)});self.findAvailableFonts=(font=>{font=font.trim().toLowerCase();if(font.startsWith("@")){font=font.substring(1)}if(self.fontMap_[font])return;self.fontMap_[font]=true;if(!self.availableFonts[font]){if(self.useLocalFonts){postMessage({target:"getLocalFont",font:font})}return}self.asyncWrite(self.availableFonts[font])});self.asyncWrite=(font=>{if(ArrayBuffer.isView(font)){self.allocFont(font)}else{readAsync(font,fontData=>{self.allocFont(new Uint8Array(fontData))},console.error)}});self.allocFont=(uint8=>{const ptr=Module._malloc(uint8.byteLength);HEAPU8.set(uint8,ptr);self.jassubObj.addFont("font-"+self.fontId++,ptr,uint8.byteLength);self.jassubObj.reloadFonts()});self.processAvailableFonts=(content=>{if(!self.availableFonts)return;const sections=parseAss(content);for(let i=0;i<sections.length;i++){for(let j=0;j<sections[i].body.length;j++){if(sections[i].body[j].key==="Style"){self.findAvailableFonts(sections[i].body[j].value.Fontname)}}}const regex=/\\fn([^\\}]*?)[\\}]/g;let matches;while((matches=regex.exec(self.subContent))!==null){self.findAvailableFonts(matches[1])}});self.setTrack=(data=>{self.processAvailableFonts(data.content);self.subContent=data.content;self.jassubObj.createTrackMem(self.subContent,textByteLength(self.subContent));self.renderLoop()});self.freeTrack=(()=>{self.jassubObj.removeTrack();self.renderLoop()});self.setTrackByUrl=(data=>{const content=read_(data.url);self.setTrack({content:content})});self.resize=((width,height)=>{self.width=width;self.height=height;if(self.offscreenCanvas){self.offscreenCanvas.width=width;self.offscreenCanvas.height=height}self.jassubObj.resizeCanvas(width,height)});self.getCurrentTime=(()=>{const diff=(Date.now()-self.lastCurrentTimeReceivedAt)/1e3;if(self._isPaused){return self.lastCurrentTime}else{if(diff>5){console.error("Didn't received currentTime > 5 seconds. Assuming video was paused.");self.setIsPaused(true)}return self.lastCurrentTime+diff*self.rate}});self.setCurrentTime=(currentTime=>{self.lastCurrentTime=currentTime;self.lastCurrentTimeReceivedAt=Date.now();if(!self.rafId){if(self.nextIsRaf){self.rafId=self.requestAnimationFrame(self.renderLoop)}else{self.renderLoop();setTimeout(()=>{self.nextIsRaf=false},20)}}});self._isPaused=true;self.setIsPaused=(isPaused=>{if(isPaused!==self._isPaused){self._isPaused=isPaused;if(isPaused){if(self.rafId){clearTimeout(self.rafId);self.rafId=null}}else{self.lastCurrentTimeReceivedAt=Date.now();self.rafId=self.requestAnimationFrame(self.renderLoop)}}});self.renderImageData=((time,force)=>{const renderStartTime=Date.now();let result=null;if(self.blendMode==="wasm"){result=self.jassubObj.renderBlend(time,force);result.times={renderTime:Date.now()-renderStartTime-result.time|0,blendTime:result.time|0}}else{result=self.jassubObj.renderImage(time,force);result.times={renderTime:Date.now()-renderStartTime-result.time|0,cppDecodeTime:result.time|0}}return result});self.processRender=(result=>{const images=[];let buffers=[];const decodeStartTime=Date.now();if(asyncRender){const promises=[];for(let image=result;image.ptr!==0;image=image.next){if(image.image){images.push({w:image.w,h:image.h,x:image.x,y:image.y});promises.push(createImageBitmap(new ImageData(HEAPU8C.subarray(image.image,image.image+image.w*image.h*4),image.w,image.h)))}}Promise.all(promises).then(bitmaps=>{for(let i=0;i<images.length;i++){images[i].image=bitmaps[i]}buffers=bitmaps;self.paintImages({images:images,buffers:buffers,times:result.times,decodeStartTime:decodeStartTime})})}else{for(let image=result;image.ptr!==0;image=image.next){if(image.image){const img={w:image.w,h:image.h,x:image.x,y:image.y,image:image.image};if(!self.offscreenCanvasCtx){const buf=buffer.slice(image.image,image.image+image.w*image.h*4);buffers.push(buf);img.image=buf}images.push(img)}}self.paintImages({images:images,buffers:buffers,times:result.times,decodeStartTime:decodeStartTime})}});self.render=((time,force)=>{const result=self.renderImageData(time,force);if(result.changed!==0||force){self.processRender(result)}else if(self.onDemandRender){postMessage({target:"unbusy"})}});self.demand=(data=>{self.lastCurrentTime=data.time;self.render(data.time)});self.renderLoop=(force=>{self.rafId=0;self.renderPending=false;self.render(self.getCurrentTime()+self.delay,force);if(!self._isPaused){self.rafId=self.requestAnimationFrame(self.renderLoop)}});self.paintImages=(data=>{data.times.decodeTime=Date.now()-data.decodeStartTime;if(self.offscreenCanvasCtx){const drawStartTime=Date.now();self.offscreenCanvasCtx.clearRect(0,0,self.offscreenCanvas.width,self.offscreenCanvas.height);for(const image of data.images){if(image.image){if(asyncRender){self.offscreenCanvasCtx.drawImage(image.image,image.x,image.y);image.image.close()}else{self.bufferCanvas.width=image.w;self.bufferCanvas.height=image.h;self.bufferCtx.putImageData(new ImageData(HEAPU8C.subarray(image.image,image.image+image.w*image.h*4),image.w,image.h),0,0);self.offscreenCanvasCtx.drawImage(self.bufferCanvas,image.x,image.y)}}}if(self.debug){data.times.drawTime=Date.now()-drawStartTime;let total=0;for(const key in data.times)total+=data.times[key];console.log("Bitmaps: "+data.images.length+" Total: "+Math.round(total)+"ms",data.times)}}else{postMessage({target:"render",async:asyncRender,images:data.images,times:data.times},data.buffers)}if(self.onDemandRender){postMessage({target:"unbusy"})}});function parseAss(content){let m,format,lastPart,parts,key,value,tmp,i,j,body;const sections=[];const lines=content.split(/[\r\n]+/g);for(i=0;i<lines.length;i++){m=lines[i].match(/^\[(.*)\]$/);if(m){format=null;sections.push({name:m[1],body:[]})}else{if(/^\s*$/.test(lines[i]))continue;if(sections.length===0)continue;body=sections[sections.length-1].body;if(lines[i][0]===";"){body.push({type:"comment",value:lines[i].substring(1)})}else{parts=lines[i].split(":");key=parts[0];value=parts.slice(1).join(":").trim();if(format||key==="Format"){value=value.split(",");if(format&&value.length>format.length){lastPart=value.slice(format.length-1).join(",");value=value.slice(0,format.length-1);value.push(lastPart)}value=value.map(s=>{return s.trim()});if(format){tmp={};for(j=0;j<value.length;j++){tmp[format[j]]=value[j]}value=tmp}}if(key==="Format"){format=value}body.push({key:key,value:value})}}}return sections}self.requestAnimationFrame=(()=>{let nextRAF=0;return func=>{const now=Date.now();if(nextRAF===0){nextRAF=now+1e3/self.targetFps}else{while(now+2>=nextRAF){nextRAF+=1e3/self.targetFps}}const delay=Math.max(nextRAF-now,0);return setTimeout(func,delay)}})();addRunDependency("worker-init");let messageBuffer=null;let messageResenderTimeout=null;function messageResender(){if(calledMain){if(messageBuffer&&messageBuffer.length>0){messageResenderTimeout=null;messageBuffer.forEach(message=>{onmessage(message)});messageBuffer=null}}else{messageResenderTimeout=setTimeout(messageResender,50)}}function _applyKeys(input,output){const vargs=Object.keys(input);for(let i=0;i<vargs.length;i++){output[vargs[i]]=input[vargs[i]]}}self.init=(data=>{self.width=data.width;self.height=data.height;self.subUrl=data.subUrl;self.subContent=data.subContent;self.fontFiles=data.fonts;self.fallbackFont=data.fallbackFont.toLowerCase();self.blendMode=data.blendMode;asyncRender=data.asyncRender;self.onDemandRender=data.onDemandRender;self.dropAllAnimations=!!data.dropAllAnimations||self.dropAllAnimations;if(asyncRender&&typeof createImageBitmap==="undefined"){asyncRender=false;console.error("'createImageBitmap' needed for 'asyncRender' unsupported!")}self.availableFonts=data.availableFonts;self.debug=data.debug;self.targetFps=data.targetFps||self.targetFps;self.libassMemoryLimit=data.libassMemoryLimit||self.libassMemoryLimit;self.libassGlyphLimit=data.libassGlyphLimit||0;self.useLocalFonts=data.useLocalFonts;removeRunDependency("worker-init");postMessage({target:"ready"})});self.canvas=(data=>{if(data.width==null)throw new Error("Invalid canvas size specified");self.resize(data.width,data.height);self.renderLoop()});self.video=(data=>{if(data.currentTime!=null)self.setCurrentTime(data.currentTime);if(data.isPaused!=null)self.setIsPaused(data.isPaused);self.rate=data.rate||self.rate});self.offscreenCanvas=(data=>{self.offscreenCanvas=data.transferable[0];self.offscreenCanvasCtx=self.offscreenCanvas.getContext("2d",{desynchronized:true});if(!asyncRender){self.bufferCanvas=new OffscreenCanvas(self.height,self.width);self.bufferCtx=self.bufferCanvas.getContext("2d",{desynchronized:true})}});self.destroy=(()=>{self.jassubObj.quitLibrary()});self.createEvent=(data=>{_applyKeys(data.event,self.jassubObj.track.get_events(self.jassubObj.allocEvent()))});self.getEvents=(()=>{const events=[];for(let i=0;i<self.jassubObj.getEventCount();i++){const evntPtr=self.jassubObj.track.get_events(i);events.push({Start:evntPtr.get_Start(),Duration:evntPtr.get_Duration(),ReadOrder:evntPtr.get_ReadOrder(),Layer:evntPtr.get_Layer(),Style:evntPtr.get_Style(),Name:evntPtr.get_Name(),MarginL:evntPtr.get_MarginL(),MarginR:evntPtr.get_MarginR(),MarginV:evntPtr.get_MarginV(),Effect:evntPtr.get_Effect(),Text:evntPtr.get_Text()})}postMessage({target:"getEvents",events:events})});self.setEvent=(data=>{_applyKeys(data.event,self.jassubObj.track.get_events(data.index))});self.removeEvent=(data=>{self.jassubObj.removeEvent(data.index)});self.createStyle=(data=>{_applyKeys(data.style,self.jassubObj.track.get_styles(self.jassubObj.allocStyle()))});self.getStyles=(()=>{const styles=[];for(let i=0;i<self.jassubObj.getStyleCount();i++){const stylPtr=self.jassubObj.track.get_styles(i);styles.push({Name:stylPtr.get_Name(),FontName:stylPtr.get_FontName(),FontSize:stylPtr.get_FontSize(),PrimaryColour:stylPtr.get_PrimaryColour(),SecondaryColour:stylPtr.get_SecondaryColour(),OutlineColour:stylPtr.get_OutlineColour(),BackColour:stylPtr.get_BackColour(),Bold:stylPtr.get_Bold(),Italic:stylPtr.get_Italic(),Underline:stylPtr.get_Underline(),StrikeOut:stylPtr.get_StrikeOut(),ScaleX:stylPtr.get_ScaleX(),ScaleY:stylPtr.get_ScaleY(),Spacing:stylPtr.get_Spacing(),Angle:stylPtr.get_Angle(),BorderStyle:stylPtr.get_BorderStyle(),Outline:stylPtr.get_Outline(),Shadow:stylPtr.get_Shadow(),Alignment:stylPtr.get_Alignment(),MarginL:stylPtr.get_MarginL(),MarginR:stylPtr.get_MarginR(),MarginV:stylPtr.get_MarginV(),Encoding:stylPtr.get_Encoding(),treat_fontname_as_pattern:stylPtr.get_treat_fontname_as_pattern(),Blur:stylPtr.get_Blur(),Justify:stylPtr.get_Justify()})}postMessage({target:"getStyles",time:Date.now(),styles:styles})});self.setStyle=(data=>{_applyKeys(data.style,self.jassubObj.track.get_styles(data.index))});self.removeStyle=(data=>{self.jassubObj.removeStyle(data.index)});onmessage=(message=>{if(!calledMain&&!message.data.preMain){if(!messageBuffer){messageBuffer=[];messageResenderTimeout=setTimeout(messageResender,50)}messageBuffer.push(message);return}if(calledMain&&messageResenderTimeout){clearTimeout(messageResenderTimeout);messageResender()}const data=message.data;if(self[data.target]){self[data.target](data)}else{throw new Error("Unknown event target "+message.data.target)}});let HEAPU8C=null;self.updateGlobalBufferAndViews=(_super=>{return buf=>{_super(buf);HEAPU8C=new Uint8ClampedArray(buf)}})(self.updateGlobalBufferAndViews);
1
+ var Module=Module;var out=text=>console.log(text);var err=text=>console.error(text);function ready(){}function assert(c,m){if(!c)throw m}if(!String.prototype.startsWith){String.prototype.startsWith=function(s,p){if(p===undefined){p=0}return this.substring(p,s.length)===s}}if(!String.prototype.includes){String.prototype.includes=function(s,p){return this.indexOf(s,p)!==-1}}if(!ArrayBuffer.isView){const typedArrays=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];ArrayBuffer.isView=o=>o&&o.constructor&&typedArrays.indexOf(o.constructor)!==-1}if(!Uint8Array.prototype.slice){Uint8Array.prototype.slice=function(b,e){return new Uint8Array(this.subarray(b,e))}}Date.now=Date.now||(()=>(new Date).getTime());if(typeof console==="undefined"){const postConsoleMessage=(command,a)=>{postMessage({target:"console",command:command,content:JSON.stringify(Array.prototype.slice.call(a))})};console={log:function(){postConsoleMessage("log",arguments)},debug:function(){postConsoleMessage("debug",arguments)},info:function(){postConsoleMessage("info",arguments)},warn:function(){postConsoleMessage("warn",arguments)},error:function(){postConsoleMessage("error",arguments)}};console.log("overridden console")}const read_=(url,ab)=>{const xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType=ab?"arraybuffer":"text";xhr.send(null);return xhr.response};const readAsync=(url,load,err)=>{const xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if((xhr.status===200||xhr.status===0)&&xhr.response){return load(xhr.response)}err()};xhr.onerror=err;xhr.send(null)};Module={wasm:!WebAssembly.instantiateStreaming&&read_("jassub-worker.wasm",true)};self.ready=()=>postMessage({target:"ready"});self.out=text=>{if(text==="libass: No usable fontconfig configuration file found, using fallback."){console.debug(text)}else{console.log(text)}};self.err=text=>{if(text==="Fontconfig error: Cannot load default config file: No such file: (null)"){console.debug(text)}else{console.error(text)}};let lastCurrentTime=0;const rate=1;let rafId=null;let nextIsRaf=false;let lastCurrentTimeReceivedAt=Date.now();let targetFps=24;let useLocalFonts=false;let blendMode="js";let availableFonts={};const fontMap_={};let fontId=0;let debug;self.width=0;self.height=0;let asyncRender=false;self.addFont=({font:font})=>asyncWrite(font);const findAvailableFonts=font=>{font=font.trim().toLowerCase();if(font.startsWith("@"))font=font.substring(1);if(fontMap_[font])return;fontMap_[font]=true;if(!availableFonts[font]&&useLocalFonts){return postMessage({target:"getLocalFont",font:font})}asyncWrite(availableFonts[font])};const asyncWrite=font=>{if(ArrayBuffer.isView(font)){allocFont(font)}else{readAsync(font,fontData=>{allocFont(new Uint8Array(fontData))},console.error)}};const allocFont=uint8=>{const ptr=_malloc(uint8.byteLength);HEAPU8.set(uint8,ptr);self.jassubObj.addFont("font-"+fontId++,ptr,uint8.byteLength);self.jassubObj.reloadFonts()};const processAvailableFonts=content=>{if(!availableFonts)return;const sections=parseAss(content);for(let i=0;i<sections.length;i++){for(let j=0;j<sections[i].body.length;j++){if(sections[i].body[j].key==="Style"){findAvailableFonts(sections[i].body[j].value.Fontname)}}}const regex=/\\fn([^\\}]*?)[\\}]/g;let matches;while((matches=regex.exec(content))!==null){findAvailableFonts(matches[1])}};self.setTrack=({content:content})=>{processAvailableFonts(content);self.jassubObj.createTrackMem(content)};self.freeTrack=()=>{self.jassubObj.removeTrack()};self.setTrackByUrl=({url:url})=>{self.setTrack({content:read_(url)})};const resize=(width,height)=>{self.width=width;self.height=height;self.jassubObj.resizeCanvas(width,height)};const getCurrentTime=()=>{const diff=(Date.now()-lastCurrentTimeReceivedAt)/1e3;if(_isPaused){return lastCurrentTime}else{if(diff>5){console.error("Didn't received currentTime > 5 seconds. Assuming video was paused.");setIsPaused(true)}return lastCurrentTime+diff*rate}};const setCurrentTime=currentTime=>{lastCurrentTime=currentTime;lastCurrentTimeReceivedAt=Date.now();if(!rafId){if(nextIsRaf){rafId=requestAnimationFrame(renderLoop)}else{renderLoop();setTimeout(()=>{nextIsRaf=false},20)}}};let _isPaused=true;const setIsPaused=isPaused=>{if(isPaused!==_isPaused){_isPaused=isPaused;if(isPaused){if(rafId){clearTimeout(rafId);rafId=null}}else{lastCurrentTimeReceivedAt=Date.now();rafId=requestAnimationFrame(renderLoop)}}};const render=(time,force)=>{const renderStartTime=Date.now();let result=null;if(blendMode==="wasm"){result=self.jassubObj.renderBlend(time,force);if(result){result.times={renderTime:Date.now()-renderStartTime-(result&&result.time)|0,blendTime:(result&&result.time)|0}}}else{result=self.jassubObj.renderImage(time,force);if(result){result.times={renderTime:Date.now()-renderStartTime-(result&&result.time)|0,cppDecodeTime:(result&&result.time)|0}}}if(result&&(self.jassubObj.changed!==0||force)){const images=[];let buffers=[];const decodeStartTime=Date.now();if(asyncRender){const promises=[];for(let image=result,i=0;i<self.jassubObj.count;image=image.next,++i){if(image.image){images.push({w:image.w,h:image.h,x:image.x,y:image.y});promises.push(createImageBitmap(new ImageData(HEAPU8C.subarray(image.image,image.image+image.w*image.h*4),image.w,image.h)))}}Promise.all(promises).then(bitmaps=>{for(let i=0;i<images.length;i++){images[i].image=bitmaps[i]}buffers=bitmaps;paintImages({images:images,buffers:buffers,times:result.times,decodeStartTime:decodeStartTime})})}else{for(let image=result,i=0;i<self.jassubObj.count;image=image.next,++i){if(image.image){const img={w:image.w,h:image.h,x:image.x,y:image.y,image:image.image};if(!offCanvasCtx){const buf=buffer.slice(image.image,image.image+image.w*image.h*4);buffers.push(buf);img.image=buf}images.push(img)}}paintImages({images:images,buffers:buffers,times:result.times,decodeStartTime:decodeStartTime})}}else{postMessage({target:"unbusy"})}};self.demand=({time:time})=>{lastCurrentTime=time;render(time)};const renderLoop=force=>{rafId=0;render(getCurrentTime(),force);if(!_isPaused){rafId=requestAnimationFrame(renderLoop)}};const paintImages=({times:times,images:images,decodeStartTime:decodeStartTime,buffers:buffers})=>{times.decodeTime=Date.now()-decodeStartTime;if(offCanvasCtx){const drawStartTime=Date.now();offCanvas.width=self.width;if(offCanvas.height!==self.height){offCanvas.height=self.height}else{offCanvasCtx.clearRect(0,0,self.width,self.height)}for(const image of images){if(image.image){if(asyncRender){offCanvasCtx.drawImage(image.image,image.x,image.y);image.image.close()}else{self.bufferCanvas.width=image.w;self.bufferCanvas.height=image.h;self.bufferCtx.putImageData(new ImageData(HEAPU8C.subarray(image.image,image.image+image.w*image.h*4),image.w,image.h),0,0);offCanvasCtx.drawImage(self.bufferCanvas,image.x,image.y)}}}if(debug){times.drawTime=Date.now()-drawStartTime;let total=0;for(const key in times)total+=times[key];console.log("Bitmaps: "+images.length+" Total: "+Math.round(total)+"ms",times)}postMessage({target:"unbusy"})}else{postMessage({target:"render",async:asyncRender,images:images,times:times,width:self.width,height:self.height},buffers)}};const parseAss=content=>{let m,format,lastPart,parts,key,value,tmp,i,j,body;const sections=[];const lines=content.split(/[\r\n]+/g);for(i=0;i<lines.length;i++){m=lines[i].match(/^\[(.*)\]$/);if(m){format=null;sections.push({name:m[1],body:[]})}else{if(/^\s*$/.test(lines[i]))continue;if(sections.length===0)continue;body=sections[sections.length-1].body;if(lines[i][0]===";"){body.push({type:"comment",value:lines[i].substring(1)})}else{parts=lines[i].split(":");key=parts[0];value=parts.slice(1).join(":").trim();if(format||key==="Format"){value=value.split(",");if(format&&value.length>format.length){lastPart=value.slice(format.length-1).join(",");value=value.slice(0,format.length-1);value.push(lastPart)}value=value.map(s=>{return s.trim()});if(format){tmp={};for(j=0;j<value.length;j++){tmp[format[j]]=value[j]}value=tmp}}if(key==="Format"){format=value}body.push({key:key,value:value})}}}return sections};const requestAnimationFrame=(()=>{let nextRAF=0;return func=>{const now=Date.now();if(nextRAF===0){nextRAF=now+1e3/targetFps}else{while(now+2>=nextRAF){nextRAF+=1e3/targetFps}}const delay=Math.max(nextRAF-now,0);return setTimeout(func,delay)}})();const _applyKeys=(input,output)=>{for(const v of Object.keys(input)){output[v]=input[v]}};self.init=data=>{self.width=data.width;self.height=data.height;blendMode=data.blendMode;asyncRender=data.asyncRender;if(asyncRender&&typeof createImageBitmap==="undefined"){asyncRender=false;console.error("'createImageBitmap' needed for 'asyncRender' unsupported!")}availableFonts=data.availableFonts;debug=data.debug;targetFps=data.targetFps||targetFps;useLocalFonts=data.useLocalFonts;const fallbackFont=data.fallbackFont.toLowerCase();self.jassubObj=new Module.JASSUB(self.width,self.height,fallbackFont||null);if(fallbackFont)findAvailableFonts(fallbackFont);let subContent=data.subContent;if(!subContent)subContent=read_(data.subUrl);processAvailableFonts(subContent);for(const font of data.fonts||[])asyncWrite(font);self.jassubObj.createTrackMem(subContent);self.jassubObj.setDropAnimations(data.dropAllAnimations);if(data.libassMemoryLimit>0||data.libassGlyphLimit>0){self.jassubObj.setMemoryLimits(data.libassGlyphLimit||0,data.libassMemoryLimit||0)}};self.canvas=({width:width,height:height,force:force})=>{if(width==null)throw new Error("Invalid canvas size specified");resize(width,height,force);if(force)render(lastCurrentTime)};self.video=({currentTime:currentTime,isPaused:isPaused,rate:rate})=>{if(currentTime!=null)setCurrentTime(currentTime);if(isPaused!=null)setIsPaused(isPaused);rate=rate||rate};let offCanvas;let offCanvasCtx;self.offscreenCanvas=({transferable:transferable})=>{offCanvas=transferable[0];offCanvasCtx=offCanvas.getContext("2d",{desynchronized:true});if(!asyncRender){self.bufferCanvas=new OffscreenCanvas(self.height,self.width);self.bufferCtx=self.bufferCanvas.getContext("2d",{desynchronized:true})}};self.destroy=()=>{self.jassubObj.quitLibrary()};self.createEvent=({event:event})=>{_applyKeys(event,self.jassubObj.getEvent(self.jassubObj.allocEvent()))};self.getEvents=()=>{const events=[];for(let i=0;i<self.jassubObj.getEventCount();i++){const{Start:Start,Duration:Duration,ReadOrder:ReadOrder,Layer:Layer,Style:Style,MarginL:MarginL,MarginR:MarginR,MarginV:MarginV,Name:Name,Text:Text,Effect:Effect}=self.jassubObj.getEvent(i);events.push({Start:Start,Duration:Duration,ReadOrder:ReadOrder,Layer:Layer,Style:Style,MarginL:MarginL,MarginR:MarginR,MarginV:MarginV,Name:Name,Text:Text,Effect:Effect})}postMessage({target:"getEvents",events:events})};self.setEvent=({event:event,index:index})=>{_applyKeys(event,self.jassubObj.getEvent(index))};self.removeEvent=({index:index})=>{self.jassubObj.removeEvent(index)};self.createStyle=({style:style})=>{_applyKeys(style,self.jassubObj.getStyle(self.jassubObj.allocStyle()))};self.getStyles=()=>{const styles=[];for(let i=0;i<self.jassubObj.getStyleCount();i++){const{Name:Name,FontName:FontName,FontSize:FontSize,PrimaryColour:PrimaryColour,SecondaryColour:SecondaryColour,OutlineColour:OutlineColour,BackColour:BackColour,Bold:Bold,Italic:Italic,Underline:Underline,StrikeOut:StrikeOut,ScaleX:ScaleX,ScaleY:ScaleY,Spacing:Spacing,Angle:Angle,BorderStyle:BorderStyle,Outline:Outline,Shadow:Shadow,Alignment:Alignment,MarginL:MarginL,MarginR:MarginR,MarginV:MarginV,Encoding:Encoding,treat_fontname_as_pattern:treat_fontname_as_pattern,Blur:Blur,Justify:Justify}=self.jassubObj.getStyle(i);styles.push({Name:Name,FontName:FontName,FontSize:FontSize,PrimaryColour:PrimaryColour,SecondaryColour:SecondaryColour,OutlineColour:OutlineColour,BackColour:BackColour,Bold:Bold,Italic:Italic,Underline:Underline,StrikeOut:StrikeOut,ScaleX:ScaleX,ScaleY:ScaleY,Spacing:Spacing,Angle:Angle,BorderStyle:BorderStyle,Outline:Outline,Shadow:Shadow,Alignment:Alignment,MarginL:MarginL,MarginR:MarginR,MarginV:MarginV,Encoding:Encoding,treat_fontname_as_pattern:treat_fontname_as_pattern,Blur:Blur,Justify:Justify})}postMessage({target:"getStyles",time:Date.now(),styles:styles})};self.setStyle=({style:style,index:index})=>{_applyKeys(style,self.jassubObj.getStyle(index))};self.removeStyle=({index:index})=>{self.jassubObj.removeStyle(index)};onmessage=({data:data})=>{if(self[data.target]){self[data.target](data)}else{throw new Error("Unknown event target "+data.target)}};let HEAPU8C=null;self.updateGlobalBufferAndViews=(_super=>{return buf=>{_super(buf);HEAPU8C=new Uint8ClampedArray(buf)}})(self.updateGlobalBufferAndViews);function abort(what){throw what}var UTF8Decoder=new TextDecoder("utf8");function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;return UTF8Decoder.decode(heapOrArray.buffer?heapOrArray.subarray(idx,endPtr):new Uint8Array(heapOrArray.slice(idx,endPtr)))}function UTF8ToString(ptr,maxBytesToRead){if(!ptr)return"";var maxPtr=ptr+maxBytesToRead;for(var end=ptr;!(end>=maxPtr)&&HEAPU8[end];)++end;return UTF8Decoder.decode(HEAPU8.subarray(ptr,end))}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len}var HEAP8,HEAP16,HEAP32,HEAPU8,HEAPU16,HEAPU32,HEAPF32,HEAPF64,wasmMemory,buffer,wasmTable;function updateGlobalBufferAndViews(b){buffer=b;HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);HEAP32=new Int32Array(b);HEAPU8=new Uint8Array(b);HEAPU16=new Uint16Array(b);HEAPU32=new Uint32Array(b);HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b)}function ___assert_fail(condition,filename,line,func){abort("Assertion failed: "+UTF8ToString(condition)+", at: "+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])}var SYSCALLS={varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret}};function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;return 0}function ___syscall_getdents64(fd,dirp,count){}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;return 0}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs}function __embind_register_bigint(primitiveType,name,size,minRange,maxRange){}function getShiftFromSize(size){switch(size){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+size)}}function embind_init_charCodes(){var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes}var embind_charCodes=undefined;function readLatin1String(ptr){var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name}return name}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+"() {\n"+' "use strict";'+" return body.apply(this, arguments);\n"+"};\n")(body)}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+": "+this.message}};return errorClass}var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i<myTypes.length;++i){registerType(myTypes[i],myTypeConverters[i])}}var typeConverters=new Array(dependentTypes.length);var unregisteredTypes=[];var registered=0;dependentTypes.forEach((dt,i)=>{if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}var name=registeredInstance.name;if(!rawType){throwBindingError('type "'+name+'" must have a positive integer typeid pointer')}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError("Cannot register type '"+name+"' twice")}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":8,"readValueFromPointer":function(pointer){var heap;if(size===1){heap=HEAP8}else if(size===2){heap=HEAP16}else if(size===4){heap=HEAP32}else{throw new TypeError("Unknown boolean type size: "+name)}return this["fromWireType"](heap[pointer>>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")}var finalizationRegistry=false;function detachFinalizer(handle){}function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}var registeredPointers={};function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}}var delayFunction=undefined;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function attachFinalizer(handle){if("undefined"===typeof FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater}function ClassHandle(){}function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError("Cannot register public name '"+name+"' twice")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(function(){clonedHandle["delete"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]()}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&&registeredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){var f=dynCalls[sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func}function dynCall(sig,ptr,args){if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn}function getDynCaller(sig,ptr){var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache)}}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction)}return getWasmTableEntry(rawFunction)}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError("unknown function pointer with signature "+signature+": "+rawFunction)}return fp}var UnboundTypeError=undefined;function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv}function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(message+": "+unboundTypes.map(getTypeName).join([", "]))}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError("Cannot construct "+name+" due to unbound types",[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+" has no accessible constructor")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError("Tried to invoke ctor of "+name+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(registeredClass.constructor_body).toString()+") parameters instead!")}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})}function heap32VectorToArray(count,firstElement){var array=[];for(var i=0;i<count;i++){array.push(HEAPU32[firstElement+i*4>>2])}return array}function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError("new_ called with constructor type "+typeof constructor+" which is not a function")}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i<argTypes.length;++i){if(argTypes[i]!==null&&argTypes[i].destructorFunction===undefined){needsDestructorStack=true;break}}var returns=argTypes[0].name!=="void";var argsList="";var argsListWired="";for(var i=0;i<argCount-2;++i){argsList+=(i!==0?", ":"")+"arg"+i;argsListWired+=(i!==0?", ":"")+"arg"+i+"Wired"}var invokerFnBody="return function "+makeLegalFunctionName(humanName)+"("+argsList+") {\n"+"if (arguments.length !== "+(argCount-2)+") {\n"+"throwBindingError('function "+humanName+" called with ' + arguments.length + ' arguments, expected "+(argCount-2)+" args!');\n"+"}\n";if(needsDestructorStack){invokerFnBody+="var destructors = [];\n"}var dtorStack=needsDestructorStack?"destructors":"null";var args1=["throwBindingError","invoker","fn","runDestructors","retType","classParam"];var args2=[throwBindingError,cppInvokerFunc,cppTargetFunc,runDestructors,argTypes[0],argTypes[1]];if(isClassMethodFunc){invokerFnBody+="var thisWired = classParam.toWireType("+dtorStack+", this);\n"}for(var i=0;i<argCount-2;++i){invokerFnBody+="var arg"+i+"Wired = argType"+i+".toWireType("+dtorStack+", arg"+i+"); // "+argTypes[i+2].name+"\n";args1.push("argType"+i);args2.push(argTypes[i+2])}if(isClassMethodFunc){argsListWired="thisWired"+(argsListWired.length>0?", ":"")+argsListWired}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i<argTypes.length;++i){var paramName=i===1?"thisWired":"arg"+(i-2)+"Wired";if(argTypes[i].destructorFunction!==null){invokerFnBody+=paramName+"_dtor("+paramName+"); // "+argTypes[i].name+"\n";args1.push(paramName+"_dtor");args2.push(argTypes[i].destructorFunction)}}}if(returns){invokerFnBody+="var ret = retType.fromWireType(rv);\n"+"return ret;\n"}else{}invokerFnBody+="}\n";args1.push(invokerFnBody);var invokerFunction=new_(Function,args1).apply(null,args2);return invokerFunction}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!")}classType.registeredClass.constructor_body[argCount-1]=()=>{throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})}function validateThis(this_,classType,humanName){if(!(this_ instanceof Object)){throwBindingError(humanName+' with invalid "this": '+this_)}if(!(this_ instanceof classType.registeredClass.constructor)){throwBindingError(humanName+' incompatible with "this" of type '+this_.constructor.name)}if(!this_.$$.ptr){throwBindingError("cannot call emscripten binding method "+humanName+" on deleted object")}return upcastPointer(this_.$$.ptr,this_.$$.ptrType.registeredClass,classType.registeredClass)}function __embind_register_class_property(classType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){fieldName=readLatin1String(fieldName);getter=embind__requireFunction(getterSignature,getter);whenDependentTypesAreResolved([],[classType],function(classType){classType=classType[0];var humanName=classType.name+"."+fieldName;var desc={get:function(){throwUnboundTypeError("Cannot access "+humanName+" due to unbound types",[getterReturnType,setterArgumentType])},enumerable:true,configurable:true};if(setter){desc.set=()=>{throwUnboundTypeError("Cannot access "+humanName+" due to unbound types",[getterReturnType,setterArgumentType])}}else{desc.set=v=>{throwBindingError(humanName+" is a read-only property")}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);whenDependentTypesAreResolved([],setter?[getterReturnType,setterArgumentType]:[getterReturnType],function(types){var getterReturnType=types[0];var desc={get:function(){var ptr=validateThis(this,classType,humanName+" getter");return getterReturnType["fromWireType"](getter(getterContext,ptr))},enumerable:true};if(setter){setter=embind__requireFunction(setterSignature,setter);var setterArgumentType=types[1];desc.set=function(v){var ptr=validateThis(this,classType,humanName+" setter");var destructors=[];setter(setterContext,ptr,setterArgumentType["toWireType"](destructors,v));runDestructors(destructors)}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);return[]});return[]})}var emval_free_list=[];var emval_handle_array=[{},{value:undefined},{value:null},{value:true},{value:false}];function __emval_decref(handle){if(handle>4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function count_emval_handles(){var count=0;for(var i=5;i<emval_handle_array.length;++i){if(emval_handle_array[i]!==undefined){++count}}return count}function get_first_emval(){for(var i=5;i<emval_handle_array.length;++i){if(emval_handle_array[i]!==undefined){return emval_handle_array[i]}}return null}function init_emval(){Module["count_emval_handles"]=count_emval_handles;Module["get_first_emval"]=get_first_emval}var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handle_array[handle].value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{var handle=emval_free_list.length?emval_free_list.pop():emval_handle_array.length;emval_handle_array[handle]={refcount:1,value:value};return handle}}}};function __embind_register_emval(rawType,name){name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(handle){var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":function(destructors,value){return Emval.toHandle(value)},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})}function embindRepr(v){if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError("Unknown float type: "+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(value){return value},"toWireType":function(destructors,value){return value},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<<bitshift>>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i<length;++i){a[i]=String.fromCharCode(HEAPU8[payload+i])}str=a.join("")}_free(value);return str},"toWireType":function(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value)}var length;var valueIsOfTypeString=typeof value=="string";if(!(valueIsOfTypeString||value instanceof Uint8Array||value instanceof Uint8ClampedArray||value instanceof Int8Array)){throwBindingError("Cannot pass non-string to std::string")}if(stdStringIsUTF8&&valueIsOfTypeString){length=lengthBytesUTF8(value)}else{length=value.length}var base=_malloc(4+length+1);var ptr=base+4;HEAPU32[base>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i<length;++i){var charCode=value.charCodeAt(i);if(charCode>255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i<length;++i){HEAPU8[ptr+i]=value[i]}}}if(destructors!==null){destructors.push(_free,base)}return base},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}var UTF16Decoder=new TextDecoder("utf-16le");function UTF16ToString(ptr,maxBytesToRead){var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite<str.length*2?maxBytesToWrite/2:str.length;for(var i=0;i<numCharsToWrite;++i){var codeUnit=str.charCodeAt(i);HEAP16[outPtr>>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i<str.length;++i){var codeUnit=str.charCodeAt(i);if(codeUnit>=55296&&codeUnit<=57343)++i;len+=4}return len}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":function(destructors,value){if(!(typeof value=="string")){throwBindingError("Cannot pass non-string to C++ string type "+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":function(){return undefined},"toWireType":function(destructors,o){return undefined}})}function __emscripten_throw_longjmp(){throw Infinity}function __emval_incref(handle){if(handle>4){emval_handle_array[handle].refcount+=1}}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl}function __emval_take_value(type,arg){type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](arg);return Emval.toHandle(v)}function _abort(){abort("")}var _emscripten_get_now;_emscripten_get_now=()=>performance.now();function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}function _proc_exit(code){throw"exit("+code+")"}var _exit=_proc_exit;function _fd_close(fd){return 52}function _fd_read(fd,iov,iovcnt,pnum){return 52}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){return 70}var printCharBuffers=[null,[],[]];function printChar(stream,curr){var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}}function _fd_write(fd,iov,iovcnt,pnum){var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j])}num+=len}HEAPU32[pnum>>2]=num;return 0}embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");InternalError=Module["InternalError"]=extendError(Error,"InternalError");init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var asmLibraryArg={"a":___assert_fail,"n":___syscall_fcntl64,"A":___syscall_getdents64,"E":___syscall_ioctl,"l":___syscall_openat,"u":__embind_register_bigint,"G":__embind_register_bool,"g":__embind_register_class,"m":__embind_register_class_constructor,"c":__embind_register_class_function,"b":__embind_register_class_property,"F":__embind_register_emval,"o":__embind_register_float,"f":__embind_register_integer,"d":__embind_register_memory_view,"p":__embind_register_std_string,"k":__embind_register_std_wstring,"H":__embind_register_void,"y":__emscripten_throw_longjmp,"r":__emval_decref,"s":__emval_incref,"q":__emval_take_value,"e":_abort,"h":_emscripten_get_now,"B":_emscripten_memcpy_big,"z":_emscripten_resize_heap,"i":_exit,"j":_fd_close,"D":_fd_read,"t":_fd_seek,"C":_fd_write,"x":invoke_iii,"v":invoke_iiii,"w":invoke_iiiii};function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function initRuntime(asm){asm["J"]()}var imports={"a":asmLibraryArg};var _malloc,_free,___getTypeName,__embind_initialize_bindings,_setThrew,_saveSetjmp,stackSave,stackRestore,stackAlloc,dynCall_jiji,dynCall_jij,dynCall_viiiiji;(WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(fetch("jassub-worker.wasm"),imports):WebAssembly.instantiate(Module["wasm"],imports)).then(function(output){asm=(output.instance||output).exports;_malloc=asm["K"];_free=asm["L"];___getTypeName=asm["M"];__embind_initialize_bindings=asm["N"];_setThrew=asm["P"];_saveSetjmp=asm["Q"];stackSave=asm["R"];stackRestore=asm["S"];stackAlloc=asm["T"];dynCall_jiji=asm["U"];dynCall_jij=asm["V"];dynCall_viiiiji=asm["W"];wasmTable=asm["O"];wasmMemory=asm["I"];updateGlobalBufferAndViews(wasmMemory.buffer);initRuntime(asm);ready()});
Binary file