vbapm 0.6.3-alpha

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.
Files changed (167) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +246 -0
  3. package/lib/_commonjsHelpers-553b27b3.js +2 -0
  4. package/lib/_commonjsHelpers-553b27b3.js.map +1 -0
  5. package/lib/build-project-55e5df48.js +4 -0
  6. package/lib/build-project-55e5df48.js.map +1 -0
  7. package/lib/build-target-283e1e7d.js +10 -0
  8. package/lib/build-target-283e1e7d.js.map +1 -0
  9. package/lib/create-project-905598ca.js +11 -0
  10. package/lib/create-project-905598ca.js.map +1 -0
  11. package/lib/debug.js +2 -0
  12. package/lib/debug.js.map +1 -0
  13. package/lib/export-project-55168787.js +5 -0
  14. package/lib/export-project-55168787.js.map +1 -0
  15. package/lib/export-target-c9ddd2fa.js +5 -0
  16. package/lib/export-target-c9ddd2fa.js.map +1 -0
  17. package/lib/get-target-23b8cc04.js +12 -0
  18. package/lib/get-target-23b8cc04.js.map +1 -0
  19. package/lib/index-35cff1d5.js +38 -0
  20. package/lib/index-35cff1d5.js.map +1 -0
  21. package/lib/index-87f55e79.js +4 -0
  22. package/lib/index-87f55e79.js.map +1 -0
  23. package/lib/index-b49bd5b2.js +2 -0
  24. package/lib/index-b49bd5b2.js.map +1 -0
  25. package/lib/index-c97017db.js +2 -0
  26. package/lib/index-c97017db.js.map +1 -0
  27. package/lib/index-d9ba3ba0.js +6 -0
  28. package/lib/index-d9ba3ba0.js.map +1 -0
  29. package/lib/index-ffbba08f.js +3 -0
  30. package/lib/index-ffbba08f.js.map +1 -0
  31. package/lib/index.js +2 -0
  32. package/lib/index.js.map +1 -0
  33. package/lib/inherits-713f4554.js +2 -0
  34. package/lib/inherits-713f4554.js.map +1 -0
  35. package/lib/init-project-a62cb644.js +16 -0
  36. package/lib/init-project-a62cb644.js.map +1 -0
  37. package/lib/load-from-project-e6530a69.js +6 -0
  38. package/lib/load-from-project-e6530a69.js.map +1 -0
  39. package/lib/minimatch-3a1d1fa9.js +2 -0
  40. package/lib/minimatch-3a1d1fa9.js.map +1 -0
  41. package/lib/once-9eb67b4f.js +2 -0
  42. package/lib/once-9eb67b4f.js.map +1 -0
  43. package/lib/project-d43b4e0c.js +30 -0
  44. package/lib/project-d43b4e0c.js.map +1 -0
  45. package/lib/run-macro-f4aa7c14.js +2 -0
  46. package/lib/run-macro-f4aa7c14.js.map +1 -0
  47. package/lib/sat-solver-01d6409e.js +2 -0
  48. package/lib/sat-solver-01d6409e.js.map +1 -0
  49. package/lib/src/actions/build-project.d.ts +2 -0
  50. package/lib/src/actions/create-project.d.ts +8 -0
  51. package/lib/src/actions/export-project.d.ts +6 -0
  52. package/lib/src/actions/increment-version.d.ts +5 -0
  53. package/lib/src/actions/init-project.d.ts +9 -0
  54. package/lib/src/actions/run-macro.d.ts +8 -0
  55. package/lib/src/actions/test-project.d.ts +5 -0
  56. package/lib/src/addin.d.ts +36 -0
  57. package/lib/src/bin/vba-blocks-build.d.ts +2 -0
  58. package/lib/src/bin/vba-blocks-export.d.ts +2 -0
  59. package/lib/src/bin/vba-blocks-init.d.ts +2 -0
  60. package/lib/src/bin/vba-blocks-new.d.ts +2 -0
  61. package/lib/src/bin/vba-blocks-run.d.ts +2 -0
  62. package/lib/src/bin/vba-blocks-test.d.ts +2 -0
  63. package/lib/src/bin/vba-blocks-version.d.ts +2 -0
  64. package/lib/src/bin/vba-blocks.d.ts +2 -0
  65. package/lib/src/build/apply-changeset.d.ts +3 -0
  66. package/lib/src/build/build-graph.d.ts +18 -0
  67. package/lib/src/build/changeset.d.ts +14 -0
  68. package/lib/src/build/compare-build-graphs.d.ts +3 -0
  69. package/lib/src/build/component.d.ts +25 -0
  70. package/lib/src/build/index.d.ts +7 -0
  71. package/lib/src/build/load-from-export.d.ts +2 -0
  72. package/lib/src/build/load-from-project.d.ts +5 -0
  73. package/lib/src/build/stage-build-graph.d.ts +2 -0
  74. package/lib/src/build/transform-build-graph.d.ts +3 -0
  75. package/lib/src/build/transforms/editor-config.d.ts +3 -0
  76. package/lib/src/cache.d.ts +9 -0
  77. package/lib/src/config.d.ts +29 -0
  78. package/lib/src/debug.d.ts +2 -0
  79. package/lib/src/env.d.ts +21 -0
  80. package/lib/src/errors.d.ts +56 -0
  81. package/lib/src/index.d.ts +16 -0
  82. package/lib/src/installer.d.ts +3 -0
  83. package/lib/src/lockfile/index.d.ts +23 -0
  84. package/lib/src/lockfile/is-lockfile-valid.d.ts +10 -0
  85. package/lib/src/lockfile/lockfile.d.ts +26 -0
  86. package/lib/src/manifest/dependency.d.ts +25 -0
  87. package/lib/src/manifest/index.d.ts +34 -0
  88. package/lib/src/manifest/reference.d.ts +12 -0
  89. package/lib/src/manifest/source.d.ts +8 -0
  90. package/lib/src/manifest/target.d.ts +10 -0
  91. package/lib/src/manifest/version.d.ts +3 -0
  92. package/lib/src/messages.d.ts +22 -0
  93. package/lib/src/professional/sources/git-source.d.ts +7 -0
  94. package/lib/src/professional/workspace.d.ts +10 -0
  95. package/lib/src/project.d.ts +48 -0
  96. package/lib/src/reporter.d.ts +12 -0
  97. package/lib/src/resolve/dependency-graph.d.ts +4 -0
  98. package/lib/src/resolve/index.d.ts +6 -0
  99. package/lib/src/resolve/latest-solver.d.ts +8 -0
  100. package/lib/src/resolve/resolver.d.ts +23 -0
  101. package/lib/src/resolve/sat-solver.d.ts +7 -0
  102. package/lib/src/sources/index.d.ts +16 -0
  103. package/lib/src/sources/path-source.d.ts +7 -0
  104. package/lib/src/sources/registration.d.ts +17 -0
  105. package/lib/src/sources/registry-source.d.ts +32 -0
  106. package/lib/src/sources/source.d.ts +6 -0
  107. package/lib/src/targets/add-target.d.ts +8 -0
  108. package/lib/src/targets/build-target.d.ts +41 -0
  109. package/lib/src/targets/export-target.d.ts +15 -0
  110. package/lib/src/targets/get-target.d.ts +7 -0
  111. package/lib/src/targets/index.d.ts +3 -0
  112. package/lib/src/targets/project-info.d.ts +7 -0
  113. package/lib/src/targets/transform-target.d.ts +3 -0
  114. package/lib/src/targets/transforms/core-xml.d.ts +2 -0
  115. package/lib/src/targets/transforms/workbook-xml.d.ts +2 -0
  116. package/lib/src/utils/async-map.d.ts +4 -0
  117. package/lib/src/utils/download.d.ts +1 -0
  118. package/lib/src/utils/fs.d.ts +23 -0
  119. package/lib/src/utils/get-staging.d.ts +1 -0
  120. package/lib/src/utils/git.d.ts +4 -0
  121. package/lib/src/utils/github.d.ts +9 -0
  122. package/lib/src/utils/has.d.ts +1 -0
  123. package/lib/src/utils/hash.d.ts +8 -0
  124. package/lib/src/utils/interop.d.ts +1 -0
  125. package/lib/src/utils/is.d.ts +5 -0
  126. package/lib/src/utils/noop.d.ts +1 -0
  127. package/lib/src/utils/observable.d.ts +15 -0
  128. package/lib/src/utils/parallel.d.ts +6 -0
  129. package/lib/src/utils/path.d.ts +7 -0
  130. package/lib/src/utils/pipe.d.ts +5 -0
  131. package/lib/src/utils/run.d.ts +17 -0
  132. package/lib/src/utils/stdout-file.d.ts +3 -0
  133. package/lib/src/utils/text.d.ts +4 -0
  134. package/lib/src/utils/toml.d.ts +4 -0
  135. package/lib/src/utils/unique.d.ts +1 -0
  136. package/lib/src/utils/without.d.ts +1 -0
  137. package/lib/src/utils/xml.d.ts +10 -0
  138. package/lib/src/utils/zip.d.ts +17 -0
  139. package/lib/test-project-d4f237d1.js +2 -0
  140. package/lib/test-project-d4f237d1.js.map +1 -0
  141. package/lib/text-ba532b40.js +10 -0
  142. package/lib/text-ba532b40.js.map +1 -0
  143. package/lib/tmp-bc08ebcf.js +10 -0
  144. package/lib/tmp-bc08ebcf.js.map +1 -0
  145. package/lib/toml-patch.es-6bd2145d.js +4 -0
  146. package/lib/toml-patch.es-6bd2145d.js.map +1 -0
  147. package/lib/vba-blocks-build-a717fcdb.js +10 -0
  148. package/lib/vba-blocks-build-a717fcdb.js.map +1 -0
  149. package/lib/vba-blocks-export-7e2c75cc.js +8 -0
  150. package/lib/vba-blocks-export-7e2c75cc.js.map +1 -0
  151. package/lib/vba-blocks-init-54531020.js +17 -0
  152. package/lib/vba-blocks-init-54531020.js.map +1 -0
  153. package/lib/vba-blocks-new-3210d92c.js +18 -0
  154. package/lib/vba-blocks-new-3210d92c.js.map +1 -0
  155. package/lib/vba-blocks-run-ab9d4ad4.js +11 -0
  156. package/lib/vba-blocks-run-ab9d4ad4.js.map +1 -0
  157. package/lib/vba-blocks-test-da5dba90.js +16 -0
  158. package/lib/vba-blocks-test-da5dba90.js.map +1 -0
  159. package/lib/vba-blocks-version-e1b3c35a.js +9 -0
  160. package/lib/vba-blocks-version-e1b3c35a.js.map +1 -0
  161. package/lib/vba-blocks.js +43 -0
  162. package/lib/vba-blocks.js.map +1 -0
  163. package/lib/workbook-xml-69fff4ae.js +3 -0
  164. package/lib/workbook-xml-69fff4ae.js.map +1 -0
  165. package/package.json +116 -0
  166. package/run-scripts/run.applescript +78 -0
  167. package/run-scripts/run.ps1 +211 -0
@@ -0,0 +1,2 @@
1
+ "use strict";var assert$1=require("assert"),_commonjsHelpers=require("./_commonjsHelpers-553b27b3.js"),index=require("./text-ba532b40.js"),project=require("./project-d43b4e0c.js");function _mergeNamespaces(e,r){return r.forEach((function(r){r&&"string"!=typeof r&&!Array.isArray(r)&&Object.keys(r).forEach((function(i){if("default"!==i&&!(i in e)){var t=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(e,i,t.get?t:{enumerable:!0,get:function(){return r[i]}})}}))})),Object.freeze(e)}require("stream"),require("http"),require("url"),require("punycode"),require("https"),require("zlib"),require("child_process"),require("util"),require("path"),require("os"),require("fs"),require("constants"),require("crypto"),require("querystring");var minisat=_commonjsHelpers.createCommonjsModule((function(module){var C_MINISAT;C_MINISAT=function(){var module={},require=function(){},process={argv:["node","minisat"],on:function(){},stdout:{write:function(e){console.log("MINISAT-out:",e.replace(/\n$/,""))}},stderr:{write:function(e){console.log("MINISAT-err:",e.replace(/\n$/,""))}}},Module;Module||(Module=(void 0!==Module?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_NODE="object"==typeof process&&"function"==typeof require,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=function(e){process.stdout.write(e+"\n")}),Module.printErr||(Module.printErr=function(e){process.stderr.write(e+"\n")});var nodeFS=require(),nodePath=require();Module.read=function(e,r){e=nodePath.normalize(e);var i=nodeFS.readFileSync(e);return i||e==nodePath.resolve(e)||(e=path.join(__dirname,"..","src",e),i=nodeFS.readFileSync(e)),i&&!r&&(i=i.toString()),i},Module.readBinary=function(e){return Module.read(e,!0)},Module.load=function(e){globalEval(read(e))},process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program",Module.arguments=process.argv.slice(2),void 0!==module&&(module.exports=Module),process.on("uncaughtException",(function(e){if(!(e instanceof ExitStatus))throw e}))}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),"undefined"!=typeof printErr&&(Module.printErr=printErr),"undefined"!=typeof read?Module.read=read:Module.read=function(){throw"no read() available (jsc?)"},Module.readBinary=function(e){if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));var r=read(e,"binary");return assert("object"==typeof r),r},"undefined"!=typeof scriptArgs?Module.arguments=scriptArgs:void 0!==arguments&&(Module.arguments=arguments),this.Module=Module;else{if(!ENVIRONMENT_IS_WORKER)throw"Unknown runtime environment. Where are we?";if(Module.read=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},void 0!==arguments&&(Module.arguments=arguments),"undefined"!=typeof console)Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.log(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&"undefined"!=typeof dump?function(e){dump(e)}:function(e){})}Module.load=importScripts}function globalEval(e){eval.call(null,e)}for(var key in!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[],moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);var Runtime={setTempRet0:function(e){tempRet0=e},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(e){STACKTOP=e},getNativeTypeSize:function(e){switch(e){case"i1":case"i8":return 1;case"i16":return 2;case"i32":case"float":return 4;case"i64":case"double":return 8;default:if("*"===e[e.length-1])return Runtime.QUANTUM_SIZE;if("i"===e[0]){var r=parseInt(e.substr(1));return assert(r%8==0),r/8}return 0}},getNativeFieldSize:function(e){return Math.max(Runtime.getNativeTypeSize(e),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,getAlignSize:function(e,r,i){return i||"i64"!=e&&"double"!=e?e?Math.min(r||(e?Runtime.getNativeFieldSize(e):0),Runtime.QUANTUM_SIZE):Math.min(r,8):8},dynCall:function(e,r,i){return i&&i.length?(i.splice||(i=Array.prototype.slice.call(i)),i.splice(0,0,r),Module["dynCall_"+e].apply(null,i)):Module["dynCall_"+e].call(null,r)},functionPointers:[],addFunction:function(e){for(var r=0;r<Runtime.functionPointers.length;r++)if(!Runtime.functionPointers[r])return Runtime.functionPointers[r]=e,2*(1+r);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."},removeFunction:function(e){Runtime.functionPointers[(e-2)/2]=null},getAsmConst:function(code,numArgs){Runtime.asmConstCache||(Runtime.asmConstCache={});var func=Runtime.asmConstCache[code];if(func)return func;for(var args=[],i=0;i<numArgs;i++)args.push(String.fromCharCode(36)+i);var source=Pointer_stringify(code);'"'===source[0]&&(source.indexOf('"',1)===source.length-1?source=source.substr(1,source.length-2):abort("invalid EM_ASM input |"+source+"|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)"));try{var evalled=eval("(function(Module, FS) { return function("+args.join(",")+"){ "+source+" } })")(Module,void 0!==FS?FS:null)}catch(e){throw Module.printErr("error in executing inline EM_ASM code: "+e+" on: \n\n"+source+"\n\nwith args |"+args+"| (make sure to use the right one out of EM_ASM, EM_ASM_ARGS, etc.)"),e}return Runtime.asmConstCache[code]=evalled},warnOnce:function(e){Runtime.warnOnce.shown||(Runtime.warnOnce.shown={}),Runtime.warnOnce.shown[e]||(Runtime.warnOnce.shown[e]=1,Module.printErr(e))},funcWrappers:{},getFuncWrapper:function(e,r){assert(r),Runtime.funcWrappers[r]||(Runtime.funcWrappers[r]={});var i=Runtime.funcWrappers[r];return i[e]||(i[e]=function(){return Runtime.dynCall(r,e,arguments)}),i[e]},UTF8Processor:function(){var e=[],r=0;this.processCChar=function(i){if(i&=255,0==e.length)return 128&i?(e.push(i),r=192==(224&i)?1:224==(240&i)?2:3,""):String.fromCharCode(i);if(r&&(e.push(i),--r>0))return"";var t,n=e[0],o=e[1],a=e[2],s=e[3];if(2==e.length)t=String.fromCharCode((31&n)<<6|63&o);else if(3==e.length)t=String.fromCharCode((15&n)<<12|(63&o)<<6|63&a);else{var u=(7&n)<<18|(63&o)<<12|(63&a)<<6|63&s;t=String.fromCharCode(55296+((u-65536)/1024|0),(u-65536)%1024+56320)}return e.length=0,t},this.processJSString=function(e){e=unescape(encodeURIComponent(e));for(var r=[],i=0;i<e.length;i++)r.push(e.charCodeAt(i));return r}},getCompilerSetting:function(e){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work"},stackAlloc:function(e){var r=STACKTOP;return STACKTOP=(STACKTOP=STACKTOP+e|0)+15&-16,r},staticAlloc:function(e){var r=STATICTOP;return STATICTOP=(STATICTOP=STATICTOP+e|0)+15&-16,r},dynamicAlloc:function(e){var r=DYNAMICTOP;return(DYNAMICTOP=(DYNAMICTOP=DYNAMICTOP+e|0)+15&-16)>=TOTAL_MEMORY&&enlargeMemory(),r},alignMemory:function(e,r){return e=Math.ceil(e/(r||16))*(r||16)},makeBigInt:function(e,r,i){return i?+(e>>>0)+4294967296*+(r>>>0):+(e>>>0)+4294967296*+(0|r)},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=!1,tempDouble,tempI64,tempRet0,cwrap,ccall;function assert(e,r){e||abort("Assertion failed: "+r)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(e,r,i,t){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":HEAP8[e|0]=r;break;case"i16":HEAP16[e>>1]=r;break;case"i32":HEAP32[e>>2]=r;break;case"i64":tempI64=[r>>>0,(tempDouble=r,+Math_abs(tempDouble)>=1?tempDouble>0?(0|Math_min(+Math_floor(tempDouble/4294967296),4294967295))>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=r;break;case"double":HEAPF64[e>>3]=r;break;default:abort("invalid type for setValue: "+i)}}function getValue(e,r,i){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":return HEAP8[e|0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+r)}return null}(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(e){var r=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,r),r},stringToC:function(e){var r=0;return null!=e&&0!==e&&writeStringToMemory(e,r=Runtime.stackAlloc(1+(e.length<<2))),r}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,i,t){var n=getCFunc(e),o=[],a=0;if(t)for(var s=0;s<t.length;s++){var u=toC[i[s]];u?(0===a&&(a=Runtime.stackSave()),o[s]=u(t[s])):o[s]=t[s]}var f=n.apply(null,o);return"string"===r&&(f=Pointer_stringify(f)),0!==a&&Runtime.stackRestore(a),f};var sourceRegex=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(e){var r=e.toString().match(sourceRegex).slice(1);return{arguments:r[0],body:r[1],returnValue:r[2]}}var JSsource={};for(var fun in JSfuncs)JSfuncs.hasOwnProperty(fun)&&(JSsource[fun]=parseJSFunc(JSfuncs[fun]));cwrap=function cwrap(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every((function(e){return"number"===e})),numericRet="string"!==returnType;if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map((function(e,r){return"$"+r})),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i<nargs;i++){var arg=argNames[i],type=argTypes[i];if("number"!==type){var convertCode=JSsource[type+"ToC"];funcstr+="var "+convertCode.arguments+" = "+arg+";",funcstr+=convertCode.body+";",funcstr+=arg+"="+convertCode.returnValue+";"}}}var cfuncname=parseJSFunc((function(){return cfunc})).returnValue;if(funcstr+="var ret = "+cfuncname+"("+argNames.join(",")+");",!numericRet){var strgfy=parseJSFunc((function(){return Pointer_stringify})).returnValue;funcstr+="ret = "+strgfy+"(ret);"}return numericArgs||(funcstr+=JSsource.stackRestore.body.replace("()","(stack)")+";"),funcstr+="return ret})",eval(funcstr)}})(),Module.cwrap=cwrap,Module.ccall=ccall,Module.setValue=setValue,Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;function allocate(e,r,i,t){var n,o;"number"==typeof e?(n=!0,o=e):(n=!1,o=e.length);var a,s="string"==typeof r?r:null;if(a=i==ALLOC_NONE?t:[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][void 0===i?ALLOC_STATIC:i](Math.max(o,s?1:r.length)),n){var u;t=a;for(assert(!(3&a)),u=a+(-4&o);t<u;t+=4)HEAP32[t>>2]=0;for(u=a+o;t<u;)HEAP8[t++|0]=0;return a}if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,a):HEAPU8.set(new Uint8Array(e),a),a;for(var f,l,c,h=0;h<o;){var _=e[h];"function"==typeof _&&(_=Runtime.getFunctionIndex(_)),0!==(f=s||r[h])?("i64"==f&&(f="i32"),setValue(a+h,_,f),c!==f&&(l=Runtime.getNativeTypeSize(f),c=f),h+=l):h++}return a}function Pointer_stringify(e,r){if(0===r||!e)return"";for(var i,t=!1,n=0;;){if((i=HEAPU8[e+n|0])>=128)t=!0;else if(0==i&&!r)break;if(n++,r&&n==r)break}r||(r=n);var o="";if(!t){for(var a,s=1024;r>0;)a=String.fromCharCode.apply(String,HEAPU8.subarray(e,e+Math.min(r,s))),o=o?o+a:a,e+=s,r-=s;return o}var u=new Runtime.UTF8Processor;for(n=0;n<r;n++)i=HEAPU8[e+n|0],o+=u.processCChar(i);return o}function UTF16ToString(e){for(var r=0,i="";;){var t=HEAP16[e+2*r>>1];if(0==t)return i;++r,i+=String.fromCharCode(t)}}function stringToUTF16(e,r){for(var i=0;i<e.length;++i){var t=e.charCodeAt(i);HEAP16[r+2*i>>1]=t}HEAP16[r+2*e.length>>1]=0}function UTF32ToString(e){for(var r=0,i="";;){var t=HEAP32[e+4*r>>2];if(0==t)return i;if(++r,t>=65536){var n=t-65536;i+=String.fromCharCode(55296|n>>10,56320|1023&n)}else i+=String.fromCharCode(t)}}function stringToUTF32(e,r){for(var i=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);if(n>=55296&&n<=57343)n=65536+((1023&n)<<10)|1023&e.charCodeAt(++t);HEAP32[r+4*i>>2]=n,++i}HEAP32[r+4*i>>2]=0}function demangle(e){var r=!!Module.___cxa_demangle;if(r)try{var i=_malloc(e.length);writeStringToMemory(e.substr(1),i);var t=_malloc(4),n=Module.___cxa_demangle(i,0,0,t);if(0===getValue(t,"i32")&&n)return Pointer_stringify(n)}catch(e){}finally{i&&_free(i),t&&_free(t),n&&_free(n)}var o=3,a={v:"void",b:"bool",c:"char",s:"short",i:"int",l:"long",f:"float",d:"double",w:"wchar_t",a:"signed char",h:"unsigned char",t:"unsigned short",j:"unsigned int",m:"unsigned long",x:"long long",y:"unsigned long long",z:"..."},s=[],u=!0;var f=e;try{if("Object._main"==e||"_main"==e)return"main()";if("number"==typeof e&&(e=Pointer_stringify(e)),"_"!==e[0])return e;if("_"!==e[1])return e;if("Z"!==e[2])return e;switch(e[3]){case"n":return"operator new()";case"d":return"operator delete()"}f=function r(i,t,n){t=t||1/0;var f,l="",c=[];if("N"===e[o]){if(f=function(){o++,"K"===e[o]&&o++;for(var r=[];"E"!==e[o];)if("S"!==e[o])if("C"!==e[o]){var i=parseInt(e.substr(o)),t=i.toString().length;if(!i||!t){o--;break}var n=e.substr(o+t,i);r.push(n),s.push(n),o+=t+i}else r.push(r[r.length-1]),o+=2;else{o++;var a=e.indexOf("_",o),u=e.substring(o,a)||0;r.push(s[u]||"?"),o=a+1}return o++,r}().join("::"),0==--t)return i?[f]:f}else if(("K"===e[o]||u&&"L"===e[o])&&o++,m=parseInt(e.substr(o))){var h=m.toString().length;f=e.substr(o+h,m),o+=h+m}if(u=!1,"I"===e[o]){o++;var _=r(!0);l+=r(!0,1,!0)[0]+" "+f+"<"+_.join(", ")+">"}else l=f;e:for(;o<e.length&&t-- >0;){var d=e[o++];if(d in a)c.push(a[d]);else switch(d){case"P":c.push(r(!0,1,!0)[0]+"*");break;case"R":c.push(r(!0,1,!0)[0]+"&");break;case"L":o++;var m=e.indexOf("E",o)-o;c.push(e.substr(o,m)),o+=m+2;break;case"A":if(m=parseInt(e.substr(o)),o+=m.toString().length,"_"!==e[o])throw"?";o++,c.push(r(!0,1,!0)[0]+" ["+m+"]");break;case"E":break e;default:l+="?"+d;break e}}return n||1!==c.length||"void"!==c[0]||(c=[]),i?(l&&c.push(l+"?"),c):l+"("+c.join(", ")+")"}()}catch(e){f+="?"}return f.indexOf("?")>=0&&!r&&Runtime.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),f}function demangleAll(e){return e.replace(/__Z[\w\d_]+/g,(function(e){var r=demangle(e);return e===r?e:e+" ["+r+"]"}))}function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(r){e=r}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function stackTrace(){return demangleAll(jsStackTrace())}Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE,Module.allocate=allocate,Module.Pointer_stringify=Pointer_stringify,Module.UTF16ToString=UTF16ToString,Module.stringToUTF16=stringToUTF16,Module.UTF32ToString=UTF32ToString,Module.stringToUTF32=stringToUTF32,Module.stackTrace=stackTrace;var PAGE_SIZE=4096,HEAP,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function alignMemoryPage(e){return e+4095&-4096}var STATIC_BASE=0,STATICTOP=0,STACK_BASE=0,STACKTOP=0,STACK_MAX=0,DYNAMIC_BASE=0,DYNAMICTOP=0;function enlargeMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.")}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||67108864;Module.FAST_MEMORY;for(var totalMemory=65536;totalMemory<TOTAL_MEMORY||totalMemory<2*TOTAL_STACK;)totalMemory<16777216?totalMemory*=2:totalMemory+=16777216;totalMemory!==TOTAL_MEMORY&&(Module.printErr("increasing TOTAL_MEMORY to "+totalMemory+" to be compliant with the asm.js spec"),TOTAL_MEMORY=totalMemory),assert("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&!!new Int32Array(1).subarray&&!!new Int32Array(1).set,"JS engine does not provide full typed array support");var buffer=new ArrayBuffer(TOTAL_MEMORY);function callRuntimeCallbacks(e){for(;e.length>0;){var r=e.shift();if("function"!=typeof r){var i=r.func;"number"==typeof i?void 0===r.arg?Runtime.dynCall("v",i):Runtime.dynCall("vi",i,[r.arg]):i(void 0===r.arg?null:r.arg)}else r()}}HEAP8=new Int8Array(buffer),HEAP16=new Int16Array(buffer),HEAP32=new Int32Array(buffer),HEAPU8=new Uint8Array(buffer),HEAPU16=new Uint16Array(buffer),HEAPU32=new Uint32Array(buffer),HEAPF32=new Float32Array(buffer),HEAPF64=new Float64Array(buffer),HEAP32[0]=255,assert(255===HEAPU8[0]&&0===HEAPU8[3],"Typed arrays 2 must be run on a little-endian system"),Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__)}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){__ATEXIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}function intArrayFromString(e,r,i){var t=(new Runtime.UTF8Processor).processJSString(e);return i&&(t.length=i),r||t.push(0),t}function intArrayToString(e){for(var r=[],i=0;i<e.length;i++){var t=e[i];t>255&&(t&=255),r.push(String.fromCharCode(t))}return r.join("")}function writeStringToMemory(e,r,i){for(var t=intArrayFromString(e,i),n=0;n<t.length;){var o=t[n];HEAP8[r+n|0]=o,n+=1}}function writeArrayToMemory(e,r){for(var i=0;i<e.length;i++)HEAP8[r+i|0]=e[i]}function writeAsciiToMemory(e,r,i){for(var t=0;t<e.length;t++)HEAP8[r+t|0]=e.charCodeAt(t);i||(HEAP8[r+e.length|0]=0)}function unSign(e,r,i){return e>=0?e:r<=32?2*Math.abs(1<<r-1)+e:Math.pow(2,r)+e}function reSign(e,r,i){if(e<=0)return e;var t=r<=32?Math.abs(1<<r-1):Math.pow(2,r-1);return e>=t&&(r<=32||e>t)&&(e=-2*t+e),e}Module.addOnPreRun=Module.addOnPreRun=addOnPreRun,Module.addOnInit=Module.addOnInit=addOnInit,Module.addOnPreMain=Module.addOnPreMain=addOnPreMain,Module.addOnExit=Module.addOnExit=addOnExit,Module.addOnPostRun=Module.addOnPostRun=addOnPostRun,Module.intArrayFromString=intArrayFromString,Module.intArrayToString=intArrayToString,Module.writeStringToMemory=writeStringToMemory,Module.writeArrayToMemory=writeArrayToMemory,Module.writeAsciiToMemory=writeAsciiToMemory,Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(e,r){var i=65535&e,t=65535&r;return i*t+((e>>>16)*t+i*(r>>>16)<<16)|0}),Math.imul=Math.imul;var Math_abs=Math.abs,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_min=Math.min,runDependencies=0,dependenciesFulfilled=null;function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&dependenciesFulfilled){var r=dependenciesFulfilled;dependenciesFulfilled=null,r()}}Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={},STATIC_BASE=8,STATICTOP=STATIC_BASE+5664,__ATINIT__.push({func:function(){__GLOBAL__I_a()}},{func:function(){__GLOBAL__I_a127()}}),allocate([78,55,77,105,110,105,115,97,116,50,48,79,117,116,79,102,77,101,109,111,114,121,69,120,99,101,112,116,105,111,110,69,0,0,0,0,0,0,0,0,88,18,0,0,8,0,0,0,78,55,77,105,110,105,115,97,116,54,79,112,116,105,111,110,69,0,0,0,0,0,0,0,88,18,0,0,56,0,0,0,10,32,32,32,32,32,32,32,32,37,115,10,0,0,0,0,0,0,0,0,80,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,78,55,77,105,110,105,115,97,116,49,48,66,111,111,108,79,112,116,105,111,110,69,0,0,128,18,0,0,176,0,0,0,80,0,0,0,0,0,0,0,32,32,45,37,115,44,32,45,110,111,45,37,115,0,0,0,40,100,101,102,97,117,108,116,58,32,37,115,41,10,0,0,111,110,0,0,0,0,0,0,111,102,102,0,0,0,0,0,110,111,45,0,0,0,0,0,0,0,0,0,64,1,0,0,1,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,78,55,77,105,110,105,115,97,116,57,73,110,116,79,112,116,105,111,110,69,0,0,0,0,128,18,0,0,40,1,0,0,80,0,0,0,0,0,0,0,32,32,45,37,45,49,50,115,32,61,32,37,45,56,115,32,91,0,0,0,0,0,0,0,105,109,105,110,0,0,0,0,37,52,100,0,0,0,0,0,32,46,46,32,0,0,0,0,105,109,97,120,0,0,0,0,93,32,40,100,101,102,97,117,108,116,58,32,37,100,41,10,0,0,0,0,0,0,0,0,69,82,82,79,82,33,32,118,97,108,117,101,32,60,37,115,62,32,105,115,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,111,112,116,105,111,110,32,34,37,115,34,46,10,0,0,0,0,0,0,0,0,69,82,82,79,82,33,32,118,97,108,117,101,32,60,37,115,62,32,105,115,32,116,111,111,32,115,109,97,108,108,32,102,111,114,32,111,112,116,105,111,110,32,34,37,115,34,46,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,118,97,114,45,100,101,99,97,121,0,0,0,0,0,0,0,84,104,101,32,118,97,114,105,97,98,108,101,32,97,99,116,105,118,105,116,121,32,100,101,99,97,121,32,102,97,99,116,111,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,99,108,97,45,100,101,99,97,121,0,0,0,0,0,0,0,84,104,101,32,99,108,97,117,115,101,32,97,99,116,105,118,105,116,121,32,100,101,99,97,121,32,102,97,99,116,111,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,110,100,45,102,114,101,113,0,0,0,0,0,0,0,0,84,104,101,32,102,114,101,113,117,101,110,99,121,32,119,105,116,104,32,119,104,105,99,104,32,116,104,101,32,100,101,99,105,115,105,111,110,32,104,101,117,114,105,115,116,105,99,32,116,114,105,101,115,32,116,111,32,99,104,111,111,115,101,32,97,32,114,97,110,100,111,109,32,118,97,114,105,97,98,108,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,110,100,45,115,101,101,100,0,0,0,0,0,0,0,0,85,115,101,100,32,98,121,32,116,104,101,32,114,97,110,100,111,109,32,118,97,114,105,97,98,108,101,32,115,101,108,101,99,116,105,111,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,99,99,109,105,110,45,109,111,100,101,0,0,0,0,0,0,67,111,110,116,114,111,108,115,32,99,111,110,102,108,105,99,116,32,99,108,97,117,115,101,32,109,105,110,105,109,105,122,97,116,105,111,110,32,40,48,61,110,111,110,101,44,32,49,61,98,97,115,105,99,44,32,50,61,100,101,101,112,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,104,97,115,101,45,115,97,118,105,110,103,0,0,0,0,67,111,110,116,114,111,108,115,32,116,104,101,32,108,101,118,101,108,32,111,102,32,112,104,97,115,101,32,115,97,118,105,110,103,32,40,48,61,110,111,110,101,44,32,49,61,108,105,109,105,116,101,100,44,32,50,61,102,117,108,108,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,110,100,45,105,110,105,116,0,0,0,0,0,0,0,0,82,97,110,100,111,109,105,122,101,32,116,104,101,32,105,110,105,116,105,97,108,32,97,99,116,105,118,105,116,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,108,117,98,121,0,0,0,0,85,115,101,32,116,104,101,32,76,117,98,121,32,114,101,115,116,97,114,116,32,115,101,113,117,101,110,99,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,102,105,114,115,116,0,0,84,104,101,32,98,97,115,101,32,114,101,115,116,97,114,116,32,105,110,116,101,114,118,97,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,105,110,99,0,0,0,0,82,101,115,116,97,114,116,32,105,110,116,101,114,118,97,108,32,105,110,99,114,101,97,115,101,32,102,97,99,116,111,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,99,45,102,114,97,99,0,84,104,101,32,102,114,97,99,116,105,111,110,32,111,102,32,119,97,115,116,101,100,32,109,101,109,111,114,121,32,97,108,108,111,119,101,100,32,98,101,102,111,114,101,32,97,32,103,97,114,98,97,103,101,32,99,111,108,108,101,99,116,105,111,110,32,105,115,32,116,114,105,103,103,101,114,101,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,109,105,110,45,108,101,97,114,110,116,115,0,0,0,0,0,77,105,110,105,109,117,109,32,108,101,97,114,110,116,32,99,108,97,117,115,101,32,108,105,109,105,116,0,0,0,0,0,0,0,0,0,192,7,0,0,5,0,0,0,6,0,0,0,7,0,0,0,0,0,0,0,124,32,37,57,100,32,124,32,37,55,100,32,37,56,100,32,37,56,100,32,124,32,37,56,100,32,37,56,100,32,37,54,46,48,102,32,124,32,37,54,46,51,102,32,37,37,32,124,10,0,0,0,0,0,0,0,124,32,32,71,97,114,98,97,103,101,32,99,111,108,108,101,99,116,105,111,110,58,32,32,32,37,49,50,100,32,98,121,116,101,115,32,61,62,32,37,49,50,100,32,98,121,116,101,115,32,32,32,32,32,32,32,32,32,32,32,32,32,124,10,0,0,0,0,0,0,0,0,78,55,77,105,110,105,115,97,116,54,83,111,108,118,101,114,69,0,0,0,0,0,0,0,88,18,0,0,168,7,0,0,60,98,111,111,108,62,0,0,10,32,32,32,32,32,32,32,32,37,115,10,0,0,0,0,60,105,110,116,51,50,62,0,69,82,82,79,82,33,32,118,97,108,117,101,32,60,37,115,62,32,105,115,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,111,112,116,105,111,110,32,34,37,115,34,46,10,0,0,0,0,0,0,0,0,69,82,82,79,82,33,32,118,97,108,117,101,32,60,37,115,62,32,105,115,32,116,111,111,32,115,109,97,108,108,32,102,111,114,32,111,112,116,105,111,110,32,34,37,115,34,46,10,0,0,0,0,0,0,0,0,67,79,82,69,0,0,0,0,60,100,111,117,98,108,101,62,0,0,0,0,0,0,0,0,0,0,0,0,168,8,0,0,1,0,0,0,8,0,0,0,3,0,0,0,3,0,0,0,78,55,77,105,110,105,115,97,116,49,50,68,111,117,98,108,101,79,112,116,105,111,110,69,0,0,0,0,0,0,0,0,128,18,0,0,136,8,0,0,80,0,0,0,0,0,0,0,32,32,45,37,45,49,50,115,32,61,32,37,45,56,115,32,37,99,37,52,46,50,103,32,46,46,32,37,52,46,50,103,37,99,32,40,100,101,102,97,117,108,116,58,32,37,103,41,10,0,0,0,0,0,0,0,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,91,32,83,101,97,114,99,104,32,83,116,97,116,105,115,116,105,99,115,32,93,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,0,124,32,67,111,110,102,108,105,99,116,115,32,124,32,32,32,32,32,32,32,32,32,32,79,82,73,71,73,78,65,76,32,32,32,32,32,32,32,32,32,124,32,32,32,32,32,32,32,32,32,32,76,69,65,82,78,84,32,32,32,32,32,32,32,32,32,32,124,32,80,114,111,103,114,101,115,115,32,124,0,124,32,32,32,32,32,32,32,32,32,32,32,124,32,32,32,32,86,97,114,115,32,32,67,108,97,117,115,101,115,32,76,105,116,101,114,97,108,115,32,124,32,32,32,32,76,105,109,105,116,32,32,67,108,97,117,115,101,115,32,76,105,116,47,67,108,32,124,32,32,32,32,32,32,32,32,32,32,124,0,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,115,121,109,109,0,0,0,83,104,114,105,110,107,32,99,108,97,117,115,101,115,32,98,121,32,97,115,121,109,109,101,116,114,105,99,32,98,114,97,110,99,104,105,110,103,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,99,104,101,99,107,0,0,67,104,101,99,107,32,105,102,32,97,32,99,108,97,117,115,101,32,105,115,32,97,108,114,101,97,100,121,32,105,109,112,108,105,101,100,46,32,40,99,111,115,116,108,121,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,101,108,105,109,0,0,0,0,80,101,114,102,111,114,109,32,118,97,114,105,97,98,108,101,32,101,108,105,109,105,110,97,116,105,111,110,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,114,111,119,0,0,0,0,65,108,108,111,119,32,97,32,118,97,114,105,97,98,108,101,32,101,108,105,109,105,110,97,116,105,111,110,32,115,116,101,112,32,116,111,32,103,114,111,119,32,98,121,32,97,32,110,117,109,98,101,114,32,111,102,32,99,108,97,117,115,101,115,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,99,108,45,108,105,109,0,0,86,97,114,105,97,98,108,101,115,32,97,114,101,32,110,111,116,32,101,108,105,109,105,110,97,116,101,100,32,105,102,32,105,116,32,112,114,111,100,117,99,101,115,32,97,32,114,101,115,111,108,118,101,110,116,32,119,105,116,104,32,97,32,108,101,110,103,116,104,32,97,98,111,118,101,32,116,104,105,115,32,108,105,109,105,116,46,32,45,49,32,109,101,97,110,115,32,110,111,32,108,105,109,105,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,115,117,98,45,108,105,109,0,68,111,32,110,111,116,32,99,104,101,99,107,32,105,102,32,115,117,98,115,117,109,112,116,105,111,110,32,97,103,97,105,110,115,116,32,97,32,99,108,97,117,115,101,32,108,97,114,103,101,114,32,116,104,97,110,32,116,104,105,115,46,32,45,49,32,109,101,97,110,115,32,110,111,32,108,105,109,105,116,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,115,105,109,112,45,103,99,45,102,114,97,99,0,0,0,0,84,104,101,32,102,114,97,99,116,105,111,110,32,111,102,32,119,97,115,116,101,100,32,109,101,109,111,114,121,32,97,108,108,111,119,101,100,32,98,101,102,111,114,101,32,97,32,103,97,114,98,97,103,101,32,99,111,108,108,101,99,116,105,111,110,32,105,115,32,116,114,105,103,103,101,114,101,100,32,100,117,114,105,110,103,32,115,105,109,112,108,105,102,105,99,97,116,105,111,110,46,0,0,0,0,0,0,0,120,14,0,0,9,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,115,117,98,115,117,109,112,116,105,111,110,32,108,101,102,116,58,32,37,49,48,100,32,40,37,49,48,100,32,115,117,98,115,117,109,101,100,44,32,37,49,48,100,32,100,101,108,101,116,101,100,32,108,105,116,101,114,97,108,115,41,13,0,0,101,108,105,109,105,110,97,116,105,111,110,32,108,101,102,116,58,32,37,49,48,100,13,0,124,32,32,69,108,105,109,105,110,97,116,101,100,32,99,108,97,117,115,101,115,58,32,32,32,32,32,37,49,48,46,50,102,32,77,98,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,124,10,0,0,0,0,124,32,32,71,97,114,98,97,103,101,32,99,111,108,108,101,99,116,105,111,110,58,32,32,32,37,49,50,100,32,98,121,116,101,115,32,61,62,32,37,49,50,100,32,98,121,116,101,115,32,32,32,32,32,32,32,32,32,32,32,32,32,124,10,0,0,0,0,0,0,0,0,78,55,77,105,110,105,115,97,116,49,48,83,105,109,112,83,111,108,118,101,114,69,0,0,128,18,0,0,96,14,0,0,192,7,0,0,0,0,0,0,60,100,111,117,98,108,101,62,0,0,0,0,0,0,0,0,60,105,110,116,51,50,62,0,83,73,77,80,0,0,0,0,60,98,111,111,108,62,0,0,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,79,33,0,0,0,0,0,2,0,0,0,0,0,0,0,48,15,0,0,0,0,0,0,117,110,99,97,117,103,104,116,0,0,0,0,0,0,0,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,0,0,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,0,0,0,0,0,0,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,0,0,116,101,114,109,105,110,97,116,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,0,0,0,0,0,0,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,0,0,0,0,0,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,0,0,0,0,0,0,0,200,16,0,0,12,0,0,0,13,0,0,0,1,0,0,0,0,0,0,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,0,83,116,57,98,97,100,95,97,108,108,111,99,0,0,0,0,128,18,0,0,184,16,0,0,80,17,0,0,0,0,0,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,116,104,114,101,119,32,97,110,32,101,120,99,101,112,116,105,111,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,116,57,101,120,99,101,112,116,105,111,110,0,0,0,0,88,18,0,0,64,17,0,0,83,116,57,116,121,112,101,95,105,110,102,111,0,0,0,0,88,18,0,0,88,17,0,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,0,0,0,0,0,0,0,128,18,0,0,112,17,0,0,104,17,0,0,0,0,0,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,0,0,0,0,0,0,128,18,0,0,168,17,0,0,152,17,0,0,0,0,0,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,0,0,0,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0,0,0,0,0,0,0,128,18,0,0,8,18,0,0,152,17,0,0,0,0,0,0,128,18,0,0,224,17,0,0,48,18,0,0,0,0,0,0,0,0,0,0,208,17,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,200,18,0,0,14,0,0,0,18,0,0,0,16,0,0,0,17,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,0,0,0,128,18,0,0,160,18,0,0,208,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,2,4,7,3,6,5,0,0,0,0,0,0,0,0,105,110,102,105,110,105,116,121,0,0,0,0,0,0,0,0,110,97,110,0,0,0,0,0,95,112,137,0,255,9,47,15,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);function _atexit(e,r){__ATEXIT__.unshift({func:e,arg:r})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}assert(tempDoublePtr%8==0),Module._i64Subtract=_i64Subtract;var ___errno_state=0;function ___setErrNo(e){return HEAP32[___errno_state>>2]=e,e}var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(e){switch(e){case 30:return PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 79:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return ___setErrNo(ERRNO_CODES.EINVAL),-1}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(e){if(!e||EXCEPTIONS.infos[e])return e;for(var r in EXCEPTIONS.infos){if(EXCEPTIONS.infos[r].adjusted===e)return r}return e},addRef:function(e){e&&EXCEPTIONS.infos[e].refcount++},decRef:function(e){if(e){var r=EXCEPTIONS.infos[e];assert(r.refcount>0),r.refcount--,0===r.refcount&&(r.destructor&&Runtime.dynCall("vi",r.destructor,[e]),delete EXCEPTIONS.infos[e],___cxa_free_exception(e))}},clearRef:function(e){e&&(EXCEPTIONS.infos[e].refcount=0)}};function ___resumeException(e){throw EXCEPTIONS.last||(EXCEPTIONS.last=e),EXCEPTIONS.clearRef(EXCEPTIONS.deAdjust(e)),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var e=EXCEPTIONS.last;if(!e)return 0|(asm.setTempRet0(0),0);var r=EXCEPTIONS.infos[e],i=r.type;if(!i)return 0|(asm.setTempRet0(0),e);var t=Array.prototype.slice.call(arguments);Module.___cxa_is_pointer_type(i),___cxa_find_matching_catch.buffer||(___cxa_find_matching_catch.buffer=_malloc(4)),HEAP32[___cxa_find_matching_catch.buffer>>2]=e,e=___cxa_find_matching_catch.buffer;for(var n=0;n<t.length;n++)if(t[n]&&Module.___cxa_can_catch(t[n],i,e))return e=HEAP32[e>>2],r.adjusted=e,0|(asm.setTempRet0(t[n]),e);return e=HEAP32[e>>2],0|(asm.setTempRet0(i),e)}function ___cxa_throw(e,r,i){throw EXCEPTIONS.infos[e]={ptr:e,adjusted:e,type:r,destructor:i,refcount:0},EXCEPTIONS.last=e,"uncaught_exception"in __ZSt18uncaught_exceptionv?__ZSt18uncaught_exceptionv.uncaught_exception++:__ZSt18uncaught_exceptionv.uncaught_exception=1,e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function _abort(){Module.abort()}Module._memset=_memset,Module._bitshift64Shl=_bitshift64Shl;var FS=void 0,SOCKFS=void 0;function _send(e,r,i,t){return SOCKFS.getSocket(e)?_write(e,r,i):(___setErrNo(ERRNO_CODES.EBADF),-1)}function _pwrite(e,r,i,t){var n=FS.getStream(e);if(!n)return ___setErrNo(ERRNO_CODES.EBADF),-1;try{var o=HEAP8;return FS.write(n,o,r,i,t)}catch(e){return FS.handleFSError(e),-1}}function _write(e,r,i){var t=FS.getStream(e);if(!t)return ___setErrNo(ERRNO_CODES.EBADF),-1;try{var n=HEAP8;return FS.write(t,n,r,i)}catch(e){return FS.handleFSError(e),-1}}function _fileno(e){return(e=FS.getStreamFromPtr(e))?e.fd:-1}function _fwrite(e,r,i,t){var n=i*r;if(0==n)return 0;var o=_write(_fileno(t),e,n);if(-1==o){var a=FS.getStreamFromPtr(t);return a&&(a.error=!0),0}return o/r|0}function __reallyNegative(e){return e<0||0===e&&1/e==-1/0}function __formatString(e,r){var i=e,t=0;function n(e){var i;return"double"===e?(HEAP32[tempDoublePtr>>2]=HEAP32[r+t>>2],HEAP32[tempDoublePtr+4>>2]=HEAP32[r+(t+4)>>2],i=+HEAPF64[tempDoublePtr>>3]):"i64"==e?i=[HEAP32[r+t>>2],HEAP32[r+(t+4)>>2]]:(e="i32",i=HEAP32[r+t>>2]),t+=Runtime.getNativeFieldSize(e),i}for(var o,a,s=[];;){var u=i;if(0===(o=HEAP8[i|0]))break;if(a=HEAP8[i+1|0],37==o){var f=!1,l=!1,c=!1,h=!1,_=!1;e:for(;;){switch(a){case 43:f=!0;break;case 45:l=!0;break;case 35:c=!0;break;case 48:if(h)break e;h=!0;break;case 32:_=!0;break;default:break e}i++,a=HEAP8[i+1|0]}var d=0;if(42==a)d=n("i32"),i++,a=HEAP8[i+1|0];else for(;a>=48&&a<=57;)d=10*d+(a-48),i++,a=HEAP8[i+1|0];var m,g=!1,p=-1;if(46==a){if(p=0,g=!0,i++,42==(a=HEAP8[i+1|0]))p=n("i32"),i++;else for(;;){var v=HEAP8[i+1|0];if(v<48||v>57)break;p=10*p+(v-48),i++}a=HEAP8[i+1|0]}switch(p<0&&(p=6,g=!1),String.fromCharCode(a)){case"h":104==HEAP8[i+2|0]?(i++,m=1):m=2;break;case"l":108==HEAP8[i+2|0]?(i++,m=8):m=4;break;case"L":case"q":case"j":m=8;break;case"z":case"t":case"I":m=4;break;default:m=null}switch(m&&i++,a=HEAP8[i+1|0],String.fromCharCode(a)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var b=100==a||105==a,y=S=n("i"+8*(m=m||4));if(8==m&&(S=Runtime.makeBigInt(S[0],S[1],117==a)),m<=4)S=(b?reSign:unSign)(S&Math.pow(256,m)-1,8*m);var w=Math.abs(S),A="";if(100==a||105==a)M=8==m&&i64Math?i64Math.stringify(y[0],y[1],null):reSign(S,8*m).toString(10);else if(117==a)M=8==m&&i64Math?i64Math.stringify(y[0],y[1],!0):unSign(S,8*m).toString(10),S=Math.abs(S);else if(111==a)M=(c?"0":"")+w.toString(8);else if(120==a||88==a){if(A=c&&0!=S?"0x":"",8==m&&i64Math)if(y[1]){M=(y[1]>>>0).toString(16);for(var E=(y[0]>>>0).toString(16);E.length<8;)E="0"+E;M+=E}else M=(y[0]>>>0).toString(16);else if(S<0){S=-S,M=(w-1).toString(16);for(var T=[],L=0;L<M.length;L++)T.push((15-parseInt(M[L],16)).toString(16));for(M=T.join("");M.length<2*m;)M="f"+M}else M=w.toString(16);88==a&&(A=A.toUpperCase(),M=M.toUpperCase())}else 112==a&&(0===w?M="(nil)":(A="0x",M=w.toString(16)));if(g)for(;M.length<p;)M="0"+M;for(S>=0&&(f?A="+"+A:_&&(A=" "+A)),"-"==M.charAt(0)&&(A="-"+A,M=M.substr(1));A.length+M.length<d;)l?M+=" ":h?M="0"+M:A=" "+A;(M=A+M).split("").forEach((function(e){s.push(e.charCodeAt(0))}));break;case"f":case"F":case"e":case"E":case"g":case"G":var M,S=n("double");if(isNaN(S))M="nan",h=!1;else if(isFinite(S)){var k=!1,O=Math.min(p,20);if(103==a||71==a){k=!0,p=p||1;var N=parseInt(S.toExponential(O).split("e")[1],10);p>N&&N>=-4?(a=(103==a?"f":"F").charCodeAt(0),p-=N+1):(a=(103==a?"e":"E").charCodeAt(0),p--),O=Math.min(p,20)}101==a||69==a?(M=S.toExponential(O),/[eE][-+]\d$/.test(M)&&(M=M.slice(0,-1)+"0"+M.slice(-1))):102!=a&&70!=a||(M=S.toFixed(O),0===S&&__reallyNegative(S)&&(M="-"+M));var C=M.split("e");if(k&&!c)for(;C[0].length>1&&-1!=C[0].indexOf(".")&&("0"==C[0].slice(-1)||"."==C[0].slice(-1));)C[0]=C[0].slice(0,-1);else for(c&&-1==M.indexOf(".")&&(C[0]+=".");p>O++;)C[0]+="0";M=C[0]+(C.length>1?"e"+C[1]:""),69==a&&(M=M.toUpperCase()),S>=0&&(f?M="+"+M:_&&(M=" "+M))}else M=(S<0?"-":"")+"inf",h=!1;for(;M.length<d;)l?M+=" ":M=!h||"-"!=M[0]&&"+"!=M[0]?(h?"0":" ")+M:M[0]+"0"+M.slice(1);a<97&&(M=M.toUpperCase()),M.split("").forEach((function(e){s.push(e.charCodeAt(0))}));break;case"s":var R=n("i8*"),P=R?_strlen(R):6;if(g&&(P=Math.min(P,p)),!l)for(;P<d--;)s.push(32);if(R)for(L=0;L<P;L++)s.push(HEAPU8[R++|0]);else s=s.concat(intArrayFromString("(null)".substr(0,P),!0));if(l)for(;P<d--;)s.push(32);break;case"c":for(l&&s.push(n("i8"));--d>0;)s.push(32);l||s.push(n("i8"));break;case"n":var I=n("i32*");HEAP32[I>>2]=s.length;break;case"%":s.push(o);break;default:for(L=u;L<i+2;L++)s.push(HEAP8[L|0])}i+=2}else s.push(o),i+=1}return s}function _fprintf(e,r,i){var t=__formatString(r,i),n=Runtime.stackSave(),o=_fwrite(allocate(t,"i8",ALLOC_STACK),1,t.length,e);return Runtime.stackRestore(n),o}function _printf(e,r){var i=__formatString(e,r),t=intArrayToString(i);return"\n"===t[t.length-1]&&(t=t.substr(0,t.length-1)),Module.print(t),i.length}function _pthread_once(e,r){_pthread_once.seen||(_pthread_once.seen={}),e in _pthread_once.seen||(Runtime.dynCall("v",r),_pthread_once.seen[e]=1)}function _fputc(e,r){var i=unSign(255&e);if(HEAP8[_fputc.ret|0]=i,-1==_write(_fileno(r),_fputc.ret,1)){var t=FS.getStreamFromPtr(r);return t&&(t.error=!0),-1}return i}Module._strlen=_strlen;var PTHREAD_SPECIFIC={};function _pthread_getspecific(e){return PTHREAD_SPECIFIC[e]||0}function _fputs(e,r){return _write(_fileno(r),e,_strlen(e))}function _puts(e){var r=Pointer_stringify(e),i=r.substr(0);return"\n"===i[i.length-1]&&(i=i.substr(0,i.length-1)),Module.print(i),r.length}function _pthread_setspecific(e,r){return e in PTHREAD_SPECIFIC?(PTHREAD_SPECIFIC[e]=r,0):ERRNO_CODES.EINVAL}function __exit(e){Module.exit(e)}function _exit(e){__exit(e)}function _malloc(e){return Runtime.dynamicAlloc(e+8)+8&4294967288}function ___cxa_allocate_exception(e){return _malloc(e)}function _fmod(e,r){return e%r}function _fmodl(){return _fmod.apply(null,arguments)}function ___cxa_pure_virtual(){throw ABORT=!0,"Pure virtual function called!"}function _time(e){var r=Date.now()/1e3|0;return e&&(HEAP32[e>>2]=r),r}Module._i64Add=_i64Add,allocate(1,"i32*",ALLOC_STATIC),Module._malloc=_malloc,Module._bitshift64Lshr=_bitshift64Lshr;var PTHREAD_SPECIFIC_NEXT_KEY=1;function _pthread_key_create(e,r){return 0==e?ERRNO_CODES.EINVAL:(HEAP32[e>>2]=PTHREAD_SPECIFIC_NEXT_KEY,PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0,PTHREAD_SPECIFIC_NEXT_KEY++,0)}function ___cxa_guard_acquire(e){return HEAP8[e|0]?0:(HEAP8[e|0]=1,1)}function ___cxa_guard_release(){}function _vfprintf(e,r,i){return _fprintf(e,r,HEAP32[i>>2])}function ___cxa_begin_catch(e){return __ZSt18uncaught_exceptionv.uncaught_exception--,EXCEPTIONS.caught.push(e),EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(e)),e}function _emscripten_memcpy_big(e,r,i){return HEAPU8.set(HEAPU8.subarray(r,r+i),e),e}Module._memcpy=_memcpy;var _llvm_pow_f64=Math_pow;function _sbrk(e){var r=_sbrk;r.called||(DYNAMICTOP=alignMemoryPage(DYNAMICTOP),r.called=!0,assert(Runtime.dynamicAlloc),r.alloc=Runtime.dynamicAlloc,Runtime.dynamicAlloc=function(){abort("cannot dynamically allocate, sbrk now has control")});var i=DYNAMICTOP;return 0!=e&&r.alloc(e),i}var _fabs=Math_abs;function ___errno_location(){return ___errno_state}function _copysign(e,r){return __reallyNegative(e)===__reallyNegative(r)?e:-e}function _copysignl(){return _copysign.apply(null,arguments)}var ___dso_handle=allocate(1,"i32*",ALLOC_STATIC),_stderr=allocate(1,"i32*",ALLOC_STATIC);___errno_state=Runtime.staticAlloc(4),HEAP32[___errno_state>>2]=0,_fputc.ret=allocate([0],"i8",ALLOC_STATIC),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX),assert(DYNAMIC_BASE<TOTAL_MEMORY,"TOTAL_MEMORY not big enough for stack");var ctlz_i8=allocate([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",ALLOC_DYNAMIC),cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_DYNAMIC);function invoke_iiii(e,r,i,t){try{return Module.dynCall_iiii(e,r,i,t)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;asm.setThrew(1,0)}}function invoke_viiiii(e,r,i,t,n,o){try{Module.dynCall_viiiii(e,r,i,t,n,o)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;asm.setThrew(1,0)}}function invoke_vi(e,r){try{Module.dynCall_vi(e,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;asm.setThrew(1,0)}}function invoke_vii(e,r,i){try{Module.dynCall_vii(e,r,i)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;asm.setThrew(1,0)}}function invoke_ii(e,r){try{return Module.dynCall_ii(e,r)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;asm.setThrew(1,0)}}function invoke_v(e){try{Module.dynCall_v(e)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;asm.setThrew(1,0)}}function invoke_viiiiii(e,r,i,t,n,o,a){try{Module.dynCall_viiiiii(e,r,i,t,n,o,a)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;asm.setThrew(1,0)}}function invoke_iii(e,r,i){try{return Module.dynCall_iii(e,r,i)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;asm.setThrew(1,0)}}function invoke_viiii(e,r,i,t,n){try{Module.dynCall_viiii(e,r,i,t,n)}catch(e){if("number"!=typeof e&&"longjmp"!==e)throw e;asm.setThrew(1,0)}}Module.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},Module.asmLibraryArg={abort:abort,assert:assert,min:Math_min,invoke_iiii:invoke_iiii,invoke_viiiii:invoke_viiiii,invoke_vi:invoke_vi,invoke_vii:invoke_vii,invoke_ii:invoke_ii,invoke_v:invoke_v,invoke_viiiiii:invoke_viiiiii,invoke_iii:invoke_iii,invoke_viiii:invoke_viiii,_fabs:_fabs,_llvm_pow_f64:_llvm_pow_f64,_send:_send,_fmod:_fmod,___cxa_guard_acquire:___cxa_guard_acquire,___setErrNo:___setErrNo,_vfprintf:_vfprintf,___cxa_allocate_exception:___cxa_allocate_exception,___cxa_find_matching_catch:___cxa_find_matching_catch,___cxa_guard_release:___cxa_guard_release,_pwrite:_pwrite,__reallyNegative:__reallyNegative,_sbrk:_sbrk,___cxa_begin_catch:___cxa_begin_catch,_emscripten_memcpy_big:_emscripten_memcpy_big,_fileno:_fileno,___resumeException:___resumeException,__ZSt18uncaught_exceptionv:__ZSt18uncaught_exceptionv,_sysconf:_sysconf,_pthread_getspecific:_pthread_getspecific,_atexit:_atexit,_pthread_once:_pthread_once,_puts:_puts,_printf:_printf,_pthread_key_create:_pthread_key_create,_write:_write,___errno_location:___errno_location,_pthread_setspecific:_pthread_setspecific,___cxa_atexit:___cxa_atexit,_copysign:_copysign,_fputc:_fputc,___cxa_throw:___cxa_throw,__exit:__exit,_copysignl:_copysignl,_abort:_abort,_fwrite:_fwrite,_time:_time,_fprintf:_fprintf,__formatString:__formatString,_fputs:_fputs,_exit:_exit,___cxa_pure_virtual:___cxa_pure_virtual,_fmodl:_fmodl,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,tempDoublePtr:tempDoublePtr,ABORT:ABORT,cttz_i8:cttz_i8,ctlz_i8:ctlz_i8,NaN:NaN,Infinity:1/0,___dso_handle:___dso_handle,_stderr:_stderr};var asm=function(e,r,i){"use asm";var t=new e.Int8Array(i);var n=new e.Int16Array(i);var o=new e.Int32Array(i);var a=new e.Uint8Array(i);var s=new e.Uint16Array(i);var u=new e.Uint32Array(i);var f=new e.Float32Array(i);var l=new e.Float64Array(i);var c=r.STACKTOP|0;var h=r.STACK_MAX|0;var _=r.tempDoublePtr|0;var d=r.ABORT|0;var m=r.cttz_i8|0;var g=r.ctlz_i8|0;var p=r.___dso_handle|0;var v=r._stderr|0;var b=0;var y=0;var w=0;var A=0;var E=+r.NaN,T=+r.Infinity;var L=0,M=0,S=0,k=0,O=0.0,N=0,C=0,R=0,P=0.0;var I=0;var F=0;var x=0;var D=0;var B=0;var U=0;var H=0;var V=0;var $=0;var j=0;var W=e.Math.floor;var q=e.Math.abs;var z=e.Math.sqrt;var K=e.Math.pow;var X=e.Math.cos;var Y=e.Math.sin;var Z=e.Math.tan;var G=e.Math.acos;var J=e.Math.asin;var Q=e.Math.atan;var ee=e.Math.atan2;var re=e.Math.exp;var ie=e.Math.log;var te=e.Math.ceil;var ne=e.Math.imul;var oe=r.abort;var ae=r.assert;var se=r.min;var ue=r.invoke_iiii;var fe=r.invoke_viiiii;var le=r.invoke_vi;var ce=r.invoke_vii;var he=r.invoke_ii;var _e=r.invoke_v;var de=r.invoke_viiiiii;var me=r.invoke_iii;var ge=r.invoke_viiii;var pe=r._fabs;var ve=r._llvm_pow_f64;var be=r._send;var ye=r._fmod;var we=r.___cxa_guard_acquire;var Ae=r.___setErrNo;var Ee=r._vfprintf;var Te=r.___cxa_allocate_exception;var Le=r.___cxa_find_matching_catch;var Me=r.___cxa_guard_release;var Se=r._pwrite;var ke=r.__reallyNegative;var Oe=r._sbrk;var Ne=r.___cxa_begin_catch;var Ce=r._emscripten_memcpy_big;var Re=r._fileno;var Pe=r.___resumeException;var Ie=r.__ZSt18uncaught_exceptionv;var Fe=r._sysconf;var xe=r._pthread_getspecific;var De=r._atexit;var Be=r._pthread_once;var Ue=r._puts;var He=r._printf;var Ve=r._pthread_key_create;var $e=r._write;var je=r.___errno_location;var We=r._pthread_setspecific;var qe=r.___cxa_atexit;var ze=r._copysign;var Ke=r._fputc;var Xe=r.___cxa_throw;var Ye=r.__exit;var Ze=r._copysignl;var Ge=r._abort;var Je=r._fwrite;var Qe=r._time;var er=r._fprintf;var rr=r.__formatString;var ir=r._fputs;var tr=r._exit;var nr=r.___cxa_pure_virtual;var or=r._fmodl;var ar=0.0;function sr(e){e=e|0;var r=0;r=c;c=c+e|0;c=c+15&-16;return r|0}function ur(){return c|0}function fr(e){e=e|0;c=e}function lr(e,r){e=e|0;r=r|0;if(!b){b=e;y=r}}function cr(e){e=e|0;t[_>>0]=t[e>>0];t[_+1>>0]=t[e+1>>0];t[_+2>>0]=t[e+2>>0];t[_+3>>0]=t[e+3>>0]}function hr(e){e=e|0;t[_>>0]=t[e>>0];t[_+1>>0]=t[e+1>>0];t[_+2>>0]=t[e+2>>0];t[_+3>>0]=t[e+3>>0];t[_+4>>0]=t[e+4>>0];t[_+5>>0]=t[e+5>>0];t[_+6>>0]=t[e+6>>0];t[_+7>>0]=t[e+7>>0]}function _r(e){e=e|0;I=e}function dr(){return I|0}function mr(e){e=e|0;Ne(e|0)|0;dt()}function gr(e){e=e|0;return}function pr(e,r,i,n,a){e=e|0;r=r|0;i=i|0;n=n|0;a=a|0;var s=0;s=c;o[e>>2]=112;o[e+4>>2]=r;o[e+8>>2]=i;o[e+12>>2]=n;o[e+16>>2]=a;if((t[144]|0)==0?(we(144)|0)!=0:0){o[32]=0;o[33]=0;o[34]=0;qe(19,128,p|0)|0;Me(144)}a=o[33]|0;if((a|0)==(o[34]|0)){n=(a>>1)+2&-2;n=(n|0)<2?2:n;if((n|0)>(2147483647-a|0)){r=Te(1)|0;Xe(r|0,48,0)}i=o[32]|0;r=n+a|0;o[34]=r;r=Ht(i,r<<2)|0;o[32]=r;if((r|0)==0?(o[(je()|0)>>2]|0)==12:0){r=Te(1)|0;Xe(r|0,48,0)}a=o[33]|0}o[33]=a+1;a=(o[32]|0)+(a<<2)|0;if(!a){c=s;return}o[a>>2]=e;c=s;return}function vr(e){e=e|0;var r=0;r=c;ft(e);c=r;return}function br(e){e=e|0;var r=0,i=0;r=c;i=o[e>>2]|0;if(!i){c=r;return}o[e+4>>2]=0;Ut(i);o[e>>2]=0;o[e+8>>2]=0;c=r;return}function yr(e){e=e|0;var r=0;r=c;ft(e);c=r;return}function wr(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0;i=c;if((t[r>>0]|0)!=45){f=0;c=i;return f|0}n=r+1|0;a=110;u=n;f=0;while(1){s=f+1|0;if((t[u>>0]|0)!=a<<24>>24){a=1;break}u=r+(f+2)|0;if((s|0)==3){a=0;n=u;break}else{a=t[264+s>>0]|0;f=s}}if(Jt(n,o[e+4>>2]|0)|0){f=0;c=i;return f|0}t[e+20>>0]=a;f=1;c=i;return f|0}function Ar(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0;s=c;c=c+16|0;i=s;n=o[v>>2]|0;a=e+4|0;u=o[a>>2]|0;o[i>>2]=u;o[i+4>>2]=u;er(n|0,216,i|0)|0;u=0;while(1){f=u>>>0<(32-((sn(o[a>>2]|0)|0)<<1)|0)>>>0;Ke(32,n|0)|0;if(f)u=u+1|0;else break}o[i>>2]=(t[e+20>>0]|0)!=0?248:256;er(n|0,232,i|0)|0;if(!r){c=s;return}o[i>>2]=o[e+8>>2];er(n|0,88,i|0)|0;Ke(10,n|0)|0;c=s;return}function Er(e){e=e|0;var r=0;r=c;ft(e);c=r;return}function Tr(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0;i=c;c=c+16|0;s=i;a=i+8|0;if((t[r>>0]|0)!=45){_=0;c=i;return _|0}l=r+1|0;n=e+4|0;u=o[n>>2]|0;f=t[u>>0]|0;e:do{if(f<<24>>24){h=0;while(1){_=h;h=h+1|0;if((t[l>>0]|0)!=f<<24>>24){e=0;break}f=t[u+h>>0]|0;l=r+(_+2)|0;if(!(f<<24>>24))break e}c=i;return e|0}}while(0);if((t[l>>0]|0)!=61){_=0;c=i;return _|0}r=l+1|0;u=Gt(r,a,10)|0;if(!(o[a>>2]|0)){_=0;c=i;return _|0}if((u|0)>(o[e+24>>2]|0)){_=o[v>>2]|0;h=o[n>>2]|0;o[s>>2]=r;o[s+4>>2]=h;er(_|0,416,s|0)|0;tr(1)}if((u|0)<(o[e+20>>2]|0)){_=o[v>>2]|0;h=o[n>>2]|0;o[s>>2]=r;o[s+4>>2]=h;er(_|0,472,s|0)|0;tr(1)}o[e+28>>2]=u;_=1;c=i;return _|0}function Lr(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0;i=c;c=c+16|0;t=i;n=o[v>>2]|0;a=o[e+16>>2]|0;o[t>>2]=o[e+4>>2];o[t+4>>2]=a;er(n|0,336,t|0)|0;a=o[e+20>>2]|0;if((a|0)==-2147483648)Je(360,4,1,n|0)|0;else{o[t>>2]=a;er(n|0,368,t|0)|0}Je(376,4,1,n|0)|0;a=o[e+24>>2]|0;if((a|0)==2147483647)Je(384,4,1,n|0)|0;else{o[t>>2]=a;er(n|0,368,t|0)|0}o[t>>2]=o[e+28>>2];er(n|0,392,t|0)|0;if(!r){c=i;return}o[t>>2]=o[e+8>>2];er(n|0,88,t|0)|0;Ke(10,n|0)|0;c=i;return}function Mr(e){e=e|0;var r=0,i=0,n=0,a=0,s=0;a=c;o[e>>2]=1816;n=e+4|0;i=e+32|0;s=e+48|0;o[n+0>>2]=0;o[n+4>>2]=0;o[n+8>>2]=0;o[n+12>>2]=0;o[n+16>>2]=0;o[n+20>>2]=0;o[i+0>>2]=0;o[i+4>>2]=0;o[i+8>>2]=0;o[i+12>>2]=0;l[s>>3]=+l[75];l[e+56>>3]=+l[89];l[e+64>>3]=+l[103];l[e+72>>3]=+l[123];t[e+80>>0]=t[1364]|0;o[e+84>>2]=o[269];o[e+88>>2]=o[297];t[e+92>>0]=0;t[e+93>>0]=t[1292]|0;l[e+96>>3]=+l[204];o[e+104>>2]=o[439];o[e+108>>2]=o[359];l[e+112>>3]=+l[191];l[e+120>>3]=.3333333333333333;l[e+128>>3]=1.1;o[e+136>>2]=100;l[e+144>>3]=1.5;s=e+316|0;o[e+332>>2]=0;o[e+336>>2]=0;o[e+340>>2]=0;o[e+348>>2]=0;o[e+352>>2]=0;o[e+356>>2]=0;o[e+364>>2]=0;o[e+368>>2]=0;o[e+372>>2]=0;o[e+380>>2]=0;o[e+384>>2]=0;o[e+388>>2]=0;o[e+396>>2]=0;o[e+400>>2]=0;o[e+404>>2]=0;i=e+544|0;o[e+412>>2]=0;o[e+416>>2]=0;o[e+420>>2]=0;o[e+428>>2]=0;o[e+432>>2]=0;o[e+436>>2]=0;o[e+444>>2]=0;o[e+448>>2]=0;o[e+452>>2]=0;on(e+152|0,0,176)|0;o[e+456>>2]=i;n=e+460|0;o[n+0>>2]=0;o[n+4>>2]=0;o[n+8>>2]=0;o[n+12>>2]=0;o[n+16>>2]=0;o[n+20>>2]=0;o[e+488>>2]=s;t[e+492>>0]=1;l[e+496>>3]=1.0;l[e+504>>3]=1.0;o[e+512>>2]=0;o[e+516>>2]=-1;s=e+520|0;n=e+536|0;o[s+0>>2]=0;o[s+4>>2]=0;o[s+8>>2]=0;o[s+12>>2]=0;t[n>>0]=1;n=e+540|0;o[n+0>>2]=0;o[n+4>>2]=0;o[n+8>>2]=0;o[n+12>>2]=0;o[n+16>>2]=0;ei(i,1048576);t[e+560>>0]=0;i=e+604|0;n=e+664|0;s=e+564|0;r=s+36|0;do{o[s>>2]=0;s=s+4|0}while((s|0)<(r|0));s=i+0|0;r=s+36|0;do{o[s>>2]=0;s=s+4|0}while((s|0)<(r|0));s=e+680|0;o[n+0>>2]=-1;o[n+4>>2]=-1;o[n+8>>2]=-1;o[n+12>>2]=-1;t[s>>0]=0;c=a;return}function Sr(e){e=e|0;var r=0;r=c;kr(e);ft(e);c=r;return}function kr(e){e=e|0;var r=0,i=0,t=0;r=c;o[e>>2]=1816;i=e+628|0;t=o[i>>2]|0;if(t){o[e+632>>2]=0;Ut(t);o[i>>2]=0;o[e+636>>2]=0}i=e+616|0;t=o[i>>2]|0;if(t){o[e+620>>2]=0;Ut(t);o[i>>2]=0;o[e+624>>2]=0}i=e+604|0;t=o[i>>2]|0;if(t){o[e+608>>2]=0;Ut(t);o[i>>2]=0;o[e+612>>2]=0}i=e+588|0;t=o[i>>2]|0;if(t){o[e+592>>2]=0;Ut(t);o[i>>2]=0;o[e+596>>2]=0}i=e+576|0;t=o[i>>2]|0;if(t){o[e+580>>2]=0;Ut(t);o[i>>2]=0;o[e+584>>2]=0}i=e+564|0;t=o[i>>2]|0;if(t){o[e+568>>2]=0;Ut(t);o[i>>2]=0;o[e+572>>2]=0}i=o[e+544>>2]|0;if(i)Ut(i);i=e+472|0;t=o[i>>2]|0;if(t){o[e+476>>2]=0;Ut(t);o[i>>2]=0;o[e+480>>2]=0}i=e+460|0;t=o[i>>2]|0;if(t){o[e+464>>2]=0;Ut(t);o[i>>2]=0;o[e+468>>2]=0}ri(e+412|0);i=e+396|0;t=o[i>>2]|0;if(t){o[e+400>>2]=0;Ut(t);o[i>>2]=0;o[e+404>>2]=0}i=e+380|0;t=o[i>>2]|0;if(t){o[e+384>>2]=0;Ut(t);o[i>>2]=0;o[e+388>>2]=0}t=e+364|0;i=o[t>>2]|0;if(i){o[e+368>>2]=0;Ut(i);o[t>>2]=0;o[e+372>>2]=0}i=e+348|0;t=o[i>>2]|0;if(t){o[e+352>>2]=0;Ut(t);o[i>>2]=0;o[e+356>>2]=0}i=e+332|0;t=o[i>>2]|0;if(t){o[e+336>>2]=0;Ut(t);o[i>>2]=0;o[e+340>>2]=0}i=e+316|0;t=o[i>>2]|0;if(t){o[e+320>>2]=0;Ut(t);o[i>>2]=0;o[e+324>>2]=0}i=e+304|0;t=o[i>>2]|0;if(t){o[e+308>>2]=0;Ut(t);o[i>>2]=0;o[e+312>>2]=0}i=e+292|0;t=o[i>>2]|0;if(t){o[e+296>>2]=0;Ut(t);o[i>>2]=0;o[e+300>>2]=0}i=e+280|0;t=o[i>>2]|0;if(t){o[e+284>>2]=0;Ut(t);o[i>>2]=0;o[e+288>>2]=0}i=e+268|0;t=o[i>>2]|0;if(t){o[e+272>>2]=0;Ut(t);o[i>>2]=0;o[e+276>>2]=0}i=e+256|0;t=o[i>>2]|0;if(t){o[e+260>>2]=0;Ut(t);o[i>>2]=0;o[e+264>>2]=0}i=e+32|0;t=o[i>>2]|0;if(t){o[e+36>>2]=0;Ut(t);o[i>>2]=0;o[e+40>>2]=0}i=e+16|0;t=o[i>>2]|0;if(t){o[e+20>>2]=0;Ut(t);o[i>>2]=0;o[e+24>>2]=0}t=e+4|0;i=o[t>>2]|0;if(!i){c=r;return}o[e+8>>2]=0;Ut(i);o[t>>2]=0;o[e+12>>2]=0;c=r;return}function Or(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,a=0,s=0,u=0,f=0.0,h=0,_=0,d=0,m=0,g=0,p=0;n=c;c=c+16|0;u=n+4|0;s=n;a=e+580|0;h=o[a>>2]|0;if((h|0)>0){d=h+-1|0;m=o[(o[e+576>>2]|0)+(d<<2)>>2]|0;o[a>>2]=d;a=m}else{m=e+540|0;a=o[m>>2]|0;o[m>>2]=a+1}h=e+412|0;m=a<<1;o[u>>2]=m;ii(h,u);o[s>>2]=m|1;ii(h,s);u=e+332|0;h=t[544]|0;s=a+1|0;ti(u,s);t[(o[u>>2]|0)+a>>0]=h;u=e+396|0;h=e+400|0;if((o[h>>2]|0)<(s|0)){d=e+404|0;m=o[d>>2]|0;if((m|0)<(s|0)){g=a+2-m&-2;_=(m>>1)+2&-2;_=(g|0)>(_|0)?g:_;if((_|0)>(2147483647-m|0)){g=Te(1)|0;Xe(g|0,48,0)}p=o[u>>2]|0;g=_+m|0;o[d>>2]=g;g=Ht(p,g<<3)|0;o[u>>2]=g;if((g|0)==0?(o[(je()|0)>>2]|0)==12:0){p=Te(1)|0;Xe(p|0,48,0)}}d=o[h>>2]|0;if((d|0)<(s|0))do{_=(o[u>>2]|0)+(d<<3)|0;if(_){p=_;o[p>>2]=0;o[p+4>>2]=0}d=d+1|0}while((d|0)!=(s|0));o[h>>2]=s}h=(o[u>>2]|0)+(a<<3)|0;o[h>>2]=-1;o[h+4>>2]=0;h=e+316|0;if(!(t[e+93>>0]|0))f=0.0;else{p=e+72|0;f=+l[p>>3]*1389796.0;f=f-+(~~(f/2147483647.0)|0)*2147483647.0;l[p>>3]=f;f=f/2147483647.0*1.0e-5}u=e+320|0;if((o[u>>2]|0)<(s|0)){_=e+324|0;d=o[_>>2]|0;if((d|0)<(s|0)){p=a+2-d&-2;m=(d>>1)+2&-2;m=(p|0)>(m|0)?p:m;if((m|0)>(2147483647-d|0)){p=Te(1)|0;Xe(p|0,48,0)}g=o[h>>2]|0;p=m+d|0;o[_>>2]=p;p=Ht(g,p<<3)|0;o[h>>2]=p;if((p|0)==0?(o[(je()|0)>>2]|0)==12:0){p=Te(1)|0;Xe(p|0,48,0)}}m=o[u>>2]|0;if((m|0)<(s|0)){_=o[h>>2]|0;do{d=_+(m<<3)|0;if(d)l[d>>3]=0.0;m=m+1|0}while((m|0)!=(s|0))}o[u>>2]=s}l[(o[h>>2]|0)+(a<<3)>>3]=f;ni(e+588|0,a,0);ni(e+348|0,a,1);u=e+364|0;r=t[r>>0]|0;ti(u,s);t[(o[u>>2]|0)+a>>0]=r;u=e+380|0;r=e+384|0;if((o[r>>2]|0)<(s|0)){h=e+388|0;d=o[h>>2]|0;if((d|0)<(s|0)){p=a+2-d&-2;_=(d>>1)+2&-2;_=(p|0)>(_|0)?p:_;if((_|0)>(2147483647-d|0)){p=Te(1)|0;Xe(p|0,48,0)}g=o[u>>2]|0;p=_+d|0;o[h>>2]=p;p=Ht(g,p)|0;o[u>>2]=p;if((p|0)==0?(o[(je()|0)>>2]|0)==12:0){p=Te(1)|0;Xe(p|0,48,0)}}h=o[r>>2]|0;if((h|0)<(s|0))do{_=(o[u>>2]|0)+h|0;if(_)t[_>>0]=0;h=h+1|0}while((h|0)!=(s|0));o[r>>2]=s}r=e+288|0;u=o[r>>2]|0;if((u|0)<(s|0)){p=a+2-u&-2;s=(u>>1)+2&-2;s=(p|0)>(s|0)?p:s;if((s|0)>(2147483647-u|0)){p=Te(1)|0;Xe(p|0,48,0)}g=e+280|0;m=o[g>>2]|0;p=s+u|0;o[r>>2]=p;p=Ht(m,p<<2)|0;o[g>>2]=p;if((p|0)==0?(o[(je()|0)>>2]|0)==12:0){p=Te(1)|0;Xe(p|0,48,0)}}s=e+380|0;r=(o[s>>2]|0)+a|0;u=(t[r>>0]|0)==0;if(i){if(u){p=e+200|0;g=p;g=un(o[g>>2]|0,o[g+4>>2]|0,1,0)|0;o[p>>2]=g;o[p+4>>2]=I}}else if(!u){p=e+200|0;g=p;g=un(o[g>>2]|0,o[g+4>>2]|0,-1,-1)|0;o[p>>2]=g;o[p+4>>2]=I}t[r>>0]=i&1;i=e+460|0;if((o[e+476>>2]|0)>(a|0)?(o[(o[e+472>>2]|0)+(a<<2)>>2]|0)>-1:0){c=n;return a|0}if(!(t[(o[s>>2]|0)+a>>0]|0)){c=n;return a|0}oi(i,a);c=n;return a|0}function Nr(e,r){e=e|0;r=r|0;var i=0,n=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0;i=c;c=c+16|0;f=i+1|0;u=i;n=e+492|0;if(!(t[n>>0]|0)){v=0;c=i;return v|0}v=o[r>>2]|0;s=r+4|0;l=o[s>>2]|0;t[f+0>>0]=t[u+0>>0]|0;ui(v,l,f);l=o[s>>2]|0;e:do{if((l|0)>0){f=e+332|0;u=t[528]|0;h=0;_=0;m=-2;while(1){v=o[r>>2]|0;d=o[v+(h<<2)>>2]|0;p=a[(o[f>>2]|0)+(d>>1)>>0]|0;b=p^d&1;g=b&255;y=u&255;if((d|0)==(m^1|0)?1:(g<<24>>24==u<<24>>24&(y>>>1^1)|y&2&b|0)!=0){e=1;break}b=t[536]|0;y=b&255;if((d|0)!=(m|0)?((y>>>1^1)&g<<24>>24==b<<24>>24|p&2&y|0)==0:0){o[v+(_<<2)>>2]=d;l=o[s>>2]|0;_=_+1|0}else d=m;h=h+1|0;if((h|0)<(l|0))m=d;else break e}c=i;return e|0}else{h=0;_=0}}while(0);u=h-_|0;if((u|0)>0){l=l-u|0;o[s>>2]=l}if(!l){t[n>>0]=0;y=0;c=i;return y|0}else if((l|0)==1){b=o[o[r>>2]>>2]|0;v=b>>1;t[(o[e+332>>2]|0)+v>>0]=(b&1^1)&255^1;y=o[e+296>>2]|0;v=(o[e+396>>2]|0)+(v<<3)|0;o[v>>2]=-1;o[v+4>>2]=y;v=e+284|0;y=o[v>>2]|0;o[v>>2]=y+1;o[(o[e+280>>2]|0)+(y<<2)>>2]=b;y=(Rr(e)|0)==-1;t[n>>0]=y&1;c=i;return y|0}else{r=fi(e+544|0,r,0)|0;s=e+256|0;n=e+260|0;f=o[n>>2]|0;u=e+264|0;if((f|0)==(o[u>>2]|0)){l=(f>>1)+2&-2;l=(l|0)<2?2:l;if((l|0)>(2147483647-f|0)){y=Te(1)|0;Xe(y|0,48,0)}b=o[s>>2]|0;y=l+f|0;o[u>>2]=y;y=Ht(b,y<<2)|0;o[s>>2]=y;if((y|0)==0?(o[(je()|0)>>2]|0)==12:0){y=Te(1)|0;Xe(y|0,48,0)}f=o[n>>2]|0}o[n>>2]=f+1;n=(o[s>>2]|0)+(f<<2)|0;if(n)o[n>>2]=r;Pr(e,r);y=1;c=i;return y|0}return 0}function Cr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,a=0;n=o[r>>2]|0;r=n>>1;t[(o[e+332>>2]|0)+r>>0]=(n&1^1)&255^1;a=o[e+296>>2]|0;r=(o[e+396>>2]|0)+(r<<3)|0;o[r>>2]=i;o[r+4>>2]=a;i=e+284|0;r=o[i>>2]|0;o[i>>2]=r+1;o[(o[e+280>>2]|0)+(r<<2)>>2]=n;return}function Rr(e){e=e|0;var r=0,i=0,n=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0,E=0,T=0,L=0,M=0,S=0,k=0,O=0,N=0,C=0,R=0,P=0,F=0,x=0,D=0,B=0,U=0,H=0,V=0;f=c;c=c+16|0;p=f;s=e+512|0;b=o[s>>2]|0;g=e+284|0;if((b|0)>=(o[g>>2]|0)){B=0;x=0;H=-1;U=e+184|0;P=U;D=P;D=o[D>>2]|0;P=P+4|0;P=o[P>>2]|0;P=un(D|0,P|0,B|0,x|0)|0;D=I;F=U;o[F>>2]=P;U=U+4|0;o[U>>2]=D;U=e+520|0;D=U;F=D;F=o[F>>2]|0;D=D+4|0;D=o[D>>2]|0;x=nn(F|0,D|0,B|0,x|0)|0;B=I;D=U;o[D>>2]=x;U=U+4|0;o[U>>2]=B;c=f;return H|0}d=e+280|0;u=e+428|0;n=e+412|0;l=e+332|0;h=e+544|0;_=p+4|0;r=e+396|0;m=e+296|0;i=e+456|0;L=-1;v=0;do{o[s>>2]=b+1;A=o[(o[d>>2]|0)+(b<<2)>>2]|0;if(t[(o[u>>2]|0)+A>>0]|0){y=o[n>>2]|0;b=y+(A*12|0)+4|0;T=o[b>>2]|0;if((T|0)>0){y=y+(A*12|0)|0;w=0;E=0;do{S=o[y>>2]|0;M=S+(w<<3)|0;if((o[(o[o[i>>2]>>2]|0)+(o[M>>2]<<2)>>2]&3|0)!=1){U=M;H=o[U+4>>2]|0;T=S+(E<<3)|0;o[T>>2]=o[U>>2];o[T+4>>2]=H;T=o[b>>2]|0;E=E+1|0}w=w+1|0}while((w|0)<(T|0))}else{w=0;E=0}y=w-E|0;if((y|0)>0)o[b>>2]=T-y;t[(o[u>>2]|0)+A>>0]=0}b=o[n>>2]|0;v=v+1|0;y=o[b+(A*12|0)>>2]|0;b=b+(A*12|0)+4|0;E=o[b>>2]|0;w=y+(E<<3)|0;e:do{if(!E){w=y;T=y}else{A=A^1;E=(E<<3)+-1|0;S=y;T=y;while(1){while(1){r:while(1){R=o[S+4>>2]|0;H=a[(o[l>>2]|0)+(R>>1)>>0]^R&1;F=t[528]|0;P=F&255;x=P&2;P=P>>>1^1;if((H&255)<<24>>24==F<<24>>24&P|x&H){N=19;break}M=o[S>>2]|0;N=o[h>>2]|0;C=N+(M<<2)|0;k=N+(M+1<<2)|0;O=o[k>>2]|0;if((O|0)==(A|0)){H=N+(M+2<<2)|0;O=o[H>>2]|0;o[k>>2]=O;o[H>>2]=A}k=S+8|0;o[p>>2]=M;o[_>>2]=O;if((O|0)!=(R|0)?(H=a[(o[l>>2]|0)+(O>>1)>>0]^O&1,((H&255)<<24>>24==F<<24>>24&P|x&H|0)!=0):0){N=27;break}x=o[C>>2]|0;if(x>>>0<=95){N=31;break}P=o[l>>2]|0;F=t[536]|0;R=F&255;H=R&2;R=R>>>1^1;U=2;while(1){D=C+(U<<2)+4|0;B=o[D>>2]|0;V=a[P+(B>>1)>>0]^B&1;U=U+1|0;if(!((V&255)<<24>>24==F<<24>>24&R|H&V))break;if((U|0)>=(x>>>5|0)){N=32;break r}}V=N+(M+2<<2)|0;o[V>>2]=B;o[D>>2]=A;li((o[n>>2]|0)+((o[V>>2]^1)*12|0)|0,p);if((k|0)==(w|0))break e;else S=k}if((N|0)==19){N=0;U=S;H=o[U+4>>2]|0;V=T;o[V>>2]=o[U>>2];o[V+4>>2]=H;S=S+8|0;T=T+8|0}else if((N|0)==27){N=0;H=p;V=o[H+4>>2]|0;S=T;o[S>>2]=o[H>>2];o[S+4>>2]=V;S=k;T=T+8|0}else if((N|0)==31){F=t[536]|0;N=32}if((N|0)==32){N=T+8|0;C=p;P=o[C+4>>2]|0;R=T;o[R>>2]=o[C>>2];o[R+4>>2]=P;R=O>>1;P=O&1;C=(o[l>>2]|0)+R|0;V=a[C>>0]^P;H=F&255;if((V&255)<<24>>24==F<<24>>24&(H>>>1^1)|H&2&V)break;t[C>>0]=(P^1)&255^1;T=o[m>>2]|0;S=(o[r>>2]|0)+(R<<3)|0;o[S>>2]=M;o[S+4>>2]=T;S=o[g>>2]|0;o[g>>2]=S+1;o[(o[d>>2]|0)+(S<<2)>>2]=O;S=k;T=N}if((S|0)==(w|0))break e}o[s>>2]=o[g>>2];if(k>>>0<w>>>0){L=(y+(E-k)|0)>>>3;while(1){U=k;k=k+8|0;H=o[U+4>>2]|0;V=N;o[V>>2]=o[U>>2];o[V+4>>2]=H;if(k>>>0>=w>>>0)break;else N=N+8|0}S=S+(L+2<<3)|0;T=T+(L+2<<3)|0}else{S=k;T=N}if((S|0)==(w|0)){L=M;break}else L=M}}}while(0);y=w-T|0;if((y|0)>0)o[b>>2]=(o[b>>2]|0)-(y>>3);b=o[s>>2]|0}while((b|0)<(o[g>>2]|0));U=v;D=((v|0)<0)<<31>>31;V=L;H=e+184|0;F=H;B=F;B=o[B>>2]|0;F=F+4|0;F=o[F>>2]|0;F=un(B|0,F|0,U|0,D|0)|0;B=I;x=H;o[x>>2]=F;H=H+4|0;o[H>>2]=B;H=e+520|0;B=H;x=B;x=o[x>>2]|0;B=B+4|0;B=o[B>>2]|0;D=nn(x|0,B|0,U|0,D|0)|0;U=I;B=H;o[B>>2]=D;H=H+4|0;o[H>>2]=U;c=f;return V|0}function Pr(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0;i=c;c=c+16|0;f=i+8|0;n=i;a=o[e+544>>2]|0;t=a+(r<<2)|0;s=a+(r+1<<2)|0;u=e+412|0;l=(o[u>>2]|0)+((o[s>>2]^1)*12|0)|0;a=a+(r+2<<2)|0;h=o[a>>2]|0;o[f>>2]=r;o[f+4>>2]=h;li(l,f);a=(o[u>>2]|0)+((o[a>>2]^1)*12|0)|0;s=o[s>>2]|0;o[n>>2]=r;o[n+4>>2]=s;li(a,n);if(!(o[t>>2]&4)){h=e+208|0;l=h;l=un(o[l>>2]|0,o[l+4>>2]|0,1,0)|0;o[h>>2]=l;o[h+4>>2]=I;h=e+224|0;l=h;l=un((o[t>>2]|0)>>>5|0,0,o[l>>2]|0,o[l+4>>2]|0)|0;o[h>>2]=l;o[h+4>>2]=I;c=i;return}else{h=e+216|0;l=h;l=un(o[l>>2]|0,o[l+4>>2]|0,1,0)|0;o[h>>2]=l;o[h+4>>2]=I;h=e+232|0;l=h;l=un((o[t>>2]|0)>>>5|0,0,o[l>>2]|0,o[l+4>>2]|0)|0;o[h>>2]=l;o[h+4>>2]=I;c=i;return}}function Ir(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0;a=c;c=c+16|0;l=a+4|0;u=a;s=o[e+544>>2]|0;n=s+(r<<2)|0;f=o[s+(r+1<<2)>>2]^1;if(!i){o[l>>2]=f;i=e+428|0;h=o[i>>2]|0;f=h+f|0;if(!(t[f>>0]|0)){t[f>>0]=1;ai(e+444|0,l);h=o[i>>2]|0}r=o[s+(r+2<<2)>>2]^1;o[u>>2]=r;r=h+r|0;if(!(t[r>>0]|0)){t[r>>0]=1;ai(e+444|0,u)}}else{u=e+412|0;i=o[u>>2]|0;l=i+(f*12|0)|0;s=s+(r+2<<2)|0;f=i+(f*12|0)+4|0;h=o[f>>2]|0;e:do{if((h|0)>0){m=o[l>>2]|0;d=0;while(1){_=d+1|0;if((o[m+(d<<3)>>2]|0)==(r|0)){_=d;break e}if((_|0)<(h|0))d=_;else break}}else _=0}while(0);h=h+-1|0;if((_|0)<(h|0)){do{i=o[l>>2]|0;h=_;_=_+1|0;d=i+(_<<3)|0;m=o[d+4>>2]|0;h=i+(h<<3)|0;o[h>>2]=o[d>>2];o[h+4>>2]=m;h=(o[f>>2]|0)+-1|0}while((_|0)<(h|0));i=o[u>>2]|0}o[f>>2]=h;u=o[s>>2]^1;s=i+(u*12|0)|0;u=i+(u*12|0)+4|0;f=o[u>>2]|0;e:do{if((f|0)>0){i=o[s>>2]|0;h=0;while(1){l=h+1|0;if((o[i+(h<<3)>>2]|0)==(r|0)){l=h;break e}if((l|0)<(f|0))h=l;else break}}else l=0}while(0);r=f+-1|0;if((l|0)<(r|0))do{_=o[s>>2]|0;r=l;l=l+1|0;d=_+(l<<3)|0;m=o[d+4>>2]|0;r=_+(r<<3)|0;o[r>>2]=o[d>>2];o[r+4>>2]=m;r=(o[u>>2]|0)+-1|0}while((l|0)<(r|0));o[u>>2]=r}if(!(o[n>>2]&4)){m=e+208|0;d=m;d=un(o[d>>2]|0,o[d+4>>2]|0,-1,-1)|0;o[m>>2]=d;o[m+4>>2]=I;m=e+224|0;d=m;d=nn(o[d>>2]|0,o[d+4>>2]|0,(o[n>>2]|0)>>>5|0,0)|0;o[m>>2]=d;o[m+4>>2]=I;c=a;return}else{m=e+216|0;d=m;d=un(o[d>>2]|0,o[d+4>>2]|0,-1,-1)|0;o[m>>2]=d;o[m+4>>2]=I;m=e+232|0;d=m;d=nn(o[d>>2]|0,o[d+4>>2]|0,(o[n>>2]|0)>>>5|0,0)|0;o[m>>2]=d;o[m+4>>2]=I;c=a;return}}function Fr(e,r){e=e|0;r=r|0;var i=0,n=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0;s=c;n=e+544|0;h=o[n>>2]|0;i=h+(r<<2)|0;Ir(e,r,0);h=o[h+(r+1<<2)>>2]|0;u=h>>1;h=(a[(o[e+332>>2]|0)+u>>0]|0)^h&1;d=t[528]|0;_=d&255;if((((h&255)<<24>>24==d<<24>>24&(_>>>1^1)|_&2&h|0)!=0?(f=(o[e+396>>2]|0)+(u<<3)|0,l=o[f>>2]|0,(l|0)!=-1):0)?((o[n>>2]|0)+(l<<2)|0)==(i|0):0)o[f>>2]=-1;o[i>>2]=o[i>>2]&-4|1;_=o[(o[n>>2]|0)+(r<<2)>>2]|0;d=e+556|0;o[d>>2]=((((_>>>3&1)+(_>>>5)<<2)+4|0)>>>2)+(o[d>>2]|0);c=s;return}function xr(e,r){e=e|0;r=r|0;var i=0,n=0,s=0,u=0,f=0,l=0,h=0;i=c;n=o[r>>2]|0;if(n>>>0<=31){l=0;c=i;return l|0}s=o[e+332>>2]|0;u=t[528]|0;f=u&255;l=f&2;f=f>>>1^1;e=0;while(1){h=o[r+(e<<2)+4>>2]|0;h=(a[s+(h>>1)>>0]|0)^h&1;e=e+1|0;if((h&255)<<24>>24==u<<24>>24&f|l&h){n=1;r=5;break}if((e|0)>=(n>>>5|0)){n=0;r=5;break}}if((r|0)==5){c=i;return n|0}return 0}function Dr(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0;a=c;i=e+296|0;if((o[i>>2]|0)<=(r|0)){c=a;return}n=e+284|0;v=o[n>>2]|0;u=e+292|0;b=o[u>>2]|0;y=o[b+(r<<2)>>2]|0;if((v|0)>(y|0)){p=e+280|0;h=e+332|0;l=e+88|0;f=e+348|0;_=e+460|0;m=e+476|0;g=e+472|0;d=e+380|0;do{v=v+-1|0;y=o[(o[p>>2]|0)+(v<<2)>>2]>>1;t[(o[h>>2]|0)+y>>0]=t[544]|0;b=o[l>>2]|0;if((b|0)<=1){if((b|0)==1?(v|0)>(o[(o[u>>2]|0)+((o[i>>2]|0)+-1<<2)>>2]|0):0)s=7}else s=7;if((s|0)==7){s=0;t[(o[f>>2]|0)+y>>0]=o[(o[p>>2]|0)+(v<<2)>>2]&1}if(!((o[m>>2]|0)>(y|0)?(o[(o[g>>2]|0)+(y<<2)>>2]|0)>-1:0))s=11;if((s|0)==11?(s=0,(t[(o[d>>2]|0)+y>>0]|0)!=0):0)oi(_,y);b=o[u>>2]|0;y=o[b+(r<<2)>>2]|0}while((v|0)>(y|0));v=o[n>>2]|0}o[e+512>>2]=y;e=o[b+(r<<2)>>2]|0;if((v-e|0)>0)o[n>>2]=e;if(((o[i>>2]|0)-r|0)<=0){c=a;return}o[i>>2]=r;c=a;return}function Br(e){e=e|0;var r=0,i=0,n=0,a=0,s=0,u=0,f=0,h=0,_=0,d=0,m=0,g=0.0,p=0;r=c;n=e+72|0;g=+l[n>>3]*1389796.0;g=g-+(~~(g/2147483647.0)|0)*2147483647.0;l[n>>3]=g;f=e+464|0;if(g/2147483647.0<+l[e+64>>3]?(h=o[f>>2]|0,(h|0)!=0):0){g=g*1389796.0;g=g-+(~~(g/2147483647.0)|0)*2147483647.0;l[n>>3]=g;h=o[(o[e+460>>2]|0)+(~~(+(h|0)*(g/2147483647.0))<<2)>>2]|0;d=t[(o[e+332>>2]|0)+h>>0]|0;_=t[544]|0;m=_&255;if(((m>>>1^1)&d<<24>>24==_<<24>>24|d&2&m|0)!=0?(t[(o[e+380>>2]|0)+h>>0]|0)!=0:0){m=e+176|0;d=m;d=un(o[d>>2]|0,o[d+4>>2]|0,1,0)|0;o[m>>2]=d;o[m+4>>2]=I}}else h=-1;_=e+460|0;m=e+332|0;d=e+380|0;while(1){if(((h|0)!=-1?(p=t[(o[m>>2]|0)+h>>0]|0,s=t[544]|0,i=s&255,a=i>>>1^1,(a&p<<24>>24==s<<24>>24|p&2&i|0)!=0):0)?(t[(o[d>>2]|0)+h>>0]|0)!=0:0)break;if(!(o[f>>2]|0)){i=-2;u=17;break}h=ci(_)|0}if((u|0)==17){c=r;return i|0}f=t[(o[e+364>>2]|0)+h>>0]|0;u=f&255;if(!(a&f<<24>>24==s<<24>>24|i&2&u)){m=t[528]|0;p=m&255;p=((p>>>1^1)&f<<24>>24==m<<24>>24|u&2&p|0)!=0|h<<1;c=r;return p|0}if(!(t[e+92>>0]|0)){p=(t[(o[e+348>>2]|0)+h>>0]|0)!=0|h<<1;c=r;return p|0}else{g=+l[n>>3]*1389796.0;g=g-+(~~(g/2147483647.0)|0)*2147483647.0;l[n>>3]=g;p=g/2147483647.0<.5|h<<1;c=r;return p|0}return 0}function Ur(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var a=0,s=0,u=0,h=0,_=0,d=0,m=0,g=0,p=0.0,v=0,b=0,y=0,w=0,A=0,E=0,T=0,L=0,M=0,S=0,k=0,O=0,N=0,C=0,R=0,P=0,F=0,x=0,D=0,B=0,U=0,H=0,V=0,$=0,j=0,W=0,q=0.0,z=0;a=c;c=c+16|0;m=a+8|0;b=a+4|0;_=a;h=i+4|0;s=o[h>>2]|0;u=i+8|0;if((s|0)==(o[u>>2]|0)){g=(s>>1)+2&-2;g=(g|0)<2?2:g;if((g|0)>(2147483647-s|0)){W=Te(1)|0;Xe(W|0,48,0)}j=o[i>>2]|0;W=g+s|0;o[u>>2]=W;W=Ht(j,W<<2)|0;o[i>>2]=W;if((W|0)==0?(o[(je()|0)>>2]|0)==12:0){W=Te(1)|0;Xe(W|0,48,0)}s=o[h>>2]|0}u=(o[i>>2]|0)+(s<<2)|0;if(u){o[u>>2]=0;s=o[h>>2]|0}o[h>>2]=s+1;g=e+544|0;R=e+280|0;s=e+588|0;u=e+396|0;k=e+504|0;N=e+316|0;O=e+540|0;S=e+476|0;M=e+472|0;L=e+460|0;T=e+488|0;E=e+296|0;w=e+496|0;A=e+272|0;C=e+268|0;F=-2;P=(o[e+284>>2]|0)+-1|0;x=0;do{D=o[g>>2]|0;r=D+(r<<2)|0;B=o[r>>2]|0;if((B&4|0)!=0?(p=+l[w>>3],W=r+(B>>>5<<2)+4|0,q=p+ +f[W>>2],f[W>>2]=q,q>1.0e20):0){H=o[A>>2]|0;if((H|0)>0){U=o[C>>2]|0;B=0;do{W=D+(o[U+(B<<2)>>2]<<2)|0;W=W+((o[W>>2]|0)>>>5<<2)+4|0;f[W>>2]=+f[W>>2]*1.0e-20;B=B+1|0}while((B|0)!=(H|0))}l[w>>3]=p*1.0e-20}F=(F|0)!=-2&1;if(F>>>0<(o[r>>2]|0)>>>5>>>0)do{B=o[r+(F<<2)+4>>2]|0;o[b>>2]=B;B=B>>1;D=(o[s>>2]|0)+B|0;do{if((t[D>>0]|0)==0?(o[(o[u>>2]|0)+(B<<3)+4>>2]|0)>0:0){H=o[N>>2]|0;W=H+(B<<3)|0;q=+l[k>>3]+ +l[W>>3];l[W>>3]=q;if(q>1.0e+100){V=o[O>>2]|0;if((V|0)>0){U=0;do{W=H+(U<<3)|0;l[W>>3]=+l[W>>3]*1.0e-100;U=U+1|0}while((U|0)!=(V|0))}l[k>>3]=+l[k>>3]*1.0e-100}if((o[S>>2]|0)>(B|0)?(y=o[M>>2]|0,v=o[y+(B<<2)>>2]|0,(v|0)>-1):0){U=o[L>>2]|0;H=o[U+(v<<2)>>2]|0;e:do{if(!v)j=0;else{W=v;while(1){j=W;W=W+-1>>1;$=U+(W<<2)|0;V=o[$>>2]|0;z=o[o[T>>2]>>2]|0;if(!(+l[z+(H<<3)>>3]>+l[z+(V<<3)>>3]))break e;o[U+(j<<2)>>2]=V;o[y+(o[$>>2]<<2)>>2]=j;if(!W){j=0;break}}}}while(0);o[U+(j<<2)>>2]=H;o[y+(H<<2)>>2]=j}t[D>>0]=1;if((o[(o[u>>2]|0)+(B<<3)+4>>2]|0)<(o[E>>2]|0)){ai(i,b);break}else{x=x+1|0;break}}}while(0);F=F+1|0}while((F|0)<((o[r>>2]|0)>>>5|0));r=o[R>>2]|0;D=o[s>>2]|0;do{F=P;P=P+-1|0;F=o[r+(F<<2)>>2]|0;U=F>>1;B=D+U|0}while((t[B>>0]|0)==0);r=o[(o[u>>2]|0)+(U<<3)>>2]|0;t[B>>0]=0;x=x+-1|0}while((x|0)>0);o[o[i>>2]>>2]=F^1;b=e+616|0;w=o[b>>2]|0;v=e+620|0;if(!w)A=o[v>>2]|0;else{o[v>>2]=0;A=0}y=o[h>>2]|0;if((A|0)<(y|0)){T=e+624|0;E=o[T>>2]|0;if((E|0)<(y|0)){z=y+1-E&-2;A=(E>>1)+2&-2;A=(z|0)>(A|0)?z:A;if((A|0)>(2147483647-E|0)){z=Te(1)|0;Xe(z|0,48,0)}z=A+E|0;o[T>>2]=z;w=Ht(w,z<<2)|0;o[b>>2]=w;if((w|0)==0?(o[(je()|0)>>2]|0)==12:0){z=Te(1)|0;Xe(z|0,48,0)}}A=o[v>>2]|0;e:do{if((A|0)<(y|0))while(1){w=w+(A<<2)|0;if(w)o[w>>2]=0;A=A+1|0;if((A|0)==(y|0))break e;w=o[b>>2]|0}}while(0);o[v>>2]=y;y=o[h>>2]|0}if((y|0)>0){A=o[b>>2]|0;w=o[i>>2]|0;E=0;do{o[A+(E<<2)>>2]=o[w+(E<<2)>>2];E=E+1|0;y=o[h>>2]|0}while((E|0)<(y|0))}w=o[e+84>>2]|0;if((w|0)==1)if((y|0)>1){_=o[i>>2]|0;d=1;w=1;while(1){y=o[_+(d<<2)>>2]|0;m=o[u>>2]|0;A=o[m+(y>>1<<3)>>2]|0;e:do{if((A|0)!=-1){E=(o[g>>2]|0)+(A<<2)|0;T=o[E>>2]|0;if(T>>>0>63){A=o[s>>2]|0;L=1;while(1){z=o[E+(L<<2)+4>>2]>>1;if((t[A+z>>0]|0)==0?(o[m+(z<<3)+4>>2]|0)>0:0)break;L=L+1|0;if((L|0)>=(T>>>5|0))break e}o[_+(w<<2)>>2]=y;w=w+1|0}}else{o[_+(w<<2)>>2]=y;w=w+1|0}}while(0);d=d+1|0;m=o[h>>2]|0;if((d|0)>=(m|0)){_=m;break}}}else{_=y;d=1;w=1}else if((w|0)==2)if((y|0)>1){g=1;w=1;do{A=o[i>>2]|0;y=o[A+(g<<2)>>2]|0;if((o[(o[u>>2]|0)+(y>>1<<3)>>2]|0)!=-1){o[_>>2]=y;o[m+0>>2]=o[_+0>>2];if(!(Hr(e,m)|0)){y=o[i>>2]|0;A=y;y=o[y+(g<<2)>>2]|0;d=62}}else d=62;if((d|0)==62){d=0;o[A+(w<<2)>>2]=y;w=w+1|0}g=g+1|0;y=o[h>>2]|0}while((g|0)<(y|0));_=y;d=g}else{_=y;d=1;w=1}else{_=y;d=y;w=y}z=e+240|0;W=z;W=un(o[W>>2]|0,o[W+4>>2]|0,_|0,((_|0)<0)<<31>>31|0)|0;o[z>>2]=W;o[z+4>>2]=I;d=d-w|0;if((d|0)>0){_=_-d|0;o[h>>2]=_}z=e+248|0;W=z;W=un(o[W>>2]|0,o[W+4>>2]|0,_|0,((_|0)<0)<<31>>31|0)|0;o[z>>2]=W;o[z+4>>2]=I;if((_|0)==1)i=0;else{i=o[i>>2]|0;if((_|0)>2){e=o[u>>2]|0;h=2;d=1;do{d=(o[e+(o[i+(h<<2)>>2]>>1<<3)+4>>2]|0)>(o[e+(o[i+(d<<2)>>2]>>1<<3)+4>>2]|0)?h:d;h=h+1|0}while((h|0)<(_|0))}else d=1;W=i+(d<<2)|0;z=o[W>>2]|0;i=i+4|0;o[W>>2]=o[i>>2];o[i>>2]=z;i=o[(o[u>>2]|0)+(z>>1<<3)+4>>2]|0}o[n>>2]=i;if((o[v>>2]|0)>0)n=0;else{c=a;return}do{t[(o[s>>2]|0)+(o[(o[b>>2]|0)+(n<<2)>>2]>>1)>>0]=0;n=n+1|0}while((n|0)<(o[v>>2]|0));c=a;return}function Hr(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0;i=c;_=o[r>>2]|0;l=e+396|0;g=o[l>>2]|0;f=e+544|0;v=(o[f>>2]|0)+(o[g+(_>>1<<3)>>2]<<2)|0;s=e+604|0;n=e+608|0;if(o[s>>2]|0)o[n>>2]=0;a=e+588|0;u=e+612|0;e=e+616|0;d=1;while(1){if(d>>>0<(o[v>>2]|0)>>>5>>>0){p=o[v+(d<<2)+4>>2]|0;m=p>>1;if((o[g+(m<<3)+4>>2]|0)!=0?(h=t[(o[a>>2]|0)+m>>0]|0,(h+-1<<24>>24&255)>=2):0){v=o[n>>2]|0;b=(v|0)==(o[u>>2]|0);if(h<<24>>24==3?1:(o[g+(m<<3)>>2]|0)==-1){f=8;break}if(b){g=(v>>1)+2&-2;g=(g|0)<2?2:g;if((g|0)>(2147483647-v|0)){f=24;break}y=o[s>>2]|0;b=g+v|0;o[u>>2]=b;b=Ht(y,b<<3)|0;o[s>>2]=b;if((b|0)==0?(o[(je()|0)>>2]|0)==12:0){f=24;break}v=o[n>>2]|0}o[n>>2]=v+1;g=(o[s>>2]|0)+(v<<3)|0;if(g){y=g;o[y>>2]=d;o[y+4>>2]=_}o[r>>2]=p;v=o[l>>2]|0;_=p;g=v;v=(o[f>>2]|0)+(o[v+(m<<3)>>2]<<2)|0;d=0}}else{_=(o[a>>2]|0)+(_>>1)|0;if(!(t[_>>0]|0)){t[_>>0]=2;ai(e,r)}_=o[n>>2]|0;if(!_){n=1;f=34;break}y=_+-1|0;_=o[s>>2]|0;d=o[_+(y<<3)>>2]|0;_=o[_+(y<<3)+4>>2]|0;o[r>>2]=_;g=o[l>>2]|0;v=(o[f>>2]|0)+(o[g+(_>>1<<3)>>2]<<2)|0;o[n>>2]=y}d=d+1|0}if((f|0)==8){if(b){f=(v>>1)+2&-2;f=(f|0)<2?2:f;if((f|0)>(2147483647-v|0)){y=Te(1)|0;Xe(y|0,48,0)}b=o[s>>2]|0;y=f+v|0;o[u>>2]=y;y=Ht(b,y<<3)|0;o[s>>2]=y;if((y|0)==0?(o[(je()|0)>>2]|0)==12:0){y=Te(1)|0;Xe(y|0,48,0)}v=o[n>>2]|0}u=v+1|0;o[n>>2]=u;f=(o[s>>2]|0)+(v<<3)|0;if(f){u=f;o[u>>2]=0;o[u+4>>2]=_;u=o[n>>2]|0}if((u|0)>0)f=0;else{y=0;c=i;return y|0}do{l=(o[a>>2]|0)+(o[(o[s>>2]|0)+(f<<3)+4>>2]>>1)|0;if(!(t[l>>0]|0)){t[l>>0]=3;ai(e,(o[s>>2]|0)+(f<<3)+4|0);u=o[n>>2]|0}f=f+1|0}while((f|0)<(u|0));n=0;c=i;return n|0}else if((f|0)==24)Xe(Te(1)|0,48,0);else if((f|0)==34){c=i;return n|0}return 0}function Vr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0;u=c;c=c+32|0;s=u+16|0;a=u+12|0;f=u+8|0;n=u;_=i+20|0;l=i+16|0;if((o[_>>2]|0)>0){h=0;do{t[(o[i>>2]|0)+(o[(o[l>>2]|0)+(h<<2)>>2]|0)>>0]=0;h=h+1|0}while((h|0)<(o[_>>2]|0))}if(o[l>>2]|0)o[_>>2]=0;h=o[r>>2]|0;o[f>>2]=h;o[a>>2]=h;o[s+0>>2]=o[a+0>>2];hi(i,s,0);l=(o[i>>2]|0)+h|0;if(!(t[l>>0]|0)){t[l>>0]=1;ai(i+16|0,f)}if(!(o[e+296>>2]|0)){c=u;return}r=h>>1;d=e+588|0;t[(o[d>>2]|0)+r>>0]=1;m=o[e+284>>2]|0;_=e+292|0;v=o[o[_>>2]>>2]|0;if((m|0)>(v|0)){f=e+280|0;l=e+396|0;h=i+16|0;e=e+544|0;do{m=m+-1|0;p=o[(o[f>>2]|0)+(m<<2)>>2]|0;g=p>>1;if(t[(o[d>>2]|0)+g>>0]|0){v=o[l>>2]|0;b=o[v+(g<<3)>>2]|0;e:do{if((b|0)==-1){p=p^1;o[n>>2]=p;o[a>>2]=p;o[s+0>>2]=o[a+0>>2];hi(i,s,0);p=(o[i>>2]|0)+p|0;if(!(t[p>>0]|0)){t[p>>0]=1;ai(h,n)}}else{p=(o[e>>2]|0)+(b<<2)|0;b=o[p>>2]|0;if(b>>>0>63){y=1;while(1){w=o[p+(y<<2)+4>>2]>>1;if((o[v+(w<<3)+4>>2]|0)>0){t[(o[d>>2]|0)+w>>0]=1;b=o[p>>2]|0}y=y+1|0;if((y|0)>=(b>>>5|0))break e;v=o[l>>2]|0}}}}while(0);t[(o[d>>2]|0)+g>>0]=0;v=o[o[_>>2]>>2]|0}}while((m|0)>(v|0))}t[(o[d>>2]|0)+r>>0]=0;c=u;return}function $r(e){e=e|0;var r=0,i=0,n=0,s=0,u=0,h=0,_=0.0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0,E=0,T=0,L=0;i=c;c=c+16|0;m=i+4|0;y=i;r=e+272|0;A=o[r>>2]|0;_=+l[e+496>>3]/+(A|0);s=e+544|0;u=e+268|0;w=o[u>>2]|0;o[y>>2]=s;o[m+0>>2]=o[y+0>>2];_i(w,A,m);m=o[r>>2]|0;if((m|0)>0){h=e+332|0;d=e+396|0;g=0;w=0;do{b=o[u>>2]|0;y=o[b+(g<<2)>>2]|0;A=o[s>>2]|0;p=A+(y<<2)|0;v=o[p>>2]|0;do{if(v>>>0>95){E=o[A+(y+1<<2)>>2]|0;A=E>>1;E=(a[(o[h>>2]|0)+A>>0]|0)^E&1;L=t[528]|0;T=L&255;if(((E&255)<<24>>24==L<<24>>24&(T>>>1^1)|T&2&E|0)!=0?(L=o[(o[d>>2]|0)+(A<<3)>>2]|0,(L|0)!=-1&(L|0)==(y|0)):0){n=9;break}if((g|0)>=((m|0)/2|0|0)?!(+f[p+(v>>>5<<2)+4>>2]<_):0){n=9;break}Fr(e,y)}else n=9}while(0);if((n|0)==9){n=0;o[b+(w<<2)>>2]=y;w=w+1|0}g=g+1|0;m=o[r>>2]|0}while((g|0)<(m|0))}else{g=0;w=0}n=g-w|0;if((n|0)>0)o[r>>2]=m-n;if(!(+((o[e+556>>2]|0)>>>0)>+l[e+96>>3]*+((o[e+548>>2]|0)>>>0))){c=i;return}$n[o[(o[e>>2]|0)+8>>2]&31](e);c=i;return}function jr(e,r){e=e|0;r=r|0;var i=0,n=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0,E=0;i=c;n=r+4|0;h=o[n>>2]|0;if((h|0)>0){u=e+544|0;s=e+332|0;f=0;l=0;do{y=o[r>>2]|0;m=o[y+(f<<2)>>2]|0;h=(o[u>>2]|0)+(m<<2)|0;d=o[h>>2]|0;do{if(d>>>0>31){w=o[s>>2]|0;p=t[528]|0;g=p&255;A=g&2;g=g>>>1^1;v=d>>>5;b=0;do{E=o[h+(b<<2)+4>>2]|0;E=(a[w+(E>>1)>>0]|0)^E&1;b=b+1|0;if((E&255)<<24>>24==p<<24>>24&g|A&E){_=7;break}}while((b|0)<(v|0));if((_|0)==7){_=0;Fr(e,m);break}if(d>>>0>95){_=t[536]|0;g=d>>>5;m=2;do{p=h+(m<<2)+4|0;E=o[p>>2]|0;E=(a[(o[s>>2]|0)+(E>>1)>>0]|0)^E&1;A=_&255;if((E&255)<<24>>24==_<<24>>24&(A>>>1^1)|A&2&E){o[p>>2]=o[h+(g+-1<<2)+4>>2];d=o[h>>2]|0;if(d&8){d=d>>>5;o[h+(d+-1<<2)+4>>2]=o[h+(d<<2)+4>>2];d=o[h>>2]|0}d=d+-32|0;o[h>>2]=d;m=m+-1|0}m=m+1|0;g=d>>>5}while((m|0)<(g|0));m=o[r>>2]|0;y=m;m=o[m+(f<<2)>>2]|0;_=16}else _=16}else _=16}while(0);if((_|0)==16){_=0;o[y+(l<<2)>>2]=m;l=l+1|0}f=f+1|0;h=o[n>>2]|0}while((f|0)<(h|0))}else{f=0;l=0}r=f-l|0;if((r|0)<=0){c=i;return}o[n>>2]=h-r;c=i;return}function Wr(e){e=e|0;var r=0,i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0;a=c;c=c+16|0;i=a+4|0;s=a;o[i>>2]=0;r=i+4|0;o[r>>2]=0;n=i+8|0;o[n>>2]=0;o[s>>2]=0;u=e+540|0;_=o[u>>2]|0;if((_|0)>0){l=e+380|0;f=e+332|0;h=0;do{if((t[(o[l>>2]|0)+h>>0]|0)!=0?(m=t[(o[f>>2]|0)+h>>0]|0,g=t[544]|0,d=g&255,((d>>>1^1)&m<<24>>24==g<<24>>24|m&2&d|0)!=0):0){si(i,s);_=o[u>>2]|0}h=h+1|0;o[s>>2]=h}while((h|0)<(_|0))}di(e+460|0,i);e=o[i>>2]|0;if(!e){c=a;return}o[r>>2]=0;Ut(e);o[i>>2]=0;o[n>>2]=0;c=a;return}function qr(e){e=e|0;var r=0,i=0,n=0,a=0,s=0,u=0,f=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0;r=c;n=e+492|0;if((t[n>>0]|0)!=0?(Rr(e)|0)==-1:0){n=e+284|0;a=e+516|0;if((o[n>>2]|0)==(o[a>>2]|0)){v=1;c=r;return v|0}s=e+520|0;v=s;p=o[v+4>>2]|0;if((p|0)>0|(p|0)==0&(o[v>>2]|0)>>>0>0){v=1;c=r;return v|0}jr(e,e+268|0);if(t[e+536>>0]|0){jr(e,e+256|0);f=e+564|0;u=e+568|0;if((o[u>>2]|0)>0){_=e+588|0;h=0;do{t[(o[_>>2]|0)+(o[(o[f>>2]|0)+(h<<2)>>2]|0)>>0]=1;h=h+1|0}while((h|0)<(o[u>>2]|0))}m=o[n>>2]|0;if((m|0)>0){h=o[e+280>>2]|0;_=o[e+588>>2]|0;g=0;d=0;do{p=o[h+(g<<2)>>2]|0;if(!(t[_+(p>>1)>>0]|0)){o[h+(d<<2)>>2]=p;m=o[n>>2]|0;d=d+1|0}g=g+1|0}while((g|0)<(m|0))}else{g=0;d=0}h=g-d|0;if((h|0)>0){m=m-h|0;o[n>>2]=m}o[e+512>>2]=m;e:do{if((o[u>>2]|0)>0){d=e+588|0;h=0;do{t[(o[d>>2]|0)+(o[(o[f>>2]|0)+(h<<2)>>2]|0)>>0]=0;h=h+1|0;_=o[u>>2]|0}while((h|0)<(_|0));if((_|0)>0){_=e+580|0;d=e+584|0;h=e+576|0;m=0;while(1){p=o[_>>2]|0;if((p|0)==(o[d>>2]|0)){g=(p>>1)+2&-2;g=(g|0)<2?2:g;if((g|0)>(2147483647-p|0)){i=28;break}v=o[h>>2]|0;g=g+p|0;o[d>>2]=g;g=Ht(v,g<<2)|0;o[h>>2]=g;if((g|0)==0?(o[(je()|0)>>2]|0)==12:0){i=28;break}p=o[_>>2]|0}else g=o[h>>2]|0;v=g+(p<<2)|0;if(v){o[v>>2]=0;p=o[_>>2]|0}o[_>>2]=p+1;v=o[f>>2]|0;o[g+(p<<2)>>2]=o[v+(m<<2)>>2];m=m+1|0;if((m|0)>=(o[u>>2]|0))break e}if((i|0)==28)Xe(Te(1)|0,48,0)}else i=21}else i=21}while(0);if((i|0)==21)v=o[f>>2]|0;if(v)o[u>>2]=0}if(+((o[e+556>>2]|0)>>>0)>+l[e+96>>3]*+((o[e+548>>2]|0)>>>0))$n[o[(o[e>>2]|0)+8>>2]&31](e);Wr(e);o[a>>2]=o[n>>2];p=e+224|0;v=e+232|0;p=un(o[v>>2]|0,o[v+4>>2]|0,o[p>>2]|0,o[p+4>>2]|0)|0;v=s;o[v>>2]=p;o[v+4>>2]=I;v=1;c=r;return v|0}t[n>>0]=0;v=0;c=r;return v|0}function zr(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,s=0,u=0,h=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0,E=0,T=0,L=0,M=0,S=0,k=0,O=0,N=0,C=0,R=0,P=0,F=0,x=0,D=0,B=0,U=0,H=0,V=0,$=0,j=0,W=0,q=0,z=0,X=0,Y=0,Z=0,G=0,J=0,Q=0,ee=0,re=0,ie=0,te=0,ne=0,oe=0.0,ae=0,se=0,ue=0,fe=0.0,le=0,ce=0,he=0,_e=0,de=0,me=0,ge=0.0,pe=0,ve=0,be=0.0;h=c;c=c+64|0;J=h;C=h+60|0;S=h+56|0;n=h+44|0;Q=h+40|0;o[n>>2]=0;u=n+4|0;o[u>>2]=0;s=n+8|0;o[s>>2]=0;U=r+160|0;B=U;B=un(o[B>>2]|0,o[B+4>>2]|0,1,0)|0;o[U>>2]=B;o[U+4>>2]=I;U=(i|0)<0;B=r+680|0;D=r+664|0;x=r+672|0;g=r+296|0;A=r+272|0;d=r+284|0;P=r+640|0;N=r+308|0;O=r+304|0;p=r+332|0;R=r+292|0;re=r+168|0;b=r+396|0;w=r+280|0;F=r+184|0;k=r+192|0;y=r+48|0;q=r+504|0;Z=r+56|0;ee=r+496|0;ie=r+656|0;H=r+144|0;V=r+648|0;$=r+128|0;j=r+44|0;W=r+200|0;z=r+208|0;X=r+224|0;Y=r+216|0;v=r+232|0;G=r+540|0;m=r+292|0;E=r+544|0;L=r+276|0;T=r+268|0;M=r+268|0;te=0;e:while(1){ne=U|(te|0)<(i|0);while(1){ae=Rr(r)|0;if((ae|0)!=-1)break;if(!ne){ae=41;break e}if(t[B>>0]|0){ae=41;break e}ae=D;se=o[ae+4>>2]|0;if((se|0)>=0?(ve=k,pe=o[ve+4>>2]|0,!(pe>>>0<se>>>0|((pe|0)==(se|0)?(o[ve>>2]|0)>>>0<(o[ae>>2]|0)>>>0:0))):0){ae=41;break e}ae=x;se=o[ae+4>>2]|0;if((se|0)>=0?(ve=F,pe=o[ve+4>>2]|0,!(pe>>>0<se>>>0|((pe|0)==(se|0)?(o[ve>>2]|0)>>>0<(o[ae>>2]|0)>>>0:0))):0){ae=41;break e}if((o[g>>2]|0)==0?!(qr(r)|0):0){ae=50;break e}if(+((o[A>>2]|0)-(o[d>>2]|0)|0)>=+l[P>>3])$r(r);while(1){ae=o[g>>2]|0;if((ae|0)>=(o[N>>2]|0)){ae=59;break}le=o[(o[O>>2]|0)+(ae<<2)>>2]|0;se=a[(o[p>>2]|0)+(le>>1)>>0]|0;ve=se^le&1;ue=ve&255;me=t[528]|0;pe=me&255;if(!(ue<<24>>24==me<<24>>24&(pe>>>1^1)|pe&2&ve)){ae=56;break}o[C>>2]=o[d>>2];si(R,C)}if((ae|0)==56){ae=0;pe=t[536]|0;ve=pe&255;if((ve>>>1^1)&ue<<24>>24==pe<<24>>24|se&2&ve){ae=57;break e}if((le|0)==-2)ae=59}if((ae|0)==59){ve=re;ve=un(o[ve>>2]|0,o[ve+4>>2]|0,1,0)|0;le=re;o[le>>2]=ve;o[le+4>>2]=I;le=Br(r)|0;if((le|0)==-2){ae=60;break e}}o[J>>2]=o[d>>2];si(R,J);ve=le>>1;t[(o[p>>2]|0)+ve>>0]=(le&1^1)&255^1;pe=o[g>>2]|0;ve=(o[b>>2]|0)+(ve<<3)|0;o[ve>>2]=-1;o[ve+4>>2]=pe;ve=o[d>>2]|0;o[d>>2]=ve+1;o[(o[w>>2]|0)+(ve<<2)>>2]=le}pe=k;pe=un(o[pe>>2]|0,o[pe+4>>2]|0,1,0)|0;ve=k;o[ve>>2]=pe;o[ve+4>>2]=I;te=te+1|0;if(!(o[g>>2]|0)){ae=5;break}if(o[n>>2]|0)o[u>>2]=0;Ur(r,ae,n,S);Dr(r,o[S>>2]|0);if((o[u>>2]|0)==1){pe=o[o[n>>2]>>2]|0;ve=pe>>1;t[(o[p>>2]|0)+ve>>0]=(pe&1^1)&255^1;me=o[g>>2]|0;ve=(o[b>>2]|0)+(ve<<3)|0;o[ve>>2]=-1;o[ve+4>>2]=me;ve=o[d>>2]|0;o[d>>2]=ve+1;o[(o[w>>2]|0)+(ve<<2)>>2]=pe}else{ne=fi(E,n,1)|0;ae=o[A>>2]|0;if((ae|0)==(o[L>>2]|0)){se=(ae>>1)+2&-2;se=(se|0)<2?2:se;if((se|0)>(2147483647-ae|0)){ae=14;break}pe=o[T>>2]|0;ve=se+ae|0;o[L>>2]=ve;ve=Ht(pe,ve<<2)|0;o[T>>2]=ve;if((ve|0)==0?(o[(je()|0)>>2]|0)==12:0){ae=14;break}ae=o[A>>2]|0}o[A>>2]=ae+1;ae=(o[T>>2]|0)+(ae<<2)|0;if(ae)o[ae>>2]=ne;Pr(r,ne);ue=o[E>>2]|0;ve=ue+(ne<<2)|0;oe=+l[ee>>3];ve=ve+((o[ve>>2]|0)>>>5<<2)+4|0;be=oe+ +f[ve>>2];f[ve>>2]=be;if(be>1.0e20){se=o[A>>2]|0;if((se|0)>0){ae=o[M>>2]|0;le=0;do{ve=ue+(o[ae+(le<<2)>>2]<<2)|0;ve=ve+((o[ve>>2]|0)>>>5<<2)+4|0;f[ve>>2]=+f[ve>>2]*1.0e-20;le=le+1|0}while((le|0)!=(se|0))}l[ee>>3]=oe*1.0e-20}pe=o[o[n>>2]>>2]|0;ve=pe>>1;t[(o[p>>2]|0)+ve>>0]=(pe&1^1)&255^1;me=o[g>>2]|0;ve=(o[b>>2]|0)+(ve<<3)|0;o[ve>>2]=ne;o[ve+4>>2]=me;ve=o[d>>2]|0;o[d>>2]=ve+1;o[(o[w>>2]|0)+(ve<<2)>>2]=pe}l[q>>3]=1.0/+l[y>>3]*+l[q>>3];l[ee>>3]=1.0/+l[Z>>3]*+l[ee>>3];ve=(o[ie>>2]|0)+-1|0;o[ie>>2]=ve;if(ve)continue;oe=+l[H>>3]*+l[V>>3];l[V>>3]=oe;o[ie>>2]=~~oe;oe=+l[$>>3]*+l[P>>3];l[P>>3]=oe;if((o[j>>2]|0)<=0)continue;ae=o[k>>2]|0;ne=o[W>>2]|0;de=o[g>>2]|0;if(!de)se=d;else se=o[m>>2]|0;se=o[se>>2]|0;_e=o[z>>2]|0;he=o[X>>2]|0;ce=o[Y>>2]|0;le=v;ue=o[le>>2]|0;le=o[le+4>>2]|0;fe=+(o[G>>2]|0);ge=1.0/fe;if((de|0)<0)be=0.0;else{me=0;be=0.0;while(1){if(!me)pe=0;else pe=o[(o[m>>2]|0)+(me+-1<<2)>>2]|0;if((me|0)==(de|0))ve=d;else ve=(o[m>>2]|0)+(me<<2)|0;be=be+ +K(+ge,+ +(me|0))*+((o[ve>>2]|0)-pe|0);if((me|0)==(de|0))break;else me=me+1|0}}o[J>>2]=ae;o[J+4>>2]=ne-se;o[J+8>>2]=_e;o[J+12>>2]=he;o[J+16>>2]=~~oe;o[J+20>>2]=ce;ve=J+24|0;l[_>>3]=(+(ue>>>0)+4294967296.0*+(le>>>0))/+(ce|0);o[ve>>2]=o[_>>2];o[ve+4>>2]=o[_+4>>2];ve=J+32|0;l[_>>3]=be/fe*100.0;o[ve>>2]=o[_>>2];o[ve+4>>2]=o[_+4>>2];He(1832,J|0)|0}if((ae|0)==5)t[e>>0]=t[536]|0;else if((ae|0)==14)Xe(Te(1)|0,48,0);else if((ae|0)==41){oe=+(o[G>>2]|0);fe=1.0/oe;p=o[g>>2]|0;if((p|0)<0)ge=0.0;else{g=0;ge=0.0;while(1){if(!g)v=0;else v=o[(o[m>>2]|0)+(g+-1<<2)>>2]|0;if((g|0)==(p|0))b=d;else b=(o[m>>2]|0)+(g<<2)|0;ge=ge+ +K(+fe,+ +(g|0))*+((o[b>>2]|0)-v|0);if((g|0)==(p|0))break;else g=g+1|0}}l[r+528>>3]=ge/oe;Dr(r,0);t[e>>0]=t[544]|0}else if((ae|0)==50)t[e>>0]=t[536]|0;else if((ae|0)==57){o[Q>>2]=le^1;ve=r+16|0;o[J+0>>2]=o[Q+0>>2];Vr(r,J,ve);t[e>>0]=t[536]|0}else if((ae|0)==60)t[e>>0]=t[528]|0;e=o[n>>2]|0;if(!e){c=h;return}o[u>>2]=0;Ut(e);o[n>>2]=0;o[s>>2]=0;c=h;return}function Kr(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0.0,A=0,E=0,T=0,L=0.0,M=0,S=0;n=c;c=c+16|0;s=n;i=r+4|0;if(o[i>>2]|0)o[r+8>>2]=0;a=r+36|0;u=r+32|0;if((o[a>>2]|0)>0){f=r+16|0;h=0;do{t[(o[f>>2]|0)+(o[(o[u>>2]|0)+(h<<2)>>2]|0)>>0]=0;h=h+1|0}while((h|0)<(o[a>>2]|0))}if(o[u>>2]|0)o[a>>2]=0;u=r+492|0;if(!(t[u>>0]|0)){t[e>>0]=t[536]|0;c=n;return}f=r+152|0;T=f;T=un(o[T>>2]|0,o[T+4>>2]|0,1,0)|0;o[f>>2]=T;o[f+4>>2]=I;L=+l[r+120>>3]*+(o[r+208>>2]|0);f=r+640|0;l[f>>3]=L;w=+(o[r+104>>2]|0);if(L<w)l[f>>3]=w;A=o[r+136>>2]|0;l[r+648>>3]=+(A|0);o[r+656>>2]=A;A=t[544]|0;f=r+44|0;if((o[f>>2]|0)>0){Ue(2288)|0;Ue(2368)|0;Ue(2448)|0;Ue(2528)|0;d=t[544]|0}else d=A;_=r+192|0;h=r+184|0;T=d&255;e:do{if((T>>>1^1)&A<<24>>24==d<<24>>24|A&2&T){g=r+80|0;b=r+112|0;m=r+108|0;d=r+680|0;p=r+664|0;v=r+672|0;y=0;while(1){w=+l[b>>3];if(!(t[g>>0]|0))w=+K(+w,+ +(y|0));else{T=y+1|0;if((y|0)>0){E=0;A=1;do{E=E+1|0;A=A<<1|1}while((A|0)<(T|0));T=A+-1|0}else{E=0;T=0}if((T|0)!=(y|0)){A=y;do{M=T>>1;E=E+-1|0;A=(A|0)%(M|0)|0;T=M+-1|0}while((T|0)!=(A|0))}w=+K(+w,+ +(E|0))}zr(s,r,~~(w*+(o[m>>2]|0)));A=t[s>>0]|0;if(t[d>>0]|0)break e;T=p;E=o[T+4>>2]|0;if((E|0)>=0?(M=_,S=o[M+4>>2]|0,!(S>>>0<E>>>0|((S|0)==(E|0)?(o[M>>2]|0)>>>0<(o[T>>2]|0)>>>0:0))):0)break e;T=v;E=o[T+4>>2]|0;if((E|0)>=0?(S=h,M=o[S+4>>2]|0,!(M>>>0<E>>>0|((M|0)==(E|0)?(o[S>>2]|0)>>>0<(o[T>>2]|0)>>>0:0))):0)break e;M=t[544]|0;S=M&255;if(!((S>>>1^1)&A<<24>>24==M<<24>>24|A&2&S))break;else y=y+1|0}}}while(0);if((o[f>>2]|0)>0)Ue(2528)|0;M=t[528]|0;S=M&255;s=A&2;if(!((S>>>1^1)&A<<24>>24==M<<24>>24|s&S)){M=t[536]|0;S=M&255;if(((S>>>1^1)&A<<24>>24==M<<24>>24|s&S|0)!=0?(o[a>>2]|0)==0:0)t[u>>0]=0}else{a=r+540|0;ti(i,o[a>>2]|0);if((o[a>>2]|0)>0){s=r+332|0;u=0;do{t[(o[i>>2]|0)+u>>0]=t[(o[s>>2]|0)+u>>0]|0;u=u+1|0}while((u|0)<(o[a>>2]|0))}}Dr(r,0);t[e>>0]=A;c=n;return}function Xr(e,r){e=e|0;r=r|0;var i=0,n=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0;i=c;s=e+412|0;mi(s);f=e+540|0;if((o[f>>2]|0)>0){u=e+544|0;n=0;do{l=n<<1;_=o[s>>2]|0;h=_+(l*12|0)+4|0;if((o[h>>2]|0)>0){m=_+(l*12|0)|0;d=0;do{v=(o[m>>2]|0)+(d<<3)|0;_=o[v>>2]|0;g=o[u>>2]|0;p=g+(_<<2)|0;if(!(o[p>>2]&16)){b=gi(r,p)|0;o[v>>2]=b;o[p>>2]=o[p>>2]|16;o[g+(_+1<<2)>>2]=b}else o[v>>2]=o[g+(_+1<<2)>>2];d=d+1|0}while((d|0)<(o[h>>2]|0));h=o[s>>2]|0}else h=_;_=l|1;l=h+(_*12|0)+4|0;if((o[l>>2]|0)>0){p=h+(_*12|0)|0;g=0;do{h=(o[p>>2]|0)+(g<<3)|0;m=o[h>>2]|0;d=o[u>>2]|0;_=d+(m<<2)|0;if(!(o[_>>2]&16)){b=gi(r,_)|0;o[h>>2]=b;o[_>>2]=o[_>>2]|16;o[d+(m+1<<2)>>2]=b}else o[h>>2]=o[d+(m+1<<2)>>2];g=g+1|0}while((g|0)<(o[l>>2]|0))}n=n+1|0}while((n|0)<(o[f>>2]|0))}n=e+284|0;if((o[n>>2]|0)>0){l=e+280|0;f=e+396|0;u=e+544|0;s=e+332|0;h=0;do{p=o[f>>2]|0;m=p+(o[(o[l>>2]|0)+(h<<2)>>2]>>1<<3)|0;g=o[m>>2]|0;do{if((g|0)!=-1){b=o[u>>2]|0;v=b+(g<<2)|0;d=(o[v>>2]&16|0)==0;if(d){y=o[b+(g+1<<2)>>2]|0;_=y>>1;y=(a[(o[s>>2]|0)+_>>0]|0)^y&1;A=t[528]|0;w=A&255;if(!((y&255)<<24>>24==A<<24>>24&(w>>>1^1)|w&2&y))break;A=o[p+(_<<3)>>2]|0;if(!((A|0)!=-1&(A|0)==(g|0)))break;if(d){A=gi(r,v)|0;o[m>>2]=A;o[v>>2]=o[v>>2]|16;o[b+(g+1<<2)>>2]=A;break}}o[m>>2]=o[b+(g+1<<2)>>2]}}while(0);h=h+1|0}while((h|0)<(o[n>>2]|0))}n=e+272|0;_=o[n>>2]|0;if((_|0)>0){u=e+268|0;s=e+544|0;h=o[u>>2]|0;f=0;l=0;do{m=h+(f<<2)|0;d=o[m>>2]|0;p=o[s>>2]|0;g=p+(d<<2)|0;v=o[g>>2]|0;if((v&3|0)!=1){if(!(v&16)){_=gi(r,g)|0;o[m>>2]=_;o[g>>2]=o[g>>2]|16;o[p+(d+1<<2)>>2]=_;_=o[u>>2]|0;h=_;_=o[_+(f<<2)>>2]|0}else{_=o[p+(d+1<<2)>>2]|0;o[m>>2]=_}o[h+(l<<2)>>2]=_;_=o[n>>2]|0;l=l+1|0}f=f+1|0}while((f|0)<(_|0))}else{f=0;l=0}s=f-l|0;if((s|0)>0)o[n>>2]=_-s;n=e+260|0;h=o[n>>2]|0;if((h|0)>0){s=e+256|0;e=e+544|0;l=o[s>>2]|0;u=0;f=0;do{_=l+(u<<2)|0;m=o[_>>2]|0;d=o[e>>2]|0;p=d+(m<<2)|0;g=o[p>>2]|0;if((g&3|0)!=1){if(!(g&16)){h=gi(r,p)|0;o[_>>2]=h;o[p>>2]=o[p>>2]|16;o[d+(m+1<<2)>>2]=h;h=o[s>>2]|0;l=h;h=o[h+(u<<2)>>2]|0}else{h=o[d+(m+1<<2)>>2]|0;o[_>>2]=h}o[l+(f<<2)>>2]=h;h=o[n>>2]|0;f=f+1|0}u=u+1|0}while((u|0)<(h|0))}else{u=0;f=0}r=u-f|0;if((r|0)<=0){c=i;return}o[n>>2]=h-r;c=i;return}function Yr(e){e=e|0;var r=0,i=0,n=0,a=0,s=0,u=0,f=0;a=c;c=c+32|0;u=a;r=a+8|0;i=e+548|0;n=e+556|0;s=(o[i>>2]|0)-(o[n>>2]|0)|0;o[r+0>>2]=0;o[r+4>>2]=0;o[r+8>>2]=0;o[r+12>>2]=0;ei(r,s);s=r+16|0;t[s>>0]=0;Xr(e,r);if((o[e+44>>2]|0)>1){f=o[r+4>>2]<<2;o[u>>2]=o[i>>2]<<2;o[u+4>>2]=f;He(1888,u|0)|0}t[e+560>>0]=t[s>>0]|0;s=e+544|0;u=o[s>>2]|0;if(u)Ut(u);o[s>>2]=o[r>>2];o[i>>2]=o[r+4>>2];o[e+552>>2]=o[r+8>>2];o[n>>2]=o[r+12>>2];c=a;return}function Zr(){var e=0,r=0,i=0;e=c;c=c+16|0;r=e;t[528]=0;t[536]=1;t[544]=2;pr(552,608,624,2136,2144);o[138]=2168;l[72]=0.0;l[73]=1.0;t[592]=0;t[593]=0;n[297]=n[r+0>>1]|0;n[298]=n[r+2>>1]|0;n[299]=n[r+4>>1]|0;l[75]=.95;pr(664,720,736,2136,2144);o[166]=2168;l[86]=0.0;l[87]=1.0;t[704]=0;t[705]=0;n[353]=n[r+0>>1]|0;n[354]=n[r+2>>1]|0;n[355]=n[r+4>>1]|0;l[89]=.999;pr(776,832,848,2136,2144);o[194]=2168;l[100]=0.0;l[101]=1.0;t[816]=1;t[817]=1;n[409]=n[r+0>>1]|0;n[410]=n[r+2>>1]|0;n[411]=n[r+4>>1]|0;l[103]=0.0;pr(936,992,1008,2136,2144);o[234]=2168;l[120]=0.0;l[121]=T;t[976]=0;t[977]=0;n[489]=n[r+0>>1]|0;n[490]=n[r+2>>1]|0;n[491]=n[r+4>>1]|0;l[123]=91648253.0;pr(1048,1080,1096,2136,2016);o[262]=280;i=1068|0;o[i>>2]=0;o[i+4>>2]=2;o[269]=2;pr(1160,1192,1208,2136,2016);o[290]=280;i=1180|0;o[i>>2]=0;o[i+4>>2]=2;o[297]=2;pr(1272,1296,1312,2136,1992);o[318]=160;t[1292]=0;pr(1344,1368,1376,2136,1992);o[336]=160;t[1364]=1;pr(1408,1440,1448,2136,2016);o[352]=280;i=1428|0;o[i>>2]=1;o[i+4>>2]=2147483647;o[359]=100;pr(1480,1536,1544,2136,2144);o[370]=2168;l[188]=1.0;l[189]=T;t[1520]=0;t[1521]=0;n[761]=n[r+0>>1]|0;n[762]=n[r+2>>1]|0;n[763]=n[r+4>>1]|0;l[191]=2.0;pr(1584,1640,1648,2136,2144);o[396]=2168;l[201]=0.0;l[202]=T;t[1624]=0;t[1625]=0;n[813]=n[r+0>>1]|0;n[814]=n[r+2>>1]|0;n[815]=n[r+4>>1]|0;l[204]=.2;pr(1728,1760,1776,2136,2016);o[432]=280;r=1748|0;o[r>>2]=0;o[r+4>>2]=2147483647;o[439]=0;c=e;return}function Gr(e){e=e|0;var r=0;r=c;ft(e);c=r;return}function Jr(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,h=0,_=0,d=0,m=0.0,g=0.0;i=c;c=c+16|0;s=i;a=i+8|0;if((t[r>>0]|0)!=45){d=0;c=i;return d|0}h=r+1|0;n=e+4|0;u=o[n>>2]|0;f=t[u>>0]|0;e:do{if(f<<24>>24){_=0;while(1){d=_;_=_+1|0;if((t[h>>0]|0)!=f<<24>>24){e=0;break}f=t[u+_>>0]|0;h=r+(d+2)|0;if(!(f<<24>>24))break e}c=i;return e|0}}while(0);if((t[h>>0]|0)!=61){d=0;c=i;return d|0}u=h+1|0;m=+Zt(u,a);if(!(o[a>>2]|0)){d=0;c=i;return d|0}g=+l[e+32>>3];if(m>=g?(t[e+41>>0]|0)==0|m!=g:0){d=o[v>>2]|0;_=o[n>>2]|0;o[s>>2]=u;o[s+4>>2]=_;er(d|0,2024,s|0)|0;tr(1)}g=+l[e+24>>3];if(m<=g?(t[e+40>>0]|0)==0|m!=g:0){d=o[v>>2]|0;_=o[n>>2]|0;o[s>>2]=u;o[s+4>>2]=_;er(d|0,2080,s|0)|0;tr(1)}l[e+48>>3]=m;d=1;c=i;return d|0}function Qr(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0.0,f=0,h=0.0,d=0.0,m=0;i=c;c=c+48|0;n=i;a=o[v>>2]|0;m=o[e+16>>2]|0;f=(t[e+40>>0]|0)!=0?91:40;d=+l[e+24>>3];h=+l[e+32>>3];s=(t[e+41>>0]|0)!=0?93:41;u=+l[e+48>>3];o[n>>2]=o[e+4>>2];o[n+4>>2]=m;o[n+8>>2]=f;f=n+12|0;l[_>>3]=d;o[f>>2]=o[_>>2];o[f+4>>2]=o[_+4>>2];f=n+20|0;l[_>>3]=h;o[f>>2]=o[_>>2];o[f+4>>2]=o[_+4>>2];o[n+28>>2]=s;s=n+32|0;l[_>>3]=u;o[s>>2]=o[_>>2];o[s+4>>2]=o[_+4>>2];er(a|0,2232,n|0)|0;if(!r){c=i;return}o[n>>2]=o[e+8>>2];er(a|0,2e3,n|0)|0;Ke(10,a|0)|0;c=i;return}function ei(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0;i=c;t=e+8|0;n=o[t>>2]|0;if(n>>>0<r>>>0)s=n;else{c=i;return}while(1){if(s>>>0>=r>>>0)break;s=((s>>>3)+2+(s>>>1)&-2)+s|0;o[t>>2]=s;if(s>>>0<=n>>>0){a=4;break}}if((a|0)==4)Xe(Te(1)|0,48,0);t=Ht(o[e>>2]|0,s<<2)|0;if((t|0)==0?(o[(je()|0)>>2]|0)==12:0)Xe(Te(1)|0,48,0);o[e>>2]=t;c=i;return}function ri(e){e=e|0;var r=0,i=0,t=0,n=0,a=0,s=0,u=0;r=c;t=e+32|0;i=o[t>>2]|0;if(i){o[e+36>>2]=0;Ut(i);o[t>>2]=0;o[e+40>>2]=0}t=e+16|0;i=o[t>>2]|0;if(i){o[e+20>>2]=0;Ut(i);o[t>>2]=0;o[e+24>>2]=0}t=o[e>>2]|0;if(!t){c=r;return}i=e+4|0;a=o[i>>2]|0;if((a|0)>0){n=0;do{u=t+(n*12|0)|0;s=o[u>>2]|0;if(s){o[t+(n*12|0)+4>>2]=0;Ut(s);o[u>>2]=0;o[t+(n*12|0)+8>>2]=0;t=o[e>>2]|0;a=o[i>>2]|0}n=n+1|0}while((n|0)<(a|0))}o[i>>2]=0;Ut(t);o[e>>2]=0;o[e+8>>2]=0;c=r;return}function ii(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0;n=c;c=c+16|0;t=n+4|0;i=n;l=o[r>>2]|0;s=l+1|0;a=e+4|0;if((o[a>>2]|0)<(s|0)){f=e+8|0;u=o[f>>2]|0;if((u|0)<(s|0)){h=l+2-u&-2;l=(u>>1)+2&-2;l=(h|0)>(l|0)?h:l;if((l|0)>(2147483647-u|0)){h=Te(1)|0;Xe(h|0,48,0)}_=o[e>>2]|0;h=l+u|0;o[f>>2]=h;h=Ht(_,h*12|0)|0;o[e>>2]=h;if((h|0)==0?(o[(je()|0)>>2]|0)==12:0){_=Te(1)|0;Xe(_|0,48,0)}}f=o[a>>2]|0;if((f|0)<(s|0)){u=o[e>>2]|0;do{l=u+(f*12|0)|0;if(l){o[l>>2]=0;o[u+(f*12|0)+4>>2]=0;o[u+(f*12|0)+8>>2]=0}f=f+1|0}while((f|0)!=(s|0))}o[a>>2]=s;l=o[r>>2]|0}a=o[e>>2]|0;if(!(o[a+(l*12|0)>>2]|0)){h=l;_=e+16|0;o[i>>2]=h;o[t+0>>2]=o[i+0>>2];hi(_,t,0);c=n;return}o[a+(l*12|0)+4>>2]=0;h=o[r>>2]|0;_=e+16|0;o[i>>2]=h;o[t+0>>2]=o[i+0>>2];hi(_,t,0);c=n;return}function ti(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0;n=c;i=e+4|0;if((o[i>>2]|0)>=(r|0)){c=n;return}s=e+8|0;a=o[s>>2]|0;if((a|0)<(r|0)){f=r+1-a&-2;u=(a>>1)+2&-2;u=(f|0)>(u|0)?f:u;if((u|0)>(2147483647-a|0)){f=Te(1)|0;Xe(f|0,48,0)}l=o[e>>2]|0;f=u+a|0;o[s>>2]=f;f=Ht(l,f)|0;o[e>>2]=f;if((f|0)==0?(o[(je()|0)>>2]|0)==12:0){l=Te(1)|0;Xe(l|0,48,0)}}a=o[i>>2]|0;if((a|0)<(r|0)){e=o[e>>2]|0;do{s=e+a|0;if(s)t[s>>0]=0;a=a+1|0}while((a|0)!=(r|0))}o[i>>2]=r;c=n;return}function ni(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0;s=c;a=r+1|0;n=e+4|0;if((o[n>>2]|0)>=(a|0)){l=o[e>>2]|0;l=l+r|0;t[l>>0]=i;c=s;return}f=e+8|0;u=o[f>>2]|0;if((u|0)<(a|0)){h=r+2-u&-2;l=(u>>1)+2&-2;l=(h|0)>(l|0)?h:l;if((l|0)>(2147483647-u|0)){h=Te(1)|0;Xe(h|0,48,0)}_=o[e>>2]|0;h=l+u|0;o[f>>2]=h;h=Ht(_,h)|0;o[e>>2]=h;if((h|0)==0?(o[(je()|0)>>2]|0)==12:0){_=Te(1)|0;Xe(_|0,48,0)}}u=o[n>>2]|0;if((u|0)<(a|0))do{f=(o[e>>2]|0)+u|0;if(f)t[f>>0]=0;u=u+1|0}while((u|0)!=(a|0));o[n>>2]=a;_=o[e>>2]|0;_=_+r|0;t[_>>0]=i;c=s;return}function oi(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0,h=0,_=0,d=0;i=c;c=c+16|0;a=i;o[a>>2]=r;s=e+12|0;n=r+1|0;t=e+16|0;if((o[t>>2]|0)<(n|0)){f=e+20|0;u=o[f>>2]|0;if((u|0)<(n|0)){_=r+2-u&-2;h=(u>>1)+2&-2;h=(_|0)>(h|0)?_:h;if((h|0)>(2147483647-u|0)){_=Te(1)|0;Xe(_|0,48,0)}d=o[s>>2]|0;_=h+u|0;o[f>>2]=_;_=Ht(d,_<<2)|0;o[s>>2]=_;if((_|0)==0?(o[(je()|0)>>2]|0)==12:0){d=Te(1)|0;Xe(d|0,48,0)}}u=o[t>>2]|0;if((n|0)>(u|0))on((o[s>>2]|0)+(u<<2)|0,-1,n-u<<2|0)|0;o[t>>2]=n}o[(o[s>>2]|0)+(r<<2)>>2]=o[e+4>>2];si(e,a);t=o[s>>2]|0;a=o[t+(r<<2)>>2]|0;r=o[e>>2]|0;n=o[r+(a<<2)>>2]|0;if(!a){_=0;d=r+(_<<2)|0;o[d>>2]=n;d=t+(n<<2)|0;o[d>>2]=_;c=i;return}e=e+28|0;while(1){s=a;a=a+-1>>1;u=r+(a<<2)|0;f=o[u>>2]|0;d=o[o[e>>2]>>2]|0;if(!(+l[d+(n<<3)>>3]>+l[d+(f<<3)>>3])){e=14;break}o[r+(s<<2)>>2]=f;o[t+(o[u>>2]<<2)>>2]=s;if(!a){s=0;e=14;break}}if((e|0)==14){d=r+(s<<2)|0;o[d>>2]=n;d=t+(n<<2)|0;o[d>>2]=s;c=i;return}}function ai(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0;i=c;t=e+4|0;n=o[t>>2]|0;a=e+8|0;s=o[a>>2]|0;if((n|0)==(s|0)&(s|0)<(n+1|0)){s=(n>>1)+2&-2;s=(s|0)<2?2:s;if((s|0)>(2147483647-n|0)){s=Te(1)|0;Xe(s|0,48,0)}u=o[e>>2]|0;n=s+n|0;o[a>>2]=n;n=Ht(u,n<<2)|0;o[e>>2]=n;if((n|0)==0?(o[(je()|0)>>2]|0)==12:0){u=Te(1)|0;Xe(u|0,48,0)}}else n=o[e>>2]|0;u=o[t>>2]|0;o[t>>2]=u+1;t=n+(u<<2)|0;if(!t){c=i;return}o[t>>2]=o[r>>2];c=i;return}function si(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0;i=c;t=e+4|0;n=o[t>>2]|0;a=e+8|0;s=o[a>>2]|0;if((n|0)==(s|0)&(s|0)<(n+1|0)){s=(n>>1)+2&-2;s=(s|0)<2?2:s;if((s|0)>(2147483647-n|0)){s=Te(1)|0;Xe(s|0,48,0)}u=o[e>>2]|0;n=s+n|0;o[a>>2]=n;n=Ht(u,n<<2)|0;o[e>>2]=n;if((n|0)==0?(o[(je()|0)>>2]|0)==12:0){u=Te(1)|0;Xe(u|0,48,0)}}else n=o[e>>2]|0;u=o[t>>2]|0;o[t>>2]=u+1;t=n+(u<<2)|0;if(!t){c=i;return}o[t>>2]=o[r>>2];c=i;return}function ui(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0;i=c;c=c+16|0;n=i+2|0;s=i+1|0;a=i;if((r|0)<16){a=r+-1|0;if((a|0)>0)s=0;else{c=i;return}do{n=s;s=s+1|0;if((s|0)<(r|0)){f=n;u=s;do{f=(o[e+(u<<2)>>2]|0)<(o[e+(f<<2)>>2]|0)?u:f;u=u+1|0}while((u|0)!=(r|0))}else f=n;_=e+(n<<2)|0;d=o[_>>2]|0;m=e+(f<<2)|0;o[_>>2]=o[m>>2];o[m>>2]=d}while((s|0)!=(a|0));c=i;return}u=o[e+(((r|0)/2|0)<<2)>>2]|0;h=-1;_=r;while(1){do{h=h+1|0;l=e+(h<<2)|0;f=o[l>>2]|0}while((f|0)<(u|0));do{_=_+-1|0;d=e+(_<<2)|0;m=o[d>>2]|0}while((u|0)<(m|0));if((h|0)>=(_|0))break;o[l>>2]=m;o[d>>2]=f}t[n+0>>0]=t[s+0>>0]|0;ui(e,h,n);m=r-h|0;t[n+0>>0]=t[a+0>>0]|0;ui(l,m,n);c=i;return}function fi(e,r,i){e=e|0;r=r|0;i=i|0;var t=0,n=0,s=0,u=0,l=0,h=0;t=c;u=i&1;s=a[e+16>>0]|0|u;n=r+4|0;l=((s+(o[n>>2]|0)<<2)+4|0)>>>2;h=e+4|0;ei(e,l+(o[h>>2]|0)|0);i=o[h>>2]|0;l=l+i|0;o[h>>2]=l;if(l>>>0<i>>>0)Xe(Te(1)|0,48,0);e=(o[e>>2]|0)+(i<<2)|0;if(!e){c=t;return i|0}s=s<<3|u<<2;o[e>>2]=o[e>>2]&-32|s;s=o[n>>2]<<5|s;o[e>>2]=s;if((o[n>>2]|0)>0){s=o[r>>2]|0;r=0;do{o[e+(r<<2)+4>>2]=o[s+(r<<2)>>2];r=r+1|0}while((r|0)<(o[n>>2]|0));s=o[e>>2]|0}if(!(s&8)){c=t;return i|0}n=s>>>5;if(s&4){f[e+(n<<2)+4>>2]=0.0;c=t;return i|0}if(!n){n=0;s=0}else{s=0;r=0;do{s=1<<((o[e+(r<<2)+4>>2]|0)>>>1&31)|s;r=r+1|0}while((r|0)<(n|0))}o[e+(n<<2)+4>>2]=s;c=t;return i|0}function li(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0;i=c;t=e+4|0;n=o[t>>2]|0;a=e+8|0;s=o[a>>2]|0;if((n|0)==(s|0)&(s|0)<(n+1|0)){s=(n>>1)+2&-2;s=(s|0)<2?2:s;if((s|0)>(2147483647-n|0)){s=Te(1)|0;Xe(s|0,48,0)}u=o[e>>2]|0;n=s+n|0;o[a>>2]=n;n=Ht(u,n<<3)|0;o[e>>2]=n;if((n|0)==0?(o[(je()|0)>>2]|0)==12:0){u=Te(1)|0;Xe(u|0,48,0)}}else n=o[e>>2]|0;u=o[t>>2]|0;o[t>>2]=u+1;t=n+(u<<3)|0;if(!t){c=i;return}a=r;s=o[a+4>>2]|0;u=t;o[u>>2]=o[a>>2];o[u+4>>2]=s;c=i;return}function ci(e){e=e|0;var r=0,i=0,t=0,n=0,a=0,s=0,u=0,f=0,h=0,_=0,d=0,m=0,g=0.0,p=0.0,v=0;r=c;i=o[e>>2]|0;n=o[i>>2]|0;u=e+4|0;d=o[i+((o[u>>2]|0)+-1<<2)>>2]|0;o[i>>2]=d;t=o[e+12>>2]|0;o[t+(d<<2)>>2]=0;o[t+(n<<2)>>2]=-1;d=(o[u>>2]|0)+-1|0;o[u>>2]=d;if((d|0)<=1){c=r;return n|0}a=o[i>>2]|0;f=e+28|0;e=0;h=1;while(1){_=(e<<1)+2|0;if((_|0)<(d|0)){m=o[i+(_<<2)>>2]|0;v=o[i+(h<<2)>>2]|0;d=o[o[f>>2]>>2]|0;g=+l[d+(m<<3)>>3];p=+l[d+(v<<3)>>3];if(!(g>p)){m=v;g=p;s=6}}else{d=o[o[f>>2]>>2]|0;s=o[i+(h<<2)>>2]|0;m=s;g=+l[d+(s<<3)>>3];s=6}if((s|0)==6){s=0;_=h}if(!(g>+l[d+(a<<3)>>3]))break;o[i+(e<<2)>>2]=m;o[t+(m<<2)>>2]=e;h=_<<1|1;d=o[u>>2]|0;if((h|0)>=(d|0)){e=_;break}else e=_}o[i+(e<<2)>>2]=a;o[t+(a<<2)>>2]=e;c=r;return n|0}function hi(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,a=0,s=0,u=0,f=0,l=0,h=0;n=c;f=o[r>>2]|0;r=f+1|0;a=e+4|0;if((o[a>>2]|0)>=(r|0)){c=n;return}u=e+8|0;s=o[u>>2]|0;if((s|0)<(r|0)){l=f+2-s&-2;f=(s>>1)+2&-2;f=(l|0)>(f|0)?l:f;if((f|0)>(2147483647-s|0)){l=Te(1)|0;Xe(l|0,48,0)}h=o[e>>2]|0;l=f+s|0;o[u>>2]=l;l=Ht(h,l)|0;o[e>>2]=l;if((l|0)==0?(o[(je()|0)>>2]|0)==12:0){h=Te(1)|0;Xe(h|0,48,0)}}s=o[a>>2]|0;if((s|0)<(r|0))do{t[(o[e>>2]|0)+s>>0]=i;s=s+1|0}while((s|0)!=(r|0));o[a>>2]=r;c=n;return}function _i(e,r,i){e=e|0;r=r|0;i=i|0;var t=0,n=0,a=0,s=0,u=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0;t=c;c=c+16|0;a=t+8|0;n=t+4|0;s=t;if((r|0)<16){n=r+-1|0;if((n|0)<=0){c=t;return}a=o[i>>2]|0;i=0;do{s=i;i=i+1|0;if((i|0)<(r|0)){u=o[a>>2]|0;h=s;l=i;do{_=u+(o[e+(l<<2)>>2]<<2)|0;y=o[_>>2]|0;g=y>>>5;if(y>>>0>95){d=u+(o[e+(h<<2)>>2]<<2)|0;m=(o[d>>2]|0)>>>5;if((m|0)==2)h=l;else h=+f[_+(g<<2)+4>>2]<+f[d+(m<<2)+4>>2]?l:h}l=l+1|0}while((l|0)!=(r|0))}else h=s;v=e+(s<<2)|0;b=o[v>>2]|0;y=e+(h<<2)|0;o[v>>2]=o[y>>2];o[y>>2]=b}while((i|0)!=(n|0));c=t;return}u=o[e+(((r|0)/2|0)<<2)>>2]|0;g=-1;d=r;while(1){b=g+1|0;m=e+(b<<2)|0;y=o[m>>2]|0;l=o[i>>2]|0;h=o[l>>2]|0;v=h+(y<<2)|0;p=o[v>>2]|0;g=h+(u<<2)|0;_=o[g>>2]|0;e:do{if(p>>>0>95)while(1){w=_>>>5;if((w|0)!=2?!(+f[v+(p>>>5<<2)+4>>2]<+f[g+(w<<2)+4>>2]):0){g=b;break e}b=b+1|0;m=e+(b<<2)|0;y=o[m>>2]|0;v=h+(y<<2)|0;p=o[v>>2]|0;if(p>>>0<=95){g=b;break}}else g=b}while(0);d=d+-1|0;v=e+(d<<2)|0;p=h+(u<<2)|0;e:do{if(_>>>0>95)while(1){b=h+(o[v>>2]<<2)|0;w=(o[b>>2]|0)>>>5;if((w|0)!=2?!(+f[p+(_>>>5<<2)+4>>2]<+f[b+(w<<2)+4>>2]):0)break e;w=d+-1|0;v=e+(w<<2)|0;d=w}}while(0);if((g|0)>=(d|0))break;o[m>>2]=o[v>>2];o[v>>2]=y}o[n>>2]=l;o[a+0>>2]=o[n+0>>2];_i(e,g,a);w=r-g|0;o[s>>2]=l;o[a+0>>2]=o[s+0>>2];_i(m,w,a);c=t;return}function di(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0,h=0,_=0,d=0,m=0,g=0.0,p=0.0,v=0;t=c;n=e+4|0;s=o[n>>2]|0;a=o[e>>2]|0;if((s|0)>0){f=o[e+12>>2]|0;u=0;do{o[f+(o[a+(u<<2)>>2]<<2)>>2]=-1;u=u+1|0;s=o[n>>2]|0}while((u|0)<(s|0))}if(a){o[n>>2]=0;s=0}a=r+4|0;if((o[a>>2]|0)>0){u=e+12|0;s=0;do{v=(o[r>>2]|0)+(s<<2)|0;o[(o[u>>2]|0)+(o[v>>2]<<2)>>2]=s;si(e,v);s=s+1|0}while((s|0)<(o[a>>2]|0));s=o[n>>2]|0}if((s|0)<=1){c=t;return}a=o[e>>2]|0;r=e+28|0;e=e+12|0;d=s;u=(s|0)/2|0;while(1){u=u+-1|0;s=o[a+(u<<2)>>2]|0;h=u<<1|1;e:do{if((h|0)<(d|0)){f=u;while(1){_=(f<<1)+2|0;if((_|0)<(d|0)){m=o[a+(_<<2)>>2]|0;v=o[a+(h<<2)>>2]|0;d=o[o[r>>2]>>2]|0;g=+l[d+(m<<3)>>3];p=+l[d+(v<<3)>>3];if(!(g>p)){m=v;g=p;i=16}}else{d=o[o[r>>2]>>2]|0;i=o[a+(h<<2)>>2]|0;m=i;g=+l[d+(i<<3)>>3];i=16}if((i|0)==16){i=0;_=h}if(!(g>+l[d+(s<<3)>>3]))break e;o[a+(f<<2)>>2]=m;o[(o[e>>2]|0)+(m<<2)>>2]=f;h=_<<1|1;d=o[n>>2]|0;if((h|0)>=(d|0)){f=_;break}else f=_}}else f=u}while(0);o[a+(f<<2)>>2]=s;o[(o[e>>2]|0)+(s<<2)>>2]=f;if((u|0)<=0)break;d=o[n>>2]|0}c=t;return}function mi(e){e=e|0;var r=0,i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0;i=c;r=e+36|0;l=o[r>>2]|0;n=e+32|0;_=o[n>>2]|0;if((l|0)>0){s=e+16|0;a=e+44|0;u=0;do{f=_+(u<<2)|0;h=o[f>>2]|0;if(t[(o[s>>2]|0)+h>>0]|0){_=o[e>>2]|0;l=_+(h*12|0)+4|0;m=o[l>>2]|0;if((m|0)>0){h=_+(h*12|0)|0;_=0;d=0;do{g=o[h>>2]|0;p=g+(_<<3)|0;if((o[(o[o[a>>2]>>2]|0)+(o[p>>2]<<2)>>2]&3|0)!=1){v=p;p=o[v+4>>2]|0;m=g+(d<<3)|0;o[m>>2]=o[v>>2];o[m+4>>2]=p;m=o[l>>2]|0;d=d+1|0}_=_+1|0}while((_|0)<(m|0))}else{_=0;d=0}h=_-d|0;if((h|0)>0)o[l>>2]=m-h;t[(o[s>>2]|0)+(o[f>>2]|0)>>0]=0;l=o[r>>2]|0;_=o[n>>2]|0}u=u+1|0}while((u|0)<(l|0))}if(!_){c=i;return}o[r>>2]=0;c=i;return}function gi(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,s=0,u=0;t=c;s=o[r>>2]|0;n=s>>>2&1|(a[e+16>>0]|0);s=((n+(s>>>5)<<2)+4|0)>>>2;u=e+4|0;ei(e,s+(o[u>>2]|0)|0);i=o[u>>2]|0;s=s+i|0;o[u>>2]=s;if(s>>>0<i>>>0)Xe(Te(1)|0,48,0);e=(o[e>>2]|0)+(i<<2)|0;if(!e){c=t;return i|0}n=o[r>>2]&-9|n<<3;o[e>>2]=n;if((o[r>>2]|0)>>>0>31){n=0;do{o[e+(n<<2)+4>>2]=o[r+(n<<2)+4>>2];n=n+1|0}while((n|0)<((o[r>>2]|0)>>>5|0));n=o[e>>2]|0}if(!(n&8)){c=t;return i|0}s=n>>>5;r=r+(s<<2)+4|0;if(!(n&4)){o[e+(s<<2)+4>>2]=o[r>>2];c=t;return i|0}else{f[e+(s<<2)+4>>2]=+f[r>>2];c=t;return i|0}return 0}function pi(e){e=e|0;var r=0,i=0,n=0,a=0,s=0,u=0;r=c;c=c+16|0;a=r;Mr(e);o[e>>2]=3424;o[e+684>>2]=o[719];o[e+688>>2]=o[747];o[e+692>>2]=o[785];l[e+696>>3]=+l[411];t[e+704>>0]=t[2652]|0;t[e+705>>0]=t[2724]|0;t[e+706>>0]=t[2804]|0;t[e+707>>0]=1;o[e+708>>2]=0;o[e+712>>2]=0;o[e+716>>2]=0;o[e+720>>2]=1;t[e+724>>0]=1;i=e+732|0;u=e+544|0;o[e+760>>2]=0;o[e+764>>2]=0;o[e+768>>2]=0;o[e+776>>2]=0;o[e+780>>2]=0;o[e+784>>2]=0;o[e+792>>2]=0;o[e+796>>2]=0;o[e+800>>2]=0;s=e+804|0;o[i+0>>2]=0;o[i+4>>2]=0;o[i+8>>2]=0;o[i+12>>2]=0;o[i+16>>2]=0;o[i+20>>2]=0;o[s>>2]=u;s=e+808|0;o[s>>2]=0;o[e+812>>2]=0;o[e+816>>2]=0;i=e+824|0;o[i+0>>2]=0;o[i+4>>2]=0;o[i+8>>2]=0;o[i+12>>2]=0;o[i+16>>2]=0;o[i+20>>2]=0;o[e+852>>2]=s;xi(e+856|0,1);s=e+868|0;i=e+892|0;o[e+920>>2]=0;o[e+924>>2]=0;o[s+0>>2]=0;o[s+4>>2]=0;o[s+8>>2]=0;o[s+12>>2]=0;o[s+16>>2]=0;o[i+0>>2]=0;o[i+4>>2]=0;o[i+8>>2]=0;o[i+12>>2]=0;o[i+16>>2]=0;o[i+20>>2]=0;i=a+4|0;o[i>>2]=0;s=a+8|0;o[s>>2]=2;n=Ht(0,8)|0;o[a>>2]=n;if((n|0)==0?(o[(je()|0)>>2]|0)==12:0)Xe(Te(1)|0,48,0);o[n>>2]=-2;o[i>>2]=1;t[e+560>>0]=1;o[e+928>>2]=fi(u,a,0)|0;t[e+536>>0]=0;if(!n){c=r;return}o[i>>2]=0;Ut(n);o[a>>2]=0;o[s>>2]=0;c=r;return}function vi(e){e=e|0;var r=0;r=c;bi(e);ft(e);c=r;return}function bi(e){e=e|0;var r=0,i=0,t=0;r=c;o[e>>2]=3424;i=e+904|0;t=o[i>>2]|0;if(t){o[e+908>>2]=0;Ut(t);o[i>>2]=0;o[e+912>>2]=0}i=e+892|0;t=o[i>>2]|0;if(t){o[e+896>>2]=0;Ut(t);o[i>>2]=0;o[e+900>>2]=0}i=e+876|0;t=o[i>>2]|0;if(t){o[e+880>>2]=0;Ut(t);o[i>>2]=0;o[e+884>>2]=0}i=e+856|0;t=o[i>>2]|0;if(t){o[e+860>>2]=0;Ut(t);o[i>>2]=0;o[e+864>>2]=0}t=e+836|0;i=o[t>>2]|0;if(i){o[e+840>>2]=0;Ut(i);o[t>>2]=0;o[e+844>>2]=0}i=e+824|0;t=o[i>>2]|0;if(t){o[e+828>>2]=0;Ut(t);o[i>>2]=0;o[e+832>>2]=0}i=e+808|0;t=o[i>>2]|0;if(t){o[e+812>>2]=0;Ut(t);o[i>>2]=0;o[e+816>>2]=0}Di(e+760|0);i=e+744|0;t=o[i>>2]|0;if(t){o[e+748>>2]=0;Ut(t);o[i>>2]=0;o[e+752>>2]=0}i=e+732|0;t=o[i>>2]|0;if(!t){kr(e);c=r;return}o[e+736>>2]=0;Ut(t);o[i>>2]=0;o[e+740>>2]=0;kr(e);c=r;return}function yi(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,a=0,s=0,u=0,f=0,l=0;n=c;c=c+32|0;s=n+12|0;f=n+8|0;l=n+16|0;a=n+4|0;u=n;t[l>>0]=t[r>>0]|0;t[s+0>>0]=t[l+0>>0]|0;i=Or(e,s,i)|0;o[f>>2]=i;ni(e+876|0,i,0);ni(e+904|0,i,0);if(!(t[e+724>>0]|0)){c=n;return i|0}l=e+808|0;r=i<<1;o[a>>2]=r;o[s+0>>2]=o[a+0>>2];Bi(l,s,0);o[u>>2]=r|1;o[s+0>>2]=o[u+0>>2];Bi(l,s,0);Ui(e+760|0,f);ni(e+744|0,i,0);Hi(e+824|0,i);c=n;return i|0}function wi(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0,E=0;f=c;c=c+32|0;s=f+4|0;p=f;m=f+16|0;o[s>>2]=0;u=s+4|0;o[u>>2]=0;l=s+8|0;o[l>>2]=0;v=t[2608]|0;t[e>>0]=v;h=r+724|0;i=(a[h>>0]&(i&1)|0)!=0;if(i){y=r+308|0;E=o[y>>2]|0;if((E|0)>0){b=r+304|0;v=r+876|0;w=0;do{A=o[(o[b>>2]|0)+(w<<2)>>2]>>1;o[p>>2]=A;A=(o[v>>2]|0)+A|0;if(!(t[A>>0]|0)){t[A>>0]=1;si(s,p);E=o[y>>2]|0}w=w+1|0}while((w|0)<(E|0))}p=(Ai(r,n)|0)&1^1;t[e>>0]=p;n=t[2608]|0}else{n=v;p=v}E=n&255;if(!((E>>>1^1)&p<<24>>24==n<<24>>24|E&2&(p&255))){if((o[r+44>>2]|0)>0)Ue(3760)|0}else{Kr(m,r);p=t[m>>0]|0;t[e>>0]=p}A=t[2608]|0;E=A&255;if((((E>>>1^1)&p<<24>>24==A<<24>>24|E&2&(p&255)|0)!=0?(t[r+707>>0]|0)!=0:0)?(g=(o[r+736>>2]|0)+-1|0,(g|0)>0):0){e=r+732|0;m=r+4|0;do{n=o[e>>2]|0;y=o[n+(g<<2)>>2]|0;w=g+-1|0;A=o[n+(w<<2)>>2]|0;g=o[m>>2]|0;e:do{if((y|0)>1){v=t[2616]|0;p=v&255;b=p&2;p=p>>>1^1;E=w;while(1){A=a[g+(A>>1)>>0]^A&1;w=y+-1|0;if(!((A&255)<<24>>24==v<<24>>24&p|b&A))break e;y=E+-1|0;A=o[n+(y<<2)>>2]|0;if((w|0)>1){E=y;y=w}else{E=y;y=w;d=20;break}}}else{E=w;d=20}}while(0);if((d|0)==20){d=0;t[g+(A>>1)>>0]=(A&1^1)&255^1}g=E-y|0}while((g|0)>0)}if(i?(_=o[u>>2]|0,(_|0)>0):0){d=o[s>>2]|0;i=r+876|0;m=0;do{e=o[d+(m<<2)>>2]|0;t[(o[i>>2]|0)+e>>0]=0;if(t[h>>0]|0)Vi(r,e);m=m+1|0}while((m|0)<(_|0))}r=o[s>>2]|0;if(!r){c=f;return}o[u>>2]=0;Ut(r);o[s>>2]=0;o[l>>2]=0;c=f;return}function Ai(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,h=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0,E=0,T=0,L=0,M=0,S=0,k=0,O=0,N=0,C=0,R=0,P=0,I=0,F=0;f=c;c=c+16|0;s=f;if(!(qr(e)|0)){P=0;c=f;return P|0}u=e+724|0;if(!(t[u>>0]|0)){P=1;c=f;return P|0}E=e+924|0;w=e+872|0;A=e+868|0;y=e+860|0;p=e+680|0;T=e+824|0;a=e+828|0;d=e+836|0;L=e+904|0;M=e+332|0;i=e+44|0;S=e+704|0;O=e+706|0;N=e+696|0;m=e+556|0;g=e+548|0;k=e+876|0;v=e+920|0;b=e+284|0;e:while(1){if(((o[E>>2]|0)<=0?(o[v>>2]|0)>=(o[b>>2]|0):0)?(o[a>>2]|0)<=0:0)break;ki(e);R=o[w>>2]|0;P=o[A>>2]|0;C=R-P|0;if((R|0)<(P|0))C=(o[y>>2]|0)+C|0;if(!((C|0)<=0?(o[v>>2]|0)>=(o[b>>2]|0):0))h=11;if((h|0)==11?(h=0,!(Oi(e,1)|0)):0){h=12;break}P=o[a>>2]|0;if(t[p>>0]|0){h=15;break}if(!P)continue;else C=0;while(1){F=o[T>>2]|0;R=o[F>>2]|0;I=o[F+(P+-1<<2)>>2]|0;o[F>>2]=I;P=o[d>>2]|0;o[P+(I<<2)>>2]=0;o[P+(R<<2)>>2]=-1;P=(o[a>>2]|0)+-1|0;o[a>>2]=P;if((P|0)>1)$i(T,0);if(t[p>>0]|0)continue e;if((t[(o[L>>2]|0)+R>>0]|0)==0?(I=t[(o[M>>2]|0)+R>>0]|0,P=t[2624]|0,F=P&255,((F>>>1^1)&I<<24>>24==P<<24>>24|I&2&F|0)!=0):0){if((o[i>>2]|0)>1&((C|0)%100|0|0)==0){o[s>>2]=o[a>>2];He(3504,s|0)|0}if(t[S>>0]|0){F=(o[k>>2]|0)+R|0;P=t[F>>0]|0;t[F>>0]=1;if(!(Ci(e,R)|0)){h=29;break e}t[(o[k>>2]|0)+R>>0]=P<<24>>24!=0&1}if((((t[O>>0]|0)!=0?(I=t[(o[M>>2]|0)+R>>0]|0,P=t[2624]|0,F=P&255,((F>>>1^1)&I<<24>>24==P<<24>>24|I&2&F|0)!=0):0)?(t[(o[k>>2]|0)+R>>0]|0)==0:0)?!(Ri(e,R)|0):0){h=35;break e}if(+((o[m>>2]|0)>>>0)>+l[N>>3]*+((o[g>>2]|0)>>>0))$n[o[(o[e>>2]|0)+8>>2]&31](e)}P=o[a>>2]|0;if(!P)continue e;else C=C+1|0}}do{if((h|0)==12)t[e+492>>0]=0;else if((h|0)==15){p=o[e+824>>2]|0;if((P|0)<=0){if(!p)break}else{b=o[d>>2]|0;v=0;do{o[b+(o[p+(v<<2)>>2]<<2)>>2]=-1;v=v+1|0}while((v|0)<(o[a>>2]|0))}o[a>>2]=0}else if((h|0)==29)t[e+492>>0]=0;else if((h|0)==35)t[e+492>>0]=0}while(0);if(!r){if(+((o[m>>2]|0)>>>0)>+l[e+96>>3]*+((o[g>>2]|0)>>>0))$n[o[(o[e>>2]|0)+8>>2]&31](e)}else{r=e+744|0;m=o[r>>2]|0;if(m){o[e+748>>2]=0;Ut(m);o[r>>2]=0;o[e+752>>2]=0}ji(e+760|0,1);r=e+808|0;m=o[r>>2]|0;if(m){o[e+812>>2]=0;Ut(m);o[r>>2]=0;o[e+816>>2]=0}m=e+824|0;r=o[m>>2]|0;if((o[a>>2]|0)<=0){if(r)h=48}else{h=o[d>>2]|0;d=0;do{o[h+(o[r+(d<<2)>>2]<<2)>>2]=-1;d=d+1|0}while((d|0)<(o[a>>2]|0));h=48}if((h|0)==48){o[a>>2]=0;Ut(r);o[m>>2]=0;o[e+832>>2]=0}Wi(e+856|0,1);t[u>>0]=0;t[e+536>>0]=1;t[e+560>>0]=0;o[e+728>>2]=o[e+540>>2];Wr(e);$n[o[(o[e>>2]|0)+8>>2]&31](e)}if((o[i>>2]|0)>0?(n=o[e+736>>2]|0,(n|0)>0):0){l[_>>3]=+(n<<2>>>0)*9.5367431640625e-7;o[s>>2]=o[_>>2];o[s+4>>2]=o[_+4>>2];He(3528,s|0)|0}F=(t[e+492>>0]|0)!=0;c=f;return F|0}function Ei(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0;i=c;c=c+16|0;a=i;u=e+256|0;f=e+260|0;s=o[f>>2]|0;if((t[e+705>>0]|0)!=0?Ti(e,r)|0:0){m=1;c=i;return m|0}if(!(Nr(e,r)|0)){m=0;c=i;return m|0}if(!(t[e+724>>0]|0)){m=1;c=i;return m|0}r=o[f>>2]|0;if((r|0)!=(s+1|0)){m=1;c=i;return m|0}m=o[(o[u>>2]|0)+(r+-1<<2)>>2]|0;o[a>>2]=m;h=(o[e+544>>2]|0)+(m<<2)|0;qi(e+856|0,m);if((o[h>>2]|0)>>>0<=31){m=1;c=i;return m|0}l=e+760|0;f=e+808|0;u=e+744|0;s=e+924|0;r=e+824|0;_=e+840|0;e=e+836|0;d=0;do{m=h+(d<<2)+4|0;zi((o[l>>2]|0)+((o[m>>2]>>1)*12|0)|0,a);g=(o[f>>2]|0)+(o[m>>2]<<2)|0;o[g>>2]=(o[g>>2]|0)+1;t[(o[u>>2]|0)+(o[m>>2]>>1)>>0]=1;o[s>>2]=(o[s>>2]|0)+1;m=o[m>>2]>>1;if((o[_>>2]|0)>(m|0)?(n=o[(o[e>>2]|0)+(m<<2)>>2]|0,(n|0)>-1):0)$i(r,n);d=d+1|0}while((d|0)<((o[h>>2]|0)>>>5|0));n=1;c=i;return n|0}function Ti(e,r){e=e|0;r=r|0;var i=0,n=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0;f=c;c=c+16|0;s=f+8|0;u=f+4|0;n=f;o[u>>2]=o[e+284>>2];si(e+292|0,u);u=r+4|0;h=o[u>>2]|0;e:do{if((h|0)>0){i=e+332|0;l=0;while(1){_=o[(o[r>>2]|0)+(l<<2)>>2]|0;m=a[(o[i>>2]|0)+(_>>1)>>0]|0;g=m^_&1;d=g&255;v=t[2608]|0;p=v&255;if(d<<24>>24==v<<24>>24&(p>>>1^1)|p&2&g)break;p=t[2616]|0;v=p&255;if(!((v>>>1^1)&d<<24>>24==p<<24>>24|m&2&v)){o[n>>2]=_^1;o[s+0>>2]=o[n+0>>2];Cr(e,s,-1);h=o[u>>2]|0}l=l+1|0;if((l|0)>=(h|0))break e}Dr(e,0);v=1;c=f;return v|0}}while(0);v=(Rr(e)|0)!=-1;Dr(e,0);c=f;return v|0}function Li(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0;i=c;c=c+16|0;a=i;n=(o[e+544>>2]|0)+(r<<2)|0;if(!(t[e+724>>0]|0)){Fr(e,r);c=i;return}if((o[n>>2]|0)>>>0<=31){Fr(e,r);c=i;return}u=e+808|0;f=e+776|0;s=e+792|0;l=0;do{h=n+(l<<2)+4|0;_=(o[u>>2]|0)+(o[h>>2]<<2)|0;o[_>>2]=(o[_>>2]|0)+-1;Vi(e,o[h>>2]>>1);h=o[h>>2]>>1;o[a>>2]=h;h=(o[f>>2]|0)+h|0;if(!(t[h>>0]|0)){t[h>>0]=1;si(s,a)}l=l+1|0}while((l|0)<((o[n>>2]|0)>>>5|0));Fr(e,r);c=i;return}function Mi(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0;n=c;c=c+16|0;u=n+4|0;s=n;l=o[e+544>>2]|0;f=l+(r<<2)|0;qi(e+856|0,r);if((o[f>>2]&-32|0)==64){Li(e,r);m=o[i>>2]|0;i=o[f>>2]|0;e:do{if(i>>>0>31){h=i>>>5;_=0;while(1){d=_+1|0;if((o[f+(_<<2)+4>>2]|0)==(m|0)){d=_;break e}if((d|0)<(h|0))_=d;else break}}else{h=0;d=0}}while(0);_=h+-1|0;if((d|0)<(_|0))do{i=d;d=d+1|0;o[f+(i<<2)+4>>2]=o[f+(d<<2)+4>>2];i=o[f>>2]|0;h=i>>>5;_=h+-1|0}while((d|0)<(_|0));if(i&8){o[f+(_<<2)+4>>2]=o[f+(h<<2)+4>>2];i=o[f>>2]|0}h=i+-32|0;o[f>>2]=h;h=h>>>5;if(!h){h=0;i=0}else{i=0;_=0;do{i=1<<((o[f+(_<<2)+4>>2]|0)>>>1&31)|i;_=_+1|0}while((_|0)<(h|0))}o[f+(h<<2)+4>>2]=i}else{Ir(e,r,1);i=o[i>>2]|0;_=o[f>>2]|0;e:do{if(_>>>0>31){h=_>>>5;d=0;while(1){m=d+1|0;if((o[f+(d<<2)+4>>2]|0)==(i|0)){m=d;break e}if((m|0)<(h|0))d=m;else break}}else{h=0;m=0}}while(0);d=h+-1|0;if((m|0)<(d|0))do{_=m;m=m+1|0;o[f+(_<<2)+4>>2]=o[f+(m<<2)+4>>2];_=o[f>>2]|0;h=_>>>5;d=h+-1|0}while((m|0)<(d|0));if(_&8){o[f+(d<<2)+4>>2]=o[f+(h<<2)+4>>2];_=o[f>>2]|0}d=_+-32|0;o[f>>2]=d;d=d>>>5;if(!d){d=0;h=0}else{h=0;_=0;do{h=1<<((o[f+(_<<2)+4>>2]|0)>>>1&31)|h;_=_+1|0}while((_|0)<(d|0))}o[f+(d<<2)+4>>2]=h;Pr(e,r);h=i>>1;_=o[e+760>>2]|0;d=_+(h*12|0)|0;_=_+(h*12|0)+4|0;m=o[_>>2]|0;e:do{if((m|0)>0){v=o[d>>2]|0;g=0;while(1){p=g+1|0;if((o[v+(g<<2)>>2]|0)==(r|0))break e;if((p|0)<(m|0))g=p;else{g=p;break}}}else g=0}while(0);m=m+-1|0;if((g|0)<(m|0)){d=o[d>>2]|0;do{m=g;g=g+1|0;o[d+(m<<2)>>2]=o[d+(g<<2)>>2];m=(o[_>>2]|0)+-1|0}while((g|0)<(m|0))}o[_>>2]=m;v=(o[e+808>>2]|0)+(i<<2)|0;o[v>>2]=(o[v>>2]|0)+-1;Vi(e,h)}if((o[f>>2]&-32|0)!=32){v=1;c=n;return v|0}l=o[l+(r+1<<2)>>2]|0;f=a[(o[e+332>>2]|0)+(l>>1)>>0]|0;v=f^l&1;r=v&255;g=t[2624]|0;p=g&255;if(!(r<<24>>24==g<<24>>24&(p>>>1^1)|p&2&v)){p=t[2616]|0;v=p&255;if((v>>>1^1)&r<<24>>24==p<<24>>24|f&2&v){v=0;c=n;return v|0}}else{o[s>>2]=l;o[u+0>>2]=o[s+0>>2];Cr(e,u,-1)}v=(Rr(e)|0)==-1;c=n;return v|0}function Si(e,r,i,t,n){e=e|0;r=r|0;i=i|0;t=t|0;n=n|0;var a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0;a=c;c=c+16|0;u=a+4|0;s=a;d=e+708|0;o[d>>2]=(o[d>>2]|0)+1;if(o[n>>2]|0)o[n+4>>2]=0;f=(o[r>>2]|0)>>>5>>>0<(o[i>>2]|0)>>>5>>>0;e=f?i:r;r=f?r:i;f=o[r>>2]|0;e:do{if(f>>>0>31){i=0;r:while(1){l=o[r+(i<<2)+4>>2]|0;i:do{if((l>>1|0)!=(t|0)){h=o[e>>2]|0;t:do{if(h>>>0>31){_=0;while(1){d=o[e+(_<<2)+4>>2]|0;_=_+1|0;if((l^d)>>>0<2)break;if((_|0)>=(h>>>5|0))break t}if((d|0)==(l^1|0)){n=0;break r}else break i}}while(0);o[u>>2]=l;ai(n,u);f=o[r>>2]|0}}while(0);i=i+1|0;if((i|0)>=(f>>>5|0))break e}c=a;return n|0}}while(0);i=o[e>>2]|0;if(i>>>0<=31){d=1;c=a;return d|0}u=0;do{r=o[e+(u<<2)+4>>2]|0;if((r>>1|0)!=(t|0)){o[s>>2]=r;ai(n,s);i=o[e>>2]|0}u=u+1|0}while((u|0)<(i>>>5|0));n=1;c=a;return n|0}function ki(e){e=e|0;var r=0,i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0;r=c;f=e+924|0;if(!(o[f>>2]|0)){c=r;return}s=e+856|0;i=e+872|0;n=e+868|0;u=e+860|0;a=e+544|0;l=0;while(1){A=o[i>>2]|0;h=o[n>>2]|0;_=A-h|0;if((A|0)<(h|0))_=(o[u>>2]|0)+_|0;if((l|0)>=(_|0))break;_=(o[a>>2]|0)+(o[(o[s>>2]|0)+(((h+l|0)%(o[u>>2]|0)|0)<<2)>>2]<<2)|0;h=o[_>>2]|0;if(!(h&3))o[_>>2]=h&-4|2;l=l+1|0}l=e+540|0;g=o[l>>2]|0;if((g|0)>0){_=e+744|0;d=e+776|0;h=e+760|0;e=e+804|0;m=0;do{if(t[(o[_>>2]|0)+m>>0]|0){p=(o[d>>2]|0)+m|0;if(t[p>>0]|0){v=o[h>>2]|0;g=v+(m*12|0)+4|0;y=o[g>>2]|0;if((y|0)>0){v=o[v+(m*12|0)>>2]|0;w=0;b=0;do{A=o[v+(w<<2)>>2]|0;if((o[(o[o[e>>2]>>2]|0)+(A<<2)>>2]&3|0)!=1){o[v+(b<<2)>>2]=A;y=o[g>>2]|0;b=b+1|0}w=w+1|0}while((w|0)<(y|0))}else{w=0;b=0}v=w-b|0;if((v|0)>0)o[g>>2]=y-v;t[p>>0]=0}p=o[h>>2]|0;g=p+(m*12|0)+4|0;b=o[g>>2]|0;if((b|0)>0){p=p+(m*12|0)|0;v=0;do{y=o[(o[p>>2]|0)+(v<<2)>>2]|0;if(!(o[(o[a>>2]|0)+(y<<2)>>2]&3)){qi(s,y);b=(o[a>>2]|0)+(o[(o[p>>2]|0)+(v<<2)>>2]<<2)|0;o[b>>2]=o[b>>2]&-4|2;b=o[g>>2]|0}v=v+1|0}while((v|0)<(b|0))}t[(o[_>>2]|0)+m>>0]=0;g=o[l>>2]|0}m=m+1|0}while((m|0)<(g|0));l=0}else l=0;while(1){A=o[i>>2]|0;h=o[n>>2]|0;_=A-h|0;if((A|0)<(h|0))_=(o[u>>2]|0)+_|0;if((l|0)>=(_|0))break;h=(o[a>>2]|0)+(o[(o[s>>2]|0)+(((h+l|0)%(o[u>>2]|0)|0)<<2)>>2]<<2)|0;_=o[h>>2]|0;if((_&3|0)==2)o[h>>2]=_&-4;l=l+1|0}o[f>>2]=0;c=r;return}function Oi(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0,E=0,T=0,L=0,M=0,S=0,k=0,O=0,N=0,C=0,R=0,P=0,I=0,F=0,x=0,D=0,B=0,U=0,H=0,V=0;i=c;c=c+16|0;h=i;E=i+12|0;a=e+856|0;l=e+872|0;g=e+868|0;u=e+860|0;y=e+680|0;n=e+920|0;s=e+284|0;b=e+280|0;p=e+544|0;v=e+928|0;d=e+44|0;_=e+776|0;w=e+692|0;m=e+804|0;f=e+760|0;k=0;C=0;O=0;e:while(1){N=o[g>>2]|0;do{M=o[l>>2]|0;S=(M|0)<(N|0);M=M-N|0;if(S)R=(o[u>>2]|0)+M|0;else R=M;if((R|0)<=0?(o[n>>2]|0)>=(o[s>>2]|0):0){n=1;u=53;break e}if(t[y>>0]|0){u=8;break e}if(S)M=(o[u>>2]|0)+M|0;if((M|0)==0?(L=o[n>>2]|0,(L|0)<(o[s>>2]|0)):0){o[n>>2]=L+1;o[(o[p>>2]|0)+((o[v>>2]|0)+1<<2)>>2]=o[(o[b>>2]|0)+(L<<2)>>2];M=(o[p>>2]|0)+(o[v>>2]<<2)|0;S=(o[M>>2]|0)>>>5;if(!S){S=0;R=0}else{R=0;N=0;do{R=1<<((o[M+(N<<2)+4>>2]|0)>>>1&31)|R;N=N+1|0}while((N|0)<(S|0))}o[M+(S<<2)+4>>2]=R;qi(a,o[v>>2]|0);N=o[g>>2]|0}M=o[(o[a>>2]|0)+(N<<2)>>2]|0;N=N+1|0;F=o[u>>2]|0;N=(N|0)==(F|0)?0:N;o[g>>2]=N;R=o[p>>2]|0;S=R+(M<<2)|0;I=o[S>>2]|0}while((I&3|0)!=0);if(r?(o[d>>2]|0)>1:0){P=k+1|0;if(!((k|0)%1e3|0)){I=o[l>>2]|0;o[h>>2]=I-N+((I|0)<(N|0)?F:0);o[h+4>>2]=O;o[h+8>>2]=C;He(3440,h|0)|0;I=o[S>>2]|0;k=P}else k=P}N=R+(M+1<<2)|0;R=o[N>>2]>>1;if(I>>>0>63){P=o[f>>2]|0;I=I>>>5;F=1;do{V=o[S+(F<<2)+4>>2]>>1;R=(o[P+(V*12|0)+4>>2]|0)<(o[P+(R*12|0)+4>>2]|0)?V:R;F=F+1|0}while((F|0)<(I|0))}I=(o[_>>2]|0)+R|0;if(t[I>>0]|0){F=o[f>>2]|0;P=F+(R*12|0)+4|0;B=o[P>>2]|0;if((B|0)>0){F=o[F+(R*12|0)>>2]|0;D=0;x=0;do{U=o[F+(D<<2)>>2]|0;if((o[(o[o[m>>2]>>2]|0)+(U<<2)>>2]&3|0)!=1){o[F+(x<<2)>>2]=U;B=o[P>>2]|0;x=x+1|0}D=D+1|0}while((D|0)<(B|0))}else{D=0;x=0}F=D-x|0;if((F|0)>0)o[P>>2]=B-F;t[I>>0]=0}I=o[f>>2]|0;P=o[I+(R*12|0)>>2]|0;I=I+(R*12|0)+4|0;if((o[I>>2]|0)>0)F=0;else continue;while(1){U=o[S>>2]|0;if(U&3)continue e;x=o[P+(F<<2)>>2]|0;D=o[p>>2]|0;H=D+(x<<2)|0;B=o[H>>2]|0;r:do{if(((!((B&3|0)!=0|(x|0)==(M|0))?(V=o[w>>2]|0,T=B>>>5,(V|0)==-1|(T|0)<(V|0)):0)?(A=U>>>5,T>>>0>=A>>>0):0)?(o[S+(A<<2)+4>>2]&~o[H+(T<<2)+4>>2]|0)==0:0){D=D+(x+1<<2)|0;do{if(U>>>0>31){if(B>>>0>31){H=-2;B=0}else break r;while(1){U=o[N+(B<<2)>>2]|0;i:do{if((H|0)==-2){V=0;while(1){H=o[D+(V<<2)>>2]|0;if((U|0)==(H|0)){U=-2;break i}V=V+1|0;if((U|0)==(H^1|0))break i;if(V>>>0>=T>>>0)break r}}else{V=0;while(1){if((U|0)==(o[D+(V<<2)>>2]|0)){U=H;break i}V=V+1|0;if(V>>>0>=T>>>0)break r}}}while(0);B=B+1|0;if(B>>>0>=A>>>0)break;else H=U}if((U|0)==-2)break;else if((U|0)==-1)break r;o[E>>2]=U^1;o[h+0>>2]=o[E+0>>2];if(!(Mi(e,x,h)|0)){n=0;u=53;break e}C=C+1|0;F=(((U>>1|0)==(R|0))<<31>>31)+F|0;break r}}while(0);Li(e,x);O=O+1|0}}while(0);F=F+1|0;if((F|0)>=(o[I>>2]|0))continue e}}if((u|0)==8){Wi(a,0);o[n>>2]=o[s>>2];V=1;c=i;return V|0}else if((u|0)==53){c=i;return n|0}return 0}function Ni(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0;s=c;c=c+16|0;n=s+12|0;h=s+8|0;f=s+4|0;u=s;l=(o[e+544>>2]|0)+(i<<2)|0;if(o[l>>2]&3){p=1;c=s;return p|0}if(xr(e,l)|0){p=1;c=s;return p|0}o[h>>2]=o[e+284>>2];si(e+292|0,h);m=o[l>>2]|0;if(m>>>0>31){h=e+332|0;_=0;d=-2;do{g=o[l+(_<<2)+4>>2]|0;p=g>>1;if((p|0)!=(r|0)?(p=(a[(o[h>>2]|0)+p>>0]|0)^g&1,b=t[2616]|0,v=b&255,((p&255)<<24>>24==b<<24>>24&(v>>>1^1)|v&2&p|0)==0):0){o[f>>2]=g^1;o[n+0>>2]=o[f+0>>2];Cr(e,n,-1);m=o[l>>2]|0}else d=g;_=_+1|0}while((_|0)<(m>>>5|0))}else d=-2;b=(Rr(e)|0)==-1;Dr(e,0);if(!b){b=e+712|0;o[b>>2]=(o[b>>2]|0)+1;o[u>>2]=d;o[n+0>>2]=o[u+0>>2];if(!(Mi(e,i,n)|0)){b=0;c=s;return b|0}}b=1;c=s;return b|0}function Ci(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0;i=c;s=(o[e+776>>2]|0)+r|0;n=e+760|0;if(t[s>>0]|0){f=o[n>>2]|0;a=f+(r*12|0)+4|0;_=o[a>>2]|0;if((_|0)>0){u=e+804|0;f=o[f+(r*12|0)>>2]|0;h=0;l=0;do{d=o[f+(h<<2)>>2]|0;if((o[(o[o[u>>2]>>2]|0)+(d<<2)>>2]&3|0)!=1){o[f+(l<<2)>>2]=d;_=o[a>>2]|0;l=l+1|0}h=h+1|0}while((h|0)<(_|0))}else{h=0;l=0}u=h-l|0;if((u|0)>0)o[a>>2]=_-u;t[s>>0]=0}a=o[n>>2]|0;_=t[(o[e+332>>2]|0)+r>>0]|0;h=t[2624]|0;d=h&255;if(!((d>>>1^1)&_<<24>>24==h<<24>>24|_&2&d)){d=1;c=i;return d|0}n=a+(r*12|0)+4|0;s=o[n>>2]|0;if(!s){d=1;c=i;return d|0}e:do{if((s|0)>0){a=a+(r*12|0)|0;s=0;while(1){if(!(Ni(e,r,o[(o[a>>2]|0)+(s<<2)>>2]|0)|0)){e=0;break}s=s+1|0;if((s|0)>=(o[n>>2]|0))break e}c=i;return e|0}}while(0);d=Oi(e,0)|0;c=i;return d|0}function Ri(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0,E=0,T=0,L=0,M=0,S=0,k=0,O=0,N=0,C=0,R=0,P=0,F=0,x=0,D=0,B=0,U=0,H=0,V=0,$=0,j=0,W=0,q=0,z=0,K=0,X=0,Y=0,Z=0,G=0;i=c;c=c+48|0;v=i+36|0;p=i+32|0;b=i+28|0;y=i+24|0;n=i+12|0;a=i;_=(o[e+776>>2]|0)+r|0;h=e+760|0;if(t[_>>0]|0){g=o[h>>2]|0;d=g+(r*12|0)+4|0;T=o[d>>2]|0;if((T|0)>0){m=e+804|0;g=o[g+(r*12|0)>>2]|0;A=0;w=0;do{L=o[g+(A<<2)>>2]|0;if((o[(o[o[m>>2]>>2]|0)+(L<<2)>>2]&3|0)!=1){o[g+(w<<2)>>2]=L;T=o[d>>2]|0;w=w+1|0}A=A+1|0}while((A|0)<(T|0))}else{A=0;w=0}m=A-w|0;if((m|0)>0)o[d>>2]=T-m;t[_>>0]=0}w=o[h>>2]|0;A=w+(r*12|0)|0;o[n>>2]=0;_=n+4|0;o[_>>2]=0;d=n+8|0;o[d>>2]=0;o[a>>2]=0;g=a+4|0;o[g>>2]=0;m=a+8|0;o[m>>2]=0;w=w+(r*12|0)+4|0;e:do{if((o[w>>2]|0)>0){T=e+544|0;S=r<<1;M=0;do{k=(o[A>>2]|0)+(M<<2)|0;N=(o[T>>2]|0)+(o[k>>2]<<2)|0;G=o[N>>2]|0;L=G>>>5;r:do{if(G>>>0>31){C=0;while(1){O=C+1|0;if((o[N+(C<<2)+4>>2]|0)==(S|0)){O=C;break r}if((O|0)<(L|0))C=O;else break}}else O=0}while(0);zi((O|0)<(L|0)?n:a,k);M=M+1|0;L=o[w>>2]|0}while((M|0)<(L|0));T=o[_>>2]|0;S=(T|0)>0;if(S){k=o[g>>2]|0;x=(k|0)>0;F=e+544|0;O=o[n>>2]|0;M=o[a>>2]|0;N=e+708|0;P=e+684|0;R=e+688|0;V=0;C=0;while(1){if(x){B=O+(C<<2)|0;D=o[F>>2]|0;U=o[N>>2]|0;H=0;do{W=D+(o[B>>2]<<2)|0;z=D+(o[M+(H<<2)>>2]<<2)|0;U=U+1|0;o[N>>2]=U;$=(o[W>>2]|0)>>>5>>>0<(o[z>>2]|0)>>>5>>>0;j=$?z:W;z=$?W:z;W=j+4|0;$=z+4|0;j=o[j>>2]|0;q=j>>>5;X=q+-1|0;z=o[z>>2]|0;r:do{if(z>>>0>31){K=0;while(1){G=o[$+(K<<2)>>2]|0;i:do{if((G>>1|0)!=(r|0)){t:do{if(j>>>0>31){Z=0;while(1){Y=o[W+(Z<<2)>>2]|0;Z=Z+1|0;if((Y^G)>>>0<2)break;if((Z|0)>=(q|0))break t}if((Y|0)==(G^1|0))break r;else break i}}while(0);X=X+1|0}}while(0);K=K+1|0;if((K|0)>=(z>>>5|0)){E=28;break}}}else E=28}while(0);if((E|0)==28){E=0;if((V|0)>=((o[P>>2]|0)+L|0)){e=1;break e}G=o[R>>2]|0;if((G|0)!=-1&(X|0)>(G|0)){e=1;break e}else V=V+1|0}H=H+1|0}while((H|0)<(k|0))}C=C+1|0;if((C|0)>=(T|0)){E=32;break}}}else{S=0;E=32}}else{T=0;S=0;E=32}}while(0);e:do{if((E|0)==32){t[(o[e+904>>2]|0)+r>>0]=1;L=e+380|0;M=(o[L>>2]|0)+r|0;if(t[M>>0]|0){G=e+200|0;Z=G;Z=un(o[Z>>2]|0,o[Z+4>>2]|0,-1,-1)|0;o[G>>2]=Z;o[G+4>>2]=I}t[M>>0]=0;M=e+460|0;if(!((o[e+476>>2]|0)>(r|0)?(o[(o[e+472>>2]|0)+(r<<2)>>2]|0)>-1:0))E=36;if((E|0)==36?(t[(o[L>>2]|0)+r>>0]|0)!=0:0)oi(M,r);E=e+716|0;o[E>>2]=(o[E>>2]|0)+1;E=o[g>>2]|0;if((T|0)>(E|0)){M=e+732|0;if((E|0)>0){y=e+544|0;b=o[a>>2]|0;N=e+736|0;O=0;do{k=(o[y>>2]|0)+(o[b+(O<<2)>>2]<<2)|0;L=o[N>>2]|0;if((o[k>>2]|0)>>>0>31){C=0;R=-1;do{G=k+(C<<2)+4|0;o[v>>2]=o[G>>2];zi(M,v);R=(o[G>>2]>>1|0)==(r|0)?C+L|0:R;C=C+1|0}while((C|0)<((o[k>>2]|0)>>>5|0))}else R=-1;G=o[M>>2]|0;Y=G+(R<<2)|0;Z=o[Y>>2]|0;G=G+(L<<2)|0;o[Y>>2]=o[G>>2];o[G>>2]=Z;o[p>>2]=(o[k>>2]|0)>>>5;zi(M,p);O=O+1|0}while((O|0)<(E|0))}o[v>>2]=r<<1;zi(M,v);o[p>>2]=1;zi(M,p)}else{O=e+732|0;if(S){C=e+544|0;N=o[n>>2]|0;L=e+736|0;R=0;do{k=(o[C>>2]|0)+(o[N+(R<<2)>>2]<<2)|0;M=o[L>>2]|0;if((o[k>>2]|0)>>>0>31){P=0;F=-1;do{G=k+(P<<2)+4|0;o[v>>2]=o[G>>2];zi(O,v);F=(o[G>>2]>>1|0)==(r|0)?P+M|0:F;P=P+1|0}while((P|0)<((o[k>>2]|0)>>>5|0))}else F=-1;G=o[O>>2]|0;Y=G+(F<<2)|0;Z=o[Y>>2]|0;G=G+(M<<2)|0;o[Y>>2]=o[G>>2];o[G>>2]=Z;o[p>>2]=(o[k>>2]|0)>>>5;zi(O,p);R=R+1|0}while((R|0)<(T|0))}o[b>>2]=r<<1|1;zi(O,b);o[y>>2]=1;zi(O,y)}if((o[w>>2]|0)>0){p=0;do{Li(e,o[(o[A>>2]|0)+(p<<2)>>2]|0);p=p+1|0}while((p|0)<(o[w>>2]|0))}p=e+628|0;r:do{if(S){v=e+544|0;A=o[n>>2]|0;M=o[a>>2]|0;if((E|0)>0)w=0;else{p=0;while(1){p=p+1|0;if((p|0)>=(T|0))break r}}do{y=A+(w<<2)|0;b=0;do{G=o[v>>2]|0;if(Si(e,G+(o[y>>2]<<2)|0,G+(o[M+(b<<2)>>2]<<2)|0,r,p)|0?!(Ei(e,p)|0):0){e=0;break e}b=b+1|0}while((b|0)<(E|0));w=w+1|0}while((w|0)<(T|0))}}while(0);p=o[h>>2]|0;h=p+(r*12|0)|0;v=o[h>>2]|0;if(v){o[p+(r*12|0)+4>>2]=0;Ut(v);o[h>>2]=0;o[p+(r*12|0)+8>>2]=0}h=e+412|0;r=r<<1;v=o[h>>2]|0;p=v+(r*12|0)+4|0;if((o[p>>2]|0)==0?(l=v+(r*12|0)|0,f=o[l>>2]|0,(f|0)!=0):0){o[p>>2]=0;Ut(f);o[l>>2]=0;o[v+(r*12|0)+8>>2]=0;v=o[h>>2]|0}f=r|1;l=v+(f*12|0)+4|0;if((o[l>>2]|0)==0?(u=v+(f*12|0)|0,s=o[u>>2]|0,(s|0)!=0):0){o[l>>2]=0;Ut(s);o[u>>2]=0;o[v+(f*12|0)+8>>2]=0}e=Oi(e,0)|0;M=o[a>>2]|0}}while(0);if(M){o[g>>2]=0;Ut(M);o[a>>2]=0;o[m>>2]=0}a=o[n>>2]|0;if(!a){c=i;return e|0}o[_>>2]=0;Ut(a);o[n>>2]=0;o[d>>2]=0;c=i;return e|0}function Pi(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0;i=c;if(!(t[e+724>>0]|0)){c=i;return}l=e+540|0;if((o[l>>2]|0)>0){u=e+760|0;n=e+804|0;a=e+776|0;f=e+544|0;s=0;do{_=o[u>>2]|0;h=_+(s*12|0)+4|0;m=o[h>>2]|0;if((m|0)>0){_=o[_+(s*12|0)>>2]|0;g=0;d=0;do{p=o[_+(g<<2)>>2]|0;if((o[(o[o[n>>2]>>2]|0)+(p<<2)>>2]&3|0)!=1){o[_+(d<<2)>>2]=p;m=o[h>>2]|0;d=d+1|0}g=g+1|0}while((g|0)<(m|0))}else{g=0;d=0}_=g-d|0;if((_|0)>0)o[h>>2]=m-_;t[(o[a>>2]|0)+s>>0]=0;_=o[u>>2]|0;h=_+(s*12|0)+4|0;if((o[h>>2]|0)>0){p=_+(s*12|0)|0;m=0;do{_=(o[p>>2]|0)+(m<<2)|0;d=o[_>>2]|0;g=o[f>>2]|0;v=g+(d<<2)|0;if(!(o[v>>2]&16)){b=gi(r,v)|0;o[_>>2]=b;o[v>>2]=o[v>>2]|16;o[g+(d+1<<2)>>2]=b}else o[_>>2]=o[g+(d+1<<2)>>2];m=m+1|0}while((m|0)<(o[h>>2]|0))}s=s+1|0}while((s|0)<(o[l>>2]|0))}n=e+856|0;b=o[e+872>>2]|0;a=e+868|0;h=o[a>>2]|0;f=b-h|0;if((b|0)<(h|0))f=(o[e+860>>2]|0)+f|0;e:do{if((f|0)>0){s=e+860|0;u=e+544|0;while(1){l=o[(o[n>>2]|0)+(h<<2)>>2]|0;_=h+1|0;o[a>>2]=(_|0)==(o[s>>2]|0)?0:_;_=o[u>>2]|0;d=_+(l<<2)|0;h=o[d>>2]|0;if(!(h&3)){if(!(h&16)){b=gi(r,d)|0;o[d>>2]=o[d>>2]|16;o[_+(l+1<<2)>>2]=b;l=b}else l=o[_+(l+1<<2)>>2]|0;qi(n,l)}f=f+-1|0;if((f|0)<=0)break e;h=o[a>>2]|0}}else u=e+544|0}while(0);e=e+928|0;n=o[e>>2]|0;s=o[u>>2]|0;a=s+(n<<2)|0;if(!(o[a>>2]&16)){b=gi(r,a)|0;o[e>>2]=b;o[a>>2]=o[a>>2]|16;o[s+(n+1<<2)>>2]=b;c=i;return}else{o[e>>2]=o[s+(n+1<<2)>>2];c=i;return}}function Ii(e){e=e|0;var r=0,i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0;s=c;c=c+32|0;l=s;r=s+8|0;i=e+544|0;n=e+548|0;a=e+556|0;u=(o[n>>2]|0)-(o[a>>2]|0)|0;o[r+0>>2]=0;o[r+4>>2]=0;o[r+8>>2]=0;o[r+12>>2]=0;ei(r,u);u=r+16|0;f=e+560|0;t[u>>0]=t[f>>0]|0;Pi(e,r);Xr(e,r);if((o[e+44>>2]|0)>1){h=o[r+4>>2]<<2;o[l>>2]=o[n>>2]<<2;o[l+4>>2]=h;He(3608,l|0)|0}t[f>>0]=t[u>>0]|0;u=o[i>>2]|0;if(u)Ut(u);o[i>>2]=o[r>>2];o[n>>2]=o[r+4>>2];o[e+552>>2]=o[r+8>>2];o[a>>2]=o[r+12>>2];c=s;return}function Fi(){var e=0,r=0,i=0;e=c;c=c+16|0;r=e;t[2608]=0;t[2616]=1;t[2624]=2;pr(2632,2656,2664,3744,3752);o[658]=160;t[2652]=0;pr(2704,2728,2736,3744,3752);o[676]=160;t[2724]=0;pr(2784,2808,2816,3744,3752);o[696]=160;t[2804]=1;pr(2848,2880,2888,3744,3736);o[712]=280;i=2868|0;o[i>>2]=-2147483648;o[i+4>>2]=2147483647;o[719]=0;pr(2960,2992,3e3,3744,3736);o[740]=280;i=2980|0;o[i>>2]=-1;o[i+4>>2]=2147483647;o[747]=20;pr(3112,3144,3152,3744,3736);o[778]=280;i=3132|0;o[i>>2]=-1;o[i+4>>2]=2147483647;o[785]=1e3;pr(3240,3296,3312,3744,3720);o[810]=2168;l[408]=0.0;l[409]=T;t[3280]=0;t[3281]=0;n[1641]=n[r+0>>1]|0;n[1642]=n[r+2>>1]|0;n[1643]=n[r+4>>1]|0;l[411]=.5;c=e;return}function xi(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0;i=c;o[e>>2]=0;t=e+4|0;o[t>>2]=0;n=e+8|0;o[n>>2]=0;if((r|0)<=0){c=i;return}a=r+1&-2;a=(a|0)>2?a:2;o[n>>2]=a;n=Ht(0,a<<2)|0;o[e>>2]=n;if((n|0)==0?(o[(je()|0)>>2]|0)==12:0)Xe(Te(1)|0,48,0);e=o[t>>2]|0;if((e|0)<(r|0))do{a=n+(e<<2)|0;if(a)o[a>>2]=0;e=e+1|0}while((e|0)!=(r|0));o[t>>2]=r;c=i;return}function Di(e){e=e|0;var r=0,i=0,t=0,n=0,a=0,s=0,u=0;r=c;t=e+32|0;i=o[t>>2]|0;if(i){o[e+36>>2]=0;Ut(i);o[t>>2]=0;o[e+40>>2]=0}t=e+16|0;i=o[t>>2]|0;if(i){o[e+20>>2]=0;Ut(i);o[t>>2]=0;o[e+24>>2]=0}t=o[e>>2]|0;if(!t){c=r;return}i=e+4|0;a=o[i>>2]|0;if((a|0)>0){n=0;do{u=t+(n*12|0)|0;s=o[u>>2]|0;if(s){o[t+(n*12|0)+4>>2]=0;Ut(s);o[u>>2]=0;o[t+(n*12|0)+8>>2]=0;t=o[e>>2]|0;a=o[i>>2]|0}n=n+1|0}while((n|0)<(a|0))}o[i>>2]=0;Ut(t);o[e>>2]=0;o[e+8>>2]=0;c=r;return}function Bi(e,r,i){e=e|0;r=r|0;i=i|0;var t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0;t=c;r=o[r>>2]|0;a=r+1|0;n=e+4|0;if((o[n>>2]|0)>=(a|0)){f=o[e>>2]|0;f=f+(r<<2)|0;o[f>>2]=i;c=t;return}s=e+8|0;f=o[s>>2]|0;if((f|0)<(a|0)){l=r+2-f&-2;u=(f>>1)+2&-2;u=(l|0)>(u|0)?l:u;if((u|0)>(2147483647-f|0)){l=Te(1)|0;Xe(l|0,48,0)}h=o[e>>2]|0;l=u+f|0;o[s>>2]=l;l=Ht(h,l<<2)|0;o[e>>2]=l;if((l|0)==0?(o[(je()|0)>>2]|0)==12:0){h=Te(1)|0;Xe(h|0,48,0)}}f=o[n>>2]|0;if((f|0)<(a|0)){s=o[e>>2]|0;do{u=s+(f<<2)|0;if(u)o[u>>2]=0;f=f+1|0}while((f|0)!=(a|0))}o[n>>2]=a;h=o[e>>2]|0;h=h+(r<<2)|0;o[h>>2]=i;c=t;return}function Ui(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0;i=c;f=o[r>>2]|0;a=f+1|0;n=e+4|0;if((o[n>>2]|0)<(a|0)){u=e+8|0;s=o[u>>2]|0;if((s|0)<(a|0)){l=f+2-s&-2;f=(s>>1)+2&-2;f=(l|0)>(f|0)?l:f;if((f|0)>(2147483647-s|0)){l=Te(1)|0;Xe(l|0,48,0)}h=o[e>>2]|0;l=f+s|0;o[u>>2]=l;l=Ht(h,l*12|0)|0;o[e>>2]=l;if((l|0)==0?(o[(je()|0)>>2]|0)==12:0){h=Te(1)|0;Xe(h|0,48,0)}}u=o[n>>2]|0;if((u|0)<(a|0)){s=o[e>>2]|0;do{f=s+(u*12|0)|0;if(f){o[f>>2]=0;o[s+(u*12|0)+4>>2]=0;o[s+(u*12|0)+8>>2]=0}u=u+1|0}while((u|0)!=(a|0))}o[n>>2]=a;s=o[r>>2]|0}else s=f;n=o[e>>2]|0;if(o[n+(s*12|0)>>2]|0){o[n+(s*12|0)+4>>2]=0;s=o[r>>2]|0}r=e+16|0;n=s+1|0;a=e+20|0;if((o[a>>2]|0)>=(n|0)){c=i;return}u=e+24|0;e=o[u>>2]|0;if((e|0)<(n|0)){h=s+2-e&-2;s=(e>>1)+2&-2;s=(h|0)>(s|0)?h:s;if((s|0)>(2147483647-e|0)){h=Te(1)|0;Xe(h|0,48,0)}l=o[r>>2]|0;h=s+e|0;o[u>>2]=h;h=Ht(l,h)|0;o[r>>2]=h;if((h|0)==0?(o[(je()|0)>>2]|0)==12:0){h=Te(1)|0;Xe(h|0,48,0)}}e=o[a>>2]|0;if((e|0)<(n|0))do{t[(o[r>>2]|0)+e>>0]=0;e=e+1|0}while((e|0)!=(n|0));o[a>>2]=n;c=i;return}function Hi(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0;i=c;c=c+16|0;a=i;o[a>>2]=r;n=e+12|0;t=r+1|0;s=e+16|0;if((o[s>>2]|0)<(t|0)){f=e+20|0;u=o[f>>2]|0;if((u|0)<(t|0)){h=r+2-u&-2;l=(u>>1)+2&-2;l=(h|0)>(l|0)?h:l;if((l|0)>(2147483647-u|0)){h=Te(1)|0;Xe(h|0,48,0)}_=o[n>>2]|0;h=l+u|0;o[f>>2]=h;h=Ht(_,h<<2)|0;o[n>>2]=h;if((h|0)==0?(o[(je()|0)>>2]|0)==12:0){_=Te(1)|0;Xe(_|0,48,0)}}u=o[s>>2]|0;if((t|0)>(u|0))on((o[n>>2]|0)+(u<<2)|0,-1,t-u<<2|0)|0;o[s>>2]=t}o[(o[n>>2]|0)+(r<<2)>>2]=o[e+4>>2];si(e,a);t=o[n>>2]|0;u=o[t+(r<<2)>>2]|0;r=o[e>>2]|0;n=o[r+(u<<2)>>2]|0;if(!u){h=0;_=r+(h<<2)|0;o[_>>2]=n;_=t+(n<<2)|0;o[_>>2]=h;c=i;return}e=e+28|0;a=n<<1;s=a|1;while(1){h=u;u=u+-1>>1;l=r+(u<<2)|0;f=o[l>>2]|0;p=o[o[e>>2]>>2]|0;d=o[p+(a<<2)>>2]|0;g=o[p+(s<<2)>>2]|0;d=pn(g|0,((g|0)<0)<<31>>31|0,d|0,((d|0)<0)<<31>>31|0)|0;g=I;m=f<<1;_=o[p+(m<<2)>>2]|0;m=o[p+((m|1)<<2)>>2]|0;_=pn(m|0,((m|0)<0)<<31>>31|0,_|0,((_|0)<0)<<31>>31|0)|0;m=I;if(!(g>>>0<m>>>0|(g|0)==(m|0)&d>>>0<_>>>0)){e=14;break}o[r+(h<<2)>>2]=f;o[t+(o[l>>2]<<2)>>2]=h;if(!u){h=0;e=14;break}}if((e|0)==14){p=r+(h<<2)|0;o[p>>2]=n;p=t+(n<<2)|0;o[p>>2]=h;c=i;return}}function Vi(e,r){e=e|0;r=r|0;var i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0;i=c;s=e+824|0;l=(o[e+840>>2]|0)>(r|0);if(l?(o[(o[e+836>>2]|0)+(r<<2)>>2]|0)>-1:0)u=7;else u=3;do{if((u|0)==3){if(t[(o[e+876>>2]|0)+r>>0]|0){c=i;return}if(t[(o[e+904>>2]|0)+r>>0]|0){c=i;return}d=t[(o[e+332>>2]|0)+r>>0]|0;_=t[2624]|0;m=_&255;if((m>>>1^1)&d<<24>>24==_<<24>>24|d&2&m)if(l){u=7;break}else break;else{c=i;return}}}while(0);if((u|0)==7?(n=o[e+836>>2]|0,a=n+(r<<2)|0,f=o[a>>2]|0,(f|0)>-1):0){r=o[s>>2]|0;u=o[r+(f<<2)>>2]|0;e:do{if(!f)d=0;else{l=e+852|0;h=u<<1;e=h|1;while(1){d=f;f=f+-1>>1;m=r+(f<<2)|0;_=o[m>>2]|0;y=o[o[l>>2]>>2]|0;p=o[y+(h<<2)>>2]|0;b=o[y+(e<<2)>>2]|0;p=pn(b|0,((b|0)<0)<<31>>31|0,p|0,((p|0)<0)<<31>>31|0)|0;b=I;v=_<<1;g=o[y+(v<<2)>>2]|0;v=o[y+((v|1)<<2)>>2]|0;g=pn(v|0,((v|0)<0)<<31>>31|0,g|0,((g|0)<0)<<31>>31|0)|0;v=I;if(!(b>>>0<v>>>0|(b|0)==(v|0)&p>>>0<g>>>0))break e;o[r+(d<<2)>>2]=_;o[n+(o[m>>2]<<2)>>2]=d;if(!f){d=0;break}}}}while(0);o[r+(d<<2)>>2]=u;o[n+(u<<2)>>2]=d;$i(s,o[a>>2]|0);c=i;return}Hi(s,r);c=i;return}function $i(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0;i=c;t=o[e>>2]|0;n=o[t+(r<<2)>>2]|0;h=r<<1|1;l=e+4|0;d=o[l>>2]|0;if((h|0)>=(d|0)){m=r;g=e+12|0;d=t+(m<<2)|0;o[d>>2]=n;g=o[g>>2]|0;g=g+(n<<2)|0;o[g>>2]=m;c=i;return}s=e+28|0;f=n<<1;u=f|1;e=e+12|0;while(1){_=(r<<1)+2|0;if((_|0)<(d|0)){m=o[t+(_<<2)>>2]|0;g=o[t+(h<<2)>>2]|0;y=m<<1;d=o[o[s>>2]>>2]|0;v=o[d+(y<<2)>>2]|0;y=o[d+((y|1)<<2)>>2]|0;v=pn(y|0,((y|0)<0)<<31>>31|0,v|0,((v|0)<0)<<31>>31|0)|0;y=I;b=g<<1;p=o[d+(b<<2)>>2]|0;b=o[d+((b|1)<<2)>>2]|0;p=pn(b|0,((b|0)<0)<<31>>31|0,p|0,((p|0)<0)<<31>>31|0)|0;b=I;if(!(y>>>0<b>>>0|(y|0)==(b|0)&v>>>0<p>>>0)){m=g;a=7}}else{m=o[t+(h<<2)>>2]|0;d=o[o[s>>2]>>2]|0;a=7}if((a|0)==7){a=0;_=h}p=m<<1;b=o[d+(p<<2)>>2]|0;p=o[d+((p|1)<<2)>>2]|0;b=pn(p|0,((p|0)<0)<<31>>31|0,b|0,((b|0)<0)<<31>>31|0)|0;p=I;y=o[d+(f<<2)>>2]|0;v=o[d+(u<<2)>>2]|0;y=pn(v|0,((v|0)<0)<<31>>31|0,y|0,((y|0)<0)<<31>>31|0)|0;v=I;if(!(p>>>0<v>>>0|(p|0)==(v|0)&b>>>0<y>>>0)){a=10;break}o[t+(r<<2)>>2]=m;o[(o[e>>2]|0)+(m<<2)>>2]=r;h=_<<1|1;d=o[l>>2]|0;if((h|0)>=(d|0)){r=_;a=10;break}else r=_}if((a|0)==10){y=t+(r<<2)|0;o[y>>2]=n;y=o[e>>2]|0;y=y+(n<<2)|0;o[y>>2]=r;c=i;return}}function ji(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0;i=c;s=o[e>>2]|0;if(s){t=e+4|0;n=o[t>>2]|0;e:do{if((n|0)>0){a=0;while(1){u=s+(a*12|0)|0;f=o[u>>2]|0;if(f){o[s+(a*12|0)+4>>2]=0;Ut(f);o[u>>2]=0;o[s+(a*12|0)+8>>2]=0;n=o[t>>2]|0}a=a+1|0;if((a|0)>=(n|0))break e;s=o[e>>2]|0}}}while(0);o[t>>2]=0;if(r){Ut(o[e>>2]|0);o[e>>2]=0;o[e+8>>2]=0}}t=e+16|0;n=o[t>>2]|0;if((n|0)!=0?(o[e+20>>2]=0,r):0){Ut(n);o[t>>2]=0;o[e+24>>2]=0}n=e+32|0;t=o[n>>2]|0;if(!t){c=i;return}o[e+36>>2]=0;if(!r){c=i;return}Ut(t);o[n>>2]=0;o[e+40>>2]=0;c=i;return}function Wi(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0;t=c;n=o[e>>2]|0;i=e+4|0;if(n){o[i>>2]=0;if(r){Ut(n);o[e>>2]=0;o[e+8>>2]=0;n=0}}else n=0;if((o[i>>2]|0)>=1){s=e+16|0;o[s>>2]=0;s=e+12|0;o[s>>2]=0;c=t;return}s=e+8|0;a=o[s>>2]|0;if((a|0)<1){u=2-a&-2;r=(a>>1)+2&-2;r=(u|0)>(r|0)?u:r;if((r|0)>(2147483647-a|0)){u=Te(1)|0;Xe(u|0,48,0)}u=r+a|0;o[s>>2]=u;n=Ht(n,u<<2)|0;o[e>>2]=n;if((n|0)==0?(o[(je()|0)>>2]|0)==12:0){u=Te(1)|0;Xe(u|0,48,0)}}r=o[i>>2]|0;if((r|0)<1)while(1){a=n+(r<<2)|0;if(a)o[a>>2]=0;if(!r)break;else r=r+1|0}o[i>>2]=1;u=e+16|0;o[u>>2]=0;u=e+12|0;o[u>>2]=0;c=t;return}function qi(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0;t=c;c=c+16|0;i=t;n=e+16|0;u=o[n>>2]|0;o[n>>2]=u+1;o[(o[e>>2]|0)+(u<<2)>>2]=r;u=o[n>>2]|0;r=e+4|0;s=o[r>>2]|0;if((u|0)==(s|0)){o[n>>2]=0;u=0}a=e+12|0;if((o[a>>2]|0)!=(u|0)){c=t;return}xi(i,(s*3|0)+1>>1);l=o[a>>2]|0;h=o[r>>2]|0;if((l|0)<(h|0)){u=o[e>>2]|0;f=o[i>>2]|0;h=0;while(1){s=h+1|0;o[f+(h<<2)>>2]=o[u+(l<<2)>>2];l=l+1|0;h=o[r>>2]|0;if((l|0)>=(h|0)){f=s;break}else h=s}}else f=0;s=o[e>>2]|0;if((o[n>>2]|0)>0){u=o[i>>2]|0;l=0;while(1){o[u+(f<<2)>>2]=o[s+(l<<2)>>2];l=l+1|0;if((l|0)>=(o[n>>2]|0))break;else f=f+1|0}h=o[r>>2]|0}o[a>>2]=0;o[n>>2]=h;if(!s)n=e+8|0;else{o[r>>2]=0;Ut(s);o[e>>2]=0;n=e+8|0;o[n>>2]=0}o[e>>2]=o[i>>2];l=i+4|0;o[r>>2]=o[l>>2];h=i+8|0;o[n>>2]=o[h>>2];o[i>>2]=0;o[l>>2]=0;o[h>>2]=0;c=t;return}function zi(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0;i=c;t=e+4|0;n=o[t>>2]|0;a=e+8|0;s=o[a>>2]|0;if((n|0)==(s|0)&(s|0)<(n+1|0)){s=(n>>1)+2&-2;s=(s|0)<2?2:s;if((s|0)>(2147483647-n|0)){s=Te(1)|0;Xe(s|0,48,0)}u=o[e>>2]|0;n=s+n|0;o[a>>2]=n;n=Ht(u,n<<2)|0;o[e>>2]=n;if((n|0)==0?(o[(je()|0)>>2]|0)==12:0){u=Te(1)|0;Xe(u|0,48,0)}}else n=o[e>>2]|0;u=o[t>>2]|0;o[t>>2]=u+1;t=n+(u<<2)|0;if(!t){c=i;return}o[t>>2]=o[r>>2];c=i;return}function Ki(){var e=0,r=0;r=c;Ue(3864)|0;e=ut(936)|0;pi(e);c=r;return e|0}function Xi(e){e=e|0;var r=0;r=c;if(!e){c=r;return}$n[o[(o[e>>2]|0)+4>>2]&31](e);c=r;return}function Yi(){var e=0,r=0,i=0;e=c;c=c+16|0;r=e;i=ut(936)|0;pi(i);o[964]=i;Ai(i,1)|0;i=o[964]|0;t[r+0>>0]=t[3840]|0;yi(i,r,1)|0;c=e;return}function Zi(e){e=e|0;var r=0,i=0,n=0;r=c;c=c+16|0;i=r;if((o[962]|0)>=(e|0)){c=r;return}do{n=o[964]|0;t[i+0>>0]=t[3840]|0;yi(n,i,1)|0;n=(o[962]|0)+1|0;o[962]=n}while((n|0)<(e|0));c=r;return}function Gi(e){e=e|0;var r=0,i=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0;a=c;c=c+32|0;s=a+16|0;i=a+4|0;u=a;o[i>>2]=0;n=i+4|0;o[n>>2]=0;r=i+8|0;o[r>>2]=0;f=o[e>>2]|0;if(f)do{l=(f|0)<0?0-f|0:f;if((o[962]|0)<(l|0))do{h=o[964]|0;t[s+0>>0]=t[3840]|0;yi(h,s,1)|0;h=(o[962]|0)+1|0;o[962]=h}while((h|0)<(l|0));o[u>>2]=l<<1|f>>>31;ai(i,u);e=e+4|0;f=o[e>>2]|0}while((f|0)!=0);u=o[964]|0;s=u+628|0;ot(i,s);s=Ei(u,s)|0;u=o[i>>2]|0;if(!u){c=a;return s|0}o[n>>2]=0;Ut(u);o[i>>2]=0;o[r>>2]=0;c=a;return s|0}function Ji(){var e=0,r=0,i=0,n=0;r=c;c=c+16|0;e=r;i=o[964]|0;n=i+664|0;o[n+0>>2]=-1;o[n+4>>2]=-1;o[n+8>>2]=-1;o[n+12>>2]=-1;if(o[i+304>>2]|0)o[i+308>>2]=0;wi(e,i,1,0);c=r;return(t[e>>0]|0)==0|0}function Qi(){return(o[(o[964]|0)+4>>2]|0)+1|0}function et(){return o[962]|0}function rt(e){e=e|0;var r=0,i=0,n=0,a=0,s=0,u=0;r=c;c=c+32|0;s=r+16|0;n=r+4|0;u=r;o[n>>2]=0;i=n+4|0;o[i>>2]=0;a=n+8|0;o[a>>2]=0;o[u>>2]=e<<1;ai(n,u);e=o[964]|0;u=e+664|0;o[u+0>>2]=-1;o[u+4>>2]=-1;o[u+8>>2]=-1;o[u+12>>2]=-1;ot(n,e+304|0);wi(s,e,1,0);e=(t[s>>0]|0)==0;s=o[n>>2]|0;if(!s){c=r;return e|0}o[i>>2]=0;Ut(s);o[n>>2]=0;o[a>>2]=0;c=r;return e|0}function it(e){e=e|0;var r=0,i=0,t=0;r=c;c=c+16|0;t=r;i=o[964]|0;o[t>>2]=e<<1|1;e=i+628|0;if(o[e>>2]|0)o[i+632>>2]=0;ai(e,t);Ei(i,e)|0;c=r;return}function tt(){return o[(o[964]|0)+36>>2]|0}function nt(){return o[(o[964]|0)+32>>2]|0}function ot(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0;i=c;s=o[r>>2]|0;t=r+4|0;if(!s)u=o[t>>2]|0;else{o[t>>2]=0;u=0}t=e+4|0;n=o[t>>2]|0;a=r+4|0;if((u|0)<(n|0)){f=r+8|0;u=o[f>>2]|0;if((u|0)<(n|0)){h=n+1-u&-2;l=(u>>1)+2&-2;l=(h|0)>(l|0)?h:l;if((l|0)>(2147483647-u|0)){h=Te(1)|0;Xe(h|0,48,0)}h=l+u|0;o[f>>2]=h;s=Ht(s,h<<2)|0;o[r>>2]=s;if((s|0)==0?(o[(je()|0)>>2]|0)==12:0){h=Te(1)|0;Xe(h|0,48,0)}}u=o[a>>2]|0;e:do{if((u|0)<(n|0))while(1){s=s+(u<<2)|0;if(s)o[s>>2]=0;u=u+1|0;if((u|0)==(n|0))break e;s=o[r>>2]|0}}while(0);o[a>>2]=n;n=o[t>>2]|0}if((n|0)<=0){c=i;return}r=o[r>>2]|0;e=o[e>>2]|0;n=0;do{o[r+(n<<2)>>2]=o[e+(n<<2)>>2];n=n+1|0}while((n|0)<(o[t>>2]|0));c=i;return}function at(e,r){e=e|0;r=r|0;var i=0;i=c;c=c+16|0;o[i>>2]=r;r=o[v>>2]|0;Ee(r|0,e|0,i|0)|0;Ke(10,r|0)|0;Ge()}function st(){var e=0,r=0;e=c;c=c+16|0;if(!(Be(4064,3)|0)){r=xe(o[1014]|0)|0;c=e;return r|0}else at(4072,e);return 0}function ut(e){e=e|0;var r=0,i=0;r=c;e=(e|0)==0?1:e;i=Bt(e)|0;if(i){c=r;return i|0}while(1){i=mt()|0;if(!i){e=4;break}qn[i&3]();i=Bt(e)|0;if(i){e=5;break}}if((e|0)==4){i=Te(4)|0;o[i>>2]=4248;Xe(i|0,4296,12)}else if((e|0)==5){c=r;return i|0}return 0}function ft(e){e=e|0;var r=0;r=c;Ut(e);c=r;return}function lt(e){e=e|0;var r=0;r=c;ft(e);c=r;return}function ct(e){e=e|0;return}function ht(e){e=e|0;return 4264}function _t(e){e=e|0;var r=0;r=c;c=c+16|0;qn[e&3]();at(4312,r)}function dt(){var e=0,r=0;r=st()|0;if(((r|0)!=0?(e=o[r>>2]|0,(e|0)!=0):0)?(r=e+48|0,(o[r>>2]&-256|0)==1126902528?(o[r+4>>2]|0)==1129074247:0):0)_t(o[e+12>>2]|0);r=o[968]|0;o[968]=r+0;_t(r)}function mt(){var e=0;e=o[1102]|0;o[1102]=e+0;return e|0}function gt(e){e=e|0;return}function pt(e){e=e|0;return}function vt(e){e=e|0;return}function bt(e){e=e|0;return}function yt(e){e=e|0;return}function wt(e){e=e|0;var r=0;r=c;ft(e);c=r;return}function At(e){e=e|0;var r=0;r=c;ft(e);c=r;return}function Et(e,r,i){e=e|0;r=r|0;i=i|0;var t=0,n=0,a=0,s=0;t=c;c=c+64|0;n=t;if((e|0)==(r|0)){s=1;c=t;return s|0}if(!r){s=0;c=t;return s|0}r=St(r,4504,4560,0)|0;if(!r){s=0;c=t;return s|0}s=n+0|0;a=s+56|0;do{o[s>>2]=0;s=s+4|0}while((s|0)<(a|0));o[n>>2]=r;o[n+8>>2]=e;o[n+12>>2]=-1;o[n+48>>2]=1;Xn[o[(o[r>>2]|0)+28>>2]&3](r,n,o[i>>2]|0,1);if((o[n+24>>2]|0)!=1){s=0;c=t;return s|0}o[i>>2]=o[n+16>>2];s=1;c=t;return s|0}function Tt(e,r,i,n){e=e|0;r=r|0;i=i|0;n=n|0;var a=0,s=0;e=c;a=r+16|0;s=o[a>>2]|0;if(!s){o[a>>2]=i;o[r+24>>2]=n;o[r+36>>2]=1;c=e;return}if((s|0)!=(i|0)){s=r+36|0;o[s>>2]=(o[s>>2]|0)+1;o[r+24>>2]=2;t[r+54>>0]=1;c=e;return}i=r+24|0;if((o[i>>2]|0)!=2){c=e;return}o[i>>2]=n;c=e;return}function Lt(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;var n=0;n=c;if((o[r+8>>2]|0)!=(e|0)){c=n;return}Tt(0,r,i,t);c=n;return}function Mt(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;var n=0;n=c;if((e|0)==(o[r+8>>2]|0)){Tt(0,r,i,t);c=n;return}else{e=o[e+8>>2]|0;Xn[o[(o[e>>2]|0)+28>>2]&3](e,r,i,t);c=n;return}}function St(e,r,i,a){e=e|0;r=r|0;i=i|0;a=a|0;var s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0;s=c;c=c+64|0;u=s;f=o[e>>2]|0;l=e+(o[f+-8>>2]|0)|0;f=o[f+-4>>2]|0;o[u>>2]=i;o[u+4>>2]=e;o[u+8>>2]=r;o[u+12>>2]=a;_=u+16|0;d=u+20|0;r=u+24|0;h=u+28|0;a=u+32|0;e=u+40|0;m=(f|0)==(i|0);g=_+0|0;i=g+36|0;do{o[g>>2]=0;g=g+4|0}while((g|0)<(i|0));n[_+36>>1]=0;t[_+38>>0]=0;if(m){o[u+48>>2]=1;zn[o[(o[f>>2]|0)+20>>2]&3](f,u,l,l,1,0);g=(o[r>>2]|0)==1?l:0;c=s;return g|0}Vn[o[(o[f>>2]|0)+24>>2]&3](f,u,l,1,0);u=o[u+36>>2]|0;if(!u){g=(o[e>>2]|0)==1&(o[h>>2]|0)==1&(o[a>>2]|0)==1?o[d>>2]|0:0;c=s;return g|0}else if((u|0)==1){if((o[r>>2]|0)!=1?!((o[e>>2]|0)==0&(o[h>>2]|0)==1&(o[a>>2]|0)==1):0){g=0;c=s;return g|0}g=o[_>>2]|0;c=s;return g|0}else{g=0;c=s;return g|0}return 0}function kt(e,r,i,n,a){e=e|0;r=r|0;i=i|0;n=n|0;a=a|0;var s=0;e=c;t[r+53>>0]=1;if((o[r+4>>2]|0)!=(n|0)){c=e;return}t[r+52>>0]=1;n=r+16|0;s=o[n>>2]|0;if(!s){o[n>>2]=i;o[r+24>>2]=a;o[r+36>>2]=1;if(!((a|0)==1?(o[r+48>>2]|0)==1:0)){c=e;return}t[r+54>>0]=1;c=e;return}if((s|0)!=(i|0)){s=r+36|0;o[s>>2]=(o[s>>2]|0)+1;t[r+54>>0]=1;c=e;return}i=r+24|0;n=o[i>>2]|0;if((n|0)==2)o[i>>2]=a;else a=n;if(!((a|0)==1?(o[r+48>>2]|0)==1:0)){c=e;return}t[r+54>>0]=1;c=e;return}function Ot(e,r,i,n,a){e=e|0;r=r|0;i=i|0;n=n|0;a=a|0;var s=0,u=0,f=0,l=0,h=0;s=c;if((e|0)==(o[r+8>>2]|0)){if((o[r+4>>2]|0)!=(i|0)){c=s;return}u=r+28|0;if((o[u>>2]|0)==1){c=s;return}o[u>>2]=n;c=s;return}if((e|0)!=(o[r>>2]|0)){l=o[e+8>>2]|0;Vn[o[(o[l>>2]|0)+24>>2]&3](l,r,i,n,a);c=s;return}if((o[r+16>>2]|0)!=(i|0)?(f=r+20|0,(o[f>>2]|0)!=(i|0)):0){o[r+32>>2]=n;n=r+44|0;if((o[n>>2]|0)==4){c=s;return}l=r+52|0;t[l>>0]=0;h=r+53|0;t[h>>0]=0;e=o[e+8>>2]|0;zn[o[(o[e>>2]|0)+20>>2]&3](e,r,i,i,1,a);if(t[h>>0]|0){if(!(t[l>>0]|0)){e=1;u=13}}else{e=0;u=13}do{if((u|0)==13){o[f>>2]=i;h=r+40|0;o[h>>2]=(o[h>>2]|0)+1;if((o[r+36>>2]|0)==1?(o[r+24>>2]|0)==2:0){t[r+54>>0]=1;if(e)break}else u=16;if((u|0)==16?e:0)break;o[n>>2]=4;c=s;return}}while(0);o[n>>2]=3;c=s;return}if((n|0)!=1){c=s;return}o[r+32>>2]=1;c=s;return}function Nt(e,r,i,n,a){e=e|0;r=r|0;i=i|0;n=n|0;a=a|0;var s=0;a=c;if((o[r+8>>2]|0)==(e|0)){if((o[r+4>>2]|0)!=(i|0)){c=a;return}r=r+28|0;if((o[r>>2]|0)==1){c=a;return}o[r>>2]=n;c=a;return}if((o[r>>2]|0)!=(e|0)){c=a;return}if((o[r+16>>2]|0)!=(i|0)?(s=r+20|0,(o[s>>2]|0)!=(i|0)):0){o[r+32>>2]=n;o[s>>2]=i;e=r+40|0;o[e>>2]=(o[e>>2]|0)+1;if((o[r+36>>2]|0)==1?(o[r+24>>2]|0)==2:0)t[r+54>>0]=1;o[r+44>>2]=4;c=a;return}if((n|0)!=1){c=a;return}o[r+32>>2]=1;c=a;return}function Ct(e,r,i,t,n,a){e=e|0;r=r|0;i=i|0;t=t|0;n=n|0;a=a|0;var s=0;s=c;if((e|0)==(o[r+8>>2]|0)){kt(0,r,i,t,n);c=s;return}else{e=o[e+8>>2]|0;zn[o[(o[e>>2]|0)+20>>2]&3](e,r,i,t,n,a);c=s;return}}function Rt(e,r,i,t,n,a){e=e|0;r=r|0;i=i|0;t=t|0;n=n|0;a=a|0;a=c;if((o[r+8>>2]|0)!=(e|0)){c=a;return}kt(0,r,i,t,n);c=a;return}function Pt(e,r,i){e=e|0;r=r|0;i=i|0;var t=0,n=0;t=c;c=c+16|0;n=t;o[n>>2]=o[i>>2];e=Hn[o[(o[e>>2]|0)+16>>2]&1](e,r,n)|0;r=e&1;if(!e){c=t;return r|0}o[i>>2]=o[n>>2];c=t;return r|0}function It(e){e=e|0;var r=0;r=c;if(!e)e=0;else e=(St(e,4504,4672,0)|0)!=0;c=r;return e&1|0}function Ft(){var e=0,r=0,i=0,t=0,n=0;e=c;c=c+16|0;r=e;e=e+12|0;i=st()|0;if(!i)at(4040,r);i=o[i>>2]|0;if(!i)at(4040,r);n=i+48|0;t=o[n>>2]|0;n=o[n+4>>2]|0;if(!((t&-256|0)==1126902528&(n|0)==1129074247)){o[r>>2]=o[970];at(4e3,r)}if((t|0)==1126902529&(n|0)==1129074247)t=o[i+44>>2]|0;else t=i+80|0;o[e>>2]=t;n=o[i>>2]|0;i=o[n+4>>2]|0;if(Hn[o[(o[4432>>2]|0)+16>>2]&1](4432,n,e)|0){n=o[e>>2]|0;t=o[970]|0;n=Wn[o[(o[n>>2]|0)+8>>2]&1](n)|0;o[r>>2]=t;o[r+4>>2]=i;o[r+8>>2]=n;at(3904,r)}else{o[r>>2]=o[970];o[r+4>>2]=i;at(3952,r)}}function xt(){var e=0;e=c;c=c+16|0;if(!(Ve(4056,20)|0)){c=e;return}else at(4128,e)}function Dt(e){e=e|0;var r=0;r=c;c=c+16|0;Ut(e);if(!(We(o[1014]|0,0)|0)){c=r;return}else at(4184,r)}function Bt(e){e=e|0;var r=0,i=0,t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0,E=0,T=0,L=0,M=0,S=0,k=0,O=0,N=0,C=0,R=0,P=0;r=c;do{if(e>>>0<245){if(e>>>0<11)e=16;else e=e+11&-8;E=e>>>3;m=o[1206]|0;A=m>>>E;if(A&3){a=(A&1^1)+E|0;n=a<<1;i=4864+(n<<2)|0;n=4864+(n+2<<2)|0;s=o[n>>2]|0;u=s+8|0;t=o[u>>2]|0;do{if((i|0)!=(t|0)){if(t>>>0<(o[1210]|0)>>>0)Ge();f=t+12|0;if((o[f>>2]|0)==(s|0)){o[f>>2]=i;o[n>>2]=t;break}else Ge()}else o[1206]=m&~(1<<a)}while(0);P=a<<3;o[s+4>>2]=P|3;P=s+(P|4)|0;o[P>>2]=o[P>>2]|1;P=u;c=r;return P|0}w=o[1208]|0;if(e>>>0>w>>>0){if(A){s=2<<E;s=A<<E&(s|0-s);s=(s&0-s)+-1|0;i=s>>>12&16;s=s>>>i;u=s>>>5&8;s=s>>>u;n=s>>>2&4;s=s>>>n;a=s>>>1&2;s=s>>>a;t=s>>>1&1;t=(u|i|n|a|t)+(s>>>t)|0;s=t<<1;a=4864+(s<<2)|0;s=4864+(s+2<<2)|0;n=o[s>>2]|0;i=n+8|0;u=o[i>>2]|0;do{if((a|0)!=(u|0)){if(u>>>0<(o[1210]|0)>>>0)Ge();f=u+12|0;if((o[f>>2]|0)==(n|0)){o[f>>2]=a;o[s>>2]=u;N=o[1208]|0;break}else Ge()}else{o[1206]=m&~(1<<t);N=w}}while(0);P=t<<3;t=P-e|0;o[n+4>>2]=e|3;a=n+e|0;o[n+(e|4)>>2]=t|1;o[n+P>>2]=t;if(N){n=o[1211]|0;l=N>>>3;u=l<<1;s=4864+(u<<2)|0;f=o[1206]|0;l=1<<l;if(f&l){u=4864+(u+2<<2)|0;f=o[u>>2]|0;if(f>>>0<(o[1210]|0)>>>0)Ge();else{O=u;k=f}}else{o[1206]=f|l;O=4864+(u+2<<2)|0;k=s}o[O>>2]=n;o[k+12>>2]=n;o[n+8>>2]=k;o[n+12>>2]=s}o[1208]=t;o[1211]=a;P=i;c=r;return P|0}m=o[1207]|0;if(m){i=(m&0-m)+-1|0;R=i>>>12&16;i=i>>>R;C=i>>>5&8;i=i>>>C;P=i>>>2&4;i=i>>>P;n=i>>>1&2;i=i>>>n;t=i>>>1&1;t=o[5128+((C|R|P|n|t)+(i>>>t)<<2)>>2]|0;i=(o[t+4>>2]&-8)-e|0;n=t;while(1){a=o[n+16>>2]|0;if(!a){a=o[n+20>>2]|0;if(!a)break}n=(o[a+4>>2]&-8)-e|0;P=n>>>0<i>>>0;i=P?n:i;n=a;t=P?a:t}s=o[1210]|0;if(t>>>0<s>>>0)Ge();n=t+e|0;if(t>>>0>=n>>>0)Ge();a=o[t+24>>2]|0;f=o[t+12>>2]|0;do{if((f|0)==(t|0)){f=t+20|0;u=o[f>>2]|0;if(!u){f=t+16|0;u=o[f>>2]|0;if(!u){S=0;break}}while(1){l=u+20|0;h=o[l>>2]|0;if(h){u=h;f=l;continue}l=u+16|0;h=o[l>>2]|0;if(!h)break;else{u=h;f=l}}if(f>>>0<s>>>0)Ge();else{o[f>>2]=0;S=u;break}}else{u=o[t+8>>2]|0;if(u>>>0<s>>>0)Ge();s=u+12|0;if((o[s>>2]|0)!=(t|0))Ge();l=f+8|0;if((o[l>>2]|0)==(t|0)){o[s>>2]=f;o[l>>2]=u;S=f;break}else Ge()}}while(0);do{if(a){u=o[t+28>>2]|0;s=5128+(u<<2)|0;if((t|0)==(o[s>>2]|0)){o[s>>2]=S;if(!S){o[1207]=o[1207]&~(1<<u);break}}else{if(a>>>0<(o[1210]|0)>>>0)Ge();s=a+16|0;if((o[s>>2]|0)==(t|0))o[s>>2]=S;else o[a+20>>2]=S;if(!S)break}s=o[1210]|0;if(S>>>0<s>>>0)Ge();o[S+24>>2]=a;a=o[t+16>>2]|0;do{if(a)if(a>>>0<s>>>0)Ge();else{o[S+16>>2]=a;o[a+24>>2]=S;break}}while(0);a=o[t+20>>2]|0;if(a)if(a>>>0<(o[1210]|0)>>>0)Ge();else{o[S+20>>2]=a;o[a+24>>2]=S;break}}}while(0);if(i>>>0<16){P=i+e|0;o[t+4>>2]=P|3;P=t+(P+4)|0;o[P>>2]=o[P>>2]|1}else{o[t+4>>2]=e|3;o[t+(e|4)>>2]=i|1;o[t+(i+e)>>2]=i;s=o[1208]|0;if(s){a=o[1211]|0;f=s>>>3;l=f<<1;s=4864+(l<<2)|0;u=o[1206]|0;f=1<<f;if(u&f){u=4864+(l+2<<2)|0;f=o[u>>2]|0;if(f>>>0<(o[1210]|0)>>>0)Ge();else{M=u;L=f}}else{o[1206]=u|f;M=4864+(l+2<<2)|0;L=s}o[M>>2]=a;o[L+12>>2]=a;o[a+8>>2]=L;o[a+12>>2]=s}o[1208]=i;o[1211]=n}P=t+8|0;c=r;return P|0}}}else if(e>>>0<=4294967231){L=e+11|0;e=L&-8;S=o[1207]|0;if(S){M=0-e|0;L=L>>>8;if(L)if(e>>>0>16777215)k=31;else{R=(L+1048320|0)>>>16&8;P=L<<R;C=(P+520192|0)>>>16&4;P=P<<C;k=(P+245760|0)>>>16&2;k=14-(C|R|k)+(P<<k>>>15)|0;k=e>>>(k+7|0)&1|k<<1}else k=0;O=o[5128+(k<<2)>>2]|0;e:do{if(!O){C=0;L=0}else{if((k|0)==31)L=0;else L=25-(k>>>1)|0;C=0;N=e<<L;L=0;while(1){R=o[O+4>>2]&-8;P=R-e|0;if(P>>>0<M>>>0)if((R|0)==(e|0)){M=P;C=O;L=O;break e}else{M=P;L=O}P=o[O+20>>2]|0;O=o[O+(N>>>31<<2)+16>>2]|0;C=(P|0)==0|(P|0)==(O|0)?C:P;if(!O)break;else N=N<<1}}}while(0);if((C|0)==0&(L|0)==0){P=2<<k;S=S&(P|0-P);if(!S)break;P=(S&0-S)+-1|0;O=P>>>12&16;P=P>>>O;k=P>>>5&8;P=P>>>k;N=P>>>2&4;P=P>>>N;R=P>>>1&2;P=P>>>R;C=P>>>1&1;C=o[5128+((k|O|N|R|C)+(P>>>C)<<2)>>2]|0}if(C)while(1){P=(o[C+4>>2]&-8)-e|0;S=P>>>0<M>>>0;M=S?P:M;L=S?C:L;S=o[C+16>>2]|0;if(S){C=S;continue}C=o[C+20>>2]|0;if(!C)break}if((L|0)!=0?M>>>0<((o[1208]|0)-e|0)>>>0:0){n=o[1210]|0;if(L>>>0<n>>>0)Ge();i=L+e|0;if(L>>>0>=i>>>0)Ge();t=o[L+24>>2]|0;a=o[L+12>>2]|0;do{if((a|0)==(L|0)){s=L+20|0;a=o[s>>2]|0;if(!a){s=L+16|0;a=o[s>>2]|0;if(!a){E=0;break}}while(1){u=a+20|0;f=o[u>>2]|0;if(f){a=f;s=u;continue}u=a+16|0;f=o[u>>2]|0;if(!f)break;else{a=f;s=u}}if(s>>>0<n>>>0)Ge();else{o[s>>2]=0;E=a;break}}else{s=o[L+8>>2]|0;if(s>>>0<n>>>0)Ge();u=s+12|0;if((o[u>>2]|0)!=(L|0))Ge();n=a+8|0;if((o[n>>2]|0)==(L|0)){o[u>>2]=a;o[n>>2]=s;E=a;break}else Ge()}}while(0);do{if(t){n=o[L+28>>2]|0;a=5128+(n<<2)|0;if((L|0)==(o[a>>2]|0)){o[a>>2]=E;if(!E){o[1207]=o[1207]&~(1<<n);break}}else{if(t>>>0<(o[1210]|0)>>>0)Ge();n=t+16|0;if((o[n>>2]|0)==(L|0))o[n>>2]=E;else o[t+20>>2]=E;if(!E)break}n=o[1210]|0;if(E>>>0<n>>>0)Ge();o[E+24>>2]=t;t=o[L+16>>2]|0;do{if(t)if(t>>>0<n>>>0)Ge();else{o[E+16>>2]=t;o[t+24>>2]=E;break}}while(0);t=o[L+20>>2]|0;if(t)if(t>>>0<(o[1210]|0)>>>0)Ge();else{o[E+20>>2]=t;o[t+24>>2]=E;break}}}while(0);e:do{if(M>>>0>=16){o[L+4>>2]=e|3;o[L+(e|4)>>2]=M|1;o[L+(M+e)>>2]=M;n=M>>>3;if(M>>>0<256){s=n<<1;t=4864+(s<<2)|0;a=o[1206]|0;n=1<<n;do{if(!(a&n)){o[1206]=a|n;A=4864+(s+2<<2)|0;w=t}else{n=4864+(s+2<<2)|0;a=o[n>>2]|0;if(a>>>0>=(o[1210]|0)>>>0){A=n;w=a;break}Ge()}}while(0);o[A>>2]=i;o[w+12>>2]=i;o[L+(e+8)>>2]=w;o[L+(e+12)>>2]=t;break}t=M>>>8;if(t)if(M>>>0>16777215)t=31;else{R=(t+1048320|0)>>>16&8;P=t<<R;C=(P+520192|0)>>>16&4;P=P<<C;t=(P+245760|0)>>>16&2;t=14-(C|R|t)+(P<<t>>>15)|0;t=M>>>(t+7|0)&1|t<<1}else t=0;n=5128+(t<<2)|0;o[L+(e+28)>>2]=t;o[L+(e+20)>>2]=0;o[L+(e+16)>>2]=0;a=o[1207]|0;s=1<<t;if(!(a&s)){o[1207]=a|s;o[n>>2]=i;o[L+(e+24)>>2]=n;o[L+(e+12)>>2]=i;o[L+(e+8)>>2]=i;break}s=o[n>>2]|0;if((t|0)==31)t=0;else t=25-(t>>>1)|0;r:do{if((o[s+4>>2]&-8|0)!=(M|0)){t=M<<t;while(1){a=s+(t>>>31<<2)+16|0;n=o[a>>2]|0;if(!n)break;if((o[n+4>>2]&-8|0)==(M|0)){m=n;break r}else{t=t<<1;s=n}}if(a>>>0<(o[1210]|0)>>>0)Ge();else{o[a>>2]=i;o[L+(e+24)>>2]=s;o[L+(e+12)>>2]=i;o[L+(e+8)>>2]=i;break e}}else m=s}while(0);n=m+8|0;t=o[n>>2]|0;P=o[1210]|0;if(m>>>0>=P>>>0&t>>>0>=P>>>0){o[t+12>>2]=i;o[n>>2]=i;o[L+(e+8)>>2]=t;o[L+(e+12)>>2]=m;o[L+(e+24)>>2]=0;break}else Ge()}else{P=M+e|0;o[L+4>>2]=P|3;P=L+(P+4)|0;o[P>>2]=o[P>>2]|1}}while(0);P=L+8|0;c=r;return P|0}}}else e=-1}while(0);m=o[1208]|0;if(m>>>0>=e>>>0){t=m-e|0;i=o[1211]|0;if(t>>>0>15){o[1211]=i+e;o[1208]=t;o[i+(e+4)>>2]=t|1;o[i+m>>2]=t;o[i+4>>2]=e|3}else{o[1208]=0;o[1211]=0;o[i+4>>2]=m|3;P=i+(m+4)|0;o[P>>2]=o[P>>2]|1}P=i+8|0;c=r;return P|0}m=o[1209]|0;if(m>>>0>e>>>0){R=m-e|0;o[1209]=R;P=o[1212]|0;o[1212]=P+e;o[P+(e+4)>>2]=R|1;o[P+4>>2]=e|3;P=P+8|0;c=r;return P|0}do{if(!(o[1324]|0)){m=Fe(30)|0;if(!(m+-1&m)){o[1326]=m;o[1325]=m;o[1327]=-1;o[1328]=-1;o[1329]=0;o[1317]=0;o[1324]=(Qe(0)|0)&-16^1431655768;break}else Ge()}}while(0);E=e+48|0;m=o[1326]|0;A=e+47|0;M=m+A|0;m=0-m|0;w=M&m;if(w>>>0<=e>>>0){P=0;c=r;return P|0}L=o[1316]|0;if((L|0)!=0?(R=o[1314]|0,P=R+w|0,P>>>0<=R>>>0|P>>>0>L>>>0):0){P=0;c=r;return P|0}e:do{if(!(o[1317]&4)){S=o[1212]|0;r:do{if(S){L=5272|0;while(1){k=o[L>>2]|0;if(k>>>0<=S>>>0?(T=L+4|0,(k+(o[T>>2]|0)|0)>>>0>S>>>0):0)break;L=o[L+8>>2]|0;if(!L){d=181;break r}}if(L){M=M-(o[1209]|0)&m;if(M>>>0<2147483647){m=Oe(M|0)|0;if((m|0)==((o[L>>2]|0)+(o[T>>2]|0)|0)){L=M;d=190}else{L=M;d=191}}else L=0}else d=181}else d=181}while(0);do{if((d|0)==181){T=Oe(0)|0;if((T|0)!=(-1|0)){M=T;L=o[1325]|0;m=L+-1|0;if(!(m&M))L=w;else L=w-M+(m+M&0-L)|0;m=o[1314]|0;M=m+L|0;if(L>>>0>e>>>0&L>>>0<2147483647){P=o[1316]|0;if((P|0)!=0?M>>>0<=m>>>0|M>>>0>P>>>0:0){L=0;break}m=Oe(L|0)|0;if((m|0)==(T|0)){m=T;d=190}else d=191}else L=0}else L=0}}while(0);r:do{if((d|0)==190){if((m|0)!=(-1|0)){g=L;d=201;break e}}else if((d|0)==191){d=0-L|0;do{if((m|0)!=(-1|0)&L>>>0<2147483647&E>>>0>L>>>0?(y=o[1326]|0,y=A-L+y&0-y,y>>>0<2147483647):0)if((Oe(y|0)|0)==(-1|0)){Oe(d|0)|0;L=0;break r}else{L=y+L|0;break}}while(0);if((m|0)==(-1|0))L=0;else{g=L;d=201;break e}}}while(0);o[1317]=o[1317]|4;d=198}else{L=0;d=198}}while(0);if((((d|0)==198?w>>>0<2147483647:0)?(b=Oe(w|0)|0,v=Oe(0)|0,(b|0)!=(-1|0)&(v|0)!=(-1|0)&b>>>0<v>>>0):0)?(p=v-b|0,g=p>>>0>(e+40|0)>>>0,g):0){m=b;g=g?p:L;d=201}if((d|0)==201){p=(o[1314]|0)+g|0;o[1314]=p;if(p>>>0>(o[1315]|0)>>>0)o[1315]=p;p=o[1212]|0;e:do{if(p){b=5272|0;while(1){v=o[b>>2]|0;w=b+4|0;A=o[w>>2]|0;if((m|0)==(v+A|0)){d=213;break}y=o[b+8>>2]|0;if(!y)break;else b=y}if(((d|0)==213?(o[b+12>>2]&8|0)==0:0)?p>>>0>=v>>>0&p>>>0<m>>>0:0){o[w>>2]=A+g;i=(o[1209]|0)+g|0;t=p+8|0;if(!(t&7))t=0;else t=0-t&7;P=i-t|0;o[1212]=p+t;o[1209]=P;o[p+(t+4)>>2]=P|1;o[p+(i+4)>>2]=40;o[1213]=o[1328];break}v=o[1210]|0;if(m>>>0<v>>>0){o[1210]=m;v=m}w=m+g|0;b=5272|0;while(1){if((o[b>>2]|0)==(w|0)){d=223;break}y=o[b+8>>2]|0;if(!y)break;else b=y}if((d|0)==223?(o[b+12>>2]&8|0)==0:0){o[b>>2]=m;s=b+4|0;o[s>>2]=(o[s>>2]|0)+g;s=m+8|0;if(!(s&7))s=0;else s=0-s&7;u=m+(g+8)|0;if(!(u&7))_=0;else _=0-u&7;d=m+(_+g)|0;f=s+e|0;u=m+f|0;h=d-(m+s)-e|0;o[m+(s+4)>>2]=e|3;r:do{if((d|0)!=(p|0)){if((d|0)==(o[1211]|0)){P=(o[1208]|0)+h|0;o[1208]=P;o[1211]=u;o[m+(f+4)>>2]=P|1;o[m+(P+f)>>2]=P;break}p=g+4|0;y=o[m+(p+_)>>2]|0;if((y&3|0)==1){e=y&-8;b=y>>>3;i:do{if(y>>>0>=256){l=o[m+((_|24)+g)>>2]|0;b=o[m+(g+12+_)>>2]|0;do{if((b|0)==(d|0)){w=_|16;y=m+(p+w)|0;b=o[y>>2]|0;if(!b){y=m+(w+g)|0;b=o[y>>2]|0;if(!b){a=0;break}}while(1){A=b+20|0;w=o[A>>2]|0;if(w){b=w;y=A;continue}A=b+16|0;w=o[A>>2]|0;if(!w)break;else{b=w;y=A}}if(y>>>0<v>>>0)Ge();else{o[y>>2]=0;a=b;break}}else{y=o[m+((_|8)+g)>>2]|0;if(y>>>0<v>>>0)Ge();w=y+12|0;if((o[w>>2]|0)!=(d|0))Ge();v=b+8|0;if((o[v>>2]|0)==(d|0)){o[w>>2]=b;o[v>>2]=y;a=b;break}else Ge()}}while(0);if(!l)break;v=o[m+(g+28+_)>>2]|0;b=5128+(v<<2)|0;do{if((d|0)!=(o[b>>2]|0)){if(l>>>0<(o[1210]|0)>>>0)Ge();v=l+16|0;if((o[v>>2]|0)==(d|0))o[v>>2]=a;else o[l+20>>2]=a;if(!a)break i}else{o[b>>2]=a;if(a)break;o[1207]=o[1207]&~(1<<v);break i}}while(0);d=o[1210]|0;if(a>>>0<d>>>0)Ge();o[a+24>>2]=l;v=_|16;l=o[m+(v+g)>>2]|0;do{if(l)if(l>>>0<d>>>0)Ge();else{o[a+16>>2]=l;o[l+24>>2]=a;break}}while(0);l=o[m+(p+v)>>2]|0;if(!l)break;if(l>>>0<(o[1210]|0)>>>0)Ge();else{o[a+20>>2]=l;o[l+24>>2]=a;break}}else{a=o[m+((_|8)+g)>>2]|0;p=o[m+(g+12+_)>>2]|0;y=4864+(b<<1<<2)|0;do{if((a|0)!=(y|0)){if(a>>>0<v>>>0)Ge();if((o[a+12>>2]|0)==(d|0))break;Ge()}}while(0);if((p|0)==(a|0)){o[1206]=o[1206]&~(1<<b);break}do{if((p|0)==(y|0))l=p+8|0;else{if(p>>>0<v>>>0)Ge();v=p+8|0;if((o[v>>2]|0)==(d|0)){l=v;break}Ge()}}while(0);o[a+12>>2]=p;o[l>>2]=a}}while(0);d=m+((e|_)+g)|0;h=e+h|0}a=d+4|0;o[a>>2]=o[a>>2]&-2;o[m+(f+4)>>2]=h|1;o[m+(h+f)>>2]=h;a=h>>>3;if(h>>>0<256){l=a<<1;i=4864+(l<<2)|0;h=o[1206]|0;a=1<<a;do{if(!(h&a)){o[1206]=h|a;n=4864+(l+2<<2)|0;t=i}else{l=4864+(l+2<<2)|0;a=o[l>>2]|0;if(a>>>0>=(o[1210]|0)>>>0){n=l;t=a;break}Ge()}}while(0);o[n>>2]=u;o[t+12>>2]=u;o[m+(f+8)>>2]=t;o[m+(f+12)>>2]=i;break}t=h>>>8;do{if(!t)t=0;else{if(h>>>0>16777215){t=31;break}R=(t+1048320|0)>>>16&8;P=t<<R;C=(P+520192|0)>>>16&4;P=P<<C;t=(P+245760|0)>>>16&2;t=14-(C|R|t)+(P<<t>>>15)|0;t=h>>>(t+7|0)&1|t<<1}}while(0);l=5128+(t<<2)|0;o[m+(f+28)>>2]=t;o[m+(f+20)>>2]=0;o[m+(f+16)>>2]=0;a=o[1207]|0;n=1<<t;if(!(a&n)){o[1207]=a|n;o[l>>2]=u;o[m+(f+24)>>2]=l;o[m+(f+12)>>2]=u;o[m+(f+8)>>2]=u;break}n=o[l>>2]|0;if((t|0)==31)t=0;else t=25-(t>>>1)|0;i:do{if((o[n+4>>2]&-8|0)!=(h|0)){t=h<<t;while(1){a=n+(t>>>31<<2)+16|0;l=o[a>>2]|0;if(!l)break;if((o[l+4>>2]&-8|0)==(h|0)){i=l;break i}else{t=t<<1;n=l}}if(a>>>0<(o[1210]|0)>>>0)Ge();else{o[a>>2]=u;o[m+(f+24)>>2]=n;o[m+(f+12)>>2]=u;o[m+(f+8)>>2]=u;break r}}else i=n}while(0);t=i+8|0;n=o[t>>2]|0;P=o[1210]|0;if(i>>>0>=P>>>0&n>>>0>=P>>>0){o[n+12>>2]=u;o[t>>2]=u;o[m+(f+8)>>2]=n;o[m+(f+12)>>2]=i;o[m+(f+24)>>2]=0;break}else Ge()}else{P=(o[1209]|0)+h|0;o[1209]=P;o[1212]=u;o[m+(f+4)>>2]=P|1}}while(0);P=m+(s|8)|0;c=r;return P|0}t=5272|0;while(1){i=o[t>>2]|0;if(i>>>0<=p>>>0?(_=o[t+4>>2]|0,h=i+_|0,h>>>0>p>>>0):0)break;t=o[t+8>>2]|0}t=i+(_+-39)|0;if(!(t&7))t=0;else t=0-t&7;i=i+(_+-47+t)|0;i=i>>>0<(p+16|0)>>>0?p:i;t=i+8|0;n=m+8|0;if(!(n&7))n=0;else n=0-n&7;P=g+-40-n|0;o[1212]=m+n;o[1209]=P;o[m+(n+4)>>2]=P|1;o[m+(g+-36)>>2]=40;o[1213]=o[1328];o[i+4>>2]=27;o[t+0>>2]=o[1318];o[t+4>>2]=o[1319];o[t+8>>2]=o[1320];o[t+12>>2]=o[1321];o[1318]=m;o[1319]=g;o[1321]=0;o[1320]=t;t=i+28|0;o[t>>2]=7;if((i+32|0)>>>0<h>>>0)do{P=t;t=t+4|0;o[t>>2]=7}while((P+8|0)>>>0<h>>>0);if((i|0)!=(p|0)){i=i-p|0;t=p+(i+4)|0;o[t>>2]=o[t>>2]&-2;o[p+4>>2]=i|1;o[p+i>>2]=i;t=i>>>3;if(i>>>0<256){n=t<<1;i=4864+(n<<2)|0;a=o[1206]|0;t=1<<t;do{if(!(a&t)){o[1206]=a|t;f=4864+(n+2<<2)|0;u=i}else{n=4864+(n+2<<2)|0;t=o[n>>2]|0;if(t>>>0>=(o[1210]|0)>>>0){f=n;u=t;break}Ge()}}while(0);o[f>>2]=p;o[u+12>>2]=p;o[p+8>>2]=u;o[p+12>>2]=i;break}t=i>>>8;if(t)if(i>>>0>16777215)t=31;else{R=(t+1048320|0)>>>16&8;P=t<<R;C=(P+520192|0)>>>16&4;P=P<<C;t=(P+245760|0)>>>16&2;t=14-(C|R|t)+(P<<t>>>15)|0;t=i>>>(t+7|0)&1|t<<1}else t=0;u=5128+(t<<2)|0;o[p+28>>2]=t;o[p+20>>2]=0;o[p+16>>2]=0;n=o[1207]|0;a=1<<t;if(!(n&a)){o[1207]=n|a;o[u>>2]=p;o[p+24>>2]=u;o[p+12>>2]=p;o[p+8>>2]=p;break}n=o[u>>2]|0;if((t|0)==31)t=0;else t=25-(t>>>1)|0;r:do{if((o[n+4>>2]&-8|0)!=(i|0)){t=i<<t;u=n;while(1){n=u+(t>>>31<<2)+16|0;a=o[n>>2]|0;if(!a)break;if((o[a+4>>2]&-8|0)==(i|0)){s=a;break r}else{t=t<<1;u=a}}if(n>>>0<(o[1210]|0)>>>0)Ge();else{o[n>>2]=p;o[p+24>>2]=u;o[p+12>>2]=p;o[p+8>>2]=p;break e}}else s=n}while(0);t=s+8|0;i=o[t>>2]|0;P=o[1210]|0;if(s>>>0>=P>>>0&i>>>0>=P>>>0){o[i+12>>2]=p;o[t>>2]=p;o[p+8>>2]=i;o[p+12>>2]=s;o[p+24>>2]=0;break}else Ge()}}else{P=o[1210]|0;if((P|0)==0|m>>>0<P>>>0)o[1210]=m;o[1318]=m;o[1319]=g;o[1321]=0;o[1215]=o[1324];o[1214]=-1;i=0;do{P=i<<1;R=4864+(P<<2)|0;o[4864+(P+3<<2)>>2]=R;o[4864+(P+2<<2)>>2]=R;i=i+1|0}while((i|0)!=32);i=m+8|0;if(!(i&7))i=0;else i=0-i&7;P=g+-40-i|0;o[1212]=m+i;o[1209]=P;o[m+(i+4)>>2]=P|1;o[m+(g+-36)>>2]=40;o[1213]=o[1328]}}while(0);i=o[1209]|0;if(i>>>0>e>>>0){R=i-e|0;o[1209]=R;P=o[1212]|0;o[1212]=P+e;o[P+(e+4)>>2]=R|1;o[P+4>>2]=e|3;P=P+8|0;c=r;return P|0}}o[(je()|0)>>2]=12;P=0;c=r;return P|0}function Ut(e){e=e|0;var r=0,i=0,t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0,A=0;r=c;if(!e){c=r;return}g=e+-8|0;p=o[1210]|0;if(g>>>0<p>>>0)Ge();_=o[e+-4>>2]|0;h=_&3;if((h|0)==1)Ge();u=_&-8;s=e+(u+-8)|0;do{if(!(_&1)){y=o[g>>2]|0;if(!h){c=r;return}g=-8-y|0;_=e+g|0;h=y+u|0;if(_>>>0<p>>>0)Ge();if((_|0)==(o[1211]|0)){t=e+(u+-4)|0;d=o[t>>2]|0;if((d&3|0)!=3){t=_;d=h;break}o[1208]=h;o[t>>2]=d&-2;o[e+(g+4)>>2]=h|1;o[s>>2]=h;c=r;return}b=y>>>3;if(y>>>0<256){t=o[e+(g+8)>>2]|0;d=o[e+(g+12)>>2]|0;m=4864+(b<<1<<2)|0;if((t|0)!=(m|0)){if(t>>>0<p>>>0)Ge();if((o[t+12>>2]|0)!=(_|0))Ge()}if((d|0)==(t|0)){o[1206]=o[1206]&~(1<<b);t=_;d=h;break}if((d|0)!=(m|0)){if(d>>>0<p>>>0)Ge();m=d+8|0;if((o[m>>2]|0)==(_|0))v=m;else Ge()}else v=d+8|0;o[t+12>>2]=d;o[v>>2]=t;t=_;d=h;break}v=o[e+(g+24)>>2]|0;b=o[e+(g+12)>>2]|0;do{if((b|0)==(_|0)){y=e+(g+20)|0;b=o[y>>2]|0;if(!b){y=e+(g+16)|0;b=o[y>>2]|0;if(!b){m=0;break}}while(1){w=b+20|0;A=o[w>>2]|0;if(A){b=A;y=w;continue}w=b+16|0;A=o[w>>2]|0;if(!A)break;else{b=A;y=w}}if(y>>>0<p>>>0)Ge();else{o[y>>2]=0;m=b;break}}else{y=o[e+(g+8)>>2]|0;if(y>>>0<p>>>0)Ge();p=y+12|0;if((o[p>>2]|0)!=(_|0))Ge();w=b+8|0;if((o[w>>2]|0)==(_|0)){o[p>>2]=b;o[w>>2]=y;m=b;break}else Ge()}}while(0);if(v){p=o[e+(g+28)>>2]|0;b=5128+(p<<2)|0;if((_|0)==(o[b>>2]|0)){o[b>>2]=m;if(!m){o[1207]=o[1207]&~(1<<p);t=_;d=h;break}}else{if(v>>>0<(o[1210]|0)>>>0)Ge();p=v+16|0;if((o[p>>2]|0)==(_|0))o[p>>2]=m;else o[v+20>>2]=m;if(!m){t=_;d=h;break}}p=o[1210]|0;if(m>>>0<p>>>0)Ge();o[m+24>>2]=v;v=o[e+(g+16)>>2]|0;do{if(v)if(v>>>0<p>>>0)Ge();else{o[m+16>>2]=v;o[v+24>>2]=m;break}}while(0);g=o[e+(g+20)>>2]|0;if(g)if(g>>>0<(o[1210]|0)>>>0)Ge();else{o[m+20>>2]=g;o[g+24>>2]=m;t=_;d=h;break}else{t=_;d=h}}else{t=_;d=h}}else{t=g;d=u}}while(0);if(t>>>0>=s>>>0)Ge();h=e+(u+-4)|0;_=o[h>>2]|0;if(!(_&1))Ge();if(!(_&2)){if((s|0)==(o[1212]|0)){A=(o[1209]|0)+d|0;o[1209]=A;o[1212]=t;o[t+4>>2]=A|1;if((t|0)!=(o[1211]|0)){c=r;return}o[1211]=0;o[1208]=0;c=r;return}if((s|0)==(o[1211]|0)){A=(o[1208]|0)+d|0;o[1208]=A;o[1211]=t;o[t+4>>2]=A|1;o[t+A>>2]=A;c=r;return}d=(_&-8)+d|0;h=_>>>3;do{if(_>>>0>=256){l=o[e+(u+16)>>2]|0;h=o[e+(u|4)>>2]|0;do{if((h|0)==(s|0)){_=e+(u+12)|0;h=o[_>>2]|0;if(!h){_=e+(u+8)|0;h=o[_>>2]|0;if(!h){f=0;break}}while(1){g=h+20|0;m=o[g>>2]|0;if(m){h=m;_=g;continue}m=h+16|0;g=o[m>>2]|0;if(!g)break;else{h=g;_=m}}if(_>>>0<(o[1210]|0)>>>0)Ge();else{o[_>>2]=0;f=h;break}}else{_=o[e+u>>2]|0;if(_>>>0<(o[1210]|0)>>>0)Ge();m=_+12|0;if((o[m>>2]|0)!=(s|0))Ge();g=h+8|0;if((o[g>>2]|0)==(s|0)){o[m>>2]=h;o[g>>2]=_;f=h;break}else Ge()}}while(0);if(l){h=o[e+(u+20)>>2]|0;_=5128+(h<<2)|0;if((s|0)==(o[_>>2]|0)){o[_>>2]=f;if(!f){o[1207]=o[1207]&~(1<<h);break}}else{if(l>>>0<(o[1210]|0)>>>0)Ge();h=l+16|0;if((o[h>>2]|0)==(s|0))o[h>>2]=f;else o[l+20>>2]=f;if(!f)break}s=o[1210]|0;if(f>>>0<s>>>0)Ge();o[f+24>>2]=l;l=o[e+(u+8)>>2]|0;do{if(l)if(l>>>0<s>>>0)Ge();else{o[f+16>>2]=l;o[l+24>>2]=f;break}}while(0);s=o[e+(u+12)>>2]|0;if(s)if(s>>>0<(o[1210]|0)>>>0)Ge();else{o[f+20>>2]=s;o[s+24>>2]=f;break}}}else{f=o[e+u>>2]|0;u=o[e+(u|4)>>2]|0;e=4864+(h<<1<<2)|0;if((f|0)!=(e|0)){if(f>>>0<(o[1210]|0)>>>0)Ge();if((o[f+12>>2]|0)!=(s|0))Ge()}if((u|0)==(f|0)){o[1206]=o[1206]&~(1<<h);break}if((u|0)!=(e|0)){if(u>>>0<(o[1210]|0)>>>0)Ge();e=u+8|0;if((o[e>>2]|0)==(s|0))l=e;else Ge()}else l=u+8|0;o[f+12>>2]=u;o[l>>2]=f}}while(0);o[t+4>>2]=d|1;o[t+d>>2]=d;if((t|0)==(o[1211]|0)){o[1208]=d;c=r;return}}else{o[h>>2]=_&-2;o[t+4>>2]=d|1;o[t+d>>2]=d}s=d>>>3;if(d>>>0<256){u=s<<1;i=4864+(u<<2)|0;f=o[1206]|0;s=1<<s;if(f&s){u=4864+(u+2<<2)|0;s=o[u>>2]|0;if(s>>>0<(o[1210]|0)>>>0)Ge();else{n=u;a=s}}else{o[1206]=f|s;n=4864+(u+2<<2)|0;a=i}o[n>>2]=t;o[a+12>>2]=t;o[t+8>>2]=a;o[t+12>>2]=i;c=r;return}n=d>>>8;if(n)if(d>>>0>16777215)n=31;else{w=(n+1048320|0)>>>16&8;A=n<<w;y=(A+520192|0)>>>16&4;A=A<<y;n=(A+245760|0)>>>16&2;n=14-(y|w|n)+(A<<n>>>15)|0;n=d>>>(n+7|0)&1|n<<1}else n=0;a=5128+(n<<2)|0;o[t+28>>2]=n;o[t+20>>2]=0;o[t+16>>2]=0;u=o[1207]|0;s=1<<n;e:do{if(u&s){a=o[a>>2]|0;if((n|0)==31)n=0;else n=25-(n>>>1)|0;r:do{if((o[a+4>>2]&-8|0)!=(d|0)){n=d<<n;while(1){u=a+(n>>>31<<2)+16|0;s=o[u>>2]|0;if(!s)break;if((o[s+4>>2]&-8|0)==(d|0)){i=s;break r}else{n=n<<1;a=s}}if(u>>>0<(o[1210]|0)>>>0)Ge();else{o[u>>2]=t;o[t+24>>2]=a;o[t+12>>2]=t;o[t+8>>2]=t;break e}}else i=a}while(0);a=i+8|0;n=o[a>>2]|0;A=o[1210]|0;if(i>>>0>=A>>>0&n>>>0>=A>>>0){o[n+12>>2]=t;o[a>>2]=t;o[t+8>>2]=n;o[t+12>>2]=i;o[t+24>>2]=0;break}else Ge()}else{o[1207]=u|s;o[a>>2]=t;o[t+24>>2]=a;o[t+12>>2]=t;o[t+8>>2]=t}}while(0);A=(o[1214]|0)+-1|0;o[1214]=A;if(!A)i=5280|0;else{c=r;return}while(1){i=o[i>>2]|0;if(!i)break;else i=i+8|0}o[1214]=-1;c=r;return}function Ht(e,r){e=e|0;r=r|0;var i=0,t=0,n=0;i=c;do{if(e){if(r>>>0>4294967231){o[(je()|0)>>2]=12;t=0;break}if(r>>>0<11)t=16;else t=r+11&-8;t=Qt(e+-8|0,t)|0;if(t){t=t+8|0;break}t=Bt(r)|0;if(!t)t=0;else{n=o[e+-4>>2]|0;n=(n&-8)-((n&3|0)==0?8:4)|0;ln(t|0,e|0,(n>>>0<r>>>0?n:r)|0)|0;Ut(e)}}else t=Bt(r)|0}while(0);c=i;return t|0}function Vt(e){e=e|0;if((e|0)==32)e=1;else e=(e+-9|0)>>>0<5;return e&1|0}function $t(e,r,i,n,s){e=e|0;r=r|0;i=i|0;n=n|0;s=s|0;var u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0;u=c;if(r>>>0>36){o[(je()|0)>>2]=22;v=0;b=0;I=v;c=u;return b|0}f=e+4|0;l=e+100|0;do{h=o[f>>2]|0;if(h>>>0<(o[l>>2]|0)>>>0){o[f>>2]=h+1;d=a[h>>0]|0}else d=qt(e)|0}while((Vt(d)|0)!=0);do{if((d|0)==43|(d|0)==45){h=((d|0)==45)<<31>>31;_=o[f>>2]|0;if(_>>>0<(o[l>>2]|0)>>>0){o[f>>2]=_+1;d=a[_>>0]|0;break}else{d=qt(e)|0;break}}else h=0}while(0);_=(r|0)==0;do{if((r&-17|0)==0&(d|0)==48){d=o[f>>2]|0;if(d>>>0<(o[l>>2]|0)>>>0){o[f>>2]=d+1;d=a[d>>0]|0}else d=qt(e)|0;if((d|32|0)!=120)if(_){r=8;i=46;break}else{i=32;break}r=o[f>>2]|0;if(r>>>0<(o[l>>2]|0)>>>0){o[f>>2]=r+1;d=a[r>>0]|0}else d=qt(e)|0;if((a[d+5321>>0]|0)>15){n=(o[l>>2]|0)==0;if(!n)o[f>>2]=(o[f>>2]|0)+-1;if(!i){Wt(e,0);v=0;b=0;I=v;c=u;return b|0}if(n){v=0;b=0;I=v;c=u;return b|0}o[f>>2]=(o[f>>2]|0)+-1;v=0;b=0;I=v;c=u;return b|0}else{r=16;i=46}}else{r=_?10:r;if((a[d+5321>>0]|0)>>>0<r>>>0)i=32;else{if(o[l>>2]|0)o[f>>2]=(o[f>>2]|0)+-1;Wt(e,0);o[(je()|0)>>2]=22;v=0;b=0;I=v;c=u;return b|0}}}while(0);if((i|0)==32)if((r|0)==10){r=d+-48|0;if(r>>>0<10){_=0;do{_=(_*10|0)+r|0;r=o[f>>2]|0;if(r>>>0<(o[l>>2]|0)>>>0){o[f>>2]=r+1;d=a[r>>0]|0}else d=qt(e)|0;r=d+-48|0}while(r>>>0<10&_>>>0<429496729);m=0}else{_=0;m=0}r=d+-48|0;if(r>>>0<10){do{g=pn(_|0,m|0,10,0)|0;p=I;v=((r|0)<0)<<31>>31;b=~v;if(p>>>0>b>>>0|(p|0)==(b|0)&g>>>0>~r>>>0)break;_=un(g|0,p|0,r|0,v|0)|0;m=I;r=o[f>>2]|0;if(r>>>0<(o[l>>2]|0)>>>0){o[f>>2]=r+1;d=a[r>>0]|0}else d=qt(e)|0;r=d+-48|0}while(r>>>0<10&(m>>>0<429496729|(m|0)==429496729&_>>>0<2576980378));if(r>>>0<=9){r=10;i=72}}}else i=46;e:do{if((i|0)==46){if(!(r+-1&r)){i=t[5584+((r*23|0)>>>5&7)>>0]|0;p=t[d+5321>>0]|0;_=p&255;if(_>>>0<r>>>0){d=_;_=0;do{_=d|_<<i;d=o[f>>2]|0;if(d>>>0<(o[l>>2]|0)>>>0){o[f>>2]=d+1;v=a[d>>0]|0}else v=qt(e)|0;p=t[v+5321>>0]|0;d=p&255}while(d>>>0<r>>>0&_>>>0<134217728);m=0}else{m=0;_=0;v=d}d=fn(-1,-1,i|0)|0;g=I;if((p&255)>>>0>=r>>>0|(m>>>0>g>>>0|(m|0)==(g|0)&_>>>0>d>>>0)){d=v;i=72;break}while(1){_=an(_|0,m|0,i|0)|0;m=I;_=p&255|_;p=o[f>>2]|0;if(p>>>0<(o[l>>2]|0)>>>0){o[f>>2]=p+1;v=a[p>>0]|0}else v=qt(e)|0;p=t[v+5321>>0]|0;if((p&255)>>>0>=r>>>0|(m>>>0>g>>>0|(m|0)==(g|0)&_>>>0>d>>>0)){d=v;i=72;break e}}}p=t[d+5321>>0]|0;i=p&255;if(i>>>0<r>>>0){_=0;do{_=i+(ne(_,r)|0)|0;i=o[f>>2]|0;if(i>>>0<(o[l>>2]|0)>>>0){o[f>>2]=i+1;g=a[i>>0]|0}else g=qt(e)|0;p=t[g+5321>>0]|0;i=p&255}while(i>>>0<r>>>0&_>>>0<119304647);m=0}else{_=0;m=0;g=d}if((p&255)>>>0<r>>>0){i=vn(-1,-1,r|0,0)|0;d=I;while(1){if(m>>>0>d>>>0|(m|0)==(d|0)&_>>>0>i>>>0){d=g;i=72;break e}v=pn(_|0,m|0,r|0,0)|0;b=I;p=p&255;if(b>>>0>4294967295|(b|0)==-1&v>>>0>~p>>>0){d=g;i=72;break e}_=un(p|0,0,v|0,b|0)|0;m=I;g=o[f>>2]|0;if(g>>>0<(o[l>>2]|0)>>>0){o[f>>2]=g+1;g=a[g>>0]|0}else g=qt(e)|0;p=t[g+5321>>0]|0;if((p&255)>>>0>=r>>>0){d=g;i=72;break}}}else{d=g;i=72}}}while(0);if((i|0)==72)if((a[d+5321>>0]|0)>>>0<r>>>0){do{i=o[f>>2]|0;if(i>>>0<(o[l>>2]|0)>>>0){o[f>>2]=i+1;i=a[i>>0]|0}else i=qt(e)|0}while((a[i+5321>>0]|0)>>>0<r>>>0);o[(je()|0)>>2]=34;m=s;_=n}if(o[l>>2]|0)o[f>>2]=(o[f>>2]|0)+-1;if(!(m>>>0<s>>>0|(m|0)==(s|0)&_>>>0<n>>>0)){if(!((n&1|0)!=0|0!=0|(h|0)!=0)){o[(je()|0)>>2]=34;b=un(n|0,s|0,-1,-1)|0;v=I;I=v;c=u;return b|0}if(m>>>0>s>>>0|(m|0)==(s|0)&_>>>0>n>>>0){o[(je()|0)>>2]=34;v=s;b=n;I=v;c=u;return b|0}}b=((h|0)<0)<<31>>31;b=nn(_^h|0,m^b|0,h|0,b|0)|0;v=I;I=v;c=u;return b|0}function jt(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0.0,p=0,v=0,b=0,y=0,w=0,A=0,L=0,M=0,S=0,k=0,O=0,N=0,C=0.0,R=0,P=0.0,F=0.0,x=0.0,D=0.0;n=c;c=c+512|0;f=n;if(!r){r=24;u=-149}else if((r|0)==2){r=53;u=-1074}else if((r|0)==1){r=53;u=-1074}else{F=0.0;c=n;return+F}_=e+4|0;d=e+100|0;do{s=o[_>>2]|0;if(s>>>0<(o[d>>2]|0)>>>0){o[_>>2]=s+1;y=a[s>>0]|0}else y=qt(e)|0}while((Vt(y)|0)!=0);do{if((y|0)==43|(y|0)==45){s=1-(((y|0)==45&1)<<1)|0;h=o[_>>2]|0;if(h>>>0<(o[d>>2]|0)>>>0){o[_>>2]=h+1;y=a[h>>0]|0;break}else{y=qt(e)|0;break}}else s=1}while(0);p=0;do{if((y|32|0)!=(t[5600+p>>0]|0))break;do{if(p>>>0<7){h=o[_>>2]|0;if(h>>>0<(o[d>>2]|0)>>>0){o[_>>2]=h+1;y=a[h>>0]|0;break}else{y=qt(e)|0;break}}}while(0);p=p+1|0}while(p>>>0<8);do{if((p|0)==3)m=23;else if((p|0)!=8){h=(i|0)!=0;if(p>>>0>3&h)if((p|0)==8)break;else{m=23;break}e:do{if(!p){p=0;do{if((y|32|0)!=(t[5616+p>>0]|0))break e;do{if(p>>>0<2){v=o[_>>2]|0;if(v>>>0<(o[d>>2]|0)>>>0){o[_>>2]=v+1;y=a[v>>0]|0;break}else{y=qt(e)|0;break}}}while(0);p=p+1|0}while(p>>>0<3)}}while(0);if(!p){do{if((y|0)==48){h=o[_>>2]|0;if(h>>>0<(o[d>>2]|0)>>>0){o[_>>2]=h+1;h=a[h>>0]|0}else h=qt(e)|0;if((h|32|0)!=120){if(!(o[d>>2]|0)){y=48;break}o[_>>2]=(o[_>>2]|0)+-1;y=48;break}f=o[_>>2]|0;if(f>>>0<(o[d>>2]|0)>>>0){o[_>>2]=f+1;L=a[f>>0]|0;w=0}else{L=qt(e)|0;w=0}while(1){if((L|0)==46){m=70;break}else if((L|0)!=48){f=0;h=0;v=0;p=0;y=0;A=0;C=1.0;b=0;g=0.0;break}f=o[_>>2]|0;if(f>>>0<(o[d>>2]|0)>>>0){o[_>>2]=f+1;L=a[f>>0]|0;w=1;continue}else{L=qt(e)|0;w=1;continue}}if((m|0)==70){f=o[_>>2]|0;if(f>>>0<(o[d>>2]|0)>>>0){o[_>>2]=f+1;L=a[f>>0]|0}else L=qt(e)|0;if((L|0)==48){v=0;p=0;do{f=o[_>>2]|0;if(f>>>0<(o[d>>2]|0)>>>0){o[_>>2]=f+1;L=a[f>>0]|0}else L=qt(e)|0;v=un(v|0,p|0,-1,-1)|0;p=I}while((L|0)==48);f=0;h=0;w=1;y=1;A=0;C=1.0;b=0;g=0.0}else{f=0;h=0;v=0;p=0;y=1;A=0;C=1.0;b=0;g=0.0}}e:while(1){S=L+-48|0;do{if(S>>>0>=10){M=L|32;k=(L|0)==46;if(!((M+-97|0)>>>0<6|k))break e;if(k)if(!y){v=h;p=f;y=1;break}else{L=46;break e}else{S=(L|0)>57?M+-87|0:S;m=83;break}}else m=83}while(0);if((m|0)==83){m=0;do{if(!((f|0)<0|(f|0)==0&h>>>0<8)){if((f|0)<0|(f|0)==0&h>>>0<14){F=C*.0625;P=F;g=g+F*+(S|0);break}if((S|0)==0|(A|0)!=0)P=C;else{A=1;P=C;g=g+C*.5}}else{P=C;b=S+(b<<4)|0}}while(0);h=un(h|0,f|0,1,0)|0;f=I;w=1;C=P}L=o[_>>2]|0;if(L>>>0<(o[d>>2]|0)>>>0){o[_>>2]=L+1;L=a[L>>0]|0;continue}else{L=qt(e)|0;continue}}if(!w){r=(o[d>>2]|0)==0;if(!r)o[_>>2]=(o[_>>2]|0)+-1;if(i){if(!r?(l=o[_>>2]|0,o[_>>2]=l+-1,(y|0)!=0):0)o[_>>2]=l+-2}else Wt(e,0);F=+(s|0)*0.0;c=n;return+F}m=(y|0)==0;l=m?h:v;m=m?f:p;if((f|0)<0|(f|0)==0&h>>>0<8)do{b=b<<4;h=un(h|0,f|0,1,0)|0;f=I}while((f|0)<0|(f|0)==0&h>>>0<8);do{if((L|32|0)==112){h=rn(e,i)|0;f=I;if((h|0)==0&(f|0)==-2147483648)if(!i){Wt(e,0);F=0.0;c=n;return+F}else{if(!(o[d>>2]|0)){h=0;f=0;break}o[_>>2]=(o[_>>2]|0)+-1;h=0;f=0;break}}else if(!(o[d>>2]|0)){h=0;f=0}else{o[_>>2]=(o[_>>2]|0)+-1;h=0;f=0}}while(0);l=an(l|0,m|0,2)|0;l=un(l|0,I|0,-32,-1)|0;f=un(l|0,I|0,h|0,f|0)|0;l=I;if(!b){F=+(s|0)*0.0;c=n;return+F}if((l|0)>0|(l|0)==0&f>>>0>(0-u|0)>>>0){o[(je()|0)>>2]=34;F=+(s|0)*1.7976931348623157e+308*1.7976931348623157e+308;c=n;return+F}R=u+-106|0;N=((R|0)<0)<<31>>31;if((l|0)<(N|0)|(l|0)==(N|0)&f>>>0<R>>>0){o[(je()|0)>>2]=34;F=+(s|0)*2.2250738585072014e-308*2.2250738585072014e-308;c=n;return+F}if((b|0)>-1)do{b=b<<1;if(!(g>=.5))C=g;else{C=g+-1.0;b=b|1}g=g+C;f=un(f|0,l|0,-1,-1)|0;l=I}while((b|0)>-1);u=nn(32,0,u|0,((u|0)<0)<<31>>31|0)|0;u=un(f|0,l|0,u|0,I|0)|0;R=I;if(0>(R|0)|0==(R|0)&r>>>0>u>>>0)if((u|0)<0){r=0;m=126}else{r=u;m=124}else m=124;if((m|0)==124)if((r|0)<53)m=126;else{u=r;C=+(s|0);P=0.0}if((m|0)==126){P=+(s|0);u=r;C=P;P=+Ze(+ +zt(1.0,84-r|0),+P)}R=(u|0)<32&g!=0.0&(b&1|0)==0;g=C*(R?0.0:g)+(P+C*+(((R&1)+b|0)>>>0))-P;if(!(g!=0.0))o[(je()|0)>>2]=34;F=+Kt(g,f);c=n;return+F}}while(0);h=u+r|0;l=0-h|0;S=0;while(1){if((y|0)==46){m=137;break}else if((y|0)!=48){O=0;k=0;M=0;break}p=o[_>>2]|0;if(p>>>0<(o[d>>2]|0)>>>0){o[_>>2]=p+1;y=a[p>>0]|0;S=1;continue}else{y=qt(e)|0;S=1;continue}}if((m|0)==137){m=o[_>>2]|0;if(m>>>0<(o[d>>2]|0)>>>0){o[_>>2]=m+1;y=a[m>>0]|0}else y=qt(e)|0;if((y|0)==48){O=0;k=0;do{O=un(O|0,k|0,-1,-1)|0;k=I;m=o[_>>2]|0;if(m>>>0<(o[d>>2]|0)>>>0){o[_>>2]=m+1;y=a[m>>0]|0}else y=qt(e)|0}while((y|0)==48);S=1;M=1}else{O=0;k=0;M=1}}o[f>>2]=0;L=y+-48|0;N=(y|0)==46;e:do{if(L>>>0<10|N){m=f+496|0;A=0;w=0;b=0;v=0;p=0;r:while(1){do{if(N)if(!M){O=A;k=w;M=1}else break r;else{N=un(A|0,w|0,1,0)|0;w=I;R=(y|0)!=48;if((v|0)>=125){if(!R){A=N;break}o[m>>2]=o[m>>2]|1;A=N;break}A=f+(v<<2)|0;if(b)L=y+-48+((o[A>>2]|0)*10|0)|0;o[A>>2]=L;b=b+1|0;L=(b|0)==9;A=N;S=1;b=L?0:b;v=(L&1)+v|0;p=R?N:p}}while(0);y=o[_>>2]|0;if(y>>>0<(o[d>>2]|0)>>>0){o[_>>2]=y+1;y=a[y>>0]|0}else y=qt(e)|0;L=y+-48|0;N=(y|0)==46;if(!(L>>>0<10|N)){m=160;break e}}L=(S|0)!=0;m=168}else{A=0;w=0;b=0;v=0;p=0;m=160}}while(0);do{if((m|0)==160){L=(M|0)==0;O=L?A:O;k=L?w:k;L=(S|0)!=0;if(!(L&(y|32|0)==101))if((y|0)>-1){m=168;break}else{m=170;break}L=rn(e,i)|0;y=I;do{if((L|0)==0&(y|0)==-2147483648)if(!i){Wt(e,0);F=0.0;c=n;return+F}else{if(!(o[d>>2]|0)){L=0;y=0;break}o[_>>2]=(o[_>>2]|0)+-1;L=0;y=0;break}}while(0);e=un(L|0,y|0,O|0,k|0)|0;k=I}}while(0);if((m|0)==168)if(o[d>>2]|0){o[_>>2]=(o[_>>2]|0)+-1;if(L)e=O;else m=171}else m=170;if((m|0)==170)if(L)e=O;else m=171;if((m|0)==171){o[(je()|0)>>2]=22;Wt(e,0);F=0.0;c=n;return+F}_=o[f>>2]|0;if(!_){F=+(s|0)*0.0;c=n;return+F}if((e|0)==(A|0)&(k|0)==(w|0)&((w|0)<0|(w|0)==0&A>>>0<10)?r>>>0>30|(_>>>r|0)==0:0){F=+(s|0)*+(_>>>0);c=n;return+F}R=(u|0)/-2|0;N=((R|0)<0)<<31>>31;if((k|0)>(N|0)|(k|0)==(N|0)&e>>>0>R>>>0){o[(je()|0)>>2]=34;F=+(s|0)*1.7976931348623157e+308*1.7976931348623157e+308;c=n;return+F}R=u+-106|0;N=((R|0)<0)<<31>>31;if((k|0)<(N|0)|(k|0)==(N|0)&e>>>0<R>>>0){o[(je()|0)>>2]=34;F=+(s|0)*2.2250738585072014e-308*2.2250738585072014e-308;c=n;return+F}if(b){if((b|0)<9){_=f+(v<<2)|0;d=o[_>>2]|0;do{d=d*10|0;b=b+1|0}while((b|0)!=9);o[_>>2]=d}v=v+1|0}if((p|0)<9?(p|0)<=(e|0)&(e|0)<18:0){if((e|0)==9){F=+(s|0)*+((o[f>>2]|0)>>>0);c=n;return+F}if((e|0)<9){F=+(s|0)*+((o[f>>2]|0)>>>0)/+(o[5632+(8-e<<2)>>2]|0);c=n;return+F}R=r+27+(ne(e,-3)|0)|0;_=o[f>>2]|0;if((R|0)>30|(_>>>R|0)==0){F=+(s|0)*+(_>>>0)*+(o[5632+(e+-10<<2)>>2]|0);c=n;return+F}}_=(e|0)%9|0;if(!_){_=0;d=0}else{i=(e|0)>-1?_:_+9|0;m=o[5632+(8-i<<2)>>2]|0;if(v){p=1e9/(m|0)|0;_=0;d=0;b=0;do{O=f+(b<<2)|0;N=o[O>>2]|0;R=((N>>>0)/(m>>>0)|0)+d|0;o[O>>2]=R;d=ne((N>>>0)%(m>>>0)|0,p)|0;N=b;b=b+1|0;if((N|0)==(_|0)&(R|0)==0){_=b&127;e=e+-9|0}}while((b|0)!=(v|0));if(d){o[f+(v<<2)>>2]=d;v=v+1|0}}else{_=0;v=0}d=0;e=9-i+e|0}e:while(1){i=f+(_<<2)|0;if((e|0)<18){do{p=0;i=v+127|0;while(1){i=i&127;m=f+(i<<2)|0;b=an(o[m>>2]|0,0,29)|0;b=un(b|0,I|0,p|0,0)|0;p=I;if(p>>>0>0|(p|0)==0&b>>>0>1e9){R=vn(b|0,p|0,1e9,0)|0;b=bn(b|0,p|0,1e9,0)|0;p=R}else p=0;o[m>>2]=b;m=(i|0)==(_|0);if(!((i|0)!=(v+127&127|0)|m))v=(b|0)==0?i:v;if(m)break;else i=i+-1|0}d=d+-29|0}while((p|0)==0)}else{if((e|0)!=18)break;do{if((o[i>>2]|0)>>>0>=9007199){e=18;break e}p=0;m=v+127|0;while(1){m=m&127;b=f+(m<<2)|0;y=an(o[b>>2]|0,0,29)|0;y=un(y|0,I|0,p|0,0)|0;p=I;if(p>>>0>0|(p|0)==0&y>>>0>1e9){R=vn(y|0,p|0,1e9,0)|0;y=bn(y|0,p|0,1e9,0)|0;p=R}else p=0;o[b>>2]=y;b=(m|0)==(_|0);if(!((m|0)!=(v+127&127|0)|b))v=(y|0)==0?m:v;if(b)break;else m=m+-1|0}d=d+-29|0}while((p|0)==0)}_=_+127&127;if((_|0)==(v|0)){R=v+127&127;v=f+((v+126&127)<<2)|0;o[v>>2]=o[v>>2]|o[f+(R<<2)>>2];v=R}o[f+(_<<2)>>2]=p;e=e+9|0}e:while(1){i=v+1&127;m=f+((v+127&127)<<2)|0;while(1){b=(e|0)==18;p=(e|0)>27?9:1;while(1){y=0;while(1){w=y+_&127;if((w|0)==(v|0)){y=2;break}A=o[f+(w<<2)>>2]|0;L=o[5624+(y<<2)>>2]|0;if(A>>>0<L>>>0){y=2;break}w=y+1|0;if(A>>>0>L>>>0)break;if((w|0)<2)y=w;else{y=w;break}}if((y|0)==2&b)break e;d=p+d|0;if((_|0)==(v|0))_=v;else break}b=(1<<p)+-1|0;y=1e9>>>p;w=_;A=0;do{O=f+(_<<2)|0;N=o[O>>2]|0;R=(N>>>p)+A|0;o[O>>2]=R;A=ne(N&b,y)|0;R=(_|0)==(w|0)&(R|0)==0;_=_+1&127;e=R?e+-9|0:e;w=R?_:w}while((_|0)!=(v|0));if(!A){_=w;continue}if((i|0)!=(w|0))break;o[m>>2]=o[m>>2]|1;_=w}o[f+(v<<2)>>2]=A;_=w;v=i}e=_&127;if((e|0)==(v|0)){o[f+(i+-1<<2)>>2]=0;v=i}C=+((o[f+(e<<2)>>2]|0)>>>0);e=_+1&127;if((e|0)==(v|0)){v=v+1&127;o[f+(v+-1<<2)>>2]=0}g=+(s|0);P=g*(C*1.0e9+ +((o[f+(e<<2)>>2]|0)>>>0));s=d+53|0;u=s-u|0;if((u|0)<(r|0))if((u|0)<0){r=0;e=1;m=244}else{r=u;e=1;m=243}else{e=0;m=243}if((m|0)==243)if((r|0)<53)m=244;else{C=0.0;F=0.0}if((m|0)==244){D=+Ze(+ +zt(1.0,105-r|0),+P);x=+or(+P,+ +zt(1.0,53-r|0));C=D;F=x;P=D+(P-x)}i=_+2&127;do{if((i|0)!=(v|0)){f=o[f+(i<<2)>>2]|0;do{if(f>>>0>=5e8){if(f>>>0>5e8){F=g*.75+F;break}if((_+3&127|0)==(v|0)){F=g*.5+F;break}else{F=g*.75+F;break}}else{if((f|0)==0?(_+3&127|0)==(v|0):0)break;F=g*.25+F}}while(0);if((53-r|0)<=1)break;if(+or(+F,1.0)!=0.0)break;F=F+1.0}}while(0);g=P+F-C;do{if((s&2147483647|0)>(-2-h|0)){if(+q(+g)>=9007199254740992.0){e=(e|0)!=0&(r|0)==(u|0)?0:e;d=d+1|0;g=g*.5}if((d+50|0)<=(l|0)?!((e|0)!=0&F!=0.0):0)break;o[(je()|0)>>2]=34}}while(0);D=+Kt(g,d);c=n;return+D}else if((p|0)==3){r=o[_>>2]|0;if(r>>>0<(o[d>>2]|0)>>>0){o[_>>2]=r+1;r=a[r>>0]|0}else r=qt(e)|0;if((r|0)==40)r=1;else{if(!(o[d>>2]|0)){D=E;c=n;return+D}o[_>>2]=(o[_>>2]|0)+-1;D=E;c=n;return+D}while(1){s=o[_>>2]|0;if(s>>>0<(o[d>>2]|0)>>>0){o[_>>2]=s+1;s=a[s>>0]|0}else s=qt(e)|0;if(!((s+-48|0)>>>0<10|(s+-65|0)>>>0<26)?!((s+-97|0)>>>0<26|(s|0)==95):0)break;r=r+1|0}if((s|0)==41){D=E;c=n;return+D}s=(o[d>>2]|0)==0;if(!s)o[_>>2]=(o[_>>2]|0)+-1;if(!h){o[(je()|0)>>2]=22;Wt(e,0);D=0.0;c=n;return+D}if((r|0)==0|s){D=E;c=n;return+D}do{r=r+-1|0;o[_>>2]=(o[_>>2]|0)+-1}while((r|0)!=0);g=E;c=n;return+g}else{if(o[d>>2]|0)o[_>>2]=(o[_>>2]|0)+-1;o[(je()|0)>>2]=22;Wt(e,0);D=0.0;c=n;return+D}}}while(0);if((m|0)==23){r=(o[d>>2]|0)==0;if(!r)o[_>>2]=(o[_>>2]|0)+-1;if(!(p>>>0<4|(i|0)==0|r))do{o[_>>2]=(o[_>>2]|0)+-1;p=p+-1|0}while(p>>>0>3)}D=+(s|0)*T;c=n;return+D}function Wt(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0;i=c;o[e+104>>2]=r;n=o[e+8>>2]|0;t=o[e+4>>2]|0;a=n-t|0;o[e+108>>2]=a;if((r|0)!=0&(a|0)>(r|0)){o[e+100>>2]=t+r;c=i;return}else{o[e+100>>2]=n;c=i;return}}function qt(e){e=e|0;var r=0,i=0,n=0,s=0,u=0,f=0,l=0;i=c;u=e+104|0;l=o[u>>2]|0;if(!((l|0)!=0?(o[e+108>>2]|0)>=(l|0):0))f=3;if((f|0)==3?(r=Yt(e)|0,(r|0)>=0):0){f=o[u>>2]|0;u=o[e+8>>2]|0;if((f|0)!=0?(n=o[e+4>>2]|0,s=f-(o[e+108>>2]|0)+-1|0,(u-n|0)>(s|0)):0)o[e+100>>2]=n+s;else o[e+100>>2]=u;n=o[e+4>>2]|0;if(u){l=e+108|0;o[l>>2]=u+1-n+(o[l>>2]|0)}e=n+-1|0;if((a[e>>0]|0|0)==(r|0)){l=r;c=i;return l|0}t[e>>0]=r;l=r;c=i;return l|0}o[e+100>>2]=0;l=-1;c=i;return l|0}function zt(e,r){e=+e;r=r|0;var i=0,t=0;i=c;if((r|0)>1023){e=e*8.98846567431158e+307;t=r+-1023|0;if((t|0)>1023){r=r+-2046|0;r=(r|0)>1023?1023:r;e=e*8.98846567431158e+307}else r=t}else if((r|0)<-1022){e=e*2.2250738585072014e-308;t=r+1022|0;if((t|0)<-1022){r=r+2044|0;r=(r|0)<-1022?-1022:r;e=e*2.2250738585072014e-308}else r=t}r=an(r+1023|0,0,52)|0;t=I;o[_>>2]=r;o[_+4>>2]=t;e=e*+l[_>>3];c=i;return+e}function Kt(e,r){e=+e;r=r|0;var i=0;i=c;e=+zt(e,r);c=i;return+e}function Xt(e){e=e|0;var r=0,i=0,n=0;i=c;n=e+74|0;r=t[n>>0]|0;t[n>>0]=r+255|r;n=e+20|0;r=e+44|0;if((o[n>>2]|0)>>>0>(o[r>>2]|0)>>>0)Hn[o[e+36>>2]&1](e,0,0)|0;o[e+16>>2]=0;o[e+28>>2]=0;o[n>>2]=0;n=o[e>>2]|0;if(!(n&20)){n=o[r>>2]|0;o[e+8>>2]=n;o[e+4>>2]=n;n=0;c=i;return n|0}if(!(n&4)){n=-1;c=i;return n|0}o[e>>2]=n|32;n=-1;c=i;return n|0}function Yt(e){e=e|0;var r=0,i=0;r=c;c=c+16|0;i=r;if((o[e+8>>2]|0)==0?(Xt(e)|0)!=0:0)e=-1;else if((Hn[o[e+32>>2]&1](e,i,1)|0)==1)e=a[i>>0]|0;else e=-1;c=r;return e|0}function Zt(e,r){e=e|0;r=r|0;var i=0,t=0,n=0.0,a=0,s=0;i=c;c=c+112|0;t=i;s=t+0|0;a=s+112|0;do{o[s>>2]=0;s=s+4|0}while((s|0)<(a|0));a=t+4|0;o[a>>2]=e;s=t+8|0;o[s>>2]=-1;o[t+44>>2]=e;o[t+76>>2]=-1;Wt(t,0);n=+jt(t,1,1);t=(o[a>>2]|0)-(o[s>>2]|0)+(o[t+108>>2]|0)|0;if(!r){c=i;return+n}if(t)e=e+t|0;o[r>>2]=e;c=i;return+n}function Gt(e,r,i){e=e|0;r=r|0;i=i|0;var t=0,n=0,a=0;t=c;c=c+112|0;a=t;o[a>>2]=0;n=a+4|0;o[n>>2]=e;o[a+44>>2]=e;if((e|0)<0)o[a+8>>2]=-1;else o[a+8>>2]=e+2147483647;o[a+76>>2]=-1;Wt(a,0);i=$t(a,i,1,-2147483648,0)|0;if(!r){c=t;return i|0}o[r>>2]=e+((o[n>>2]|0)+(o[a+108>>2]|0)-(o[a+8>>2]|0));c=t;return i|0}function Jt(e,r){e=e|0;r=r|0;var i=0,n=0,o=0;i=c;o=t[e>>0]|0;n=t[r>>0]|0;if(o<<24>>24==0?1:o<<24>>24!=n<<24>>24)r=o;else{do{e=e+1|0;r=r+1|0;o=t[e>>0]|0;n=t[r>>0]|0}while(!(o<<24>>24==0?1:o<<24>>24!=n<<24>>24));r=o}c=i;return(r&255)-(n&255)|0}function Qt(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0;i=c;n=e+4|0;t=o[n>>2]|0;l=t&-8;u=e+l|0;h=o[1210]|0;s=t&3;if(!((s|0)!=1&e>>>0>=h>>>0&e>>>0<u>>>0))Ge();a=e+(l|4)|0;m=o[a>>2]|0;if(!(m&1))Ge();if(!s){if(r>>>0<256){p=0;c=i;return p|0}if(l>>>0>=(r+4|0)>>>0?(l-r|0)>>>0<=o[1326]<<1>>>0:0){p=e;c=i;return p|0}p=0;c=i;return p|0}if(l>>>0>=r>>>0){s=l-r|0;if(s>>>0<=15){p=e;c=i;return p|0}o[n>>2]=t&1|r|2;o[e+(r+4)>>2]=s|3;o[a>>2]=o[a>>2]|1;en(e+r|0,s);p=e;c=i;return p|0}if((u|0)==(o[1212]|0)){a=(o[1209]|0)+l|0;if(a>>>0<=r>>>0){p=0;c=i;return p|0}p=a-r|0;o[n>>2]=t&1|r|2;o[e+(r+4)>>2]=p|1;o[1212]=e+r;o[1209]=p;p=e;c=i;return p|0}if((u|0)==(o[1211]|0)){s=(o[1208]|0)+l|0;if(s>>>0<r>>>0){p=0;c=i;return p|0}a=s-r|0;if(a>>>0>15){o[n>>2]=t&1|r|2;o[e+(r+4)>>2]=a|1;o[e+s>>2]=a;t=e+(s+4)|0;o[t>>2]=o[t>>2]&-2;t=e+r|0}else{o[n>>2]=t&1|s|2;t=e+(s+4)|0;o[t>>2]=o[t>>2]|1;t=0;a=0}o[1208]=a;o[1211]=t;p=e;c=i;return p|0}if(m&2){p=0;c=i;return p|0}a=(m&-8)+l|0;if(a>>>0<r>>>0){p=0;c=i;return p|0}s=a-r|0;d=m>>>3;do{if(m>>>0>=256){_=o[e+(l+24)>>2]|0;d=o[e+(l+12)>>2]|0;do{if((d|0)==(u|0)){m=e+(l+20)|0;d=o[m>>2]|0;if(!d){m=e+(l+16)|0;d=o[m>>2]|0;if(!d){f=0;break}}while(1){p=d+20|0;g=o[p>>2]|0;if(g){d=g;m=p;continue}g=d+16|0;p=o[g>>2]|0;if(!p)break;else{d=p;m=g}}if(m>>>0<h>>>0)Ge();else{o[m>>2]=0;f=d;break}}else{m=o[e+(l+8)>>2]|0;if(m>>>0<h>>>0)Ge();h=m+12|0;if((o[h>>2]|0)!=(u|0))Ge();g=d+8|0;if((o[g>>2]|0)==(u|0)){o[h>>2]=d;o[g>>2]=m;f=d;break}else Ge()}}while(0);if(_){h=o[e+(l+28)>>2]|0;d=5128+(h<<2)|0;if((u|0)==(o[d>>2]|0)){o[d>>2]=f;if(!f){o[1207]=o[1207]&~(1<<h);break}}else{if(_>>>0<(o[1210]|0)>>>0)Ge();h=_+16|0;if((o[h>>2]|0)==(u|0))o[h>>2]=f;else o[_+20>>2]=f;if(!f)break}u=o[1210]|0;if(f>>>0<u>>>0)Ge();o[f+24>>2]=_;h=o[e+(l+16)>>2]|0;do{if(h)if(h>>>0<u>>>0)Ge();else{o[f+16>>2]=h;o[h+24>>2]=f;break}}while(0);u=o[e+(l+20)>>2]|0;if(u)if(u>>>0<(o[1210]|0)>>>0)Ge();else{o[f+20>>2]=u;o[u+24>>2]=f;break}}}else{f=o[e+(l+8)>>2]|0;l=o[e+(l+12)>>2]|0;m=4864+(d<<1<<2)|0;if((f|0)!=(m|0)){if(f>>>0<h>>>0)Ge();if((o[f+12>>2]|0)!=(u|0))Ge()}if((l|0)==(f|0)){o[1206]=o[1206]&~(1<<d);break}if((l|0)!=(m|0)){if(l>>>0<h>>>0)Ge();h=l+8|0;if((o[h>>2]|0)==(u|0))_=h;else Ge()}else _=l+8|0;o[f+12>>2]=l;o[_>>2]=f}}while(0);if(s>>>0<16){o[n>>2]=a|t&1|2;p=e+(a|4)|0;o[p>>2]=o[p>>2]|1;p=e;c=i;return p|0}else{o[n>>2]=t&1|r|2;o[e+(r+4)>>2]=s|3;p=e+(a|4)|0;o[p>>2]=o[p>>2]|1;en(e+r|0,s);p=e;c=i;return p|0}return 0}function en(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,a=0,s=0,u=0,f=0,l=0,h=0,_=0,d=0,m=0,g=0,p=0,v=0,b=0,y=0,w=0;i=c;s=e+r|0;l=o[e+4>>2]|0;do{if(!(l&1)){m=o[e>>2]|0;if(!(l&3)){c=i;return}l=e+(0-m)|0;h=m+r|0;p=o[1210]|0;if(l>>>0<p>>>0)Ge();if((l|0)==(o[1211]|0)){t=e+(r+4)|0;_=o[t>>2]|0;if((_&3|0)!=3){t=l;_=h;break}o[1208]=h;o[t>>2]=_&-2;o[e+(4-m)>>2]=h|1;o[s>>2]=h;c=i;return}v=m>>>3;if(m>>>0<256){t=o[e+(8-m)>>2]|0;_=o[e+(12-m)>>2]|0;d=4864+(v<<1<<2)|0;if((t|0)!=(d|0)){if(t>>>0<p>>>0)Ge();if((o[t+12>>2]|0)!=(l|0))Ge()}if((_|0)==(t|0)){o[1206]=o[1206]&~(1<<v);t=l;_=h;break}if((_|0)!=(d|0)){if(_>>>0<p>>>0)Ge();d=_+8|0;if((o[d>>2]|0)==(l|0))g=d;else Ge()}else g=_+8|0;o[t+12>>2]=_;o[g>>2]=t;t=l;_=h;break}g=o[e+(24-m)>>2]|0;v=o[e+(12-m)>>2]|0;do{if((v|0)==(l|0)){y=16-m|0;b=e+(y+4)|0;v=o[b>>2]|0;if(!v){b=e+y|0;v=o[b>>2]|0;if(!v){d=0;break}}while(1){w=v+20|0;y=o[w>>2]|0;if(y){v=y;b=w;continue}y=v+16|0;w=o[y>>2]|0;if(!w)break;else{v=w;b=y}}if(b>>>0<p>>>0)Ge();else{o[b>>2]=0;d=v;break}}else{b=o[e+(8-m)>>2]|0;if(b>>>0<p>>>0)Ge();p=b+12|0;if((o[p>>2]|0)!=(l|0))Ge();y=v+8|0;if((o[y>>2]|0)==(l|0)){o[p>>2]=v;o[y>>2]=b;d=v;break}else Ge()}}while(0);if(g){v=o[e+(28-m)>>2]|0;p=5128+(v<<2)|0;if((l|0)==(o[p>>2]|0)){o[p>>2]=d;if(!d){o[1207]=o[1207]&~(1<<v);t=l;_=h;break}}else{if(g>>>0<(o[1210]|0)>>>0)Ge();p=g+16|0;if((o[p>>2]|0)==(l|0))o[p>>2]=d;else o[g+20>>2]=d;if(!d){t=l;_=h;break}}p=o[1210]|0;if(d>>>0<p>>>0)Ge();o[d+24>>2]=g;m=16-m|0;g=o[e+m>>2]|0;do{if(g)if(g>>>0<p>>>0)Ge();else{o[d+16>>2]=g;o[g+24>>2]=d;break}}while(0);m=o[e+(m+4)>>2]|0;if(m)if(m>>>0<(o[1210]|0)>>>0)Ge();else{o[d+20>>2]=m;o[m+24>>2]=d;t=l;_=h;break}else{t=l;_=h}}else{t=l;_=h}}else{t=e;_=r}}while(0);l=o[1210]|0;if(s>>>0<l>>>0)Ge();h=e+(r+4)|0;d=o[h>>2]|0;if(!(d&2)){if((s|0)==(o[1212]|0)){w=(o[1209]|0)+_|0;o[1209]=w;o[1212]=t;o[t+4>>2]=w|1;if((t|0)!=(o[1211]|0)){c=i;return}o[1211]=0;o[1208]=0;c=i;return}if((s|0)==(o[1211]|0)){w=(o[1208]|0)+_|0;o[1208]=w;o[1211]=t;o[t+4>>2]=w|1;o[t+w>>2]=w;c=i;return}_=(d&-8)+_|0;h=d>>>3;do{if(d>>>0>=256){f=o[e+(r+24)>>2]|0;d=o[e+(r+12)>>2]|0;do{if((d|0)==(s|0)){d=e+(r+20)|0;h=o[d>>2]|0;if(!h){d=e+(r+16)|0;h=o[d>>2]|0;if(!h){u=0;break}}while(1){m=h+20|0;g=o[m>>2]|0;if(g){h=g;d=m;continue}g=h+16|0;m=o[g>>2]|0;if(!m)break;else{h=m;d=g}}if(d>>>0<l>>>0)Ge();else{o[d>>2]=0;u=h;break}}else{h=o[e+(r+8)>>2]|0;if(h>>>0<l>>>0)Ge();m=h+12|0;if((o[m>>2]|0)!=(s|0))Ge();l=d+8|0;if((o[l>>2]|0)==(s|0)){o[m>>2]=d;o[l>>2]=h;u=d;break}else Ge()}}while(0);if(f){h=o[e+(r+28)>>2]|0;l=5128+(h<<2)|0;if((s|0)==(o[l>>2]|0)){o[l>>2]=u;if(!u){o[1207]=o[1207]&~(1<<h);break}}else{if(f>>>0<(o[1210]|0)>>>0)Ge();l=f+16|0;if((o[l>>2]|0)==(s|0))o[l>>2]=u;else o[f+20>>2]=u;if(!u)break}s=o[1210]|0;if(u>>>0<s>>>0)Ge();o[u+24>>2]=f;f=o[e+(r+16)>>2]|0;do{if(f)if(f>>>0<s>>>0)Ge();else{o[u+16>>2]=f;o[f+24>>2]=u;break}}while(0);s=o[e+(r+20)>>2]|0;if(s)if(s>>>0<(o[1210]|0)>>>0)Ge();else{o[u+20>>2]=s;o[s+24>>2]=u;break}}}else{u=o[e+(r+8)>>2]|0;e=o[e+(r+12)>>2]|0;r=4864+(h<<1<<2)|0;if((u|0)!=(r|0)){if(u>>>0<l>>>0)Ge();if((o[u+12>>2]|0)!=(s|0))Ge()}if((e|0)==(u|0)){o[1206]=o[1206]&~(1<<h);break}if((e|0)!=(r|0)){if(e>>>0<l>>>0)Ge();r=e+8|0;if((o[r>>2]|0)==(s|0))f=r;else Ge()}else f=e+8|0;o[u+12>>2]=e;o[f>>2]=u}}while(0);o[t+4>>2]=_|1;o[t+_>>2]=_;if((t|0)==(o[1211]|0)){o[1208]=_;c=i;return}}else{o[h>>2]=d&-2;o[t+4>>2]=_|1;o[t+_>>2]=_}r=_>>>3;if(_>>>0<256){e=r<<1;s=4864+(e<<2)|0;u=o[1206]|0;r=1<<r;if(u&r){e=4864+(e+2<<2)|0;u=o[e>>2]|0;if(u>>>0<(o[1210]|0)>>>0)Ge();else{a=e;n=u}}else{o[1206]=u|r;a=4864+(e+2<<2)|0;n=s}o[a>>2]=t;o[n+12>>2]=t;o[t+8>>2]=n;o[t+12>>2]=s;c=i;return}n=_>>>8;if(n)if(_>>>0>16777215)n=31;else{y=(n+1048320|0)>>>16&8;w=n<<y;b=(w+520192|0)>>>16&4;w=w<<b;n=(w+245760|0)>>>16&2;n=14-(b|y|n)+(w<<n>>>15)|0;n=_>>>(n+7|0)&1|n<<1}else n=0;a=5128+(n<<2)|0;o[t+28>>2]=n;o[t+20>>2]=0;o[t+16>>2]=0;e=o[1207]|0;s=1<<n;if(!(e&s)){o[1207]=e|s;o[a>>2]=t;o[t+24>>2]=a;o[t+12>>2]=t;o[t+8>>2]=t;c=i;return}a=o[a>>2]|0;if((n|0)==31)n=0;else n=25-(n>>>1)|0;e:do{if((o[a+4>>2]&-8|0)!=(_|0)){n=_<<n;e=a;while(1){s=e+(n>>>31<<2)+16|0;a=o[s>>2]|0;if(!a)break;if((o[a+4>>2]&-8|0)==(_|0))break e;else{n=n<<1;e=a}}if(s>>>0<(o[1210]|0)>>>0)Ge();o[s>>2]=t;o[t+24>>2]=e;o[t+12>>2]=t;o[t+8>>2]=t;c=i;return}}while(0);n=a+8|0;s=o[n>>2]|0;w=o[1210]|0;if(!(a>>>0>=w>>>0&s>>>0>=w>>>0))Ge();o[s+12>>2]=t;o[n>>2]=t;o[t+8>>2]=s;o[t+12>>2]=a;o[t+24>>2]=0;c=i;return}function rn(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,s=0,u=0,f=0;i=c;n=e+4|0;s=o[n>>2]|0;t=e+100|0;if(s>>>0<(o[t>>2]|0)>>>0){o[n>>2]=s+1;u=a[s>>0]|0}else u=qt(e)|0;if((u|0)==43|(u|0)==45){f=o[n>>2]|0;s=(u|0)==45&1;if(f>>>0<(o[t>>2]|0)>>>0){o[n>>2]=f+1;u=a[f>>0]|0}else u=qt(e)|0;if((u+-48|0)>>>0>9&(r|0)!=0?(o[t>>2]|0)!=0:0)o[n>>2]=(o[n>>2]|0)+-1}else s=0;if((u+-48|0)>>>0>9){if(!(o[t>>2]|0)){u=-2147483648;f=0;I=u;c=i;return f|0}o[n>>2]=(o[n>>2]|0)+-1;u=-2147483648;f=0;I=u;c=i;return f|0}else r=0;do{r=u+-48+(r*10|0)|0;u=o[n>>2]|0;if(u>>>0<(o[t>>2]|0)>>>0){o[n>>2]=u+1;u=a[u>>0]|0}else u=qt(e)|0}while((u+-48|0)>>>0<10&(r|0)<214748364);f=((r|0)<0)<<31>>31;if((u+-48|0)>>>0<10)do{f=pn(r|0,f|0,10,0)|0;r=I;u=un(u|0,((u|0)<0)<<31>>31|0,-48,-1)|0;r=un(u|0,I|0,f|0,r|0)|0;f=I;u=o[n>>2]|0;if(u>>>0<(o[t>>2]|0)>>>0){o[n>>2]=u+1;u=a[u>>0]|0}else u=qt(e)|0}while((u+-48|0)>>>0<10&((f|0)<21474836|(f|0)==21474836&r>>>0<2061584302));if((u+-48|0)>>>0<10)do{u=o[n>>2]|0;if(u>>>0<(o[t>>2]|0)>>>0){o[n>>2]=u+1;u=a[u>>0]|0}else u=qt(e)|0}while((u+-48|0)>>>0<10);if(o[t>>2]|0)o[n>>2]=(o[n>>2]|0)+-1;n=(s|0)!=0;s=nn(0,0,r|0,f|0)|0;u=n?I:f;f=n?s:r;I=u;c=i;return f|0}function tn(){}function nn(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;r=r-t-(i>>>0>e>>>0|0)>>>0;return(I=r,e-i>>>0|0)|0}function on(e,r,i){e=e|0;r=r|0;i=i|0;var n=0,a=0,s=0,u=0;n=e+i|0;if((i|0)>=20){r=r&255;u=e&3;s=r|r<<8|r<<16|r<<24;a=n&~3;if(u){u=e+4-u|0;while((e|0)<(u|0)){t[e>>0]=r;e=e+1|0}}while((e|0)<(a|0)){o[e>>2]=s;e=e+4|0}}while((e|0)<(n|0)){t[e>>0]=r;e=e+1|0}return e-i|0}function an(e,r,i){e=e|0;r=r|0;i=i|0;if((i|0)<32){I=r<<i|(e&(1<<i)-1<<32-i)>>>32-i;return e<<i}I=e<<i-32;return 0}function sn(e){e=e|0;var r=0;r=e;while(t[r>>0]|0)r=r+1|0;return r-e|0}function un(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;i=e+i>>>0;return(I=r+t+(i>>>0<e>>>0|0)>>>0,i|0)|0}function fn(e,r,i){e=e|0;r=r|0;i=i|0;if((i|0)<32){I=r>>>i;return e>>>i|(r&(1<<i)-1)<<32-i}I=0;return r>>>i-32|0}function ln(e,r,i){e=e|0;r=r|0;i=i|0;var n=0;if((i|0)>=4096)return Ce(e|0,r|0,i|0)|0;n=e|0;if((e&3)==(r&3)){while(e&3){if(!i)return n|0;t[e>>0]=t[r>>0]|0;e=e+1|0;r=r+1|0;i=i-1|0}while((i|0)>=4){o[e>>2]=o[r>>2];e=e+4|0;r=r+4|0;i=i-4|0}}while((i|0)>0){t[e>>0]=t[r>>0]|0;e=e+1|0;r=r+1|0;i=i-1|0}return n|0}function cn(e,r,i){e=e|0;r=r|0;i=i|0;if((i|0)<32){I=r>>i;return e>>>i|(r&(1<<i)-1)<<32-i}I=(r|0)<0?-1:0;return r>>i-32|0}function hn(e){e=e|0;var r=0;r=t[g+(e>>>24)>>0]|0;if((r|0)<8)return r|0;r=t[g+(e>>16&255)>>0]|0;if((r|0)<8)return r+8|0;r=t[g+(e>>8&255)>>0]|0;if((r|0)<8)return r+16|0;return(t[g+(e&255)>>0]|0)+24|0}function _n(e){e=e|0;var r=0;r=t[m+(e&255)>>0]|0;if((r|0)<8)return r|0;r=t[m+(e>>8&255)>>0]|0;if((r|0)<8)return r+8|0;r=t[m+(e>>16&255)>>0]|0;if((r|0)<8)return r+16|0;return(t[m+(e>>>24)>>0]|0)+24|0}function dn(e,r){e=e|0;r=r|0;var i=0,t=0,n=0,o=0;o=e&65535;t=r&65535;i=ne(t,o)|0;n=e>>>16;t=(i>>>16)+(ne(t,n)|0)|0;r=r>>>16;e=ne(r,o)|0;return(I=(t>>>16)+(ne(r,n)|0)+(((t&65535)+e|0)>>>16)|0,t+e<<16|i&65535|0)|0}function mn(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;var n=0,o=0,a=0,s=0,u=0,f=0;f=r>>31|((r|0)<0?-1:0)<<1;u=((r|0)<0?-1:0)>>31|((r|0)<0?-1:0)<<1;o=t>>31|((t|0)<0?-1:0)<<1;n=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;s=nn(f^e,u^r,f,u)|0;a=I;r=o^f;e=n^u;e=nn((yn(s,a,nn(o^i,n^t,o,n)|0,I,0)|0)^r,I^e,r,e)|0;return e|0}function gn(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;var n=0,a=0,s=0,u=0,f=0,l=0;n=c;c=c+8|0;u=n|0;s=r>>31|((r|0)<0?-1:0)<<1;a=((r|0)<0?-1:0)>>31|((r|0)<0?-1:0)<<1;l=t>>31|((t|0)<0?-1:0)<<1;f=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;r=nn(s^e,a^r,s,a)|0;e=I;yn(r,e,nn(l^i,f^t,l,f)|0,I,u)|0;e=nn(o[u>>2]^s,o[u+4>>2]^a,s,a)|0;r=I;c=n;return(I=r,e)|0}function pn(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;var n=0,o=0;n=e;o=i;e=dn(n,o)|0;i=I;return(I=(ne(r,o)|0)+(ne(t,n)|0)+i|i&0,e|0|0)|0}function vn(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;e=yn(e,r,i,t,0)|0;return e|0}function bn(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;var n=0,a=0;a=c;c=c+8|0;n=a|0;yn(e,r,i,t,n)|0;c=a;return(I=o[n+4>>2]|0,o[n>>2]|0)|0}function yn(e,r,i,t,n){e=e|0;r=r|0;i=i|0;t=t|0;n=n|0;var a=0,s=0,u=0,f=0,l=0,c=0,h=0,_=0,d=0,m=0;s=e;f=r;u=f;c=i;a=t;l=a;if(!u){a=(n|0)!=0;if(!l){if(a){o[n>>2]=(s>>>0)%(c>>>0);o[n+4>>2]=0}l=0;h=(s>>>0)/(c>>>0)>>>0;return(I=l,h)|0}else{if(!a){c=0;h=0;return(I=c,h)|0}o[n>>2]=e|0;o[n+4>>2]=r&0;c=0;h=0;return(I=c,h)|0}}h=(l|0)==0;do{if(c){if(!h){l=(hn(l|0)|0)-(hn(u|0)|0)|0;if(l>>>0<=31){h=l+1|0;c=31-l|0;e=l-31>>31;f=h;r=s>>>(h>>>0)&e|u<<c;e=u>>>(h>>>0)&e;l=0;c=s<<c;break}if(!n){c=0;h=0;return(I=c,h)|0}o[n>>2]=e|0;o[n+4>>2]=f|r&0;c=0;h=0;return(I=c,h)|0}l=c-1|0;if(l&c){c=(hn(c|0)|0)+33-(hn(u|0)|0)|0;m=64-c|0;h=32-c|0;_=h>>31;d=c-32|0;e=d>>31;f=c;r=h-1>>31&u>>>(d>>>0)|(u<<h|s>>>(c>>>0))&e;e=e&u>>>(c>>>0);l=s<<m&_;c=(u<<m|s>>>(d>>>0))&_|s<<h&c-33>>31;break}if(n){o[n>>2]=l&s;o[n+4>>2]=0}if((c|0)==1){d=f|r&0;m=e|0|0;return(I=d,m)|0}else{m=_n(c|0)|0;d=u>>>(m>>>0)|0;m=u<<32-m|s>>>(m>>>0)|0;return(I=d,m)|0}}else{if(h){if(n){o[n>>2]=(u>>>0)%(c>>>0);o[n+4>>2]=0}d=0;m=(u>>>0)/(c>>>0)>>>0;return(I=d,m)|0}if(!s){if(n){o[n>>2]=0;o[n+4>>2]=(u>>>0)%(l>>>0)}d=0;m=(u>>>0)/(l>>>0)>>>0;return(I=d,m)|0}c=l-1|0;if(!(c&l)){if(n){o[n>>2]=e|0;o[n+4>>2]=c&u|r&0}d=0;m=u>>>((_n(l|0)|0)>>>0);return(I=d,m)|0}l=(hn(l|0)|0)-(hn(u|0)|0)|0;if(l>>>0<=30){e=l+1|0;c=31-l|0;f=e;r=u<<c|s>>>(e>>>0);e=u>>>(e>>>0);l=0;c=s<<c;break}if(!n){d=0;m=0;return(I=d,m)|0}o[n>>2]=e|0;o[n+4>>2]=f|r&0;d=0;m=0;return(I=d,m)|0}}while(0);if(!f){a=c;t=0;u=0}else{s=i|0|0;a=a|t&0;t=un(s,a,-1,-1)|0;i=I;u=0;do{h=c;c=l>>>31|c<<1;l=u|l<<1;h=r<<1|h>>>31|0;_=r>>>31|e<<1|0;nn(t,i,h,_)|0;m=I;d=m>>31|((m|0)<0?-1:0)<<1;u=d&1;r=nn(h,_,d&s,(((m|0)<0?-1:0)>>31|((m|0)<0?-1:0)<<1)&a)|0;e=I;f=f-1|0}while((f|0)!=0);a=c;t=0}s=0;if(n){o[n>>2]=r;o[n+4>>2]=e}d=(l|0)>>>31|(a|s)<<1|(s<<1|l>>>31)&0|t;m=(l<<1|0>>>31)&-2|u;return(I=d,m)|0}function wn(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;return Hn[e&1](r|0,i|0,t|0)|0}function An(e,r,i,t,n,o){e=e|0;r=r|0;i=i|0;t=t|0;n=n|0;o=o|0;Vn[e&3](r|0,i|0,t|0,n|0,o|0)}function En(e,r){e=e|0;r=r|0;$n[e&31](r|0)}function Tn(e,r,i){e=e|0;r=r|0;i=i|0;jn[e&3](r|0,i|0)}function Ln(e,r){e=e|0;r=r|0;return Wn[e&1](r|0)|0}function Mn(e){e=e|0;qn[e&3]()}function Sn(e,r,i,t,n,o,a){e=e|0;r=r|0;i=i|0;t=t|0;n=n|0;o=o|0;a=a|0;zn[e&3](r|0,i|0,t|0,n|0,o|0,a|0)}function kn(e,r,i){e=e|0;r=r|0;i=i|0;return Kn[e&3](r|0,i|0)|0}function On(e,r,i,t,n){e=e|0;r=r|0;i=i|0;t=t|0;n=n|0;Xn[e&3](r|0,i|0,t|0,n|0)}function Nn(e,r,i){e=e|0;r=r|0;i=i|0;oe(0);return 0}function Cn(e,r,i,t,n){e=e|0;r=r|0;i=i|0;t=t|0;n=n|0;oe(1)}function Rn(e){e=e|0;oe(2)}function Pn(e,r){e=e|0;r=r|0;oe(3)}function In(e){e=e|0;oe(4);return 0}function Fn(){oe(5)}function xn(){nr()}function Dn(e,r,i,t,n,o){e=e|0;r=r|0;i=i|0;t=t|0;n=n|0;o=o|0;oe(6)}function Bn(e,r){e=e|0;r=r|0;oe(7);return 0}function Un(e,r,i,t){e=e|0;r=r|0;i=i|0;t=t|0;oe(8)}var Hn=[Nn,Et];var Vn=[Cn,Nt,Ot,Cn];var $n=[Rn,gr,vr,yr,Er,kr,Sr,Yr,Gr,bi,vi,Ii,ct,lt,vt,wt,bt,yt,At,br,Dt,Rn,Rn,Rn,Rn,Rn,Rn,Rn,Rn,Rn,Rn,Rn];var jn=[Pn,Ar,Lr,Qr];var Wn=[In,ht];var qn=[Fn,xn,Ft,xt];var zn=[Dn,Rt,Ct,Dn];var Kn=[Bn,wr,Tr,Jr];var Xn=[Un,Lt,Mt,Un];return{_yo:Ki,_strlen:sn,_retireVar:it,_bitshift64Lshr:fn,_unyo:Xi,_solve:Ji,_bitshift64Shl:an,_getSolution:Qi,___cxa_is_pointer_type:It,_memset:on,_getNumVars:et,_memcpy:ln,_getConflictClauseSize:tt,_addClause:Gi,_i64Subtract:nn,_createTheSolver:Yi,_realloc:Ht,_i64Add:un,_solveAssuming:rt,___cxa_can_catch:Pt,_ensureVar:Zi,_getConflictClause:nt,_free:Ut,_malloc:Bt,__GLOBAL__I_a:Zr,__GLOBAL__I_a127:Fi,runPostSets:tn,stackAlloc:sr,stackSave:ur,stackRestore:fr,setThrew:lr,setTempRet0:_r,getTempRet0:dr,dynCall_iiii:wn,dynCall_viiiii:An,dynCall_vi:En,dynCall_vii:Tn,dynCall_ii:Ln,dynCall_v:Mn,dynCall_viiiiii:Sn,dynCall_iii:kn,dynCall_viiii:On}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);Module._yo=asm._yo;var _strlen=Module._strlen=asm._strlen;Module._retireVar=asm._retireVar;var _bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr;Module._unyo=asm._unyo,Module._solve=asm._solve;var _bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl;Module._getSolution=asm._getSolution,Module.___cxa_is_pointer_type=asm.___cxa_is_pointer_type;var _memset=Module._memset=asm._memset;Module._getNumVars=asm._getNumVars;var _memcpy=Module._memcpy=asm._memcpy;Module._getConflictClauseSize=asm._getConflictClauseSize,Module._addClause=asm._addClause;var _i64Subtract=Module._i64Subtract=asm._i64Subtract;Module._createTheSolver=asm._createTheSolver,Module._realloc=asm._realloc;var _i64Add=Module._i64Add=asm._i64Add;Module._solveAssuming=asm._solveAssuming,Module.___cxa_can_catch=asm.___cxa_can_catch,Module._ensureVar=asm._ensureVar,Module._getConflictClause=asm._getConflictClause;var _free=Module._free=asm._free,_malloc=Module._malloc=asm._malloc,__GLOBAL__I_a=Module.__GLOBAL__I_a=asm.__GLOBAL__I_a,__GLOBAL__I_a127=Module.__GLOBAL__I_a127=asm.__GLOBAL__I_a127;Module.runPostSets=asm.runPostSets,Module.dynCall_iiii=asm.dynCall_iiii,Module.dynCall_viiiii=asm.dynCall_viiiii,Module.dynCall_vi=asm.dynCall_vi,Module.dynCall_vii=asm.dynCall_vii,Module.dynCall_ii=asm.dynCall_ii,Module.dynCall_v=asm.dynCall_v,Module.dynCall_viiiiii=asm.dynCall_viiiiii,Module.dynCall_iii=asm.dynCall_iii,Module.dynCall_viiii=asm.dynCall_viiii,Runtime.stackAlloc=asm.stackAlloc,Runtime.stackSave=asm.stackSave,Runtime.stackRestore=asm.stackRestore,Runtime.setTempRet0=asm.setTempRet0,Runtime.getTempRet0=asm.getTempRet0;var i64Math=function(){var e={math:{}};function r(e,r,i){null!=e&&("number"==typeof e?this.fromNumber(e,r,i):null==r&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,r))}function i(){return new r(null)}e.math.Long=function(e,r){this.low_=0|e,this.high_=0|r},e.math.Long.IntCache_={},e.math.Long.fromInt=function(r){if(-128<=r&&r<128){var i=e.math.Long.IntCache_[r];if(i)return i}var t=new e.math.Long(0|r,r<0?-1:0);return-128<=r&&r<128&&(e.math.Long.IntCache_[r]=t),t},e.math.Long.fromNumber=function(r){return isNaN(r)||!isFinite(r)?e.math.Long.ZERO:r<=-e.math.Long.TWO_PWR_63_DBL_?e.math.Long.MIN_VALUE:r+1>=e.math.Long.TWO_PWR_63_DBL_?e.math.Long.MAX_VALUE:r<0?e.math.Long.fromNumber(-r).negate():new e.math.Long(r%e.math.Long.TWO_PWR_32_DBL_|0,r/e.math.Long.TWO_PWR_32_DBL_|0)},e.math.Long.fromBits=function(r,i){return new e.math.Long(r,i)},e.math.Long.fromString=function(r,i){if(0==r.length)throw Error("number format error: empty string");var t=i||10;if(t<2||36<t)throw Error("radix out of range: "+t);if("-"==r.charAt(0))return e.math.Long.fromString(r.substring(1),t).negate();if(r.indexOf("-")>=0)throw Error('number format error: interior "-" character: '+r);for(var n=e.math.Long.fromNumber(Math.pow(t,8)),o=e.math.Long.ZERO,a=0;a<r.length;a+=8){var s=Math.min(8,r.length-a),u=parseInt(r.substring(a,a+s),t);if(s<8){var f=e.math.Long.fromNumber(Math.pow(t,s));o=o.multiply(f).add(e.math.Long.fromNumber(u))}else o=(o=o.multiply(n)).add(e.math.Long.fromNumber(u))}return o},e.math.Long.TWO_PWR_16_DBL_=65536,e.math.Long.TWO_PWR_24_DBL_=1<<24,e.math.Long.TWO_PWR_32_DBL_=e.math.Long.TWO_PWR_16_DBL_*e.math.Long.TWO_PWR_16_DBL_,e.math.Long.TWO_PWR_31_DBL_=e.math.Long.TWO_PWR_32_DBL_/2,e.math.Long.TWO_PWR_48_DBL_=e.math.Long.TWO_PWR_32_DBL_*e.math.Long.TWO_PWR_16_DBL_,e.math.Long.TWO_PWR_64_DBL_=e.math.Long.TWO_PWR_32_DBL_*e.math.Long.TWO_PWR_32_DBL_,e.math.Long.TWO_PWR_63_DBL_=e.math.Long.TWO_PWR_64_DBL_/2,e.math.Long.ZERO=e.math.Long.fromInt(0),e.math.Long.ONE=e.math.Long.fromInt(1),e.math.Long.NEG_ONE=e.math.Long.fromInt(-1),e.math.Long.MAX_VALUE=e.math.Long.fromBits(-1,2147483647),e.math.Long.MIN_VALUE=e.math.Long.fromBits(0,-2147483648),e.math.Long.TWO_PWR_24_=e.math.Long.fromInt(1<<24),e.math.Long.prototype.toInt=function(){return this.low_},e.math.Long.prototype.toNumber=function(){return this.high_*e.math.Long.TWO_PWR_32_DBL_+this.getLowBitsUnsigned()},e.math.Long.prototype.toString=function(r){var i=r||10;if(i<2||36<i)throw Error("radix out of range: "+i);if(this.isZero())return"0";if(this.isNegative()){if(this.equals(e.math.Long.MIN_VALUE)){var t=e.math.Long.fromNumber(i),n=this.div(t),o=n.multiply(t).subtract(this);return n.toString(i)+o.toInt().toString(i)}return"-"+this.negate().toString(i)}for(var a=e.math.Long.fromNumber(Math.pow(i,6)),s=(o=this,"");;){var u=o.div(a),f=o.subtract(u.multiply(a)).toInt().toString(i);if((o=u).isZero())return f+s;for(;f.length<6;)f="0"+f;s=""+f+s}},e.math.Long.prototype.getHighBits=function(){return this.high_},e.math.Long.prototype.getLowBits=function(){return this.low_},e.math.Long.prototype.getLowBitsUnsigned=function(){return this.low_>=0?this.low_:e.math.Long.TWO_PWR_32_DBL_+this.low_},e.math.Long.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.math.Long.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var r=0!=this.high_?this.high_:this.low_,i=31;i>0&&!(r&1<<i);i--);return 0!=this.high_?i+33:i+1},e.math.Long.prototype.isZero=function(){return 0==this.high_&&0==this.low_},e.math.Long.prototype.isNegative=function(){return this.high_<0},e.math.Long.prototype.isOdd=function(){return!(1&~this.low_)},e.math.Long.prototype.equals=function(e){return this.high_==e.high_&&this.low_==e.low_},e.math.Long.prototype.notEquals=function(e){return this.high_!=e.high_||this.low_!=e.low_},e.math.Long.prototype.lessThan=function(e){return this.compare(e)<0},e.math.Long.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},e.math.Long.prototype.greaterThan=function(e){return this.compare(e)>0},e.math.Long.prototype.greaterThanOrEqual=function(e){return this.compare(e)>=0},e.math.Long.prototype.compare=function(e){if(this.equals(e))return 0;var r=this.isNegative(),i=e.isNegative();return r&&!i?-1:!r&&i?1:this.subtract(e).isNegative()?-1:1},e.math.Long.prototype.negate=function(){return this.equals(e.math.Long.MIN_VALUE)?e.math.Long.MIN_VALUE:this.not().add(e.math.Long.ONE)},e.math.Long.prototype.add=function(r){var i=this.high_>>>16,t=65535&this.high_,n=this.low_>>>16,o=65535&this.low_,a=r.high_>>>16,s=65535&r.high_,u=r.low_>>>16,f=0,l=0,c=0,h=0;return c+=(h+=o+(65535&r.low_))>>>16,h&=65535,l+=(c+=n+u)>>>16,c&=65535,f+=(l+=t+s)>>>16,l&=65535,f+=i+a,f&=65535,e.math.Long.fromBits(c<<16|h,f<<16|l)},e.math.Long.prototype.subtract=function(e){return this.add(e.negate())},e.math.Long.prototype.multiply=function(r){if(this.isZero())return e.math.Long.ZERO;if(r.isZero())return e.math.Long.ZERO;if(this.equals(e.math.Long.MIN_VALUE))return r.isOdd()?e.math.Long.MIN_VALUE:e.math.Long.ZERO;if(r.equals(e.math.Long.MIN_VALUE))return this.isOdd()?e.math.Long.MIN_VALUE:e.math.Long.ZERO;if(this.isNegative())return r.isNegative()?this.negate().multiply(r.negate()):this.negate().multiply(r).negate();if(r.isNegative())return this.multiply(r.negate()).negate();if(this.lessThan(e.math.Long.TWO_PWR_24_)&&r.lessThan(e.math.Long.TWO_PWR_24_))return e.math.Long.fromNumber(this.toNumber()*r.toNumber());var i=this.high_>>>16,t=65535&this.high_,n=this.low_>>>16,o=65535&this.low_,a=r.high_>>>16,s=65535&r.high_,u=r.low_>>>16,f=65535&r.low_,l=0,c=0,h=0,_=0;return h+=(_+=o*f)>>>16,_&=65535,c+=(h+=n*f)>>>16,h&=65535,c+=(h+=o*u)>>>16,h&=65535,l+=(c+=t*f)>>>16,c&=65535,l+=(c+=n*u)>>>16,c&=65535,l+=(c+=o*s)>>>16,c&=65535,l+=i*f+t*u+n*s+o*a,l&=65535,e.math.Long.fromBits(h<<16|_,l<<16|c)},e.math.Long.prototype.div=function(r){if(r.isZero())throw Error("division by zero");if(this.isZero())return e.math.Long.ZERO;if(this.equals(e.math.Long.MIN_VALUE)){if(r.equals(e.math.Long.ONE)||r.equals(e.math.Long.NEG_ONE))return e.math.Long.MIN_VALUE;if(r.equals(e.math.Long.MIN_VALUE))return e.math.Long.ONE;if((n=this.shiftRight(1).div(r).shiftLeft(1)).equals(e.math.Long.ZERO))return r.isNegative()?e.math.Long.ONE:e.math.Long.NEG_ONE;var i=this.subtract(r.multiply(n));return n.add(i.div(r))}if(r.equals(e.math.Long.MIN_VALUE))return e.math.Long.ZERO;if(this.isNegative())return r.isNegative()?this.negate().div(r.negate()):this.negate().div(r).negate();if(r.isNegative())return this.div(r.negate()).negate();var t=e.math.Long.ZERO;for(i=this;i.greaterThanOrEqual(r);){for(var n=Math.max(1,Math.floor(i.toNumber()/r.toNumber())),o=Math.ceil(Math.log(n)/Math.LN2),a=o<=48?1:Math.pow(2,o-48),s=e.math.Long.fromNumber(n),u=s.multiply(r);u.isNegative()||u.greaterThan(i);)n-=a,u=(s=e.math.Long.fromNumber(n)).multiply(r);s.isZero()&&(s=e.math.Long.ONE),t=t.add(s),i=i.subtract(u)}return t},e.math.Long.prototype.modulo=function(e){return this.subtract(this.div(e).multiply(e))},e.math.Long.prototype.not=function(){return e.math.Long.fromBits(~this.low_,~this.high_)},e.math.Long.prototype.and=function(r){return e.math.Long.fromBits(this.low_&r.low_,this.high_&r.high_)},e.math.Long.prototype.or=function(r){return e.math.Long.fromBits(this.low_|r.low_,this.high_|r.high_)},e.math.Long.prototype.xor=function(r){return e.math.Long.fromBits(this.low_^r.low_,this.high_^r.high_)},e.math.Long.prototype.shiftLeft=function(r){if(0==(r&=63))return this;var i=this.low_;if(r<32){var t=this.high_;return e.math.Long.fromBits(i<<r,t<<r|i>>>32-r)}return e.math.Long.fromBits(0,i<<r-32)},e.math.Long.prototype.shiftRight=function(r){if(0==(r&=63))return this;var i=this.high_;if(r<32){var t=this.low_;return e.math.Long.fromBits(t>>>r|i<<32-r,i>>r)}return e.math.Long.fromBits(i>>r-32,i>=0?0:-1)},e.math.Long.prototype.shiftRightUnsigned=function(r){if(0==(r&=63))return this;var i=this.high_;if(r<32){var t=this.low_;return e.math.Long.fromBits(t>>>r|i<<32-r,i>>>r)}return 32==r?e.math.Long.fromBits(i,0):e.math.Long.fromBits(i>>>r-32,0)},r.prototype.am=function(e,r,i,t,n,o){for(;--o>=0;){var a=r*this[e++]+i[t]+n;n=Math.floor(a/67108864),i[t++]=67108863&a}return n},r.prototype.DB=26,r.prototype.DM=67108863,r.prototype.DV=1<<26;r.prototype.FV=Math.pow(2,52),r.prototype.F1=26,r.prototype.F2=0;var t,n,o=new Array;for(t="0".charCodeAt(0),n=0;n<=9;++n)o[t++]=n;for(t="a".charCodeAt(0),n=10;n<36;++n)o[t++]=n;for(t="A".charCodeAt(0),n=10;n<36;++n)o[t++]=n;function a(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function s(e,r){var i=o[e.charCodeAt(r)];return null==i?-1:i}function u(e){var r=i();return r.fromInt(e),r}function f(e){var r,i=1;return 0!=(r=e>>>16)&&(e=r,i+=16),0!=(r=e>>8)&&(e=r,i+=8),0!=(r=e>>4)&&(e=r,i+=4),0!=(r=e>>2)&&(e=r,i+=2),0!=(r=e>>1)&&(e=r,i+=1),i}function l(e){this.m=e}function c(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}l.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},l.prototype.revert=function(e){return e},l.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},l.prototype.mulTo=function(e,r,i){e.multiplyTo(r,i),this.reduce(i)},l.prototype.sqrTo=function(e,r){e.squareTo(r),this.reduce(r)},c.prototype.convert=function(e){var t=i();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(r.ZERO)>0&&this.m.subTo(t,t),t},c.prototype.revert=function(e){var r=i();return e.copyTo(r),this.reduce(r),r},c.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var r=0;r<this.m.t;++r){var i=32767&e[r],t=i*this.mpl+((i*this.mph+(e[r]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[i=r+this.m.t]+=this.m.am(0,t,e,r,0,this.m.t);e[i]>=e.DV;)e[i]-=e.DV,e[++i]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},c.prototype.mulTo=function(e,r,i){e.multiplyTo(r,i),this.reduce(i)},c.prototype.sqrTo=function(e,r){e.squareTo(r),this.reduce(r)},r.prototype.copyTo=function(e){for(var r=this.t-1;r>=0;--r)e[r]=this[r];e.t=this.t,e.s=this.s},r.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+DV:this.t=0},r.prototype.fromString=function(e,i){var t;if(16==i)t=4;else if(8==i)t=3;else if(256==i)t=8;else if(2==i)t=1;else if(32==i)t=5;else{if(4!=i)return void this.fromRadix(e,i);t=2}this.t=0,this.s=0;for(var n=e.length,o=!1,a=0;--n>=0;){var u=8==t?255&e[n]:s(e,n);u<0?"-"==e.charAt(n)&&(o=!0):(o=!1,0==a?this[this.t++]=u:a+t>this.DB?(this[this.t-1]|=(u&(1<<this.DB-a)-1)<<a,this[this.t++]=u>>this.DB-a):this[this.t-1]|=u<<a,(a+=t)>=this.DB&&(a-=this.DB))}8==t&&128&e[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&r.ZERO.subTo(this,this)},r.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},r.prototype.dlShiftTo=function(e,r){var i;for(i=this.t-1;i>=0;--i)r[i+e]=this[i];for(i=e-1;i>=0;--i)r[i]=0;r.t=this.t+e,r.s=this.s},r.prototype.drShiftTo=function(e,r){for(var i=e;i<this.t;++i)r[i-e]=this[i];r.t=Math.max(this.t-e,0),r.s=this.s},r.prototype.lShiftTo=function(e,r){var i,t=e%this.DB,n=this.DB-t,o=(1<<n)-1,a=Math.floor(e/this.DB),s=this.s<<t&this.DM;for(i=this.t-1;i>=0;--i)r[i+a+1]=this[i]>>n|s,s=(this[i]&o)<<t;for(i=a-1;i>=0;--i)r[i]=0;r[a]=s,r.t=this.t+a+1,r.s=this.s,r.clamp()},r.prototype.rShiftTo=function(e,r){r.s=this.s;var i=Math.floor(e/this.DB);if(i>=this.t)r.t=0;else{var t=e%this.DB,n=this.DB-t,o=(1<<t)-1;r[0]=this[i]>>t;for(var a=i+1;a<this.t;++a)r[a-i-1]|=(this[a]&o)<<n,r[a-i]=this[a]>>t;t>0&&(r[this.t-i-1]|=(this.s&o)<<n),r.t=this.t-i,r.clamp()}},r.prototype.subTo=function(e,r){for(var i=0,t=0,n=Math.min(e.t,this.t);i<n;)t+=this[i]-e[i],r[i++]=t&this.DM,t>>=this.DB;if(e.t<this.t){for(t-=e.s;i<this.t;)t+=this[i],r[i++]=t&this.DM,t>>=this.DB;t+=this.s}else{for(t+=this.s;i<e.t;)t-=e[i],r[i++]=t&this.DM,t>>=this.DB;t-=e.s}r.s=t<0?-1:0,t<-1?r[i++]=this.DV+t:t>0&&(r[i++]=t),r.t=i,r.clamp()},r.prototype.multiplyTo=function(e,i){var t=this.abs(),n=e.abs(),o=t.t;for(i.t=o+n.t;--o>=0;)i[o]=0;for(o=0;o<n.t;++o)i[o+t.t]=t.am(0,n[o],i,o,0,t.t);i.s=0,i.clamp(),this.s!=e.s&&r.ZERO.subTo(i,i)},r.prototype.squareTo=function(e){for(var r=this.abs(),i=e.t=2*r.t;--i>=0;)e[i]=0;for(i=0;i<r.t-1;++i){var t=r.am(i,r[i],e,2*i,0,1);(e[i+r.t]+=r.am(i+1,2*r[i],e,2*i+1,t,r.t-i-1))>=r.DV&&(e[i+r.t]-=r.DV,e[i+r.t+1]=1)}e.t>0&&(e[e.t-1]+=r.am(i,r[i],e,2*i,0,1)),e.s=0,e.clamp()},r.prototype.divRemTo=function(e,t,n){var o=e.abs();if(!(o.t<=0)){var a=this.abs();if(a.t<o.t)return null!=t&&t.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=i());var s=i(),u=this.s,l=e.s,c=this.DB-f(o[o.t-1]);c>0?(o.lShiftTo(c,s),a.lShiftTo(c,n)):(o.copyTo(s),a.copyTo(n));var h=s.t,_=s[h-1];if(0!=_){var d=_*(1<<this.F1)+(h>1?s[h-2]>>this.F2:0),m=this.FV/d,g=(1<<this.F1)/d,p=1<<this.F2,v=n.t,b=v-h,y=null==t?i():t;for(s.dlShiftTo(b,y),n.compareTo(y)>=0&&(n[n.t++]=1,n.subTo(y,n)),r.ONE.dlShiftTo(h,y),y.subTo(s,s);s.t<h;)s[s.t++]=0;for(;--b>=0;){var w=n[--v]==_?this.DM:Math.floor(n[v]*m+(n[v-1]+p)*g);if((n[v]+=s.am(0,w,n,b,0,h))<w)for(s.dlShiftTo(b,y),n.subTo(y,n);n[v]<--w;)n.subTo(y,n)}null!=t&&(n.drShiftTo(h,t),u!=l&&r.ZERO.subTo(t,t)),n.t=h,n.clamp(),c>0&&n.rShiftTo(c,n),u<0&&r.ZERO.subTo(n,n)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var r=3&e;return(r=(r=(r=(r=r*(2-(15&e)*r)&15)*(2-(255&e)*r)&255)*(2-((65535&e)*r&65535))&65535)*(2-e*r%this.DV)%this.DV)>0?this.DV-r:-r},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(e,t){if(e>4294967295||e<1)return r.ONE;var n=i(),o=i(),a=t.convert(this),s=f(e)-1;for(a.copyTo(n);--s>=0;)if(t.sqrTo(n,o),(e&1<<s)>0)t.mulTo(o,a,n);else{var u=n;n=o,o=u}return t.revert(n)},r.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var r;if(16==e)r=4;else if(8==e)r=3;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return this.toRadix(e);r=2}var i,t=(1<<r)-1,n=!1,o="",s=this.t,u=this.DB-s*this.DB%r;if(s-- >0)for(u<this.DB&&(i=this[s]>>u)>0&&(n=!0,o=a(i));s>=0;)u<r?(i=(this[s]&(1<<u)-1)<<r-u,i|=this[--s]>>(u+=this.DB-r)):(i=this[s]>>(u-=r)&t,u<=0&&(u+=this.DB,--s)),i>0&&(n=!0),n&&(o+=a(i));return n?o:"0"},r.prototype.negate=function(){var e=i();return r.ZERO.subTo(this,e),e},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(e){var r=this.s-e.s;if(0!=r)return r;var i=this.t;if(0!=(r=i-e.t))return this.s<0?-r:r;for(;--i>=0;)if(0!=(r=this[i]-e[i]))return r;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+f(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(e){var t=i();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(r.ZERO)>0&&e.subTo(t,t),t},r.prototype.modPowInt=function(e,r){var i;return i=e<256||r.isEven()?new l(r):new c(r),this.exp(e,i)},r.ZERO=u(0),r.ONE=u(1),r.prototype.fromRadix=function(e,i){this.fromInt(0),null==i&&(i=10);for(var t=this.chunkSize(i),n=Math.pow(i,t),o=!1,a=0,u=0,f=0;f<e.length;++f){var l=s(e,f);l<0?"-"==e.charAt(f)&&0==this.signum()&&(o=!0):(u=i*u+l,++a>=t&&(this.dMultiply(n),this.dAddOffset(u,0),a=0,u=0))}a>0&&(this.dMultiply(Math.pow(i,a)),this.dAddOffset(u,0)),o&&r.ZERO.subTo(this,this)},r.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(e,r){if(0!=e){for(;this.t<=r;)this[this.t++]=0;for(this[r]+=e;this[r]>=this.DV;)this[r]-=this.DV,++r>=this.t&&(this[this.t++]=0),++this[r]}},r.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var r=this.chunkSize(e),t=Math.pow(e,r),n=u(t),o=i(),a=i(),s="";for(this.divRemTo(n,o,a);o.signum()>0;)s=(t+a.intValue()).toString(e).substr(1)+s,o.divRemTo(n,o,a);return a.intValue().toString(e)+s},r.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},r.prototype.addTo=function(e,r){for(var i=0,t=0,n=Math.min(e.t,this.t);i<n;)t+=this[i]+e[i],r[i++]=t&this.DM,t>>=this.DB;if(e.t<this.t){for(t+=e.s;i<this.t;)t+=this[i],r[i++]=t&this.DM,t>>=this.DB;t+=this.s}else{for(t+=this.s;i<e.t;)t+=e[i],r[i++]=t&this.DM,t>>=this.DB;t+=e.s}r.s=t<0?-1:0,t>0?r[i++]=t:t<-1&&(r[i++]=this.DV+t),r.t=i,r.clamp()};var h={abs:function(r,i){var t,n=new e.math.Long(r,i);t=n.isNegative()?n.negate():n,HEAP32[tempDoublePtr>>2]=t.low_,HEAP32[tempDoublePtr+4>>2]=t.high_},ensureTemps:function(){h.ensuredTemps||(h.ensuredTemps=!0,h.two32=new r,h.two32.fromString("4294967296",10),h.two64=new r,h.two64.fromString("18446744073709551616",10),h.temp1=new r,h.temp2=new r)},lh2bignum:function(e,i){var t=new r;t.fromString(i.toString(),10);var n=new r;t.multiplyTo(h.two32,n);var o=new r;o.fromString(e.toString(),10);var a=new r;return o.addTo(n,a),a},stringify:function(i,t,n){var o=new e.math.Long(i,t).toString();if(n&&"-"==o[0]){h.ensureTemps();var a=new r;a.fromString(o,10),o=new r,h.two64.addTo(a,o),o=o.toString(10)}return o},fromString:function(i,t,n,o,a){h.ensureTemps();var s=new r;s.fromString(i,t);var u=new r;u.fromString(n,10);var f=new r;if(f.fromString(o,10),a&&s.compareTo(r.ZERO)<0){var l=new r;s.addTo(h.two64,l),s=l}var c=!1;s.compareTo(u)<0?(s=u,c=!0):s.compareTo(f)>0&&(s=f,c=!0);var _=e.math.Long.fromString(s.toString());if(HEAP32[tempDoublePtr>>2]=_.low_,HEAP32[tempDoublePtr+4>>2]=_.high_,c)throw"range error"}};return h}(),initialStackTop;function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function run(e){function r(){Module.calledRun||(Module.calledRun=!0,ABORT||(ensureInitRuntime(),preMain(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}e=e||Module.arguments,runDependencies>0||(preRun(),runDependencies>0||Module.calledRun||(Module.setStatus?(Module.setStatus("Running..."),setTimeout((function(){setTimeout((function(){Module.setStatus("")}),1),r()}),1)):r()))}function exit(e){if(!Module.noExitRuntime)throw ABORT=!0,STACKTOP=initialStackTop,exitRuntime(),ENVIRONMENT_IS_NODE?(process.stdout.once("drain",(function(){process.exit(e)})),console.log(" "),setTimeout((function(){process.exit(e)}),500)):ENVIRONMENT_IS_SHELL&&"function"==typeof quit&&quit(e),new ExitStatus(e)}function abort(e){e&&(Module.print(e),Module.printErr(e)),ABORT=!0;throw"abort() at "+stackTrace()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information."}if(ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus,dependenciesFulfilled=function e(){!Module.calledRun&&shouldRunNow&&run(),Module.calledRun||(dependenciesFulfilled=e)},Module.callMain=Module.callMain=function(e){assert(0==runDependencies,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(0==__ATPRERUN__.length,"cannot call main when preRun functions remain to be called"),e=e||[],ensureInitRuntime();var r=e.length+1;function i(){for(var e=0;e<3;e++)t.push(0)}var t=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];i();for(var n=0;n<r-1;n+=1)t.push(allocate(intArrayFromString(e[n]),"i8",ALLOC_NORMAL)),i();t.push(0),t=allocate(t,"i32",ALLOC_NORMAL),initialStackTop=STACKTOP;try{exit(Module._main(r,t,0))}catch(e){if(e instanceof ExitStatus)return;if("SimulateInfiniteLoop"==e)return void(Module.noExitRuntime=!0);throw e&&"object"==typeof e&&e.stack&&Module.printErr("exception thrown: "+[e,e.stack]),e}},Module.run=Module.run=run,Module.exit=Module.exit=exit,Module.abort=Module.abort=abort,Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run();var origMalloc=Module._malloc,origFree=Module._free,MEMSTATS={totalMemory:Module.HEAPU8.length,heapUsed:0},MEMSTATS_DATA={pointerToSizeMap:{},getSizeOfPointer:function(e){return MEMSTATS_DATA.pointerToSizeMap[e]}};Module.MEMSTATS=MEMSTATS,Module.MEMSTATS_DATA=MEMSTATS_DATA;var hookedMalloc=function(e){var r=origMalloc(e);return r?(MEMSTATS.heapUsed+=e,MEMSTATS_DATA.pointerToSizeMap[r]=e,r):0},hookedFree=function(e){return e&&(MEMSTATS.heapUsed-=MEMSTATS_DATA.getSizeOfPointer(e)||0,delete MEMSTATS_DATA.pointerToSizeMap[e]),origFree(e)};return Module._malloc=hookedMalloc,Module._free=hookedFree,_malloc=hookedMalloc,_free=hookedFree,module.exports},module.exports=C_MINISAT})),VERSION="1.13.7",root="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},ArrayProto=Array.prototype,ObjProto=Object.prototype,SymbolProto="undefined"!=typeof Symbol?Symbol.prototype:null,push=ArrayProto.push,slice=ArrayProto.slice,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty,supportsArrayBuffer="undefined"!=typeof ArrayBuffer,supportsDataView="undefined"!=typeof DataView,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeCreate=Object.create,nativeIsView=supportsArrayBuffer&&ArrayBuffer.isView,_isNaN=isNaN,_isFinite=isFinite,hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],MAX_ARRAY_INDEX=Math.pow(2,53)-1;function restArguments(e,r){return r=null==r?e.length-1:+r,function(){for(var i=Math.max(arguments.length-r,0),t=Array(i),n=0;n<i;n++)t[n]=arguments[n+r];switch(r){case 0:return e.call(this,t);case 1:return e.call(this,arguments[0],t);case 2:return e.call(this,arguments[0],arguments[1],t)}var o=Array(r+1);for(n=0;n<r;n++)o[n]=arguments[n];return o[r]=t,e.apply(this,o)}}function isObject(e){var r=typeof e;return"function"===r||"object"===r&&!!e}function isNull(e){return null===e}function isUndefined(e){return void 0===e}function isBoolean(e){return!0===e||!1===e||"[object Boolean]"===toString.call(e)}function isElement(e){return!(!e||1!==e.nodeType)}function tagTester(e){var r="[object "+e+"]";return function(e){return toString.call(e)===r}}var isString$1=tagTester("String"),isNumber=tagTester("Number"),isDate=tagTester("Date"),isRegExp=tagTester("RegExp"),isError=tagTester("Error"),isSymbol=tagTester("Symbol"),isArrayBuffer=tagTester("ArrayBuffer"),isFunction$1=tagTester("Function"),nodelist=root.document&&root.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof nodelist&&(isFunction$1=function(e){return"function"==typeof e||!1});var isFunction$2=isFunction$1,hasObjectTag=tagTester("Object"),hasDataViewBug=supportsDataView&&(!/\[native code\]/.test(String(DataView))||hasObjectTag(new DataView(new ArrayBuffer(8)))),isIE11="undefined"!=typeof Map&&hasObjectTag(new Map),isDataView=tagTester("DataView");function alternateIsDataView(e){return null!=e&&isFunction$2(e.getInt8)&&isArrayBuffer(e.buffer)}var isDataView$1=hasDataViewBug?alternateIsDataView:isDataView,isArray=nativeIsArray||tagTester("Array");function has$1(e,r){return null!=e&&hasOwnProperty.call(e,r)}var isArguments=tagTester("Arguments");!function(){isArguments(arguments)||(isArguments=function(e){return has$1(e,"callee")})}();var isArguments$1=isArguments;function isFinite$1(e){return!isSymbol(e)&&_isFinite(e)&&!isNaN(parseFloat(e))}function isNaN$1(e){return isNumber(e)&&_isNaN(e)}function constant(e){return function(){return e}}function createSizePropertyCheck(e){return function(r){var i=e(r);return"number"==typeof i&&i>=0&&i<=MAX_ARRAY_INDEX}}function shallowProperty(e){return function(r){return null==r?void 0:r[e]}}var getByteLength=shallowProperty("byteLength"),isBufferLike=createSizePropertyCheck(getByteLength),typedArrayPattern=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function isTypedArray(e){return nativeIsView?nativeIsView(e)&&!isDataView$1(e):isBufferLike(e)&&typedArrayPattern.test(toString.call(e))}var isTypedArray$1=supportsArrayBuffer?isTypedArray:constant(!1),getLength=shallowProperty("length");function emulatedSet(e){for(var r={},i=e.length,t=0;t<i;++t)r[e[t]]=!0;return{contains:function(e){return!0===r[e]},push:function(i){return r[i]=!0,e.push(i)}}}function collectNonEnumProps(e,r){r=emulatedSet(r);var i=nonEnumerableProps.length,t=e.constructor,n=isFunction$2(t)&&t.prototype||ObjProto,o="constructor";for(has$1(e,o)&&!r.contains(o)&&r.push(o);i--;)(o=nonEnumerableProps[i])in e&&e[o]!==n[o]&&!r.contains(o)&&r.push(o)}function keys(e){if(!isObject(e))return[];if(nativeKeys)return nativeKeys(e);var r=[];for(var i in e)has$1(e,i)&&r.push(i);return hasEnumBug&&collectNonEnumProps(e,r),r}function isEmpty(e){if(null==e)return!0;var r=getLength(e);return"number"==typeof r&&(isArray(e)||isString$1(e)||isArguments$1(e))?0===r:0===getLength(keys(e))}function isMatch(e,r){var i=keys(r),t=i.length;if(null==e)return!t;for(var n=Object(e),o=0;o<t;o++){var a=i[o];if(r[a]!==n[a]||!(a in n))return!1}return!0}function _$2(e){return e instanceof _$2?e:this instanceof _$2?void(this._wrapped=e):new _$2(e)}function toBufferView(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,getByteLength(e))}_$2.VERSION=VERSION,_$2.prototype.value=function(){return this._wrapped},_$2.prototype.valueOf=_$2.prototype.toJSON=_$2.prototype.value,_$2.prototype.toString=function(){return String(this._wrapped)};var tagDataView="[object DataView]";function eq(e,r,i,t){if(e===r)return 0!==e||1/e==1/r;if(null==e||null==r)return!1;if(e!=e)return r!=r;var n=typeof e;return("function"===n||"object"===n||"object"==typeof r)&&deepEq(e,r,i,t)}function deepEq(e,r,i,t){e instanceof _$2&&(e=e._wrapped),r instanceof _$2&&(r=r._wrapped);var n=toString.call(e);if(n!==toString.call(r))return!1;if(hasDataViewBug&&"[object Object]"==n&&isDataView$1(e)){if(!isDataView$1(r))return!1;n=tagDataView}switch(n){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!=+e?+r!=+r:0==+e?1/+e==1/r:+e==+r;case"[object Date]":case"[object Boolean]":return+e==+r;case"[object Symbol]":return SymbolProto.valueOf.call(e)===SymbolProto.valueOf.call(r);case"[object ArrayBuffer]":case tagDataView:return deepEq(toBufferView(e),toBufferView(r),i,t)}var o="[object Array]"===n;if(!o&&isTypedArray$1(e)){if(getByteLength(e)!==getByteLength(r))return!1;if(e.buffer===r.buffer&&e.byteOffset===r.byteOffset)return!0;o=!0}if(!o){if("object"!=typeof e||"object"!=typeof r)return!1;var a=e.constructor,s=r.constructor;if(a!==s&&!(isFunction$2(a)&&a instanceof a&&isFunction$2(s)&&s instanceof s)&&"constructor"in e&&"constructor"in r)return!1}t=t||[];for(var u=(i=i||[]).length;u--;)if(i[u]===e)return t[u]===r;if(i.push(e),t.push(r),o){if((u=e.length)!==r.length)return!1;for(;u--;)if(!eq(e[u],r[u],i,t))return!1}else{var f,l=keys(e);if(u=l.length,keys(r).length!==u)return!1;for(;u--;)if(!has$1(r,f=l[u])||!eq(e[f],r[f],i,t))return!1}return i.pop(),t.pop(),!0}function isEqual(e,r){return eq(e,r)}function allKeys(e){if(!isObject(e))return[];var r=[];for(var i in e)r.push(i);return hasEnumBug&&collectNonEnumProps(e,r),r}function ie11fingerprint(e){var r=getLength(e);return function(i){if(null==i)return!1;var t=allKeys(i);if(getLength(t))return!1;for(var n=0;n<r;n++)if(!isFunction$2(i[e[n]]))return!1;return e!==weakMapMethods||!isFunction$2(i[forEachName])}}var forEachName="forEach",hasName="has",commonInit=["clear","delete"],mapTail=["get",hasName,"set"],mapMethods=commonInit.concat(forEachName,mapTail),weakMapMethods=commonInit.concat(mapTail),setMethods=["add"].concat(commonInit,forEachName,hasName),isMap=isIE11?ie11fingerprint(mapMethods):tagTester("Map"),isWeakMap=isIE11?ie11fingerprint(weakMapMethods):tagTester("WeakMap"),isSet=isIE11?ie11fingerprint(setMethods):tagTester("Set"),isWeakSet=tagTester("WeakSet");function values(e){for(var r=keys(e),i=r.length,t=Array(i),n=0;n<i;n++)t[n]=e[r[n]];return t}function pairs(e){for(var r=keys(e),i=r.length,t=Array(i),n=0;n<i;n++)t[n]=[r[n],e[r[n]]];return t}function invert(e){for(var r={},i=keys(e),t=0,n=i.length;t<n;t++)r[e[i[t]]]=i[t];return r}function functions(e){var r=[];for(var i in e)isFunction$2(e[i])&&r.push(i);return r.sort()}function createAssigner(e,r){return function(i){var t=arguments.length;if(r&&(i=Object(i)),t<2||null==i)return i;for(var n=1;n<t;n++)for(var o=arguments[n],a=e(o),s=a.length,u=0;u<s;u++){var f=a[u];r&&void 0!==i[f]||(i[f]=o[f])}return i}}var extend=createAssigner(allKeys),extendOwn=createAssigner(keys),defaults=createAssigner(allKeys,!0);function ctor(){return function(){}}function baseCreate(e){if(!isObject(e))return{};if(nativeCreate)return nativeCreate(e);var r=ctor();r.prototype=e;var i=new r;return r.prototype=null,i}function create(e,r){var i=baseCreate(e);return r&&extendOwn(i,r),i}function clone(e){return isObject(e)?isArray(e)?e.slice():extend({},e):e}function tap(e,r){return r(e),e}function toPath$1(e){return isArray(e)?e:[e]}function toPath(e){return _$2.toPath(e)}function deepGet(e,r){for(var i=r.length,t=0;t<i;t++){if(null==e)return;e=e[r[t]]}return i?e:void 0}function get(e,r,i){var t=deepGet(e,toPath(r));return isUndefined(t)?i:t}function has(e,r){for(var i=(r=toPath(r)).length,t=0;t<i;t++){var n=r[t];if(!has$1(e,n))return!1;e=e[n]}return!!i}function identity(e){return e}function matcher(e){return e=extendOwn({},e),function(r){return isMatch(r,e)}}function property(e){return e=toPath(e),function(r){return deepGet(r,e)}}function optimizeCb(e,r,i){if(void 0===r)return e;switch(null==i?3:i){case 1:return function(i){return e.call(r,i)};case 3:return function(i,t,n){return e.call(r,i,t,n)};case 4:return function(i,t,n,o){return e.call(r,i,t,n,o)}}return function(){return e.apply(r,arguments)}}function baseIteratee(e,r,i){return null==e?identity:isFunction$2(e)?optimizeCb(e,r,i):isObject(e)&&!isArray(e)?matcher(e):property(e)}function iteratee(e,r){return baseIteratee(e,r,1/0)}function cb(e,r,i){return _$2.iteratee!==iteratee?_$2.iteratee(e,r):baseIteratee(e,r,i)}function mapObject(e,r,i){r=cb(r,i);for(var t=keys(e),n=t.length,o={},a=0;a<n;a++){var s=t[a];o[s]=r(e[s],s,e)}return o}function noop(){}function propertyOf(e){return null==e?noop:function(r){return get(e,r)}}function times(e,r,i){var t=Array(Math.max(0,e));r=optimizeCb(r,i,1);for(var n=0;n<e;n++)t[n]=r(n);return t}function random(e,r){return null==r&&(r=e,e=0),e+Math.floor(Math.random()*(r-e+1))}_$2.toPath=toPath$1,_$2.iteratee=iteratee;var now=Date.now||function(){return(new Date).getTime()};function createEscaper(e){var r=function(r){return e[r]},i="(?:"+keys(e).join("|")+")",t=RegExp(i),n=RegExp(i,"g");return function(e){return e=null==e?"":""+e,t.test(e)?e.replace(n,r):e}}var escapeMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},escape=createEscaper(escapeMap),unescapeMap=invert(escapeMap),unescape$1=createEscaper(unescapeMap),templateSettings=_$2.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},noMatch=/(.)^/,escapes={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},escapeRegExp=/\\|'|\r|\n|\u2028|\u2029/g;function escapeChar(e){return"\\"+escapes[e]}var bareIdentifier=/^\s*(\w|\$)+\s*$/;function template(e,r,i){!r&&i&&(r=i),r=defaults({},r,_$2.templateSettings);var t=RegExp([(r.escape||noMatch).source,(r.interpolate||noMatch).source,(r.evaluate||noMatch).source].join("|")+"|$","g"),n=0,o="__p+='";e.replace(t,(function(r,i,t,a,s){return o+=e.slice(n,s).replace(escapeRegExp,escapeChar),n=s+r.length,i?o+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":t?o+="'+\n((__t=("+t+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),r})),o+="';\n";var a,s=r.variable;if(s){if(!bareIdentifier.test(s))throw new Error("variable is not a bare identifier: "+s)}else o="with(obj||{}){\n"+o+"}\n",s="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{a=new Function(s,"_",o)}catch(e){throw e.source=o,e}var u=function(e){return a.call(this,e,_$2)};return u.source="function("+s+"){\n"+o+"}",u}function result(e,r,i){var t=(r=toPath(r)).length;if(!t)return isFunction$2(i)?i.call(e):i;for(var n=0;n<t;n++){var o=null==e?void 0:e[r[n]];void 0===o&&(o=i,n=t),e=isFunction$2(o)?o.call(e):o}return e}var idCounter=0;function uniqueId(e){var r=++idCounter+"";return e?e+r:r}function chain(e){var r=_$2(e);return r._chain=!0,r}function executeBound(e,r,i,t,n){if(!(t instanceof r))return e.apply(i,n);var o=baseCreate(e.prototype),a=e.apply(o,n);return isObject(a)?a:o}var partial=restArguments((function(e,r){var i=partial.placeholder,t=function(){for(var n=0,o=r.length,a=Array(o),s=0;s<o;s++)a[s]=r[s]===i?arguments[n++]:r[s];for(;n<arguments.length;)a.push(arguments[n++]);return executeBound(e,t,this,this,a)};return t}));partial.placeholder=_$2;var bind=restArguments((function(e,r,i){if(!isFunction$2(e))throw new TypeError("Bind must be called on a function");var t=restArguments((function(n){return executeBound(e,t,r,this,i.concat(n))}));return t})),isArrayLike=createSizePropertyCheck(getLength);function flatten$1(e,r,i,t){if(t=t||[],r||0===r){if(r<=0)return t.concat(e)}else r=1/0;for(var n=t.length,o=0,a=getLength(e);o<a;o++){var s=e[o];if(isArrayLike(s)&&(isArray(s)||isArguments$1(s)))if(r>1)flatten$1(s,r-1,i,t),n=t.length;else for(var u=0,f=s.length;u<f;)t[n++]=s[u++];else i||(t[n++]=s)}return t}var bindAll=restArguments((function(e,r){var i=(r=flatten$1(r,!1,!1)).length;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;){var t=r[i];e[t]=bind(e[t],e)}return e}));function memoize(e,r){var i=function(t){var n=i.cache,o=""+(r?r.apply(this,arguments):t);return has$1(n,o)||(n[o]=e.apply(this,arguments)),n[o]};return i.cache={},i}var delay=restArguments((function(e,r,i){return setTimeout((function(){return e.apply(null,i)}),r)})),defer=partial(delay,_$2,1);function throttle(e,r,i){var t,n,o,a,s=0;i||(i={});var u=function(){s=!1===i.leading?0:now(),t=null,a=e.apply(n,o),t||(n=o=null)},f=function(){var f=now();s||!1!==i.leading||(s=f);var l=r-(f-s);return n=this,o=arguments,l<=0||l>r?(t&&(clearTimeout(t),t=null),s=f,a=e.apply(n,o),t||(n=o=null)):t||!1===i.trailing||(t=setTimeout(u,l)),a};return f.cancel=function(){clearTimeout(t),s=0,t=n=o=null},f}function debounce(e,r,i){var t,n,o,a,s,u=function(){var f=now()-n;r>f?t=setTimeout(u,r-f):(t=null,i||(a=e.apply(s,o)),t||(o=s=null))},f=restArguments((function(f){return s=this,o=f,n=now(),t||(t=setTimeout(u,r),i&&(a=e.apply(s,o))),a}));return f.cancel=function(){clearTimeout(t),t=o=s=null},f}function wrap(e,r){return partial(r,e)}function negate(e){return function(){return!e.apply(this,arguments)}}function compose(){var e=arguments,r=e.length-1;return function(){for(var i=r,t=e[r].apply(this,arguments);i--;)t=e[i].call(this,t);return t}}function after(e,r){return function(){if(--e<1)return r.apply(this,arguments)}}function before(e,r){var i;return function(){return--e>0&&(i=r.apply(this,arguments)),e<=1&&(r=null),i}}var once=partial(before,2);function findKey(e,r,i){r=cb(r,i);for(var t,n=keys(e),o=0,a=n.length;o<a;o++)if(r(e[t=n[o]],t,e))return t}function createPredicateIndexFinder(e){return function(r,i,t){i=cb(i,t);for(var n=getLength(r),o=e>0?0:n-1;o>=0&&o<n;o+=e)if(i(r[o],o,r))return o;return-1}}var findIndex=createPredicateIndexFinder(1),findLastIndex=createPredicateIndexFinder(-1);function sortedIndex(e,r,i,t){for(var n=(i=cb(i,t,1))(r),o=0,a=getLength(e);o<a;){var s=Math.floor((o+a)/2);i(e[s])<n?o=s+1:a=s}return o}function createIndexFinder(e,r,i){return function(t,n,o){var a=0,s=getLength(t);if("number"==typeof o)e>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(i&&o&&s)return t[o=i(t,n)]===n?o:-1;if(n!=n)return(o=r(slice.call(t,a,s),isNaN$1))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o<s;o+=e)if(t[o]===n)return o;return-1}}var indexOf=createIndexFinder(1,findIndex,sortedIndex),lastIndexOf=createIndexFinder(-1,findLastIndex);function find(e,r,i){var t=(isArrayLike(e)?findIndex:findKey)(e,r,i);if(void 0!==t&&-1!==t)return e[t]}function findWhere(e,r){return find(e,matcher(r))}function each(e,r,i){var t,n;if(r=optimizeCb(r,i),isArrayLike(e))for(t=0,n=e.length;t<n;t++)r(e[t],t,e);else{var o=keys(e);for(t=0,n=o.length;t<n;t++)r(e[o[t]],o[t],e)}return e}function map(e,r,i){r=cb(r,i);for(var t=!isArrayLike(e)&&keys(e),n=(t||e).length,o=Array(n),a=0;a<n;a++){var s=t?t[a]:a;o[a]=r(e[s],s,e)}return o}function createReduce(e){return function(r,i,t,n){var o=arguments.length>=3;return function(r,i,t,n){var o=!isArrayLike(r)&&keys(r),a=(o||r).length,s=e>0?0:a-1;for(n||(t=r[o?o[s]:s],s+=e);s>=0&&s<a;s+=e){var u=o?o[s]:s;t=i(t,r[u],u,r)}return t}(r,optimizeCb(i,n,4),t,o)}}var reduce=createReduce(1),reduceRight=createReduce(-1);function filter(e,r,i){var t=[];return r=cb(r,i),each(e,(function(e,i,n){r(e,i,n)&&t.push(e)})),t}function reject(e,r,i){return filter(e,negate(cb(r)),i)}function every(e,r,i){r=cb(r,i);for(var t=!isArrayLike(e)&&keys(e),n=(t||e).length,o=0;o<n;o++){var a=t?t[o]:o;if(!r(e[a],a,e))return!1}return!0}function some(e,r,i){r=cb(r,i);for(var t=!isArrayLike(e)&&keys(e),n=(t||e).length,o=0;o<n;o++){var a=t?t[o]:o;if(r(e[a],a,e))return!0}return!1}function contains(e,r,i,t){return isArrayLike(e)||(e=values(e)),("number"!=typeof i||t)&&(i=0),indexOf(e,r,i)>=0}var invoke=restArguments((function(e,r,i){var t,n;return isFunction$2(r)?n=r:(r=toPath(r),t=r.slice(0,-1),r=r[r.length-1]),map(e,(function(e){var o=n;if(!o){if(t&&t.length&&(e=deepGet(e,t)),null==e)return;o=e[r]}return null==o?o:o.apply(e,i)}))}));function pluck(e,r){return map(e,property(r))}function where(e,r){return filter(e,matcher(r))}function max(e,r,i){var t,n,o=-1/0,a=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=isArrayLike(e)?e:values(e)).length;s<u;s++)null!=(t=e[s])&&t>o&&(o=t);else r=cb(r,i),each(e,(function(e,i,t){((n=r(e,i,t))>a||n===-1/0&&o===-1/0)&&(o=e,a=n)}));return o}function min(e,r,i){var t,n,o=1/0,a=1/0;if(null==r||"number"==typeof r&&"object"!=typeof e[0]&&null!=e)for(var s=0,u=(e=isArrayLike(e)?e:values(e)).length;s<u;s++)null!=(t=e[s])&&t<o&&(o=t);else r=cb(r,i),each(e,(function(e,i,t){((n=r(e,i,t))<a||n===1/0&&o===1/0)&&(o=e,a=n)}));return o}var reStrSymbol=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function toArray(e){return e?isArray(e)?slice.call(e):isString$1(e)?e.match(reStrSymbol):isArrayLike(e)?map(e,identity):values(e):[]}function sample(e,r,i){if(null==r||i)return isArrayLike(e)||(e=values(e)),e[random(e.length-1)];var t=toArray(e),n=getLength(t);r=Math.max(Math.min(r,n),0);for(var o=n-1,a=0;a<r;a++){var s=random(a,o),u=t[a];t[a]=t[s],t[s]=u}return t.slice(0,r)}function shuffle(e){return sample(e,1/0)}function sortBy(e,r,i){var t=0;return r=cb(r,i),pluck(map(e,(function(e,i,n){return{value:e,index:t++,criteria:r(e,i,n)}})).sort((function(e,r){var i=e.criteria,t=r.criteria;if(i!==t){if(i>t||void 0===i)return 1;if(i<t||void 0===t)return-1}return e.index-r.index})),"value")}function group$1(e,r){return function(i,t,n){var o=r?[[],[]]:{};return t=cb(t,n),each(i,(function(r,n){var a=t(r,n,i);e(o,r,a)})),o}}var groupBy=group$1((function(e,r,i){has$1(e,i)?e[i].push(r):e[i]=[r]})),indexBy=group$1((function(e,r,i){e[i]=r})),countBy=group$1((function(e,r,i){has$1(e,i)?e[i]++:e[i]=1})),partition=group$1((function(e,r,i){e[i?0:1].push(r)}),!0);function size(e){return null==e?0:isArrayLike(e)?e.length:keys(e).length}function keyInObj(e,r,i){return r in i}var pick=restArguments((function(e,r){var i={},t=r[0];if(null==e)return i;isFunction$2(t)?(r.length>1&&(t=optimizeCb(t,r[1])),r=allKeys(e)):(t=keyInObj,r=flatten$1(r,!1,!1),e=Object(e));for(var n=0,o=r.length;n<o;n++){var a=r[n],s=e[a];t(s,a,e)&&(i[a]=s)}return i})),omit=restArguments((function(e,r){var i,t=r[0];return isFunction$2(t)?(t=negate(t),r.length>1&&(i=r[1])):(r=map(flatten$1(r,!1,!1),String),t=function(e,i){return!contains(r,i)}),pick(e,t,i)}));function initial(e,r,i){return slice.call(e,0,Math.max(0,e.length-(null==r||i?1:r)))}function first(e,r,i){return null==e||e.length<1?null==r||i?void 0:[]:null==r||i?e[0]:initial(e,e.length-r)}function rest(e,r,i){return slice.call(e,null==r||i?1:r)}function last(e,r,i){return null==e||e.length<1?null==r||i?void 0:[]:null==r||i?e[e.length-1]:rest(e,Math.max(0,e.length-r))}function compact(e){return filter(e,Boolean)}function flatten(e,r){return flatten$1(e,r,!1)}var difference=restArguments((function(e,r){return r=flatten$1(r,!0,!0),filter(e,(function(e){return!contains(r,e)}))})),without=restArguments((function(e,r){return difference(e,r)}));function uniq(e,r,i,t){isBoolean(r)||(t=i,i=r,r=!1),null!=i&&(i=cb(i,t));for(var n=[],o=[],a=0,s=getLength(e);a<s;a++){var u=e[a],f=i?i(u,a,e):u;r&&!i?(a&&o===f||n.push(u),o=f):i?contains(o,f)||(o.push(f),n.push(u)):contains(n,u)||n.push(u)}return n}var union=restArguments((function(e){return uniq(flatten$1(e,!0,!0))}));function intersection(e){for(var r=[],i=arguments.length,t=0,n=getLength(e);t<n;t++){var o=e[t];if(!contains(r,o)){var a;for(a=1;a<i&&contains(arguments[a],o);a++);a===i&&r.push(o)}}return r}function unzip(e){for(var r=e&&max(e,getLength).length||0,i=Array(r),t=0;t<r;t++)i[t]=pluck(e,t);return i}var zip=restArguments(unzip);function object(e,r){for(var i={},t=0,n=getLength(e);t<n;t++)r?i[e[t]]=r[t]:i[e[t][0]]=e[t][1];return i}function range(e,r,i){null==r&&(r=e||0,e=0),i||(i=r<e?-1:1);for(var t=Math.max(Math.ceil((r-e)/i),0),n=Array(t),o=0;o<t;o++,e+=i)n[o]=e;return n}function chunk(e,r){if(null==r||r<1)return[];for(var i=[],t=0,n=e.length;t<n;)i.push(slice.call(e,t,t+=r));return i}function chainResult(e,r){return e._chain?_$2(r).chain():r}function mixin(e){return each(functions(e),(function(r){var i=_$2[r]=e[r];_$2.prototype[r]=function(){var e=[this._wrapped];return push.apply(e,arguments),chainResult(this,i.apply(_$2,e))}})),_$2}each(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var r=ArrayProto[e];_$2.prototype[e]=function(){var i=this._wrapped;return null!=i&&(r.apply(i,arguments),"shift"!==e&&"splice"!==e||0!==i.length||delete i[0]),chainResult(this,i)}})),each(["concat","join","slice"],(function(e){var r=ArrayProto[e];_$2.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=r.apply(e,arguments)),chainResult(this,e)}}));var allExports=Object.freeze({__proto__:null,VERSION:VERSION,restArguments:restArguments,isObject:isObject,isNull:isNull,isUndefined:isUndefined,isBoolean:isBoolean,isElement:isElement,isString:isString$1,isNumber:isNumber,isDate:isDate,isRegExp:isRegExp,isError:isError,isSymbol:isSymbol,isArrayBuffer:isArrayBuffer,isDataView:isDataView$1,isArray:isArray,isFunction:isFunction$2,isArguments:isArguments$1,isFinite:isFinite$1,isNaN:isNaN$1,isTypedArray:isTypedArray$1,isEmpty:isEmpty,isMatch:isMatch,isEqual:isEqual,isMap:isMap,isWeakMap:isWeakMap,isSet:isSet,isWeakSet:isWeakSet,keys:keys,allKeys:allKeys,values:values,pairs:pairs,invert:invert,functions:functions,methods:functions,extend:extend,extendOwn:extendOwn,assign:extendOwn,defaults:defaults,create:create,clone:clone,tap:tap,get:get,has:has,mapObject:mapObject,identity:identity,constant:constant,noop:noop,toPath:toPath$1,property:property,propertyOf:propertyOf,matcher:matcher,matches:matcher,times:times,random:random,now:now,escape:escape,unescape:unescape$1,templateSettings:templateSettings,template:template,result:result,uniqueId:uniqueId,chain:chain,iteratee:iteratee,partial:partial,bind:bind,bindAll:bindAll,memoize:memoize,delay:delay,defer:defer,throttle:throttle,debounce:debounce,wrap:wrap,negate:negate,compose:compose,after:after,before:before,once:once,findKey:findKey,findIndex:findIndex,findLastIndex:findLastIndex,sortedIndex:sortedIndex,indexOf:indexOf,lastIndexOf:lastIndexOf,find:find,detect:find,findWhere:findWhere,each:each,forEach:each,map:map,collect:map,reduce:reduce,foldl:reduce,inject:reduce,reduceRight:reduceRight,foldr:reduceRight,filter:filter,select:filter,reject:reject,every:every,all:every,some:some,any:some,contains:contains,includes:contains,include:contains,invoke:invoke,pluck:pluck,where:where,max:max,min:min,shuffle:shuffle,sample:sample,sortBy:sortBy,groupBy:groupBy,indexBy:indexBy,countBy:countBy,partition:partition,toArray:toArray,size:size,pick:pick,omit:omit,first:first,head:first,take:first,initial:initial,last:last,rest:rest,tail:rest,drop:rest,compact:compact,flatten:flatten,without:without,uniq:uniq,unique:uniq,union:union,intersection:intersection,difference:difference,unzip:unzip,transpose:unzip,zip:zip,object:object,range:range,chunk:chunk,mixin:mixin,default:_$2}),_$1=mixin(allExports);_$1._=_$1;var indexAll=Object.freeze({__proto__:null,default:_$1,VERSION:VERSION,restArguments:restArguments,isObject:isObject,isNull:isNull,isUndefined:isUndefined,isBoolean:isBoolean,isElement:isElement,isString:isString$1,isNumber:isNumber,isDate:isDate,isRegExp:isRegExp,isError:isError,isSymbol:isSymbol,isArrayBuffer:isArrayBuffer,isDataView:isDataView$1,isArray:isArray,isFunction:isFunction$2,isArguments:isArguments$1,isFinite:isFinite$1,isNaN:isNaN$1,isTypedArray:isTypedArray$1,isEmpty:isEmpty,isMatch:isMatch,isEqual:isEqual,isMap:isMap,isWeakMap:isWeakMap,isSet:isSet,isWeakSet:isWeakSet,keys:keys,allKeys:allKeys,values:values,pairs:pairs,invert:invert,functions:functions,methods:functions,extend:extend,extendOwn:extendOwn,assign:extendOwn,defaults:defaults,create:create,clone:clone,tap:tap,get:get,has:has,mapObject:mapObject,identity:identity,constant:constant,noop:noop,toPath:toPath$1,property:property,propertyOf:propertyOf,matcher:matcher,matches:matcher,times:times,random:random,now:now,escape:escape,unescape:unescape$1,templateSettings:templateSettings,template:template,result:result,uniqueId:uniqueId,chain:chain,iteratee:iteratee,partial:partial,bind:bind,bindAll:bindAll,memoize:memoize,delay:delay,defer:defer,throttle:throttle,debounce:debounce,wrap:wrap,negate:negate,compose:compose,after:after,before:before,once:once,findKey:findKey,findIndex:findIndex,findLastIndex:findLastIndex,sortedIndex:sortedIndex,indexOf:indexOf,lastIndexOf:lastIndexOf,find:find,detect:find,findWhere:findWhere,each:each,forEach:each,map:map,collect:map,reduce:reduce,foldl:reduce,inject:reduce,reduceRight:reduceRight,foldr:reduceRight,filter:filter,select:filter,reject:reject,every:every,all:every,some:some,any:some,contains:contains,includes:contains,include:contains,invoke:invoke,pluck:pluck,where:where,max:max,min:min,shuffle:shuffle,sample:sample,sortBy:sortBy,groupBy:groupBy,indexBy:indexBy,countBy:countBy,partition:partition,toArray:toArray,size:size,pick:pick,omit:omit,first:first,head:first,take:first,initial:initial,last:last,rest:rest,tail:rest,drop:rest,compact:compact,flatten:flatten,without:without,uniq:uniq,unique:uniq,union:union,intersection:intersection,difference:difference,unzip:unzip,transpose:unzip,zip:zip,object:object,range:range,chunk:chunk,mixin:mixin}),_=_commonjsHelpers.getAugmentedNamespace(indexAll),MiniSat;MiniSat=function(){var e=this._C=minisat();this._native={getStackPointer:function(){return e.Runtime.stackSave()},setStackPointer:function(r){e.Runtime.stackRestore(r)},allocateBytes:function(r){return e.allocate(r,"i8",e.ALLOC_STACK)},pushString:function(r){return this.allocateBytes(e.intArrayFromString(r))},savingStack:function(r){var i=this.getStackPointer();try{return r(this,e)}finally{this.setStackPointer(i)}}},e._createTheSolver(),this._clauses=[]},MiniSat.prototype.ensureVar=function(e){this._C._ensureVar(e)},MiniSat.prototype.addClause=function(e){return this._clauses.push(e),this._native.savingStack((function(r,i){var t=i.allocate(4*(e.length+1),"i32",i.ALLOC_STACK);return _.each(e,(function(e,r){i.setValue(t+4*r,e,"i32")})),i.setValue(t+4*e.length,0,"i32"),!!i._addClause(t)}))},MiniSat.prototype.solve=function(){return!!this._C._solve()},MiniSat.prototype.solveAssuming=function(e){return!!this._C._solveAssuming(e)},MiniSat.prototype.getSolution=function(){for(var e=[null],r=this._C,i=r._getNumVars(),t=r._getSolution(),n=0;n<i;n++)e[n+1]=0===r.getValue(t+n,"i8");return e},MiniSat.prototype.retireVar=function(e){this._C._retireVar(e)},MiniSat.prototype.getConflictClause=function(){for(var e=this._C,r=e._getConflictClauseSize(),i=e._getConflictClause(),t=[],n=0;n<r;n++){var o=e.getValue(i+4*n,"i32"),a=o>>>1,s=1&o?-1:1;t[n]=a*s}return t};var minisat_wrapper=MiniSat,Logic;Logic={};var withDescription=function(e,r){return r.description=e,r},lazyInstanceofTester=function(e,r,i){return withDescription(e,(function(e){return e instanceof r[i]}))};Logic.isNumTerm=withDescription("a NumTerm (non-zero integer)",(function(e){return e===(0|e)&&0!==e})),Logic.isNameTerm=withDescription("a NameTerm (string)",(function(e){return"string"==typeof e&&!/^-*[0-9]*$/.test(e)})),Logic.isTerm=withDescription("a Term (appropriate string or number)",(function(e){return Logic.isNumTerm(e)||Logic.isNameTerm(e)})),Logic.isWholeNumber=withDescription("a whole number (integer >= 0)",(function(e){return e===(0|e)&&e>=0})),Logic.isFormula=lazyInstanceofTester("a Formula",Logic,"Formula"),Logic.isClause=lazyInstanceofTester("a Clause",Logic,"Clause"),Logic.isBits=lazyInstanceofTester("a Bits",Logic,"Bits"),Logic._isInteger=withDescription("an integer",(function(e){return e===(0|e)})),Logic._isFunction=withDescription("a Function",(function(e){return"function"==typeof e})),Logic._isString=withDescription("a String",(function(e){return"string"==typeof e})),Logic._isArrayWhere=function(e){var r="an array";return e.description&&(r+=" of "+e.description),withDescription(r,(function(r){if(_.isArray(r)){for(var i=0;i<r.length;i++)if(!e(r[i]))return!1;return!0}return!1}))},Logic._isFormulaOrTerm=withDescription("a Formula or Term",(function(e){return Logic.isFormula(e)||Logic.isTerm(e)})),Logic._isFormulaOrTermOrBits=withDescription("a Formula, Term, or Bits",(function(e){return Logic.isFormula(e)||Logic.isBits(e)||Logic.isTerm(e)})),Logic._MiniSat=minisat_wrapper;var isInteger=Logic._isInteger,isFunction=Logic._isFunction,isString=Logic._isString,isArrayWhere=Logic._isArrayWhere,isFormulaOrTerm=Logic._isFormulaOrTerm,isFormulaOrTermOrBits=Logic._isFormulaOrTermOrBits;Logic._assert=function(e,r,i){if(!r(e)){var t="string"==typeof e?JSON.stringify(e):e;throw new Error(t+" is not "+(r.description||i))}};var assertNumArgs=function(e,r,i){if(e!==r)throw new Error("Expected "+r+" args in "+i+", got "+e)},assert=Logic._assert;Logic._assertIfEnabled=function(e,r,i){assert&&assert(e,r,i)},Logic.disablingAssertions=function(e){var r=assert;try{return assert=null,e()}finally{assert=r}},Logic._disablingTypeChecks=Logic.disablingAssertions,Logic.not=function(e){return assert&&assert(e,isFormulaOrTerm),e instanceof Logic.Formula?new Logic.NotFormula(e):"number"==typeof e?-e:"-"===e.charAt(0)?e.slice(1):"-"+e},Logic.NAME_FALSE="$F",Logic.NAME_TRUE="$T",Logic.NUM_FALSE=1,Logic.NUM_TRUE=2,Logic.TRUE=Logic.NAME_TRUE,Logic.FALSE=Logic.NAME_FALSE,Logic.Formula=function(){},Logic._defineFormula=function(e,r,i){assert&&assert(e,isFunction),assert&&assert(r,isString),e.prototype=new Logic.Formula,e.prototype.type=r,i&&_.extend(e.prototype,i)},Logic.Formula.prototype.generateClauses=function(e,r){throw new Error("Cannot generate this Formula; it must be expanded")},Logic.Formula._nextGuid=1,Logic.Formula.prototype._guid=null,Logic.Formula.prototype.guid=function(){return null===this._guid&&(this._guid=Logic.Formula._nextGuid++),this._guid},Logic.Clause=function(){var e=_.flatten(arguments);assert&&assert(e,isArrayWhere(Logic.isNumTerm)),this.terms=e},Logic.Clause.prototype.append=function(){return new Logic.Clause(this.terms.concat(_.flatten(arguments)))};var FormulaInfo=function(){this.varName=null,this.varNum=null,this.occursPositively=!1,this.occursNegatively=!1,this.isRequired=!1,this.isForbidden=!1};Logic.Termifier=function(e){this.solver=e},Logic.Termifier.prototype.clause=function(){var e=this,r=_.flatten(arguments);return assert&&assert(r,isArrayWhere(isFormulaOrTerm)),new Logic.Clause(_.map(r,(function(r){return e.term(r)})))},Logic.Termifier.prototype.term=function(e){return this.solver._formulaToTerm(e)},Logic.Termifier.prototype.generate=function(e,r){return this.solver._generateFormula(e,r,this)},Logic.Solver=function(){var e=this;e.clauses=[],e._num2name=[null],e._name2num={};var r=e.getVarNum(Logic.NAME_FALSE,!1,!0),i=e.getVarNum(Logic.NAME_TRUE,!1,!0);if(r!==Logic.NUM_FALSE||i!==Logic.NUM_TRUE)throw new Error("Assertion failure: $T and $F have wrong numeric value");e._F_used=!1,e._T_used=!1,e.clauses.push(new Logic.Clause(-Logic.NUM_FALSE)),e.clauses.push(new Logic.Clause(Logic.NUM_TRUE)),e._formulaInfo={},e._nextFormulaNumByType={},e._ungeneratedFormulas={},e._numClausesAddedToMiniSat=0,e._unsat=!1,e._minisat=new minisat_wrapper,e._termifier=new Logic.Termifier(e)},Logic.Solver.prototype.getVarNum=function(e,r,i){var t=" "+e;if(_.has(this._name2num,t))return this._name2num[t];if(r)return 0;if("$"===e.charAt(0)&&!i)throw new Error("Only generated variable names can start with $");var n=this._num2name.length;return this._name2num[t]=n,this._num2name.push(e),n},Logic.Solver.prototype.getVarName=function(e){assert&&assert(e,isInteger);var r=this._num2name;if(e<1||e>=r.length)throw new Error("Bad variable num: "+e);return r[e]},Logic.Solver.prototype.toNumTerm=function(e,r){if(assert&&assert(e,Logic.isTerm),"number"==typeof e)return e;for(var i=!1;"-"===e.charAt(0);)e=e.slice(1),i=!i;var t=this.getVarNum(e,r);return t?i?-t:t:0},Logic.Solver.prototype.toNameTerm=function(e){if(assert&&assert(e,Logic.isTerm),"string"==typeof e){for(;"--"===e.slice(0,2);)e=e.slice(2);return e}var r=!1;return e<0&&(r=!0,e=-e),e=this.getVarName(e),r&&(e="-"+e),e},Logic.Solver.prototype._addClause=function(e,r,i){assert&&assert(e,Logic.isClause);var t=null;r&&(t=r,assert&&assert(t,isArrayWhere(Logic.isNumTerm)));var n=!1,o=!1,a=e.terms.length;t&&(e=e.append(t));for(var s=0;s<e.terms.length;s++){var u=e.terms[s],f=u<0?-u:u;if(f===Logic.NUM_FALSE)n=!0;else if(f===Logic.NUM_TRUE)o=!0;else{if(f<1||f>=this._num2name.length)throw new Error("Bad variable number: "+f);s<a&&(i?i(u):this._useFormulaTerm(u))}}this._F_used=this._F_used||n,this._T_used=this._T_used||o,this.clauses.push(e)},Logic.Solver.prototype._useFormulaTerm=function(e,r){var i=this;assert&&assert(e,Logic.isNumTerm);var t=e<0?-e:e;if(_.has(i._ungeneratedFormulas,t)){var n,o=i._ungeneratedFormulas[t],a=i._getFormulaInfo(o),s=e>0,u=null;if(r?n=r:(u=[],n=function(e,r){u.push({clauses:e,extraTerms:r})}),s&&!a.occursPositively){a.occursPositively=!0;var f=i._generateFormula(!0,o);n(f,[-t])}else if(!s&&!a.occursNegatively){a.occursNegatively=!0;f=i._generateFormula(!1,o);n(f,[t])}if(a.occursPositively&&a.occursNegatively&&delete i._ungeneratedFormulas[t],u&&u.length)for(var l=function(e){i._useFormulaTerm(e,n)};u.length;){var c=u.pop();i._addClauses(c.clauses,c.extraTerms,l)}}},Logic.Solver.prototype._addClauses=function(e,r,i){assert&&assert(e,isArrayWhere(Logic.isClause));var t=this;_.each(e,(function(e){t._addClause(e,r,i)}))},Logic.Solver.prototype.require=function(){this._requireForbidImpl(!0,_.flatten(arguments))},Logic.Solver.prototype.forbid=function(){this._requireForbidImpl(!1,_.flatten(arguments))},Logic.Solver.prototype._requireForbidImpl=function(e,r){var i=this;assert&&assert(r,isArrayWhere(isFormulaOrTerm)),_.each(r,(function(r){if(r instanceof Logic.NotFormula)i._requireForbidImpl(!e,[r.operand]);else if(r instanceof Logic.Formula){var t=i._getFormulaInfo(r);if(null!==t.varNum){var n=e?1:-1;i._addClause(new Logic.Clause(n*t.varNum))}else i._addClauses(i._generateFormula(e,r));e?t.isRequired=!0:t.isForbidden=!0}else i._addClauses(i._generateFormula(e,r))}))},Logic.Solver.prototype._generateFormula=function(e,r,i){var t=this;if(assert&&assert(r,isFormulaOrTerm),r instanceof Logic.NotFormula)return t._generateFormula(!e,r.operand);if(r instanceof Logic.Formula){var n=t._getFormulaInfo(r);if(e&&n.isRequired||!e&&n.isForbidden)return[];if(e&&n.isForbidden||!e&&n.isRequired)return[new Logic.Clause];var o=r.generateClauses(e,i||t._termifier);return _.isArray(o)?o:[o]}var a=t.toNumTerm(r),s=e?1:-1;return a===s*Logic.NUM_TRUE||a===-s*Logic.NUM_FALSE?[]:a===s*Logic.NUM_FALSE||a===-s*Logic.NUM_TRUE?[new Logic.Clause]:[new Logic.Clause(s*a)]},Logic.Solver.prototype._clauseData=function(){var e=_.pluck(this.clauses,"terms");return this._T_used||e.splice(1,1),this._F_used||e.splice(0,1),e},Logic.Solver.prototype._clauseStrings=function(){var e=this,r=e._clauseData();return _.map(r,(function(r){return _.map(r,(function(r){var i=e.toNameTerm(r);if(/\s/.test(i)){var t="";"-"===i.charAt(0)&&(t="-",i=i.slice(1)),i=t+'"'+i+'"'}return i})).join(" v ")}))},Logic.Solver.prototype._getFormulaInfo=function(e,r){var i=this,t=e.guid();if(!i._formulaInfo[t]){if(r)return null;i._formulaInfo[t]=new FormulaInfo}return i._formulaInfo[t]},Logic.Solver.prototype._formulaToTerm=function(e){var r=this;if(_.isArray(e))return assert&&assert(e,isArrayWhere(isFormulaOrTerm)),_.map(e,_.bind(r._formulaToTerm,r));if(assert&&assert(e,isFormulaOrTerm),e instanceof Logic.NotFormula)return Logic.not(r._formulaToTerm(e.operand));if(e instanceof Logic.Formula){var i=this._getFormulaInfo(e);if(i.isRequired)return Logic.NUM_TRUE;if(i.isForbidden)return Logic.NUM_FALSE;if(null===i.varNum){var t=e.type;this._nextFormulaNumByType[t]||(this._nextFormulaNumByType[t]=1);var n=this._nextFormulaNumByType[t]++;i.varName="$"+e.type+n,i.varNum=this.getVarNum(i.varName,!1,!0),this._ungeneratedFormulas[i.varNum]=e}return i.varNum}return r.toNumTerm(e)},Logic.or=function(){var e=_.flatten(arguments);return 0===e.length?Logic.FALSE:1===e.length?(assert&&assert(e[0],isFormulaOrTerm),e[0]):new Logic.OrFormula(e)},Logic.OrFormula=function(e){assert&&assert(e,isArrayWhere(isFormulaOrTerm)),this.operands=e},Logic._defineFormula(Logic.OrFormula,"or",{generateClauses:function(e,r){if(e)return r.clause(this.operands);var i=[];return _.each(this.operands,(function(e){i.push.apply(i,r.generate(!1,e))})),i}}),Logic.NotFormula=function(e){assert&&assert(e,isFormulaOrTerm),this.operand=e},Logic._defineFormula(Logic.NotFormula,"not"),Logic.and=function(){var e=_.flatten(arguments);return 0===e.length?Logic.TRUE:1===e.length?(assert&&assert(e[0],isFormulaOrTerm),e[0]):new Logic.AndFormula(e)},Logic.AndFormula=function(e){assert&&assert(e,isArrayWhere(isFormulaOrTerm)),this.operands=e},Logic._defineFormula(Logic.AndFormula,"and",{generateClauses:function(e,r){if(e){var i=[];return _.each(this.operands,(function(e){i.push.apply(i,r.generate(!0,e))})),i}return r.clause(_.map(this.operands,Logic.not))}});var group=function(e,r){for(var i=[],t=0;t<e.length;t+=r)i.push(e.slice(t,t+r));return i};Logic.xor=function(){var e=_.flatten(arguments);return 0===e.length?Logic.FALSE:1===e.length?(assert&&assert(e[0],isFormulaOrTerm),e[0]):new Logic.XorFormula(e)},Logic.XorFormula=function(e){assert&&assert(e,isArrayWhere(isFormulaOrTerm)),this.operands=e},Logic._defineFormula(Logic.XorFormula,"xor",{generateClauses:function(e,r){var i=this.operands,t=Logic.not;if(i.length>3)return r.generate(e,Logic.xor(_.map(group(this.operands,3),(function(e){return Logic.xor(e)}))));if(e){if(0===i.length)return r.clause();if(1===i.length)return r.clause(i[0]);if(2===i.length){var n=i[0],o=i[1];return[r.clause(n,o),r.clause(t(n),t(o))]}if(3===i.length){n=i[0],o=i[1];var a=i[2];return[r.clause(n,o,a),r.clause(n,t(o),t(a)),r.clause(t(n),o,t(a)),r.clause(t(n),t(o),a)]}}else{if(0===i.length)return[];if(1===i.length)return r.clause(t(i[0]));if(2===i.length){n=i[0],o=i[1];return[r.clause(n,t(o)),r.clause(t(n),o)]}if(3===i.length){n=i[0],o=i[1],a=i[2];return[r.clause(t(n),t(o),t(a)),r.clause(t(n),o,a),r.clause(n,t(o),a),r.clause(n,o,t(a))]}}}}),Logic.atMostOne=function(){var e=_.flatten(arguments);return e.length<=1?Logic.TRUE:new Logic.AtMostOneFormula(e)},Logic.AtMostOneFormula=function(e){assert&&assert(e,isArrayWhere(isFormulaOrTerm)),this.operands=e},Logic._defineFormula(Logic.AtMostOneFormula,"atMostOne",{generateClauses:function(e,r){var i=this.operands,t=Logic.not;if(i.length<=1)return[];if(2===i.length)return r.generate(e,Logic.not(Logic.and(i)));if(e&&3===i.length){for(var n=[],o=0;o<i.length;o++)for(var a=o+1;a<i.length;a++)n.push(r.clause(t(i[o]),t(i[a])));return n}if(e||3!==i.length){var s=group(i,3),u=_.map(s,(function(e){return Logic.or(e)}));s[s.length-1].length<2&&s.pop();var f=_.map(s,(function(e){return Logic.atMostOne(e)}));return r.generate(e,Logic.and(Logic.atMostOne(u),f))}var l=i[0],c=i[1],h=i[2];return[r.clause(l,c),r.clause(l,h),r.clause(c,h)]}}),Logic.implies=function(e,r){return assert&&assertNumArgs(arguments.length,2,"Logic.implies"),new Logic.ImpliesFormula(e,r)},Logic.ImpliesFormula=function(e,r){assert&&assert(e,isFormulaOrTerm),assert&&assert(r,isFormulaOrTerm),assert&&assertNumArgs(arguments.length,2,"Logic.implies"),this.A=e,this.B=r},Logic._defineFormula(Logic.ImpliesFormula,"implies",{generateClauses:function(e,r){return r.generate(e,Logic.or(Logic.not(this.A),this.B))}}),Logic.equiv=function(e,r){return assert&&assertNumArgs(arguments.length,2,"Logic.equiv"),new Logic.EquivFormula(e,r)},Logic.EquivFormula=function(e,r){assert&&assert(e,isFormulaOrTerm),assert&&assert(r,isFormulaOrTerm),assert&&assertNumArgs(arguments.length,2,"Logic.equiv"),this.A=e,this.B=r},Logic._defineFormula(Logic.EquivFormula,"equiv",{generateClauses:function(e,r){return r.generate(!e,Logic.xor(this.A,this.B))}}),Logic.exactlyOne=function(){var e=_.flatten(arguments);return 0===e.length?Logic.FALSE:1===e.length?(assert&&assert(e[0],isFormulaOrTerm),e[0]):new Logic.ExactlyOneFormula(e)},Logic.ExactlyOneFormula=function(e){assert&&assert(e,isArrayWhere(isFormulaOrTerm)),this.operands=e},Logic._defineFormula(Logic.ExactlyOneFormula,"exactlyOne",{generateClauses:function(e,r){var i=this.operands;return i.length<3?r.generate(e,Logic.xor(i)):r.generate(e,Logic.and(Logic.atMostOne(i),Logic.or(i)))}}),Logic.Bits=function(e){assert&&assert(e,isArrayWhere(isFormulaOrTerm)),this.bits=e},Logic.constantBits=function(e){assert&&assert(e,Logic.isWholeNumber);for(var r=[];e;)r.push(1&e?Logic.TRUE:Logic.FALSE),e>>>=1;return new Logic.Bits(r)},Logic.variableBits=function(e,r){assert&&assert(r,Logic.isWholeNumber);for(var i=[],t=0;t<r;t++)i.push(e+"$"+t);return new Logic.Bits(i)},Logic.lessThanOrEqual=function(e,r){return new Logic.LessThanOrEqualFormula(e,r)},Logic.LessThanOrEqualFormula=function(e,r){assert&&assert(e,Logic.isBits),assert&&assert(r,Logic.isBits),assert&&assertNumArgs(arguments.length,2,"Bits comparison function"),this.bits1=e,this.bits2=r};var genLTE=function(e,r,i,t){var n=[],o=e.bits.slice(),a=r.bits.slice();if(t&&!r.bits.length)return i.clause();for(;o.length>a.length;){var s=o.pop();n.push(i.clause(Logic.not(s)))}for(var u=_.map(a,(function(e,r){return r<o.length?Logic.xor(o[r],e):e})),f=o.length-1;f>=0;f--)n.push(i.clause(u.slice(f+1),Logic.not(o[f]),a[f]));return t&&n.push.apply(n,i.generate(!0,Logic.or(u))),n};Logic._defineFormula(Logic.LessThanOrEqualFormula,"lte",{generateClauses:function(e,r){return e?genLTE(this.bits1,this.bits2,r,!1):genLTE(this.bits2,this.bits1,r,!0)}}),Logic.lessThan=function(e,r){return new Logic.LessThanFormula(e,r)},Logic.LessThanFormula=function(e,r){assert&&assert(e,Logic.isBits),assert&&assert(r,Logic.isBits),assert&&assertNumArgs(arguments.length,2,"Bits comparison function"),this.bits1=e,this.bits2=r},Logic._defineFormula(Logic.LessThanFormula,"lt",{generateClauses:function(e,r){return e?genLTE(this.bits1,this.bits2,r,!0):genLTE(this.bits2,this.bits1,r,!1)}}),Logic.greaterThan=function(e,r){return Logic.lessThan(r,e)},Logic.greaterThanOrEqual=function(e,r){return Logic.lessThanOrEqual(r,e)},Logic.equalBits=function(e,r){return new Logic.EqualBitsFormula(e,r)},Logic.EqualBitsFormula=function(e,r){assert&&assert(e,Logic.isBits),assert&&assert(r,Logic.isBits),assert&&assertNumArgs(arguments.length,2,"Logic.equalBits"),this.bits1=e,this.bits2=r},Logic._defineFormula(Logic.EqualBitsFormula,"equalBits",{generateClauses:function(e,r){for(var i=this.bits1.bits,t=this.bits2.bits,n=Math.max(i.length,t.length),o=[],a=0;a<n;a++)a>=i.length?o.push(Logic.not(t[a])):a>=t.length?o.push(Logic.not(i[a])):o.push(Logic.equiv(i[a],t[a]));return r.generate(e,Logic.and(o))}}),Logic.HalfAdderSum=function(e,r){assert&&assert(e,isFormulaOrTerm),assert&&assert(r,isFormulaOrTerm),assert&&assertNumArgs(arguments.length,2,"Logic.HalfAdderSum"),this.a=e,this.b=r},Logic._defineFormula(Logic.HalfAdderSum,"hsum",{generateClauses:function(e,r){return r.generate(e,Logic.xor(this.a,this.b))}}),Logic.HalfAdderCarry=function(e,r){assert&&assert(e,isFormulaOrTerm),assert&&assert(r,isFormulaOrTerm),assert&&assertNumArgs(arguments.length,2,"Logic.HalfAdderCarry"),this.a=e,this.b=r},Logic._defineFormula(Logic.HalfAdderCarry,"hcarry",{generateClauses:function(e,r){return r.generate(e,Logic.and(this.a,this.b))}}),Logic.FullAdderSum=function(e,r,i){assert&&assert(e,isFormulaOrTerm),assert&&assert(r,isFormulaOrTerm),assert&&assert(i,isFormulaOrTerm),assert&&assertNumArgs(arguments.length,3,"Logic.FullAdderSum"),this.a=e,this.b=r,this.c=i},Logic._defineFormula(Logic.FullAdderSum,"fsum",{generateClauses:function(e,r){return r.generate(e,Logic.xor(this.a,this.b,this.c))}}),Logic.FullAdderCarry=function(e,r,i){assert&&assert(e,isFormulaOrTerm),assert&&assert(r,isFormulaOrTerm),assert&&assert(i,isFormulaOrTerm),assert&&assertNumArgs(arguments.length,3,"Logic.FullAdderCarry"),this.a=e,this.b=r,this.c=i},Logic._defineFormula(Logic.FullAdderCarry,"fcarry",{generateClauses:function(e,r){return r.generate(!e,Logic.atMostOne(this.a,this.b,this.c))}});var binaryWeightedSum=function(e){assert&&assert(e,isArrayWhere(isArrayWhere(isFormulaOrTerm)));for(var r=_.map(e,_.clone),i=0,t=[];i<r.length;){var n=r[i];if(n.length)if(1===n.length)t.push(n[0]),i++;else if(2===n.length){var o=new Logic.HalfAdderSum(n[0],n[1]),a=new Logic.HalfAdderCarry(n[0],n[1]);n.length=0,n.push(o),pushToNth(r,i+1,a)}else{var s=n.pop(),u=n.pop(),f=n.pop();o=new Logic.FullAdderSum(f,u,s),a=new Logic.FullAdderCarry(f,u,s);n.push(o),pushToNth(r,i+1,a)}else t.push(Logic.FALSE),i++}return t},pushToNth=function(e,r,i){for(;r>=e.length;)e.push([]);e[r].push(i)},checkWeightedSumArgs=function(e,r){if(assert&&assert(e,isArrayWhere(isFormulaOrTerm)),"number"==typeof r)assert&&assert(r,Logic.isWholeNumber);else if(assert&&assert(r,isArrayWhere(Logic.isWholeNumber)),e.length!==r.length)throw new Error("Formula array and weight array must be same length; they are "+e.length+" and "+r.length)};Logic.weightedSum=function(e,r){if(checkWeightedSumArgs(e,r),0===e.length)return new Logic.Bits([]);"number"==typeof r&&(r=_.map(e,(function(){return r})));var i=[];return _.each(e,(function(e,t){for(var n=r[t],o=0;n;)1&n&&pushToNth(i,o,e),n>>>=1,o++})),new Logic.Bits(binaryWeightedSum(i))},Logic.sum=function(){var e=_.flatten(arguments);assert&&assert(e,isArrayWhere(isFormulaOrTermOrBits));var r=[];return _.each(e,(function(e){e instanceof Logic.Bits?_.each(e.bits,(function(e,i){pushToNth(r,i,e)})):pushToNth(r,0,e)})),new Logic.Bits(binaryWeightedSum(r))},Logic.Solver.prototype.solve=function(e){var r=this;if(void 0!==e&&!(e>=1))throw new Error("_assumpVar must be a variable number");if(r._unsat)return null;for(;r._numClausesAddedToMiniSat<r.clauses.length;){var i=r._numClausesAddedToMiniSat,t=r.clauses[i].terms;assert&&assert(t,isArrayWhere(Logic.isNumTerm));var n=r._minisat.addClause(t);if(r._numClausesAddedToMiniSat++,!n)return r._unsat=!0,null}return assert&&assert(this._num2name.length-1,Logic.isWholeNumber),r._minisat.ensureVar(this._num2name.length-1),(n=e?r._minisat.solveAssuming(e):r._minisat.solve())?new Logic.Solution(r,r._minisat.getSolution()):(e||(r._unsat=!0),null)},Logic.Solver.prototype.solveAssuming=function(e){assert&&assert(e,isFormulaOrTerm);var r=new Logic.Assumption(e),i=this._formulaToTerm(r);if(!("number"==typeof i&&i>0))throw new Error("Assertion failure: not a positive numeric term");this._useFormulaTerm(i);var t=this.solve(i);return this._minisat.retireVar(i),t},Logic.Assumption=function(e){assert&&assert(e,isFormulaOrTerm),this.formula=e},Logic._defineFormula(Logic.Assumption,"assump",{generateClauses:function(e,r){return e?r.clause(this.formula):r.clause(Logic.not(this.formula))}}),Logic.Solution=function(e,r){var i=this;i._solver=e,i._assignment=r,i._ungeneratedFormulas=_.clone(e._ungeneratedFormulas),i._formulaValueCache={},i._termifier=new Logic.Termifier(i._solver),i._termifier.term=function(e){return i.evaluate(e)?Logic.NUM_TRUE:Logic.NUM_FALSE},i._ignoreUnknownVariables=!1},Logic.Solution.prototype.ignoreUnknownVariables=function(){this._ignoreUnknownVariables=!0},Logic.Solution.prototype.getMap=function(){for(var e=this._solver,r=this._assignment,i={},t=1;t<r.length;t++){var n=e.getVarName(t);n&&"$"!==n.charAt(0)&&(i[n]=r[t])}return i},Logic.Solution.prototype.getTrueVars=function(){for(var e=this._solver,r=this._assignment,i=[],t=1;t<r.length;t++)if(r[t]){var n=e.getVarName(t);n&&"$"!==n.charAt(0)&&i.push(n)}return i.sort(),i},Logic.Solution.prototype.getFormula=function(){for(var e=this._solver,r=this._assignment,i=[],t=1;t<r.length;t++){var n=e.getVarName(t);n&&"$"!==n.charAt(0)&&i.push(r[t]?t:-t)}return Logic.and(i)},Logic.Solution.prototype.evaluate=function(e){var r=this;if(assert&&assert(e,isFormulaOrTermOrBits),e instanceof Logic.Bits){var i=0;return _.each(e.bits,(function(e,t){r.evaluate(e)&&(i+=1<<t)})),i}var t=r._solver,n=r._ignoreUnknownVariables,o=r._assignment,a=e;if(a instanceof Logic.NotFormula)return!r.evaluate(a.operand);if(a instanceof Logic.Formula){var s=r._formulaValueCache[a.guid()];if("boolean"==typeof s)return s;var u=t._getFormulaInfo(a,!0);if(u&&u.varNum&&u.varNum<o.length&&!_.has(r._ungeneratedFormulas,u.varNum))l=o[u.varNum];else var f=t._generateFormula(!0,a,r._termifier),l=_.all(f,(function(e){return _.any(e.terms,(function(e){return r.evaluate(e)}))}));return r._formulaValueCache[a.guid()]=l,l}var c=t.toNumTerm(a,!0);if(!c){if(n)return!1;var h=String(a).replace(/^-*/,"");throw new Error("No such variable: "+h)}var d=c,m=!1;if(c<0&&(d=-d,m=!0),d<1||d>=o.length){h=d;if(d>=1&&d<t._num2name.length&&(h=t._num2name[d]),n)return!1;throw new Error("Variable not part of solution: "+h)}i=o[d];return m&&(i=!i),i},Logic.Solution.prototype.getWeightedSum=function(e,r){checkWeightedSumArgs(e,r);var i=0;if("number"==typeof r)for(var t=0;t<e.length;t++)i+=r*(this.evaluate(e[t])?1:0);else for(t=0;t<e.length;t++)i+=r[t]*(this.evaluate(e[t])?1:0);return i};var getNonZeroWeightedTerms=function(e,r){if("number"==typeof r)return r?e:[];for(var i=[],t=0;t<e.length;t++)r[t]&&i.push(e[t]);return i},minMaxWS=function(e,r,i,t,n,o){var a=r,s=a.getWeightedSum(i,t),u=n&&n.formula||Logic.weightedSum(i,t),f=n&&n.progress,l=n&&n.strategy,c=null;if(o&&s>0){f&&f("trying",0);var h=null;c=getNonZeroWeightedTerms(i,t),(h=e.solveAssuming(Logic.not(Logic.or(c))))&&(a=h,s=0)}if(o&&"bottom-up"===l)for(var _=1;_<s;_++){f&&f("trying",_);var d=Logic.equalBits(u,Logic.constantBits(_));if(m=e.solveAssuming(d)){a=m,s=_;break}}else{if(l&&"default"!==l)throw new Error("Bad strategy: "+l);l="default"}if("default"===l)for(;!o||s>0;){f&&f("improving",s);var m,g=(o?Logic.lessThan:Logic.greaterThan)(u,Logic.constantBits(s));if(!(m=e.solveAssuming(g)))break;e.require(g),s=(a=m).getWeightedSum(i,t)}return o&&0===s?(c||(c=getNonZeroWeightedTerms(i,t)),e.forbid(c)):e.require(Logic.equalBits(u,Logic.constantBits(s))),f&&f("finished",s),a};Logic.Solver.prototype.minimizeWeightedSum=function(e,r,i,t){return minMaxWS(this,e,r,i,t,!0)},Logic.Solver.prototype.maximizeWeightedSum=function(e,r,i,t){return minMaxWS(this,e,r,i,t,!1)};var logicSolver=Logic,logicSolver$1=_mergeNamespaces({__proto__:null,default:logicSolver},[logicSolver]);const{Solver:Solver,exactlyOne:exactlyOne,atMostOne:atMostOne,implies:implies,or:or}=logicSolver$1;async function solveSat(e,r){const i=e.root.dependencies.concat(e.root.devDependencies);await resolveDependencies(i,r);const t=await optimizeResolved(r.graph,i),n=new Solver;for(const[e,i]of r){const{registered:r}=i,o=t.includes(e),a=r.map((e=>e.id));o?n.require(exactlyOne(...a)):n.require(atMostOne(...a))}const o=[...r].reverse();for(const[e,i]of o){const{registered:e}=i;for(const i of e)for(const e of i.dependencies){const t=r.graph.get(e.name);assert$1.ok(t,`Dependency "${e.name}" hasn't been resolved`);const o=getMatching(e,t);n.require(implies(i.id,or(...o)))}}const a=n.solve();if(!a)throw new Error("Failed to resolve dependency graph for given manifest");return a.getTrueVars().map((e=>r.getRegistration(e))).filter((function(e){return null!=e}))}async function resolveDependencies(e,r){const i=await Promise.all(e.map((e=>r.get(e))));for(const e of i){const{registered:i}=e;await Promise.all(i.map((e=>resolveDependencies(e.dependencies,r))))}}async function optimizeResolved(e,r){const i=[],t={};for(const e of r){const{name:r}=e;i.push(r),project.isRegistryDependency(e)&&(t[r]=e.version)}for(const[r,i]of e){const{registered:e}=i,n=t[r]||project.unique(i.range).join(" || ");i.registered=e.filter((e=>index.semver.satisfies(e.version,n))).reverse()}return i}function getMatching(e,r){const{registered:i}=r;if(project.isRegistryDependency(e)){const{version:r}=e;return i.filter((e=>index.semver.satisfies(e.version,r))).map((e=>e.id))}return[]}exports.optimizeResolved=optimizeResolved,exports.resolveDependencies=resolveDependencies,exports.solveSat=solveSat;
2
+ //# sourceMappingURL=sat-solver-01d6409e.js.map