
var KgmCryptoModule = (function() {
  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
  return (
function(KgmCryptoModule) {
  KgmCryptoModule = KgmCryptoModule || {};

var Module=typeof KgmCryptoModule!=="undefined"?KgmCryptoModule:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});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=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;var toLog=e;err("exiting due to exception: "+toLog)}var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=function shell_read(filename,binary){var ret=tryParseAsDataURI(filename);if(ret){return binary?ret:ret.toString()}if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);return nodeFS["readFileSync"](filename,binary?null:"utf8")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};readAsync=function readAsync(filename,onload,onerror){var ret=tryParseAsDataURI(filename);if(ret){onload(ret)}if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);nodeFS["readFile"](filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",function(reason){throw reason});quit_=function(status,toThrow){if(keepRuntimeAlive()){process["exitCode"]=status;throw toThrow}logExceptionOnExit(toThrow);process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else 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(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){readBinary=function(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}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}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);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;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;var WebAssembly={Memory:function(opts){this.buffer=new ArrayBuffer(opts["initial"]*65536)},Module:function(binary){},Instance:function(module,info){this.exports=(
// EMSCRIPTEN_START_ASM
function instantiate(ea){function c(d){d.set=function(a,b){this[a]=b};d.get=function(a){return this[a]};return d}var e;var f=new Uint8Array(123);for(var a=25;a>=0;--a){f[48+a]=52+a;f[65+a]=a;f[97+a]=26+a}f[43]=62;f[47]=63;function l(m,n,o){var g,h,a=0,i=n,j=o.length,k=n+(j*3>>2)-(o[j-2]=="=")-(o[j-1]=="=");for(;a<j;a+=4){g=f[o.charCodeAt(a+1)];h=f[o.charCodeAt(a+2)];m[i++]=f[o.charCodeAt(a)]<<2|g>>4;if(i<k)m[i++]=g<<4|h>>2;if(i<k)m[i++]=h<<6|f[o.charCodeAt(a+3)]}}function p(q){l(e,1024,"dW5zaWduZWQgc2hvcnQAdW5zaWduZWQgaW50AGZsb2F0AHVpbnQ2NF90AHZwcgB1bnNpZ25lZCBjaGFyAGJvb2wAZW1zY3JpcHRlbjo6dmFsAHVuc2lnbmVkIGxvbmcAc3RkOjp3c3RyaW5nAGJhc2ljX3N0cmluZwBzdGQ6OnN0cmluZwBzdGQ6OnUxNnN0cmluZwBzdGQ6OnUzMnN0cmluZwBkb3VibGUAdm9pZABwcmVEZWMAZGVjQmxvYgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxzaG9ydD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dW5zaWduZWQgc2hvcnQ+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGludD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dW5zaWduZWQgaW50PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxmbG9hdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dWludDhfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50OF90PgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1aW50MTZfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8aW50MTZfdD4AZW1zY3JpcHRlbjo6bWVtb3J5X3ZpZXc8dWludDMyX3Q+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGludDMyX3Q+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PGNoYXI+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHVuc2lnbmVkIGNoYXI+AHN0ZDo6YmFzaWNfc3RyaW5nPHVuc2lnbmVkIGNoYXI+AGVtc2NyaXB0ZW46Om1lbW9yeV92aWV3PHNpZ25lZCBjaGFyPgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxsb25nPgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzx1bnNpZ25lZCBsb25nPgBlbXNjcmlwdGVuOjptZW1vcnlfdmlldzxkb3VibGU+ACXf6KZ1HnUOL4DzLbi24xE=");l(e,1857,"ASEBYQEhAeEBIQFhASEB0iMCAkJCAgLCwgICQkICAtPTAgNjQ2MD48PjA2NDYwOUtJRlBAQEBISEhIQEBAQElZWVlQQFJQXlhaWF5QUlBda2lrbWJwYGxsaGhsbGBgbX15eX19cGB+fH54fnx+cHGDgYeBg4GOkICAgICAgICBkZGRkZGRkZCAkpCWkJKQnaOho6WjoaOtorCgpKSgoK29sbG1tbGxvb2woLa0trC5y8nHwcPBx8nLycbQwMDAydnZ2dHR0dHZ2dnZ0MDS0N3r6evt4+Hj7evp6+3i8ODt/fn5/f3x8f39+fn9/fDg8AIABgACAA4AAgAGAAIADx");l(e,2129,"ASMBZwEjAe8BIwFnASMB3yECAkZGAgLOzgICRkYCAt7eAgNlR2UD7c/tA2VHZQOdv51jBAQEBIyMjIwEBAQEnJycnAQFJwXrja+N6wUnBdu9n73bJQYGysqOjsrKBgba2p6e2toGB+nL6Y/py+kHGTsZfxk7GecICAgICAgICBgYGBgYGBgYCAkrCW8JKwnXORs5XzkbOdcpCgpOTgoK1tYaGl5eGhrW1goLbU9tC5W3lXsdPx17lbeVawwMDAyUlJSUHBwcHJSUlJQMDS8N07WXtdM9Hz3TtZe10y0ODtLSlpbS0h4e0tKWltLSDg8AIgBmACIA7gAiAGYAIgD+uNU9sumveIyDM3FRdqDNNy8+NY2pvpi354wizlph32hpif6ltt6pd/zIvb3lbT5aNu9pTr7h6WYc89kCtvISm0TQb7k1ibZGbXOCBmnB7deFwjDfomK+eS1iYj0Nfr5IiSMCoOTVdVEyAlP9FjohOxYPw7K7s+K6Oj0T7PYBRYSlcA+TSQxkzTHVzEwHAZ4AGiOQv4geO6umPsRzRxB+O1684wCE/wnU4IkPW1hwT/tl2FxTG9PIxr/vmLBQTw/q5YNYjCgshGfN0J5H2ydQyvRjY+iXfxtLDMLBIUzMWPWUUqPz0+Bo9AAj814Ke5PdqxKyE+iE16efDzJMVR0ENlLcA/P5TkLpPWHvfLazk1CYDwAAmA8AAJgPAADgCgAATlN0M19fMjEyYmFzaWNfc3RyaW5nSWNOU18xMWNoYXJfdHJhaXRzSWNFRU5TXzlhbGxvY2F0b3JJY0VFRUUATlN0M19fMjIxX19iYXNpY19zdHJpbmdfY29tbW9uSUxiMUVFRQAAAADYDwAArwoAAFwQAABwCgAAAAAAAAEAAADYCgAAAAAAAGlpaWlpAAAAIA8AAJgPAACYDwAAmA8AAHZpaWlpAE5TdDNfXzIxMmJhc2ljX3N0cmluZ0loTlNfMTFjaGFyX3RyYWl0c0loRUVOU185YWxsb2NhdG9ySWhFRUVFAAAAAFwQAAAWCwAAAAAAAAEAAADYCgAAAAAAAE5TdDNfXzIxMmJhc2ljX3N0cmluZ0l3TlNfMTFjaGFyX3RyYWl0c0l3RUVOU185YWxsb2NhdG9ySXdFRUVFAABcEAAAcAsAAAAAAAABAAAA2AoAAAAAAABOU3QzX18yMTJiYXNpY19zdHJpbmdJRHNOU18xMWNoYXJfdHJhaXRzSURzRUVOU185YWxsb2NhdG9ySURzRUVFRQAAAFwQAADICwAAAAAAAAEAAADYCgAAAAAAAE5TdDNfXzIxMmJhc2ljX3N0cmluZ0lEaU5TXzExY2hhcl90cmFpdHNJRGlFRU5TXzlhbGxvY2F0b3JJRGlFRUVFAAAAXBAAACQMAAAAAAAAAQAAANgKAAAAAAAATjEwZW1zY3JpcHRlbjN2YWxFAADYDwAAgAwAAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWNFRQAA2A8AAJwMAABOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0lhRUUAANgPAADEDAAATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJaEVFAADYDwAA7AwAAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SXNFRQAA2A8AABQNAABOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0l0RUUAANgPAAA8DQAATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJaUVFAADYDwAAZA0AAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWpFRQAA2A8AAIwNAABOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0lsRUUAANgPAAC0DQAATjEwZW1zY3JpcHRlbjExbWVtb3J5X3ZpZXdJbUVFAADYDwAA3A0AAE4xMGVtc2NyaXB0ZW4xMW1lbW9yeV92aWV3SWZFRQAA2A8AAAQOAABOMTBlbXNjcmlwdGVuMTFtZW1vcnlfdmlld0lkRUUAANgPAAAsDgAAU3Q5dHlwZV9pbmZvAAAAANgPAABUDgAATjEwX19jeHhhYml2MTE2X19zaGltX3R5cGVfaW5mb0UAAAAAABAAAGwOAABkDgAATjEwX19jeHhhYml2MTE3X19jbGFzc190eXBlX2luZm9FAAAAABAAAJwOAACQDgAAAAAAABAPAAAOAAAADwAAABAAAAARAAAAEgAAAE4xMF9fY3h4YWJpdjEyM19fZnVuZGFtZW50YWxfdHlwZV9pbmZvRQAAEAAA6A4AAJAOAAB2AAAA1A4AABwPAABiAAAA1A4AACgPAABjAAAA1A4AADQPAABoAAAA1A4AAEAPAABhAAAA1A4AAEwPAABzAAAA1A4AAFgPAAB0AAAA1A4AAGQPAABpAAAA1A4AAHAPAABqAAAA1A4AAHwPAABsAAAA1A4AAIgPAABtAAAA1A4AAJQPAAB4AAAA1A4AAKAPAAB5AAAA1A4AAKwPAABmAAAA1A4AALgPAABkAAAA1A4AAMQPAAAAAAAAwA4AAA4AAAATAAAAEAAAABEAAAAUAAAAFQAAABYAAAAXAAAAAAAAAEgQAAAOAAAAGAAAABAAAAARAAAAFAAAABkAAAAaAAAAGwAAAE4xMF9fY3h4YWJpdjEyMF9fc2lfY2xhc3NfdHlwZV9pbmZvRQAAAAAAEAAAIBAAAMAOAAAAAAAApBAAAA4AAAAcAAAAEAAAABEAAAAUAAAAHQAAAB4AAAAfAAAATjEwX19jeHhhYml2MTIxX192bWlfY2xhc3NfdHlwZV9pbmZvRQAAAAAQAAB8EAAAwA4=");l(e,4272,"EBNQ")}function ca(da){var r=da.a;var s=r.buffer;var t=new Int8Array(s);var u=new Int16Array(s);var v=new Int32Array(s);var w=new Uint8Array(s);var x=new Uint16Array(s);var y=new Uint32Array(s);var z=new Float32Array(s);var A=new Float64Array(s);var B=Math.imul;var C=Math.fround;var D=Math.abs;var E=Math.clz32;var F=Math.min;var G=Math.max;var H=Math.floor;var I=Math.ceil;var J=Math.trunc;var K=Math.sqrt;var L=da.abort;var M=NaN;var N=Infinity;var O=da.b;var P=da.c;var Q=da.d;var R=da.e;var S=da.f;var T=da.g;var U=da.h;var V=da.i;var W=da.j;var X=da.k;var Y=da.l;var Z=da.m;var _=da.n;var $=5247760;
// EMSCRIPTEN_START_FUNCS
function ma(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;l=$-16|0;$=l;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{if(a>>>0<=244){e=v[1096];h=a>>>0<11?16:a+11&-8;c=h>>>3|0;b=e>>>c|0;if(b&3){d=c+((b^-1)&1)|0;b=d<<3;f=v[b+4432>>2];a=f+8|0;c=v[f+8>>2];b=b+4424|0;l:{if((c|0)==(b|0)){v[1096]=ab(d)&e;break l}v[c+12>>2]=b;v[b+8>>2]=c}b=d<<3;v[f+4>>2]=b|3;b=b+f|0;v[b+4>>2]=v[b+4>>2]|1;break a}k=v[1098];if(k>>>0>=h>>>0){break k}if(b){a=2<<c;a=(0-a|a)&b<<c;b=(0-a&a)-1|0;a=b>>>12&16;c=a;b=b>>>a|0;a=b>>>5&8;c=c|a;b=b>>>a|0;a=b>>>2&4;c=c|a;b=b>>>a|0;a=b>>>1&2;c=c|a;b=b>>>a|0;a=b>>>1&1;c=(c|a)+(b>>>a|0)|0;a=c<<3;g=v[a+4432>>2];b=v[g+8>>2];a=a+4424|0;m:{if((b|0)==(a|0)){e=ab(c)&e;v[1096]=e;break m}v[b+12>>2]=a;v[a+8>>2]=b}a=g+8|0;v[g+4>>2]=h|3;d=g+h|0;b=c<<3;f=b-h|0;v[d+4>>2]=f|1;v[b+g>>2]=f;if(k){b=k>>>3|0;c=(b<<3)+4424|0;g=v[1101];b=1<<b;n:{if(!(b&e)){v[1096]=b|e;b=c;break n}b=v[c+8>>2]}v[c+8>>2]=g;v[b+12>>2]=g;v[g+12>>2]=c;v[g+8>>2]=b}v[1101]=d;v[1098]=f;break a}j=v[1097];if(!j){break k}b=(j&0-j)-1|0;a=b>>>12&16;c=a;b=b>>>a|0;a=b>>>5&8;c=c|a;b=b>>>a|0;a=b>>>2&4;c=c|a;b=b>>>a|0;a=b>>>1&2;c=c|a;b=b>>>a|0;a=b>>>1&1;b=v[((c|a)+(b>>>a|0)<<2)+4688>>2];d=(v[b+4>>2]&-8)-h|0;c=b;while(1){o:{a=v[c+16>>2];if(!a){a=v[c+20>>2];if(!a){break o}}c=(v[a+4>>2]&-8)-h|0;f=c>>>0<d>>>0;d=f?c:d;b=f?a:b;c=a;continue}break}i=v[b+24>>2];f=v[b+12>>2];if((f|0)!=(b|0)){a=v[b+8>>2];v[a+12>>2]=f;v[f+8>>2]=a;break b}c=b+20|0;a=v[c>>2];if(!a){a=v[b+16>>2];if(!a){break j}c=b+16|0}while(1){g=c;f=a;c=a+20|0;a=v[c>>2];if(a){continue}c=f+16|0;a=v[f+16>>2];if(a){continue}break}v[g>>2]=0;break b}h=-1;if(a>>>0>4294967231){break k}a=a+11|0;h=a&-8;j=v[1097];if(!j){break k}d=0-h|0;e=0;p:{if(h>>>0<256){break p}e=31;if(h>>>0>16777215){break p}a=a>>>8|0;g=a+1048320>>>16&8;a=a<<g;c=a+520192>>>16&4;a=a<<c;b=a+245760>>>16&2;a=(a<<b>>>15|0)-(b|(c|g))|0;e=(a<<1|h>>>a+21&1)+28|0}c=v[(e<<2)+4688>>2];q:{r:{s:{if(!c){a=0;break s}a=0;b=h<<((e|0)==31?0:25-(e>>>1|0)|0);while(1){t:{g=(v[c+4>>2]&-8)-h|0;if(g>>>0>=d>>>0){break t}f=c;d=g;if(d){break t}d=0;a=c;break r}g=v[c+20>>2];c=v[((b>>>29&4)+c|0)+16>>2];a=g?(g|0)==(c|0)?a:g:a;b=b<<1;if(c){continue}break}}if(!(a|f)){f=0;a=2<<e;a=(0-a|a)&j;if(!a){break k}b=(a&0-a)-1|0;a=b>>>12&16;c=a;b=b>>>a|0;a=b>>>5&8;c=c|a;b=b>>>a|0;a=b>>>2&4;c=c|a;b=b>>>a|0;a=b>>>1&2;c=c|a;b=b>>>a|0;a=b>>>1&1;a=v[((c|a)+(b>>>a|0)<<2)+4688>>2]}if(!a){break q}}while(1){b=(v[a+4>>2]&-8)-h|0;c=b>>>0<d>>>0;d=c?b:d;f=c?a:f;b=v[a+16>>2];if(b){a=b}else{a=v[a+20>>2]}if(a){continue}break}}if(!f|v[1098]-h>>>0<=d>>>0){break k}e=v[f+24>>2];b=v[f+12>>2];if((f|0)!=(b|0)){a=v[f+8>>2];v[a+12>>2]=b;v[b+8>>2]=a;break c}c=f+20|0;a=v[c>>2];if(!a){a=v[f+16>>2];if(!a){break i}c=f+16|0}while(1){g=c;b=a;c=a+20|0;a=v[c>>2];if(a){continue}c=b+16|0;a=v[b+16>>2];if(a){continue}break}v[g>>2]=0;break c}c=v[1098];if(c>>>0>=h>>>0){d=v[1101];b=c-h|0;u:{if(b>>>0>=16){v[1098]=b;a=d+h|0;v[1101]=a;v[a+4>>2]=b|1;v[c+d>>2]=b;v[d+4>>2]=h|3;break u}v[1101]=0;v[1098]=0;v[d+4>>2]=c|3;a=c+d|0;v[a+4>>2]=v[a+4>>2]|1}a=d+8|0;break a}i=v[1099];if(i>>>0>h>>>0){b=i-h|0;v[1099]=b;c=v[1102];a=c+h|0;v[1102]=a;v[a+4>>2]=b|1;v[c+4>>2]=h|3;a=c+8|0;break a}a=0;j=h+47|0;if(v[1214]){c=v[1216]}else{v[1217]=-1;v[1218]=-1;v[1215]=4096;v[1216]=4096;v[1214]=l+12&-16^1431655768;v[1219]=0;v[1207]=0;c=4096}g=j+c|0;f=0-c|0;c=g&f;if(c>>>0<=h>>>0){break a}d=v[1206];if(d){b=v[1204];e=b+c|0;if(d>>>0<e>>>0|b>>>0>=e>>>0){break a}}if(w[4828]&4){break f}v:{w:{d=v[1102];if(d){a=4832;while(1){b=v[a>>2];if(b>>>0<=d>>>0&d>>>0<b+v[a+4>>2]>>>0){break w}a=v[a+8>>2];if(a){continue}break}}b=ia(0);if((b|0)==-1){break g}e=c;d=v[1215];a=d-1|0;if(a&b){e=(c-b|0)+(a+b&0-d)|0}if(e>>>0<=h>>>0|e>>>0>2147483646){break g}d=v[1206];if(d){a=v[1204];f=a+e|0;if(d>>>0<f>>>0|a>>>0>=f>>>0){break g}}a=ia(e);if((b|0)!=(a|0)){break v}break e}e=f&g-i;if(e>>>0>2147483646){break g}b=ia(e);if((b|0)==(v[a>>2]+v[a+4>>2]|0)){break h}a=b}if(!((a|0)==-1|h+48>>>0<=e>>>0)){b=v[1216];b=b+(j-e|0)&0-b;if(b>>>0>2147483646){b=a;break e}if((ia(b)|0)!=-1){e=b+e|0;b=a;break e}ia(0-e|0);break g}b=a;if((a|0)!=-1){break e}break g}f=0;break b}b=0;break c}if((b|0)!=-1){break e}}v[1207]=v[1207]|4}if(c>>>0>2147483646){break d}b=ia(c);a=ia(0);if((b|0)==-1|(a|0)==-1|a>>>0<=b>>>0){break d}e=a-b|0;if(e>>>0<=h+40>>>0){break d}}a=v[1204]+e|0;v[1204]=a;if(a>>>0>y[1205]){v[1205]=a}x:{y:{z:{g=v[1102];if(g){a=4832;while(1){d=v[a>>2];c=v[a+4>>2];if((d+c|0)==(b|0)){break z}a=v[a+8>>2];if(a){continue}break}break y}a=v[1100];if(!(a>>>0<=b>>>0?a:0)){v[1100]=b}a=0;v[1209]=e;v[1208]=b;v[1104]=-1;v[1105]=v[1214];v[1211]=0;while(1){d=a<<3;c=d+4424|0;v[d+4432>>2]=c;v[d+4436>>2]=c;a=a+1|0;if((a|0)!=32){continue}break}d=e-40|0;a=b+8&7?-8-b&7:0;c=d-a|0;v[1099]=c;a=a+b|0;v[1102]=a;v[a+4>>2]=c|1;v[(b+d|0)+4>>2]=40;v[1103]=v[1218];break x}if(w[a+12|0]&8|d>>>0>g>>>0|b>>>0<=g>>>0){break y}v[a+4>>2]=c+e;a=g+8&7?-8-g&7:0;c=a+g|0;v[1102]=c;b=v[1099]+e|0;a=b-a|0;v[1099]=a;v[c+4>>2]=a|1;v[(b+g|0)+4>>2]=40;v[1103]=v[1218];break x}if(y[1100]>b>>>0){v[1100]=b}c=b+e|0;a=4832;A:{B:{C:{D:{E:{F:{while(1){if((c|0)!=v[a>>2]){a=v[a+8>>2];if(a){continue}break F}break}if(!(w[a+12|0]&8)){break E}}a=4832;while(1){c=v[a>>2];if(c>>>0<=g>>>0){f=c+v[a+4>>2]|0;if(f>>>0>g>>>0){break D}}a=v[a+8>>2];continue}}v[a>>2]=b;v[a+4>>2]=v[a+4>>2]+e;j=(b+8&7?-8-b&7:0)+b|0;v[j+4>>2]=h|3;e=c+(c+8&7?-8-c&7:0)|0;i=h+j|0;c=e-i|0;if((e|0)==(g|0)){v[1102]=i;a=v[1099]+c|0;v[1099]=a;v[i+4>>2]=a|1;break B}if(v[1101]==(e|0)){v[1101]=i;a=v[1098]+c|0;v[1098]=a;v[i+4>>2]=a|1;v[a+i>>2]=a;break B}a=v[e+4>>2];if((a&3)==1){g=a&-8;G:{if(a>>>0<=255){d=v[e+8>>2];a=a>>>3|0;b=v[e+12>>2];if((b|0)==(d|0)){v[1096]=v[1096]&ab(a);break G}v[d+12>>2]=b;v[b+8>>2]=d;break G}h=v[e+24>>2];b=v[e+12>>2];H:{if((e|0)!=(b|0)){a=v[e+8>>2];v[a+12>>2]=b;v[b+8>>2]=a;break H}I:{a=e+20|0;d=v[a>>2];if(d){break I}a=e+16|0;d=v[a>>2];if(d){break I}b=0;break H}while(1){f=a;b=d;a=b+20|0;d=v[a>>2];if(d){continue}a=b+16|0;d=v[b+16>>2];if(d){continue}break}v[f>>2]=0}if(!h){break G}d=v[e+28>>2];a=(d<<2)+4688|0;J:{if(v[a>>2]==(e|0)){v[a>>2]=b;if(b){break J}v[1097]=v[1097]&ab(d);break G}v[h+(v[h+16>>2]==(e|0)?16:20)>>2]=b;if(!b){break G}}v[b+24>>2]=h;a=v[e+16>>2];if(a){v[b+16>>2]=a;v[a+24>>2]=b}a=v[e+20>>2];if(!a){break G}v[b+20>>2]=a;v[a+24>>2]=b}e=e+g|0;c=c+g|0}v[e+4>>2]=v[e+4>>2]&-2;v[i+4>>2]=c|1;v[c+i>>2]=c;if(c>>>0<=255){a=c>>>3|0;b=(a<<3)+4424|0;c=v[1096];a=1<<a;K:{if(!(c&a)){v[1096]=a|c;a=b;break K}a=v[b+8>>2]}v[b+8>>2]=i;v[a+12>>2]=i;v[i+12>>2]=b;v[i+8>>2]=a;break B}a=31;if(c>>>0<=16777215){a=c>>>8|0;f=a+1048320>>>16&8;a=a<<f;d=a+520192>>>16&4;a=a<<d;b=a+245760>>>16&2;a=(a<<b>>>15|0)-(b|(d|f))|0;a=(a<<1|c>>>a+21&1)+28|0}v[i+28>>2]=a;v[i+16>>2]=0;v[i+20>>2]=0;f=(a<<2)+4688|0;d=v[1097];b=1<<a;L:{if(!(d&b)){v[1097]=b|d;v[f>>2]=i;v[i+24>>2]=f;break L}a=c<<((a|0)==31?0:25-(a>>>1|0)|0);b=v[f>>2];while(1){d=b;if((v[b+4>>2]&-8)==(c|0)){break C}b=a>>>29|0;a=a<<1;f=d+(b&4)|0;b=v[f+16>>2];if(b){continue}break}v[f+16>>2]=i;v[i+24>>2]=d}v[i+12>>2]=i;v[i+8>>2]=i;break B}d=e-40|0;a=b+8&7?-8-b&7:0;c=d-a|0;v[1099]=c;a=a+b|0;v[1102]=a;v[a+4>>2]=c|1;v[(b+d|0)+4>>2]=40;v[1103]=v[1218];a=(f+(f-39&7?39-f&7:0)|0)-47|0;c=a>>>0<g+16>>>0?g:a;v[c+4>>2]=27;a=v[1211];v[c+16>>2]=v[1210];v[c+20>>2]=a;a=v[1209];v[c+8>>2]=v[1208];v[c+12>>2]=a;v[1210]=c+8;v[1209]=e;v[1208]=b;v[1211]=0;a=c+24|0;while(1){v[a+4>>2]=7;b=a+8|0;a=a+4|0;if(b>>>0<f>>>0){continue}break}if((c|0)==(g|0)){break x}v[c+4>>2]=v[c+4>>2]&-2;f=c-g|0;v[g+4>>2]=f|1;v[c>>2]=f;if(f>>>0<=255){a=f>>>3|0;b=(a<<3)+4424|0;c=v[1096];a=1<<a;M:{if(!(c&a)){v[1096]=a|c;a=b;break M}a=v[b+8>>2]}v[b+8>>2]=g;v[a+12>>2]=g;v[g+12>>2]=b;v[g+8>>2]=a;break x}a=31;v[g+16>>2]=0;v[g+20>>2]=0;if(f>>>0<=16777215){a=f>>>8|0;d=a+1048320>>>16&8;a=a<<d;c=a+520192>>>16&4;a=a<<c;b=a+245760>>>16&2;a=(a<<b>>>15|0)-(b|(c|d))|0;a=(a<<1|f>>>a+21&1)+28|0}v[g+28>>2]=a;d=(a<<2)+4688|0;c=v[1097];b=1<<a;N:{if(!(c&b)){v[1097]=b|c;v[d>>2]=g;v[g+24>>2]=d;break N}a=f<<((a|0)==31?0:25-(a>>>1|0)|0);b=v[d>>2];while(1){c=b;if((f|0)==(v[b+4>>2]&-8)){break A}b=a>>>29|0;a=a<<1;d=c+(b&4)|0;b=v[d+16>>2];if(b){continue}break}v[d+16>>2]=g;v[g+24>>2]=c}v[g+12>>2]=g;v[g+8>>2]=g;break x}a=v[d+8>>2];v[a+12>>2]=i;v[d+8>>2]=i;v[i+24>>2]=0;v[i+12>>2]=d;v[i+8>>2]=a}a=j+8|0;break a}a=v[c+8>>2];v[a+12>>2]=g;v[c+8>>2]=g;v[g+24>>2]=0;v[g+12>>2]=c;v[g+8>>2]=a}a=v[1099];if(a>>>0<=h>>>0){break d}b=a-h|0;v[1099]=b;c=v[1102];a=c+h|0;v[1102]=a;v[a+4>>2]=b|1;v[c+4>>2]=h|3;a=c+8|0;break a}v[1094]=48;a=0;break a}O:{if(!e){break O}c=v[f+28>>2];a=(c<<2)+4688|0;P:{if(v[a>>2]==(f|0)){v[a>>2]=b;if(b){break P}j=ab(c)&j;v[1097]=j;break O}v[e+(v[e+16>>2]==(f|0)?16:20)>>2]=b;if(!b){break O}}v[b+24>>2]=e;a=v[f+16>>2];if(a){v[b+16>>2]=a;v[a+24>>2]=b}a=v[f+20>>2];if(!a){break O}v[b+20>>2]=a;v[a+24>>2]=b}Q:{if(d>>>0<=15){a=d+h|0;v[f+4>>2]=a|3;a=a+f|0;v[a+4>>2]=v[a+4>>2]|1;break Q}v[f+4>>2]=h|3;e=f+h|0;v[e+4>>2]=d|1;v[d+e>>2]=d;if(d>>>0<=255){a=d>>>3|0;b=(a<<3)+4424|0;c=v[1096];a=1<<a;R:{if(!(c&a)){v[1096]=a|c;a=b;break R}a=v[b+8>>2]}v[b+8>>2]=e;v[a+12>>2]=e;v[e+12>>2]=b;v[e+8>>2]=a;break Q}a=31;if(d>>>0<=16777215){a=d>>>8|0;g=a+1048320>>>16&8;a=a<<g;c=a+520192>>>16&4;a=a<<c;b=a+245760>>>16&2;a=(a<<b>>>15|0)-(b|(c|g))|0;a=(a<<1|d>>>a+21&1)+28|0}v[e+28>>2]=a;v[e+16>>2]=0;v[e+20>>2]=0;b=(a<<2)+4688|0;S:{c=1<<a;T:{if(!(c&j)){v[1097]=c|j;v[b>>2]=e;break T}a=d<<((a|0)==31?0:25-(a>>>1|0)|0);h=v[b>>2];while(1){b=h;if((v[b+4>>2]&-8)==(d|0)){break S}c=a>>>29|0;a=a<<1;c=(c&4)+b|0;h=v[c+16>>2];if(h){continue}break}v[c+16>>2]=e}v[e+24>>2]=b;v[e+12>>2]=e;v[e+8>>2]=e;break Q}a=v[b+8>>2];v[a+12>>2]=e;v[b+8>>2]=e;v[e+24>>2]=0;v[e+12>>2]=b;v[e+8>>2]=a}a=f+8|0;break a}U:{if(!i){break U}c=v[b+28>>2];a=(c<<2)+4688|0;V:{if(v[a>>2]==(b|0)){v[a>>2]=f;if(f){break V}v[1097]=ab(c)&j;break U}v[i+(v[i+16>>2]==(b|0)?16:20)>>2]=f;if(!f){break U}}v[f+24>>2]=i;a=v[b+16>>2];if(a){v[f+16>>2]=a;v[a+24>>2]=f}a=v[b+20>>2];if(!a){break U}v[f+20>>2]=a;v[a+24>>2]=f}W:{if(d>>>0<=15){a=d+h|0;v[b+4>>2]=a|3;a=a+b|0;v[a+4>>2]=v[a+4>>2]|1;break W}v[b+4>>2]=h|3;f=b+h|0;v[f+4>>2]=d|1;v[d+f>>2]=d;if(k){a=k>>>3|0;c=(a<<3)+4424|0;g=v[1101];a=1<<a;X:{if(!(a&e)){v[1096]=a|e;a=c;break X}a=v[c+8>>2]}v[c+8>>2]=g;v[a+12>>2]=g;v[g+12>>2]=c;v[g+8>>2]=a}v[1101]=f;v[1098]=d}a=b+8|0}$=l+16|0;return a|0}function ga(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;a:{if(!a){break a}d=a-8|0;b=v[a-4>>2];a=b&-8;f=d+a|0;b:{if(b&1){break b}if(!(b&3)){break a}b=v[d>>2];d=d-b|0;if(d>>>0<y[1100]){break a}a=a+b|0;if(v[1101]!=(d|0)){if(b>>>0<=255){e=v[d+8>>2];b=b>>>3|0;c=v[d+12>>2];if((c|0)==(e|0)){v[1096]=v[1096]&ab(b);break b}v[e+12>>2]=c;v[c+8>>2]=e;break b}h=v[d+24>>2];b=v[d+12>>2];c:{if((d|0)!=(b|0)){c=v[d+8>>2];v[c+12>>2]=b;v[b+8>>2]=c;break c}d:{e=d+20|0;c=v[e>>2];if(c){break d}e=d+16|0;c=v[e>>2];if(c){break d}b=0;break c}while(1){g=e;b=c;e=b+20|0;c=v[e>>2];if(c){continue}e=b+16|0;c=v[b+16>>2];if(c){continue}break}v[g>>2]=0}if(!h){break b}e=v[d+28>>2];c=(e<<2)+4688|0;e:{if(v[c>>2]==(d|0)){v[c>>2]=b;if(b){break e}v[1097]=v[1097]&ab(e);break b}v[h+(v[h+16>>2]==(d|0)?16:20)>>2]=b;if(!b){break b}}v[b+24>>2]=h;c=v[d+16>>2];if(c){v[b+16>>2]=c;v[c+24>>2]=b}c=v[d+20>>2];if(!c){break b}v[b+20>>2]=c;v[c+24>>2]=b;break b}b=v[f+4>>2];if((b&3)!=3){break b}v[1098]=a;v[f+4>>2]=b&-2;v[d+4>>2]=a|1;v[a+d>>2]=a;return}if(d>>>0>=f>>>0){break a}b=v[f+4>>2];if(!(b&1)){break a}f:{if(!(b&2)){if(v[1102]==(f|0)){v[1102]=d;a=v[1099]+a|0;v[1099]=a;v[d+4>>2]=a|1;if(v[1101]!=(d|0)){break a}v[1098]=0;v[1101]=0;return}if(v[1101]==(f|0)){v[1101]=d;a=v[1098]+a|0;v[1098]=a;v[d+4>>2]=a|1;v[a+d>>2]=a;return}a=(b&-8)+a|0;g:{if(b>>>0<=255){e=v[f+8>>2];b=b>>>3|0;c=v[f+12>>2];if((c|0)==(e|0)){v[1096]=v[1096]&ab(b);break g}v[e+12>>2]=c;v[c+8>>2]=e;break g}h=v[f+24>>2];b=v[f+12>>2];h:{if((f|0)!=(b|0)){c=v[f+8>>2];v[c+12>>2]=b;v[b+8>>2]=c;break h}i:{e=f+20|0;c=v[e>>2];if(c){break i}e=f+16|0;c=v[e>>2];if(c){break i}b=0;break h}while(1){g=e;b=c;e=b+20|0;c=v[e>>2];if(c){continue}e=b+16|0;c=v[b+16>>2];if(c){continue}break}v[g>>2]=0}if(!h){break g}e=v[f+28>>2];c=(e<<2)+4688|0;j:{if(v[c>>2]==(f|0)){v[c>>2]=b;if(b){break j}v[1097]=v[1097]&ab(e);break g}v[h+(v[h+16>>2]==(f|0)?16:20)>>2]=b;if(!b){break g}}v[b+24>>2]=h;c=v[f+16>>2];if(c){v[b+16>>2]=c;v[c+24>>2]=b}c=v[f+20>>2];if(!c){break g}v[b+20>>2]=c;v[c+24>>2]=b}v[d+4>>2]=a|1;v[a+d>>2]=a;if(v[1101]!=(d|0)){break f}v[1098]=a;return}v[f+4>>2]=b&-2;v[d+4>>2]=a|1;v[a+d>>2]=a}if(a>>>0<=255){a=a>>>3|0;b=(a<<3)+4424|0;c=v[1096];a=1<<a;k:{if(!(c&a)){v[1096]=a|c;a=b;break k}a=v[b+8>>2]}v[b+8>>2]=d;v[a+12>>2]=d;v[d+12>>2]=b;v[d+8>>2]=a;return}e=31;v[d+16>>2]=0;v[d+20>>2]=0;if(a>>>0<=16777215){b=a>>>8|0;g=b+1048320>>>16&8;b=b<<g;e=b+520192>>>16&4;b=b<<e;c=b+245760>>>16&2;b=(b<<c>>>15|0)-(c|(e|g))|0;e=(b<<1|a>>>b+21&1)+28|0}v[d+28>>2]=e;g=(e<<2)+4688|0;l:{m:{c=v[1097];b=1<<e;n:{if(!(c&b)){v[1097]=b|c;v[g>>2]=d;v[d+24>>2]=g;break n}e=a<<((e|0)==31?0:25-(e>>>1|0)|0);b=v[g>>2];while(1){c=b;if((v[b+4>>2]&-8)==(a|0)){break m}b=e>>>29|0;e=e<<1;g=c+(b&4)|0;b=v[g+16>>2];if(b){continue}break}v[g+16>>2]=d;v[d+24>>2]=c}v[d+12>>2]=d;v[d+8>>2]=d;break l}a=v[c+8>>2];v[a+12>>2]=d;v[c+8>>2]=d;v[d+24>>2]=0;v[d+12>>2]=c;v[d+8>>2]=a}a=v[1104]-1|0;v[1104]=a?a:-1}}function Ba(){var a=0,b=0,c=0,d=0;U(1200,4,2656,2808,1,2);U(1207,4,2816,2832,3,4);v[1071]=0;v[1069]=0;v[1070]=0;a=ha(16);v[1069]=a;b=a+16|0;v[1071]=b;t[a+8|0]=145;t[a+9|0]=170;t[a+10|0]=189;t[a+11|0]=208;t[a+12|0]=122;t[a+13|0]=245;t[a+14|0]=54;t[a+15|0]=49;t[a|0]=5;t[a+1|0]=40;t[a+2|0]=188;t[a+3|0]=150;t[a+4|0]=233;t[a+5|0]=228;t[a+6|0]=90;t[a+7|0]=67;v[1070]=b;v[1074]=0;v[1072]=0;v[1073]=0;a=ha(16);v[1072]=a;b=a+16|0;v[1074]=b;t[a+8|0]=168;t[a+9|0]=175;t[a+10|0]=166;t[a+11|0]=142;t[a+12|0]=15;t[a+13|0]=255;t[a+14|0]=153;t[a+15|0]=20;t[a|0]=124;t[a+1|0]=213;t[a+2|0]=50;t[a+3|0]=235;t[a+4|0]=134;t[a+5|0]=2;t[a+6|0]=127;t[a+7|0]=75;v[1073]=b;v[1077]=0;v[1075]=0;v[1076]=0;a=ha(17);v[1075]=a;d=a+17|0;v[1077]=d;t[a+16|0]=w[1839];b=w[1835]|w[1836]<<8|(w[1837]<<16|w[1838]<<24);c=w[1831]|w[1832]<<8|(w[1833]<<16|w[1834]<<24);t[a+8|0]=c;t[a+9|0]=c>>>8;t[a+10|0]=c>>>16;t[a+11|0]=c>>>24;t[a+12|0]=b;t[a+13|0]=b>>>8;t[a+14|0]=b>>>16;t[a+15|0]=b>>>24;b=w[1827]|w[1828]<<8|(w[1829]<<16|w[1830]<<24);c=w[1823]|w[1824]<<8|(w[1825]<<16|w[1826]<<24);t[a|0]=c;t[a+1|0]=c>>>8;t[a+2|0]=c>>>16;t[a+3|0]=c>>>24;t[a+4|0]=b;t[a+5|0]=b>>>8;t[a+6|0]=b>>>16;t[a+7|0]=b>>>24;v[1076]=d;v[1080]=0;v[1078]=0;v[1079]=0;v[1083]=0;v[1081]=0;v[1082]=0;a=ha(272);v[1081]=a;b=a+272|0;v[1083]=b;ja(a,1840,272);v[1082]=b;v[1086]=0;v[1084]=0;v[1085]=0;a=ha(272);v[1084]=a;b=a+272|0;v[1086]=b;ja(a,2112,272);v[1085]=b;v[1089]=0;v[1087]=0;v[1088]=0;a=ha(272);v[1087]=a;b=a+272|0;v[1089]=b;ja(a,2384,272);v[1088]=b;v[1092]=0;v[1090]=0;v[1091]=0;a=ha(17);v[1090]=a;b=a+17|0;v[1092]=b;t[a+16|0]=0;t[a+8|0]=0;t[a+9|0]=0;t[a+10|0]=0;t[a+11|0]=0;t[a+12|0]=0;t[a+13|0]=0;t[a+14|0]=0;t[a+15|0]=0;t[a|0]=0;t[a+1|0]=0;t[a+2|0]=0;t[a+3|0]=0;t[a+4|0]=0;t[a+5|0]=0;t[a+6|0]=0;t[a+7|0]=0;v[1091]=b;aa[13](4373)|0}function Aa(){var a=0;_(3872,1195);W(3884,1085,1,1,0);a=$-16|0;$=a;v[a+12>>2]=1080;P(3896,v[a+12>>2],1,-128,127);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1073;P(3920,v[a+12>>2],1,-128,127);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1071;P(3908,v[a+12>>2],1,0,255);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1033;P(3932,v[a+12>>2],2,-32768,32767);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1024;P(3944,v[a+12>>2],2,0,65535);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1048;P(3956,v[a+12>>2],4,-2147483648,2147483647);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1039;P(3968,v[a+12>>2],4,0,-1);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1115;P(3980,v[a+12>>2],4,-2147483648,2147483647);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1106;P(3992,v[a+12>>2],4,0,-1);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1059;qa(4004,v[a+12>>2],-2147483648,2147483647);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1058;qa(4016,v[a+12>>2],0,-1);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1052;S(4028,v[a+12>>2],4);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1188;S(4040,v[a+12>>2],8);$=a+16|0;T(2784,1146);T(2904,1652);Q(2992,4,1120);Q(3084,2,1158);Q(3176,4,1173);V(3220,1090);a=$-16|0;$=a;v[a+12>>2]=1583;O(3260,0,v[a+12>>2]);$=a+16|0;za(1685);ya(1613);xa(1215);wa(1246);va(1286);ua(1315);a=$-16|0;$=a;v[a+12>>2]=1722;O(3540,4,v[a+12>>2]);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1752;O(3580,5,v[a+12>>2]);$=a+16|0;za(1417);ya(1384);xa(1483);wa(1449);va(1550);ua(1516);a=$-16|0;$=a;v[a+12>>2]=1353;O(3620,6,v[a+12>>2]);$=a+16|0;a=$-16|0;$=a;v[a+12>>2]=1791;O(3660,7,v[a+12>>2]);$=a+16|0}function Wa(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;b=0;d=w[c+11|0];if(((d<<24>>24<0?v[c+4>>2]:d)|0)==3){d=$-16|0;$=d;v[d+8>>2]=3;v[d+12>>2]=-1;if(w[c+11|0]>>>7|0){b=v[c+4>>2]}else{b=w[c+11|0]}v[d>>2]=b;b=$-16|0;$=b;$=b+16|0;b=d+12|0;v[d+4>>2]=v[(y[d>>2]<y[b>>2]?d:b)>>2];if(w[c+11|0]>>>7|0){c=v[c>>2]}b=$-16|0;$=b;$=b+16|0;e=d+8|0;f=d+4|0;e=v[(y[e>>2]<y[f>>2]?e:f)>>2];b=0;a:{if(!e){break a}b=1067;b:{c:{d:{if(e>>>0>=4){if((c|1067)&3){break d}while(1){if(v[c>>2]!=v[b>>2]){break d}b=b+4|0;c=c+4|0;e=e-4|0;if(e>>>0>3){continue}break}}if(!e){break c}}while(1){f=w[c|0];g=w[b|0];if((f|0)==(g|0)){b=b+1|0;c=c+1|0;e=e-1|0;if(e){continue}break c}break}b=f-g|0;break b}b=0}}c=b;e:{if(c){break e}c=-1;b=v[d+4>>2];e=v[d+8>>2];if(b>>>0<e>>>0){break e}c=b>>>0>e>>>0}$=d+16|0;b=!c}f=v[a+16>>2];d=w[a+32|0]|w[a+33|0]<<8|(w[a+34|0]<<16|w[a+35|0]<<24);c=v[1090];e=w[a+28|0]|w[a+29|0]<<8|(w[a+30|0]<<16|w[a+31|0]<<24);t[c|0]=e;t[c+1|0]=e>>>8;t[c+2|0]=e>>>16;t[c+3|0]=e>>>24;t[c+4|0]=d;t[c+5|0]=d>>>8;t[c+6|0]=d>>>16;t[c+7|0]=d>>>24;d=w[a+40|0]|w[a+41|0]<<8|(w[a+42|0]<<16|w[a+43|0]<<24);a=w[a+36|0]|w[a+37|0]<<8|(w[a+38|0]<<16|w[a+39|0]<<24);t[c+16|0]=0;t[c+8|0]=a;t[c+9|0]=a>>>8;t[c+10|0]=a>>>16;t[c+11|0]=a>>>24;t[c+12|0]=d;t[c+13|0]=d>>>8;t[c+14|0]=d>>>16;t[c+15|0]=d>>>24;t[4372]=b;return f|0}function Na(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;if(fa(a,v[b+8>>2],e)){if(!(v[b+28>>2]==1|v[b+4>>2]!=(c|0))){v[b+28>>2]=d}return}a:{if(fa(a,v[b>>2],e)){if(!(v[b+16>>2]!=(c|0)&v[b+20>>2]!=(c|0))){if((d|0)!=1){break a}v[b+32>>2]=1;return}v[b+32>>2]=d;if(v[b+44>>2]!=4){f=a+16|0;i=f+(v[a+12>>2]<<3)|0;b:{c:{while(1){d:{if(f>>>0>=i>>>0){break d}u[b+52>>1]=0;na(f,b,c,c,1,e);if(w[b+54|0]){break d}e:{if(!w[b+53|0]){break e}if(w[b+52|0]){d=1;if(v[b+24>>2]==1){break c}h=1;g=1;if(w[a+8|0]&2){break e}break c}h=1;d=g;if(!(t[a+8|0]&1)){break c}}f=f+8|0;continue}break}d=g;a=4;if(!h){break b}}a=3}v[b+44>>2]=a;if(d&1){break a}}v[b+20>>2]=c;v[b+40>>2]=v[b+40>>2]+1;if(v[b+36>>2]!=1|v[b+24>>2]!=2){break a}t[b+54|0]=1;return}g=v[a+12>>2];f=a+16|0;ka(f,b,c,d,e);if((g|0)<2){break a}g=f+(g<<3)|0;f=a+24|0;a=v[a+8>>2];if(!(!(a&2)&v[b+36>>2]!=1)){while(1){if(w[b+54|0]){break a}ka(f,b,c,d,e);f=f+8|0;if(g>>>0>f>>>0){continue}break}break a}if(!(a&1)){while(1){if(w[b+54|0]|v[b+36>>2]==1){break a}ka(f,b,c,d,e);f=f+8|0;if(g>>>0>f>>>0){continue}break a}}while(1){if(w[b+54|0]|v[b+36>>2]==1&v[b+24>>2]==1){break a}ka(f,b,c,d,e);f=f+8|0;if(g>>>0>f>>>0){continue}break}}}function ja(a,b,c){var d=0,e=0,f=0;if(c>>>0>=512){Y(a|0,b|0,c|0)|0;return a}e=a+c|0;a:{if(!((a^b)&3)){b:{if(!(a&3)){c=a;break b}if(!c){c=a;break b}c=a;while(1){t[c|0]=w[b|0];b=b+1|0;c=c+1|0;if(!(c&3)){break b}if(c>>>0<e>>>0){continue}break}}d=e&-4;c:{if(d>>>0<64){break c}f=d+-64|0;if(f>>>0<c>>>0){break c}while(1){v[c>>2]=v[b>>2];v[c+4>>2]=v[b+4>>2];v[c+8>>2]=v[b+8>>2];v[c+12>>2]=v[b+12>>2];v[c+16>>2]=v[b+16>>2];v[c+20>>2]=v[b+20>>2];v[c+24>>2]=v[b+24>>2];v[c+28>>2]=v[b+28>>2];v[c+32>>2]=v[b+32>>2];v[c+36>>2]=v[b+36>>2];v[c+40>>2]=v[b+40>>2];v[c+44>>2]=v[b+44>>2];v[c+48>>2]=v[b+48>>2];v[c+52>>2]=v[b+52>>2];v[c+56>>2]=v[b+56>>2];v[c+60>>2]=v[b+60>>2];b=b- -64|0;c=c- -64|0;if(f>>>0>=c>>>0){continue}break}}if(c>>>0>=d>>>0){break a}while(1){v[c>>2]=v[b>>2];b=b+4|0;c=c+4|0;if(d>>>0>c>>>0){continue}break}break a}if(e>>>0<4){c=a;break a}d=e-4|0;if(d>>>0<a>>>0){c=a;break a}c=a;while(1){t[c|0]=w[b|0];t[c+1|0]=w[b+1|0];t[c+2|0]=w[b+2|0];t[c+3|0]=w[b+3|0];b=b+4|0;c=c+4|0;if(d>>>0>=c>>>0){continue}break}}if(c>>>0<e>>>0){while(1){t[c|0]=w[b|0];b=b+1|0;c=c+1|0;if((e|0)!=(c|0)){continue}break}}return a}function Ra(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;f=$+-64|0;$=f;d=1;a:{if(fa(a,b,0)){break a}d=0;if(!b){break a}d=$+-64|0;$=d;e=v[b>>2];g=v[e-4>>2];h=v[e-8>>2];v[d+20>>2]=0;v[d+16>>2]=3728;v[d+12>>2]=b;v[d+8>>2]=3776;e=0;ra(d+24|0,39);b=b+h|0;b:{if(fa(g,3776,0)){v[d+56>>2]=1;aa[v[v[g>>2]+20>>2]](g,d+8|0,b,b,1,0);e=v[d+32>>2]==1?b:0;break b}aa[v[v[g>>2]+24>>2]](g,d+8|0,b,1,0);c:{switch(v[d+44>>2]){case 0:e=v[d+48>>2]==1?v[d+36>>2]==1?v[d+40>>2]==1?v[d+28>>2]:0:0:0;break b;case 1:break c;default:break b}}if(v[d+32>>2]!=1){if(v[d+48>>2]|v[d+36>>2]!=1|v[d+40>>2]!=1){break b}}e=v[d+24>>2]}$=d- -64|0;d=0;if(!e){break a}b=f+8|0;ra(b|4,52);v[f+56>>2]=1;v[f+20>>2]=-1;v[f+16>>2]=a;v[f+8>>2]=e;aa[v[v[e>>2]+28>>2]](e,b,v[c>>2],1);a=v[f+32>>2];if((a|0)==1){v[c>>2]=v[f+24>>2]}d=(a|0)==1}$=f- -64|0;return d|0}function ra(a,b){var c=0;a:{if(!b){break a}t[a|0]=0;c=a+b|0;t[c-1|0]=0;if(b>>>0<3){break a}t[a+2|0]=0;t[a+1|0]=0;t[c-3|0]=0;t[c-2|0]=0;if(b>>>0<7){break a}t[a+3|0]=0;t[c-4|0]=0;if(b>>>0<9){break a}c=0-a&3;a=c+a|0;v[a>>2]=0;c=b-c&-4;b=c+a|0;v[b-4>>2]=0;if(c>>>0<9){break a}v[a+8>>2]=0;v[a+4>>2]=0;v[b-8>>2]=0;v[b-12>>2]=0;if(c>>>0<25){break a}v[a+24>>2]=0;v[a+20>>2]=0;v[a+16>>2]=0;v[a+12>>2]=0;v[b-16>>2]=0;v[b-20>>2]=0;v[b-24>>2]=0;v[b-28>>2]=0;b=c;c=a&4|24;b=b-c|0;if(b>>>0<32){break a}a=a+c|0;while(1){v[a+24>>2]=0;v[a+28>>2]=0;v[a+16>>2]=0;v[a+20>>2]=0;v[a+8>>2]=0;v[a+12>>2]=0;v[a>>2]=0;v[a+4>>2]=0;a=a+32|0;b=b-32|0;if(b>>>0>31){continue}break}}}function Ja(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;if(fa(a,v[b+8>>2],f)){oa(b,c,d,e);return}h=w[b+53|0];g=v[a+12>>2];t[b+53|0]=0;i=w[b+52|0];t[b+52|0]=0;j=a+16|0;na(j,b,c,d,e,f);k=w[b+53|0];h=h|k;l=w[b+52|0];i=i|l;a:{if((g|0)<2){break a}j=j+(g<<3)|0;g=a+24|0;while(1){if(w[b+54|0]){break a}b:{if(l){if(v[b+24>>2]==1){break a}if(w[a+8|0]&2){break b}break a}if(!k){break b}if(!(t[a+8|0]&1)){break a}}u[b+52>>1]=0;na(g,b,c,d,e,f);k=w[b+53|0];h=k|h;l=w[b+52|0];i=l|i;g=g+8|0;if(j>>>0>g>>>0){continue}break}}t[b+53|0]=(h&255)!=0;t[b+52|0]=(i&255)!=0}function La(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if(fa(a,v[b+8>>2],e)){if(!(v[b+28>>2]==1|v[b+4>>2]!=(c|0))){v[b+28>>2]=d}return}a:{if(fa(a,v[b>>2],e)){if(!(v[b+16>>2]!=(c|0)&v[b+20>>2]!=(c|0))){if((d|0)!=1){break a}v[b+32>>2]=1;return}v[b+32>>2]=d;b:{if(v[b+44>>2]==4){break b}u[b+52>>1]=0;a=v[a+8>>2];aa[v[v[a>>2]+20>>2]](a,b,c,c,1,e);if(w[b+53|0]){v[b+44>>2]=3;if(!w[b+52|0]){break b}break a}v[b+44>>2]=4}v[b+20>>2]=c;v[b+40>>2]=v[b+40>>2]+1;if(v[b+36>>2]!=1|v[b+24>>2]!=2){break a}t[b+54|0]=1;return}a=v[a+8>>2];aa[v[v[a>>2]+24>>2]](a,b,c,d,e)}}function Xa(a){a=a|0;var b=0,c=0,d=0,e=0;d=$-16|0;$=d;v[d+12>>2]=a;a=$-16|0;v[a+8>>2]=v[d+12>>2];v[a+12>>2]=v[v[a+8>>2]+4>>2];e=v[a+12>>2];a=e;a:{b:{if(a&3){while(1){if(!w[a|0]){break b}a=a+1|0;if(a&3){continue}break}}while(1){b=a;a=a+4|0;c=v[b>>2];if(!((c^-1)&c-16843009&-2139062144)){continue}break}a=b-e|0;if(!(c&255)){break a}while(1){c=w[b+1|0];a=b+1|0;b=a;if(c){continue}break}}a=a-e|0}a=a+1|0;c=ma(a);b=0;c:{if(!c){break c}b=ja(c,e,a)}$=d+16|0;return b|0}function Ma(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if(b){while(1){g=a+e|0;f=c+e|0;i=(f>>>0)%17|0;j=w[g|0]^w[i+v[1090]|0];l=j<<4;h=0;if(f>>>0>=272){m=v[1084];n=v[1081];d=f;while(1){k=d>>>8|0;h=w[((k>>>0)%272|0)+m|0]^(w[((d>>>4>>>0)%272|0)+n|0]^h);o=d>>>0>69631;d=k;if(o){continue}break}}d=w[v[1087]+((f>>>0)%272|0)|0]^h;d=d^(j^l)^d<<4;t[g|0]=d;if(w[4372]){t[g|0]=d^w[v[1075]+i|0]}e=e+1|0;if((e|0)!=(b|0)){continue}break}}}function fa(a,b,c){var d=0;if(!c){return v[a+4>>2]==v[b+4>>2]}if((a|0)==(b|0)){return 1}c=$-16|0;v[c+8>>2]=a;v[c+12>>2]=v[v[c+8>>2]+4>>2];a=v[c+12>>2];v[c+8>>2]=b;v[c+12>>2]=v[v[c+8>>2]+4>>2];d=v[c+12>>2];b=w[d|0];c=w[a|0];a:{if(!c|(b|0)!=(c|0)){break a}while(1){b=w[d+1|0];c=w[a+1|0];if(!c){break a}d=d+1|0;a=a+1|0;if((b|0)==(c|0)){continue}break}}return(b|0)==(c|0)}function Ka(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if(fa(a,v[b+8>>2],e)){if(!(v[b+28>>2]==1|v[b+4>>2]!=(c|0))){v[b+28>>2]=d}return}a:{if(!fa(a,v[b>>2],e)){break a}if(!(v[b+16>>2]!=(c|0)&v[b+20>>2]!=(c|0))){if((d|0)!=1){break a}v[b+32>>2]=1;return}v[b+20>>2]=c;v[b+32>>2]=d;v[b+40>>2]=v[b+40>>2]+1;if(!(v[b+36>>2]!=1|v[b+24>>2]!=2)){t[b+54|0]=1}v[b+44>>2]=4}}function oa(a,b,c,d){t[a+53|0]=1;a:{if(v[a+4>>2]!=(c|0)){break a}t[a+52|0]=1;c=v[a+16>>2];b:{if(!c){v[a+36>>2]=1;v[a+24>>2]=d;v[a+16>>2]=b;if(v[a+48>>2]!=1){break a}if((d|0)==1){break b}break a}if((b|0)==(c|0)){c=v[a+24>>2];if((c|0)==2){v[a+24>>2]=d;c=d}if(v[a+48>>2]!=1){break a}if((c|0)==1){break b}break a}v[a+36>>2]=v[a+36>>2]+1}t[a+54|0]=1}}function $a(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;e=$-16|0;$=e;f=v[d>>2];if(f>>>0<4294967280){a:{b:{if(f>>>0>=11){h=f+16&-16;g=ha(h);v[e+8>>2]=h|-2147483648;v[e>>2]=g;v[e+4>>2]=f;break b}t[e+11|0]=f;g=e;if(!f){break a}}ja(g,d+4|0,f)}t[f+g|0]=0;a=aa[a|0](b,c,e)|0;if(t[e+11|0]<0){ga(v[e>>2])}$=e+16|0;return a|0}R();L()}function Oa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;if(fa(a,v[b+8>>2],0)){pa(b,c,d);return}e=v[a+12>>2];f=a+16|0;sa(f,b,c,d);a:{if((e|0)<2){break a}e=(e<<3)+f|0;a=a+24|0;while(1){sa(a,b,c,d);if(w[b+54|0]){break a}a=a+8|0;if(e>>>0>a>>>0){continue}break}}}function pa(a,b,c){var d=0;d=v[a+16>>2];if(!d){v[a+36>>2]=1;v[a+24>>2]=c;v[a+16>>2]=b;return}a:{if((b|0)==(d|0)){if(v[a+24>>2]!=2){break a}v[a+24>>2]=c;return}t[a+54|0]=1;v[a+24>>2]=2;v[a+36>>2]=v[a+36>>2]+1}}function ia(a){var b=0,c=0;b=v[1068];c=a+3&-4;a=b+c|0;a:{if(a>>>0<=b>>>0?c:0){break a}if(a>>>0>ba()<<16>>>0){if(!(Z(a|0)|0)){break a}}v[1068]=a;return b}v[1094]=48;return-1}function sa(a,b,c,d){var e=0,f=0;e=v[a+4>>2];f=v[a>>2];a=0;a:{if(!c){break a}a=e>>8;if(!(e&1)){break a}a=v[a+v[c>>2]>>2]}aa[v[v[f>>2]+28>>2]](f,b,a+c|0,e&2?d:2)}function Ia(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if(fa(a,v[b+8>>2],f)){oa(b,c,d,e);return}a=v[a+8>>2];aa[v[v[a>>2]+20>>2]](a,b,c,d,e,f)}function na(a,b,c,d,e,f){var g=0,h=0;g=v[a+4>>2];h=g>>8;a=v[a>>2];if(g&1){h=v[v[d>>2]+h>>2]}aa[v[v[a>>2]+20>>2]](a,b,c,d+h|0,g&2?e:2,f)}function ka(a,b,c,d,e){var f=0,g=0;f=v[a+4>>2];g=f>>8;a=v[a>>2];if(f&1){g=v[v[c>>2]+g>>2]}aa[v[v[a>>2]+24>>2]](a,b,c+g|0,f&2?d:2,e)}function Pa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(fa(a,v[b+8>>2],0)){pa(b,c,d);return}a=v[a+8>>2];aa[v[v[a>>2]+28>>2]](a,b,c,d)}function ha(a){var b=0;a=a?a:1;a:{while(1){b=ma(a);if(b){break a}b=v[1095];if(b){aa[b|0]();continue}break}R();L()}return b}function Ha(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if(fa(a,v[b+8>>2],f)){oa(b,c,d,e)}}function Va(a){a=a|0;var b=0;b=$-16|0;$=b;v[b+12>>2]=a;a=v[b+12>>2];Aa();$=b+16|0;return a|0}function za(a){var b=0;b=$-16|0;$=b;v[b+12>>2]=a;O(3300,0,v[b+12>>2]);$=b+16|0}function ya(a){var b=0;b=$-16|0;$=b;v[b+12>>2]=a;O(3340,1,v[b+12>>2]);$=b+16|0}function xa(a){var b=0;b=$-16|0;$=b;v[b+12>>2]=a;O(3380,2,v[b+12>>2]);$=b+16|0}function wa(a){var b=0;b=$-16|0;$=b;v[b+12>>2]=a;O(3420,3,v[b+12>>2]);$=b+16|0}function va(a){var b=0;b=$-16|0;$=b;v[b+12>>2]=a;O(3460,4,v[b+12>>2]);$=b+16|0}function ua(a){var b=0;b=$-16|0;$=b;v[b+12>>2]=a;O(3500,5,v[b+12>>2]);$=b+16|0}function Qa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(fa(a,v[b+8>>2],0)){pa(b,c,d)}}function ab(a){var b=0;b=a&31;a=0-a&31;return(-1>>>b&-2)<<b|(-1<<a&-2)>>>a}
function Sa(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;aa[a|0](b,c,d)}function Ta(a,b,c){a=a|0;b=b|0;c=c|0;return fa(a,b,0)|0}function _a(a){a=a|0;a=v[1084];if(a){v[1085]=a;ga(a)}}function Za(a){a=a|0;a=v[1087];if(a){v[1088]=a;ga(a)}}function Ya(a){a=a|0;a=v[1090];if(a){v[1091]=a;ga(a)}}function Ga(a){a=a|0;a=v[1069];if(a){v[1070]=a;ga(a)}}function Fa(a){a=a|0;a=v[1072];if(a){v[1073]=a;ga(a)}}function Ea(a){a=a|0;a=v[1075];if(a){v[1076]=a;ga(a)}}function Da(a){a=a|0;a=v[1078];if(a){v[1079]=a;ga(a)}}function Ca(a){a=a|0;a=v[1081];if(a){v[1082]=a;ga(a)}}function qa(a,b,c,d){X(a|0,b|0,8,0,c|0,-1,d|0)}function Ua(a){a=a|0;return a|0}function la(a){a=a|0;ga(a)}function ta(a){a=a|0}
// EMSCRIPTEN_END_FUNCS
e=w;p(da);var aa=c([null,$a,Wa,Sa,Ma,Ga,Fa,Ea,Da,Ca,_a,Za,Ya,Va,Ua,la,ta,ta,Ta,la,Ra,Ha,Ka,Qa,la,Ia,La,Pa,la,Ja,Na,Oa]);function ba(){return s.byteLength/65536|0}return{"o":Ba,"p":aa,"q":Xa,"r":Aa,"s":ma,"t":ga}}return ca(ea)}
// EMSCRIPTEN_END_ASM




)(asmLibraryArg)},instantiate:function(binary,info){return{then:function(ok){var module=new WebAssembly.Module(binary);ok({"instance":new WebAssembly.Instance(module)})}}},RuntimeError:Error};wasmBinary=[];if(typeof WebAssembly!=="object"){abort("no native wasm support detected")}function getValue(ptr,type,noSafe){type=type||"i8";if(type.charAt(type.length-1)==="*")type="i32";switch(type){case"i1":return HEAP8[ptr>>0];case"i8":return HEAP8[ptr>>0];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":return HEAP32[ptr>>2];case"float":return HEAPF32[ptr>>2];case"double":return Number(HEAPF64[ptr>>3]);default:abort("invalid type for getValue: "+type)}return null}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 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 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}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;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;if(endPtr-ptr>32&&UTF16Decoder){return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}else{var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}}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 writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}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 INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":INITIAL_MEMORY/65536})}if(wasmMemory){buffer=wasmMemory.buffer}INITIAL_MEMORY=buffer.byteLength;updateGlobalBufferAndViews(buffer);var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](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){{if(Module["onAbort"]){Module["onAbort"](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);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;wasmBinaryFile="KgmLegacy.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}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"&&!isFileURI(wasmBinaryFile)){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)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}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;wasmTable=Module["asm"]["p"];addOnInit(Module["asm"]["o"]);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)&&!isFileURI(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().catch(readyPromiseReject);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 __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}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return function(){null;return body.apply(this,arguments)}}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(function(dt,i){if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(function(){typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}}function registerType(rawType,registeredInstance,options){options=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(function(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})}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:function(handle){if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handle_array[handle].value},toHandle:function(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 simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}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 _embind_repr(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 runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}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 expectedArgCount=argCount-2;var argsWired=new Array(expectedArgCount);var invokerFuncArgs=[];var destructors=[];return function(){if(arguments.length!==expectedArgCount){throwBindingError("function "+humanName+" called with "+arguments.length+" arguments, expected "+expectedArgCount+" args!")}destructors.length=0;var thisWired;invokerFuncArgs.length=isClassMethodFunc?2:1;invokerFuncArgs[0]=cppTargetFunc;if(isClassMethodFunc){thisWired=argTypes[1].toWireType(destructors,this);invokerFuncArgs[1]=thisWired}for(var i=0;i<expectedArgCount;++i){argsWired[i]=argTypes[i+2].toWireType(destructors,arguments[i]);invokerFuncArgs.push(argsWired[i])}var rv=cppInvokerFunc.apply(null,invokerFuncArgs);function onDone(rv){if(needsDestructorStack){runDestructors(destructors)}else{for(var i=isClassMethodFunc?1:2;i<argTypes.length;i++){var param=i===1?thisWired:argsWired[i-2];if(argTypes[i].destructorFunction!==null){argTypes[i].destructorFunction(param)}}}if(returns){return argTypes[0].fromWireType(rv)}}return onDone(rv)}}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 heap32VectorToArray(count,firstElement){var array=[];for(var i=0;i<count;i++){array.push(HEAP32[(firstElement>>2)+i])}return array}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=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}function dynCall(sig,ptr,args){if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}return getWasmTableEntry(ptr).apply(null,args)}function getDynCaller(sig,ptr){var argCache=[];return function(){argCache.length=arguments.length;for(var i=0;i<arguments.length;i++){argCache[i]=arguments[i]}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_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError("Cannot call "+name+" due to unbound types",argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[]})}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=function(value){return value};if(minRange===0){var bitshift=32-8*size;fromWireType=function(value){return value<<bitshift>>>bitshift}}var isUnsignedType=name.includes("unsigned");registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}if(value<minRange||value>maxRange){throw new TypeError('Passing a number "'+_embind_repr(value)+'" from JS side to C/C++ side to an argument of type "'+name+'", which is outside the valid range ['+minRange+", "+maxRange+"]!")}return isUnsignedType?value>>>0:value|0},"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 str;if(stdStringIsUTF8){var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+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[value+4+i])}str=a.join("")}_free(value);return str},"toWireType":function(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value)}var getLength;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){getLength=function(){return lengthBytesUTF8(value)}}else{getLength=function(){return value.length}}var length=getLength();var ptr=_malloc(4+length+1);HEAPU32[ptr>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,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+4+i]=charCode}}else{for(var i=0;i<length;++i){HEAPU8[ptr+4+i]=value[i]}}}if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}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=function(){return HEAPU16};shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=function(){return 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 _abort(){abort("")}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function abortOnCannotGrowMemory(requestedSize){abort("OOM")}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;abortOnCannotGrowMemory(requestedSize)}embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");InternalError=Module["InternalError"]=extendError(Error,"InternalError");init_emval();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");var ASSERTIONS=false;function intArrayToString(array){var ret=[];for(var i=0;i<array.length;i++){var chr=array[i];if(chr>255){if(ASSERTIONS){assert(false,"Character code "+chr+" ("+String.fromCharCode(chr)+")  at offset "+i+" not in 0x00-0xFF.")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var decodeBase64=typeof atob==="function"?atob:function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i<input.length);return output};function intArrayFromBase64(s){if(typeof ENVIRONMENT_IS_NODE==="boolean"&&ENVIRONMENT_IS_NODE){var buf=Buffer.from(s,"base64");return new Uint8Array(buf["buffer"],buf["byteOffset"],buf["byteLength"])}try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error("Converting base64 string to bytes failed.")}}function tryParseAsDataURI(filename){if(!isDataURI(filename)){return}return intArrayFromBase64(filename.slice(dataURIPrefix.length))}var asmLibraryArg={"k":__embind_register_bigint,"j":__embind_register_bool,"i":__embind_register_emval,"f":__embind_register_float,"h":__embind_register_function,"c":__embind_register_integer,"b":__embind_register_memory_view,"g":__embind_register_std_string,"d":__embind_register_std_wstring,"n":__embind_register_void,"e":_abort,"l":_emscripten_memcpy_big,"m":_emscripten_resize_heap,"a":wasmMemory};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["o"]).apply(null,arguments)};var ___getTypeName=Module["___getTypeName"]=function(){return(___getTypeName=Module["___getTypeName"]=Module["asm"]["q"]).apply(null,arguments)};var ___embind_register_native_and_builtin_types=Module["___embind_register_native_and_builtin_types"]=function(){return(___embind_register_native_and_builtin_types=Module["___embind_register_native_and_builtin_types"]=Module["asm"]["r"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["s"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["t"]).apply(null,arguments)};Module["getValue"]=getValue;Module["UTF8ToString"]=UTF8ToString;Module["writeArrayToMemory"]=writeArrayToMemory;var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};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();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();


  return KgmCryptoModule.ready
}
);
})();
if (typeof exports === 'object' && typeof module === 'object')
  module.exports = KgmCryptoModule;
else if (typeof define === 'function' && define['amd'])
  define([], function() { return KgmCryptoModule; });
else if (typeof exports === 'object')
  exports["KgmCryptoModule"] = KgmCryptoModule;
